Skip to main content

PointData(String, DateTime) Constructor

Initializes a new instance of the PointData class with specified settings.

Namespace: DevExpress.WinUI.Charts

Assembly: DevExpress.WinUI.Charts.v23.2.dll

NuGet Package: DevExpress.WinUI

#Declaration

public PointData(
    string argument,
    DateTime value
)

#Parameters

Name Type Description
argument String

The point’s string argument.

value DateTime

The point’s DateTime value.

#Remarks

The following code adds several points with string arguments and DateTime values to a Cartesian chart:

<Charts:CartesianChart x:Name="chart">
    <!--...-->
</Charts:CartesianChart>
public MainWindow() {

    this.InitializeComponent();

    // Create a series:
    Series series = new Series();

    // Specify the series view:
    series.View = new PointSeriesView();

    // Create a point collection and assign it to the series:
    PointDataCollection pointCollection = new PointDataCollection();
    pointCollection.ArgumentScaleType = ScaleType.Qualitative;
    pointCollection.ValueScaleType = ScaleType.DateTime;
    series.Data = pointCollection;

    // Add points to the series:
    pointCollection.Add(new PointData("I", new DateTime(2020, 02, 02)));
    pointCollection.Add(new PointData("II", new DateTime(2021, 02, 02)));
    pointCollection.Add(new PointData("III", new DateTime(2020, 01, 02)));
    // Add other points.

    // Add the series to the chart:
    chart.Series.Add(series);
}
See Also