Bug description
I am working on a dashboard with a graph heatmap. When I create the graph I can choose the colormap (which should go Green to Red). but when I add the graph to the dashboard, it locks on the colorscheme defined in the dashboard. This is fine, but then when I change the colorscheme in the dashboard, the chart doesn't change đ
How can I solve this?
I also tried to remove the Chart from the dashboard, but even it is no longer linked to any dashboard, I still can't change the colorscheme
Screenshots/recordings
Superset version
4.1.1
Python version
3.10
Node version
I don't know
Browser
Chrome
Additional context
I'm mostly creating this issue to see what @dosubot will answer me.
Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
This is a known issue in Superset 4.1.2: when a dashboard color scheme is set, it locks all charts to that scheme, and changing the dashboard scheme sometimes doesn't update the charts as expected. This bug was introduced in recent updates and has already been fixed in the master branchâusers have confirmed the fix works with the same data you described. If you need an immediate workaround, rolling back to Superset 4.1.1 resolves the issue, but upgrading to a future release (after 4.1.2) will include the fix natively. More details and the related pull request are here: issue discussion and PR #33748.
If you still can't change the color scheme after removing the chart from the dashboard, check for any leftover color scheme metadata (like map_label_colors
) in the chart's advanced settingsâremoving these sometimes helps, as noted by other users in similar situations here.
In summary: upgrade to the latest Superset release when possible, or use the workaround above. This should restore expected color scheme behavior for dashboards and charts.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report đ | Other
Comment From: drummerwolli
@dosu i specified the wrong superset version, I'm actually using 4.1.1
Comment From: dosubot[bot]
Thanks for clarifying your version. In 4.1.1, the color scheme for charts in a dashboard is locked to the dashboardâs scheme, and the chartâs own color scheme control is disabled if a dashboard scheme is set. If changing the dashboard scheme doesnât update the charts, this can be due to stale or inconsistent metadataâespecially the map_label_colors
and shared_label_colors
fields. Make sure these fields are present and correctly formatted in your dashboardâs metadata (dictionary for map_label_colors
, list of strings for shared_label_colors
)âotherwise, changes might not propagate as expected. Also, ensure your frontend and backend are both running 4.1.1 to avoid version mismatch issues.
A workaround that has helped others: edit the chart, go to advanced settings, and remove the map_label_color
object if it existsâthis can unlock the color scheme control and let you set the scheme again. More details and user reports are here: issue 32784 and discussion 33678.
If youâre still stuck, double-check the dashboard metadata and try a full browser refresh after changing the dashboard scheme, as the UI in 4.1.1 doesnât always update reactively.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report đ | Other
Comment From: drummerwolli
@dosu i have not set any map_label_colors or shared_label_colors settings, but just a color schema on the dashboard. the chart has not no custom settings at all.
i use the official docker image of superset, so frontend and backend are both 4.1.1. full browser refresh also did not help.
Comment From: dosubot[bot]
In Superset 4.1.1, if changing the dashboard color scheme doesn't update the chartsâeven with no custom label color settings and both frontend/backend on the same versionâthe most likely cause is stale dashboard state or cached chart data. Superset caches chart form data and only refreshes it if it detects a change in dashboard metadata or filters. Sometimes, this cache doesn't invalidate properly, so charts keep using the old color scheme even after you change it in the dashboard settings. A normal browser refresh won't always clear this cache.
Try these steps: 1. After changing the dashboard color scheme, force a hard reload (Ctrl+Shift+R or Cmd+Shift+R) and, if possible, clear your browser cache. 2. Edit and re-save the dashboard (even without changes) to trigger a metadata update. 3. If the issue persists, try editing and saving each affected chart individually, then reload the dashboard.
If none of these work, this is a known limitation in 4.1.1's color scheme propagation logicâthere's no logic that blocks updates if label color fields are missing, but the cache can get stuck and prevent updates from showing up in charts. This was improved in later versions of Superset, so upgrading will resolve the issue for good. More technical details are available in the code and related issues: issue 32784, color scheme caching logic.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report đ | Other
Comment From: rusackas
Hmm... you SHOULD be able to change the color scheme on the dashboard, and that SHOULD override the chart. That said, @geido and @mistercrunch and others have been discussing for quite some time the possibility of having both categorical AND gradient color schemes added at the dashboard level, since both would be relevant to different chart types.