MBS Xojo Developer Conference and Training
Join us from 11th to 14th September 2013 in Koblenz.
Join us from 11th to 14th September 2013 in Koblenz.
Platforms to show: All Mac Windows Linux Cross-Platform
CDBaseChartMBS.enableVectorOutput
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 9.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Enables true vector graphics output.
Notes:
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.)
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 9.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Enables true vector graphics output.
Notes:
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
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Formats a number/date using the ChartDirector formatting syntax as is in Parameter Substitution and Formatting.
Notes:
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Formats a number/date using the ChartDirector formatting syntax as is in Parameter Substitution and Formatting.
Notes:
| Argument | Default | Description |
| 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. |
CDBaseChartMBS.getAbsOffsetX as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 12.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the x offset of the chart relative to the outermost MultiChart container.
Notes: 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.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 12.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the x offset of the chart relative to the outermost MultiChart container.
Notes: 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.
CDBaseChartMBS.getAbsOffsetY as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 12.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the y offset of the chart relative to the outermost MultiChart container.
Notes: 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.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 12.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the y offset of the chart relative to the outermost MultiChart container.
Notes: 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.
CDBaseChartMBS.getChartMetrics as string
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the chart metrics for passing to CChartViewer to support view ports.
Notes:
The format of the chart metrics is not published.
Return Value
A text string representing the chart metrics.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the chart metrics for passing to CChartViewer to support view ports.
Notes:
The format of the chart metrics is not published.
Return Value
A text string representing the chart metrics.
CDBaseChartMBS.getChartWeekDay(t as double) as integer
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the weekday represented by a ChartDirector date/time.
Notes:
Return Value
An integer from 0 - 6 representing Sun - Sat.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the weekday represented by a ChartDirector date/time.
Notes:
| Argument | Default | Description |
| t | (Mandatory) | A ChartDirector date/time, that is, a number representing seconds elapsed since 01-01-0001 00:00:00. |
An integer from 0 - 6 representing Sun - Sat.
CDBaseChartMBS.getChartYMD(t as double) as integer
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the year, month and day represented by a ChartDirector date/time.
Notes:
Return Value
An integer which when represented in decimal notation is yyyymmdd, where yyyy is the year, mm is the month (1 - 12), and dd is the day (1 - 31).
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the year, month and day represented by a ChartDirector date/time.
Notes:
| Argument | Default | Description |
| t | (Mandatory) | A ChartDirector date/time, that is, a number representing seconds elapsed since 01-01-0001 00:00:00. |
An integer which when represented in decimal notation is yyyymmdd, where yyyy is the year, mm is the month (1 - 12), and dd is the day (1 - 31).
CDBaseChartMBS.getColor(index as integer) as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the color at the specified position of the palette.
Notes:
See Color Specification on how colors are represented in ChartDirector.
Return Value
The requested color.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the color at the specified position of the palette.
Notes:
See Color Specification on how colors are represented in ChartDirector.
| Argument | Default | Description |
| paletteEntry | (Mandatory) | An index to the palette. |
The requested color.
CDBaseChartMBS.getCopyright as string
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Returns the copyright string of the ChartDirector library.
Example:
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Returns the copyright string of the ChartDirector library.
Example:
MsgBox CDBaseChartMBS.getCopyright
// displays "Copyright (c) 2006 Advanced Software Engineering Limited"
CDBaseChartMBS.getDescription as string
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Returns the library description.
Example:
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Returns the library description.
Example:
MsgBox CDBaseChartMBS.getDescription // displays "ChartDirector"
CDBaseChartMBS.getDrawArea as CDDrawAreaMBS
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Retrieves the internal DrawArea object that is used to draw the chart.
Notes:
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.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Retrieves the internal DrawArea object that is used to draw the chart.
Notes:
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.
CDBaseChartMBS.getHeight as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 9.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the height of the chart.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 9.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: 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
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Generates an HTML image map for the chart.
Notes:
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
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.
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.
Return Value
A text string containing the image map generated.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Generates an HTML image map for the chart.
Notes:
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 chart | sector={sector}&label={label}&value={value}&percent={percent} |
| Bar, Line, Spline, Step Line, Area and Scatter layers | x={x}&xLabel={xLabel}&dataSet={dataSet}&dataSetName={dataSetName}&value={value} |
| Percentage Bar and Percentage Area layers | x={x}&xLabel={xLabel}&dataSet={dataSet}&dataSetName={dataSetName}&value={value}&percent={percent} |
| HLOC and CandleStick layers | x={x}&xLabel={xLabel}&high={high}&low={low}&open={open}&close={close} |
| Box-Whisker layer | x={x}&xLabel={xLabel}&top={top}&bottom={bottom}&max={max}&min={min}&med={med} |
| Trend layer | dataSetName={dataSetName} |
| Vector layer and Polar Vector layer | x={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.
| Argument | Default | Description |
| 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. |
| offsetX | 0 | An 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. |
| offsetY | 0 | An offset to be added to all y coordinates in the image map. See offsetX above for description. |
A text string containing the image map generated.
CDBaseChartMBS.getLegend as CDLegendBoxMBS
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
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.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
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.
CDBaseChartMBS.GetPath(path as folderitem) as string
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets a path string for a folderitem.
Notes: Returns the path in the UTF8 format as ChartDirector needs them.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets a path string for a folderitem.
Notes: Returns the path in the UTF8 format as ChartDirector needs them.
CDBaseChartMBS.getVersion as integer
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets ChartDirector version information.
Notes:
The version number is encoded as a 32-bit integer. The most significant 8 bits is the major version number. The next 8 bits are the minor version number. The least significant 16 bits are the build number.
Return Value
The version information encoded in a 32-bit integer.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets ChartDirector version information.
Notes:
The version number is encoded as a 32-bit integer. The most significant 8 bits is the major version number. The next 8 bits are the minor version number. The least significant 16 bits are the build number.
Return Value
The version information encoded in a 32-bit integer.
CDBaseChartMBS.getWidth as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 9.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the width of the chart.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 9.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Gets the width of the chart.
CDBaseChartMBS.glassEffect(glareSize as integer = 3, glareDirection as integer = 8, raisedEffect as integer = 5) as integer
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A complex shading effect that emulates tinted glass or semi-transparent plastic material.
Notes:
This effect involves glare and variation of lighting caused by reflection and refraction inside the material. It is best explained by viewing the examples.
ExampleLocation of lighting effect
Currently, this effect only works well for long, thin objects, such as title bars, text boxes and bars in bar charts.
The glassEffect method returns an integer representing this effect. The integer can be used as the third argument to Box.setBackground to apply the effect it objects derived from Box (such as labels and titles represented by TextBox). It may also be used as the second argument to Layer.setBorderColor for BarLayer objects to apply the effect to bars.
Usually, NormalGlare is best for thin objects with lightly colored background, while ReducedGlare is best for dark background objects or not-so-thin objects (eg. text boxes using white text on a dark background, or with more than 1 line of text).
Return Value
An integer representing the glass effect.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A complex shading effect that emulates tinted glass or semi-transparent plastic material.
Notes:
This effect involves glare and variation of lighting caused by reflection and refraction inside the material. It is best explained by viewing the examples.
ExampleLocation of lighting effect
| Error Line Chart | The title is shaded using glass effect, with NormalGlare, lighting from Top, and raised effect of 5 pixels. |
| Donut Chart | Both the title and the sector labels are shaded using glass effect with ReducedGlare, lighting from Top, and raised effect of 5 pixels. |
| Glass Multi-Bar Chart | The bars are shaded using glass effect, with NormalGlare, lighting from Left, and raised effect of 5 pixels. |
Currently, this effect only works well for long, thin objects, such as title bars, text boxes and bars in bar charts.
The glassEffect method returns an integer representing this effect. The integer can be used as the third argument to Box.setBackground to apply the effect it objects derived from Box (such as labels and titles represented by TextBox). It may also be used as the second argument to Layer.setBorderColor for BarLayer objects to apply the effect to bars.
| Argument | Default | Description |
| glareSize | NormalGlare | The amount of glare. Must be one of the predefined constants NormalGlare, ReducedGlare or NoGlare. With NormalGlare and ReducedGlare, the glare will cover around 50% and 35% of the object. If NoGlare is used, there will be no glare and the effect will not look like glass at all, but is equivalent to the CDBaseChartMBS.softLighting effect. |
Usually, NormalGlare is best for thin objects with lightly colored background, while ReducedGlare is best for dark background objects or not-so-thin objects (eg. text boxes using white text on a dark background, or with more than 1 line of text).
| glareDirection | Top | The direction of the glare, which must be one of the predefined constants Top, Right, Bottom, Left. |
| raisedEffect | 5 | With glass shading effect, the object will appear to have some 3D depth. The raisedEffect argument controls the amount of 3D depth in pixels. |
An integer representing the glass effect.
CDBaseChartMBS.goldColor(angle as integer = 90) as integer
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Creates a golden color, most commonly used as a background color.
Notes:
This method is a short cut to the CDBaseChartMBS.metalColor method, using yellow (FFEE44 in hex) as the base color.
Return Value
A 32-bit integer representing the golden color.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Creates a golden color, most commonly used as a background color.
Notes:
This method is a short cut to the CDBaseChartMBS.metalColor method, using yellow (FFEE44 in hex) as the base color.
| Argument | Default | Description |
| angle | 90 | The direction for brightness modulation, specified as a clockwise angle in degrees, with 0 being the upward pointing direction. |
A 32-bit integer representing the golden color.
CDBaseChartMBS.goldGradient as integer()
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant array of integers to represent a gradient that looks like a golden color.
Notes:
The array is in a format that can be directly used in BaseChart.gradientColor and DrawArea.gradientColor. Its contents (in hex) is:
00 FFE743 60 FFFFE0 B0 FFF0B0 100 FFE743
See Color Specification on how colors are represented in ChartDirector.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant array of integers to represent a gradient that looks like a golden color.
Notes:
The array is in a format that can be directly used in BaseChart.gradientColor and DrawArea.gradientColor. Its contents (in hex) is:
00 FFE743 60 FFFFE0 B0 FFF0B0 100 FFE743
See Color Specification on how colors are represented in ChartDirector.
CDBaseChartMBS.gradientColor(colors() as color, angle as double = 90, scale as double = 1.0, startX as integer = 0, startY as integer = 0) as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 11.1, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Same as the other gradientColor method, but uses color instead of integer data type for passing color values.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 11.1, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Same as the other gradientColor method, but uses color instead of integer data type for passing color values.
See also:
- gradientColor(colors() as integer, angle as double = 90, scale as double = 1.0, startX as integer = 0, startY as integer = 0) as integer
- gradientColor(startX as integer, startY as integer, endX as integer, endY as integer, startColor as color, endColor as color) as integer
- gradientColor(startX as integer, startY as integer, endX as integer, endY as integer, startColor as integer, endColor as integer) as integer
CDBaseChartMBS.gradientColor(colors() as integer, angle as double = 90, scale as double = 1.0, startX as integer = 0, startY as integer = 0) as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Creates a multi-point linear gradient color.
Notes:
This method is for backward compatibility. Use BaseChart.linearGradientColor2 instead.
Return Value
A 32-bit integer representing the linear gradient color.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Creates a multi-point linear gradient color.
Notes:
This method is for backward compatibility. Use BaseChart.linearGradientColor2 instead.
| Argument | Default | Description |
| colorArray | (Mandatory) | An array defining the positions and colors of the pixels along the reference gradient line segment. |
| angle | 90 | The 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). |
| scale | 1.0 | The 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. |
| startX | 0 | The x coordinate of the starting point of the reference gradient line segment. |
| startY | 0 | The y coordinate of the starting point of the reference gradient line segment. |
A 32-bit integer representing the linear gradient color.
See also:
- gradientColor(colors() as color, angle as double = 90, scale as double = 1.0, startX as integer = 0, startY as integer = 0) as integer
- gradientColor(startX as integer, startY as integer, endX as integer, endY as integer, startColor as color, endColor as color) as integer
- gradientColor(startX as integer, startY as integer, endX as integer, endY as integer, startColor as integer, endColor as integer) as integer
CDBaseChartMBS.gradientColor(startX as integer, startY as integer, endX as integer, endY as integer, startColor as color, endColor as color) as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 11.1, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Same as the other gradientColor method, but uses color instead of integer data type for passing color values.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 11.1, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Same as the other gradientColor method, but uses color instead of integer data type for passing color values.
See also:
- gradientColor(colors() as color, angle as double = 90, scale as double = 1.0, startX as integer = 0, startY as integer = 0) as integer
- gradientColor(colors() as integer, angle as double = 90, scale as double = 1.0, startX as integer = 0, startY as integer = 0) as integer
- gradientColor(startX as integer, startY as integer, endX as integer, endY as integer, startColor as integer, endColor as integer) as integer
CDBaseChartMBS.gradientColor(startX as integer, startY as integer, endX as integer, endY as integer, startColor as integer, endColor as integer) as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Creates a two-point linear gradient color.
Notes:
This method is for backward compatibility. Use BaseChart.linearGradientColor instead.
Return Value
A 32-bit integer representing the linear gradient color.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Creates a two-point linear gradient color.
Notes:
This method is for backward compatibility. Use BaseChart.linearGradientColor instead.
| Argument | Default | Description |
| 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. |
A 32-bit integer representing the linear gradient color.
See also:
- gradientColor(colors() as color, angle as double = 90, scale as double = 1.0, startX as integer = 0, startY as integer = 0) as integer
- gradientColor(colors() as integer, angle as double = 90, scale as double = 1.0, startX as integer = 0, startY as integer = 0) as integer
- gradientColor(startX as integer, startY as integer, endX as integer, endY as integer, startColor as color, endColor as color) as integer
CDBaseChartMBS.greenMetalGradient as integer()
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant array of integers to represent a gradient that looks like a green metallic color.
Notes:
The array is in a format that can be directly used in BaseChart.gradientColor2 and DrawArea.gradientColor2. Its contents (in hex) is:
00 98E098 60 F0FFF0 B0 D8F0D8 100 98E098
See Color Specification on how colors are represented in ChartDirector.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant array of integers to represent a gradient that looks like a green metallic color.
Notes:
The array is in a format that can be directly used in BaseChart.gradientColor2 and DrawArea.gradientColor2. Its contents (in hex) is:
00 98E098 60 F0FFF0 B0 D8F0D8 100 98E098
See Color Specification on how colors are represented in ChartDirector.
CDBaseChartMBS.halfColor(c as integer) as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Creates a color that is half the intensity of the given color.
Notes:
Return Value
A 32-bit integer representing the half intensity color.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Creates a color that is half the intensity of the given color.
Notes:
| Argument | Default | Description |
| c | (Mandatory) | The given color. |
A 32-bit integer representing the half intensity color.
CDBaseChartMBS.initDynamicLayer as CDDrawAreaMBS
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 12.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
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.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 12.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
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.
CDBaseChartMBS.kDataBound as double
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 12.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to -1.7E-100 to represent that the interpolated z values should not exceed the minimum or maximum values of the original data.
Notes: This constant is used in ContourLayer.setZBounds.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 12.3, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to -1.7E-100 to represent that the interpolated z values should not exceed the minimum or maximum values of the original data.
Notes: This constant is used in ContourLayer.setZBounds.
CDBaseChartMBS.kLinearTick as double
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 9.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to +1.5E+308 to represent that the ticks in a log scale axis should be 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 style increments.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 9.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to +1.5E+308 to represent that the ticks in a log scale axis should be 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 style increments.
CDBaseChartMBS.kLogTick as double
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to +1.6e308 to represent that the ticks in a log scale axis should be 1 - 2 - 5 - 10 style increments.
Notes: This constant is used in Axis.setLogScale.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to +1.6e308 to represent that the ticks in a log scale axis should be 1 - 2 - 5 - 10 style increments.
Notes: This constant is used in Axis.setLogScale.
CDBaseChartMBS.kMicroTickOnly as double
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to -1.6e308 to represent that the label position should contain a micro tick only.
Notes: This constant is used in Axis.setLabels and BaseMeter.setScale.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to -1.6e308 to represent that the label position should contain a micro tick only.
Notes: This constant is used in Axis.setLabels and BaseMeter.setScale.
CDBaseChartMBS.kMinorTickOnly as double
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to -1.7e308 to represent that the label position should contain a minor tick only.
Notes: This constant is used in Axis.setLabels.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to -1.7e308 to represent that the label position should contain a minor tick only.
Notes: This constant is used in Axis.setLabels.
CDBaseChartMBS.kNoValue as double
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to 1.7E+308 to represent missing values in ChartDirector.
Notes: Please refer to No Value Specification for more details.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to 1.7E+308 to represent missing values in ChartDirector.
Notes: Please refer to No Value Specification for more details.
CDBaseChartMBS.kTickInc as double
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 9.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to +1E+200 to represent the distance between major ticks.
Notes: This constant is used in CDAxisMBS.setLogScale.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 9.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to +1E+200 to represent the distance between major ticks.
Notes: This constant is used in CDAxisMBS.setLogScale.
CDBaseChartMBS.kTouchBar as double
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to -1.7e-100 to represent that the bars in a bar layer should touch each others with no gap in between.
Notes: This constant is used in BarLayer.setBarGap.
shared method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A constant equals to -1.7e-100 to represent that the bars in a bar layer should touch each others with no gap in between.
Notes: This constant is used in BarLayer.setBarGap.
CDBaseChartMBS.layout
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
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.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
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.
CDBaseChartMBS.layoutLegend as CDLegendBoxMBS
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
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.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
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.
CDBaseChartMBS.linearGradientColor(startX as integer, startY as integer, endX as integer, endY as integer, colors() as color, periodic as boolean=false) as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 11.1, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Same as the other linearGradientColor method, but uses color instead of integer data type for passing color values.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 11.1, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Same as the other linearGradientColor method, but uses color instead of integer data type for passing color values.
See also:
- linearGradientColor(startX as integer, startY as integer, endX as integer, endY as integer, colors() as integer, periodic as boolean=false) as integer
- 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
- 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
CDBaseChartMBS.linearGradientColor(startX as integer, startY as integer, endX as integer, endY as integer, colors() as integer, periodic as boolean=false) as integer
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
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)
Return Value
A 32-bit integer representing the linear gradient color.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
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 |
| Argument | Default | Description |
| 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. |
| periodic | false | Specifies 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. |
A 32-bit integer representing the linear gradient color.
See also:
- linearGradientColor(startX as integer, startY as integer, endX as integer, endY as integer, colors() as color, periodic as boolean=false) as integer
- 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
- 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
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
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 11.1, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Same as the other linearGradientColor method, but uses color instead of integer data type for passing color values.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 11.1, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Same as the other linearGradientColor method, but uses color instead of integer data type for passing color values.
See also:
- linearGradientColor(startX as integer, startY as integer, endX as integer, endY as integer, colors() as color, periodic as boolean=false) as integer
- linearGradientColor(startX as integer, startY as integer, endX as integer, endY as integer, colors() as integer, periodic as boolean=false) as integer
- 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
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
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Creates a two-point linear gradient color.
Notes:
Return Value
A 32-bit integer representing the linear gradient color.
method, ChartDirector, MBS Real Studio ChartDirector Plugin (ChartDirector5), class CDBaseChartMBS,
Plugin version: 8.2, Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: Creates a two-point linear gradient color.
Notes:
| Argument | Default | Description |
| 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. |
| periodic | false | Specifies 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. |
A 32-bit integer representing the linear gradient color.
See also:
- linearGradientColor(startX as integer, startY as integer, endX as integer, endY as integer, colors() as color, periodic as boolean=false) as integer
- linearGradientColor(startX as integer, startY as integer, endX as integer, endY as integer, colors() as integer, periodic as boolean=false) as integer
- 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
The items on this page are in the following plugins: MBS Real Studio ChartDirector Plugin.
Links
MBS Realbasic PDF Plugins