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

feat(legacy-plugin-chart-sunburst): add linear color scheme #714

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

villebro
Copy link
Contributor

🏆 Enhancements

Currently sunburst chart uses a linear color scheme when using a secondary metric that can't be customized. This adds a linear color control and uses that when the secondary metric is defined.

Screenshot

captured (18)

@villebro villebro requested a review from a team as a code owner July 29, 2020 10:19
@vercel
Copy link

vercel bot commented Jul 29, 2020

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/9tw9opisy
✅ Preview: https://superset-ui-git-fork-preset-io-villebro-sunburst-color.superset.vercel.app

controlSetRows: [['color_scheme', 'label_colors']],
controlSetRows: [['color_scheme', 'linear_color_scheme']],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the label_colors control isn't used anywhere in this chart, and actually doesn't work (shows up blank). Interestingly enough it's used in several charts. Deferring looking into this to a later PR.

@codecov
Copy link

codecov bot commented Jul 29, 2020

Codecov Report

Merging #714 into master will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #714   +/-   ##
=======================================
  Coverage   24.19%   24.19%           
=======================================
  Files         339      339           
  Lines        7617     7617           
  Branches      925      925           
=======================================
  Hits         1843     1843           
  Misses       5701     5701           
  Partials       73       73           
Impacted Files Coverage Δ
...ugins/legacy-plugin-chart-sunburst/src/Sunburst.js 0.00% <0.00%> (ø)
...legacy-plugin-chart-sunburst/src/transformProps.js 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 9c28e93...a90df8e. Read the comment docs.

},
linear_color_scheme: {
description: t('When a secondary metric is provided, a linear color scale is used.'),
},
Copy link
Member

Choose a reason for hiding this comment

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

We could swap this based on the control state when the secondary metric is provided, but maybe that'd be too jarring to the user to just have the color scheme automatically change.

Copy link
Member

@rusackas rusackas 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 784d49c into apache-superset:master Jul 29, 2020
@villebro villebro deleted the villebro/sunburst-color branch July 29, 2020 18:40
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