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 |
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 |
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 |
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:
Argument | Default | Description |
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 |
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 |
Argument | Default | Description |
edgeColor | (Mandatory) | The edge color of the axis stem. |
raisedEffect | 0 | The 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 |
Argument | Default | Description |
edgeColor | (Mandatory) | The edge color of the axis stem. |
raisedEffect | 0 | The 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 |
CDColorAxisMBS.setBoundingBox(fillColor as color, 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 |
See also:
- setBoundingBox(fillColor as Integer, edgeColor as Integer = &hff000000, raisedEffect as Integer = 0)
Some examples using this method:
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 |
Arguments:
Argument | Default | Description |
fillColor | (Mandatory) | The background color of the bounding box. |
edgeColor | kTransparent | The border color of the bounding box. |
raisedEffect | 0 | The 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 |
The margins of a bounding box refer to the distances between the borders of the bounding box to the color axis inside.
Arguments:
Argument | Default | Description |
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 |
The margins of a bounding box refer to the distances between the borders of the bounding box to the color axis inside.
Arguments:
Argument | Default | Description |
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 |
Arguments:
Argument | Default | Description |
isContinuous | true | True 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. |
overflowColor | -1 | The 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 | -1 | The 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:
- setColorGradient(isContinuous as boolean, Colors() as color, underflowColor as Integer, overflowColor as Integer = -1)
- setColorGradient(isContinuous as boolean, Colors() as Integer, underflowColor as Integer = -1, overflowColor as Integer = -1)
- setColorGradient(isContinuous as boolean=true)
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 |
Arguments:
Argument | Default | Description |
isContinuous | true | True 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. |
overflowColor | -1 | The 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 | -1 | The 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 |
Arguments:
Argument | Default | Description |
isContinuous | true | True 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. |
overflowColor | -1 | The 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 | -1 | The 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 |
Arguments:
Argument | Default | Description |
isContinuous | true | True 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. |
overflowColor | -1 | The 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 | -1 | The 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:
- setColorGradient(isContinuous as boolean, Colors() as color, underflowColor as color, overflowColor as color)
- setColorGradient(isContinuous as boolean, Colors() as color, underflowColor as Integer, overflowColor as Integer = -1)
- setColorGradient(isContinuous as boolean, Colors() as Integer, underflowColor as Integer = -1, overflowColor as Integer = -1)
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 |
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
Argument | Default | Description |
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 | -1 | The 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 | -1 | The 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 |
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:
Argument | Default | Description |
b | true | A 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 |
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:
Argument | Default | Description |
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 |
Arguments:
Argument | Default | Description |
r1 | 10 | The radius of the top-left rounded corner in pixels. |
r2 | -1 | The radius of the top-right rounded corner in pixels. -1 means it is the same as the radius of the top-left corner. |
r3 | -1 | The radius of the bottom-right rounded corner in pixels. -1 means it is the same as the radius of the top-left corner. |
r4 | -1 | The 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.