Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stacked percentage with zero values #622

Merged

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Apr 8, 2020

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

Screenshot 2020-04-08 at 17 44 58

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)

Screenshot 2020-04-08 at 17 45 09

Checklist

Delete any items that are not applicable to this PR.

  • Proper documentation or storybook story was added for features that require explanation or tutorials
  • Unit tests were updated or added to match the most common scenarios

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.
@markov00 markov00 added bug Something isn't working :data Data/series/scales related issue labels Apr 8, 2020
Copy link
Contributor

@monfera monfera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

Copy link
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks good in chrome.

@markov00 markov00 merged commit 77c3146 into elastic:master Apr 9, 2020
@markov00 markov00 deleted the 2020_04_08-fix_stacked_zero_to_zero branch April 9, 2020 14:15
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))
@markov00
Copy link
Member Author

markov00 commented Apr 9, 2020

🎉 This PR is included in version 18.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Apr 9, 2020
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :data Data/series/scales related issue released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants