Is it possible to draw line graph on timeline, using visjs?
I want to get something like here http://almende.github.io/chap-links-library/js/timeline/examples/example19_bar_graph.html but instead of bar graph, I need line graph.
Essentially the question is, is it possible to get timeline and graph2d on the same canvas like in example below?
Sadly what you have described is not possible. The closest solution I have found is to have a both a graph2d and timeline on the same page and listen to the drag events on each and update the viewport on the other such that they are both showing the same timespan and zoom level.
With the help of the demo of syncing to timelines here and some experimenting of my own, the following seems to do something similar. You could probably tweak it a bit more to get what you want.
The console warnings of
"WARNING: infinite loop in redraw?"
when zooming on the graph2d part appear to be a bug in vis.js in this scenario, as it doesn't occur when zooming on the timeline - in any case, it doesn't affect the functionality