If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Report studio conditional style bar chart with defined colors

Started by Stephaneky, 07 Jan 2018 06:24:28 PM

Previous topic - Next topic

Stephaneky

I am trying to generate a report that includes a stacked bar chart where the customer is requesting specific colors for each product. Assume that each bar represents a month (or time period) and each section of each bar represents a product i.e. product a / product b / product c etc..... for each bar. The requirement is to have each product in a specific color. If I use the standard palette, the color for each product is selected sequentially. I need to define the color for each product myself i.e. product a should always be blue, product b should always be green, etc.....so that there is a consistent color representation across multiple charts/ reports regardless of number of products.
Any help would be greatly appreciated!

hespora

by using an outer join or a union, make sure your dataset always have values for each dimension intersection.
In your example, the left hand side is missing data for the "DIA" dimension. If you make sure the data is there with a zero value, you'll solve the problem.

Stephaneky

Thank you hespora,

However; does that mean that I need to display every single dimension on every chart even though it will have 0 value? I am trying to avoid that because in some cases I have many dimensions and I do not want to use real estate and display 0 value dimensions. Is there a way to use conditional logic to assign color to dimension?



hespora

In report studio, select the series of your chart (click on the little symbol on the left hand side of the "series" box). Now, you have access to a property "conditional palette" (left hand side under properties) where you can build palette entries for specific values.

The downsides to this approach are a) you're going to have to manually do this for every chart you are using. Filling in the blank values would solve it for all charts at once, but I get why real estate might become a problem; b) if your dimension from one day to the next includes values that you did not account for, you're going to have to update the report.

Stephaneky

I really appreciate your assistance hespora.

I think unfortunately that the second solution is the most appropriate in my case even though I agree that there are drawbacks as you mentioned. The only issue I found with this method is that I can use the conditional palette, but for some reason I am unable to "de-select" the standard palette and therefore the legend keeps using the default colors.