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

Duplicated keys on band area chart #326

Closed
markov00 opened this issue Aug 19, 2019 · 1 comment · Fixed by #327
Closed

Duplicated keys on band area chart #326

markov00 opened this issue Aug 19, 2019 · 1 comment · Fixed by #327
Labels
bug Something isn't working released Issue released publicly

Comments

@markov00
Copy link
Member

Describe the bug
When hovering over the chart with a y0 value a react duplicate key warning is shown:

Warning: Encountered two children with the same key, `specId:{modelBounds},colors:{}`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.

To Reproduce
Steps to reproduce the behavior:

  1. Go to storybook (local), open the area band chart
  2. Mouseover the chart
  3. See the warning on dev tool

Expected behavior
Each tooltip element should have it's own unique key

Screenshots
n/a

Version (please complete the following information):

  • OS: all
  • Browser: all
  • Elastic Charts: master

Additional context
n/a

Errors in browser console

Warning: Encountered two children with the same key, `specId:{modelBounds},colors:{}`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.

Kibana Cross Issues
n/a

Checklist

  • [ ] every related Kibana issue is listed under Kibana Cross Issues list
  • [ ] kibana cross issue tag is associated to the issue if any kibana cross issue is present
@markov00 markov00 added the bug Something isn't working label Aug 19, 2019
markov00 added a commit to markov00/elastic-charts that referenced this issue Aug 19, 2019
A band area chart has the same seriesKey for the Y0 and Y1 values. This cause the tooltip to emit a
warning because of two react components with the same key. This commit fix that adding the accessor
value as part of the react key

fix elastic#326
markov00 added a commit that referenced this issue Aug 20, 2019
A band area chart has the same seriesKey for the Y0 and Y1 values. This cause the tooltip to emit a warning because of two react components with the same key. This commit fix that adding the accessor value as part of the react key

fix #326
markov00 pushed a commit that referenced this issue Aug 20, 2019
## [9.2.1](v9.2.0...v9.2.1) (2019-08-20)

### Bug Fixes

* **tooltip:** fix duplicate key warning for band area charts ([#327](#327)) ([0ca1884](0ca1884)), closes [#326](#326)
@markov00
Copy link
Member Author

🎉 This issue has been resolved in version 9.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Aug 20, 2019
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this issue Feb 10, 2022
## [9.2.1](elastic/elastic-charts@v9.2.0...v9.2.1) (2019-08-20)

### Bug Fixes

* **tooltip:** fix duplicate key warning for band area charts ([#327](elastic/elastic-charts#327)) ([c6c7aa1](elastic/elastic-charts@c6c7aa1)), closes [opensearch-project#326](elastic/elastic-charts#326)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Issue released publicly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant