Class PointPair
A simple point represented by an (X,Y,Z) group of double values.
Inherited Members
Namespace: ZedGraph
Assembly: ZedGraph.dll
Syntax
[Serializable]
public class PointPair : PointPairBase, ISerializable, ICloneable
Constructors
| Improve this Doc View SourcePointPair()
Default Constructor
Declaration
public PointPair()
PointPair(Double, Double)
Creates a point pair with the specified X and Y.
Declaration
public PointPair(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
Double | x | This pair's x coordinate. |
Double | y | This pair's y coordinate. |
PointPair(Double, Double, Double)
Creates a point pair with the specified X, Y, and base value.
Declaration
public PointPair(double x, double y, double z)
Parameters
Type | Name | Description |
---|---|---|
Double | x | This pair's x coordinate. |
Double | y | This pair's y coordinate. |
Double | z | This pair's z or lower dependent coordinate. |
PointPair(Double, Double, Double, Object)
Creates a point pair with the specified X, Y, base value, and (Tag).
Declaration
public PointPair(double x, double y, double z, object tag)
Parameters
Type | Name | Description |
---|---|---|
Double | x | This pair's x coordinate. |
Double | y | This pair's y coordinate. |
Double | z | This pair's z or lower dependent coordinate. |
Object | tag | This pair's Tag property |
PointPair(Double, Double, Double, String)
Creates a point pair with the specified X, Y, base value, and string label (Tag).
Declaration
public PointPair(double x, double y, double z, string label)
Parameters
Type | Name | Description |
---|---|---|
Double | x | This pair's x coordinate. |
Double | y | This pair's y coordinate. |
Double | z | This pair's z or lower dependent coordinate. |
String | label | This pair's string label (Tag) |
PointPair(Double, Double, String)
Creates a point pair with the specified X, Y, and label (Tag).
Declaration
public PointPair(double x, double y, string label)
Parameters
Type | Name | Description |
---|---|---|
Double | x | This pair's x coordinate. |
Double | y | This pair's y coordinate. |
String | label | This pair's string label (Tag) |
PointPair(PointF)
Creates a point pair from the specified PointF struct.
Declaration
public PointPair(PointF pt)
Parameters
Type | Name | Description |
---|---|---|
PointF | pt | The PointF struct from which to get the new PointPair values. |
PointPair(SerializationInfo, StreamingContext)
Constructor for deserializing objects
Declaration
protected PointPair(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 |
PointPair(PointPair)
The PointPair copy constructor.
Declaration
public PointPair(PointPair rhs)
Parameters
Type | Name | Description |
---|---|---|
PointPair | rhs | The basis for the copy. |
Fields
| Improve this Doc View Sourceschema2
Current schema value that defines the version of the serialized file
Declaration
public const int schema2 = 11
Field Value
Type | Description |
---|---|
Int32 |
Tag
A tag object for use by the user. This can be used to store additional
information associated with the PointPair. ZedGraph never
modifies this value, but if it is a String type, it
may be displayed in a
Declaration
public object Tag
Field Value
Type | Description |
---|---|
Object |
Remarks
Note that, if you are going to Serialize ZedGraph data, then any type that you store in Tag must be a serializable type (or it will cause an exception).
Z
This PointPair's Z coordinate. Also used for the lower value (dependent axis) for HiLowBarItem and ErrorBarItem charts.
Declaration
public double Z
Field Value
Type | Description |
---|---|
Double |
Properties
| Improve this Doc View SourceColorValue
The ColorValue property is just an alias for the Z property.
Declaration
public virtual double ColorValue { get; set; }
Property Value
Type | Description |
---|---|
Double |
Remarks
For other types, such as the StockPt, the StockPt can be mapped to a unique value. This is used with the GradientByColorValue option.
IsInvalid3D
Readonly value that determines if either the X, Y, or Z coordinate in this PointPair is an invalid (not plotable) value. It is considered invalid if it is missing (equal to System.Double.Max), Infinity, or NaN.
Declaration
public bool IsInvalid3D { get; }
Property Value
Type | Description |
---|---|
Boolean | true if any value is invalid |
LowValue
The "low" value for this point (lower dependent-axis value). This is really just an alias for Z.
Declaration
public double LowValue { get; set; }
Property Value
Type | Description |
---|---|
Double | The lower dependent value for this PointPair. |
Methods
| Improve this Doc View SourceClone()
Typesafe, deep-copy clone method.
Declaration
public PointPair Clone()
Returns
Type | Description |
---|---|
PointPair | A new, independent copy of this class |
Equals(Object)
Compare two PointPair objects for equality. To be equal, X, Y, and Z must be exactly the same between the two objects.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The PointPair object to be compared with. |
Returns
Type | Description |
---|---|
Boolean | true if the PointPair objects are equal, false otherwise |
Overrides
| Improve this Doc View SourceGetHashCode()
Return the HashCode from the base class.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
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
| Improve this Doc View SourceToString(Boolean)
Format this PointPair value using the default format. Example: "( 12.345, -16.876 )". The two double values are formatted with the "g" format type.
Declaration
public virtual string ToString(bool isShowZ)
Parameters
Type | Name | Description |
---|---|---|
Boolean | isShowZ | true to show the third "Z" or low dependent value coordinate |
Returns
Type | Description |
---|---|
String | A string representation of the PointPair |
ToString(String, Boolean)
Format this PointPair value using a general format string.
Example: a format string of "e2" would give "( 1.23e+001, -1.69e+001 )".
If
Declaration
public virtual string ToString(string format, bool isShowZ)
Parameters
Type | Name | Description |
---|---|---|
String | format | A format string that will be used to format each of the two double type values (see ToString()). |
Boolean | isShowZ | true to show the third "Z" or low dependent value coordinate |
Returns
Type | Description |
---|---|
String | A string representation of the PointPair |
ToString(String, String, String)
Format this PointPair value using different general format strings for the X, Y, and Z values. Example: a format string of "e2" would give "( 1.23e+001, -1.69e+001 )".
Declaration
public string ToString(string formatX, string formatY, string formatZ)
Parameters
Type | Name | Description |
---|---|---|
String | formatX | A format string that will be used to format the X double type value (see ToString()). |
String | formatY | A format string that will be used to format the Y double type value (see ToString()). |
String | formatZ | A format string that will be used to format the Z double type value (see ToString()). |
Returns
Type | Description |
---|---|
String | A string representation of the PointPair |
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 |