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 baseValue prop of Area #3013

Merged
merged 1 commit into from
Oct 19, 2022
Merged

Conversation

kotokrad
Copy link
Contributor

Currently, the only way to set baseValue is passing it to AreaChart as a prop but this doesn't typecheck. This fix moves baseValue prop to Area according to types, so it's possible to use it, as well as to assign different values to different areas.

Fixes #2518 and #2644

@jeremyodelldv
Copy link

I would really like to see this get merged in and fixed

@arcthur arcthur merged commit 7354b54 into recharts:master Oct 19, 2022
ckifer pushed a commit that referenced this pull request Jan 4, 2023
…ea (#3140)

Fix a bug, introduced in #3013,
which neglects to respect the AreaChart baseValue and thereby breaks
existing charts.

## Related Issue
#3051

## How Has This Been Tested?
I tested the change locally by running the demo project, verifying that
the baseValue of the AreaChart is effective by itself, and that
overriding it per Area component is possible.

## Screenshots (if appropriate):
<img width="1319" alt="Screenshot 2023-01-04 at 15 20 14"
src="https://user-images.githubusercontent.com/27995606/210575218-491c0a7e-1e80-4d98-b06b-2bf706a5694c.png">
<img width="1319" alt="Screenshot 2023-01-04 at 15 20 04"
src="https://user-images.githubusercontent.com/27995606/210575226-6e029126-a7c1-4685-b196-2a9333af91d2.png">
<img width="1319" alt="Screenshot 2023-01-04 at 15 19 53"
src="https://user-images.githubusercontent.com/27995606/210575230-5836c24a-bb0a-4b32-a491-3f2af1edaf41.png">

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

baseValue area chart is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes
3 participants