When selecting multiple filter values in the chart,the same color is being applied to both, making it difficult to distinguish between them visually.
ShwethaSJ opened this issue · 7 comments
Bug description
Steps to Reproduce:
Navigate to the filter section in the dashboard.
Select multiple filters(Shift A and Shift B) for the scenario explained. Apply the filters.
Scroll to view the charts having a reference of shift A and Shift B.
Screenshots/recordings
Hi Team,
I have noticed an issue when selecting multiple filter values, such as Shift A and Shift B. In the resulting chart, the same color is being applied to both shifts, making it difficult to distinguish between them visually.
Steps to Reproduce:
- Navigate to the filter section in the dashboard.
- Select multiple filters(Shift A and Shift B) for the scenario explained. Apply the filters.
- Scroll to view the charts having a reference of shift A and Shift B.
I have attached a screenshot for your reference. Please let me know if there’s a way to resolve this issue by ensuring distinct colors for each filter value.
Looking forward to your support.
Regards,
Shwetha
Superset version
4.0.2
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
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.
Hey @ShwethaSJ! 👋 I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!
To resolve the issue of the same color being applied to multiple filter values in Superset, you can customize the label_colors
mapping to ensure distinct colors for each filter value. This can be done by specifying a mapping of labels to colors in the JSON Metadata attribute of your dashboard. Here's an example of how you can define this mapping:
{
"label_colors": {
"Shift A": "#FF69B4", // Assign a unique color for Shift A
"Shift B": "lightblue" // Assign a different unique color for Shift B
}
}
By doing this, you ensure that each filter value, such as "Shift A" and "Shift B", is assigned a unique color, making it easier to distinguish between them in your charts [1].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other
Do you have a dashboard color palette applied in the dashboard settings? Any custom "label_colors" in the dashboards json properties?
Pinging @geido here, who hates these problem but has the unfortunate stance of being the expert here ;)
Has the color of any of the dimensions changed after applying the filters? If not, I would say this is the expected behaviour. Collisions can happen.
Hi Geido,
With regard to above concern raised, I have not applied color palette in the dashboard settings or used "label_colors" in the json properties. However to my surprise today, I find on selecting multiple filter values, such as Shift A and Shift B I am able to see different color palette getting reflected in pie-chart but I find same color palette shown for shift A,B in the bar chart. Please find the screenshot attached.