Class ErrorBarItem
Encapsulates an "Error Bar" curve type that displays a vertical or horizontal line with a symbol at each end.
Inherited Members
Namespace: ZedGraph
Assembly: ZedGraph.dll
Syntax
[Serializable]
public class ErrorBarItem : CurveItem, ICloneable, ISerializable
Remarks
The ErrorBarItem type is intended for displaying confidence intervals, candlesticks, stock High-Low charts, etc. It is technically not a bar, since it is drawn as a vertical or horizontal line. The default symbol at each end of the "bar" is HDash, which creates an "I-Beam". For horizontal bars (Y or Y2), you will need to change the symbol to VDash to get horizontal "I-Beams". Since the horizontal segments are actually symbols, their widths are controlled by the symbol size in Symbol, specified in points (1/72nd inch). The position of each "I-Beam" is set according to the PointPair values. The independent axis is assigned with Base, and is a BarBase enum type.
Constructors
| Improve this Doc View SourceErrorBarItem(SerializationInfo, StreamingContext)
Constructor for deserializing objects
Declaration
protected ErrorBarItem(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | A SerializationInfo instance that defines the serialized data |
StreamingContext | context | A StreamingContext instance that contains the serialized data |
ErrorBarItem(String)
Create a new ErrorBarItem, specifying only the legend label.
Declaration
public ErrorBarItem(string label)
Parameters
Type | Name | Description |
---|---|---|
String | label | The label that will appear in the legend. |
ErrorBarItem(String, Double[], Double[], Double[], Color)
Create a new ErrorBarItem using the specified properties.
Declaration
public ErrorBarItem(string label, double[] x, double[] y, double[] lowValue, Color color)
Parameters
Type | Name | Description |
---|---|---|
String | label | The label that will appear in the legend. |
Double[] | x | An array of double precision values that define the X axis values for this curve |
Double[] | y | An array of double precision values that define the Y axis values for this curve |
Double[] | lowValue | An array of double precision values that define the lower dependent values for this curve |
Color | color |
ErrorBarItem(String, IPointList, Color)
Create a new ErrorBarItem using the specified properties.
Declaration
public ErrorBarItem(string label, IPointList points, Color color)
Parameters
Type | Name | Description |
---|---|---|
String | label | The label that will appear in the legend. |
IPointList | points | A IPointList of double precision values that define the X, Y and lower dependent values for this curve |
Color | color |
ErrorBarItem(ErrorBarItem)
The Copy Constructor
Declaration
public ErrorBarItem(ErrorBarItem rhs)
Parameters
Type | Name | Description |
---|---|---|
ErrorBarItem | rhs | The ErrorBarItem object from which to copy |
Fields
| Improve this Doc View Sourceschema2
Current schema value that defines the version of the serialized file
Declaration
public const int schema2 = 10
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceBar
Gets a reference to the ErrorBar class defined for this ErrorBarItem.
Declaration
public ErrorBar Bar { get; }
Property Value
Type | Description |
---|---|
ErrorBar |
Methods
| Improve this Doc View SourceClone()
Typesafe, deep-copy clone method.
Declaration
public ErrorBarItem Clone()
Returns
Type | Description |
---|---|
ErrorBarItem | A new, independent copy of this class |
Draw(Graphics, GraphPane, Int32, Single)
Do all rendering associated with this ErrorBarItem to the specified Graphics device. This method is normally only called by the Draw method of the parent CurveList collection object.
Declaration
public override void Draw(Graphics g, GraphPane pane, int pos, float scaleFactor)
Parameters
Type | Name | Description |
---|---|---|
Graphics | g | A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method. |
GraphPane | pane | A reference to the GraphPane object that is the parent or owner of this object. |
Int32 | pos | The ordinal position of the current ErrorBarItem curve. |
Single | scaleFactor | The scaling factor to be used for rendering objects. This is calculated and passed down by the parent GraphPane object using the CalcScaleFactor() method, and is used to proportionally adjust font sizes, etc. according to the actual size of the graph. |
Overrides
| Improve this Doc View SourceDrawLegendKey(Graphics, GraphPane, RectangleF, Single)
Draw a legend key entry for this ErrorBarItem at the specified location
Declaration
public override void DrawLegendKey(Graphics g, GraphPane pane, RectangleF rect, float scaleFactor)
Parameters
Type | Name | Description |
---|---|---|
Graphics | g | A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method. |
GraphPane | pane | A reference to the GraphPane object that is the parent or owner of this object. |
RectangleF | rect | The RectangleF struct that specifies the location for the legend key |
Single | scaleFactor | The scaling factor to be used for rendering objects. This is calculated and passed down by the parent GraphPane object using the CalcScaleFactor() method, and is used to proportionally adjust font sizes, etc. according to the actual size of the graph. |
Overrides
| Improve this Doc View SourceGetCoords(GraphPane, Int32, out String)
Determine the coords for the rectangle associated with a specified point for this CurveItem
Declaration
public override bool GetCoords(GraphPane pane, int i, out string coords)
Parameters
Type | Name | Description |
---|---|---|
GraphPane | pane | The GraphPane to which this curve belongs |
Int32 | i | The index of the point of interest |
String | coords | A list of coordinates that represents the "rect" for this point (used in an html AREA tag) |
Returns
Type | Description |
---|---|
Boolean | true if it's a valid point, false otherwise |
Overrides
| Improve this Doc View SourceGetObjectData(SerializationInfo, StreamingContext)
Populates a SerializationInfo instance with the data needed to serialize the target object
Declaration
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | A SerializationInfo instance that defines the serialized data |
StreamingContext | context | A StreamingContext instance that contains the serialized data |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceICloneable.Clone()
Implement the ICloneable interface in a typesafe manner by just calling the typed version of Clone()
Declaration
object ICloneable.Clone()
Returns
Type | Description |
---|---|
Object | A deep copy of this object |