Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDXYChartMBS class.

Previous items Next items

CDXYChartMBS.addScatterLayer(xDate() as date, yDate() as Double, name as string = "", symbol as Integer = 1, symbolSize as Integer = 5, fillColor as Integer = -1, edgeColor as Integer = -1) as CDScatterLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Adds a scatter chart layer to the XYChart.

A scatter chart can be considered as a special configuration of a line chart, in the data symbols are enabled and the line width is set to zero. Therefore only the data symbols are visible and the chart appears as scattered.

ParameterDefaultDescription
xData(Mandatory)An array of numbers representing the x values of the data points. If no explicit x coordinates are used in the chart (eg. using an enumerated x-axis), an empty array may be used for this argument.
yData(Mandatory)An array of numbers representing the y values of the data points.
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.
symbolSquareShapeOne of the predefined symbol constants to specify the symbol to use. (See Shape Specification for available built-in shapes.)
symbolSize5The width and height of the symbol in pixels.
fillColor-1The color used to fill the symbol. -1 means that the color is automatically selected from the palette.
edgeColor-1The edge color used to draw the edge of the symbol. The default value of -1 means using LineColor as the edge color.

Return Value
A ScatterLayer object representing the scatter layer created.

See also:

CDXYChartMBS.addScatterLayer(xDate() as date, yDate() as Double, name as string, symbol as Integer, symbolSize as Integer, fillColor as color, edgeColor as color) as CDScatterLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Adds a scatter chart layer to the XYChart.

A scatter chart can be considered as a special configuration of a line chart, in the data symbols are enabled and the line width is set to zero. Therefore only the data symbols are visible and the chart appears as scattered.

ParameterDefaultDescription
xData(Mandatory)An array of numbers representing the x values of the data points. If no explicit x coordinates are used in the chart (eg. using an enumerated x-axis), an empty array may be used for this argument.
yData(Mandatory)An array of numbers representing the y values of the data points.
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.
symbolSquareShapeOne of the predefined symbol constants to specify the symbol to use. (See Shape Specification for available built-in shapes.)
symbolSize5The width and height of the symbol in pixels.
fillColor-1The color used to fill the symbol. -1 means that the color is automatically selected from the palette.
edgeColor-1The edge color used to draw the edge of the symbol. The default value of -1 means using LineColor as the edge color.

Return Value
A ScatterLayer object representing the scatter layer created.

See also:

CDXYChartMBS.addScatterLayer(xDate() as DateTime, yDate() as DateTime, name as string = "", symbol as integer = 1, symbolSize as integer = 5, fillColor as integer = -1, edgeColor as integer = -1) as CDScatterLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 20.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds an area chart layer to the XYChart, and specify the data set to use for drawing the area.

See also:

CDXYChartMBS.addScatterLayer(xDate() as DateTime, yDate() as DateTime, name as string, symbol as integer, symbolSize as integer, fillColor as color, edgeColor as color) as CDScatterLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 20.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a scatter chart layer to the XYChart.

See also:

CDXYChartMBS.addScatterLayer(xDate() as DateTime, yDate() as double, name as string = "", symbol as integer = 1, symbolSize as integer = 5, fillColor as integer = -1, edgeColor as integer = -1) as CDScatterLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 20.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a scatter chart layer to the XYChart.

See also:

CDXYChartMBS.addScatterLayer(xDate() as DateTime, yDate() as double, name as string, symbol as integer, symbolSize as integer, fillColor as color, edgeColor as color) as CDScatterLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 20.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a scatter chart layer to the XYChart.

See also:

CDXYChartMBS.addScatterLayer(xDate() as Double, yDate() as date, name as string = "", symbol as Integer = 1, symbolSize as Integer = 5, fillColor as Integer = -1, edgeColor as Integer = -1) as CDScatterLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Adds a scatter chart layer to the XYChart.

A scatter chart can be considered as a special configuration of a line chart, in the data symbols are enabled and the line width is set to zero. Therefore only the data symbols are visible and the chart appears as scattered.

ParameterDefaultDescription
xData(Mandatory)An array of numbers representing the x values of the data points. If no explicit x coordinates are used in the chart (eg. using an enumerated x-axis), an empty array may be used for this argument.
yData(Mandatory)An array of numbers representing the y values of the data points.
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.
symbolSquareShapeOne of the predefined symbol constants to specify the symbol to use. (See Shape Specification for available built-in shapes.)
symbolSize5The width and height of the symbol in pixels.
fillColor-1The color used to fill the symbol. -1 means that the color is automatically selected from the palette.
edgeColor-1The edge color used to draw the edge of the symbol. The default value of -1 means using LineColor as the edge color.

