Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDBoxMBS class.

CDBoxMBS.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.

CDBoxMBS.getHeight 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 height of the box.

In some usages, the height of a box may be dynamically determined. An example is the height of an LegendBox, which cannot be known until all data are available. In these cases, the height is undefined until the chart or at least the legend box has been laid out (using BaseChart.layout or BaseChart.layoutLegend), or the chart image has been drawn (eg. using BaseChart.makeChart, BaseChart.makeChart2 or BaseChart.makeChart3).
Return Value
The height of the box in pixels.

CDBoxMBS.getImageCoor(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
Gets the image map coordinates of the box as HTML image map attributes.

The image map coordinates will be in the following format:

shape="rect" cords="[x1],[y1],[x2],[y2]"
where (x1, y1) and (x2, y2) are opposite corners of the box. The format is 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.
ArgumentDefaultDescription
offsetX0An 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.
offsetY0An offset to be added to all y coordinates in the image map. See offsetX above for description.
Return Value
A text string representing the coordinates of the box in HTML image map attribute format.

CDBoxMBS.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 box.

In some cases, the left x coordinate of a box may be dynamically determined. An example is the left x coordinate of an CDLegendBoxMBS with alignment set to Center. To determine the left x coordinate, the size of the box must be known first. For these cases, the left x 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 the left x pixel coordinate of the box.

CDBoxMBS.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 box.

In some cases, the top y coordinate of a box may be dynamically determined. An example is the top y coordinate of an CDLegendBoxMBS 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 box.

CDBoxMBS.getWidth 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 width of the box.

In some usages, the width of a box may be dynamically determined. An example is the width of an LegendBox, which cannot be known until all data are available. In these cases, the width is undefined until the chart or at least the legend box has been laid out (using BaseChart.layout or BaseChart.layoutLegend), or the chart image has been drawn (eg. using BaseChart.makeChart, BaseChart.makeChart2 or BaseChart.makeChart3).
Return Value
The width of the box in pixels.

CDBoxMBS.setBackground(colorvalue 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 setBackground method, but uses color instead of integer data type for passing color values.
Example
// set edge to be 2 pixel wide line
Dim table As CDMLTableMBS
Dim t As CDTextBoxMBS = table.getStyle
Dim x As Integer = c.flatBorder(2)
t.setBackground(&heeeeee, CDXYChartMBS.kLineColor, x)

See also:

CDBoxMBS.setBackground(colorvalue as Integer, edgeColor as Integer = -1, 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
Sets the background color, border color and 3D border effect of the box.

ArgumentDefaultDescription
color(Mandatory)The background color of the box.
edgeColor-1The border color of the box.
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. This argument is also used to support Chart::glassEffect and Chart::softLighting effects.

See also:

CDBoxMBS.setPos(x as Integer, y as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the coordinates of the top-left corner of the box.
Example
// Create a XYChart object of size 250 x 250 pixels
dim c as new CDXYChartMBS(250, 250)

// Add a bar chart layer using the given data
dim t as CDTextBoxMBS = c.addBarLayer(data)
t.setPos(0, -10) // move 10 up

ArgumentDefaultDescription
x(Mandatory)The x coordinate of the left of the box.
y(Mandatory)The y coordinate of the top of the box.

CDBoxMBS.setRoundedCorners(r1 as Integer = 10, r2 as Integer = -1, r3 as Integer = -1, r4 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 border style to use rounded corners.

ArgumentDefaultDescription
r110The radius of the top-left rounded corner in pixels.
r2-1The radius of the top-right rounded corner in pixels. The default value of -1 means it is the same as the radius of the top-left corner.
r3-1The radius of the bottom-right rounded corner in pixels. The default value of -1 means it is the same as the radius of the top-left corner.
r4-1The radius of the bottom-left rounded corner in pixels. The default value of -1 means it is the same as the radius of the top-left corner.

CDBoxMBS.setSize(w as Integer, h as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the width and height of the box.

ArgumentDefaultDescription
w(Mandatory)The width of the box in pixels.
h(Mandatory)The height of the box in pixels.

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


The biggest plugin in space...