Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDBaseChartMBS class.

CDBaseChartMBS.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
Adds an array of numbers/dates to be used as an extra field in various places.

This method merely stores the data inside the chart 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.
ArgumentDefaultDescription
numbers(Mandatory)An array of numbers/dates to be stored inside the chart object.

See also:

CDBaseChartMBS.addExtraField(paths() as folderitem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds an array of file paths to be used as an extra field in various places.

This method merely stores the data inside the chart 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.
ArgumentDefaultDescription
texts(Mandatory)An array of text to be stored inside the chart object.

See also:

CDBaseChartMBS.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
Adds an array of text to be used as an extra field in various places.

This method merely stores the data inside the chart 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.
ArgumentDefaultDescription
texts(Mandatory)An array of text to be stored inside the chart object.

Great to add point labels to the chart.

See also:

CDBaseChartMBS.addLegend(x as Integer, y as Integer, noOfCols as Integer, font as string = "", fontsize as Double = 10) as CDLegendBoxMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a legend box to the chart with grid layout.

In grid layout, the legend box will be divided into a table in which all cells are of of same width. The legend entries will fill the cells from left to right, top to bottom.

The number of columns can be specified using the noOfCols argument. If this argument is set to the special constant AutoGrid (= -2), the number of columns will be automatically determined based on the longest legend entry. If this argument is 0, the legend box will use a flow layout (from left to right and then top to bottom, in which the entries may not be vertically aligned).

In any case, the number of rows in the table is automatically determined so as to have enough cells for all legend entries.
ArgumentDefaultDescription
x(Mandatory)The x coordinate of the reference point of the legend box. By default, the reference point is the top-left corner of the box, but can be configured by using TextBox.setAlignment.
y(Mandatory)The y coordinate of the reference point of the legend box. By default, the reference point is the top-left corner of the box, but can be configured by using TextBox.setAlignment.
noOfCols(Mandatory)The number of columns in the legend box. The special value AutoGrid (= -2) means the number of columns is automatically determined. If this argument is 0, the legend box will use a flow layout (from left to right and then top to bottom, in which the entries may not be vertically aligned).
font""The font name of the font for drawing the legend text. The default is "normal". See Font Specification for details on various font attributes.
fontSize10The font size of the legend text.
Return Value
A LegendBox object representing the legend box. You may use this object to fine-tune the appearance of the legend box.

See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml

See also:

Some examples using this method:

CDBaseChartMBS.addLegend(x as Integer, y as Integer, vertical as boolean=true, font as string = "", fontsize as Double = 10) as CDLegendBoxMBS

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

The entries in the legend box will flow from top to bottom (one line per entry), or from left to right and then top to bottom (like flowing text), depending on the vertical argument. For grid layout, use BaseChart.addLegend2.
ArgumentDefaultDescription
x(Mandatory)The x coordinate of the reference point of the legend box. By default, the reference point is the top-left corner of the box, but can be configured by using TextBox.setAlignment.
y(Mandatory)The y coordinate of the reference point of the legend box. By default, the reference point is the top-left corner of the box, but can be configured by using TextBox.setAlignment.
verticaltrueA true value means the legend keys are laid out vertically (one line per entry). A false value means the legend keys are laid out horizontal and flow like text (from left to right, top to bottom).
font""The font name of the font for drawing the legend text. The default is "normal". See Font Specification for details on various font attributes.
fontSize10The font size of the legend text.
Return Value
A LegendBox object representing the legend box. You may use this object to fine-tune the appearance of the legend box.

See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml

See also:

CDBaseChartMBS.addLine(x1 as Integer, y1 as Integer, x2 as Integer, y2 as Integer, colorvalue as color, lineWidth as Integer = 1) as CDLineMBS

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

See also:

CDBaseChartMBS.addLine(x1 as Integer, y1 as Integer, x2 as Integer, y2 as Integer, colorvalue as Integer = &hffff0001, lineWidth as Integer = 1) as CDLineMBS

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

ArgumentDefaultDescription
x1(Mandatory)The x coordinate of the first endpoint of the line.
y1(Mandatory)The y coordinate of the first endpoint of the line.
x2(Mandatory)The x coordinate of the second endpoint of the line.
y2(Mandatory)The y coordinate of the second endpoint of the line.
colorLineColorThe color of the line.
lineWidth1The width of the line.
Return Value
A Line object representing the line added. You may use this object to fine- tune the appearance of the line.

See also:

CDBaseChartMBS.addTable(x as Integer, y as Integer, alignment as Integer, col as Integer, row as Integer) as CDMLTableMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a CDML table to the chart.

Arguments:
ArgumentDefaultDescription
x(Mandatory)The x-coordinate of the reference point used to position the table.
y(Mandatory)The y-coordinate of the reference point used to position the table.
alignment(Mandatory)The alignment of the table with respect to the reference point. For example, a value of kTopLeft means the reference point is the top- left corner of the table. See Alignment Specification for supported alignment types..
col(Mandatory)The number of columns in the table.
row(Mandatory)The number of rows in the table.

Returns a CDMLTableMBS object representing the CDML table added.

CDBaseChartMBS.addText(x as Integer, y as Integer, text as string, font as string = "", fontsize as Double = 8, fontcolor as Integer = &hffff0002, alignment as Integer = 7, angle as Double = 0, vertical as boolean=false) as CDTextBoxMBS

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

By default, only the text is visible, the box is transparent. This method returns a TextBox object that can be used to change the appearance of the text box.
ArgumentDefaultDescription
x(Mandatory)The x coordinate of the left of the text box.
y(Mandatory)The y coordinate of the top of the text box.
text(Mandatory)The text to shown in the text box. See ChartDirector Mark Up Language on how to embed special tags in the text for sophisticated formatting.
font""The font used to draw the text. See Font Specification for details on various font attributes.
fontSize8The font size used to draw the text.
fontColorTextColorThe color used to draw the text.
alignmentTopLeftThe alignment of the text within the text box. See Alignment Specification for supported alignment types.
angle0The rotation angle of the text within the text box.
verticalfalseIndicate whether the text should be laid out vertically (from top to bottom) or horizontally (from left to right).
Return Value
A TextBox object representing the text box. This may be used to fine-tune the appearance of the text box.

See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml

See also:

CDBaseChartMBS.addTitle(alignment as Integer, text as string, font as string = "", fontsize as Double = 12, fontColor as Integer = &hffff0002, bgColor as Integer = &hff000000, edgeColor as Integer = &hff000000) as CDTextBoxMBS

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

ArgumentDefaultDescription
alignment(Mandatory)The position on the title on the chart. See Alignment Specification for supported alignment types.
text(Mandatory)The text for the title. See ChartDirector Mark Up Language on how to embed special tags in the text for sophisticated formatting.
font""The font used to draw the title text. The default is "bold". See Font Specification for details on various font attributes.
fontSize12The font size in points for the title text.
fontColorTextColorThe color of the title text.
bgColorTransparentThe background color of the title box.
edgeColorTransparentThe border color of the title box.
Return Value
A TextBox object representing the title box. This may be used to fine-tune the appearance of the title box.

See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml

See also:

Some examples using this method:

CDBaseChartMBS.addTitle(text as string, font as string = "", fontsize as Double = 12, fontColor as Integer = &hffff0002, bgColor as Integer = &hff000000, edgeColor as Integer = &hff000000) as CDTextBoxMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a title at the top center of the chart.

The title is contained within a box, of which the width is the same as the width of the chart, and the height is automatically adjusted to fit the text. The box is initially invisible, but can be made visible by setting the bgColor and edgeColor.
ArgumentDefaultDescription
text(Mandatory)The text for the title. See ChartDirector Mark Up Language on how to embed special tags in the text for sophisticated formatting.
font""The font used to draw the title text. The default is "bold". See Font Specification for details on various font attributes.
fontSize12The font size in points for the title text.
fontColorTextColorThe color of the title text.
bgColorTransparentThe background color of the title box.
edgeColorTransparentThe border color of the title box.
Return Value
A TextBox object representing the title box. This may be used to fine-tune the appearance of the title box.

See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml

See also:

CDBaseChartMBS.adjustBrightness(ColorValue as color, brightness as Double) as Integer

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

See also:

CDBaseChartMBS.adjustBrightness(ColorValue as Integer, brightness as Double) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a color that is a darkened or brightened version of the given color.

A brightness less than 1 means the color is darkened, while a brightness greater than 1 means the color is brightened. For example, a brightness of 0.5 means the color is half as bright as the original color. If the original color is red, the color will become dark red. Conversely, a brightness of 2 means the color is twice as bright as the original color. If the original color is red, the color will become light red.

Arguments:
ArgumentDefaultDescription
c(Mandatory)The given color.
brightness(Mandatory)A non-negative number represent the factor to darken or brighten the color.

Return Value
A 32-bit integer representing the darkened or brightened color.

See also:

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


The biggest plugin in space...