Platforms to show: All Mac Windows Linux Cross-Platform
Back to CDBaseChartMBS class.
CDBaseChartMBS.SelectItemFilter(item as Integer) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is typically used in Axis.setMultiFormat and Axis.setMultiFormat2 to select a specific element for special formatting.
| Argument | Default | Description |
|---|---|---|
| item | (Mandatory) | The index of the specified item. |
An integer filter id representing the filter.
CDBaseChartMBS.SetFontSearchPath(path as folderitem)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 14.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method can be used to configure the font search path. You may set your own font search path, or add additional search path before or after the default search path. The usage us like:
CDBaseChartMBS.setFontSearchPath("myPath1;myPath2;%PATH%;myPath3;myPath4");
In the above %PATH% (case sensitive) represents the default search path. This method must be called before the ChartDirector font system is used. It is suggested it be called before any ChartDirector methods. Once ChartDirector tries to look for the fonts (eg. to get font metrics so as to layout a chart), the search path cannot be changed without restarting the process.
e.g. if you use ubuntu, you can install the ttf-mscorefonts-installer package and call this method with "/usr/share/fonts/truetype/msttcorefonts" as the path. No backslash on the end of a path, please.
See also:
CDBaseChartMBS.SetFontSearchPath(path as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method can be used to configure the font search path. You may set your own font search path, or add additional search path before or after the default search path. The usage us like:
CDBaseChartMBS.setFontSearchPath("myPath1;myPath2;%PATH%;myPath3;myPath4");
In the above %PATH% (case sensitive) represents the default search path. This method must be called before the ChartDirector font system is used. It is suggested it be called before any ChartDirector methods. Once ChartDirector tries to look for the fonts (eg. to get font metrics so as to layout a chart), the search path cannot be changed without restarting the process.
e.g. if you use ubuntu, you can install the ttf-mscorefonts-installer package and call this method with "/usr/share/fonts/truetype/msttcorefonts" as the path. No backslash on the end of a path, please.
See also:
CDBaseChartMBS.setLicenseCode(n as string, enddate as Integer, v1 as Integer, v2 as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDBaseChartMBS.setResourceGlobal(id as string, data as MemoryBlock)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 18.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Many ChartDirector features, such as BaseChart.setBgImage and the <*img*> tag in CDML, expect a file or resource path for loading an image. If the image happens to be in memory, such as if the image is retrieved from a database, setResource can be used to assign a resource ID to the memory. It can then be referenced using "@/res_id", in which res_id is the resource ID.
This method stores only a pointer to the memory. It does not copy the memory. You must ensure the memory contains valid content for as long as the resource is being used.
| Argument | Default | Description |
|---|---|---|
| id | (Mandatory) | The resource ID to be used to reference the memory image. |
| data | (Mandatory) | The memory that the image occupies. |
While ChartDirector does not copy the data, the MBS Plugin will put the resources in a dictionary to make sure they stay available till the chart is destroyed and avoid a crash.
See also:
CDBaseChartMBS.setResourceGlobal(id as string, data as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 18.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Many ChartDirector features, such as BaseChart.setBgImage and the <*img*> tag in CDML, expect a file or resource path for loading an image. If the image happens to be in memory, such as if the image is retrieved from a database, setResource can be used to assign a resource ID to the memory. It can then be referenced using "@/res_id", in which res_id is the resource ID.
This method stores only a pointer to the memory. It does not copy the memory. You must ensure the memory contains valid content for as long as the resource is being used.
| Argument | Default | Description |
|---|---|---|
| id | (Mandatory) | The resource ID to be used to reference the memory image. |
| data | (Mandatory) | The memory that the image occupies. |
While ChartDirector does not copy the data, the MBS Plugin will put the resources in a dictionary to make sure they stay available till the chart is destroyed and avoid a crash.
See also:
CDBaseChartMBS.setResourceGlobal(id as string, DrawArea as CDDrawAreaMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 18.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is the same DrawArea.setResource, except that it assigns the resource ID to a CDBaseChartMBS object instead of a memory image. This allows the CDBaseChartMBS object to be reference as an image resource using "@/res_id".
| Argument | Default | Description |
|---|---|---|
| id | (Mandatory) | The resource ID to be used to reference the DrawArea object. |
| drawArea | (Mandatory) | The CDDrawAreaMBS object to be used as a resource. |
While ChartDirector does not copy the draw area, the MBS Plugin will put the resources in a dictionary to make sure they stay available till the chart is destroyed and avoid a crash.
See also:
CDBaseChartMBS.silverColor(angle as Integer = 90) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is a short cut to the CDBaseChartMBS.metalColor method, using grey (CCCCCC 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 silver color.
Some examples using this method:
- /ChartDirector/High Resolution Chart Examples/multivmeter
- /ChartDirector/High Resolution Chart Examples/squareameter
- /ChartDirector/hlinearmeter
- /ChartDirector/linearzonemeter
- /ChartDirector/multihmeter
- /ChartDirector/roundmeter
- /ChartDirector/roundmeter with control
- /ChartDirector/roundmeters with animation
- /ChartDirector/semicirclemeter
- /ChartDirector/squareameter
CDBaseChartMBS.silverGradient as Integer()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The array is in a format that can be directly used in BaseChart.gradientColor2 and DrawArea.gradientColor2. Its contents (in hex) is:
00 C8C8C8 60 F8F8F8 B0 E0E0E0 100 C8C8C8
See Color Specification on how colors are represented in ChartDirector.
CDBaseChartMBS.softLighting(direction as Integer = 8, raisedEffect as Integer = 4) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This effect is best explained by viewing the examples.
ExampleLocation of lighting effect
| Soft Multi-Bar Chart | The bars are shaded using soft lighting effect, with light direction from Top, and raised effect of 4 pixels. |
| Soft Bar Shading | The bars are shaded using soft lighting effect, with light direction from Left, and raised effect of 4 pixels. |
| Spline Line Chart | The title is shaded using soft lighting effect, with light direction from Right, and raised effect of 4 pixels. |
The softLighting 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 |
|---|---|---|
| direction | Top | The direction of the lighting, which must be one of the predefined constants Top, Bottom, Right or Left. |
| raisedEffect | 4 | With soft lighting 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 soft lighting effect.
Some examples using this method:
CDBaseChartMBS.StarShape(slide as Integer) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please refer to Shape Specification for samples and more information on using shapes in ChartDirector.
| Argument | Default | Description |
|---|---|---|
| side | (Mandatory) | The number of points the polygon has. |
An integer shape id representing the star shape.
Some examples using this method:
CDBaseChartMBS.StartOfDayFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is typically used in Axis.setMultiFormat and Axis.setMultiFormat2 to select specific dates/times for formatting as axis labels.
In a date/time series, an element is considered that start of a new day if it is of a different day than the previous element. It does not need to be at exactly the starting instance of the day.
For the first element of the date/time series, because there is no previous element to compare with, it will be considered as the start of a new day if it is "near" the exact starting instance of the current day, in which "near" is defined using the initialMargin argument, expressed as a ratio (0 to 1) of the day duration.
| Argument | Default | Description |
|---|---|---|
| labelStep | 1 | For dates/times that matches the start of day criteria, picks only 1 out of every "labelStep" number of elements. For example, if this argument is 3, only 1 of every 3 elements that at at the start of day will be selected. |
| initialMargin | 0.05 | If the first label is "near" the exact starting instance of the current day to within the ratio specified in the initial margin, it will be considered to have matched the start of day criteria. |
An integer filter id representing the filter.
Some examples using this method:
CDBaseChartMBS.StartOfHourFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is typically used in Axis.setMultiFormat and Axis.setMultiFormat2 to select specific dates/times for formatting as axis labels.
In a date/time series, an element is considered that start of a new hour if it is of a different hour than the previous element. It does not need to be at exactly the starting instance of the hour.
For the first element of the date/time series, because there is no previous element to compare with, it will be considered as the start of a new hour if it is "near" the exact starting instance of the current hour, in which "near" is defined using the initialMargin argument, expressed as a ratio (0 to 1) of the hour duration.
| Argument | Default | Description |
|---|---|---|
| labelStep | 1 | For dates/times that matches the start of hour criteria, picks only 1 out of every "labelStep" number of elements. For example, if this argument is 3, only 1 of every 3 elements that at at the start of hour will be selected. |
| initialMargin | 0.05 | If the first label is "near" the exact starting instance of the current hour to within the ratio specified in the initial margin, it will be considered to have matched the start of hour criteria. |
An integer filter id representing the filter.
CDBaseChartMBS.StartOfMinuteFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 15.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is typically used in Axis.setMultiFormat and Axis.setMultiFormat2 to select specific dates/times for formatting as axis labels.
In a date/time series, an element is considered that start of a new minute if it is of a different minute than the previous element. It does not need to be at exactly the starting instance of the minute.
For the first element of the date/time series, because there is no previous element to compare with, it will be considered as the start of a new minute if it is "near" the exact starting instance of the current minute, in which "near" is defined using the initialMargin argument, expressed as a ratio (0 to 1) of the minute duration.
| Argument | Default | Description |
|---|---|---|
| labelStep | 1 | For dates/times that matches the start of minute criteria, picks only 1 out of every "labelStep" number of elements. For example, if this argument is 3, only 1 of every 3 elements that at at the start of minute will be selected. |
| initialMargin | 0.05 | If the first label is "near" the exact starting instance of the current minute to within the ratio specified in the initial margin, it will be considered to have matched the start of minute criteria. |
Returns an integer filter id representing the filter.
CDBaseChartMBS.StartOfMonthFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is typically used in Axis.setMultiFormat and Axis.setMultiFormat2 to select specific dates/times for formatting as axis labels.
In a date/time series, an element is considered that start of a new month if it is of a different month than the previous element. It does not need to be at exactly the starting instance of the month.
For the first element of the date/time series, because there is no previous element to compare with, it will be considered as the start of a new month if it is "near" the exact starting instance of the current month, in which "near" is defined using the initialMargin argument, expressed as a ratio (0 to 1) of the month duration.
| Argument | Default | Description |
|---|---|---|
| labelStep | 1 | For dates/times that matches the start of month criteria, picks only 1 out of every "labelStep" number of elements. For example, if this argument is 3, only 1 of every 3 elements that at at the start of month will be selected. |
| initialMargin | 0.05 | If the first label is "near" the exact starting instance of the current month to within the ratio specified in the initial margin, it will be considered to have matched the start of month criteria. |
An integer filter id representing the filter.
Some examples using this method:
CDBaseChartMBS.StartOfSecondFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 15.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is typically used in Axis.setMultiFormat and Axis.setMultiFormat2 to select specific dates/times for formatting as axis labels.
In a date/time series, an element is considered that start of a new second if it is of a different second than the previous element. It does not need to be at exactly the starting instance of the second.
For the first element of the date/time series, because there is no previous element to compare with, it will be considered as the start of a new second if it is "near" the exact starting instance of the current second, in which "near" is defined using the initialMargin argument, expressed as a ratio (0 to 1) of the second duration.
| Argument | Default | Description |
|---|---|---|
| labelStep | 1 | For dates/times that matches the start of second criteria, picks only 1 out of every "labelStep" number of elements. For example, if this argument is 3, only 1 of every 3 elements that at at the start of second will be selected. |
| initialMargin | 0.05 | If the first label is "near" the exact starting instance of the current second to within the ratio specified in the initial margin, it will be considered to have matched the start of second criteria. |
Returns an integer filter id representing the filter.
CDBaseChartMBS.StartOfWeekFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is typically used in Axis.setMultiFormat and Axis.setMultiFormat2 to select specific dates/times for formatting as axis labels.
In a date/time series, an element is considered that start of a new week if it is of a different week than the previous element. It does not need to be at exactly the starting instance of the week.
For the first element of the date/time series, because there is no previous element to compare with, it will be considered as the start of a new week if it is "near" the exact starting instance of the current week, in which "near" is defined using the initialMargin argument, expressed as a ratio (0 to 1) of the week duration.
| Argument | Default | Description |
|---|---|---|
| labelStep | 1 | For dates/times that matches the start of week criteria, picks only 1 out of every "labelStep" number of elements. For example, if this argument is 3, only 1 of every 3 elements that at at the start of week will be selected. |
| initialMargin | 0.05 | If the first label is "near" the exact starting instance of the current week to within the ratio specified in the initial margin, it will be considered to have matched the start of week criteria. |
An integer filter id representing the filter.
CDBaseChartMBS.StartOfYearFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is typically used in Axis.setMultiFormat and Axis.setMultiFormat2 to select specific dates/times for formatting as axis labels.
In a date/time series, an element is considered that start of a new year if it is of a different year than the previous element. It does not need to be at exactly the starting instance of the year.
For the first element of the date/time series, because there is no previous element to compare with, it will be considered as the start of a new year if it is "near" the exact starting instance of the current year, in which "near" is defined using the initialMargin argument, expressed as a ratio (0 to 1) of the year duration.
| Argument | Default | Description |
|---|---|---|
| labelStep | 1 | For dates/times that matches the start of year criteria, picks only 1 out of every "labelStep" number of elements. For example, if this argument is 3, only 1 of every 3 elements that at at the start of year will be selected. |
| initialMargin | 0.05 | If the first label is "near" the exact starting instance of the current year to within the ratio specified in the initial margin, it will be considered to have matched the start of year criteria. |
An integer filter id representing the filter.
Some examples using this method:
The items on this page are in the following plugins: MBS ChartDirector Plugin.