Search code examples
javascripttimelinevis.js

Workaround for vertical scrolling in Vis.js


After implementing timeline with vis.js I found out that it currently cannot handle situation when there are too many groups for it to fit the canvas. It currently doesn't provide a vertical scrollbar and I couldn't make it scrollable with dragging.

Is there some known temporary workaround for it? Some manual manipulation basing on events perhaps? Aside from that vis.js works great for my and it would be a shame if I had to rewrite everything into other timeline library just because of that one thing.


Solution

  • You can probably just add this to your CSS:

    .vis-timeline {
        overflow-y: scroll;
    }