COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Kallol on 26 Jul 2010 12:08:30 AM

Title: How to dynamically set color intervals and max values in Gauge Chart
Post by: Kallol on 26 Jul 2010 12:08:30 AM
The requirement is to obtain the boundary values of red, amber and green colors in the dial of a Gauge Chart from data source or prompts.  How can this be done?
Title: Re: How to dynamically set color intervals and max values in Gauge Chart
Post by: CognosPaul on 26 Jul 2010 05:27:54 AM
Unfortunately there is no way to dynamically set the max values in graphs. There are some things you can do to cheat however.

Lets say you have two fields. The value of the gauge, and the max value of the graph. Let the value by 5 and the max be 10. In that scenario you would want the gauge to pointing to the top (or middle) of the graph. If the value was at 7, you'd want the gauge to be pointing at the 70% mark. So the solution is set the max value of the gauge to 1, and use a new data item for the gauge: [Value]/[Max]

The downside to this solution is that the tooltips will only show the decimal value. You'll to display the value of the gauge elsewhere (directly underneath the gauge is a good place for it.

That won't help much with the colors though...
Title: Re: How to dynamically set color intervals and max values in Gauge Chart
Post by: bogavijay on 11 Feb 2014 10:56:57 PM
HI Paul

I have same requirement. I need to change the gauge Platte color at runtime.
Thanks