Return Value
A ScatterLayer object representing the scatter layer created.

See also:

CDXYChartMBS.addScatterLayer(xDate() as Double, yDate() as date, name as string, symbol as Integer, symbolSize as Integer, fillColor as color, edgeColor as color) as CDScatterLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Adds a scatter chart layer to the XYChart.

A scatter chart can be considered as a special configuration of a line chart, in the data symbols are enabled and the line width is set to zero. Therefore only the data symbols are visible and the chart appears as scattered.

ParameterDefaultDescription
xData(Mandatory)An array of numbers representing the x values of the data points. If no explicit x coordinates are used in the chart (eg. using an enumerated x-axis), an empty array may be used for this argument.
yData(Mandatory)An array of numbers representing the y values of the data points.
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.
symbolSquareShapeOne of the predefined symbol constants to specify the symbol to use. (See Shape Specification for available built-in shapes.)
symbolSize5The width and height of the symbol in pixels.
fillColor-1The color used to fill the symbol. -1 means that the color is automatically selected from the palette.
edgeColor-1The edge color used to draw the edge of the symbol. The default value of -1 means using LineColor as the edge color.

Return Value
A ScatterLayer object representing the scatter layer created.

See also:

CDXYChartMBS.addScatterLayer(xDate() as double, yDate() as DateTime, name as string = "", symbol as integer = 1, symbolSize as integer = 5, fillColor as integer = -1, edgeColor as integer = -1) as CDScatterLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 20.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a scatter chart layer to the XYChart.

See also:

CDXYChartMBS.addScatterLayer(xDate() as double, yDate() as DateTime, name as string, symbol as integer, symbolSize as integer, fillColor as color, edgeColor as color) as CDScatterLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 20.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a scatter chart layer to the XYChart.

See also:

CDXYChartMBS.addSplineLayer as CDSplineLayerMBS

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

In a spline layer, the data points are connected together using cardinal spline curves (as opposed to straight lines). The "tension" of the curve can be configured using SplineLayer.setTension.

ParameterDefaultDescription
data[Empty_Array]An array of numbers representing the data set.
color-1The color to draw the spline line. -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.

Return Value
A SplineLayer object representing the spline layer created.

See also:

Some examples using this method:

CDXYChartMBS.addSplineLayer(data() as Double, colorvalue as color, name as string = "") as CDSplineLayerMBS

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

See also:

CDXYChartMBS.addSplineLayer(data() as Double, colorvalue as Integer = -1, name as string = "") as CDSplineLayerMBS

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

In a spline layer, the data points are connected together using cardinal spline curves (as opposed to straight lines). The "tension" of the curve can be configured using SplineLayer.setTension.

ParameterDefaultDescription
data[Empty_Array]An array of numbers representing the data set.
color-1The color to draw the spline line. -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.

Return Value
A SplineLayer object representing the spline layer created.

See also:

CDXYChartMBS.addStepLineLayer as CDStepLineLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a step line chart layer to the XYChart.

In a step line layer, the data points are connected together using steps. The alignment of the steps relative to the data points can be configured using StepLineLayer.setAlignment.

ParameterDefaultDescription
data[Empty_Array]An array of numbers representing the data set.
color-1The color to draw the step line. -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.

Return Value
A StepLineLayer object representing the step line layer created.

See also:

Some examples using this method:

CDXYChartMBS.addStepLineLayer(data() as Double, colorvalue as color, name as string = "") as CDStepLineLayerMBS

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

See also:

CDXYChartMBS.addStepLineLayer(data() as Double, colorvalue as Integer = -1, name as string = "") as CDStepLineLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a step line chart layer to the XYChart.

In a step line layer, the data points are connected together using steps. The alignment of the steps relative to the data points can be configured using StepLineLayer.setAlignment.

ParameterDefaultDescription
data[Empty_Array]An array of numbers representing the data set.
color-1The color to draw the step line. -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.

Return Value
A StepLineLayer object representing the step line layer created.

See also:

CDXYChartMBS.addTrendLayer(Data() as Double, colorvalue as color, name as string = "", depth as Integer = 0) as CDTrendLayerMBS

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

See also:

Some examples using this method:

CDXYChartMBS.addTrendLayer(Data() as Double, colorvalue as Integer = -1, name as string = "", depth as Integer = 0) as CDTrendLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a trend chart layer to the XYChart, and specify the data set to use for drawing the trend line.

ParameterDefaultDescription
data(Mandatory)An array of numbers representing the data set.
color-1The color to draw the line. -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.
depth0The 3D depth of the line layer.

Return Value
A TrendLayer object representing the trend layer created.

