I have a stacked bar chart with a different colour representing each status as shown below.
When I filter by a program (leaving me with only 1 bar), for some reason QuickSight uses the same colour for two different statuses.
In the analysis I have the “Not Started” status set to red. Is there a reason why QuickSight doesn’t keep the colour when I apply filters?
QuickSight uses data color schemes defined as part of themes to render the visual color scheme. See the attached example below, you can notice the sequence of colors available as data color in themes govern how donut chart sections reflect colors. So when you filter a visual, data color scheme sequence reapplies to the remaining values on the visual resulting into different color representing same values.
I understand that this may not be a great user experience, so one way to address this would be what you have already tried, manually selecting a color for a given value on your visual using right click (in your example manually selecting a color for Completed, Incomplete, Not Started, Undetermined values). Once you do that, visual should use the same color scheme even if you apply filters.
Let me know if this helps to address your use case.
I already had the “Not Started” value manually set to red before I applied my filter but QuickSight somehow didn’t keep the color and automatically changed it to dark grey.
Here’s another screenshot showing the data colors in my theme:
Even if I didn’t manually set “Not Started” to red, it shouldn’t apply the dark grey color twice because I have only 4 groups in my bar chart but more than 4 data colors defined in my theme.
@David_Wong Really nice colors.
(I know that doesn’t solve your problem but I wanted to share. )
Please confirm if you are setting colors manually for each of the status values or only for not started status. In my example, I have set colors for 6 specific products on a bar chart and even if I filter on any of these 6 products, color scheme for remaining products stays the same. Now if I select any product other than these 6, then data color scheme applies as expected for those other products. see the examples below -
Let me know if you still the colors changing on bar chart dynamically after each of these were set to manual color schemes.
Yes, I set the color manually for each status.
In your test can you try to change the bar chart to a stacked bar chart instead? I wonder if the issue is specific to stacked bar charts.
Hi David, I have tried solution provided by Deepak to manually override color in legend of stacked bar chart. It worked well. I am sharing mock screenshot with sample dataset, can you please retry it and let me know if it works. Please highlight if there is any edge case scenario I am missing to test, I will be happy to include it.
Step 1: Filtering Singapore and Taiwan Country Tech is Green Color:
Step 2 (Test failed) : Filtering by Taiwan Country, Tech changes from Green to Blue Color:
Step 3 (Solution) : Overriding values in Visual Legend for Tech to Green Color:
Step 4: Filtering Singapore and Taiwan Country Tech is Green Color:
Step 5 (test Pass): Again filtering by Taiwan Country, Tech remains to Green Color only:
I think I found the issue. It turns out that the color for the “Not Started” status was not manually set to red but the UI didn’t clearly indicate that. Looking at the screenshot below, to me it looked like the color was manually set to red but it wasn’t.
I had to click on “Custom color” and click on “Apply” again even though the red color was already preselected. The context menu looked the same before and after doing this. There was nothing to indicate that anything changed but this did manually set the color to red.