Our state of the art Gantt chart


Post by josevmichael »

startDate and endDate on Gantt Chart changing when viewPreset or zoomLevel changes.
For the zoom in and zoom out I have written the below but its taking so much time to reflect the change in the Gantt chart. Is there any other way to do it better.

onDateRangeChange : function (sDate, eDate) {
     console.log('myGridTree: entered fun:onDateRangeChange');
      this.setTimeSpan(startDate, endDate);
 }     

Post by Animal »

It has to really. Otherwise the timeline might end up tiny (if you zoom right out to a years-based ViewPreset), or might end up enormous if you zoom right in to the ViewPreset with the most granular view.


Post by josevmichael »

can you please elaborate it with a sample code


Post by marcio »

Hey Jose,

As Animal suggested, for performance reasons we have that set automatically if no configuration is set. Otherwise, we'll have something like the screenshot attached.

What's the expected behavior that you want to achieve??

Attachments
Screen Shot 2022-08-18 at 11.50.36.png
Screen Shot 2022-08-18 at 11.50.36.png (39.24 KiB) Viewed 172 times

Best regards,
Márcio


Post by josevmichael »

Thanks for your reply, I have got the solution by setting zoomKeepsOriginalTimespan: true,


Post Reply