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

Stacked as percentage reports null/missing values as 0 #1414

Closed
markov00 opened this issue Oct 1, 2021 · 1 comment · Fixed by #1415
Closed

Stacked as percentage reports null/missing values as 0 #1414

markov00 opened this issue Oct 1, 2021 · 1 comment · Fixed by #1415
Assignees
Labels
bug Something isn't working regression released Issue released publicly :tooltip Related to hover tooltip :xy Bar/Line/Area chart related

Comments

@markov00
Copy link
Member

markov00 commented Oct 1, 2021

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/eloquent-wildflower-lovci?file=/src/App.tsx
  2. Mouse over the column b,c the tooltip should not show the null b value and should not show the missing c value for the b series.
  3. Remove the stackMode and verify that the b and c bars tooltip correctly hides the missing/null values.

Expected behaviour

In both, percentage mode and stacked mode, the tooltip should reflect the actual values:

  • if the value is a valid number, it should be shown
  • if the value is null or undefined no value should be shown

Screenshots

normally stacked

percentage stacked

Version (please complete the following information):

  • Elastic Charts: > 33.0.0

Additional context
Add any other context about the problem here.

Errors in browser console
If applicable, add any console error.

@markov00 markov00 added bug Something isn't working :tooltip Related to hover tooltip regression :xy Bar/Line/Area chart related labels Oct 1, 2021
@markov00 markov00 self-assigned this Oct 1, 2021
markov00 added a commit that referenced this issue Oct 7, 2021
…1415)

A regression was introduced and caused `null` values to show up on the tooltip when rendering stacked bars and areas.

fix #1414
nickofthyme pushed a commit that referenced this issue Oct 15, 2021
# [38.0.0](v37.0.0...v38.0.0) (2021-10-15)

### Bug Fixes

* **deps:** update dependency @elastic/eui to v39 ([#1422](#1422)) ([2ee97aa](2ee97aa))
* **goal:** reduce whitespace for circular charts ([#1413](#1413)) ([6517523](6517523))
* **interactions:** change allowBrushingLastHistogramBin to true ([#1396](#1396)) ([9fa9783](9fa9783))
* **xy:** remove wrongly represented null/missing values in tooltip ([#1415](#1415)) ([e5963a3](e5963a3)), closes [#1414](#1414)

### Code Refactoring

* scales ([#1410](#1410)) ([a53a2ba](a53a2ba))

### Features

* **scales:** add `LinearBinary` scale type ([#1389](#1389)) ([9f2e427](9f2e427))
* **xy:** adaptive tick raster ([#1420](#1420)) ([200577b](200577b))
* **xy:** apply the data value formatter to data values over bars ([#1419](#1419)) ([e673fc7](e673fc7))

### BREAKING CHANGES

* **interactions:** allowBrushingLastHistogramBucket renamed to allowBrushingLastHistogramBin on the Settings component defaults true and is only applied for histogram type charts
* LogScaleOptions.logBase` is now a `number` instead of the object enum `LogBase`. Some edge case data or configuration _might_, with a deemed low likelihood, lead to a situation where the earlier version would have silently not rendered a bar, line or point, while the new code doesn't `catch`, therefore throw an exception (see the last item). General risk of regressions due to the quantity of code changes (altogether 3.5k)
@nickofthyme
Copy link
Collaborator

🎉 This issue has been resolved in version 38.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickofthyme nickofthyme added the released Issue released publicly label Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression released Issue released publicly :tooltip Related to hover tooltip :xy Bar/Line/Area chart related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants