Description
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)