Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Next items

CDBaseChartMBS.AllPassFilter as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a data filter that matches every element.
Notes:
This method is typically used in Axis.setMultiFormat and Axis.setMultiFormat2 as a "catch all" filter.
Return Value
An integer filter id representing the filter.

Feedback, Comments & Corrections

CDBaseChartMBS.ArrowShape(angle as Double = 0.0, widthRatio as Double = 1, stemWidthRatio as Double = 0.5, stemLengthRatio as Double = 0.5) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 15.1 Yes Yes Yes Yes No
Function: Gets the shape id that represents an arrow shape.
Notes:
Please refer to Shape Specification for samples and more information on using shapes in ChartDirector.

ArgumentDefaultDescription
angle0The clockwise angle of the arrow relative to the upward pointing position.
widthRatio1The width of the base of the arrow head as a ratio to the height of the entire arrow. Must be between 0 and 1.
stemWidthRatio0.5The width of the arrow stem as a ratio to the width of the base of the arrow head. Must be between 0 and 1.
stemLengthRatio0.5The length of the arrow stem as a ratio to the height of the entire arrow. Must be between 0 and 1.

Returns an integer shape id representing the arrow shape.

Feedback, Comments & Corrections

CDBaseChartMBS.barLighting(startBrightness as Double = 0.75, endBrightness as Double = 1.5) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 9.2 Yes Yes Yes Yes No
Function: A special shading effect for rectangular and polygonal bars on a CDBarLayerMBS.
Notes:
It shades all surfaces of a 2D or 3D bar with gradient colors.

For the front surface of a bar, the gradient is from base line of the bar to the end of the bar. For example, for a vertical bar pointing upwards, the gradient is from bottom to the top. Similarly, for a horizontal bar pointing rightwards, the gradient is from left to right.

For a 3D bar, the gradient for the top surface of a vertical bar or the right surface of a horizontal bar is from front to back. The gradients for the side surfaces are the same as for the front surface.

The gradient is specified with two brightness values at the gradient end points. A brightness less than 1 means the color is darkened, while a brightness greater than 1 means the color is brightened. For example, a brightness of 0.5 means the color is half as bright as the original color. If the original color is red, the color will become dark red. Conversely, a brightness of 2 means the color is twice as bright as the original color. If the original color is red, the color will become light red.

The followings are some examples demonstrating this effect.

The barLighting method returns an integer representing this effect. The integer can be used as the second argument to CDLayerMBS.setBorderColor for CDBarLayerMBS objects to apply the effect to bars.

Arguments:
ArgumentDefaultDescription
startBrightness0.75The brightness at the starting point.
endBrightness1.5The brightness at the ending point.

Return Value
An integer representing the bar lighting effect.

Feedback, Comments & Corrections

CDBaseChartMBS.blueMetalGradient as Integer()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: A constant array of integers to represent a gradient that looks like a blue 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 9898E0 60 F0F0FF B0 D8D8F0 100 9898E0
See Color Specification on how colors are represented in ChartDirector.

Feedback, Comments & Corrections

CDBaseChartMBS.brushedGoldColor(texture as Integer = 2, angle as Integer = 90) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 9.2 Yes Yes Yes Yes No
Function: Creates a brushed golden color, most commonly used as a background color.
Notes:
This method is a short cut to the CDBaseChartMBS.brushedMetalColor method, using yellow (FFEE44 in hex) as the base color.

Arguments:
ArgumentDefaultDescription
texture2The strength of the brushed texture. Must be 0, 1, 2 or 3 for no texture, light texture, medium texture and strong texture.
angle90The direction for brightness modulation, specified as a clockwise angle in degrees, with 0 being the upward pointing direction.

Return Value:
A 32-bit integer representing the brushed golden color.

Feedback, Comments & Corrections

CDBaseChartMBS.brushedMetalColor(c as Integer, texture as Integer = 2, angle as Integer = 90) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 9.2 Yes Yes Yes Yes No
Function: Creates a color by modulates the brightness of another color to create brushed metallic shiny effects.
Notes:
The brightness of the color will vary smoothly across the image in a given a direction, so as to produce a shiny effect. The color will then be modulated with a horizontal texture to create the brushed effect. The modulation period will be the same as the size of the image, so this method is best use to create background colors.

Arguments:
ArgumentDefaultDescription
c(Mandatory)The color to be modulated.
texture2The strength of the brushed texture. Must be 0, 1, 2 or 3 for no texture, light texture, medium texture and strong texture.
angle90The direction for brightness modulation, specified as a clockwise angle in degrees, with 0 being the upward pointing direction.

Return Value:
A 32-bit integer representing the brushed metallic color.

Feedback, Comments & Corrections

CDBaseChartMBS.brushedSilverColor(texture as Integer = 2, angle as Integer = 90) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 9.2 Yes Yes Yes Yes No
Function: Creates a brushed silver color, most commonly used as a background color.
Notes:
This method is a short cut to the CDBaseChartMBS.brushedMetalColor method, using grey (DDDDDD in hex) as the base color.

Arguments:
ArgumentDefaultDescription
texture2The strength of the brushed texture. Must be 0, 1, 2 or 3 for no texture, light texture, medium texture and strong texture.
angle90The direction for brightness modulation, specified as a clockwise angle in degrees, with 0 being the upward pointing direction.

Return Value
A 32-bit integer representing the brushed silver color.

Feedback, Comments & Corrections

CDBaseChartMBS.bSearch(values() as Double, value as Double) as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 12.3 Yes Yes Yes Yes No
Function: Uses binary search to search for a value in an array.
Notes:
This method returns the array index of the value in the array, which must be sorted in ascending order.

If the value is in between two elements of the array, this method returns a non-integer that interpolates the indexes of the two elements. For example, suppose the array consists of 3 elements [4, 6, 10]. If this method is used to search for the value 7, it will return 1.25.

If the value is smaller or larger than all the elements in the array, this method returns the nearest index, which must be either 0 or the index of the last element of the array.

ArgumentDefaultDescription
a(Mandatory)The array to be searched.
v(Mandatory)The value to search for.

Returns the index of the value within the array. If the value is in between two elements of the array, this method returns a non-integer that interpolates the indexes of the two elements. If the value is smaller or larger than all the elements in the array, thie method returns the nearest index.

Feedback, Comments & Corrections

CDBaseChartMBS.chartTime(t as Integer) as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Converts a UNIX time (seconds elapsed since 01-01-1970 00:00:00 GMT) to the date/time format used by ChartDirector.
Notes:
The UNIX time will be converted assuming based on local time zone (the time zone settings of the operating system).
ArgumentDefaultDescription
t(Mandatory)A time represented as seconds elapsed since 01-01-1970 00:00:00 GMT.
Return Value
The second elapsed since 01-01-0001 00:00:00 to the given time.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.chartTime(year as Integer, month as Integer, day as Integer, hour as Integer = 0, minute as Integer = 0, second as Integer = 0) as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Obtain the second elapsed since 01-01-0001 00:00:00 to the given time, which is the date/time format used by ChartDirector.
Notes:
ArgumentDefaultDescription
y(Mandatory)The year component of the given time.
m(Mandatory)The month component of the given time
d(Mandatory)The day of month component of the given time.
h0The hour component of the given time.
n0The minute component of the given time.
s0The second component of the given time.
Return Value
The second elapsed since 01-01-0001 00:00:00 to the given time.

See also:

Feedback, Comments & Corrections

CDBaseChartMBS.ClearTypeColor(gamma as Double = 0) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 12.3 Yes Yes Yes Yes No
Function: Gets a value to represent that standard ClearType or a similar technology be used for font rendering.
Notes:
This constant is used in BaseChart.setAntiAlias and DrawArea.setAntiAlias.

ClearType is a Microsoft font rendering technology that renders text more accurately with subpixel rendering. Similar technologies include Quartz in Mac OS X, Adobe CoolType and other unnamed algorithms. Although this API uses ClearType in its name, ChartDirector may use ClearType or a similar technology depending on the operating system and programming language.

In most modern flat panel displays, a pixel is consisted of 3 sub-pixels R, G and B for the red, green and blue colors, typically arranged horizontally. So a row of pixels is actually a sequence of subpixels like RGBRGBRGBRGB... To display a white pixel, the display hardware turns on the RGB subpixels.

It happens a white dot can also be made by turning on the GB subpixels of one pixel, and the R subpixel of the next pixel to the right. This will result in 3 consecutive subpixels GBR, which is also white. This white dot will be in between the two pixels, with 2/3 on the left pixel, and 1/3 on the right pixel. In other words, it is possible to position a white dot in between two pixels without blurring it. ClearType uses this effect to render text with subpixel accuracy.

