Our state of the art Gantt chart


Post by sasha573 »

Hi guys!
We want to allow the user to pick up color for non-working events from color picker and apply changes to gantt, is there a way to change the color of non-working events depending on user selection?
E.g. for tasks we use taskRenderer to change styling, is there anything similar on taskNonWorkingTimeFeature?


Post by alex.l »

Please check this demo, it shows how to style task non working intervals https://bryntum.com/products/gantt/examples/calendars/
There is also https://bryntum.com/products/gantt/docs/api/Gantt/model/CalendarIntervalModel#field-cls that you can use if you need to have different styling for intervals.

All the best,
Alex


Post by sasha573 »

Hi Alex!
This works perfectly fine if we have pre-defined colors for different calendars and we can assign it to corresponding classes. But if the user would like to pick up random color from color picker in customized gantt toolbar and aplly it to non-working calendar events immediately?


Post by alex.l »

There is no other instruments, except provided above. You can get CalendarIntervalModel record from calendar and change cls field value.

All the best,
Alex


Post by sasha573 »

Ok, thanks for advice.


Post Reply