Platforms to show: All Mac Windows Linux Cross-Platform
Back to CDBaseMeterMBS class.
CDBaseMeterMBS.setLabelFormat(mainLabelFormat as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The method is mainly used when BaseMeter.setScale is used, in which case the label values are not directly specified but are computed by ChartDirector. For example, a format string of "{value|2}" will format the values with 2 decimal places.
Please refer to Parameter Substitution and Formatting on all available format parameters.
| Argument | Default | Description |
|---|---|---|
| formatString | (Mandatory) | The format string. |
CDBaseMeterMBS.setLabelPos(labelInside as boolean, labelOffset as Integer = 0)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Argument | Default | Description |
|---|---|---|
| labelInside | (Mandatory) | A true value means that the labels are on the 'inward' side of the meter scale. A false value means the labels are on the 'outward' side of the meter scale. For an angular meter, the default is for the labels on the 'inward' side. For a linear meter, the default is for the labels on the 'outward' side. |
| labelOffset | 0 | The offset, in pixels, of the labels position relative to the standard position. If the major tick is at the same side as the label, the standard starting position of the label is at the end point of the major tick. Otherwise, the standard starting position is on the meter scale. |
A positive labelOffset means the labels should move more towards the 'inward' or 'outward' side, depending on the first parameter. A negative labelOffset means moving the labels towards the opposite direction.
CDBaseMeterMBS.setLabelStyle(font as string = "", fontsize as Double = -1, fontcolor as Integer = &hffff0002, fontAngle as Double = 0) 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.
| Argument | Default | Description |
|---|---|---|
| font | "bold" | The font used to draw the labels. |
| fontSize | -1 | The font size used to draw the labels in points. A value of -1 means the font size is not changed. The default font size is 10 points for angular meters, and 8 points for linear meters. |
| fontColor | TextColor | The color used to draw the labels. |
| fontAngle | 0 | The rotation angle of the labels. |
A TextBox object representing the prototype of the obj. This may be used to fine-tune the appearance of the obj.
See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml
See also:
CDBaseMeterMBS.setLabelStyle(font as string, fontsize as Double, fontcolor as color, fontAngle as Double = 0) 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:
CDBaseMeterMBS.setLineWidth(axisWidth as Integer, majorTickWidth as Integer = 1, minorTickWidth as Integer = 1, microTickWidth as Integer = 1)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Argument | Default | Description |
|---|---|---|
| axisWidth | (Mandatory) | The line width for drawing the meter scale line in pixels. For an angular meter, the default is 1 pixel. For a linear meter, the default is 2 pixels. |
| majorTickWidth | 1 | The line width of the major ticks in pixels. For a linear meter, if this method is not called, the initial major tick width is set to 2 pixels. |
| minorTickWidth | 1 | The line width of the minor ticks in pixels. |
| microTickWidth | 1 | The line width of the micro ticks in pixels. |
CDBaseMeterMBS.setMeterColors(axisColor as color, labelColor as color, tickColor as color)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDBaseMeterMBS.setMeterColors(axisColor as Integer, labelColor as Integer = -1, tickColor as Integer = -1)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Argument | Default | Description |
|---|---|---|
| axisColor | (Mandatory) | The color for drawing the meter scale line. The default is LineColor. |
| labelColor | -1 | The color for drawing the scale labels. Passing -1 in this argument means the label color is not changed. The default label color is TextColor. |
| tickColor | -1 | The color for drawing the ticks. Passing -1 in this argument means the tick color is not changed. The default tick color is LineColor. |
See also:
CDBaseMeterMBS.setScale(lowerLimit as Double, upperLimit as Double, labels() as Double, formatstring as string = "")
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
ChartDirector will distribute the labels evenly on the scale. By default, all labels are associated with major ticks. If you want certain positions to show a minor or micro ticks only, use MinorTickOnly or MicroTickOnly as the label values for those positions.
| Argument | Default | Description |
|---|---|---|
| lowerLimit | (Mandatory) | The lower limit of the meter scale. |
| upperLimit | (Mandatory) | The upper limit of the meter scale. |
| labels | (Mandatory) | An array of numbers to be used as the labels on the meter scale. |
| formatString | "" | The format string for formatting the numbers. An empty string means the format will be automatically determined. |
See also:
CDBaseMeterMBS.setScale(lowerLimit as Double, upperLimit as Double, labels() as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
ChartDirector will distribute the labels evenly on the scale. By default, all labels are associated with major ticks. These can be modified by using '-', '~' or ':' as the first character. Please refer to BaseMeter.addLabel for details.
| Argument | Default | Description |
|---|---|---|
| lowerLimit | (Mandatory) | The lower limit of the meter scale. |
| upperLimit | (Mandatory) | The upper limit of the meter scale. |
| labels | (Mandatory) | An array of text strings to be used as the labels on the meter scale. |
See also:
CDBaseMeterMBS.setScale(lowerLimit as Double, upperLimit as Double, majorTickInc as Double = 0, minorTickInc as Double = 0, microTickInc as Double = 0)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Argument | Default | Description |
|---|---|---|
| lowerLimit | (Mandatory) | The lower limit of the meter scale. |
| upperLimit | (Mandatory) | The upper limit of the meter scale. |
| majorTickInc | 0 | The interval between major ticks. For example, a value of 10 means a major tick every 10 units in the meter scale. Each major tick will have an associated label for the value at the tick. A value of 0 disables major ticks. |
| minorTickInc | 0 | The interval between minor ticks. For example, a value of 5 means a minor tick every 5 units in the meter scale. A value of 0 disables minor ticks. |
| microTickInc | 0 | The interval between minor ticks. For example, a value of 1 means a minor tick every 1 units in the meter scale. A value of 0 disables micro ticks. |
See also:
CDBaseMeterMBS.setTickLength(majorLen as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Argument | Default | Description |
|---|---|---|
| majorLen | (Mandatory) | The length of the major ticks in pixels. A positive value means the tick is at the 'outward' direction of the meter. A negative value means the tick is at the 'inward' direction. |
For an angular meter, the default is -10 (10 pixels at the inward direction). For a horizontal linear meter, the default is the same height as the meter scale region in the inward direction. For a vertical linear meter, the default is the same width as the meter scale region in the inward direction.
| minorLen | -7fffffff | The length of the minor ticks in pixels. The default is 60% of the length of the major ticks. |
| microLen | -7fffffff | The length of the micro ticks in pixels. The default is 50% of the length of the minor ticks. |
See also:
CDBaseMeterMBS.setTickLength(majorLen as Integer, minorLen as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Argument | Default | Description |
|---|---|---|
| majorLen | (Mandatory) | The length of the major ticks in pixels. A positive value means the tick is at the 'outward' direction of the meter. A negative value means the tick is at the 'inward' direction. |
For an angular meter, the default is -10 (10 pixels at the inward direction). For a horizontal linear meter, the default is the same height as the meter scale region in the inward direction. For a vertical linear meter, the default is the same width as the meter scale region in the inward direction.
| minorLen | -7fffffff | The length of the minor ticks in pixels. The default is 60% of the length of the major ticks. |
| microLen | -7fffffff | The length of the micro ticks in pixels. The default is 50% of the length of the minor ticks. |
See also:
CDBaseMeterMBS.setTickLength(majorLen as Integer, minorLen as Integer, microLen as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Argument | Default | Description |
|---|---|---|
| majorLen | (Mandatory) | The length of the major ticks in pixels. A positive value means the tick is at the 'outward' direction of the meter. A negative value means the tick is at the 'inward' direction. |
For an angular meter, the default is -10 (10 pixels at the inward direction). For a horizontal linear meter, the default is the same height as the meter scale region in the inward direction. For a vertical linear meter, the default is the same width as the meter scale region in the inward direction.
| minorLen | -7fffffff | The length of the minor ticks in pixels. The default is 60% of the length of the major ticks. |
| microLen | -7fffffff | The length of the micro ticks in pixels. The default is 50% of the length of the minor ticks. |
See also:
The items on this page are in the following plugins: MBS ChartDirector Plugin.