Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDPlotAreaMBS class.

CDPlotAreaMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The private constructor.

CDPlotAreaMBS.getHeight as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the height of the plot area.

CDPlotAreaMBS.getLeftX as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the left x pixel coordinate of the plot area.

CDPlotAreaMBS.getTopY as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the top y pixel coordinate of the plot area.

In some cases, the top y coordinate of a box may be dynamically determined. An example is the top y coordinate of an LegendBox with alignment set to Center. To determine the top y coordinate, the size of the box must be known first. For these cases, the top y coordinate is undefined until the legend box or the entire chart has been laid out (using CDBaseChartMBS.layout or CDBaseChartMBS.layoutLegend), or the chart image has been drawn (eg. using CDBaseChartMBS.makeChart).

Arguments:
None

Return Value
The top y pixel coordinate of the plot area.

CDPlotAreaMBS.getWidth as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the width of the plot area.

CDPlotAreaMBS.moveGridBefore(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
Moves the grid lines in front of a Layer.

By default, the grid lines will be drawn at the back of the plot area, behind all the layers. This method can be used to move the grid lines in front of a given layer.

Arguments:
ArgumentDefaultDescription
layernilThe Layer for the grid lines to move in front of.

Some examples using this method:

CDPlotAreaMBS.set4QBgColor(Q1Color as color, Q2Color as color, Q3Color as color, Q4Color as color, edgeColor as color)

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

See also:

CDPlotAreaMBS.set4QBgColor(Q1Color as Integer, Q2Color as Integer, Q3Color as Integer, Q4Color as Integer, edgeColor as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets using 4 background plot area colors for 4 quadrants.

The first quadrant is the region defined by x > 0 and y > 0. The second quadrant is the region defined by x < 0 and y > 0. The third quadrant is the region defined by x < 0 and y < 0. The fourth quadrant is the region defined by x > 0 and y < 0. These 4 regions can be colored using 4 different background colors.
ArgumentDefaultDescription
Q1Color(Mandatory)The background color to be used for the first quadrant.
Q2Color(Mandatory)The background color to be used for the second quadrant.
Q3Color(Mandatory)The background color to be used for the third quadrant.
Q4Color(Mandatory)The background color to be used for the fourth quadrant.
edgeColor-1he border color of the plot area. -1 means to use the default, which is LineColor. However, if the axes are configured in 4 quadrant mode (see XYChart.setAxisAtOrigin), the default will change to Transparent.

See also:

CDPlotAreaMBS.setAltBgColor(horizontal as Boolean, color1 as color, color2 as color, edgeColor as color)

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

See also:

CDPlotAreaMBS.setAltBgColor(horizontal as Boolean, color1 as Integer, color2 as Integer, edgeColor as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets alternating plot area background color.

This method can be used to specify two colors that will be used alternatively to draw horizontal or vertical bands on the plot area background, using major grid lines as boundaries for the bands.
ArgumentDefaultDescription
horizontal(Mandatory)true means to use horizontal bands. false means to use vertical bands.
color1(Mandatory)The first color to be used as the alternating background color.
color2(Mandatory)The second color to be used as the alternating background color.
edgeColor-1The border color of the plot area. -1 means to use the default, which is LineColor. However, if the axes are configured in 4 quadrant mode (see XYChart.setAxisAtOrigin), the default will change to Transparent.

See also:

CDPlotAreaMBS.setBackground(colorvalue as color, altBgColor as color, edgeColor as color)

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

See also:

CDPlotAreaMBS.setBackground(colorvalue as Integer, altBgColor as Integer = -1, edgeColor as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the background colors and the border color of the plot area.

A plot area can have one or two background colors. If it has two background colors, they are drawn alternatively as horizontal bands on the major background grid.

ChartDirector Ver 4.0 introduces two new methods PlotArea.setAltBgColor and PlotArea.set4QBgColor. They are used for vertical alternating bands, and for supporting 4 background colors for 4 quadrants.
ArgumentDefaultDescription
color(Mandatory)The background color.
altBgColor-1The second background color. -1 means there is no second background color.
edgeColor-1The border color of the plot area. -1 means to use the default, which is LineColor. However, if the axes are configured in 4 quadrant mode (see XYChart.setAxisAtOrigin), the default will change to Transparent.

See also:

CDPlotAreaMBS.setBackground(file as folderitem, align as Integer = 5)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the specified image file as the background image of the plot area.

ChartDirector will automatically detect the image file format using the file extension, which must either png, jpg, jpeg, gif, wbmp or wmp (case insensitive).

Please refer to BaseChart.setSearchPath on the directory that ChartDirector will search for the file.
ArgumentDefaultDescription
img(Mandatory)The image file that is used as the background image of the plot area.
alignCenterThe alignment of the background image relative to the plot area. See Alignment Specification for supported alignment types.

See also:

CDPlotAreaMBS.setGridAxis(xGridAxis as CDAxisMBS, yGridAxis as CDAxisMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the axis used for drawing grid lines.

By default, the grid lines will be based on the ticks on the primary x-axis (CDXYChartMBS.xAxis) and primary y-axis (CDXYChartMBS.yAxis). This method may be used to specify alternative x-axis and y-axis to base the grid lines on.

Arguments:
ArgumentDefaultDescription
xGridAxis(Mandatory)The x-axis used for drawing grid lines.
yGridAxis(Mandatory)The y-axis used for drawing grid lines.

CDPlotAreaMBS.setGridColor(hGridColor as color, vGridColor as color, minorHGridColor as color, minorVGridColor as color)

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

See also:

CDPlotAreaMBS.setGridColor(hGridColor as Integer, vGridColor as Integer = &hff000000, minorHGridColor as Integer = -1, minorVGridColor as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the horizontal and vertical grid colors of the plot area.

ArgumentDefaultDescription
hGridColor(Mandatory)The color for the horizontal grid lines associated with major ticks.
vGridColorTransparentThe color for the vertical grid lines associated with major ticks.
minorHGridColor-1The color for the horizontal grid lines associated with minor ticks. -1 means the color is the same as hGridColor.
minorVGridColor-1The color for the vertical grid lines associated with minor ticks. -1 means the color is the same as vGridColor.

See also:

CDPlotAreaMBS.setGridWidth(hGridWidth as Integer, vGridWidth as Integer = -1, minorHGridWidth as Integer = -1, minorVGridWidth as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the horizontal and vertical grid line width.

ArgumentDefaultDescription
hGridWidth(Mandatory)The line width for the horizontal grid lines associated with major ticks.
vGridWidth-1The line width for the vertical grid lines associated with major ticks. -1 means the vertical grid line width is the same as hGridWidth.
minorHGridWidth-1The line width for the horizontal grid lines associated with minor ticks. -1 means the color is the same as hGridWidth.
minorVGridWidth-1The line width for the horizontal grid lines associated with minor ticks. -1 means the color is the same as vGridWidth.

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


The biggest plugin in space...