Our state of the art Gantt chart


Post by zhang »

Requirements are as follows:
When I right click on the timeAxisHeader, I want to customize the timeAxisHeaderMenu, which contains an input box and a time selection box, and a OK button. When I enter text in the input box, select a time point, and click OK, I can generate the timeRange with the input text and time.
Now the question is, how do I customize the input field and the time select field and get their values, finally listen for the ok button event, and then add a timeRange?
Can the above requirements be met?


Post by alex.l »

Here is the guide how to customize TimeAxisHeaderMenu
https://bryntum.com/docs/gantt/api/Scheduler/feature/TimeAxisHeaderMenu#customizing-the-menu-items
How to add custom items described in this part https://bryntum.com/docs/gantt/guide/Gantt/customization/contextmenu#add-custom-items
And the general information about context menu customization
https://bryntum.com/docs/gantt/guide/Gantt/customization/contextmenu
MenuItem has onItem method to handle click. If you added a button, you need to use its onClick
https://bryntum.com/docs/gantt/api/Core/widget/Button
To set timeSpan https://bryntum.com/docs/gantt/api/Gantt/view/Gantt#function-setTimeSpan

All the best,
Alex


Post Reply