Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDBaseChartMBS class.

Next items

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:

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

CDBaseChartMBS.dashLineColor(colorvalue as color, patternCode as Integer = &h0505) 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 dashLineColor method, but uses color instead of integer data type for passing color values.

See also:

CDBaseChartMBS.dashLineColor(colorvalue as Integer, patternCode as Integer = &h0505) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
A constant equals to 0505 (in hex) to represent a dash line pattern for use in dash colors.

See Color Specification on how colors are represented in ChartDirector.

See also:

CDBaseChartMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The destructor for the base chart.

CDBaseChartMBS.enableVectorOutput   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This item is deprecated and should no longer be used.
Enables true vector graphics output.

By default, when creating the output image, ChartDirector draws directly onto an output buffer representing the bitmap of the image. For example, for a chart 800 x 600 pixels in size, the output buffer may represent a 800 x 600 bitmap. The output buffer size is unchanged no matter how many items are drawn onto it. Even if the output contains 1 million elements (eg. 1 million symbols), the size of the output buffer is still the same.

On the other hand, a true vector output is indefinitely scalable and can be considered as having infinite resolution. To produce a true vector output, it is necessary to remember the graphics operations for every element in the output buffer. The output buffer size is therefore proportional to the number of elements to draw.

This method tells ChartDirector that it needs to remember the graphics operations to prepare for true vector output. If true vector output is needed, this method should be called immediately after creating the BaseChart object.

If this method is not called, and a vector graphics output format is used (such as SVG), instead of a true vector output, ChartDirector will output a raster image using the vector graphics format. (Most vector graphics formats support embedded raster images.)

