Reputation: 44
I wanted to know if there was a possiblity to set new options on the timeline when zooming in and out the timeline ?
In fact, i have elements that are stacked when i'm in month view, but when i'm in year view, i want them not to be stacked (set options stack: false on the timeline).
Is it somehow possible to know in which view we are and to set new options ?
Upvotes: 0
Views: 2010
Reputation: 6809
You can use Timeline.setOptions(options)
to set new options. You can get the current visible window using Timeline.getWindow()
to figure out how far the user has zoomed. Just check out the docs: http://visjs.org/docs/timeline/
Upvotes: 1