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

Got same key issue with AreaChart with multi-series & type=grouped #219

Open
yleilu opened this issue Apr 30, 2024 · 2 comments
Open

Got same key issue with AreaChart with multi-series & type=grouped #219

yleilu opened this issue Apr 30, 2024 · 2 comments

Comments

@yleilu
Copy link

yleilu commented Apr 30, 2024

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

Screenshot 2024-04-30 at 6 24 33 PM

Got same key issue with AreaChart with multiple series & type=grouped

id: point.id,

The id should be unique or at least consider using index here.

Expected behavior

No errors

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Libs:
- react version: X.Y.Z
- reaviz version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@amcdnl
Copy link
Member

amcdnl commented Apr 30, 2024

Could you provide a example?

@yleilu
Copy link
Author

yleilu commented May 1, 2024

Reproduce ->
https://stackblitz.com/edit/vitejs-vite-nvzdbv?file=src%2FChart.jsx

I found that is because I put an id in the data

const data = [
  {
    id: 'example-id', // After remove this, anything goes fine.
    key: 'example-key',
    data: [...],
  },
  ...
]

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

No branches or pull requests

2 participants