COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Chrisjohn on 12 Jun 2011 05:36:07 PM

Title: mutlicolor sparkline chart display
Post by: Chrisjohn on 12 Jun 2011 05:36:07 PM
Hi,
I need to create a multicolor background color dynamically.
For example: Y-axis has defined to minimum value of 100 and maximum value of 500.
if in the chart line (data item value) crosses over either 100 or 500 then the area of chart displays red (Red color should display only over 500 and or  under 100) otherwise it stays the original color which is white.
can anybody walk through it  how to do it? Thanks a lot.
Title: Re: mutlicolor sparkline chart display
Post by: PRIT AMRIT on 12 Jun 2011 09:54:24 PM
Could you please answer to below questions before we get on?

What is your chart Type?
What do you mean by
Quotecrosses over either 100 or 500 then the area of chart displays red

Title: Re: mutlicolor sparkline chart display
Post by: Chrisjohn on 12 Jun 2011 10:34:56 PM
It is a sparkline.
Do you think it is possible to customize?
Thanks
Title: Re: mutlicolor sparkline chart display
Post by: Chrisjohn on 12 Jun 2011 10:46:36 PM
Hi Prit,
Oh sorry not specifying your question.
Quote

    "crosses over either 100 or 500 then the area of chart displays red "
if sparkline displays within the Y-axis = 100 and Y-axis = 500 then the area of background should display white. Once the sparkline crosses over 100 or 500 then the area of the  background should display red. In this situation, the area will display in two different colors: red and white. 
I hope I have clarify it.
Thanks

Title: Re: mutlicolor sparkline chart display
Post by: PRIT AMRIT on 13 Jun 2011 12:19:25 AM
Create a Boolean Variable e.g. 'Area Color', with below expression

[Measure] < 100 or  [Measure] > 500

Select the Chart report--Properties-- Conditional Palette -- Under Variable Drop Down, select 'Area Color',

Value = YES
Check the Color option and in your case choose RED and OK.

Run the report and it should work.

Hope this helps?
Title: Re: mutlicolor sparkline chart display
Post by: Chrisjohn on 14 Jun 2011 10:05:11 PM
PritM,
Thanks for the hint. But it dis  not work in my report. I  may have to create a new query item  instead using conditional formatting from the original one.
I will try that way also.