Showing results for 
Search instead for 
Did you mean: 

Different Colour Coded Chart


Hi all,


I am trying to give one colour to the chart colums which are above a value and another colour to the colums which are below that value.


Eg: All the columns valued above 150 is red and colums valued below 150 is green.


Please suggest the modification to be done in the method in attached model.


Thanks & Regards,



Re: Different Colour Coded Chart

Siemens Phenom Siemens Phenom
Siemens Phenom

In your model the Method sets the channel color in a loop, but always for channel 1. So you need to change the statement to:

    Chart.setRGB(x, 0, 190, 0);


You cannot set the color for an individual bar. You can only set the color for an entire channel. A channel is either a row or a column of the TableFile, depending if the setting 'Chart > Display > Data' is "in Row" or "in Column". In your model you are using "in Row". Since the TableFile has only 2 rows, you have only 2 colors, one for the row "MIN" and one for the row "MAX".

If you change 'Data' to "in Column", you can now set 6 colors for your 6 columns. Unfortunately MIN and MAX now get the same color and are no longer grouped together.