vasturiano / timelines-chart

Timelines Chart
http://vasturiano.github.io/timelines-chart/example/categorical/
MIT License
560 stars 122 forks source link

Dragging to zoom doesn't work for data with timestamps below a certain size #115

Closed jamespwilliams closed 2 years ago

jamespwilliams commented 2 years ago

I've created a couple of jsfiddles to illustrate the problem. The fiddles are identical, other than that in one of them the timestamps are 1000x smaller than the other:

Dragging to zoom the chart only changes the X axis for the larger timestamp example. With the smaller timestamp data, no change is made to the X axis on drag.

https://jsfiddle.net/nwe5o9ub/3/ is an example with data somewhere between the two. In this one, large selections do work, but smaller ones don't.

In all cases using the overview bar works fine.

vasturiano commented 2 years ago

@jamespwilliams thanks for reaching out.

The progressive zoom (drag on main chart) had a smallest window size of 1min. I've reduced this to one second. The reason why there needs to be an eventual limit is because otherwise you could keep zooming in to microscopical time ranges which has the potential of getting the user lost.

With the overview bar this is less of an issue since you only have so many pixels of definition, which naturally won't permit very small time ranges.