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: empty charts causing errors #657

Merged
merged 2 commits into from
Apr 30, 2020

Conversation

markov00
Copy link
Member

Summary

This fix the error thrown when a chart is rendered without a series spec, usually caused how the consumer renders the chart components.
See the playground example and the comment here: elastic/kibana#64759 (comment)

Checklist

Delete any items that are not applicable to this PR.

  • Unit tests were updated or added to match the most common scenarios

@markov00 markov00 added bug Something isn't working :specs Chart specifications related issue regression labels Apr 30, 2020
@markov00 markov00 requested a review from nickofthyme April 30, 2020 18:29
@codecov-io
Copy link

codecov-io commented Apr 30, 2020

Codecov Report

Merging #657 into master will increase coverage by 0.01%.
The diff coverage is 87.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #657      +/-   ##
==========================================
+ Coverage   72.92%   72.94%   +0.01%     
==========================================
  Files         266      266              
  Lines        8603     8618      +15     
  Branches     1690     1695       +5     
==========================================
+ Hits         6274     6286      +12     
- Misses       2290     2293       +3     
  Partials       39       39              
Impacted Files Coverage Δ
...types/partition_chart/layout/types/config_types.ts 100.00% <ø> (ø)
...es/partition_chart/layout/types/viewmodel_types.ts 80.00% <ø> (ø)
...artition_chart/renderer/canvas/canvas_renderers.ts 6.20% <0.00%> (ø)
src/chart_types/partition_chart/specs/index.ts 53.84% <ø> (ø)
src/mocks/specs/specs.ts 74.71% <ø> (ø)
...goal_chart/renderer/canvas/connected_component.tsx 34.42% <50.00%> (ø)
...ypes/partition_chart/renderer/canvas/partition.tsx 32.85% <50.00%> (ø)
...partition_chart/renderer/dom/highlighter_hover.tsx 44.44% <50.00%> (ø)
...artition_chart/renderer/dom/highlighter_legend.tsx 44.44% <50.00%> (ø)
src/chart_types/goal_chart/state/chart_state.tsx 58.33% <66.66%> (+0.55%) ⬆️
... and 27 more

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 b7f0cb4...3a45b4c. 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.

LGTM, fixes issue raised in kibana

@markov00 markov00 merged commit 0c0af01 into elastic:master Apr 30, 2020
markov00 pushed a commit that referenced this pull request Apr 30, 2020
## [19.1.1](v19.1.0...v19.1.1) (2020-04-30)

### Bug Fixes

* render charts without series ([#657](#657)) ([0c0af01](0c0af01))
@markov00
Copy link
Member Author

🎉 This PR is included in version 19.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Apr 30, 2020
@markov00 markov00 deleted the 2020_30_04-fix_empty_charts branch July 8, 2020 10:12
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression released Issue released publicly :specs Chart specifications related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants