ChartDirector Ver 4.1 (ColdFusion Edition)

XYChart.xZoneColor


Usage

xZoneColor(threshold, belowColor, aboveColor)

Description

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

For example, if a x-zone color is used as the line color in a line layer, the line will switch from one color to another when its passes through a certain value on the x-axis. Similarly, if a x-zone color is used as the fill color in an area layer, the area will switch from one color to another when it passes through a certain value on the x-axis.

The two colors used in a x-zone color can be other dynamic colors. For example, one color could be a solid color, while the other color could be a dash line color (see !BaseChart.dashLineColor). When this x-zone color is as the line color, the line will change from a solid style to a dash line style when the line passes through a certain value on the x-axis

You may create x-zone colors with more than 2 zones by cascading multiple x-zone colors.

For a 3D chart, this method will get the zone color at the top surface of the chart. Use Layer.xZoneColor to obtain the zone color for a particular chart layer.

Arguments

ArgumentDefaultDescription
threshold(Mandatory)The x value serving as the threshold for switching between two colors.
belowColor(Mandatory)The color to use when the x-axis value of the pixel is smaller than the threshold.
aboveColor(Mandatory)The color to use when the x-axis value of the pixel is greater than the threshold.

Return Value

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