ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Coloring of data values
Posted by Tom on Mar-23-2013 13:24
Hello,

is it possible to let CD the coloring of data values in a XYchart, depending on their specific value ?

Example:
All data values between 0 and 100 should be displayed in Red
All data values between 100 and 200 should be displayed in Yellow
All data values between 200 and 300 should be displayed in Green
All data values between 300 and 400 should be displayed in Yellow
All data values > 500 should be displayed in blue

Currently, I use different scatter layers for each target range - this works, but is not very comfortable to handle, for I've to use multiple layers for actually the same dataset

So is there a simplier way to do this ?
Thank you
Tom

  Re: Coloring of data values
Posted by Peter Kwan on Mar-25-2013 22:34
Hi Tom,

If I were to do it, I would probably split the data into 5 data sets for different colors, like what you are doing.

Apart from the above method, there is another method that uses a y-zone color. A y-zone color is a color that changes based on the vertical position, and can be configured to match the rule you mentioned in your message. If this y-zone color is used as the scatter layer color, it will color those parts of the layer between 0 to 100 red, and those parts that are from 100 to 200 yellow, and so on.

However, the y-zone color is a graphical method. If a symbol is partly above y=100 line, and partly below y=100, then part of the symbol will be red, and part of the symbol will be yellow. (Because the symbol has a size, so it is possible the entire symbol can overlap two data ranges, even though the center point is in one of the range.)

Another issue is that if you use a legend box, if you use the y-zone color method, by default, there will only be one entry in the legend box (as there is only one data set). The color of the symbol in the legend box will depend on where the legend box is located. For example, the if the legend entry is located below the chart (below y = 100), the symbol in the legend entry will be red. (That is, the symbol in the legend entry follows the same rule as the symbol in the chart.)

On the other hand, if multiple layers or data sets are used, they can have independent legend entries, so people can know what the colors mean.

Hope this can help.

Regards
Peter Kwan

  Re: Coloring of data values
Posted by Tom on Mar-31-2013 13:47
Hi Peter,

thank you for the fast reply. I think I'll stay with different layers.

Best regards
Tom