Skip to content
This repository was archived by the owner on Dec 10, 2021. It is now read-only.

fix(plugin-chart-echarts): add series deduplication #1046

Merged
merged 2 commits into from
Apr 9, 2021

Conversation

villebro
Copy link
Contributor

@villebro villebro commented Apr 8, 2021

🐛 Bug Fix
If an annotation layer has a series name that already exists in the chart, the chart raises an error. This PR adds series name deduplication to ensure the chart can be drawn.

AFTER

image

BEFORE

image

@villebro villebro requested a review from a team as a code owner April 8, 2021 11:01
@vercel
Copy link

vercel bot commented Apr 8, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/superset/superset-ui/2y5zECRvTYrrJ8HN1cuvWqtgRxV3
✅ Preview: https://superset-ui-git-fork-preset-io-villebro-echarts-dedup-superset.vercel.app

@codecov
Copy link

codecov bot commented Apr 8, 2021

Codecov Report

Merging #1046 (101304c) into master (4ac7106) will increase coverage by 0.05%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1046      +/-   ##
==========================================
+ Coverage   28.04%   28.09%   +0.05%     
==========================================
  Files         435      435              
  Lines        8880     8892      +12     
  Branches     1349     1353       +4     
==========================================
+ Hits         2490     2498       +8     
- Misses       6204     6207       +3     
- Partials      186      187       +1     
Impacted Files Coverage Δ
...gin-chart-echarts/src/Timeseries/transformProps.ts 44.00% <ø> (ø)
plugins/plugin-chart-echarts/src/utils/series.ts 92.53% <88.88%> (-0.57%) ⬇️
...ins/plugin-chart-echarts/src/components/Echart.tsx 0.00% <0.00%> (ø)

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 4ac7106...101304c. Read the comment docs.

@zhaoyongjie
Copy link
Contributor

Thank you for this fix, tested in my local env.

image

Copy link
Contributor

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM!

@villebro villebro merged commit 1ed8e21 into apache-superset:master Apr 9, 2021
@villebro villebro deleted the villebro/echarts-dedup branch April 9, 2021 06:55
NejcZdovc pushed a commit to blotoutio/superset-ui that referenced this pull request Apr 20, 2021
…1046)

* fix(plugin-chart-echarts): add series deduplication

* refactor function
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants