villebro opened a new pull request, #23657:
URL: https://github.com/apache/superset/pull/23657

   ### SUMMARY
   Currently it's only possible to assign series colors on dashboards based on 
the color names (e.g. "red") or hex codes (e.g. "#FF0000"). This PR adds the 
option to assign colors based on the color scheme index. This ensures that the 
color will be fixed, but also makes it adapt to whichever color scheme is 
chosen.
   
   ### SCREENSHOT
   Here we're using the "D3 category 10" scheme, and assign the 2 index 
(=third) for "boy" and "red" for "girl":
   
![image](https://user-images.githubusercontent.com/33317356/231413848-3b6f11c6-51d4-4bcd-a595-c615823f2ad7.png)
   
   After we do that, the charts update accordingly:
   
![image](https://user-images.githubusercontent.com/33317356/231414101-3fbc6387-96bc-40fd-bec1-11b6da278872.png)
   
   If we then change the scale to the "ECharts 5.0" scheme, the dashboard 
updates accordingly (notice "boy" turns yellow, while "girl" stays unchanged):
   
![image](https://user-images.githubusercontent.com/33317356/231414696-385589d3-0b92-464a-86db-88c1e05b6284.png)
   
![image](https://user-images.githubusercontent.com/33317356/231414769-8ad42447-963f-4b47-8024-3ca045304285.png)
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to