Our state of the art Gantt chart


Post by ngd »

Let's say when baseline 0 and 2 were made, i had 3 tasks - A, B and C. But while doing baseline 1, task B was missing. Should task B's baselise json array be like this:

 [{startDate: d1, endDate:d2}, null, {startDate: d3, endDate:d4}]

?


Post by ghulam.ghous »

So when adding baselines for a task, we ensure that previous baselines exist. So let's say in your case, when you made baseline 2, the baseline 1 will also be made for task B. It is worth mentioning here that baselines on a task is a store, when adding something on index 2, we need to make sure values for index 0 and 1, exists to ensure consistency. You can check this behaviour here in our example for baselines.

https://bryntum.com/products/gantt/examples/baselines/

Screen Recording 2025-02-04 at 3.25.33 PM.mov
(13.43 MiB) Downloaded 4 times

Post by ngd »

In our case, you can select a task and say "save to baseline 1" or even "save to baseline 2", so having a "null" is possible.


Post by ghulam.ghous »

How you are doing that? Have you customised the baseline feature? Because as far as our baselines feature is concerned, it shouldn't be possible. How you are saving these baselines? Because setting null there might result in some issues as we never considered it's use in such a way.


Post by ngd »

We are not using Bryntum Gantt to save the baseline. We have a server-side feature that does it. Given 1) a baseline number to save 2) set of tasks. It will save the tasks' dates to the baseline. I don't see any problem with our approach. If a baseline is missing, just dont show the bar. Simple.


Post by arcady »

Hello,

Providing null-s in such case sounds logical yet the Gantt code will probably throw an exception then.
At the moment you can try providing empty objects for such entries instead.
Please let us how that worked!

Best regards,
Arcady


Post Reply