Class CurveList
A collection class containing a list of CurveItem objects that define the set of curves to be displayed on the graph.
Implements
Inherited Members
Namespace: ZedGraph
Assembly: ZedGraph.dll
Syntax
[Serializable]
public class CurveList : List<CurveItem>, IList<CurveItem>, ICollection<CurveItem>, IEnumerable<CurveItem>, IList, ICollection, IEnumerable, ICloneable
Constructors
| Improve this Doc View SourceCurveList()
Default constructor for the collection class
Declaration
public CurveList()
CurveList(CurveList)
The Copy Constructor
Declaration
public CurveList(CurveList rhs)
Parameters
Type | Name | Description |
---|---|---|
CurveList | rhs | The XAxis object from which to copy |
Properties
| Improve this Doc View SourceBackward
Iterate backwards through the CurveList items.
Declaration
public IEnumerable<CurveItem> Backward { get; }
Property Value
Type | Description |
---|---|
IEnumerable<CurveItem> |
Forward
Iterate forward through the CurveList items.
Declaration
public IEnumerable<CurveItem> Forward { get; }
Property Value
Type | Description |
---|---|
IEnumerable<CurveItem> |
IsPieOnly
Read only property that determines if all items in the CurveList are Pies.
Declaration
public bool IsPieOnly { get; }
Property Value
Type | Description |
---|---|
Boolean |
Item[String]
Declaration
public CurveItem this[string label] { get; }
Parameters
Type | Name | Description |
---|---|---|
String | label | The string label of the CurveItem object to be accessed. |
Property Value
Type | Description |
---|---|
CurveItem | A CurveItem object reference. |
MaxPts
Read only value for the maximum number of points in any of the curves in the list.
Declaration
public int MaxPts { get; }
Property Value
Type | Description |
---|---|
Int32 |
NumBars
Read only property that returns the number of curves in the list that are of type BarItem. This does not include HiLowBarItem or ErrorBarItem types.
Declaration
public int NumBars { get; }
Property Value
Type | Description |
---|---|
Int32 |
NumClusterableBars
Read only property that returns the number of curves in the list that are potentially "clusterable", which includes BarItem and HiLowBarItem types. This does not include ErrorBarItem, OHLCBarItem, JapaneseCandleStickItem, etc. types.
Declaration
public int NumClusterableBars { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Note that this property is only the number of bars that COULD BE clustered. The actual cluster settings are not considered.
NumPies
Read only property that returns the number of pie slices in the list (class type is PieItem ).
Declaration
public int NumPies { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceClone()
Typesafe, deep-copy clone method.
Declaration
public CurveList Clone()
Returns
Type | Description |
---|---|
CurveList | A new, independent copy of this class |
Draw(Graphics, GraphPane, Single)
Render all the CurveItem objects in the list to the specified Graphics device by calling the Draw(Graphics, GraphPane, Int32, Single) member function of each CurveItem object.
Declaration
public void Draw(Graphics g, GraphPane pane, 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. |
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. |
GetBarItemPos(GraphPane, BarItem)
Find the ordinal position of the specified BarItem within
the CurveList. This position only counts
Declaration
public int GetBarItemPos(GraphPane pane, BarItem barItem)
Parameters
Type | Name | Description |
---|---|---|
GraphPane | pane | The GraphPane of interest |
BarItem | barItem | The BarItem for which to search. |
Returns
Type | Description |
---|---|
Int32 | The ordinal position of the specified bar, or -1 if the bar was not found. |
GetRange(Boolean, Boolean, GraphPane)
Go through each CurveItem object in the collection, calling the GetRange(out Double, out Double, out Double, out Double, Boolean, Boolean, GraphPane) member to determine the minimum and maximum values in the Points list of data value pairs. If the curves include a stack bar, handle within the current GetRange method. In the event that no data are available, a default range of min=0.0 and max=1.0 are returned. If the Y axis has a valid data range and the Y2 axis not, then the Y2 range will be a duplicate of the Y range. Vice-versa for the Y2 axis having valid data when the Y axis does not. If any CurveItem in the list has a missing PointPairList, a new empty one will be generated.
Declaration
public void GetRange(bool bIgnoreInitial, bool isBoundedRanges, GraphPane pane)
Parameters
Type | Name | Description |
---|---|---|
Boolean | bIgnoreInitial | ignoreInitial is a boolean value that affects the data range that is considered for the automatic scale ranging (see IsIgnoreInitial). If true, then initial data points where the Y value is zero are not included when automatically determining the scale Min, Max, and MajorStep size. All data after the first non-zero Y value are included. |
Boolean | isBoundedRanges | Determines if the auto-scaled axis ranges will subset the data points based on any manually set scale range values. |
GraphPane | pane | A reference to the GraphPane object that is the parent or owner of this object. |
See Also
| Improve this Doc View SourceHasData()
Determine if there is any data in any of the CurveItem objects for this graph. This method does not verify valid data, it only checks to see if NPts > 0.
Declaration
public bool HasData()
Returns
Type | Description |
---|---|
Boolean | true if there is any data, false otherwise |
IndexOf(String)
Declaration
public int IndexOf(string label)
Parameters
Type | Name | Description |
---|---|---|
String | label | The String label that is in the Label attribute of the item to be found. |
Returns
Type | Description |
---|---|
Int32 | The zero-based index of the specified CurveItem, or -1 if the CurveItem is not in the list |
See Also
| Improve this Doc View SourceIndexOfTag(String)
Declaration
public int IndexOfTag(string tag)
Parameters
Type | Name | Description |
---|---|---|
String | tag | The String tag that is in the Tag attribute of the item to be found. |
Returns
Type | Description |
---|---|
Int32 | The zero-based index of the specified CurveItem, or -1 if the CurveItem is not in the list |
Remarks
| Improve this Doc View SourceMove(Int32, Int32)
Move the position of the object at the specified index to the new relative position in the list.
Declaration
public int Move(int index, int relativePos)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The zero-based index of the object to be moved. |
Int32 | relativePos | The relative number of positions to move the object. A value of -1 will move the object one position earlier in the list, a value of 1 will move it one position later. To move an item to the beginning of the list, use a large negative value (such as -999). To move it to the end of the list, use a large positive value. |
Returns
Type | Description |
---|---|
Int32 | The new position for the object, or -1 if the object was not found. |
Remarks
For Graphic type objects, this method controls the Z-Order of the items. Objects at the beginning of the list appear in front of objects at the end of the list.
Sort(SortType, Int32)
Sorts the list according to the point values at the specified index and for the specified axis.
Declaration
public void Sort(SortType type, int index)
Parameters
Type | Name | Description |
---|---|---|
SortType | type | |
Int32 | index |
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 |