adds a marker to the timeline area
marker | MarkerConfig | the marker's configuration object |
number|string | optional, the marker's id |
var todayMarker = gantt.addMarker({
start_date: new Date(),
css: "today",
title:date_to_str( new Date())
});
setInterval(function(){
var today = gantt.getMarker(todayMarker);
today.start_date = new Date();
today.title = date_to_str(today.start_date);
gantt.updateMarker(todayMarker);
}, 1000*60);
This method is defined in the marker extension, so you need to enable the marker plugin. Read the details in the Adding Vertical Markers article.
The configuration object has the following properties: