Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoom reset for scales built with suggestedMin and suggestedMax #801

Open
apirvane opened this issue Dec 20, 2023 · 0 comments
Open

Zoom reset for scales built with suggestedMin and suggestedMax #801

apirvane opened this issue Dec 20, 2023 · 0 comments

Comments

@apirvane
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant