I need bar graph showing Places and Counts. I want the Places labeled below the bars and each bar a different color. This seems simple but is apparently difficult for me at least.
If i put the Places field in Category and the Counts in Measure then the graph has labels under each bar (below the x-axis) but the bar colors are all the same.
if i put the Places field in Series and the Counts in Measure then the graph has no labels but it has colors.
If I put Places in Category and in Series and Counts field in Measure...I get labels and colors, but the the bars width shrink up and are spaced out. I am guess because it is doing a series for each category.
How can I get a graph with each bar a different color and labels underneath each bar? (btw the legend will not work for me as a substitute for the labels)
Hi,
To do this you will need to use the Conditional Palette property in conjunction with a string variable.
Step 1: From the Condition Explorer, create a string variable with an expression based on your Place item:
[Query1].[Place]
Once the expression is defined, go to the Values dialog on the right and manually enter each of your place names (you do not need quotes).
Step 2: Make sure you have Place as the Category and Count as the measure in your chart. Select the Conditional Palette property, and choose your string variable from the dropdown list at the top. Then from the Value dropdown select each place name in turn and assign a different colour to it.
Hope this helps!
MF.
That is good to know, unfortunately I dont have a static list of values to set for places. they will change based on the day the report is run. I am guessing and yet surprised that what i want may not be possible in cognos.
If you could come up with a master list of places covering all possibilities, you would only need to code the values once. Is this feasible?
MF.
it would be tough to maintain because the list would change as contracts come and go. Also there are other reports where i would want to do the same thing and i dont want to make static lists for everything. Thanks for all you help!
btw, is it just me...but does it seem a little silly that cognos cant make a colored bar graph with labels underneath without having to make a color definition? doesnt seem like something that is difficult, but i could be missing something.
Quote from: Thermos on 11 Jan 2010 01:48:50 PMbtw, is it just me...but does it seem a little silly that cognos cant make a colored bar graph with labels underneath without having to make a color definition? doesnt seem like something that is difficult, but i could be missing something.
It can, but you need two dimensions for this to happen - one in categories and one in series. The item in Categories is labelled on the x axis, and the item in Series is colour coded and labelled in the legend. The colours are to allow you to distinguish between different series bars within each category cluster.
MF.