Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDAxisMBS class.

CDAxisMBS.addLabel(pos as Double, label as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds an extra label on the axis.

ParameterDefaultDescription
pos(Mandatory)The position on the axis to add the label.
label(Mandatory)The text label to add.

CDAxisMBS.addMark(value as Double, lineColor as color, text as string = "", font as string = "", fontsize as Double = 8) as CDMarkMBS

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

See also:

CDAxisMBS.addMark(value as Double, lineColor as Integer, text as string = "", font as string = "", fontsize as Double = 8) as CDMarkMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a mark line to the chart.

A mark line is a line drawn on the plot area. This line is usually used to indicate some special values, such as a "target value", "threshold value", "target date", etc.

A mark line attached to the horizontal axis will be vertical across the plot area. A mark line drawn using the vertical axis will be horizontal across the plot area. In either case, the mark line label will be added to the axis at the mark line position.

The location of the mark line label can be changed by using
TextBox.setAlignment. For example, by setting the alignment to TopCenter, the mark line label will be drawn on the top center of the mark line.

By default, the mark line is drawn at the front of the chart layers. You may change it to draw at the back of the plot area (that is, like grid lines) using
Mark.setDrawOnTop.

ParameterDefaultDescription
value(Mandatory)The value on the axis to draw the mark line.
lineColor(Mandatory)The color of the mark line.
text""The text label for the mark line. An empty string means there is no text label. By default, the text label and the tick on the axis will be drawn using the same color as the mark line. You can modify the colors by using the Mark.setMarkColor method.
font""The font used to draw the text label.
fontSize8The font size used to draw the text label in points.

See also:

CDAxisMBS.addZone(startValue as Double, endValue as Double, colorvalue as color)

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

See also:

CDAxisMBS.addZone(startValue as Double, endValue as Double, colorvalue as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a zone to the chart.

A zone is a range of values. For example, "10 to 20" is a zone. Typically, a zones are used to classify data ranges. For example, you may classify 0 - 60 as the normal zone, 60 - 90 as the warning zone, and 90 - 100 as the critical zone.

A zone based on a horizontal axis will be drawn as a vertical band. A zone based on a vertical axis will be drawn as a horizontal band. Zones are always drawn at the back of the plot area.

ParameterDefaultDescription
startValue(Mandatory)The start value (the lower bound) for the zone.
endValue(Mandatory)The end value (the upper bound) for the zone.
color(Mandatory)The color of the zone.

See also:

CDAxisMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The private constructor.

CDAxisMBS.copyAxis(axis as CDAxisMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Copies the scale and labels from another axis.

This method is typically used to ensure the axes on different charts are identical. For example, if multiple charts are draw and are stacked up, and you want the x-axes of the charts to be the same for easy comparison, you may copy the x-axis from one chart to the other charts.

The differences between copyAxis and Axis.syncAxis are:

Axis.syncAxis relates the axes with a linear relationship, so the axes may not be exact copies of one another.

Axis.syncAxis synchronizes axis scale and copies only scale related labels, such as the labels generated by auto-scaling, Axis.setLinearScale, Axis.setLogScale or Axis.setDateScale.

copyAxis copies all labels, including labels created using
Axis.setLabels, which may be arbitrary text.

ParameterDefaultDescription
axis(Mandatory)The axis to copy from.

CDAxisMBS.makeLabelTable as CDMLTableMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a CDML table and docks it to the axis, with one row (for horizontal axis) or column (for vertical axis) containing the axis labels.

Before calling this method, it is necessarily to set the labels on the axis first using CDAxisMBS.setLabels. You should only use this method on a label based axis with no label stepping.

This method will automatically indent the axis (see CDAxisMBS.setIndent), and set the tick offset to 0.5 (see CDAxisMBS.setTickOffset). This is to ensure the plot area grid lines align with the table grid lines (instead of align with the labels).

You may use the returned CDMLTableMBS object to insert additional rows and/or columns to the table. A common application of this method is to insert the data values to the table, so the chart will have a data table docked to the axis, aligned with the chart contents.

Arguments:
None

Return Value
A CDMLTable object containing the axis labels.

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


The biggest plugin in space...