-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Error bar domain ignore null #4297
Merged
ckifer
merged 1 commit into
recharts:master
from
rinkstiekema:error-bar-domain-ignore-null-v2.x
Mar 15, 2024
Merged
Error bar domain ignore null #4297
ckifer
merged 1 commit into
recharts:master
from
rinkstiekema:error-bar-domain-ignore-null-v2.x
Mar 15, 2024
Conversation
This file contains 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
PavelVanecek
approved these changes
Mar 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate the tests!
renovate bot
added a commit
to SAP/ui5-webcomponents-react
that referenced
this pull request
Mar 18, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [recharts](https://togithub.com/recharts/recharts) | [`2.12.2` -> `2.12.3`](https://renovatebot.com/diffs/npm/recharts/2.12.2/2.12.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/recharts/2.12.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/recharts/2.12.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/recharts/2.12.2/2.12.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/recharts/2.12.2/2.12.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>recharts/recharts (recharts)</summary> ### [`v2.12.3`](https://togithub.com/recharts/recharts/releases/tag/v2.12.3) [Compare Source](https://togithub.com/recharts/recharts/compare/v2.12.2...v2.12.3) Some more small changes/fixes while working on 3.x #### What's Changed ##### Fix - `Legend`: fix issue where Legend was not taken into account when scaling the chart container by [@​zhonglin94](https://togithub.com/zhonglin94) in [recharts/recharts#4272 closes [recharts/recharts#4246 - `Area`: fixed a bug where className was not assigned to areaDot by [@​108yen](https://togithub.com/108yen) in [recharts/recharts#4294 closes [recharts/recharts#4290 - `RadialBar`: address regression where radial bar and its background were off from eachother because of rounding by [@​ckifer](https://togithub.com/ckifer) in [recharts/recharts#4295 closes [recharts/recharts#4264 - `ErrorBar`: do not count `null` as 0 in error bar domain by [@​rinkstiekema](https://togithub.com/rinkstiekema) in [recharts/recharts#4297 #### New Contributors - [@​zhonglin94](https://togithub.com/zhonglin94) made their first contribution in [recharts/recharts#4272 **Full Changelog**: recharts/recharts@v2.12.2...v2.12.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/SAP/ui5-webcomponents-react). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This was referenced May 23, 2024
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.
Duplicate of this PR. I made this PR to also have this fix available in v2.x. Hope this is the correct way!
Description
The entry value for an error bar receives the default value
0
in case it was null. This would cause the domain to be calculated incorrectly, as0
may not be a value in the data array.When using error bars, the domain accounts for any potential in the error values. Error values are expressed relative to the main entry value. In case the main entry value is nullish, its default value would be
0
. This may not be a value in the actual data.Related Issue
No known related issues yet
Motivation and Context
Given this example data:
The min value of the y-axis domain would be:
[min(y - errorY[0]), max(y + errorY[1])] = [200 - 10, 400 + 10] = [190, 410]
Now consider this other example:
The current implementation would report:
[min(y - errorY[0]), max(y + errorY[1])] = [0 - 10, 400 + 10] = [-10, 410]
While the expected behaviour is:
[min(y - errorY[0]), max(y + errorY[1])] = [200 - 10, 400 + 10] = [190, 410]
Some codesandbox examples can be found here.
How Has This Been Tested?
I have added unit tests for the domain creation.
Types of changes
Checklist: