Our state of the art Gantt chart


Post by niteshmummidi »

Hi,

when the critical path is enabled on the Bryntum gantt chart, only certain tasks are highlighted, instead I want the whole path to be highlighted which has critical task. How can this be achieved.

Attachments
critical path.png
critical path.png (63.62 KiB) Viewed 96 times

Post by arcady »

Hello,

The feature highlights critical tasks only. I don't have your data but I see some space between the last task and its predecessors which could explain why they are not critical (they can be delayed w/o delaying the project end).
You can check the tasks critical field to understand whether they are critical or not.

Best regards,
Arcady


Post by niteshmummidi »

Hello,

Thanks for the reply. I understand what is being said, but having said that is there any way to highlight the whole path as critical even if at least one of the task is critical?


Post by arcady »

Hello,

The feature highlights only critical tasks by design but you don't have to use it for highlighting tasks.
It's just a matter of adding a CSS class to task bar elements. You can make a taskRenderer function to add CSS classes based on your custom condition.

new Gantt({
    taskRenderer({ renderData, taskRecord }) {
        // add "foo" CSS class to task element
        renderData.cls.foo = true;
    },
    ...
});

Best regards,
Arcady


Post by niteshmummidi »

I tried doing it, the class is getting applied on the who row instead of the task. attached the code and the screenshot

Attachments
Screenshot 2025-05-26 175037.png
Screenshot 2025-05-26 175037.png (136.63 KiB) Viewed 61 times
Screenshot 2025-05-26 175304.png
Screenshot 2025-05-26 175304.png (77.05 KiB) Viewed 61 times
Screenshot 2025-05-26 175037.png
Screenshot 2025-05-26 175037.png (136.63 KiB) Viewed 61 times

Post by mats »

What CSS are you using?


Post Reply