Our state of the art Gantt chart


Post by ahmad.siddique »

Hi everyone,

I have a new requirement, In the Gantt chart when I zoom to the level of days or weeks. the labels at the top are misleading

For example when I have zoomed in to days level. it shows me each day with a date but at the top, it shows the start date of the week instead it should show the week number of the year.

BVdefaGuc4P8Pu.png
BVdefaGuc4P8Pu.png (116.21 KiB) Viewed 137 times

The same goes for weeks level of zoom. it should show the week number instead of the start date of the week.

Screenshot 2024-02-26 at 2.57.03 PM.png
Screenshot 2024-02-26 at 2.57.03 PM.png (10.04 KiB) Viewed 137 times

Post by kronaemmanuel »

Hi Ahmad,

ViewPresets give you option to customize the headers according to your needs. Please go through the docs here: https://bryntum.com/products/gantt/docs/api/Scheduler/preset/ViewPreset#defining-custom-header-rows. We keep a set of presets in the PresetManager https://bryntum.com/products/gantt/docs/api/Scheduler/preset/PresetManager. The presets 'kick-in' at different zoomLevels. You can check which preset is being used a specific zoomLevel by running gantt.viewPreset. Then you can change the headers in that preset to match your needs. I believe the one you need to modify is the weekAndMonth preset.

Regards,
Krona


Post by ahmad.siddique »

Thanks. it helped


Post Reply