fix: stacked percentage with zero values#622
Merged
markov00 merged 1 commit intoelastic:masterfrom Apr 9, 2020
Merged
Conversation
This commit review the work done in elastic#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.
nickofthyme
approved these changes
Apr 9, 2020
Collaborator
nickofthyme
left a comment
There was a problem hiding this comment.
Nice! Looks good in chrome.
markov00
pushed a commit
that referenced
this pull request
Apr 9, 2020
## [18.2.2](v18.2.1...v18.2.2) (2020-04-09) ### Bug Fixes * stacked percentage with zero values ([#622](#622)) ([77c3146](77c3146))
Collaborator
Author
|
🎉 This PR is included in version 18.2.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
AMoo-Miki
pushed a commit
to AMoo-Miki/OpenSearch-Dashboards
that referenced
this pull request
Feb 10, 2022
## [18.2.2](elastic/elastic-charts@v18.2.1...v18.2.2) (2020-04-09) ### Bug Fixes * stacked percentage with zero values ([opensearch-project#622](elastic/elastic-charts#622)) ([340235d](elastic/elastic-charts@340235d))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.