gantt-task-react
gantt-task-react copied to clipboard
Change the barBackgroundColor based on condition
Hi @maberalc @MaTeMaTuK @Janlaywss @hexagonatron @VikariiCGI
I want to change the barBackgroundColor based on condition. Inline is allowing me to pass only progressColor and progressSelectedColor styles: { progressColor: '#ffbb54', progressSelectedColor: '#ff9e0d' }
Please let me know how I can set individual bar background color differently?
Thank you, Sunil
The task allows for the background color to be set in the styles for the task https://github.com/MaTeMaTuK/gantt-task-react#task
{
start: new Date(currentDate.getFullYear(), currentDate.getMonth(), 1),
end: new Date(currentDate.getFullYear(), currentDate.getMonth(), 1,4),
name: "Research",
id: "Task 1",
progress: 25,
dependencies: ["Task 0"],
type: "task",
styles: {
backgroundColor: '#FF0000'
},
project: "ProjectSample",
displayOrder: 3,
},