dosubot[bot] commented on issue #37711: URL: https://github.com/apache/superset/issues/37711#issuecomment-3855391790
<!-- Answer --> This is a known limitation in Superset's color handling: even if you clear the dashboard color scheme, the dashboard metadata (especially `map_label_colors` and `shared_label_colors`) can still override or mix chart-level color schemes when rendering in a dashboard context. The color scheme dropdown is disabled in dashboards because the dashboard layer enforces its own label-color map after chart form data is saved, making chart-level schemes appear ignored if `map_label_colors` exists—even if the dashboard scheme is blank. This can cause the kind of color mixing and override you’re seeing, especially if charts share labels or if the dashboard previously had a color scheme set. [Details in code and issues](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx#L49-L335). Workarounds that sometimes help: edit and re-save the dashboard, clear browser cache, and re-save each affected chart. If the problem persists, check the dashboard's JSON metadata for leftover `map_label_colors` or `shared_label_colors` and try clearing them. There’s ongoing work to improve this, but as of 6.0.0, there’s no direct way to force dashboards to always respect chart-level color schemes if label color metadata is present. [More context here](https://github.com/apache/superset/issues/33839). If you need per-chart color schemes in dashboards, you may need to manually clean up dashboard metadata or wait for upstream fixes that better separate chart and dashboard color precedence. <!-- 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/def80479-d347-4efa-8330-1e8004c60d0e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/def80479-d347-4efa-8330-1e8004c60d0e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/def80479-d347-4efa-8330-1e8004c60d0e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/def80479-d347-4efa-8330-1e8004c60d0e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/def80479-d347-4efa-8330-1e8004c60d0e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/def80479-d347-4efa-8330-1e8004c60d0e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/def80479-d347-4efa-8330-1e8004c60d0e?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%20limitation%20in%20Superset%27s%20color%20handling%3A%20even%20if%20you%20clear%20the%20dashboard%20color%20scheme%2C%20the%20dashboard%20metadata%20%28especially%20%60map_label_colors%60%20and%20%60shared_label_colors%60%29%20can%20still%20override%20or%20mix%20chart-level%20color%20schemes%20when%20rendering%20in%20a%20dashboard%20context.%20The%20color%20scheme%20dropdown%20is%20disabled%20in%20dashboards%20because%20the%20dashboard%20layer%20enforces%20its%20own%20label-color%20map%20after%20chart%20form%20data%20is%20saved%2C%20making%20chart-level%20schemes%20appear%20ignored%20if%20%60map_label_colors%60%20exists%E2%80%94even%20if%20the%20dashboard%20scheme%20is%20blank.%20This%20can%20cause%20the%20kind%20of%20color%2 0mixing%20and%20override%20you%E2%80%99re%20seeing%2C%20especially%20if%20charts%20share%20labels%20or%20if%20the%20dashboard%20previously%20had%20a%20color%20scheme%20set.%20%5BDetails%20in%20code%20and%20issues%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx%23L49-L335%29.%0A%0AWorkarounds%20that%20sometimes%20help%3A%20edit%20and%20re-save%20the%20dashboard%2C%20clear%20browser%20cache%2C%20and%20re-save%20each%20affected%20chart.%20If%20the%20problem%20persists%2C%20check%20the%20dashboard%27s%20JSON%20metadata%20for%20leftover%20%60map_label_colors%60%20or%20%60shared_label_colors%60%20and%20try%20clearing%20them.%20There%E2%80%99s%20ongoing%20work%20to%20improve%20this%2C%20but%20as%20of%206.0.0%2C%20there%E2%80%99s%20no%20direct%20way%20to%20force%20dashboards%20to%20always%20respect%20chart-level%20color%20schemes%20if%20label%20color%20metadata%20is%20prese nt.%20%5BMore%20context%20here%5D%28https%3A//github.com/apache/superset/issues/33839%29.%0A%0AIf%20you%20need%20per-chart%20color%20schemes%20in%20dashboards%2C%20you%20may%20need%20to%20manually%20clean%20up%20dashboard%20metadata%20or%20wait%20for%20upstream%20fixes%20that%20better%20separate%20chart%20and%20dashboard%20color%20precedence.) [](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/37711) -- 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]
