SRAVAN
SRAVAN

Reputation: 909

How to make the points overlap in visjs timeline?

I am trying to create a time line using http://visjs.org/timeline_examples.html I want the time line to have fixed height (which I can set using height attribute in options). But As I zoom in/out the timeline, It is displaying the points one below another. This feature is affecting the height of the graph.

Can anyone help me how to make the points overlap?! so that I can have the height of the groups constant?

screen shot of actual behaviour

Actual behavior

Upvotes: 1

Views: 2176

Answers (1)

bhspencer
bhspencer

Reputation: 13560

In the options for your timeline you can specify stack: false e.g.

    var options = {
            stack: false
    };
    var timeline = new vis.Timeline(container, dataset, options);

This will cause the time line items to overlap rather than stack up on top of each other. You can see this in action here: http://visjs.org/examples/timeline/other/groupsPerformance.html

Upvotes: 2

Related Questions