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 |
| Argument | Default | Description |
|---|---|---|
| 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. |
| lineWidth | 1 | The line width (thickness). |
| side | 0 | A 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 |
| Argument | Default | Description |
|---|---|---|
| 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. |
| lineWidth | 1 | The line width (thickness). |
| side | 0 | A 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 |
| Argument | Default | Description |
|---|---|---|
| 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. |
| edgeColor | Transparent | The border color of the rectangle. |
| edgeWidth | 1 | The 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 |
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.
| Argument | Default | Description |
|---|---|---|
| offset | 0 | The 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 |
Arguments:
| Argument | Default | Description |
|---|---|---|
| width | (Mandatory) | The width of the chart in pixels. |
| height | (Mandatory) | The height of the chart in pixels. |
| bgColor | kBackgroundColor | The background color of the chart. |
| edgeColor | kTransparent | The edge color of the chart. |
| raisedEffect | 0 | The 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 |
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 |
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.
| Argument | Default | Description |
|---|---|---|
| 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.
The items on this page are in the following plugins: MBS ChartDirector Plugin.