Skip to main content
All docs
V25.2
  • SeriesPointCollection.AddFinancialPoint(TimeOnly, Double, Double, Double, Double) Method

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

    Namespace: DevExpress.XtraCharts

    Assembly: DevExpress.XtraCharts.v25.2.dll

    NuGet Package: DevExpress.Charts

    Declaration

    public int AddFinancialPoint(
        TimeOnly argument,
        double low,
        double high,
        double open,
        double close
    )

    Parameters

    Name Type Description
    argument TimeOnly

    The new series point’s TimeOnly argument.

    low Double

    The new series point’s low value.

    high Double

    The new series point’s high value.

    open Double

    The new series point’s open value.

    close Double

    The new series point’s close value.

    Returns

    Type Description
    Int32

    The position at which the new element was inserted.

    Remarks

    The following code snippet adds a financial series point:

    using DevExpress.XtraCharts;
    using DevExpress.XtraEditors;
    
    public class MainForm : XtraForm {
      public MainForm() {
        Series series = new Series("Financial Series", ViewType.Stock);
        SeriesPointCollection points = series.Points;
        int index = points.AddFinancialPoint(
          new TimeOnly(12, 0, 0),
          low: 100.0,
          high: 120.0,
          open: 110.0,
          close: 115.0
        );
        chartControl1.Series.Add(series);
    
        XYDiagram diagram = (XYDiagram)chartControl1.Diagram;
        diagram.AxisX.DateTimeScaleOptions.MeasureUnit = DateTimeMeasureUnit.Hour;
      }
    }
    
    See Also