COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: karthik_b on 14 Oct 2010 06:15:56 PM

Title: using conditional palette in a line chart...
Post by: karthik_b on 14 Oct 2010 06:15:56 PM
I have a case where we have to dynamically change the color of the line depending upon a condition and by using conditional palette in the chart options I have created a string variable so that based on the variable from the query my color of the line should vary but I am unable to get the correct colors which I specified using this string variable in the conditional variable. please help me with this.

Thanks in advance.
Title: Re: using conditional palette in a line chart...
Post by: cognostechie on 14 Oct 2010 06:45:21 PM
Did you also add values for different colors for that variable? You have to associate different values with different colors
Title: Re: using conditional palette in a line chart...
Post by: karthik_b on 14 Oct 2010 09:41:04 PM
Quote from: cognostechie on 14 Oct 2010 06:45:21 PM
Did you also add values for different colors for that variable? You have to associate different values with different colors

I have done that as well.

In my report, I have three columns (RTS, ETR, OTS) and then next to it is a line chart and actually I want the line chart to dynamically change its color for some conditions like

case
when (RTS is not null) then 'a'                                       /* one color*/
when ( substring(timestamp2string (ETR),1,1)='D') then 'b'  /* second color */
else 'c'                                                                       /* third color */
end

Thanks in advance.