Back to Devexpress

SeriesPointCollection.AddRangePoint(DateOnly, Double, Double) Method

corelibraries-devexpress-dot-xtracharts-dot-seriespointcollection-dot-addrangepoint-x28-system-dot-dateonly-system-dot-double-system-dot-double-x29.md

latest2.7 KB
Original Source

SeriesPointCollection.AddRangePoint(DateOnly, Double, Double) Method

Adds a point with the specified argument and values required to plot a series with a range series view.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public int AddRangePoint(
    DateOnly argument,
    double value1,
    double value2
)
vb
Public Function AddRangePoint(
    argument As DateOnly,
    value1 As Double,
    value2 As Double
) As Integer

Parameters

NameTypeDescription
argumentDateOnly

The new series point’s argument.

| | value1 | Double |

The new series point’s first value.

| | value2 | Double |

The new series point’s second value.

|

Returns

TypeDescription
Int32

The position at which the new point was inserted.

|

Remarks

The following code snippet adds a Range series point:

csharp
using DevExpress.XtraCharts;
using DevExpress.XtraEditors;

public class MainForm : XtraForm {
  public MainForm() {
    Series series = new Series("Range Series", ViewType.RangeBar);
    SeriesPointCollection points = series.Points;
    int index = points.AddRangePoint(
      new DateOnly(2023, 10, 20),
      1.0,
      2.0
    );
    chartControl1.Series.Add(series);
  }
}
vb
Imports DevExpress.XtraCharts
Imports DevExpress.XtraEditors

Public Class MainForm
  Inherits XtraForm
  Public Sub New()
    Dim series As New Series("Range Series", ViewType.RangeBar)
    Dim points As SeriesPointCollection = series.Points
    Dim index As Integer = points.AddRangePoint(
      New DateOnly(2023, 10, 20),
      1.0,
      2.0
    )
    chartControl1.Series.Add(series)
  End Sub
End Class

See Also

SeriesPointCollection Class

SeriesPointCollection Members

DevExpress.XtraCharts Namespace