Remove YAxis Custom Min/Max Check for Padding #3982
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that while trying to add spacing to the bottom of a chart, to allow for the interior labels enough room that they don't overlap the data, nothing was happening. I was confused as to why setting the bottom spacing was doing literally nothing, and discovered it was disabled if the min was manually changed.
I thought it strange to disable this without mentioning anywhere in the documentation that this behavior was intentional. Adding percentage based padding let's developers easily add this extra space, but disabling it doesn't make sense. If developers don't want that extra spacing, they'll do what they would've done anyway, set the spacing to 0, as the default is 10%.
Since this behavior of disabling the spacing if custom values are set, even though the calculated range is BASED on those custom values, is not mentioned in documentation, I doubt this will cause any current compatibility issues, especially since the change will likely not be visually noticeable in the first place.
I really hope you can push this into the main library, as I think it makes more logical sense this way. Currently, I'm just re-calculating the min value myself, and then setting the new min with padding.