Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

CDBaseChartMBS.getLegend as CDLegendBoxMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Gets the LegendBox object representing the legend box in the chart.
Notes:
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.

Feedback, Comments & Corrections

CDBaseChartMBS.getWidth as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 9.2 Yes Yes Yes Yes No
Function: Gets the width of the chart.

Feedback, Comments & Corrections

CDBaseChartMBS.gradientColor(colors() as color, 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 Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other gradientColor method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

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 Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a multi-point linear gradient color.
Notes:
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:

Feedback, Comments & Corrections

CDBaseChartMBS.gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other gradientColor method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

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 Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a two-point linear gradient color.
Notes:
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:

Feedback, Comments & Corrections

CDBaseChartMBS.halfColor(c as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a color that is half the intensity of the given color.
Notes:
ArgumentDefaultDescription
c(Mandatory)The given color.
Return Value
A 32-bit integer representing the half intensity color.

Feedback, Comments & Corrections

CDBaseChartMBS.initDynamicLayer as CDDrawAreaMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 12.3 Yes Yes Yes Yes No
Function: Initializes a dynamic layer for drawing text and shapes.
Notes:
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.

Feedback, Comments & Corrections

CDBaseChartMBS.layout
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Perform auto-scaling of the axis and compute the positions of the various objects in the chart.
Notes:
BaseChart.layout is automatically called when drawing the chart image (eg. using BaseChart.makeChart, BaseChart.makeChart or BaseChart.makeChart3). There is usually no need to call BaseChart.layout explicitly.

However, if you would like to add custom objects to the chart whose positions depend on the axis scales or position of other objects, you may need to call BaseChart.layout explicit to auto-scaling the axis. An example is to draw a custom label at the maximum value point of a data line.

Feedback, Comments & Corrections

CDBaseChartMBS.layoutLegend as CDLegendBoxMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Lays out and gets the LegendBox object representing the legend box in the chart.
Notes:
Once the legend box has been laid out, the width and height is known and can be obtained using Box.getWidth and Box.getHeight. However, you may not perform actions that may affect the legend box sizes, such as changing the fonts or adding more data. You may still move the legend box around by using Box.setPos.

The most common use of this method is to position the legend box based on its actual size.
Return Value
The LegendBox object representing the legend box in the chart.

Feedback, Comments & Corrections

CDBaseChartMBS.linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, colors() as Integer, periodic as boolean=false) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a multi-point linear gradient color.
Notes:
In this method, the color points are defined as an array of positions and colors along a reference line segment, in the following format:

position0, color0, position1, color1, .... positionN, colorN
The positions are specified as a number from 0 - 256 (0 - 100 in hex), in which 0 represents the starting point of the reference line segment, and 256 (100 in hex) represents the ending point of the reference line segment.

For example, the array (in hex):

000000, FF0000, 000080, FFFF00, 000100, 00FF00
means the starting point (000000) is red (FF0000), the mid-point (000080 in hex) is yellow (FFFF00), and the ending point (000100 in hex) is green (00FF00).

One common usage of multi-point gradient colors is to define colors that have metallic look and feel. ChartDirector comes from several predefined gradient color arrays as follows.

NameValue (in Hex)
goldGradient 000000, FFE743, 000060, FFFFE0, 0000B0, FFF0B0, 000100, FFE743
silverGradient 000000, C8C8C8, 000060, F8F8F8, 0000B0, E0E0E0, 000100, C8C8C8
redMetalGradient 000000, E09898, 000060, FFF0F0, 0000B0, F0D8D8, 000100, E09898
greenMetalGradient 000000, 98E098, 000060, F0FFF0, 0000B0, D8F0D8, 000100, 98E098
blueMetalGradient 000000, 9898E0, 000060, F0F0FF, 0000B0, D8D8F0, 000100, 9898E0

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.
colorArray(Mandatory)An array defining the positions and colors of the pixels along the reference gradient line segment.
periodicfalseSpecifies whether the gradient will repeat itself periodically. If the gradient does not repeat itself, the points that lie beyond the end points of the gradient line segment will assume the colors of the end points.
Return Value
A 32-bit integer representing the linear gradient color.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color, periodic as boolean=false) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other linearGradientColor method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer, periodic as boolean=false) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a two-point linear gradient color.
Notes:
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.
periodicfalseSpecifies whether the gradient will repeat itself periodically. If the gradient does not repeat itself, the points that lie beyond the end points of the gradient line segment will assume the colors of the end points.
Return Value
A 32-bit integer representing the linear gradient color.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.makeChart as CDDrawAreaMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Generates the chart in internal format and return a DrawArea object to allow adding custom drawings on top of the chart.
Notes:
If you want to add custom drawings at the background of the chart, use the BaseChart.getDrawArea method to obtain the DrawArea instead.

After finish adding custom drawings, the resulting chart can then be output using other chart output methods.
Return Value
A DrawArea object that can be used to add custom text and shapes to the chart.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.makeChart(format as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Generates the chart as an image in memory.
Notes:
This method is most often used to output the chart directly to an HTTP stream.

ChartDirector supports PNG, JPG, GIF, WBMP and BMP formats, denoted by the following predefined constants:

ConstantValueDescription
PNG0The PNG format.
GIF1The GIF format.
JPG2The JPEG format.
WMP3The WAP bitmap format.
BMP4The BMP format.
SVG5Normal SVG.
SVGZ6Compressed SVG

For vector output (SVG), please call enableVectorOutput early.

ArgumentDefaultDescription
format(Mandatory)A constant representing the format of the image.
Return Value
A memory block containing the binary image of the chart in the requested format.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.makeChart(path as folderitem) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Generates the chart image and save it into a file.
Notes:
ChartDirector supports PNG, JPG, GIF, WBMP and BMP. The format used are selected based on file extension, which should be png, jpg, jpeg, gif, wbmp, wmp or bmp.
ArgumentDefaultDescription
filename(Mandatory)The name of the file to save the image.
Return Value
A true value indicates no error. A false value indicates the operation is unsuccessful.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.makeChartPicture as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Generates the chart as a picture.
Notes: Returns nil on any error.

Feedback, Comments & Corrections

CDBaseChartMBS.patternColor(colorvalues() as color, height as Integer, startX as Integer = 0, startY as Integer = 0) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other patternColor method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.patternColor(colorvalues() as Integer, height as Integer, startX as Integer = 0, startY as Integer = 0) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a pattern color using an array of colors as the bitmap pattern.
Notes:
A pattern color is a dynamic color that changes according to a 2D periodic pattern. When it is used to fill an area, the area will look like being tiled with a wallpaper pattern.
ArgumentDefaultDescription
colorArray(Mandatory)An array of colors representing the colors of the bitmap pixels. The color of the pixel at (x, y) should correspond to index (x + y * width - 1) of the array.
height(Mandatory)The height of the bitmap in pixels. (The width is automatically computed as the size of the color array divided by the height.)
startX0The x coordinate of a reference point to align with the top-left corner the pattern.
startY0The y coordinate of a reference point to align with the top-left corner the pattern.
Return Value
A 32-bit integer representing the pattern color.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.patternColor(file as folderitem, startX as Integer = 0, startY as Integer = 0) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a pattern color by loading the pattern from an image file.
Notes:
A pattern color is a dynamic color that changes according to a 2D periodic pattern. When it is used to fill an area, the area will look like being tiled with a wallpaper pattern.

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
filename(Mandatory)An image file providing the pattern.
startX0The x coordinate of a reference point to align with the top-left corner the pattern.
startY0The y coordinate of a reference point to align with the top-left corner the pattern.
Return Value
A 32-bit integer representing the pattern color.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.patternColor(pic as picture, startX as Integer = 0, startY as Integer = 0) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 12.4 Yes Yes Yes Yes No
Function: Creates a pattern color using a picture.
Notes:
A pattern color is a dynamic color that changes according to a 2D periodic pattern. When it is used to fill an area, the area will look like being tiled with a wallpaper pattern.
ArgumentDefaultDescription
pic(Mandatory)A picture. The color of the pixel at (x, y) should correspond to index (x + y * width - 1) of the array.
startX0The x coordinate of a reference point to align with the top-left corner the pattern.
startY0The y coordinate of a reference point to align with the top-left corner the pattern.
Return Value
A 32-bit integer representing the pattern color.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.radialGradientColor(cx as Integer, cy as Integer, rx as Integer, ry as Integer, data() as Integer, periodic as boolean=false) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a multi-point radial gradient color.
Notes:
In this method, the color points are defined as an array of radial distances and colors, in the following format:

distance0, color0, distance1, color1, .... distanceN, colorN
The distances are specified as a number from 0 - 256 (0 - 100 in hex), in which 0 represents the center of the gradient defining ellipse, and 256 (100 in hex) represents the perimeter of the gradient defining ellipse.

For example, the array (in hex):

000000, FF0000, 000080, FFFF00, 000100, 00FF00
means the center (000000) is red (FF0000), the mid-point (000080 in hex) is yellow (FFFF00), and the perimeter (000100 in hex) is green (00FF00).
ArgumentDefaultDescription
cx(Mandatory)The x coordinate of the center of the radial gradient.
cy(Mandatory)The y coordinate of the center of the radial gradient.
rx(Mandatory)The horizontal radius of the radial gradient defining ellipse.
ry(Mandatory)The vertical radius of the radial gradient defining ellipse.
colorArray(Mandatory)An array defining the radial distances and colors.
periodicfalseSpecifies whether the gradient will repeat itself periodically. If the gradient does not repeat itself, the points that lie outside the gradient defining ellipse will assume the color at the perimeter of the gradient defining ellipse.
Return Value
A 32-bit integer representing the radial gradient color.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.radialGradientColor(cx as Integer, cy as Integer, rx as Integer, ry as Integer, startColor as color, endColor as color, periodic as boolean=false) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other radialGradientColor method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.radialGradientColor(cx as Integer, cy as Integer, rx as Integer, ry as Integer, startColor as Integer, endColor as Integer, periodic as boolean=false) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a two-point radial gradient color.
Notes:
ArgumentDefaultDescription
cx(Mandatory)The x coordinate of the center of the radial gradient.
cy(Mandatory)The y coordinate of the center of the radial gradient.
rx(Mandatory)The horizontal radius of the radial gradient defining ellipse.
ry(Mandatory)The vertical radius of the radial gradient defining ellipse.
startColor(Mandatory)The color at the center of the gradient defining ellipse.
endColor(Mandatory)The color at the perimeter of the gradient defining ellipse.
periodicfalseSpecifies whether the gradient will repeat itself periodically. If the gradient does not repeat itself, the points that lie outside the gradient defining ellipse will assume the color at the perimeter of the gradient defining ellipse.
Return Value
A 32-bit integer representing the radial gradient color.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.removeDynamicLayer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 12.3 Yes Yes Yes Yes No
Function: Removes the dynamic layer if any.

Feedback, Comments & Corrections

CDBaseChartMBS.setAMPM(am as string, pm as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the names to be used to denote morning and afternoon.
Notes:
The default is to use "am" and "pm".
ArgumentDefaultDescription
am(Mandatory)The name used to denote morning.
pm(Mandatory)The name used to denote afternoon.

Feedback, Comments & Corrections

CDBaseChartMBS.setAntiAlias(shapeAntiAlias as Boolean, textAntiAlias as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Controls whether anti-alias is used when drawing lines, shapes and text.
Notes:
For anti-aliasing text, ChartDirector supports the following modes.

ConstantValueDescription
NoAntiAlias0Disable anti-alias when drawing text
AntiAlias1Always use anti-alias when drawing text
AutoAntiAlias2Automatically determine if anti-alias should be used for the text. This is the default.

Currently, ChartDirector will anti-alias only large or bold fonts. For small fonts, assuming it is of high quality, anti-alias is unnecessary. It is because high quality fonts are normally designed to be sharp and clear at low resolution. Anti-aliasing will blur the fonts and make them look worse.

However, for complicated fonts (e.g. some fonts with oriental characters), or for lower quality fonts (e.g. some freeware fonts), anti-alias may be necessary. In this case, it may be needed to force anti-aliasing of all fonts using AntiAlias mode.

ArgumentDefaultDescription
shapeAntiAliastrueA true value enables anti-alias when drawing lines and shapes. A false value disables anti-alias when drawing lines and shapes
textAntiAliasAutoAntiAliasThe text anti-alias mode, which must be one of AutoAntiAlias, AntiAlias or NoAntiAlias.

Feedback, Comments & Corrections

CDBaseChartMBS.setBackground(colorvalue as color, edgeColor as color, raisedEffect as Integer = 0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other setBackground method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.setBackground(colorvalue as Integer, edgeColor as Integer = &hff000000, raisedEffect as Integer = 0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the background color, border color and 3D border effect of the chart.
Notes:
ArgumentDefaultDescription
color(Mandatory)The background color of the chart.
edgeColorTransparentThe border color of the chart.
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.

See also:

Feedback, Comments & Corrections

Previous items Next items

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




Links
MBS Xojo PDF Plugins