Class ErrorBar
This class handles the drawing of the curve ErrorBar objects. The Error Bars are the vertical lines with a symbol at each end.
Inherited Members
Namespace: ZedGraph
Assembly: ZedGraph.dll
Syntax
[Serializable]
public class ErrorBar : ICloneable, ISerializable
Remarks
To draw "I-Beam" bars, the symbol type defaults to HDash, which is just a horizontal line. If BarBase is Y-oriented, then the symbol type should be set to VDash to get the same effect.
Constructors
| Improve this Doc View SourceErrorBar()
Default constructor that sets all ErrorBar properties to default values as defined in the ErrorBar.Default class.
Declaration
public ErrorBar()
ErrorBar(Color)
Default constructor that sets the Color as specified, and the remaining ErrorBar properties to default values as defined in the ErrorBar.Default class.
Declaration
public ErrorBar(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color | A Color value indicating the color of the symbol |
ErrorBar(SerializationInfo, StreamingContext)
Constructor for deserializing objects
Declaration
protected ErrorBar(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 |
ErrorBar(ErrorBar)
The Copy Constructor
Declaration
public ErrorBar(ErrorBar rhs)
Parameters
Type | Name | Description |
---|---|---|
ErrorBar | rhs | The ErrorBar object from which to copy |
Fields
| Improve this Doc View Sourceschema
Current schema value that defines the version of the serialized file
Declaration
public const int schema = 10
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceColor
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Color |
Remarks
This property only controls the color of the vertical line. The symbol color is controlled separately in the Symbol property.
IsVisible
Gets or sets a property that shows or hides the ErrorBar.
Declaration
public bool IsVisible { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true to show the error bar, false to hide it |
See Also
| Improve this Doc View SourcePenWidth
The pen width to be used for drawing error bars Units are points.
Declaration
public float PenWidth { get; set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
This property only controls the pen width for the vertical line. The pen width for the symbol outline is controlled separately by the Symbol property.
Symbol
Contains the symbol element that will be drawn at the top and bottom of the error bar.
Declaration
public Symbol Symbol { get; set; }
Property Value
Type | Description |
---|---|
Symbol |
Methods
| Improve this Doc View SourceClone()
Typesafe, deep-copy clone method.
Declaration
public ErrorBar Clone()
Returns
Type | Description |
---|---|
ErrorBar | A new, independent copy of this class |
Draw(Graphics, GraphPane, Boolean, Single, Single, Single, Single, Pen, Boolean, PointPair)
Declaration
public void Draw(Graphics g, GraphPane pane, bool isXBase, float pixBase, float pixValue, float pixLowValue, float scaleFactor, Pen pen, bool isSelected, PointPair dataValue)
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. |
Boolean | isXBase | boolean value that indicates if the "base" axis for this ErrorBar is the X axis. True for an XAxis base, false for a YAxis or Y2Axis base. |
Single | pixBase | The independent axis position of the center of the error bar in pixel units |
Single | pixValue | The dependent axis position of the top of the error bar in pixel units |
Single | pixLowValue | The dependent axis position of the bottom of the error bar in pixel units |
Single | scaleFactor | The scaling factor for the features of the graph based on the BaseDimension. This scaling factor is calculated by the CalcScaleFactor() method. The scale factor represents a linear multiple to be applied to font sizes, symbol sizes, etc. |
Pen | pen | A pen with attributes of Color and PenWidth for this ErrorBar |
Boolean | isSelected | Indicates that the ErrorBar should be drawn with attributes from the Selection class. |
PointPair | dataValue | The data value to be used for a value-based color gradient. This is only applicable for GradientByX, GradientByY or GradientByZ. |
Draw(Graphics, GraphPane, ErrorBarItem, Axis, Axis, Single)
Declaration
public void Draw(Graphics g, GraphPane pane, ErrorBarItem curve, Axis baseAxis, Axis valueAxis, 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. |
ErrorBarItem | curve | |
Axis | baseAxis | The Axis class instance that defines the base (independent) axis for the Bar |
Axis | valueAxis | The Axis class instance that defines the value (dependent) axis for the Bar |
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. |
GetObjectData(SerializationInfo, StreamingContext)
Populates a SerializationInfo instance with the data needed to serialize the target object
Declaration
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public virtual 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 |
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 |