ChartDirector 7.1 (.NET Edition)

XYChart.yZoneColor


Usage

[C#]public int yZoneColor(double threshold, int belowColor, int aboveColor [, Axis yAxis ]);
[VB]Public Function yZoneColor(threshold As Double, belowColor As Integer, aboveColor As Integer [, yAxis As Axis ]) As Integer

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.

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

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.

Return Value

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