Apart from subpixel rendering, ClearType may adjust the glyph shapes to fit the pixel grid (technically called hinting) differently from classical rendering. As a result, the glyph shapes and sizes in ClearType may be different from classical rendering.

One issue with ClearType is that it is hardware dependent. To work perfectly, it needs to know the subpixels ordering of the display. In many applications, the charts are rendered on one computer, but viewed using another computer. For example, in a web application, the charts can be rendered on the server but displayed on the browser computer. The chart generating computer may not know the subpixel configuration of the viewing computer. If ClearType is used, there is a risk that the text may look suboptimal on the viewing computer.

To address the above issues, ChartDirector supports a hardware independent ClearType method, represented by ClearTypeMono. This is basically ClearType with subpixel rendering disabled. The resulting text has no color distortion. Black and white text will not be as sharp as standard ClearType, but is still better than classical anti-alias. The charts rendered can be viewed equally well with different types of displays. This is especially useful for applications in which the charts are rendered and viewed by different computers.

ArgumentDefaultDescription
gamma0Specifies the level of gamma correction used for ClearType font rendering. This is usually a number between 1 to 2.5. A value of 0 means the default gamma level.

Feedback, Comments & Corrections

CDBaseChartMBS.ClearTypeMono(gamma as Double = 0) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 12.3 Yes Yes Yes Yes No
Function: Gets a value to represent that hardware independent ClearType or a similar technology be used for font rendering.
Notes:
This constant is used in BaseChart.setAntiAlias and DrawArea.setAntiAlias.

Please refer to ClearTypeColor on the detail explanation of what is standard ClearType and hardware independent ClearType.

ArgumentDefaultDescription
gamma0Specifies the level of gamma correction used for ClearType font rendering. This is usually a number between 1 to 2.5. A value of 0 means the default gamma level.

Feedback, Comments & Corrections

CDBaseChartMBS.ColorToInteger(c as color, alpha as Integer = 0) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Converts a REALbasic color object to an integer for ChartDirector.

Feedback, Comments & Corrections

CDBaseChartMBS.Cross2Shape(width as Double = 0.5) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Gets the shape id that represents a 'X' shape.
Notes:
Please refer to Shape Specification for samples and more information on using shapes in ChartDirector.
ArgumentDefaultDescription
width(Mandatory)The percentage width of the arms of the a 'X' relative to the entire shape. Must be between 0 and 1.
Return Value
An integer shape id representing the a 'X' shape.

Feedback, Comments & Corrections

CDBaseChartMBS.CrossShape(width as Double = 0.5) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Gets the shape id that represents a '+' shape.
Notes:
Please refer to Shape Specification for samples and more information on using shapes in ChartDirector.
ArgumentDefaultDescription
width(Mandatory)The percentage width of the arms of the a '+' relative to the entire shape. Must be between 0 and 1.
Return Value
An integer shape id representing the a '+' shape.

Feedback, Comments & Corrections

CDBaseChartMBS.cylinderEffect(orientation as Integer = 5, ambientIntensity as Double = 0.5, diffuseIntensity as Double = 0.5, specularIntensity as Double = 0.75, shininess as Integer = 8) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 9.2 Yes Yes Yes Yes No
Function: A special shading effect that emulates the lighting of a cylinder surface.
Notes:
This effect adjusts the brightness of the color of a rectangular box to make it look like cylindrical. The brightness is adjusted as according to the Phong lighting model, in which the light source is from the viewer direction and is far away.

The cylinderEffect method returns an integer representing this effect. The integer can be used as the third argument to CDBoxMBS.setBackground to apply the effect to Box objects (including derived objects such as CDTextBoxMBS objects).

This effect is automatically used for cylindrical bars in a CDBarLayerMBS. You may use this method to adjust the lighting parameters by using its return value as the second argument to CDLayerMBS.setBorderColor.

Arguments:
ArgumentDefaultDescription
orientationkCenterThe orientation of the cylinder. A value of kTop or kBottom means the cylinder is vertical. A value of kLeft or kRight means the cylinder is horizontal. A value of kCenter means the orientation is automatically determined. For a CDBarLayerMBS, the orientation will be the same as the orientation of the bars. For other objects (eg. CDTextBoxMBS objects), if the object height is bigger than its width, the cylinder will be treated as vertical, otherwise it will be treated as horizontal.
ambientIntensity0.5The ambient reflection coefficient of the Phong lighting model.
diffuseIntensity0.5The diffuse reflection coefficient of the Phong lighting model.
specularIntensity0.75The specular reflection coefficient of the Phong lighting model.
shininess8The shininess coefficient of the Phong lighting model.

