Platforms to show: All Mac Windows Linux Cross-Platform
CDContourLayerMBS class
Super class: CDLayerMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDContourLayerMBS is a subclass of CDLayerMBS.
CDContourLayerMBS objects are created by using CDXYChartMBS.addContourLayer.
The data for the CDContourLayerMBS are the z values at some points in the xy plane. Both gridded and scattered data points are supported.
Using the data, the ContourLayer computes the z values of all pixels in the xy plane. The computation can be based on spline or bilinear/line surface fitting, configurable using CDContourLayerMBS.setSmoothInterpolation.
The ContourLayer then colors the pixels based on the z values, and draws contour lines to join positions with the same z values. The color mapping and contour levels are controlled by the ColorAxis object of the ContourLayer, obtainable using CDContourLayerMBS.colorAxis.
If you need to change colors for the contour layer, please use ColorAxis.setColorGradient:
Call myContourLayer.colorAxis().setColorGradient(True, anArrayOfColors)
ChartDirector will then use the array of colors, and interpolate among them, to fill the contour layer. For example, if the array of colors contain 3 colors red, green and blue, ChartDirector will interpolate from red to green for half of the z-levels, and green to blue for the other half.
Subclass of the CDLayerMBS class.
This is a subclass of an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 17 methods
- method addCustomContour(z as double, contourColor as Integer, contourWidth as Integer, contourLabel as string, font as string = "normal", fontsize as double = 12, fontColor as integer = &hffff0002) as CDMarkMBS
- method colorAxis as CDColorAxisMBS
- method getCrossSection(x0 as Integer, y0 as Integer, x1 as Integer, y1 as Integer) as Double()
- method getZAtPixel(x as Integer, y as Integer) as Double
- method getZAtValue(x as double, y as double) as Double
- method setColorAxis(x as Integer, y as Integer, alignment as Integer, length as Integer, orientation as Integer) as CDColorAxisMBS
- method setContourColor(contourColor as color, minorContourColor as color)
- method setContourColor(contourColor as Integer, minorContourColor as Integer = -1)
- method setContourLabelFormat(formatString as string)
- method setContourLabelSpacing(labelSpacing as Integer, minContourLen as Integer)
- method setContourLabelStyle(font as string = "normal", fontsize as double = 12, fontColor as integer = &hffff0002) as CDTextBoxMBS
- method setContourWidth(contourWidth as Integer, minorContourWidth as Integer = -1)
- method setExactContour(contour as boolean = true)
- method setExactContour(contour as boolean, markContour as boolean)
- method setSmoothInterpolation(b as boolean)
- method setZBounds(minZ as Double, maxZ as Double)
- method setZData(zData() as Double)
Super class CDLayerMBS
- 58 methods
- method addCustomAggregateLabel(dataItem as Integer, label as string, font as string = "", fontSize as Double = 8, fontColor as Integer = &hffff0002, fontAngle as Double = 0) as CDTextBoxMBS
- method addCustomAggregateLabel(dataItem as Integer, label as string, font as string, fontSize as Double, fontColor as color, fontAngle as Double = 0) as CDTextBoxMBS
- method addCustomDataLabel(dataSet as Integer, dataItem as Integer, label as string, font as string = "", fontSize as Double = 8, fontColor as Integer = &hffff0002, fontAngle as Double = 0) as CDTextBoxMBS
- method addCustomDataLabel(dataSet as Integer, dataItem as Integer, label as string, font as string, fontSize as Double, fontColor as color, fontAngle as Double = 0) as CDTextBoxMBS
- method addCustomGroupLabel(dataGroup as Integer, dataItem as Integer, label as string, font as string ="", fontSize as Double = 8, fontColor as Integer = &hffff0002, fontAngle as Double = 0) as CDTextBoxMBS
- method addCustomGroupLabel(dataGroup as Integer, dataItem as Integer, label as string, font as string, fontSize as Double, fontColor as color, fontAngle as Double = 0) as CDTextBoxMBS
- method addDataGroup(name as string)
- method addDataSet(data as CDArrayMBS, colorvalue as color, name as string = "") as CDDataSetMBS
- method addDataSet(data as CDArrayMBS, colorvalue as Integer = -1, name as string = "") as CDDataSetMBS
- method addDataSet(data() as Double, colorvalue as color, name as string = "") as CDDataSetMBS
- method addDataSet(data() as Double, colorvalue as Integer = -1, name as string = "") as CDDataSetMBS
- method addExtraField(numbers() as Double)
- method addExtraField(texts() as string)
- method alignLayer(layer as CDLayerMBS, dataSet as Integer)
- method Constructor Private
- method getDataSet(dataSet as Integer) as CDDataSetMBS
- method getDataSetByZ(z as Integer) as CDDataSetMBS
- method getDataSetCount as Integer
- method getHTMLImageMap(url as string, queryFormat as string = "", extraAttr as string = "", offsetX as Integer = 0, offsetY as Integer = 0) as string
- method getImageCoor(dataSet as Integer, dataItem as Integer = &h80000001, offsetX as Integer = 0, offsetY as Integer = 0) as string
- method getImageCoor2(dataItem as Integer, offsetX as Integer = 0, offsetY as Integer = 0) as string
- method getLegendIcon(dataSetNo as Integer) as string
- method getNearestXValue(target as Double) as Double
- method getXCoor(value as Double) as Integer
- method getXIndexOf(xValue as Double, tolerance as Double = 0) as Integer
- method getXPosition(i as Integer) as Double
- method getYCoor(value as Double, axis as boolean=true) as Integer
- method getYCoor(value as Double, axis as CDAxisMBS) as Integer
- method moveBack(layer as CDLayerMBS=nil)
- method moveFront(layer as CDLayerMBS=nil)
- method set3D(d as Integer = -1, zGap as Integer = 0)
- method setAggregateLabelFormat(formatString as string)
- method setAggregateLabelStyle(font as string = "", fontSize as Double = 8, fontcolor as Integer = &hffff0002, fontAngle as Double = 0) as CDTextBoxMBS
- method setAggregateLabelStyle(font as string, fontSize as Double, fontcolor as color, fontAngle as Double = 0) as CDTextBoxMBS
- method setBaseLine(BaseLine as Double)
- method setBorderColor(colorvalue as color, lightingEffect as Integer = 0)
- method setBorderColor(colorvalue as Integer, lightingEffect as Integer = 0)
- method setDataCombineMethod(m as Integer)
- method setDataLabelFormat(formatString as string)
- method setDataLabelStyle(font as string = "", fontSize as Double = 8, fontcolor as color, fontAngle as Double = 0) as CDTextBoxMBS
- method setDataLabelStyle(font as string = "", fontSize as Double = 8, fontcolor as Integer = &hffff0002, fontAngle as Double = 0) as CDTextBoxMBS
- method setHTMLImageMap(url as string, queryFormat as string = "", extraAttr as string = "")
- method setLegend(m as Integer)
- method setLegendOrder(dataSetOrder as Integer, layerOrder as Integer = -1)
- method setLineWidth(w as Integer)
- method setUseYAxis(axis as CDAxisMBS)
- method setUseYAxis2(b as boolean=true)
- method setXData(data as CDArrayMBS)
- method setXData(data() as Double)
- method setXData(dates() as date)
- method setXData(dates() as dateTime)
- method setXData(minValue as Double, maxValue as Double)
- method xZoneColor(threshold as Double, belowColor as color, aboveColor as color) as Integer
- method xZoneColor(threshold as Double, belowColor as Integer, aboveColor as Integer) as Integer
- method yZoneColor(threshold as Double, belowColor as color, aboveColor as color, yAxis as boolean=true) as Integer
- method yZoneColor(threshold as Double, belowColor as color, aboveColor as color, yAxis as CDAxisMBS) as Integer
- method yZoneColor(threshold as Double, belowColor as Integer, aboveColor as Integer, yAxis as boolean=true) as Integer
- method yZoneColor(threshold as Double, belowColor as Integer, aboveColor as Integer, yAxis as CDAxisMBS) as Integer
This class has no sub classes.
Some methods using this class:
- CDXYChartMBS.addContourLayer(xData() as Double, yData() as Double, zData() as Double) as CDContourLayerMBS
Some examples using this class:
- /ChartDirector/contour
- /ChartDirector/contourinterpolate
- /ChartDirector/High Resolution Chart Examples/contour
- /ChartDirector/scattercontour
- /ChartDirector/smoothcontour
Xojo Developer Magazine
The items on this page are in the following plugins: MBS ChartDirector Plugin.
CDColorAxisMBS - CDDataAcceleratorMBS