Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDSurfaceChartMBS class.

CDSurfaceChartMBS.addSurfaceLine(x() as double, y() as double, colorValue as Integer, lineWidth as Integer = -1, side as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a multi-segment line to the surface.

ArgumentDefaultDescription
x(Mandatory)An array of containing the x coordinates of the data points that define the line.
y(Mandatory)An array of containing the y coordinates of the data points that define the line.
color(Mandatory)The color of the line.
lineWidth1The line width (thickness).
side0A value of 1 means the line is drawn on the front side of the surface. A value of 0 means the line is drawn on the back side of the surface. The default value of 0 means the line is drawn on both sides of the surface.

See also:

CDSurfaceChartMBS.addSurfaceLine(x1 as double, y1 as double, x2 as double, y2 as double, colorValue as Integer, lineWidth as Integer = -1, side as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a line segment to the surface.

ArgumentDefaultDescription
x1(Mandatory)The x data coordinate of the first end-point of the line.
y1(Mandatory)The y data coordinate of the first end-point of the line.
x2(Mandatory)The x data coordinate of the second end-point of the line.
y2(Mandatory)The y data coordinate of the second end-point of the line.
color(Mandatory)The color of the line.
lineWidth1The line width (thickness).
side0A value of 1 means the line is drawn on the front side of the surface. A value of 0 means the line is drawn on the back side of the surface. The default value of 0 means the line is drawn on both sides of the surface.

See also:

CDSurfaceChartMBS.addSurfaceZone(x1 as double, y1 as double, x2 as double, y2 as double, fillColor as Integer, edgeColor as Integer = &hff000000, edgeWidth as Integer = 1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a rectangular zone to the surface.

ArgumentDefaultDescription
x1(Mandatory)The x data coordinate for the first corner of the rectangle.
y1(Mandatory)The y data coordinate for the first corner of the rectangle.
x2(Mandatory)The x data coordinate for the corner opposite to the first corner.
y2(Mandatory)The y data coordinate for the corner opposite to the first corner.
fillColor(Mandatory)The fill color of the rectangle.
edgeColorTransparentThe border color of the rectangle.
edgeWidth1The border width in pixels.

CDSurfaceChartMBS.addXYProjection(offset as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a projection of the surface on the XY wall.

The XY wall is the wall containing the x axis and y axis. It is usually under the plotted surface. Because of this, the surface may block the projection, making it hard to see. To address this issue, it is common to add a bottom margin to the z-axis (see Axis.setMargin). This will move the z-axis scale and therefore the surface upwards, leaving more space between the surface and the XY wall to make the projection more visible.

This method accepts an optional offset argument that can be used to move the projection vertically. A positive offset moves the it upwards. A negative offset moves it under the XY wall. Because of this, for negative offsets, the XY wall must be hidden using ThreeDChart.setWallVisibility, otherwise the chart will not be drawn correctly.

ArgumentDefaultDescription
offset0The vertical offset of the XY projection in 3D pixel coordinates. A positive offset moves it upwards. A negative offset moves it under the XY wall.

Some examples using this method:

CDSurfaceChartMBS.Constructor(width as Integer = 640, height as Integer = 480, bgColor as Integer = &hffff0000, edgeColor as Integer = &hff000000, raisedEffect as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new SurfaceChart object.

Arguments:
ArgumentDefaultDescription
width(Mandatory)The width of the chart in pixels.
height(Mandatory)The height of the chart in pixels.
bgColorkBackgroundColorThe background color of the chart.
edgeColorkTransparentThe edge color of the chart.
raisedEffect0The 3D border width. For positive values, the border will appear raised. For negative values, the border will appear depressed. A zero value means the border will appear flat.

See also:

CDSurfaceChartMBS.Constructor(width as Integer, height as Integer, bgColor as color, edgeColor as color, raisedEffect as Integer = 0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Same as the other Constructor method, but uses color instead of integer data type for passing color values.

See also:

CDSurfaceChartMBS.getValuesAtPixel(x as Integer, y as Integer) as Double()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the (x, y, z, w) values of the surface at the specified image pixel coordinates.

This method is valid only after the chart image has been drawn (eg. using BaseChart.makeChart, BaseChart.makeChart2 or BaseChart.makeChart3). It is typically used to provide user feedback when the mouse moves on the chart.

If w values are not provided to the surface chart, the returned w value will be set to the same as the z value. If the pixel is not on the plotted surface, the returned array will be empty or null.

ArgumentDefaultDescription
x(Mandatory)The x pixel coordinate.
y(Mandatory)The y pixel coordinate.

Returns an array of 4 numbers representing the x, y, z and w values at the image pixel location. If the pixel is not on the plotted surface, the returned array will be empty or null.

CDSurfaceChartMBS.setBackSideBrightness(brightness as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the back side brightness as a ratio of the front side brightness.

The surface of a surface chart has two sides. The side that is facing the positive z direction of the plot region is the front side. The side that is facing the negative z direction of the plot region is the back side.

By default, the back side brightness is half the front side brightness. This method can be used to adjust the ratio.

Arguments:
ArgumentDefaultDescription
brightness(Mandatory)The ratio of the back side brightness to the front side brightness.

CDSurfaceChartMBS.setBackSideColor(ColorValue as color)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Same as the other setBackSideColor method, but uses color instead of integer data type for passing color values.

See also:

CDSurfaceChartMBS.setBackSideColor(ColorValue as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the color of the back side of the surface.

The surface of a surface chart has two sides. The side that is facing the positive z direction of the plot region is the front side. The side that is facing the negative z direction of the plot region is the back side.

By default, the back side is colored similar to the front side, but with different brightness of lighting parameters. This method can be used to color the back side with a fixed color instead.

Arguments:
ArgumentDefaultDescription
color(Mandatory)The color used for the back side.

See also:

CDSurfaceChartMBS.setBackSideLighting(ambientLight as Double, diffuseLight as Double, specularLight as Double, shininess as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the Phong lighting parameters for the back side of the surface.

The surface of a surface chart has two sides. The side that is facing the positive z direction of the plot region is the front side. The side that is facing the negative z direction of the plot region is the back side.

ChartDirector uses the Phong lighting model to adjust the brightness of the surface to make it look realistic. The default lighting parameters for the back side is half the brightness of those for the front side. This method may be used to set alternative lighting parameters for the back side.

Arguments:
ArgumentDefaultDescription
ambientIntensity(Mandatory)The ambient reflection coefficient of the Phong lighting model.
diffuseIntensity(Mandatory)The diffuse reflection coefficient of the Phong lighting model.
specularIntensity(Mandatory)The specular reflection coefficient of the Phong lighting model.
shininess(Mandatory)The shininess coefficient of the Phong lighting model.

CDSurfaceChartMBS.setContourColor(contourColor as color, minorContourColor as color)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Same as the other setContourColor method, but uses color instead of integer data type for passing color values.

See also:

CDSurfaceChartMBS.setContourColor(contourColor as Integer, minorContourColor as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the colors of the contour lines on the surface.

The contour lines are lines that join regions of the same z value on the surface. The contour levels are determined by the ticks on the z-axis. Major ticks associate with major contour lines. Minor ticks associate with minor contour lines.

Arguments:
ArgumentDefaultDescription
contourColor(Mandatory)The color of the major contour lines.
minorContourColor-1The color of the minor contour lines. -1 means it is the same as the contourColor.

See also:

CDSurfaceChartMBS.setData(xData() as Double, yData() as Double, zData() as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the data for the surface chart.

ChartDirector supports both gridded and scattered data. If the data points are on a rectangular grid will no missing points, they will be handled as gridded data. Otherwise, they will be handled as scattered data.

For gridded data, you may provide the x and y values of the grid, and the z values of the data points. For a 10 x 15 grid, that means the x data series should have 10 values, the y data series should have 15 values, and the z data series should have 150 values. The x and y data series should be strictly monotonic (either strictly increasing or strictly decreasing).

For both gridded and scattered data, you may also provide the (x, y, z) values of the data points. For example, for 150 data points, the x, y and z data series should each have 150 values. ChartDirector will automatically detect if the data points are gridded or scattered.

Arguments:
ArgumentDefaultDescription
xData(Mandatory)An array of numbers representing the x data series.
yData(Mandatory)An array of numbers representing the y data series.
zData(Mandatory)An array of numbers representing the z data series.

See also:

CDSurfaceChartMBS.setData(xData() as double, yData() as double, zData() as double, wData() as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the data for the surface chart.

See also:

CDSurfaceChartMBS.setInterpolation(xSamples as Integer, ySamples as Integer = -1, isSmooth as Boolean = true)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Enables and sets the degree and method of interpolation of the data points.

A surface chart consists of planar patches, drawn using the data points as the vertices. To create visually smooth surfaces, we may use a large number of small planar patches. However, this requires a large number of data points.

For example, consider a plot region of which the x and y dimensions are both 400 pixels in length. To create a smooth surface, if gridded data are used, the distance between grid lines should be no more than a few pixels. Suppose a grid spacing of 8 pixels is used. The grid size will be 51 x 51, and 2601 data points will be needed.

If the number of available data points are too small to create a smooth surface, This method can be used to generate a denser grid of data points from the original data points using interpolation.

Two types of interpolation are supported. In spline surface interpolation, ChartDirector will compute a smooth surface that passes through the original data points, and sample the spline surface for the new data points. In bilinear/linear interpolation, ChartDirector will apply bilinear/linear interpolation to its vertices of the original patches to compute the new data points.

Arguments:
ArgumentDefaultDescription
xSamples(Mandatory)The number of samples on the x-dimension to interpolate to.
ySamples-1The number of samples on the y-dimension to interpolate to. -1 means it is the same as xSamples.
isSmoothtrueA true value means to use spline surface interpolation. A false value means to use bilinear/linear interpolation.

See also:

Some examples using this method:

CDSurfaceChartMBS.setInterpolation(xSamples as Integer, ySamples as Integer, isSmooth as Boolean, isColorSmooth as Boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Enables and sets the degree and method of interpolation of the data points.

A surface chart consists of planar patches, drawn using the data points as the vertices. To create visually smooth surfaces, we may use a large number of small planar patches. However, this requires a large number of data points.

For example, consider a plot region of which the x and y dimensions are both 400 pixels in length. To create a smooth surface, if gridded data are used, the distance between grid lines should be no more than a few pixels. Suppose a grid spacing of 8 pixels is used. The grid size will be 51 x 51, and 2601 data points will be needed.

If the number of available data points are too small to create a smooth surface, This method can be used to generate a denser grid of data points from the original data points using interpolation.

Two types of interpolation are supported. In spline surface interpolation, ChartDirector will compute a smooth surface that passes through the original data points, and sample the spline surface for the new data points. In bilinear/linear interpolation, ChartDirector will apply bilinear/linear interpolation to its vertices of the original patches to compute the new data points.

ArgumentDefaultDescription
xSamples(Mandatory)The number of samples on the x-dimension to interpolate to.
ySamples-1The number of samples on the y-dimension to interpolate to. -1 means it is the same as xSamples.
isSmoothtrueA true value means to use spline surface interpolation for the z values. A false value means to use bilinear/linear interpolation.
isColorSmooth(Optional)A true value means to use spline surface interpolation for the w values. A false value means to use bilinear/linear interpolation. If this argument is not specified, the default is to use the same interpolation method as the z values.

See also:

CDSurfaceChartMBS.setLighting(ambientIntensity as Double, diffuseIntensity as Double, specularIntensity as Double, shininess as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the Phong lighting parameters for the front side of the surface.

The surface of a surface chart has two sides. The side that is facing the positive z direction of the plot region is the front side. The side that is facing the negative z direction of the plot region is the back side.

ChartDirector uses the Phong lighting model to adjust the brightness of the surface to make it look realistic. The light source is assumed to be from the direction of the viewer and is far away. The default lighting parameters for the front side are 0.5 for both ambient and diffuse reflections, 1 for specular reflection and 8 for shininess.

Arguments:
ArgumentDefaultDescription
ambientIntensity(Mandatory)The ambient reflection coefficient of the Phong lighting model.
diffuseIntensity(Mandatory)The diffuse reflection coefficient of the Phong lighting model.
specularIntensity(Mandatory)The specular reflection coefficient of the Phong lighting model.
shininess(Mandatory)The shininess coefficient of the Phong lighting model.

CDSurfaceChartMBS.setShadingMode(shadingMode as Integer, wireWidth as Integer = 1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the shading mode for the surface.

ChartDirector supports the following methods for shading the surface.

ConstantValueDescription
kSmoothShading0The brightness of the surface varies smoothly.
kTriangularShading0The surface is divided into triangular patches. The brightness of the patches varies according to their orientation. Within a patch, the brightness is constant.
kRectangularShading0The surface is divided into rectangular patches. The brightness of the patches varies according to their orientation. Within a patch, the brightness is constant.
kTriangularFrame0The surface is divided into triangular patches. Only the edges of the patches are drawn.
kRectangularFrame0The surface is divided into rectangular patches. Only the edges of the patches are drawn.

Arguments:
ArgumentDefaultDescription
shadingMode(Mandatory)The shading mode, which must be one of the above constants.
wireWidth1The wire width for use with wireframe shading modes.

Some examples using this method:

CDSurfaceChartMBS.setSurfaceAxisGrid(majorXGridColor as Integer, majorYGridColor as Integer = -1, minorXGridColor as Integer = -1, minorYGridColor as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the colors of the axis grid lines on the surface.

Axis grid lines are grid lines associated with the ticks on the x and y axes. Major grid lines associate with major ticks. Minor grid lines associate with minor ticks. They can be drawn on the surface of the surface chart, and on the plot region walls. This method is for the surface of the surface chart. For the plot region walls, see CDSurfaceChartMBS.setWallGrid.

Arguments:
ArgumentDefaultDescription
majorXGridColor(Mandatory)The color of the major x-axis grid lines on the surface.
majorYGridColor-1The color of the major y-axis grid lines on the surface. -1 means it is the same as the majorXGridColor.
minorXGridColor-1The color of the minor x-axis grid lines on the surface. -1 means it is the same as the majorXGridColor.
minorYGridColor-1The color of the minor y-axis grid lines on the surface. -1 means it is the same as the majorYGridColor.

See also:

CDSurfaceChartMBS.setSurfaceDataGrid(xGridColor as color, yGridColor as color)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Same as the other setSurfaceDataGrid method, but uses color instead of integer data type for passing color values.

See also:

CDSurfaceChartMBS.setSurfaceDataGrid(xGridColor as Integer, yGridColor as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the colors of the data grid lines on the surface.

Data grid lines are grid lines that define the positions of the data points. They can be drawn on the surface of the surface chart.

Arguments:
ArgumentDefaultDescription
xGridColor(Mandatory)The color of the x data grid lines.
yGridColor-1The color of the y data grid lines. -1 means it is the same as the yGridColor.

See also:

CDSurfaceChartMBS.setSurfaceTexture(patternColor as color)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a texture image to the surface.

A texture is a 2D image pattern for mapping onto a 3D surface. The pattern can be defined by using BaseChart.patternColor or BaseChart.patternColor2.

One common usage of this method is to apply an image the same size as the plot region xy plane to the surface. To do this, simply use an image with width and height equals to the plot region width and depth.

ArgumentDefaultDescription
patternColor(Mandatory)A color (normally a pattern color) that contains the texture image to be applied to the surface.

See also:

Some examples using this method:

CDSurfaceChartMBS.setSurfaceTexture(patternColor as integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a texture image to the surface.

A texture is a 2D image pattern for mapping onto a 3D surface. The pattern can be defined by using BaseChart.patternColor or BaseChart.patternColor2.

One common usage of this method is to apply an image the same size as the plot region xy plane to the surface. To do this, simply use an image with width and height equals to the plot region width and depth.

ArgumentDefaultDescription
patternColor(Mandatory)A color (normally a pattern color) that contains the texture image to be applied to the surface.

See also:

CDSurfaceChartMBS.setWContourColor(wContourColor as color, wMinorContourColor as color)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the colors of the w contour lines on the surface.

The w contour lines are lines that join regions of the same w value on the surface. The contour levels are determined by the ticks on the color axis. Major ticks associate with major contour lines. Minor ticks associate with minor contour lines.

ArgumentDefaultDescription
wContourColor(Mandatory)The color of the major contour lines.
wMinorContourColor-1The color of the minor contour lines. -1 means it is the same as the contourColor.

See also:

CDSurfaceChartMBS.setWContourColor(wContourColor as integer, wMinorContourColor as Integer = -1)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the colors of the w contour lines on the surface.

The w contour lines are lines that join regions of the same w value on the surface. The contour levels are determined by the ticks on the color axis. Major ticks associate with major contour lines. Minor ticks associate with minor contour lines.

ArgumentDefaultDescription
wContourColor(Mandatory)The color of the major contour lines.
wMinorContourColor-1The color of the minor contour lines. -1 means it is the same as the contourColor.

See also:

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


The biggest plugin in space...