Highlight all task for a links

i want on mouseOver or onMouseMove on a task to highlight all task for a links
Best regard,

there is no built-in way to highlight all linked tasks in Gantt, but you can do it with your custom code.
Here are general steps of how it can be done:

  1. using the onMouseMove event, you can get the task id and use the $source and $target properties of the task object to check if there are any linked tasks.
  2. If they are, you remember what tasks need to be highlighted, and if tasks were highlighted earlier, stop highlighting them. Then we refresh both tasks using the refreshTask method.
  3. using the task_class template we specify the CSS class to these tasks.
    Here is an example:

I guess instead of mouseover, the other way is to use this click method as shown in this demo

1 Like

thank you very much @Joseph and @Ales