CDBaseChartMBS.formatValue(value as Double, formatstring as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Formats a number/date using the ChartDirector formatting syntax as is in Parameter Substitution and Formatting.

ArgumentDefaultDescription
value(Mandatory)The value to be formatted.
formatString(Mandatory)The format string, using {value} to denote the value. For example, ${value|2,} can be used to format the value to 2 decimal points, using "," as the thousand separator, and with a '$' sign in front.

Some examples using this method:

CDBaseChartMBS.getAbsOffsetX as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the x offset of the chart relative to the outermost MultiChart container.

Returns an integer representing the x offset in pixels relative to the outermost MultiChart container, or 0 if the chart is not within a MultiChart container.

Some examples using this method:

CDBaseChartMBS.getAbsOffsetY as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the y offset of the chart relative to the outermost MultiChart container.

Returns an integer representing the y offset in pixels relative to the outermost MultiChart container, or 0 if the chart is not within a MultiChart container.

Some examples using this method:

CDBaseChartMBS.getChartMetrics 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 chart metrics for passing to CChartViewer to support view ports.

The format of the chart metrics is not published.
Return Value
A text string representing the chart metrics.

Some examples using this method:

CDBaseChartMBS.getColor(index as Integer) 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 color at the specified position of the palette.

See Color Specification on how colors are represented in ChartDirector.
ArgumentDefaultDescription
paletteEntry(Mandatory)An index to the palette.
Return Value
The requested color.

CDBaseChartMBS.getDrawArea as CDDrawAreaMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Retrieves the internal DrawArea object that is used to draw the chart.

The most common reason of accessing the internal DrawArea object is to add custom drawings (lines, texts, shapes, etc) to the chart.

If the custom drawings are drawn before drawing the chart image (eg. using BaseChart.makeChart, BaseChart.makeChart or BaseChart.makeChart3), the custom drawings will be at the background of the chart.
Return Value
A DrawArea object that can be used to add custom text and shapes to the chart.

Some examples using this method:

CDBaseChartMBS.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 chart.

CDBaseChartMBS.getHTMLImageMap(url as string, queryFormat as string = "", extraAttr as string = "", 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
Generates an HTML image map for the chart.

This method generates an image map to represent all data points on the chart. It does not include legend box, title box or custom text box. Please use LegendBox.getHTMLImageMap or Box.getImageCoor to produce image maps for these objects.

This method should be called only after creating the chart image (eg. using BaseChart.makeChart, BaseChart.makeChart or BaseChart.makeChart3). The image map cannot be determined without creating the chart image first.

This method accepts a URL as its argument. When generating an image map, it appends query parameters to the URL to indicate which data point the user has clicked.

The following is an example image map generated for a bar chart with 3 bars.

<area shape="rect" coords="34,219,63,139" href="myurl.cpp?x=0&xLabel=Mon&dataSet=0&dataSetName=Revenue&value=100">
<area shape="rect" coords="74,219,103,119" href="myurl.cpp?x=1&xLabel=Tue&dataSet=0&dataSetName=Revenue&value=125">
<area shape="rect" coords="114,219,143,22" href="myurl.cpp?x=2&xLabel=Wed&dataSet=0&dataSetName=Revenue&value=245.78">

The image map consists of multiple <area> tags, one for each bar in the chart. In the "href" attributes, query parameters are appended to the URL to provide information on the bar clicked.

The image map produces by ChartDirector does not include the <map> and </map> tag. This is intentional so that you can add additional custom <area> tags to the image map, or append multiple image maps together.

The type of query parameters to append to the URL depends on the chart type and layer type. The default query parameters are as follows.

Chart/Layer TypeDefault Query Format
Pie chartsector={sector}&label={label}&value={value}&percent={percent}
Bar, Line, Spline, Step Line, Area and Scatter layersx={x}&xLabel={xLabel}&dataSet={dataSet}&dataSetName={dataSetName}&value={value}
Percentage Bar and Percentage Area layersx={x}&xLabel={xLabel}&dataSet={dataSet}&dataSetName={dataSetName}&value={value}&percent={percent}
HLOC and CandleStick layersx={x}&xLabel={xLabel}&high={high}&low={low}&open={open}&close={close}
Box-Whisker layerx={x}&xLabel={xLabel}&top={top}&bottom={bottom}&max={max}&min={min}&med={med}
Trend layerdataSetName={dataSetName}
Vector layer and Polar Vector layerx={x}&xLabel={xLabel}&dataSetName={dataSetName}&value={value}&dir={dir}&len={len}
Polar Line, Area, Spline Line and Spline Area layers"x={x}&label={label}&name={name}&value={value}"

The texts in curly brackets (e.g. {sector}, {dataSet}, etc.) will be replaced by the actual values when generating the image map. For example, {sector} will be replaced by the sector number of the sector.

ChartDirector allows developers to modify the query parameters by using the queryFormat argument. For example, if "x={x}&v={value}" is used as the queryFormat for a XYChart, only the x position and the value of the data point will be included in query parameters.

Please refer to Parameter Substitution and Formatting on all available parameters and their meanings.

In addition to customizing the query parameters, ChartDirector supports additional HTML attributes in the <area> tags by using the extraAttr argument.

For example, the following extraAttr will add an "title" HTML attribute to every <area> tag. The attribute which will contain the x-axis label and the value of the data point. The "title" attribute will be displayed as "tool tip" when the mouse moves over the image map.

title='{xlabel}:{value}'
Another common usage of the extraAttr argument is to add "onmouseover" and "onmouseout" HTML attributes to handle user interaction using Javascript on the browser.
ArgumentDefaultDescription
url(Mandatory)The URL to be used in the "href" attribute of the image map. Parameter Substitution and Formatting is supported. Use an empty string if no href attribute is needed.
queryFormat""A text string representing the template of the query parameters to be appended to the URL. Parameter Substitution and Formatting is supported.

The special keyword "{default}" represents the default query parameters. This is useful for specifying appending to the default.

Note that an empty string means to use the default query query parameters. To specify no query parameter, use a space character.
extraAttr""A text string to specify additional attributes to add to the <area> tag. Parameter Substitution and Formatting is supported.
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 containing the image map generated.

CDBaseChartMBS.getLegend as CDLegendBoxMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the LegendBox object representing the legend box in the chart.

The LegendBox obtains using this method is not fixed. This allows you to add more keys to the legend box, and change the legend box fonts, etc. However, this also means that the legend box size (Box.getWidth and Box.getHeight) is undefined.

To obtain the width and height of the legend box, use BaseChart.layoutLegend.
Return Value
The LegendBox object representing the legend box in the chart.

Some examples using this method:

CDBaseChartMBS.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 chart.

CDBaseChartMBS.gradientColor(colors() as Integer, angle as Double = 90, scale as Double = 1.0, startX as Integer = 0, startY as Integer = 0) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a multi-point linear gradient color.

This method is for backward compatibility. Use BaseChart.linearGradientColor2 instead.
ArgumentDefaultDescription
colorArray(Mandatory)An array defining the positions and colors of the pixels along the reference gradient line segment.
angle90The direction of the reference gradient line segment in degrees, measured clockwise, with 0 degree as the upward pointing direction. The default direction is horizontal from left to right (90 degrees).
scale1.0The scaling factor for the reference gradient line segment. By default, the reference gradient line segment is 256 pixels in length. The scaling factor can be use to stretch or compress the gradient line segment.
startX0The x coordinate of the starting point of the reference gradient line segment.
startY0The y coordinate of the starting point of the reference gradient line segment.
Return Value
A 32-bit integer representing the linear gradient color.

See also:

CDBaseChartMBS.gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a two-point linear gradient color.

This method is for backward compatibility. Use BaseChart.linearGradientColor instead.
ArgumentDefaultDescription
startX(Mandatory)The x coordinate of the starting point of the reference gradient line segment.
startY(Mandatory)The y coordinate of the starting point of the reference gradient line segment.
endX(Mandatory)The x coordinate of the ending point of the reference gradient line segment.
endY(Mandatory)The y coordinate of the ending point of the reference gradient line segment.
startColor(Mandatory)The color at the starting point of the reference gradient line segment.
endColor(Mandatory)The color at the ending point of the reference gradient line segment.
Return Value
A 32-bit integer representing the linear gradient color.

See also:

CDBaseChartMBS.halfColor(c as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a color that is half the intensity of the given color.

ArgumentDefaultDescription
c(Mandatory)The given color.
Return Value
A 32-bit integer representing the half intensity color.

CDBaseChartMBS.initDynamicLayer as CDDrawAreaMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Initializes a dynamic layer for drawing text and shapes.

This method clears the existing dynamic layer, or creates a new one if there is no existing dynamic layer. This method returned a DrawArea object that can be used to draw on the dynamic layer. The dynamic layer can later be removed using BaseChart.removeDynamicLayer.

The design of the dynamic layer is for drawing small, rapidly updatable contents for desktop applications. For example, the dynamic layer can be used to implement a cross-hair mouse cursor, with text showing the location of the mouse cursor. To do this, in the mouse move event handler, BaseChart.initDynamicLayer can be used to create or clear the dynamic layer. The returned DrawArea object can then be used to draw the cross hair cursor (as two straight lines) and the text. When the mouse cursor leaves the chart, BaseChart.removeDynamicLayer can be used in the mouse out event handler to remove the cross-hair cursor and the text.

Note that as long as the dynamic layer is not removed with BaseChart.removeDynamicLayer, only the returned DrawArea object should be used to draw things on the dynamic layer. No other objects should be used to draw on the chart.

Returns a DrawArea object that can be used to add text and shapes to the dynamic layer.

Next items

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


The biggest plugin in space...