question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

charts colors forced in dashboard do not work anymore ("label_colors")

See original GitHub issue

See #2524

In a dashbord properties, one can set “label_colors”, so that all charts on the dashboard will share the same colors for identical data.

It’s been broken in 0.37.2 and 0.38.0.

Last time seen working was 0.36.0

Expected results

all charts share the predefined colors of each category, set using “label_colors”

Actual results

charts original colors arekept, or the one chosen in dashboard is used, but label_colors is ignored

Screenshots

When it works :

image

With newer version :

image

How to reproduce the bug

  1. create two bar charts showing categories “category1, category2, … for instance”. Define a different custom palette for each
  2. add them on a dashboard
  3. go to edit / edit dashboard properties
  4. in dashboard properties set for instance
"label_colors": {
    "category1": "rgb(248, 166,28)",
    "category2": "black",
    "category3": "rgb(227, 59, 5)",
    "category4": "rgb(245, 104, 7) ",
    "category5": "rgb(230, 28, 96)",
    "category6": "rgb(0, 228, 201) "
  },
  1. look at the dashboard : it does never use these “label_colors”

NOTE : in dashboard settings, selecting a palette does overwrite charts palettes, removing a palette tehre leaves the charts one, but “label_colors” is never used.

Environment

  • superset version: superset version
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Superset 0.38.0
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  • python version: python --version
- Python 3.6.7

node.js version: node -v

v12.16.3

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Additional context

Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
squaloucommented, Dec 9, 2020

Finally I’ve one thing that works, I hope it will help tackle the root issue, which is in the end : one has to guess the right charts settings and nothing guides the tries and errors 😃 … and it changed over time.

If you have

  • charts with “superset” color palette chosen (AND NO OTHER)
  • note : any custom ‘label_colors’ can be defined on the chart itself, not an issue
  • dashboard with any color palette chose or even null
  • then add {"label_colors":{"name":"#123456"}} to Dashboard json properties
  • don’t forget to refresh Dashboard after each label_color change

=> in this case it works

Once upon a time : Charts required ti use rb&b palette, now it requires superset.

1reaction
squaloucommented, Nov 26, 2020

I tried. So many refreshes and combinations of actions. Save, save as new, ne charts, remove colors entirely from dashborad properties, etc etc.

a word about #11674 : in that issue, the consistence in dashboard --> explore chart worflow is disccussed.

In my case I’m more looking for consistency on a single dashboard accross different charts. It’s slightly different and the solution may be the same in the end. But as a “use case” it’s very different, I hope the initial explanation was undertandable 😃

The need underneath is : affect one fixed color to a category once and for all. (Once per dashboard or even one for all susperset, in my specific case it would be fine)

Read more comments on GitHub >

github_iconTop Results From Across the Web

charts colors forced in dashboard do not work anymore ...
In a dashbord properties, one can set "label_colors", so that all charts on the dashboard will share the same colors for identical data....
Read more >
Chart colors are not correct on dashboards - Microsoft Support
Some charts on interactive dashboards do not behave correctly. Random colors are not being generated, which causes charts to have same color for...
Read more >
Default label font colors has mind of its own
In a stacked bar chart - for example - Tableau smartly decides which label font color (black or white) belongs on a color...
Read more >
how to change label colors of charts in apache superset
To do that, have your dashboard on edit mode, press the 3 dots and choose Edit Properties. Look in the advanced option which...
Read more >
Chart configuration reference - Splunk Documentation
If attribute is present, disables legend color synchronization with other panels in the dashboard. Note: The only valid value is an empty tag....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found