rusackas commented on code in PR #36535:
URL: https://github.com/apache/superset/pull/36535#discussion_r2611305543


##########
superset-frontend/src/utils/colorScheme.ts:
##########
@@ -27,6 +27,30 @@ import { intersection, omit, pick } from 'lodash';
 import { areObjectsEqual } from 'src/reduxUtils';
 
 const EMPTY_ARRAY: string[] = [];
+const dashboardColorRegistry = {
+  usedColors: new Set<string>(),
+  labelColorMap: {} as Record<string, string>,
+};
+
+export function getDashboardColor(label: string, palette: string[]): string {
+  if (dashboardColorRegistry.labelColorMap[label]) {

Review Comment:
   We can use a default color from the theme, but we don't want to hardcode hex 
colors like this. 



-- 
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