dosubot[bot] commented on issue #38514: URL: https://github.com/apache/superset/issues/38514#issuecomment-4022881273
<!-- Answer --> This is a known issue with how Superset handles shared label colors across dashboard charts. The behavior you're seeing is likely caused by leftover `shared_label_colors` or `map_label_colors` metadata in your dashboard, not the `SHARED_COLORS` flag (which doesn't actually exist as a feature flag). **Why this happens:** When multiple charts on a dashboard share the same categorical labels (e.g., cluster names like "1", "2", "3"), Superset [automatically tracks these in dashboard metadata](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/utils/colorScheme.ts#L58-L78) to maintain color consistency. This locks the color scheme dropdown and shows "Dashboard scheme" for affected charts. Your ~5 affected charts likely share labels with each other or other charts, while the ~20 working charts have unique labels. **Workaround - Clear Dashboard Color Metadata:** You can use the [dashboard colors API endpoint](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/dashboards/api.py#L764-L844) to reset the color mappings: ```bash curl -X PUT "http://your-superset-instance/api/v1/dashboard/{dashboard_id}/colors" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer {your_token}" \ -d '{ "label_colors": {}, "shared_label_colors": [], "map_label_colors": {}, "color_scheme": "", "color_scheme_domain": [] }' ``` After clearing, do a hard browser reload (Ctrl+Shift+R) and re-save the dashboard. This issue has been [reported](https://github.com/apache/superset/issues/37711) and [discussed](https://github.com/apache/superset/issues/33839#issuecomment-2990202339) by other users in similar scenarios. A maintainer acknowledged this as unintended behavior where dashboards override chart colors even when the dashboard scheme appears empty. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/7beca192-9397-4e3e-9bd6-4a64b1c9fc65?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/7beca192-9397-4e3e-9bd6-4a64b1c9fc65?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/7beca192-9397-4e3e-9bd6-4a64b1c9fc65?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/7beca192-9397-4e3e-9bd6-4a64b1c9fc65?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7beca192-9397-4e3e-9bd6-4a64b1c9fc65?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/7beca192-9397-4e3e-9bd6-4a64b1c9fc65?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7beca192-9397-4e3e-9bd6-4a64b1c9fc65?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=This%20is%20a%20known%20issue%20with%20how%20Superset%20handles%20shared%20label%20colors%20across%20dashboard%20charts.%20The%20behavior%20you%27re%20seeing%20is%20likely%20caused%20by%20leftover%20%60shared_label_colors%60%20or%20%60map_label_colors%60%20metadata%20in%20your%20dashboard%2C%20not%20the%20%60SHARED_COLORS%60%20flag%20%28which%20doesn%27t%20actually%20exist%20as%20a%20feature%20flag%29.%0A%0A%2A%2AWhy%20this%20happens%3A%2A%2A%20When%20multiple%20charts%20on%20a%20dashboard%20share%20the%20same%20categorical%20labels%20%28e.g.%2C%20cluster%20names%20like%20%221%22%2C%20%222%22%2C%20%223%22%29%2C%20Superset%20%5Bautomatically%20tracks%20these%20in%20dashboard%20metadata%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b 43b1ed3b063ffe45377799c/superset-frontend/src/utils/colorScheme.ts%23L58-L78%29%20to%20maintain%20color%20consistency.%20This%20locks%20the%20color%20scheme%20dropdown%20and%20shows%20%22Dashboard%20scheme%22%20for%20affected%20charts.%20Your%20~5%20affected%20charts%20likely%20share%20labels%20with%20each%20other%20or%20other%20charts%2C%20while%20the%20~20%20working%20charts%20have%20unique%20labels.%0A%0A%2A%2AWorkaround%20-%20Clear%20Dashboard%20Color%20Metadata%3A%2A%2A%0A%0AYou%20can%20use%20the%20%5Bdashboard%20colors%20API%20endpoint%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/dashboards/api.py%23L764-L844%29%20to%20reset%20the%20color%20mappings%3A%0A%0A%60%60%60bash%0Acurl%20-X%20PUT%20%22http%3A//your-superset-instance/api/v1/dashboard/%7Bdashboard_id%7D/colors%22%20%5C%0A%20%20-H%20%22Content-Type%3A%20application/json%22%20%5C%0A%20%20-H%20%22Authorization%3A%20Bearer%20%7Byour_token%7D%22%20%5C%0A%20%20-d%20%27%7B%0A %20%20%20%20%22label_colors%22%3A%20%7B%7D%2C%0A%20%20%20%20%22shared_label_colors%22%3A%20%5B%5D%2C%0A%20%20%20%20%22map_label_colors%22%3A%20%7B%7D%2C%0A%20%20%20%20%22color_scheme%22%3A%20%22%22%2C%0A%20%20%20%20%22color_scheme_domain%22%3A%20%5B%5D%0A%20%20%7D%27%0A%60%60%60%0A%0AAfter%20clearing%2C%20do%20a%20hard%20browser%20reload%20%28Ctrl%2BShift%2BR%29%20and%20re-save%20the%20dashboard.%0A%0AThis%20issue%20has%20been%20%5Breported%5D%28https%3A//github.com/apache/superset/issues/37711%29%20and%20%5Bdiscussed%5D%28https%3A//github.com/apache/superset/issues/33839%23issuecomment-2990202339%29%20by%20other%20users%20in%20similar%20scenarios.%20A%20maintainer%20acknowledged%20this%20as%20unintended%20behavior%20where%20dashboards%20override%20chart%20colors%20even%20when%20the%20dashboard%20scheme%20appears%20empty.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/38514) -- 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]
