Our state of the art Gantt chart


Post by ducminh1511 »

Hello friends,

I have an issue, how to set the color of the task to white, the name of the task will be black. I have a white task and the text is also white so I can't see the task

Attachments
color_task.png
color_task.png (7.28 KiB) Viewed 508 times

Post by mats »

You can use simple CSS to style your tasks as you want: Set this on your model instances: https://bryntum.com/docs/scheduler/#Scheduler/model/EventModel#field-cls

Then use the rule you set to apply a color https://developer.mozilla.org/en-US/docs/Web/CSS/color_value

Also see our styling guide: https://bryntum.com/docs/scheduler/#guides/customization/styling.md


Post by ducminh1511 »

Sorry. I am not understanding what you mean, I created the data in the .json file as shown below. I just want when the color of the task is white, the task name will be black so it can be seen. And the border of the tasks is gray

Attachments
color_task_2.png
color_task_2.png (124.89 KiB) Viewed 504 times
color_task_1.png
color_task_1.png (15.61 KiB) Viewed 504 times

Post by mats »

You put 'cls' in the data, then create a CSS file with the style:

{
    cls: 'foo'
}

in your styles.css:

.foo {
    color: black;
}

Post by ducminh1511 »

thank you very much.


Post Reply