stephenLYZ commented on a change in pull request #17792:
URL: https://github.com/apache/superset/pull/17792#discussion_r772450881



##########
File path: 
superset-frontend/packages/superset-ui-core/src/color/CategoricalColorNamespace.ts
##########
@@ -39,8 +39,19 @@ export default class CategoricalColorNamespace {
 
   getScale(schemeId?: string) {
     const id = schemeId ?? getCategoricalSchemeRegistry().getDefaultKey() ?? 
'';
+    const scale = this.scales[id];
+    if (scale) {
+      return scale;
+    }

Review comment:
       I get all the labels by the `defaultColorScale.domain()`, then 
regenerate new colors when color schema changed and save them in the json 
metadata.




-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to