fix: stacked percentage with zero values #622
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.
Summary
This commit review the work done in #618 to fix the following case: if we are stacking areas in percentage mode and the values for all series are 0 we shall use 0% as value for each point in that bucket.
In the aforementioned PR we were handling that case as null, completely disconnecting the previous data points from the following ones on the chart as in the following image
This PR pulls the values to 0% as in this screenshot (I've left a null case on the example just to test both cases at the same time) to correctly represent the fact that: the percentage for each series in a bucket where all the values are 0 is 0% for each series, in contrast to the case where all the values in the bucket are nulls where the area is in an undefined state (not rendered at all)
Checklist
Delete any items that are not applicable to this PR.