7 Replies Latest reply: Jan 26, 2012 8:53 AM by cdettmer

# How to calculate the colour for the Linear Gauge Chart

Hello all,

sorry if this topic was already discussed in the community but I couldn't find an answer through the search function.

My problem is as follows:

I want to calcute three different colours for my gauge chart:

0-90% red

90-95%yellow

95-100% green

BUT

The bars shouldn't be divided in the three colours. What I try to do is to dye the whole bar in the respective colour:

If the value is 76, please dye the whole bar red, if the value is 91 please dye it yellow and so on.

The colours are defined by variables (cannot change that).

Can you please help me with this?

My following function does not work:

=If(Column(4) > 0.9,\$(vColor_Red),if(0.9<=Column (4)<= 0.95,\$(vColor_Yellow),if(Column(4)>0.95,\$(vColor_LightGreen)))

Thanks for any help!

• ###### How to calculate the colour for the Linear Gauge Chart

gauge seetings ->  add segment setup -> give the Values in LowerBound ..and select the color

• ###### How to calculate the colour for the Linear Gauge Chart

Hi sarathi87k,

if I do this, then the bar will be dyed in different colors according to the bound of the segments. I want to dye the WHOLE bar in one colour dependent on the value of a variable.

So that when the variable is 86% the whole bar is red, and when it is 93% the whole bar is yellow. NOT that only the small part of 3% is yellow but the whole bar.

MAybe it is now clearer what I try to do?

• ###### How to calculate the colour for the Linear Gauge Chart

Hi,

Can you attach a sample file for this.

Regards,

Jagan.

• ###### Re: How to calculate the colour for the Linear Gauge Chart

Hi,

Please check the attachment for your solution.

Hope this helps you.

Regards,

Jagan.

• ###### Re: How to calculate the colour for the Linear Gauge Chart

Hi jagan,

thank you very much for your help! Thats exactly what I'm looking for!

I just tried, it doesn't work .

The colour is not changing.

Could someone please check out the formula inserted?

Thanks a lot

• ###### Re: How to calculate the colour for the Linear Gauge Chart

It seems that the gauge colours are calculated once for the whole chart and not on row-by-row basis.

You other option would be to keep the colour coding without the bars (so all of them with full sizes) - paste the colour formula in the expression background setting (expand the + sign before the expression in the expr list).

And probably add a second column with same-colour bars to show the length.

Regards,

Dilyana

• ###### Re: How to calculate the colour for the Linear Gauge Chart

Hey Dilyana,

thanks a lot, so far I accomplished the different colours of the bars, but there is still the problem that now the whole bar is dyed and I would like to have a fill to value at least in the layout.

The file is attached.

Thanks again for your help!!!!