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(tooltip): fix duplicate key warning for band area charts #327

Merged
merged 1 commit into from
Aug 20, 2019

Conversation

markov00
Copy link
Member

Summary

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

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

  • [ ] Any consumer-facing exports were added to src/index.ts (and stories only import from ../src except for test data & storybook)
  • This was checked for cross-browser compatibility, including a check against IE11
  • Proper documentation or storybook story was added for features that require explanation or tutorials
  • Unit tests were updated or added to match the most common scenarios
  • Each commit follows the convention

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 markov00 added :interactions Interactions related issue bug Something isn't working labels Aug 19, 2019
@markov00 markov00 requested a review from nickofthyme August 19, 2019 17:49
@codecov-io
Copy link

codecov-io commented Aug 19, 2019

Codecov Report

Merging #327 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #327      +/-   ##
==========================================
+ Coverage   98.05%   98.06%   +0.01%     
==========================================
  Files          38       38              
  Lines        2726     2742      +16     
  Branches      643      650       +7     
==========================================
+ Hits         2673     2689      +16     
  Misses         48       48              
  Partials        5        5
Impacted Files Coverage Δ
src/chart_types/xy_chart/utils/interactions.ts 100% <ø> (ø) ⬆️
src/chart_types/xy_chart/utils/series.ts 100% <ø> (ø) ⬆️
src/chart_types/xy_chart/tooltip/tooltip.ts 100% <100%> (ø) ⬆️
...onents/react_canvas/utils/rendering_props_utils.ts 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 577a034...b6aacde. Read the comment docs.

Copy link
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, LGTM

@markov00 markov00 merged commit 0ca1884 into elastic:master Aug 20, 2019
@markov00 markov00 deleted the fix_duplicate_keys branch August 20, 2019 08:17
markov00 pushed a commit that referenced this pull request 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 PR is included 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 pull request 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 :interactions Interactions related issue released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated keys on band area chart
3 participants