Don't overwrite a valueFormatter when adding a DataSet to a chart #4931
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.
Previously a
DataSet'svalueFormatterwould be replaced with the default if it was any instance of theDefaultValueFormatterclass, even one that had been customised.This PR changes the
valueFormatterto be optional, and will set it to the default when it's added to a chart only if it hasn't already been set by the user.This fixes the formatting in some of the demo app charts too:
Fixes #4595, fixes #4599, fixes #4690, fixes #4802.