I'm using the Graph object in Q1 2013 (instead of the obsolete Chart).
I have a stacked bar chart with three values (slight, moderate, severe) and I'm using a custom color palette to control the colors. The colors match up like so:
However, if I exclude a value, say Slight, I get the following:
But what I want is:
How can I achieve that?
Ideas:
Thanks for any help!
Ken
UPDATE:
To get around the non-matching legend colors issue I did the following:
I have a stacked bar chart with three values (slight, moderate, severe) and I'm using a custom color palette to control the colors. The colors match up like so:
- Slight = Green
- Moderate = Yellow
- Severe = Red
However, if I exclude a value, say Slight, I get the following:
- Moderate = Green
- Severe = Yellow
But what I want is:
- Moderate = Yellow
- Severe = Red
How can I achieve that?
Ideas:
- I realize I can use DataPointConditionalFormatting to color the bars, BUT that doesn't change the legend markers. Can I change the legend colors programmatically?
- Can I modify the Color Palette programmatically? If so, could I remove a color in the collection to control the default bar and legend colors?
Thanks for any help!
Ken
UPDATE:
To get around the non-matching legend colors issue I did the following:
- Used conditional formatting to color the bars.
- Hid the default legend.
- Added my own static legend on the report below the chart.
That's not a bad solution, but I would still like an answer to my questions above.