chartjs-plugin-zoom icon indicating copy to clipboard operation
chartjs-plugin-zoom copied to clipboard

Zoom with limit keeps panning when panning is disabled

Open elinake opened this issue 9 months ago • 1 comments

I have set limits for zoom like this:

limits: { x: { minRange: 0.1 } }

I have set zoom mode to x, and disabled panning.

When I reach the limit, instead of just stopping the zoom, the chart starts panning left or right, keeping the minimum range.

Example: https://stackblitz.com/edit/stackblitz-starters-utwyr6?file=src%2Fapp%2Fapp.component.ts

In the example the "feature" is easily noticeable with once glance, because the minRange is so high and the chart is so small. But in the actual application my chart is much bigger, and the x-labels might be something like 2.07502, and the limit would be likely something like 0.0001. And when zooming, it keeps calculating the most appropriate time labels, so the x-axis is just a row of long numbers changing a lot, so it is very hard to even realize that the zooming has actually stopped.

elinake avatar Aug 14 '23 10:08 elinake