Our state of the art Gantt chart


Post by dmitrichxd »

Hey guys!

Currently, we are facing a problem with Gantt on the initialization. In case of changing a tab while Gantt was not rendered fully we are getting an error "Invalid time axis configuration or filter, please check your input data." from gantt.lwc.module.min.js library. Basically in getSizeAndPosition() method:

image (1).png
image (1).png (101.37 KiB) Viewed 379 times

It happens because the "o" property which is the timeAxis array and should be filled with values is an empty array when Gantt is initializing in the background.
It looks like this on the gif https://imgur.com/OAOfo2U

Thanks and best regards

Attachments
OAOfo2U.mp4
(270.75 KiB) Downloaded 17 times

Post by alex.l »

Hi,

Could you pls share a simple test case, so we will be able to reproduce this and confirm a bug?

All the best,
Alex


Post by dmitrichxd »

Hi Alex.

https://www.dropbox.com/scl/fi/2uyw91viimbzd49p8h8k0/chrome_GwT5DcALc2.mp4?rlkey=95e9kjeopbdltw27809mlwhaj&dl=0

  1. Navigate to the tab with the embedded Gantt component.
  2. While Gantt component rendering is in progress switch to another tab.
  3. Error received.
db81647f-71a7-41e9-9f32-156a759284fc.png
db81647f-71a7-41e9-9f32-156a759284fc.png (119.24 KiB) Viewed 353 times

Post by ghulam.ghous »

Hi there,

The above dropbox link does not contain a runnable project where we can reproduce this issue. This is a video clip showing how we can reproduce this issue on our end. But as Alex mentioned above we need a test case where we can debug this issue. So please share one with us so we can assist you in a better way. Also can you try reproducing the issue in our online examples here https://bryntum.com/products/gantt/examples/?

Regards,
Ghous


Post by dmitrichxd »

Hi, Ghous

I am not sure I've understood the assignment fully. Maybe you can provide me with a way to create a runnable project. I've checked your demo salesforce integration example and it's not reproducible there. But it can be a lot of reasons why it's not reproducible. Meanwhile attaching part of the source code with our Gantt configuration and initialization with cut unnecessary blocks. Maybe it will be useful.

Regards

Attachments
ganttSection.js
(3.4 KiB) Downloaded 20 times
BryntumUtils.js
(10.47 KiB) Downloaded 21 times

Post by alex.l »

Could you pls post template you use? I will try to add 2 tabs as you did and test tab change.
On your end pls try to comment this line

this.gantt.store.sort('startDate');

and see if bug is still reproducible.

All the best,
Alex


Post by dmitrichxd »

Hey Alex!

Yup, I've debugged everything before and the exact place where it's failing is one row above:

this.gantt = getGanttConfig(project, ganttContainer, self);

Here is the markup

ganttSection.txt
(2.3 KiB) Downloaded 11 times

Thanks and best regards


Post by alex.l »

It's not exactly that I expected, I need a structure of tabs, not one tab. I used this template and it worked

<template>
    <lightning-tabset>
        <lightning-tab label="Item Two"> 
            <div class="container" lwc:dom="manual"></div>
        </lightning-tab>
        <lightning-tab label="Item One"> Content for tab 1 </lightning-tab>        
</lightning-tabset> </template>

What should I change?

All the best,
Alex


Post by dmitrichxd »

Oh, sorry, got it.
It's a standard Salesforce Tabs component so I am navigating between standard tabs:

IwgxKTyuOa.png
IwgxKTyuOa.png (149.67 KiB) Viewed 279 times

Inside this tab, we have our LWC component.
And it's not only the one place where the issue is reproducible.
Also, we have the same component embedded in Custom Tab and switching between Custom Tabs is also triggering this error. like here

Regards


Post by alex.l »

Thanks for the info! I tested again and it still working ok. We need more details. What version do you use? Do you have LWS enabled? Debug mode?

All the best,
Alex


Post Reply