You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "eschutho (via GitHub)" <gi...@apache.org> on 2023/07/12 18:27:15 UTC
[GitHub] [superset] eschutho commented on a diff in pull request #24670: fix: color collision in dashboard with tabs
eschutho commented on code in PR #24670:
URL: https://github.com/apache/superset/pull/24670#discussion_r1261578330
##########
superset-frontend/packages/superset-ui-core/src/color/CategoricalColorScale.ts:
##########
@@ -86,6 +86,12 @@ class CategoricalColorScale extends ExtensibleFunction {
updatedRange.splice(index, 1);
}
});
+ Object.entries(this.parentForcedColors).forEach(([key, value]) => {
+ if (key !== cleanedValue) {
+ const index = updatedRange.indexOf(value);
+ updatedRange.splice(index, 1);
Review Comment:
could you use a filter method on updatedRange here instead? That may be a little more succinct.
--
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-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org