See also:

CDXYChartMBS.addTrendLayer(dates() as date, colorvalue as color, name as string = "", depth as Integer = 0) as CDTrendLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Adds a trend chart layer to the XYChart, and specify the data set to use for drawing the trend line.

ParameterDefaultDescription
data(Mandatory)An array of numbers representing the data set.
color-1The color to draw the line. -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.
depth0The 3D depth of the line layer.

Return Value
A TrendLayer object representing the trend layer created.

See also:

CDXYChartMBS.addTrendLayer(dates() as date, colorvalue as Integer = -1, name as string = "", depth as Integer = 0) as CDTrendLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Adds a trend chart layer to the XYChart, and specify the data set to use for drawing the trend line.

ParameterDefaultDescription
data(Mandatory)An array of numbers representing the data set.
color-1The color to draw the line. -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.
depth0The 3D depth of the line layer.

Return Value
A TrendLayer object representing the trend layer created.

See also:

CDXYChartMBS.addTrendLayer(dates() as date, yData() as Double, colorvalue as color, name as string = "", depth as Integer = 0) as CDTrendLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Same as the other addTrendLayer method, but uses color instead of integer data type for passing color values.

See also:

CDXYChartMBS.addTrendLayer(dates() as date, yData() as Double, colorvalue as Integer = -1, name as string = "", depth as Integer = 0) as CDTrendLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.6 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Adds a trend chart layer to the XYChart, and specify the x and y values for drawing the trend line.

ParameterDefaultDescription
xData(Mandatory)An array of numbers representing the x values of the data points.
yData(Mandatory)An array of numbers representing the y values of the data points.
color-1The color to draw the line. -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.
depth0The 3D depth of the line layer.

Return Value
A TrendLayer object representing the trend layer created.

See also:

CDXYChartMBS.addTrendLayer(dates() as DateTime, colorvalue as color, name as string = "", depth as integer = 0) as CDTrendLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 20.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a trend chart layer to the XYChart, and specify the data set to use for drawing the trend line.

See also:

CDXYChartMBS.addTrendLayer(dates() as DateTime, colorvalue as integer = -1, name as string = "", depth as integer = 0) as CDTrendLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 20.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a trend chart layer to the XYChart, and specify the data set to use for drawing the trend line.

See also:

CDXYChartMBS.addTrendLayer(dates() as DateTime, yData() as double, colorvalue as color, name as string = "", depth as integer = 0) as CDTrendLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 20.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a trend chart layer to the XYChart, and specify the data set to use for drawing the trend line.

See also:

CDXYChartMBS.addTrendLayer(dates() as DateTime, yData() as double, colorvalue as integer = -1, name as string = "", depth as integer = 0) as CDTrendLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 20.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a trend chart layer to the XYChart, and specify the data set to use for drawing the trend line.

See also:

CDXYChartMBS.addTrendLayer(xData() as Double, yData() as Double, colorvalue as color, name as string = "", depth as Integer = 0) as CDTrendLayerMBS

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

See also:

CDXYChartMBS.addTrendLayer(xData() as Double, yData() as Double, colorvalue as Integer = -1, name as string = "", depth as Integer = 0) as CDTrendLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a trend chart layer to the XYChart, and specify the x and y values for drawing the trend line.

ParameterDefaultDescription
xData(Mandatory)An array of numbers representing the x values of the data points.
yData(Mandatory)An array of numbers representing the y values of the data points.
color-1The color to draw the line. -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.
depth0The 3D depth of the line layer.

Return Value
A TrendLayer object representing the trend layer created.

See also:

CDXYChartMBS.addVectorLayer(dates() as date, yData() as Double, directions() as Double, lengths() as Double, lengthScale as Integer = 0, colorvalue as Integer = -1, name as string = "") as CDVectorLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.6 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Adds a vector layer to the chart.

The vectors are specified as 4 data series, representing the x and y coordinates of the reference points to put the vectors, and the lengths and directions of the vectors.

By default, the vector starts from the reference point and points away from it. You may use VectorLayer.setArrowAlignment to specify other options, such as for the vectors to point into the reference point, or to have the reference as a pivot at the mid-point of the vector.

ChartDirector supports specifying vectors lengths as pixels or in axis scale. The unit is specified by using the following predefined constants.

ConstantValueDescription
PixelScale0The unit is measured in pixels.
XAxisScale1The unit is measured in x-axis scale.
YAxisScale2The unit is measured in y-axis scale.

