i want on mouseOver or onMouseMove on a task to highlight all task for a links
Best regard,
weerayut
Hi,
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:
- 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. - 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. - using the
task_class
template we specify the CSS class to these tasks.
Here is an example:
http://snippet.dhtmlx.com/5/c8f94d16e
I guess instead of mouseover
, the other way is to use this click method as shown in this demo
1 Like