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(world-map): remove categorical color control #19781

Merged

Conversation

serenajiang
Copy link
Contributor

@serenajiang serenajiang commented Apr 19, 2022

SUMMARY

This PR reverts the changes in #19038 that affected world maps. #19038 added a control CATEGORICAL COLOR SCHEME to world maps which could override the linear color scheme if specified. This inadvertently broke all linear coloring for our world map charts because it was not possible to specify a null categorical color scheme.

image

Rather than fix the behavior of the categorical color scheme, I thought a better fix might be to just remove the categorical color scheme feature from world maps. World maps require the METRIC FOR COLOR control, so I'm not sure it makes sense to support a categorical color scheme.

TESTING INSTRUCTIONS

Make world map chart with linear color scheme, confirm colors applied as expected

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@stephenLYZ @zhaoyongjie

@codecov
Copy link

codecov bot commented Apr 19, 2022

Codecov Report

Merging #19781 (fd60f0a) into master (4ba62ca) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master   #19781   +/-   ##
=======================================
  Coverage   66.34%   66.35%           
=======================================
  Files        1690     1690           
  Lines       64616    64611    -5     
  Branches     6656     6656           
=======================================
  Hits        42870    42870           
+ Misses      20045    20040    -5     
  Partials     1701     1701           
Flag Coverage Δ
javascript 51.20% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...gins/legacy-plugin-chart-world-map/src/WorldMap.js 0.00% <0.00%> (ø)
.../legacy-plugin-chart-world-map/src/controlPanel.ts 100.00% <ø> (ø)
...egacy-plugin-chart-world-map/src/transformProps.js 0.00% <0.00%> (ø)
.../components/ExploreAdditionalActionsMenu/index.jsx 57.14% <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 4ba62ca...fd60f0a. Read the comment docs.

Copy link
Member

@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. The color schema should show linear metrics value rather than categorical dimension values.

@stephenLYZ
Copy link
Member

stephenLYZ commented Apr 20, 2022

LGTM. I think categorical color usage scenario is when user wants to use the country column as color, so it makes some sense. Maybe we can add a new control to let user use color whether based on dimension or metric.

@serenajiang serenajiang merged commit 5e468f7 into apache:master Apr 20, 2022
hughhhh pushed a commit to hve-labs/superset that referenced this pull request May 11, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 and removed 🚢 2.0.1 labels Mar 13, 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 size/M 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants