CDTrendLayerMBS class
Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version
22.2
22.3
22.4
22.5
23.0
23.1
23.2
23.3
23.4
23.5
24.0
24.1
The list of the topics,
classes,
interfaces,
controls,
modules,
global methods by category,
global methods by name,
screenshots,
licenses
and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
CDTrendLayerMBS class
Super class: CDLayerMBS
The TrendLayer class represents trend layers.
The trend layer performs linear regression analysis on the data points, and represents the result as a best fit straight line with optional confidence and prediction bands.
In linear regression analysis, the data points are assumed to be related by:
y = m * x + c + err
where m and c are constants, and err is a random variable.
Linear regression analysis estimates m, c and err based on available data using the least square method. Using estimated values of m and c, the line y = m * x + c are plotted as the best fit straight line based on available data.
However, as m and c are estimations based on available data, it may not be exactly equal to the "real" m and c. In ChartDirector, the uncertainties are represented visually as a confidence band around the regression line. For example, the 95% confidence band means there are 95% probability that the "real" line is in that band.
To predict a data point (infer y given x), we can use the formula:
y = m * x + c + err
based on estimated values of m, c and err.
The uncertainties of the data point is contributed by the uncertainties in m and c, as well as err. In ChartDirector, the uncertainties of the data points are represented visually as a prediction band around the regression line. For example, a 95% prediction band means there are 95% probability that a data point will be in that band.
The prediction band is always wider than the confidence band. It is because the uncertainties of the regression line is contributed by m and c, while the uncertainties of the data points are contributed by m, c and err. The err term makes the data points less certain that the regression line.
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.
- 12 methods
- method addConfidenceBand(confidence as Double, upperFillColor as color, upperEdgeColor as color, upperLineWidth as Integer, lowerFillColor as color, lowerEdgeColor as color, lowerLineWidth as Integer = -1)
- method addConfidenceBand(confidence as Double, upperFillColor as Integer, upperEdgeColor as Integer = &hFF000000, upperLineWidth as Integer = -1, lowerFillColor as Integer = -1, lowerEdgeColor as Integer = -1, lowerLineWidth as Integer = -1)
- method addPredictionBand(confidence as Double, upperFillColor as color, upperEdgeColor as color, upperLineWidth as Integer, lowerFillColor as color, lowerEdgeColor as color, lowerLineWidth as Integer = -1)
- method addPredictionBand(confidence as Double, upperFillColor as Integer, upperEdgeColor as Integer = &hFF000000, upperLineWidth as Integer = -1, lowerFillColor as Integer = -1, lowerEdgeColor as Integer = -1, lowerLineWidth as Integer = -1)
- method getCoefficient(index as Integer) as Double
- method getCorrelation as Double
- method getIntercept as Double
- method getLine as CDLineObjMBS
- method getSlope as Double
- method getStdError as Double
- method setImageMapWidth(w as Integer)
- method setRegressionType(regressionType as Integer)
- 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.addTrendLayer(Data() as Double, colorvalue as color, name as string = "", depth as Integer = 0) as CDTrendLayerMBS
- CDXYChartMBS.addTrendLayer(Data() as Double, colorvalue as Integer = -1, name as string = "", depth as Integer = 0) as CDTrendLayerMBS
- CDXYChartMBS.addTrendLayer(dates() as date, colorvalue as color, name as string = "", depth as Integer = 0) as CDTrendLayerMBS
- CDXYChartMBS.addTrendLayer(dates() as date, colorvalue as Integer = -1, name as string = "", depth as Integer = 0) as CDTrendLayerMBS
- CDXYChartMBS.addTrendLayer(dates() as date, yData() as Double, colorvalue as color, name as string = "", depth as Integer = 0) as CDTrendLayerMBS
- CDXYChartMBS.addTrendLayer(dates() as DateTime, colorvalue as color, name as string = "", depth as integer = 0) as CDTrendLayerMBS
- CDXYChartMBS.addTrendLayer(dates() as DateTime, colorvalue as integer = -1, name as string = "", depth as integer = 0) as CDTrendLayerMBS
- CDXYChartMBS.addTrendLayer(dates() as DateTime, yData() as double, colorvalue as color, name as string = "", depth as integer = 0) as CDTrendLayerMBS
- CDXYChartMBS.addTrendLayer(dates() as DateTime, yData() as double, colorvalue as integer = -1, name as string = "", depth as integer = 0) as CDTrendLayerMBS
- CDXYChartMBS.addTrendLayer(xData() as Double, yData() as Double, colorvalue as Integer = -1, name as string = "", depth as Integer = 0) as CDTrendLayerMBS
Some examples using this class:
Blog Entries
The items on this page are in the following plugins: MBS ChartDirector Plugin.
CDTreeMapNodeMBS
-
CDTTFTextMBS