I am using vis.js to display a timeline.
I have the following items:
var items = new vis.DataSet([
{id: 1, content: '1) Next To 2', start: '2014-04-20 00:00:00', end : '2014-04-20 00:59:59'},
{id: 2, content: '2) Next To 1', start: '2014-04-20 01:00:00', end : '2014-04-20 02:59:59'},
{id: 3, content: 'Underneath ', start: '2014-04-20 00:00:00', end : '2014-04-20 05:59:59'}
]);
id 1 and id 2 start / end do not overlap (in time). Therefore, I always want them to appear on the same line in the timeline, regardless of the zoom level.
However, I can’t install stack : false
, since I want to id : 3
be under 1 and 2.
Here is the JSFiddle: http://jsfiddle.net/uqn6q4jd/17/
1) and 2) must always be on the same line, 3) always under
Can I do it?
I looked at the source of Vis JS and I feel that I can possibly achieve what I need with the changes:
exports.stack = function...
exports.nostack = function...
, , , ...