Reputation: 266
in vis.js if have option showCurrentTime: true, we will get a current vertical timeline. This vertical line is based on current day, current hour, current second.
Is it possible to have the vertical line based on current day only, without hour, minute and second? (ie. current day, 0 hour, 0 minute and 0 second)
var options = {
showCurrentTime: true,
orientation: {axis: 'both', item: 'top'},
height: 400,
margin: {
axis: 100
}
}
Here is the code https://jsfiddle.net/gbdjbdhv/
Upvotes: 0
Views: 2179
Reputation: 6819
This is not supported, but if needed you can always override the redraw
and start
methods of the CurrentTime.js
class to change the behavior as desired. You can find the code of CurrentTime.js
here:
https://github.com/almende/vis/blob/master/lib/timeline/component/CurrentTime.js
The class is exposed from the vis.js library as:
vis.timeline.components.CurrentTime
Upvotes: 1