-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Scaling doesn't take ticks min
/max
into account
#7575
Comments
I believe this works the way you'd like it to with 3.0.0-alpha. Can you give it a try? |
I just tried and it does: https://jsfiddle.net/b72kfd9e/14 I assume we can close this issue? |
@benmccann didn't you guys default clicking "magic" in this fiddle produces an "interesting" curve ;) |
I'm closing this since it sounds like it's addressed. Let me know if there's still something that needs to be looked at |
The most notable change in relation to our use case, is that min / max is taken into account when scaling the graph[1]. [1] chartjs/Chart.js#7575
The most notable change in relation to our use case, is that min / max is taken into account when scaling the graph[1]. [1] chartjs/Chart.js#7575
Expected Behavior
When the dataset is "filtered" by using
min
/max
, the scaling of the y-axes should use the "filtered" dataset.Current Behavior
The scaling is calculated from the full dataset and not the "filtered" dataset.
Possible Solution
Use the "filtered" dataset when calculating scaling?
Steps to Reproduce
https://jsfiddle.net/0426Lvsb/ (click
magic
and notice that the y-axis scale doesn't change)Context
I'm using Chart.js to show download stats for Flathub and you can choose a interval (infinity, 365 days, 30 days, 14 days). Some of the data contains some high spikes, which means when you choose
14 days
the scaling doesn't match the shown data (most of the chart is empty).Link: https://klausenbusk.github.io/flathub-stats/
Environment
Chart.js version: 2.9.3
Browser: Firefox Nightly
Project: https://github.com/klausenbusk/flathub-stats/ (deployed here)
The text was updated successfully, but these errors were encountered: