DataPointCollection.AddXY Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a DataPoint object to the end of the collection, with the specified X-value and Y-value.
Overloads
AddXY(Double, Double) |
Adds a DataPoint object to the end of the collection, with the specified X-value and Y-value. |
AddXY(Object, Object[]) |
Adds a DataPoint object to the end of the collection, with the specified X-value and Y-value(s). |
AddXY(Double, Double)
Adds a DataPoint object to the end of the collection, with the specified X-value and Y-value.
public:
int AddXY(double xValue, double yValue);
public int AddXY (double xValue, double yValue);
member this.AddXY : double * double -> int
Public Function AddXY (xValue As Double, yValue As Double) As Integer
Parameters
- xValue
- Double
The X-value of the data point.
- yValue
- Double
The Y-value of the data point.
Returns
An integer
that represents the zero-based index where the item was inserted into the data point collection.
Remarks
This method adds DataPoint object to the DataPointCollection; the object is always added to the end of the collection.
Use the AddXY method overload if your data points require more than one Y-value.
If your data points do not need an X-value - that is, if you are creating non-scatter plots - use the AddY method instead.
Applies to
AddXY(Object, Object[])
Adds a DataPoint object to the end of the collection, with the specified X-value and Y-value(s).
public:
int AddXY(System::Object ^ xValue, ... cli::array <System::Object ^> ^ yValue);
public int AddXY (object xValue, params object[] yValue);
member this.AddXY : obj * obj[] -> int
Public Function AddXY (xValue As Object, ParamArray yValue As Object()) As Integer
Parameters
- xValue
- Object
The X value of the data point.
- yValue
- Object[]
One or more comma-separated values that represent the Y-value(s) of the data point.
Returns
An integer
value that represents the zero-based index where the item was inserted into the collection.
Remarks
This method adds one DataPoint object to the DataPointCollection; the data point is always added to the end of the collection.
You must provide at least one (1) Y-value, otherwise an exception will be thrown. This method also checks the YValueType property of the DataPointCollection object that this data belongs to; if too many Y-values are specified, an exception will be thrown.
In order for DateTime formatting to have an effect, a value must be a DateTime object.
If your data points do not need an X-value - that is, if you are creating non-scatter plots - use the AddY method instead
Applies to
.NET