In This Topic
An Error Chart can be used to display an estimated error in a measurement. The error values are shown as "T" and upside-down "T" symbols above and below the primary value. The most common Error Chart displays errors only in Y values. XY Error Charts can display errors both in X and Y values. The following image shows a typical error bar chart 2D and 3D charts:
Creating an Error Bar Series
Error Bar series are represented by the NErrorBarSeries type. An instance of this type must be added to the series collection of a Cartesian chart:
C# |
Copy Code
|
NErrorBarSeries errorBar = new NErrorBarSeries();
chart.Series.Add(errorBar);
|
Passing Data
Error bar series accept data points of type NErrorBarDataPoint. The following code snippet shows how to add data to an error bar series:
C# |
Copy Code
|
NErrorBarDataPoint errorBarDataPoint = new NErrorBarDataPoint();
errorBarDataPoint.Value = 10;
errorBarDataPoint.X = 10;
errorBarDataPoint.UpperXError = 12;
errorBarDataPoint.LowerXError = 8;
errorBarDataPoint.UpperYError = 12;
errorBarDataPoint.LowerYError = 8;
errorBar.DataPoints.Add(errorBarDataPoint);
|
Controlling the Visibility and Size of the Error Bars
The Error Bar series is able to display errors for the X, Y, and Z dimensions. The visibility of the errors can be controlled thorough the following properties:
ShowLowerErrorX and ShowUpperErrorX control the visibility of the X dimension errors.
ShowLowerErrorY and ShowUpperErrorY control the visibility of the Y dimension errors.
ShowLowerErrorZ and ShowUpperErrorZ control the visibility of the Z dimension errors.
The size of the error bar "whiskers" can be controlled through the XErrorSize, YErrorSize, and ZErrorSize properties.
Formatting Commands
The error bar series supports the following formatting commands in addition to the standard (per data point) formatting commands:
<upperxerror> - displays the upper x error.
<lowerxerror> - displays the lower x error.
<upperyerror> - displays the upper y error.
<loweryerror> - displays the lower y error.
<upperzerror> - displays the upper z error.
<lowerzerror> - displays the lower z error.
See Also