Skip to content

Conversation

@GabrielMancik
Copy link
Contributor

Scale does not respect suggestedMin and suggestedMax when dataset contains no values.

jsfiddle: https://jsfiddle.net/o6g51gow/1/

@GabrielMancik
Copy link
Contributor Author

Do I need to extract the similar code (which was detected) to its own method? Is this condition for merge?

@simonbrunel
Copy link
Member

I don't think it worth the refactor since it's not really the same logic (min vs max).

Can you update unit tests?

@simonbrunel simonbrunel added this to the Version 2.6 milestone Mar 23, 2017
@etimberg
Copy link
Member

I agree about the unit tests. We should have tests covering these cases for the future to ensure this does not break

@GabrielMancik
Copy link
Contributor Author

I have added test for this scenario

@etimberg etimberg merged commit 254bd4b into chartjs:master Apr 15, 2017
ericnkatz pushed a commit to ericnkatz/Chart.js that referenced this pull request May 24, 2017
chartjs#4064)

* Fixed different calculation of scale min and max when dataset contains no values
* Removed trailing spaces
* Added test for correct min/max calculation
* Removed trailing spaces
@luckyguido
Copy link

Maybe this patch indroduced a breakage on min scale settings using the scale type 'time'? Upgrading from 2.5 to 2.6 seems that make scales.xAxes[].min parameter ignored.

exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
chartjs#4064)

* Fixed different calculation of scale min and max when dataset contains no values
* Removed trailing spaces
* Added test for correct min/max calculation
* Removed trailing spaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants