Show/Hide today line?


#1

Hello,

I’m trying to have an option to show or hide the today line with a checkbox.
However, I can’t seem to figure out how to go about it.

My gantt “app” is read-only, and only works with import via excel. Is it possible to have a checkbox that shows or hides the today line after loading the gantt ?

Thanks you !


#2

Hello Dergal,
To show or hide all markers, you can change the gantt.config.show_markers property and repaint the changes:
https://docs.dhtmlx.com/gantt/api__gantt_show_markers_config.html
Here is an example of how it works:
http://snippet.dhtmlx.com/5/21b4a08eb

If you have several markers and want to hide only a specific marker, you can change the css property of that marker and in style rules, you can use the display: none property.
Here is an example of how it might be implemented:
http://snippet.dhtmlx.com/5/68ba53dab


#3

Hello,

Thank you this was very helpful.