Platforms to show: All Mac Windows Linux Cross-Platform
Back to CDLayerMBS class.
CDLayerMBS.addCustomAggregateLabel(dataItem as Integer, label as string, font as string = "", fontSize as Double = 8, 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 |
Aggregate data labels applies to layer types that contains "aggregated data", such as stacked bar layer and stacked area layer. In these layer types, data labels (see Layer.setDataLabelStyle) represents a single data item, while aggregate labels represents the stacked object.
See Font Specification for details on various font attributes.
Argument | Default | Description |
dataItem | (Mandatory) | The index of the aggregated object. The first aggregated object is 0, while the nth aggregated object is (n - 1). |
label | (Mandatory) | A text string representing the custom aggregate label. Parameter Substitution and Formatting is supported. |
font | "" | The font used to draw the labels. |
fontSize | 8 | The font size used to draw the labels. |
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:
CDLayerMBS.addCustomAggregateLabel(dataItem as Integer, label as string, 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:
CDLayerMBS.addCustomDataLabel(dataSet as Integer, dataItem as Integer, label as string, font as string = "", fontSize as Double = 8, 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 |
Data labels are text used label data points in the layer. Please refer to Layer.setDataLabelStyle for a more detail description.
See Font Specification for details on various font attributes.
Argument | Default | Description |
dataSet | (Mandatory) | The data set number for the data point. The first data set is 0, while the nth data set is (n - 1). |
dataItem | (Mandatory) | The data point number for the data point within the data set. The first data point is 0, while the nth data point is (n - 1). |
label | (Mandatory) | A text string representing the data label. Parameter Substitution and Formatting is supported. |
font | "" | The font used to draw the label. |
fontSize | 8 | The font size used to draw the label. |
fontColor | TextColor | The color used to draw the label. |
fontAngle | 0 | The rotation angle of the label. |
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:
CDLayerMBS.addCustomDataLabel(dataSet as Integer, dataItem as Integer, label as string, 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:
CDLayerMBS.addCustomGroupLabel(dataGroup as Integer, dataItem as Integer, label as string, font as string ="", fontSize as Double = 8, 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 |
Data group label applies to layer types that may represent data groups. See Layer.addDataGroup on how data groups are created and the layer types that support data groups.
See Font Specification for details on various font attributes.
Argument | Default | Description |
dataGroup | (Mandatory) | The data group number for the data point. The first data group is 0, while the nth data group is (n - 1). |
dataItem | (Mandatory) | The data point number for the data point within the data group. The first data point is 0, while the nth data point is (n - 1). |
label | (Mandatory) | A text string representing the data label. Parameter Substitution and Formatting is supported. |
font | "" | The font used to draw the label. |
fontSize | 8 | The font size used to draw the label. |
fontColor | TextColor | The color used to draw the label. |
fontAngle | 0 | The rotation angle of the label. |
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:
CDLayerMBS.addCustomGroupLabel(dataGroup as Integer, dataItem as Integer, label as string, 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:
CDLayerMBS.addDataGroup(name as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Currently, only stacked bar layers support data groups for creating "multi-stacked" bars.
In a normal stacked bar layer, all data sets are stacked on top of one another, creating one stacked bar per x-axis position. If data grouping is used, data sets within the same data group with be stacked up. So there may be multiple stacked bars in each x-axis position. These stacked bars are drawn side by side.
When you add a data set using Layer.addDataSet, the data set will belong to the current data group. The addDataGroup method can be used to open a new data group, so that subsequent data sets will belong to that new group.
You may associate a name with a data group. The name can then be used in data labels or image maps to identify the data group.
Argument | Default | Description |
name | "" | Name of the data group. |
CDLayerMBS.addDataSet(data as CDArrayMBS, colorvalue as color, name as string = "") as CDDataSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
- addDataSet(data as CDArrayMBS, colorvalue as Integer = -1, name as string = "") as CDDataSetMBS
- addDataSet(data() as Double, colorvalue as color, name as string = "") as CDDataSetMBS
- addDataSet(data() as Double, colorvalue as Integer = -1, name as string = "") as CDDataSetMBS
Some examples using this method:
- /ChartDirector/RealTime ViewPort
- /ChartDirector/Track Line Web
- /ChartDirector/Track Line with Data Labels Retina
- /ChartDirector/Track Line with Legend Retina
- /ChartDirector/Tracking Cursor/Track Line Web
- /ChartDirector/Tracking Cursor/Track Line with Axis Labels
- /ChartDirector/Tracking Cursor/Track Line with Data Labels
- /ChartDirector/Tracking Cursor/Track Line with Data Labels Retina
- /ChartDirector/Tracking Cursor/Track Line with Legend
- /ChartDirector/Tracking Cursor/Track Line with Legend Retina
CDLayerMBS.addDataSet(data as CDArrayMBS, colorvalue as Integer = -1, name as string = "") as CDDataSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
data | (Mandatory) | An array of numbers representing the data set. |
color | -1 | The color to draw the data item. -1 means that the color is automatically selected from the palette. |
name | "" | The name of the data set. The name will be used in the legend box, if one is available. An empty string means the data set has no name. |
A DataSet object representing the data set added. You may use the methods of this object to fine-tune how the data set is drawn on the chart.
See also:
CDLayerMBS.addDataSet(data() as Double, colorvalue as color, name as string = "") as CDDataSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDLayerMBS.addDataSet(data() as Double, colorvalue as Integer = -1, name as string = "") as CDDataSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
data | (Mandatory) | An array of numbers representing the data set. |
color | -1 | The color to draw the data item. -1 means that the color is automatically selected from the palette. |
name | "" | The name of the data set. The name will be used in the legend box, if one is available. An empty string means the data set has no name. |
A DataSet object representing the data set added. You may use the methods of this object to fine-tune how the data set is drawn on the chart.
See also:
CDLayerMBS.addExtraField(numbers() as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method merely stores the data inside the layer object. The Parameter Substitution and Formatting mechanism will determine how the data are to be used.
A common use for extra fields is to specify extra information (such as a custom serial number for the data points) to be displayed on data labels or on tool tips, or to supply extra query parameters in clickable charts. All these are achieved by specifying the extra field on the data label template or image map templates during parameter substitution.
Argument | Default | Description |
numbers | (Mandatory) | An array of numbers/dates to be stored inside the layer object. |
See also:
CDLayerMBS.addExtraField(texts() 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 merely stores the data inside the layer object. The Parameter Substitution and Formatting mechanism will determine how the data are to be used.
A common use for extra fields is to specify extra information (such as a custom serial number for the data points) to be displayed on data labels or on tool tips, or to supply extra query parameters in clickable charts. All these are achieved by specifying the extra field on the data label template or image map templates during parameter substitution.
Argument | Default | Description |
texts | (Mandatory) | An array of text to be stored inside the layer object. |
See also:
CDLayerMBS.alignLayer(layer as CDLayerMBS, dataSet as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The Side layout is a layout method specific to the bar chart layer. In this layout method, multiple bars belonging to the same x-position are laid out side by side. Thus the bars are not centered exactly on the x-position, but are shifted. The shift amount depends on the data set numbers of the bars.
In some cases, it may be necessary to overlay another layer (eg. a line chart layer, or a box-whisker chart layer) on top of the bars. The alignLayer method ensures the data points are shifted by the same amount as a given data set on a given BarLayer.
Argument | Default | Description |
layer | (Mandatory) | The BarLayer which contains the bars to synchronize with. |
dataSet | (Mandatory) | The data set of the bars to synchronize with. |
CDLayerMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 15.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDLayerMBS.getDataSet(dataSet as Integer) as CDDataSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
dataSet | (Mandatory) | A data set number, starting from 0. The first data set object is 0, and the nth data set is (n-1). |
The requested DataSet object.
Some examples using this method:
CDLayerMBS.getDataSetByZ(z as Integer) as CDDataSetMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
In certain layer types, the data sets are drawn in a certain order. For example, in a line layer, the data sets represent lines and they are drawn one by one. In contrast, for a candlestick layer, the high, low, open and close data sets are combined into candlestick symbols, and there is no specific order on which data sets are drawn.
This method can be used to get the data set based on the order it is being drawn. If the data sets are not drawn in any specific order, this method will return the data sets in the reverse order to which it is added to the layer.
Argument | Default | Description |
zIndex | (Mandatory) | The z-index of the required data set. The z-index of the first data set drawn is 0. The z-index for the Nth data set drawn is N - 1. |
Returns the DataSet object at the specified z-order.
Some examples using this method:
- /ChartDirector/Finance Chart Track Line Retina
- /ChartDirector/RealTime ViewPort
- /ChartDirector/Track Line with Data Labels Retina
- /ChartDirector/Track Line with Legend Retina
- /ChartDirector/Tracking Cursor/Track Box with Legend
- /ChartDirector/Tracking Cursor/Track Line Web
- /ChartDirector/Tracking Cursor/Track Line with Axis Labels
- /ChartDirector/Tracking Cursor/Track Line with Data Labels Retina
- /ChartDirector/Tracking Cursor/Track Line with Legend
- /ChartDirector/Tracking Cursor/Track Line with Legend Retina
CDLayerMBS.getDataSetCount as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns the number of data sets in the layer.
Some examples using this method:
- /ChartDirector/Finance Chart Track Line Retina
- /ChartDirector/RealTime ViewPort
- /ChartDirector/Track Line Web
- /ChartDirector/Track Line with Data Labels Retina
- /ChartDirector/Track Line with Legend Retina
- /ChartDirector/Tracking Cursor/Finance Chart Track Line
- /ChartDirector/Tracking Cursor/Track Box with Legend
- /ChartDirector/Tracking Cursor/Track Line Web
- /ChartDirector/Tracking Cursor/Track Line with Axis Labels
- /ChartDirector/Tracking Cursor/Track Line with Legend Retina
CDLayerMBS.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 |
Please refer to BaseChart.getHTMLImageMap for the detail description of this method.
This method should be called only after creating the chart image (eg. using BaseChart.makeChart, BaseChart.makeChart2 or BaseChart.makeChart3). The image map cannot be determined without creating the chart image first.
Argument | Default | Description |
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. |
A text string containing the image map generated.
CDLayerMBS.getImageCoor(dataSet as Integer, dataItem as Integer = &h80000001, 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 |
The image map coordinates will be in the following format:
shape="[shape]" cords="[x1],[y1],[x2],[y2] ..."
This format is specially designed so that it can easily be incorporated into HTML image maps.
This method should be called only after creating the chart image (eg. using BaseChart.makeChart, BaseChart.makeChart2 or BaseChart.makeChart3). The image map cannot be determined without creating the chart image first.
Argument | Default | Description |
dataSet | (Mandatory) | The data set number for the data point. The first data set is 0, while the nth data set is (n-1). |
dataItem | (Mandatory) | The index of the data point within the data set. The first data point is 0, while the nth data point is (n-1). |
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. |
A text string representing the coordinates of the data point as represented in the layer in HTML image map attribute format.
CDLayerMBS.getImageCoor2(dataItem as Integer, 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 |
For example, in a stacked bar chart, this method will obtain the image map coordinates of the whole stacked bar, which contains multiple data points at the same x-position.
The image map coordinates will be in the following format:
shape="" cords="[x1],[y1],[x2],[y2] ..."
This format is specially designed so that it can easily be included into HTML image maps.
This method should be called only after creating the chart image (eg. using BaseChart.makeChart, BaseChart.makeChart2 or BaseChart.makeChart3). The image map cannot be determined without creating the chart image first.
Argument | Default | Description |
dataItem | (Mandatory) | The x-position of the data points. |
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. |
A text string representing the image map coordinates of a region containing all data points at the given x-position as HTML image map attributes.
CDLayerMBS.getLegendIcon(dataSetNo as Integer) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The textual representation can be used in any ChartDirector API that supports the ChartDirector Mark Up Language. A common usage is to insert the icon to a cell in a CDMLTable to label the data series in the table, or to create a custom legend table.
The legend icon is the same legend icon that would be used in the CDLegendBoxMBS. If you modify the icon appearance using the methods of the CDLegendBoxMBS object (such as using CDLegendBoxMBS.setKeyBorder to configure the legend key border), the modification will also apply to the icon returned this method.
Arguments:
Argument | Default | Description |
dataSetNo | (Mandatory) | The data set for which the legend icon represents. |
Return Value
The textual representation of the legend icon for the data set.
CDLayerMBS.getNearestXValue(target as Double) as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method will search all x data values in the Layer to look for the x data value that is nearest to the given x coordinate. If there are two x data values equally near to the specified x pixel coordinate, this method will arbitrarily return one of the values.
Argument | Default | Description |
xCoor | (Mandatory) | The x pixel coordinate to search for. |
Returns the x data value that is nearest to the specified x coordinate.
CDLayerMBS.getXCoor(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 |
Note: You must call BaseChart.layout first before calling this method. It is because ChartDirector needs to perform auto-scaling and determine the axis scale first before it can compute the coordinates.
Argument | Default | Description |
v | (Mandatory) | The x data value. |
The x coordinate of the x data value.
CDLayerMBS.getXIndexOf(xValue as Double, tolerance as Double = 0) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The index can be used in DataSet.getValue and DataSet.getPosition to obtain the y values and positions of the data points for all data sets in the layer.
The tolerance argument is to allow this method to consider data points that are not exactly at xValue, but are within tolerance from it.
If multiple data points at within tolerance, this method will return the index of the data point nearest to xValue. If multiple data points are equally near to xValue, this method will choose one arbitrarily and return its data point index. If no data points are found, this method will return -1.
Argument | Default | Description |
xValue | (Mandatory) | The x data value used to look for the data points in order to get the data point index of the nearest data point. |
tolerance | 0 | The tolerance allowed for for data points that are not exactly at the specified xValue. |
Returns the data point index of the data point nearest to the specified x data value up to the specified tolerance, or -1 if no data points are found.
Some examples using this method:
- /ChartDirector/Finance Chart Track Line Retina
- /ChartDirector/RealTime ViewPort
- /ChartDirector/Track Line Web
- /ChartDirector/Track Line with Data Labels Retina
- /ChartDirector/Track Line with Legend Retina
- /ChartDirector/Tracking Cursor/Track Line Web
- /ChartDirector/Tracking Cursor/Track Line with Axis Labels
- /ChartDirector/Tracking Cursor/Track Line with Data Labels
- /ChartDirector/Tracking Cursor/Track Line with Data Labels Retina
- /ChartDirector/Tracking Cursor/Track Line with Legend
CDLayerMBS.getXPosition(i as Integer) as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
i | (Mandatory) | The data point index of the data point. The first data point is 0; the nth data point is (n - 1). |
CDLayerMBS.getYCoor(value as Double, axis as boolean=true) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Note: You must call BaseChart.layout first before calling this method. It is because ChartDirector needs to perform auto-scaling and determine the axis scale first before it can compute the coordinates.
Argument | Default | Description |
v | (Mandatory) | The y data value. |
yAxis | nil | The y-axis to use to determine the pixel coordinates of data values. The y-axis may be obtained using XYChart.yAxis, XYChart.yAxis2 or XYChart.addAxis. The default is to use the primary y-axis. |
For backward compatibility, the axis argument can also be a boolean value. A true value means the primary y-axis. A false value means the secondary y-axis.
Return Value
The y coordinate of the y data value.
See also:
CDLayerMBS.getYCoor(value as Double, axis as CDAxisMBS) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Note: You must call BaseChart.layout first before calling this method. It is because ChartDirector needs to perform auto-scaling and determine the axis scale first before it can compute the coordinates.
Argument | Default | Description |
v | (Mandatory) | The y data value. |
yAxis | nil | The y-axis to use to determine the pixel coordinates of data values. The y-axis may be obtained using XYChart.yAxis, XYChart.yAxis2 or XYChart.addAxis. The default is to use the primary y-axis. |
For backward compatibility, the axis argument can also be a boolean value. A true value means the primary y-axis. A false value means the secondary y-axis.
Return Value
The y coordinate of the y data value.
See also:
CDLayerMBS.moveBack(layer as CDLayerMBS=nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
By default, the front to back ordering of the Layer objects are the same as the order in which they are added to the chart. For example, a layer added first will be in front of a layer added last.
This method can be used to move the layer behind another layer.
Arguments:
Argument | Default | Description |
layer | nil | The Layer for this layer to move behind. A nil object means the layer will be moved behind all current layers. |
CDLayerMBS.moveFront(layer as CDLayerMBS=nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
By default, the front to back ordering of the CDLayerMBS objects are the same as the order in which they are added to the chart. For example, a layer added first will be in front of a layer added last.
This method can be used to move the layer in front of another layer.
Arguments:
Argument | Default | Description |
layer | nil | The Layer for this layer to move in front of. The default value of null means the layer will be moved in front of all current layers. |
CDLayerMBS.set3D(d as Integer = -1, zGap 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 |
d | -1 | The 3D depth of the layer in pixels. -1 means the 3D depth is automatically calculated. |
zGap | 0 | The 3D gap between the current layer and the next layer in pixels. |
CDLayerMBS.setAggregateLabelFormat(formatString as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
By default, the aggregate label format is "{value}". Please refer to Parameter Substitution and Formatting on available parameters and how to format them.
Argument | Default | Description |
formatString | (Mandatory) | The format string. |
CDLayerMBS.setAggregateLabelStyle(font as string = "", fontSize as Double = 8, 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 |
Aggregate data labels applies to layer types that contains "aggregated data", such as stacked bar layer and stacked area layer. In these layer types, data labels (see Layer.setDataLabelStyle) represents a single data item, while aggregate labels represents the stacked object.
See Font Specification for details on various font attributes.
Argument | Default | Description |
font | "" | The font used to draw the labels. |
fontSize | 8 | The font size used to draw the labels. |
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:
CDLayerMBS.setAggregateLabelStyle(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:
CDLayerMBS.setBaseLine(BaseLine as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Certain data representation, such as bars in bar layers and area in area layers, are drawn from a base line. The base line by default is y = 0.
For example, for a vertical bar layer, the bars start from y = 0 and grow upwards for positive data (assuming the y-axis is not reversed), and downwards for negative data.
This method can be used to modify the base line to other values.
Arguments:
Argument | Default | Description |
baseLine | (Mandatory) | The value of the base line. |
CDLayerMBS.setBorderColor(colorvalue as color, lightingEffect as Integer = 0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method only applies to layers that represents data with elements that have borders (e.g. bar layer).
This method affect all data sets. To set the color of one particular data set, use DataSet.setDataColor.
Argument | Default | Description |
color | (Mandatory) | The border color. |
raisedEffect | 0 | The 3D border width. For positive values, the border will appear raised. For negative values, the border will appear depressed. A zero value means the border will appear flat. This argument is also used to support glassEffect and softLighting effects. |
See also:
The items on this page are in the following plugins: MBS ChartDirector Plugin.