chartjs/chartjs-plugin-zoom

Zoom reset for scales built with suggestedMin and suggestedMax

apirvane opened this issue · 0 comments

Hello,

Trying to summarize as much as possible, we have the following use case:

  1. A chart with two 'y' scales - both scales are created using the 'suggestedMin' and 'suggestedMax' properties
  2. Starts to zoom in
  3. Hides the scale and datasets of one of the 'y' scales - this is done via the native legend plugin of chartjs
  4. Resets zoom (this.chart.resetZoom()) - zoom is reset
  5. Observing the onZoomComplete callback, the previously hidden scale now has a 'min'=0 and 'max'=1
    - The expectation would be that the scale would have the initial values

If the chart scales are build using the 'min' and 'max' properties instead of the 'suggestedMin' and 'suggestedMax' (point 1), then the expectation is correctly met.

Thank you.