Platforms to show: All Mac Windows Linux Cross-Platform
Back to CDAxisMBS class.
CDAxisMBS.getAlignment as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is only applicable to XYChart objects.
Some examples using this method:
CDAxisMBS.getAxisImageMap(noOfSegments as Integer, mapWidth as Integer, url as string, queryFormat as string = "", extraAttr as string = "", offsetX as Integer = 0, offsetY as Integer = 0) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is similar to Axis.getHTMLImageMap. The difference is instead of generating an image map for the labels, it generates an image map for the axis itself. The axis will be divided into a number of segments, with an image map entry created for each segment.
| Parameter | Default | Description |
|---|---|---|
| noOfSegments | (Mandatory) | The number of segments to divide the axis into. |
| mapWidth | (Mandatory) | The width of the axis used for the purpose of generating the image map. |
| url | (Mandatory) | The URL to be used in the "href" attribute of the image map. Parameter Substitution and Formatting is supported. Use an empty string if no href attribute is needed. |
| queryFormat | "" | A text string representing the template of the query parameters to be appended to the URL. Parameter Substitution and Formatting is supported.The special keyword "{default}" represents the default query parameters. This is useful for specifying appending to the default. Note that an empty string means to use the default query query parameters. To specify no query parameter, use a space character. |
| extraAttr | "" | A text string to specify additional attributes to add to the <area> tag. Parameter Substitution and Formatting is supported. |
| offsetX | 0 | An offset to be added to all x coordinates in the image map. This is useful if the current image will be shifted and inserted into another image. In this case, the image map will need to be shifted by the same offset. |
| offsetY | 0 | An offset to be added to all y coordinates in the image map. See offsetX above for description. |
CDAxisMBS.getCoor(value as Double) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDAxisMBS.getFormattedLabel(v as Double, options as string = "") as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Argument | Default | Description |
|---|---|---|
| v | (Mandatory) | The position specified as a value on the axis scale. |
| formatString | "" | The format string used to format a label if necessary. Please refer to Axis.setLabelFormat for the syntax of the format string. An empty string means the format will be automatically determined. |
Some examples using this method:
CDAxisMBS.getHTMLImageMap(url as string, queryFormat as string = "", extraAttr as string = "", offsetX as Integer = 0, offsetY as Integer = 0) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method should be called only after creating the chart image (eg. using BaseChart.makeChart). The image map cannot be determined without creating the chart image first.
This method accepts a URL as its argument. When generating an image map, it appends query parameters to the URL to indicate which legend entry the user has clicked.
The following is an example image map generated for an axis with 3 labels.
<area shape="rect" coords="30,220,70,239" href="handler.asp?value=0&label=John">
<area shape="rect" coords="70,220,110,239" href="handler.asp?value=1&label=Mary">
<area shape="rect" coords="110,220,150,239" href="handler.asp?value=2&label=Peter">
The image map consists of multiple <area> tags, one for each label. In the "href" attributes, query parameters are appended to the URL to provide information on the label clicked.
The image map produces by ChartDirector does not include the <map> and </map> tag. This is intentional so that you can add additional custom <area> tags to the image map, or append multiple image maps together.
The format of the appended URL parameters is determined using the
queryFormat argument, which by default is:
value={value}&label={label}
The texts in curly brackets (i.e. {value}, {label}) will be replaced by the actual values when generating the image map. For example, {label} will be replaced by the label text.
Please refer to Parameter Substitution and Formatting on all available parameters and how to format them.
In addition to customizing the query parameters, ChartDirector supports additional HTML attributes in the <area> tags using the extraAttr argument.
For example, the following extraAttr will add a "title" HTML attribute to every <area> tag. The "title" attribute will be displayed as "tool tip" when the mouse moves over the image map.
title='Click me for details on {label}'
Another common usage of the extraAttr argument is to add "onmouseover" and "onmouseout" HTML attributes to handle user interaction using Javascript on the browser.
| Parameter | Default | Description |
|---|---|---|
| url | (Mandatory) | The URL to be used in the "href" attribute of the image map. |
| queryFormat | "" | A text string representing the template of the query parameters to be appended to the URL. Parameter Substitution and Formatting is supported. The special keyword "{default}" represents the default query parameters. This is useful for specifying appending to the default. Note that an empty string means to use the default query query parameters. To specify no query parameter, use a space character. |
| extraAttr | "" | A text string to specify additional attributes to add to the <area> tag. Parameter Substitution and Formatting is supported. |
| offsetX | 0 | An offset to be added to all x coordinates in the image map. This is useful if the current image will be shifted and inserted into another image. In this case, the image map will need to be shifted by the same offset. |
| offsetY | 0 | An offset to be added to all y coordinates in the image map. See offsetX above for description. |
CDAxisMBS.getLabel(i as Double) as string
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Parameter | Default | Description |
|---|---|---|
| i | (Mandatory) | The position specified as a value on the axis scale. |
Return Value
Returns the label at the specified position, or a "" string if there is no label at that position.
CDAxisMBS.getLabelTable as CDMLTableMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDAxisMBS.getMaxValue as Double
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The upper bound of an axis is known only after auto-scaling. So this method should be called only after ChartDirector has finished auto-scaling (e.g. after calling BaseChart.layout to explicitly auto-scale the axis).
CDAxisMBS.getMinValue as Double
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The lower bound of an axis is known only after auto-scaling. So this method should be called only after ChartDirector has finished auto-scaling (e.g. after calling BaseChart.layout to explicitly auto-scale the axis).
CDAxisMBS.getThickness as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The axis can be considered as a line, with one side facing the internal of the plot area, and the other side not facing the plot area. By default, the latter side includes the axis labels and axis title (although ChartDirector allows the axis to be configured so that the labels and titles are internal to the plot area).
The thickness of an axis only refers to the thickness of the side not facing the plot area. For a vertical axis, it is the width of the bounding box of that side, including the axis ticks, labels and title if they are on that side. For a horizontal axis, it is the height of the bounding box.
The intention of this method is to allow the chart to be adjusted to leave enough space for the axis labels and title.
This method should be called only after axis layout (after calling CDXYChartMBS.layoutAxes, CDBaseChartMBS.layout or CDXYChartMBS.packPlotArea).
Arguments:
None
Return Value
The thickness of the axis in pixels.
CDAxisMBS.getTicks as CDArrayMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Return Value
An array of numbers representing the values of the ticks.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
For an XYChart object, the starting point of a horizontal axis is its left end point, and the starting point of a vertical axis is its bottom end point. For a PolarChart object, the starting point of a radial axis is the origin. For other types of charts, the starting point of an axis is undefined.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
For an XYChart object, the starting point of a horizontal axis is its left end point, and the starting point of a vertical axis is its bottom end point. For a PolarChart object, the starting point of a radial axis is the origin. For other types of charts, the starting point of an axis is undefined.
The items on this page are in the following plugins: MBS ChartDirector Plugin.