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: map schemes json to SequentialScheme (#17812) #17813

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

hbruch
Copy link
Contributor

@hbruch hbruch commented Dec 18, 2021

SUMMARY

In setupColor, json EXTRA_SEQUENTIAL_COLOR_SCHEMES schemes are mapped to SequentialScheme.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
grafik

After:
grafik

TESTING INSTRUCTIONS

  1. In superset_config.py, define EXTRA_SEQUENTIAL_COLOR_SCHEMES, e.g. like
  EXTRA_SEQUENTIAL_COLOR_SCHEMES =[
    {
         "id": 'mySequentialScheme',
         "description": 'myDescription',
         "label": 'myLabel',
         "isDiverging": False,
         "colors":
          ['#dfdeeb', '#cac8dd', '#b5b2d0', '#a09dc2', 
           '#8d8ab6', '#7c79ab',
           '#6b69a0', '#5a5995', '#464889', '#2e367b']
    }
]
  1. start superset
  2. create a chart e.g. DeckGL polygon chart
  3. In chart editor, Switch to Customize tab
  4. See color dropdown which includes custom color scheme

ADDITIONAL INFORMATION

  • Has associated issue: Fixes EXTRA_SEQUENTIAL_COLOR_SCHEMES result in error in color dropdown  #17812
  • 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

@codecov
Copy link

codecov bot commented Dec 18, 2021

Codecov Report

Merging #17813 (5050118) into master (b82da5c) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17813      +/-   ##
==========================================
- Coverage   67.17%   67.17%   -0.01%     
==========================================
  Files        1609     1609              
  Lines       64796    64797       +1     
  Branches     6855     6855              
==========================================
  Hits        43528    43528              
- Misses      19412    19413       +1     
  Partials     1856     1856              
Flag Coverage Δ
javascript 53.90% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/setup/setupColors.ts 81.81% <0.00%> (-8.19%) ⬇️

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 b82da5c...5050118. Read the comment docs.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@villebro villebro merged commit 61a6aa0 into apache:master Dec 20, 2021
shcoderAlex pushed a commit to casual-precision/superset that referenced this pull request Feb 7, 2022
bwang221 pushed a commit to casual-precision/superset that referenced this pull request Feb 10, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 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/XS 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EXTRA_SEQUENTIAL_COLOR_SCHEMES result in error in color dropdown
3 participants