Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1
The list of the topics, classes, interfaces, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
Back to CDPieChartMBS class.
CDPieChartMBS.Constructor(width as Integer = 640, height as Integer = 480, 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 |
See also:
CDPieChartMBS.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 |
Argument | Default | Description |
width | (Mandatory) | The width of the chart in pixels. |
height | (Mandatory) | The height of the chart in pixels. |
bgColor | BackgroundColor | The background color of the chart. |
edgeColor | Transparent | The edge color of the chart. |
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. |
See also:
CDPieChartMBS.sector(sectorNo as Integer) as CDSectorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
sectorNo | (Mandatory) | The sector number of the sector to retrieve, starting from 0. The first sector is 0. The nth sector is (n-1). |
CDPieChartMBS.set3D(depth as Integer = -1, angle as Double = -1, shadowMode as boolean=false)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
depth | -1 | The 3D depth of the pie in pixels. -1 means the depth is automatically determined. |
angle | -1 | The 3D view angle in degrees. Must be 0 - 90 for standard 3D mode, and 0 - 360 in shadow 3D mode. -1 means the angle is automatically determined. |
shadowMode | false | Flag to indicate whether the pie is in standard 3D or shadow 3D mode. A true value means shadow 3D mode. A false value means standard 3D mode. |
See also:
CDPieChartMBS.set3D(depths() as Double, angle as Double = 45, shadowMode as boolean=false)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
depths | (Mandatory) | An array of integers representing the 3D depths for the sectors. |
angle | 45 | The 3D view angle in degrees. Must be 0 - 90 for standard 3D mode, and 0 - 360 in shadow 3D mode. -1 means the angle is automatically determined. |
shadowMode | false | Flag to indicate whether the pie is in standard 3D or shadow 3D mode. A true value means shadow 3D mode. A false value means standard 3D mode. |
See also:
CDPieChartMBS.setData(data() as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
data | (Mandatory) | An array of numbers representing the data points. |
labels | [Empty_Array] | An array of text strings representing the labels of the sectors. An empty array means no sector label. |
See also:
CDPieChartMBS.setData(data() as Double, label() as string)
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 points. |
labels | [Empty_Array] | An array of text strings representing the labels of the sectors. An empty array means no sector label. |
See also:
CDPieChartMBS.setDonutSize(x as Integer, y as Integer, r as Integer, r2 as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
x | (Mandatory) | The x coordinate of the donut center. |
y | (Mandatory) | The y coordinate of the donut center. |
r | (Mandatory) | The inner radius of the donut. |
r2 | (Mandatory) | The outer radius of the donut. |
CDPieChartMBS.setExplode(sectorNo as Integer, distance as Integer = -1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
sectorNo | (Mandatory) | The sector number of the sector to be exploded from the pie, starting from 0. The first sector is 0. The nth sector is (n - 1). |
distance | -1 | The explosion distance in pixels. -1 means the distance is automatically determined. |
CDPieChartMBS.setExplodeGroup(startSector as Integer, endSector as Integer, distance as Integer = -1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
startSector | (Mandatory) | The sector number of the first sector in the sector group to be exploded. The first sector is 0. The nth sector is (n - 1). |
endSector | (Mandatory) | The sector number of the last sector in the sector group to be exploded. The first sector is 0. The nth sector is (n - 1). |
distance | -1 | The explosion distance in pixels. -1 means the distance is automatically determined. |
CDPieChartMBS.setJoinLine(joinLineColor as color, joinLineWidth as Integer = -1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDPieChartMBS.setJoinLine(joinLineColor as Integer, joinLineWidth as Integer = -1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method affects all sectors. To set the color and width of the join line for one particular sector only, use Sector.setJoinLine.
By default, for circular label layout, the join line color is Transparent. For side label layout, the join line color is SameAsMainColor.
Argument | Default | Description |
joinLineColor | (Mandatory) | The color of the line that joins the sector perimeter with the sector label. |
joinLineWidth | 1 | The line width of the join line. |
See also:
CDPieChartMBS.setLabelFormat(formatString 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 affects all sectors. To set the label format for one particular sector only, use Sector.setLabelFormat.
The default sector label format depends on the label layout method used (see PieChart.setLabelLayout).
Label Layout MethodDefault Label Format
Circular Layout | {label}<*br*>{percent}% |
Side Layout | {label} ({percent}%) |
Argument | Default | Description |
formatString | (Mandatory) | The format string. |
CDPieChartMBS.setLabelLayout(layoutMethod as Integer, pos as Integer = -1, topBound as Integer = -1, bottomBound as Integer = -1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method affects all sectors. To set the sector label layout method and location for one particular sector only, use Sector.setLabelLayout.
ChartDirector supports two sector label layout methods - circular layout and side layout. The layout method is determined using the layoutMethod argument, which must be one of the following predefined constants.
ConstantValueDescription
SideLayout | 0 | Side Label Layout |
CircleLayout | 1 | Circular Label Layout |
Argument | Default | Description |
layoutMethod | (Mandatory) | Specify the layout method. Must be one of the predefined constants CircleLayout or SideLayout. |
pos | -1 | For circular layout, it is the distance between the sector perimeter and the sector label. A negative value (but not -1) means the sector label will be drawn in the interior of the sector. |
topBound | -1 | This parameter applies only to side label layout. It controls the top bound of the labels (the minimum y coordinate), thereby limiting the extent that the labels can be shifted up to avoid overlapping. This parameter is typically used avoid the labels from moving up too much and overlap with other chart objects (such as the chart title). |
bottomBound | -1 | This parameter applies only to side label layout. It controls the bottom bound of the labels (the maximum y coordinate), thereby limiting the extent which the labels can be shifted down to avoid overlapping. This parameter is typically used to avoid the labels from moving down too much and overlap with other chart objects. |
CDPieChartMBS.setLabelPos(pos as Integer, joinLineColor as color)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDPieChartMBS.setLabelPos(pos as Integer, joinLineColor as Integer = -1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method affects all sectors. To set the sector label position or join line color for one particular sector only, use Sector.setLabelPos.
Argument | Default | Description |
pos | (Mandatory) | The distance between the sector perimeter and the sector label. A negative value means the sector label will be drawn in the interior of the sector. |
joinLineColor | -1 | The color of the line that joins the sector perimeter with the sector label. The default is Transparent. The join line is ignored if the sector label is inside the sector. |
See also:
CDPieChartMBS.setLabelStyle(font as string = "", fontsize as Double = 8, fontColor as Integer = &hffff0002) as CDTextBoxMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method affects all sectors. To set the label style for one particular sector only, use Sector.setLabelStyle.
See Font Specification for details on various font attributes.
Argument | Default | Description |
font | "" | The font used to draw the sector labels. |
fontSize | 8 | The font size in points. |
fontColor | TextColor | The text color for the sector labels. |
See also:
CDPieChartMBS.setLabelStyle(font as string, fontsize as Double, fontColor as color) 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:
CDPieChartMBS.setLineColor(edgeColor as color, joinLineColor as color)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDPieChartMBS.setLineColor(edgeColor as Integer, joinLineColor as Integer = -1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method affects all sectors. To set the sector label position and join line color for one particular sector, use Sector.setColor.
Argument | Default | Description |
edgeColor | (Mandatory) | The colors for the edges of the sectors. By default, the edge color is SameAsMainColor, which means the edge color is the same as the fill color of the sector, and the sector will appear borderless. |
joinLineColor | -1 | The color of the line that join the sector perimeter with the sector label. By default, for circular label layout, the join line color is Transparent. For side label layout, the join line color is SameAsMainColor. |
See also:
CDPieChartMBS.setPieSize(x as Integer, y as Integer, r as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
x | (Mandatory) | The x coordinate of the pie center. |
y | (Mandatory) | The y coordinate of the pie center. |
r | (Mandatory) | The radius of the pie. |
CDPieChartMBS.setSectorStyle(shadingMethod as Integer, edgeColor as color, edgeWidth as Integer = -1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDPieChartMBS.setSectorStyle(shadingMethod as Integer, edgeColor as Integer = -1, edgeWidth as Integer = -1)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method affects all sectors. To set the sector shading style, edge color and edge width for one particular sector, use CDSectorMBS.setStyle.
ChartDirector supports various shading effects, which are best illustrated using examples.
The followings are textual descriptions of the shading effects.
Constant | Value | Description |
DefaultShading | 0 | This is the default shading method. The top surfaces are shaded with flat colors. For 3D sectors, the cylindrical surfaces are shaded with cylindrical lighting effects. |
FlatShading | 1 | All surfaces are shaded with flat colors. |
LocalGradientShading | 2 | The top surfaces are shaded with linear gradient colors. For each sector, the gradient is from the bottom of the sector bounding box to the top of the sector bounding box, with the bottom side brighter and the top side darker. For 3D sectors, the cylindrical surfaces are shaded with cylindrical lighting effects. |
GlobalGradientShading | 3 | The top surfaces are shaded with linear gradient colors. The gradient is from the bottom the pie bounding box to the top of the pie bounding box, with the bottom side brighter and the top side darker. For 3D sectors, the cylindrical surfaces are shaded with cylindrical lighting effects. |
ConcaveShading | 4 | The top surfaces are shaded with a special effect so that they look concave, with the pie center appears to be depressed relative to the perimeter. For 3D sectors, the cylindrical surfaces are shaded with cylindrical lighting effects. |
RoundedEdgeShading | 6 | The top surfaces are shaded with a special effect so that the pie looks raised with a rounded raised edge at the perimeter. |
RadialShading | 7 | The top surfaces are shaded with radial gradient colors, with the pie center brighter and the perimeter darker. For 3D sectors, the cylindrical surfaces are shaded with cylindrical lighting effects. |
RingShading | 8 | This effect is intended to be used with 2D donut charts only. The top surfaces are shaded with a special effect so that a 2D donut will look like a torus. |
Argument | Default | Description |
shadingMethod | (Mandatory) | The sector shading style to use, which must be one of the constants in the table above. -1 means to keep the existing value unchanged. |
edgeColor | -1 | The edge color of the sectors. -1 means to keep the existing value unchanged. |
edgeWidth | -1 | The edge width of the sectors. -1 means to keep the existing value unchanged. |
See also:
CDPieChartMBS.setStartAngle(startAngle as Double, clockWise as boolean=true)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
By default, the start angle is 0 degree (the upward pointing direction), and subsequent sectors are drawn clockwise.
Argument | Default | Description |
startAngle | (Mandatory) | The angle to start drawing the first sector in degrees. The angle is measured from the upward pointing direction in the clockwise direction. |
clockWise | true | Flag to control the layout direction of the sectors. A true value means clockwise. A false value means anti-clockwise. |
The items on this page are in the following plugins: MBS ChartDirector Plugin.