ParameterDefaultDescription
xData(Mandatory)An array of numbers representing the x coordinates for the reference points of the vectors.
yData(Mandatory)An array of numbers representing the y coordinates for the reference points of the vectors.
directions(Mandatory)An array of numbers representing the direction of the vectors as a clockwise angle in degrees, where 0 is upward pointing direction.
lengths(Mandatory)An array of numbers representing the lengths of the vectors, in unit as specified in the lengthScale argument.
lengthScalePixelScaleThe unit for the lengths, which must be one of the predefined constants in the table above.
color-1The color to draw the data points. -1 means that the color is automatically selected from the palette.
name""The name of the layer. The name will be used in the legend box, if one is available. An empty string means the layer has no name.

Return Value
A VectorLayer object representing the vector layer created.

See also:

CDXYChartMBS.addVectorLayer(xData() as Double, yData() as Double, directions() as Double, lengths() as Double, lengthScale as Integer = 0, colorvalue as Integer = -1, name as string = "") as CDVectorLayerMBS

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

The vectors are specified as 4 data series, representing the x and y coordinates of the reference points to put the vectors, and the lengths and directions of the vectors.

By default, the vector starts from the reference point and points away from it. You may use VectorLayer.setArrowAlignment to specify other options, such as for the vectors to point into the reference point, or to have the reference as a pivot at the mid-point of the vector.

ChartDirector supports specifying vectors lengths as pixels or in axis scale. The unit is specified by using the following predefined constants.

ConstantValueDescription
PixelScale0The unit is measured in pixels.
XAxisScale1The unit is measured in x-axis scale.
YAxisScale2The unit is measured in y-axis scale.

ParameterDefaultDescription
xData(Mandatory)An array of numbers representing the x coordinates for the reference points of the vectors.
yData(Mandatory)An array of numbers representing the y coordinates for the reference points of the vectors.
directions(Mandatory)An array of numbers representing the direction of the vectors as a clockwise angle in degrees, where 0 is upward pointing direction.
lengths(Mandatory)An array of numbers representing the lengths of the vectors, in unit as specified in the lengthScale argument.
lengthScalePixelScaleThe unit for the lengths, which must be one of the predefined constants in the table above.
color-1The color to draw the data points. -1 means that the color is automatically selected from the palette.
name""The name of the layer. The name will be used in the legend box, if one is available. An empty string means the layer has no name.

Return Value
A VectorLayer object representing the vector layer created.

See also:

CDXYChartMBS.Constructor(width as Integer = 640, height as Integer = 480, bgcolor as Integer = &hFFFF0000, edgeColor as Integer = &hFF000000, raisedEffect as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new XYChart object.

ParameterDefaultDescription
width(Mandatory)The width of the chart in pixels.
height(Mandatory)The height of the chart in pixels.
bgColorBackgroundColorThe background color of the chart.
edgeColorTransparentThe edge color of the chart.
raisedEffect0The 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.

See also:

CDXYChartMBS.Constructor(width as Integer, height as Integer, bgcolor as color, edgeColor as color, raisedEffect as Integer = 0)

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

See also:

CDXYChartMBS.getLayer(i as Integer) as CDLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets a Layer object based on the order in which it is being added to the chart.

ArgumentDefaultDescription
i(Mandatory)The index of the data layer. The index of the first layer added to the chart is 0. The index of the Nth layer added to the chart is N - 1.

CDXYChartMBS.getLayerByZ(i as Integer) as CDLayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets a Layer object based on the order in which it is being drawn.

In ChartDirector, by default, the first layer added will stay on the top of the chart. The second layer will be added under the first layer, and so on. It means The layers will be drawn in the reverse order that they are added to the chart. The ordering can be configured with Layer.moveFront or Layer.moveBack.

ArgumentDefaultDescription
zIndex(Mandatory)The z-index of the required layer. The z-index of the first layer drawn is 0. The z-index for the Nth layer drawn is N - 1.

Some examples using this method:

CDXYChartMBS.getNearestXValue(xCoor 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
Gets the x data value that is nearest to the specified x pixel coordinate.

This method will search all x data values in the XYChart 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.

ArgumentDefaultDescription
xCoor(Mandatory)The x pixel coordinate to search for.

Returns the x data value that is nearest to the specified x coordinate.

CDXYChartMBS.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
Gets the x pixel coordinate of a point given the x data value.

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.

For a 3D chart, this method will get the pixel coordinate of the data value on the top surface of the chart. Use Layer.getXCoor to obtain the pixel coordinate of the data value on a particular chart layer.

ParameterDefaultDescription
v(Mandatory)The x data value.

Return Value
The x coordinate of the x data value.

Previous items Next items

The items on this page are in the following plugins: MBS ChartDirector Plugin.


The biggest plugin in space...