Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDXYChartMBS class.

Previous items

CDXYChartMBS.xZoneColor(threshold as Double, belowColor as Integer, aboveColor as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
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.

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.

See also:

CDXYChartMBS.yScaleColor(scale() as double, yAxis as CDAxisMBS = nil) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a y-scale color. An y-scale is a color that will vary depending on the y value of the pixel.

ArgumentDefaultDescription
colorStops(Mandatory)An array that defines the mapping from data values to colors. Please refer to ColorAxis.setColorScale for the format of this array.
yAxisnilThe 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.

Returns a 32-bit integer representing the y scale color.

CDXYChartMBS.yZoneColor(threshold as Double, belowColor as color, aboveColor as color, yAxis as CDAxisMBS=nil) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Same as the other yZoneColor method, but uses color instead of integer data type for passing color values.

See also:

CDXYChartMBS.yZoneColor(threshold as Double, belowColor as Integer, aboveColor as Integer, yAxis as CDAxisMBS=nil) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
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.

ParameterDefaultDescription
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.

See also:

Previous items

The items on this page are in the following plugins: MBS ChartDirector Plugin.


💬 Ask a question or report a problem
The biggest plugin in space...