Return Value
An integer representing the cylinder effect.

Feedback, Comments & Corrections

CDBaseChartMBS.defaultPalette as Integer()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 12.4 Yes Yes Yes Yes No
Function: Returns the default palette.

Feedback, Comments & Corrections

CDBaseChartMBS.flatBorder(thickness as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 15.1 Yes Yes Yes Yes No
Function: Specifies a flat border of a given width.
Notes:
The flatBorder method returns an integer representing this effect. The integer can be used as the third argument to Box.setBackground to apply the effect to Box objects (including derived objects such as TextBox objects). It may also be used as the second argument to Layer.setBorderColor for BarLayer or BoxWhiskerLayer objects to apply the effect to bars or boxes.

ArgumentDefaultDescription
width(Mandatory)The border width. A positive value means the border is drawn inside the box or bar. A negative value means the border is outside the box or bar.

Returns an integer representing using flat border of the specified width.

Feedback, Comments & Corrections

CDBaseChartMBS.getChartWeekDay(t as Double) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Gets the weekday represented by a ChartDirector date/time.
Notes:
ArgumentDefaultDescription
t(Mandatory)A ChartDirector date/time, that is, a number representing seconds elapsed since 01-01-0001 00:00:00.
Return Value
An integer from 0 - 6 representing Sun - Sat.

Feedback, Comments & Corrections

CDBaseChartMBS.getChartYMD(t as Double) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Gets the year, month and day represented by a ChartDirector date/time.
Notes:
ArgumentDefaultDescription
t(Mandatory)A ChartDirector date/time, that is, a number representing seconds elapsed since 01-01-0001 00:00:00.
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).

Feedback, Comments & Corrections

CDBaseChartMBS.getCopyright as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Returns the copyright string of the ChartDirector library.
Example:
MsgBox CDBaseChartMBS.getCopyright
// displays "Copyright (c) 2006 Advanced Software Engineering Limited"

Feedback, Comments & Corrections

CDBaseChartMBS.getDescription as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Returns the library description.
Example:
MsgBox CDBaseChartMBS.getDescription // displays "ChartDirector"

Feedback, Comments & Corrections

CDBaseChartMBS.GetPath(path as folderitem) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Gets a path string for a folderitem.
Notes: Returns the path in the UTF8 format as ChartDirector needs them.

Feedback, Comments & Corrections

CDBaseChartMBS.getVersion as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Gets ChartDirector version information.
Example:
dim v as Integer = CDBaseChartMBS.getVersion

dim v1 as Integer = Bitwise.BitAnd( Bitwise.ShiftRight(v, 24), 255)
dim v2 as Integer = Bitwise.BitAnd( Bitwise.ShiftRight(v, 16), 255)
dim v3 as Integer = Bitwise.BitAnd( v, 65535)

MsgBox str(v1)+"."+str(V2)+"."+str(V3)
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.

Feedback, Comments & Corrections

CDBaseChartMBS.glassEffect(glareSize as Integer = 3, glareDirection as Integer = 8, raisedEffect as Integer = 5) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
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 ChartThe title is shaded using glass effect, with NormalGlare, lighting from Top, and raised effect of 5 pixels.
Donut ChartBoth 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 ChartThe 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.
ArgumentDefaultDescription
glareSizeNormalGlareThe 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).
glareDirectionTopThe direction of the glare, which must be one of the predefined constants Top, Right, Bottom, Left.
raisedEffect5With glass shading effect, the object will appear to have some 3D depth. The raisedEffect argument controls the amount of 3D depth in pixels.
Return Value
An integer representing the glass effect.

Feedback, Comments & Corrections

CDBaseChartMBS.goldColor(angle as Integer = 90) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
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.
ArgumentDefaultDescription
angle90The direction for brightness modulation, specified as a clockwise angle in degrees, with 0 being the upward pointing direction.
Return Value
A 32-bit integer representing the golden color.

Feedback, Comments & Corrections

CDBaseChartMBS.goldGradient as Integer()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

CDBaseChartMBS.greenMetalGradient as Integer()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

CDBaseChartMBS.kDataBound as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method ChartDirector MBS ChartDirector Plugin 12.3 Yes Yes Yes Yes No
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.

Feedback, Comments & Corrections

Next items

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





Links
MBS FileMaker tutorial videos