Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDColorAxisMBS class.

CDColorAxisMBS.getBoxHeight as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the height of the color axis inclusive of the bounding box.

This method should be called only after axis layout (after calling CDXYChartMBS.layoutAxes, CDBaseChartMBS.layout or CDXYChartMBS.packPlotArea).

CDColorAxisMBS.getBoxWidth as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the width of the color axis inclusive of the bounding box.

This method should be called only after axis layout (after calling CDXYChartMBS.layoutAxes, CDBaseChartMBS.layout or CDXYChartMBS.packPlotArea).

CDColorAxisMBS.getColor(z as Double) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the color given the data value.

You must call CDXYChartMBS.layoutAxes, CDBaseChartMBS.layout or CDXYChartMBS.packPlotArea first before calling this method. ChartDirector needs to perform auto-scaling and layout the axis before it can compute the color.

Arguments:
ArgumentDefaultDescription
z(Mandatory)The data value.

Return Value
The color that corresponds to the data value.

CDColorAxisMBS.getColorScale as Double()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the color stops defining the axis scale and the associated colors.

Returns an array of numbers representing the color stops.
Please refer to ColorAxis.setColorScale on how to interpret this array.

CDColorAxisMBS.setAxisBorder(edgeColor as color, raisedEffect as Integer = 0)

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 setAxisBorder method, but uses color instead of integer data type for passing color values.

ArgumentDefaultDescription
edgeColor(Mandatory)The edge color of the axis stem.
raisedEffect0The 3D border width. For positive values, the border will appear raised. For negative values, the border will appear depressed. A zero value means the border will appear flat. This argument can also be used to specify glassEffect, softLighting, :cylinderEffect or flatBorder effects.

See also:

Some examples using this method:

