Platforms to show: All Mac Windows Linux Cross-Platform
Back to CDAxisMBS class.
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 |
Parameter | Default | Description |
majorTickWidth | (Mandatory) | The width of the major ticks in pixels. |
minorTickWidth | -1 | The 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 |
See Font Specification for details on various font attributes.
Parameter | Default | Description |
text | (Mandatory) | The title text. |
font | "" | The font used to draw the title. If no font is specified, the default is "bold". |
fontSize | 8 | The size of the font in points. |
fontColor | TextColor | The 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 |
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 |
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.
Parameter | Default | Description |
alignment | (Mandatory) | The position of the title relative to the axis. |
titleGap | 3 | The 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 |
Parameter | Default | Description |
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 |
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.
Parameter | Default | Description |
axis | (Mandatory) | The axis to synchronize to. |
slope | 1 | The slope for synchronizing this axis to the other axis. |
intercept | 0 | The 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 |
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.
Argument | Default | Description |
axis | (Mandatory) | The axis to synchronize to. A value of null means not to synchronize to any axis. |
slope | 1 | The slope for synchronizing this axis to the other axis. |
intercept | 0 | The intercept parameter for synchronizing this axis to the other axis. |
The items on this page are in the following plugins: MBS ChartDirector Plugin.