visjs / vis-timeline

📅 Create a fully customizable, interactive timelines and 2d-graphs with items and ranges.
https://visjs.github.io/vis-timeline/
Other
1.74k stars 302 forks source link

Feature Request: FitVisible() function would be useful #1774

Open philpil opened 3 months ago

philpil commented 3 months ago

This is a request for the timeline.

I have a very big nested timeline and i really like the zoom to fit button but i want to be able to zoom to fit what is visible where as the fit function sems to get all the itemsData

If I'm not wrong, I dont think there is a way to do something like timeline.getVisibleItems().fit() or timeline.fit(timeline.getVisibleItems());