CDColorAxisMBS.setAxisBorder(edgeColor as Integer, raisedEffect as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the border color and 3D border effect of the axis stem.

ArgumentDefaultDescription
edgeColor(Mandatory)The edge color of the axis stem.
raisedEffect0The 3D border width. For positive values, the border will appear raised. For negative values, the border will appear depressed. A zero value means the border will appear flat. This argument can also be used to specify glassEffect, softLighting, :cylinderEffect or flatBorder effects.

See also:

CDColorAxisMBS.setAxisPos(x as Integer, y as Integer, alignment as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the position and alignment of the color axis.

CDColorAxisMBS.setBoundingBox(fillColor as Integer, edgeColor as Integer = &hff000000, raisedEffect as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the background color, border color and 3D border effect of the bounding box.

Arguments:
ArgumentDefaultDescription
fillColor(Mandatory)The background color of the bounding box.
edgeColorkTransparentThe border color of the bounding box.
raisedEffect0The 3D border width. For positive values, the border will appear raised. For negative values, the border will appear depressed. A zero value means the border will appear flat. This argument is also used to support CDBaseChartMBS.glassEffect, CDBaseChartMBS.softLighting and CDBaseChartMBS.cylinderEffect effects.

See also:

CDColorAxisMBS.setBoxMargin(leftMargin as Integer, rightMargin as Integer, topMargin as Integer, bottomMargin as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the margins of the bounding box in pixels.

The margins of a bounding box refer to the distances between the borders of the bounding box to the color axis inside.

Arguments:
ArgumentDefaultDescription
leftMargin(Mandatory)The left margin in pixels.
rightMargin(Mandatory)The right margin in pixels.
topMargin(Mandatory)The top margin in pixels.
bottomMargin(Mandatory)The bottom margin in pixels.

See also:

CDColorAxisMBS.setBoxMargin(m as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets all margins (left, right, top, and bottom) of the bounding box to the same value.

The margins of a bounding box refer to the distances between the borders of the bounding box to the color axis inside.

Arguments:
ArgumentDefaultDescription
m(Mandatory)The left, right, top and bottom margins in pixels.

See also:

CDColorAxisMBS.setColorGradient(isContinuous as boolean, Colors() as color, underflowColor as color, overflowColor as color)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the continuous color gradient or discrete color steps for the color axis.

Arguments:
ArgumentDefaultDescription
isContinuoustrueTrue ti set to continuous color gradient. False to set to discrete color steps.
colors[Empty_Array]An array of colors used to define the continuous color gradient. If an empty array is used, the colors are automatically determined.
ChartDirector will interpolate between the colors to create the continuous gradient. If discrete color steps are used, ChartDirector will take samples along the continuous color gradient. The number of samples is determined by the number of ticks on the axis, and may not equal the number of colors in the colors array.
overflowColor-1The color to use if a value exceeds the maximum value of the axis scale. -1 means the overflowColor is the same color at the maximum value.
underflowColor-1The color to use if a value falls below the minimum value of the axis scale. -1 means the underflowColor is the same color at the minimum value.

See also:

Some examples using this method:

CDColorAxisMBS.setColorGradient(isContinuous as boolean, Colors() as color, underflowColor as Integer, overflowColor as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the continuous color gradient or discrete color steps for the color axis.

Arguments:
ArgumentDefaultDescription
isContinuoustrueTrue ti set to continuous color gradient. False to set to discrete color steps.
colors[Empty_Array]An array of colors used to define the continuous color gradient. If an empty array is used, the colors are automatically determined.
ChartDirector will interpolate between the colors to create the continuous gradient. If discrete color steps are used, ChartDirector will take samples along the continuous color gradient. The number of samples is determined by the number of ticks on the axis, and may not equal the number of colors in the colors array.
overflowColor-1The color to use if a value exceeds the maximum value of the axis scale. -1 means the overflowColor is the same color at the maximum value.
underflowColor-1The color to use if a value falls below the minimum value of the axis scale. -1 means the underflowColor is the same color at the minimum value.

See also:

CDColorAxisMBS.setColorGradient(isContinuous as boolean, Colors() as Integer, underflowColor as Integer = -1, overflowColor as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the continuous color gradient or discrete color steps for the color axis.

Arguments:
ArgumentDefaultDescription
isContinuoustrueTrue ti set to continuous color gradient. False to set to discrete color steps.
colors[Empty_Array]An array of colors used to define the continuous color gradient. If an empty array is used, the colors are automatically determined.
ChartDirector will interpolate between the colors to create the continuous gradient. If discrete color steps are used, ChartDirector will take samples along the continuous color gradient. The number of samples is determined by the number of ticks on the axis, and may not equal the number of colors in the colors array.
overflowColor-1The color to use if a value exceeds the maximum value of the axis scale. -1 means the overflowColor is the same color at the maximum value.
underflowColor-1The color to use if a value falls below the minimum value of the axis scale. -1 means the underflowColor is the same color at the minimum value.

See also:

CDColorAxisMBS.setColorGradient(isContinuous as boolean=true)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the continuous color gradient or discrete color steps for the color axis.

Arguments:
ArgumentDefaultDescription
isContinuoustrueTrue ti set to continuous color gradient. False to set to discrete color steps.
colors[Empty_Array]An array of colors used to define the continuous color gradient. If an empty array is used, the colors are automatically determined.
ChartDirector will interpolate between the colors to create the continuous gradient. If discrete color steps are used, ChartDirector will take samples along the continuous color gradient. The number of samples is determined by the number of ticks on the axis, and may not equal the number of colors in the colors array.
overflowColor-1The color to use if a value exceeds the maximum value of the axis scale. -1 means the overflowColor is the same color at the maximum value.
underflowColor-1The color to use if a value falls below the minimum value of the axis scale. -1 means the underflowColor is the same color at the minimum value.

See also:

CDColorAxisMBS.setColorScale(colorStops() as Double, underflowColor as Integer = -1, overflowColor as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 15.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the axis scale and the associated colors.

The axis scale and the associated colors are defined with an array of numbers. For a color scale with continuous color gradient, each pair of numbers represents a value and its associated color. For example, for a continuous color scale in which 0 is blue (0000FF), 50 is yellow (FFFF00) and 100 is red (FF0000), the numbers should be:

0.0, &h0000ff, 50.0, &hffff00, 100.0, &hff0000

For a color scale with discrete color steps, the number of colors would be one less than the number of values. For example, to define a step color scale in which 0 to 50 is red (FF0000), and 50 to 100 is green (00FF00), the numbers will be:

0.0, &hff000, 50.0, &h00ff00, 100.0

ArgumentDefaultDescription
colorStops(Mandatory)An array of numbers alternating between values and colors. If the number count is even, the array will define a continuous color scale, otherwise it will define a step color scale.
underflowColor-1The color to use if a value falls below the minimum value of the axis scale. -1 means the underflowColor is the same color at the minimum value.
overflowColor-1The color to use if a value exceeds the maximum value of the axis scale. -1 means the overflowColor is the same color at the maximum value.

Some examples using this method:

CDColorAxisMBS.setCompactAxis(b as boolean=true)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets whether to compact the axis or not.

For a color axis, the axis can assume any length. Typically, an initial length is specified so that ChartDirector can determine how many labels can be fitted on the axis, and auto-scale the axis accordingly.

After the labels are determined, ChartDirector can compact the axis by setting its length to the minimum length compatible with the major tick density (see CDAxisMBS.setTickDensity).

For example, suppose ChartDirector auto-scaling has set the axis labels to be [0, 1, 2, 3, 4, 5], and the major tick density is 20 pixels, ChartDirector will set the axis length to 100 pixels, irrespective of its original length.

If this method is never called, the default is not to compact the axis.

Arguments:
ArgumentDefaultDescription
btrueA true value means to compact the axis. A false value means not to compact the axis.

CDColorAxisMBS.setLevels(maxLevels as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the maximum number of contour intervals on the axis.

If discrete color steps are used, the number of contour intervals is the number of color steps on the axis.

For a general color axis, the number of contour intervals is equal to the number of ticks minus 1. For example, an axis with 6 ticks at [0, 2, 4, 6, 8, 10] has 6 contour lines and 5 contour intervals.

The main usage of this method is to limit the number of contour lines and/or color steps on the contour layer.

If this method is never called, the default maximum number of contour intervals is 16.

Arguments:
ArgumentDefaultDescription
maxLevels(Mandatory)An integer representing the maximum number of contour intervals.

CDColorAxisMBS.setRoundedCorners(r1 as Integer = 10, r2 as Integer = -1, r3 as Integer = -1, r4 as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the border style of the bounding box to rounded corners.

Arguments:
ArgumentDefaultDescription
r110The radius of the top-left rounded corner in pixels.
r2-1The radius of the top-right rounded corner in pixels. -1 means it is the same as the radius of the top-left corner.
r3-1The radius of the bottom-right rounded corner in pixels. -1 means it is the same as the radius of the top-left corner.
r4-1The radius of the bottom-left rounded corner in pixels. -1 means it is the same as the radius of the top-left corner.

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


The biggest plugin in space...