martes, 1 de septiembre de 2015

Change palette for column and line charts in Cognos 10



Change palette for column and line charts Cognos 10
One of the things that you may not like about Cognos charts is the default colors for graphs. Or maybe you have a corporate palette that needs to be changed for one graph. If you’re dealing with Pie Charts, the issue is easy, you just go to the chart properties window, scroll down to Color & Background, click on Palette and then on the elipsis


That will bring up the current palette
and you can choose a different palette by clicking on the palettes icon
Or you can chane the current palette elements by changing the fill type
Or the parameters

Most likely, you’ll only want to change the color by clicking on the Default Color and then choosing the desired color from the selection displayed on each tab

So far that is pretty simple. The problem arises when you’re dealing with a type of chart that does not have the Palette property, for example a Combination Chart

Here we need to be a little creative. First, we convert our Combination Char to a Pie Chart. We do this by richt-clicking on the Combination Chart and selecting Convert Chart from the popup menu

That’ll bring up a convert chart window that will allow us to choose Pie and the type of pie we need. Fort he purpose of changing the palette the type of pie is irrelevant

After we accept the change, we may get a warning telling us that some property of our current chat will be discarded.

We’ll need to accept that and fix it later. Now we have our chart converted to Pie.
In order to change the coloring, we proceed as explained earlier in the first part of the post. After we’re done with the color updates, we right-click again and convert the chart to our original type of chart. Again, we may get a warning telling us that some properties may be discarded or missing and again we accept it
Here comes the tricky part. Our reconverted chart may not be exactly like the original one. In this case, for example, we started out with a simpe line chart and now we have a chart with multiple subcharts

What we need to do is get rid of those useless subcharts. In order to do that, we’ll move tha x-axix value to te primary axis

Notice that by doing that, we ge tour original chart type with just 1 graph. Now we move our x-axis value back to its place

And finally, you may have noticed that we started out with 2 series (primary axis) measures, <#Minutes#> and <#Runs#> and we’ve ended up with only <#Runs#>. That is simple enough to solve as <#Minutes#> is still in the query and we can just drag it again to its place and we now have our line chart with the desired palette

A bit cumbersome. One wonders why the Palette property is missing from some types of charts making it so difficult to change.