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: propagate color mapping from dashboard to charts #7289

Merged
merged 3 commits into from
Apr 17, 2019

Conversation

khtruong
Copy link
Contributor

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

If a dashboard has a color mapping saved and the user explores a chart from the dashboard, the coloring may look different. This is because we would propagate the color scheme but not the color mapping to the chart. This change fixes this issue. The PR also sets it up for color consistency in charts and the ability to change an individual color mapping in the future.

TEST PLAN

Tested manually

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

@graceguo-supercat @kristw @williaster @betodealmeida @xtinec @DiggidyDave

@codecov-io
Copy link

Codecov Report

Merging #7289 into lyftga will decrease coverage by 0.01%.
The diff coverage is 46.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           lyftga    #7289      +/-   ##
==========================================
- Coverage   64.58%   64.57%   -0.02%     
==========================================
  Files         425      426       +1     
  Lines       20884    20898      +14     
  Branches     2297     2297              
==========================================
+ Hits        13488    13494       +6     
- Misses       7270     7278       +8     
  Partials      126      126
Impacted Files Coverage Δ
...et/assets/src/explore/components/controls/index.js 100% <ø> (ø) ⬆️
...et/assets/src/explore/controlPanels/DeckScatter.js 0% <ø> (ø) ⬆️
...rset/assets/src/explore/controlPanels/sections.jsx 100% <ø> (ø) ⬆️
superset/assets/src/explore/controls.jsx 42.06% <0%> (-0.34%) ⬇️
...shboard/util/charts/getFormDataWithExtraFilters.js 90% <100%> (+1.11%) ⬆️
superset/assets/src/dashboard/containers/Chart.jsx 90.9% <100%> (ø) ⬆️
...rc/explore/components/controls/ColorMapControl.jsx 36.36% <36.36%> (ø)

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 65cc0e5...85961e4. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Apr 11, 2019

Codecov Report

Merging #7289 into lyftga will decrease coverage by 0.01%.
The diff coverage is 52.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           lyftga    #7289      +/-   ##
==========================================
- Coverage   64.58%   64.57%   -0.02%     
==========================================
  Files         425      426       +1     
  Lines       20884    20900      +16     
  Branches     2297     2299       +2     
==========================================
+ Hits        13488    13496       +8     
- Misses       7270     7278       +8     
  Partials      126      126
Impacted Files Coverage Δ
...et/assets/src/explore/components/controls/index.js 100% <ø> (ø) ⬆️
...et/assets/src/explore/controlPanels/DeckScatter.js 0% <ø> (ø) ⬆️
...rset/assets/src/explore/controlPanels/sections.jsx 100% <ø> (ø) ⬆️
...rset/assets/src/dashboard/components/Dashboard.jsx 89.28% <ø> (ø) ⬆️
superset/assets/src/explore/controls.jsx 42.06% <0%> (-0.34%) ⬇️
...shboard/util/charts/getFormDataWithExtraFilters.js 90.9% <100%> (+2.02%) ⬆️
superset/assets/src/dashboard/containers/Chart.jsx 90.9% <100%> (ø) ⬆️
...rc/explore/components/controls/ColorMapControl.jsx 36.36% <36.36%> (ø)
...re/components/controls/TimeSeriesColumnControl.jsx 65.9% <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 65cc0e5...5377c82. Read the comment docs.

Copy link

@graceguo-supercat graceguo-supercat left a comment

Choose a reason for hiding this comment

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

LGTM

@xtinec xtinec merged commit 81a1e53 into apache:lyftga Apr 17, 2019
@lilila
Copy link

lilila commented Jun 9, 2020

Dear @khtruong , do you know why color mapping fails when charts are rendered in Standalone mode? Would you mind helping fixing this issue?

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants