kgabryje commented on code in PR #30646: URL: https://github.com/apache/superset/pull/30646#discussion_r1832804491
########## superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx: ########## @@ -110,9 +138,20 @@ const ColorSchemeControl = ({ isLinear, ...rest }: ColorSchemeControlProps) => { + const countSharedLabelsColor = sharedLabelsColors.length; + const colorMapInstance = getLabelsColorMap(); + const chartLabels = chartId + ? colorMapInstance.chartsLabelsMap.get(chartId)?.labels || [] + : []; + const hasSharedLabelsColor = !!( + dashboardId && + countSharedLabelsColor > 0 && + chartLabels.some(label => sharedLabelsColors.includes(label)) + ); + const hasDashboardScheme = dashboardId && hasDashboardColorScheme; const theme = useTheme(); const currentScheme = useMemo(() => { - if (dashboardId) { + if (hasDashboardScheme || hasSharedLabelsColor) { return 'dashboard'; Review Comment: nit: should this be a const? it's also used later in line 168 -- 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