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

Passing a classname to an areachart dot does not assign it. #4290

Closed
1 task done
Labels
bug General bug label

Comments

@108yen
Copy link
Contributor

108yen commented Mar 14, 2024

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://github.com/108yen/recharts

Steps to reproduce

Passing className to areachart dot

          <Area
            type="monotone"
            dot={{ className: 'custom-dot-className' }}
            dataKey="uv"
            stroke="#8884d8"
            fill="#8884d8"
          />

What is expected?

The className is assigned to the areaChart dot.

What is actually happening?

The className is not assigned to the areaChart dot.

Environment Info
Recharts v2.12.2
React 16.14.0
System windows
Browser chrome
@108yen
Copy link
Contributor Author

108yen commented Mar 14, 2024

Can I fix this issue?
Refer to Line.tsx.

ckifer pushed a commit that referenced this issue Mar 14, 2024
…4291)

<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->
Fixed a bug where classname was not assigned when passed to areachart
dot as follows.
```tsx
          <Area
            type="monotone"
            dot={{ className: 'custom-dot-className' }}
            dataKey="uv"
            stroke="#8884d8"
            fill="#8884d8"
          />
```
## Related Issue

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->
#4290 

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->
Required if you want to assign a className to dot in areachart.

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
Checked in storybook and passed existing tests

## Screenshots (if appropriate):

## 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! -->

- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] I have added a storybook story or extended an existing story to
show my changes
- [x] All new and existing tests passed.
@ckifer ckifer added the bug General bug label label Mar 14, 2024
@ckifer
Copy link
Member

ckifer commented Mar 14, 2024

Merged in your PR, much appreciated! This is in the 3.x branch but can be easily backported to master/2.x as well. @108yen if this is blocking you, could you merge the commit/make the same PR to the master branch as well?

@108yen
Copy link
Contributor Author

108yen commented Mar 14, 2024

@ckifer
Thank you!
I will fix the master branch as well!
I'm going to sleep now, so it will be tomorrow!

@ckifer
Copy link
Member

ckifer commented Mar 15, 2024

Going to close this for now, will be released in the next patch

@ckifer
Copy link
Member

ckifer commented Mar 15, 2024

released in 2.12.3

@ckifer ckifer closed this as completed Mar 15, 2024
renovate bot added a commit to SAP/ui5-webcomponents-react that referenced this issue 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
[@&#8203;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
[@&#8203;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
[@&#8203;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
[@&#8203;rinkstiekema](https://togithub.com/rinkstiekema) in
[recharts/recharts#4297

#### New Contributors

- [@&#8203;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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment