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

Hiding dataset shows incorrect axis #6111

Closed
AcuarioCat opened this issue Mar 5, 2019 · 1 comment
Closed

Hiding dataset shows incorrect axis #6111

AcuarioCat opened this issue Mar 5, 2019 · 1 comment

Comments

@AcuarioCat
Copy link

On charts with multiple datasets clicking one dataset to hide it has odd behavior.

This can be seen on https://www.chartjs.org/samples/latest/charts/line/multi-axis.html, clicking one of the datasets to disable it replaces the axis scale with values from -1 to 1.

Expected behavior:
Either leave the axis unchanged or hide the axis.

@simonbrunel
Copy link
Member

Either leave the axis unchanged ...

To keep the axis unchanged, you need to set explicit min/max on the axis, else the scale limits are automatically adjusted to the "visible" data or fallback to [-1:1] if nothing is visible.

... or hide the axis.

This feature has been implemented in #5885 and will be released in 2.8.0. However, you will have to explicitly configure the axis display option to 'auto'.

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

No branches or pull requests

2 participants