ChartDirector 7.0 (Perl Edition)

Layer.yZoneColor


Usage

yZoneColor(threshold, belowColor, aboveColor [, yAxis ])

Description

Creates a y-zone color. A y-zone color will change from one color to another depending on a threshold value on the y-axis.

For example, if a y-zone color is used as the fill color in an area layer, the area will switch from one color to another when its value is higher than a certain value on the y-axis.

The two colors used in a y-zone color can be other dynamic colors. You may create y-zone colors with more than 2 zones by cascading multiple y-zone colors.

Arguments

ArgumentDefaultDescription
threshold(Mandatory)The y value serving as the threshold for switching between two colors.
belowColor(Mandatory)The color to use when the y-axis value of the pixel is smaller than the threshold.
aboveColor(Mandatory)The color to use when the y-axis value of the pixel is greater than the threshold.
yAxis[Null]The y-axis to use to determine the pixel coordinates of data values. The y-axis may be obtained using XYChart.yAxis, XYChart.yAxis2 or XYChart.addAxis. The default is to use the primary y-axis.

For backward compatibility, the axis argument can also be a boolean value. A true (non-zero) value means the primary y-axis. A false (zero) value means the secondary y-axis.

Return Value

A 32-bit integer representing the y-zone color.