Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDAxisMBS class.

Previous items

CDAxisMBS.setTickWidth(majorTickWidth as Integer, minorTickWidth as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the width of the axis ticks.

ParameterDefaultDescription
majorTickWidth(Mandatory)The width of the major ticks in pixels.
minorTickWidth-1The width of the minor ticks in pixels. -1 means the width is the same as majorTickWidth.

CDAxisMBS.setTitle(text as string, font as string = "", fontsize as Double = 8, fontcolor as Integer = &hffff0002) as CDTextBoxMBS

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

See Font Specification for details on various font attributes.

ParameterDefaultDescription
text(Mandatory)The title text.
font""The font used to draw the title. If no font is specified, the default is "bold".
fontSize8The size of the font in points.
fontColorTextColorThe color used to draw the title text.

Return Value
A TextBox object representing the axis title. This may be used to fine-tune the appearance of the axis title.

See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml

See also:

CDAxisMBS.setTitle(text as string, font as string, fontsize as Double, fontcolor as color) as CDTextBoxMBS

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

See also:

CDAxisMBS.setTitlePos(alignment as Integer, titleGap as Integer = 3)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the position of the axis title relative to the axis.

By default, the axis title will be drawn at the middle of the axis outside the plot area. You may change the location of the title. For example, instead of drawing the y-axis title at the middle of the axis, you may want draw it at the top of the axis.

ParameterDefaultDescription
alignment(Mandatory)The position of the title relative to the axis.
titleGap3The distance between the axis title and the axis in pixels.

CDAxisMBS.setWidth(width as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the line width of the axis.

ParameterDefaultDescription
width(Mandatory)The line width of the axis in pixels.

CDAxisMBS.syncAxis(axis as CDAxisMBS, slope as Double = 1.0, intercept as Double = 0.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Synchronizes this axis with another axis using a linear formula.

This method is typically used if the two axes represent the same quantity but in different units. For example, one axis may represent temperature in Celsius, and the other in Fahrenheit, or they may represent lengths in meters and feet.

The scale of this axis (value) will be related to the scale of the another axis (value2) using the following formula:

value = value2 * slope + intercept

Typically, one of the axis will be for actual charting, and its scale will be determined in the standard way using auto or manual scaling. Then the second axis is set to synchronize with the first axis.

ParameterDefaultDescription
axis(Mandatory)The axis to synchronize to.
slope1The slope for synchronizing this axis to the other axis.
intercept0The intercept parameter for synchronizing this axis to the other axis.

CDAxisMBS.syncScale(axis as CDAxisMBS = nil, slope as double = 1.0, intercept as double = 0.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Synchronizes the scale of this axis with another axis using a linear formula.

The scale of this axis (value) will be related to the scale of the source axis (value2) using the following formula:

value = value2 * slope + intercept

The differences between syncScale and Axis.syncAxis are:

  • Axis.syncAxis assumes the two axes are of the same length. In addition to the scale, it will also synchronize the ticks and labels, and configurations that may affect the positions of ticks and labels, such as axis margins and axis indentation. This ensures the two axes scale align properly.
  • syncScale does not assume the two axes are of the same length. For example, the y-axis of one chart can be synchronized with the CDColorAxisMBS of a different chart. The two axes can have different labels to fit their different lengths.

ArgumentDefaultDescription
axis(Mandatory)The axis to synchronize to. A value of null means not to synchronize to any axis.
slope1The slope for synchronizing this axis to the other axis.
intercept0The intercept parameter for synchronizing this axis to the other axis.

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