stephenLYZ commented on a change in pull request #17792: URL: https://github.com/apache/superset/pull/17792#discussion_r772444469
########## 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: Hey @geido Thanks for the input! This change was added temporarily and is not a major change, so I will restore it here. The major idea of this PR is to use a `default color scale` to save all the labels in the dashboard and regenerate them when the color schema is switched, as you said, but I try to keep the changes as small as possible here, there may be some problems, and I am keeping the test. -- 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