Skip to main content
A newer version of this page is available. .

PointDataCollection Class

A collection of series data points.

Namespace: DevExpress.WinUI.Charts

Assembly: DevExpress.WinUI.Charts.v22.1.dll

NuGet Package: DevExpress.WinUI

Declaration

public class PointDataCollection :
    DataSourceBase,
    IList<PointData>,
    ICollection<PointData>,
    IEnumerable<PointData>,
    IEnumerable

Remarks

Follow the steps below to add series points to a chart:

  1. Initialize the Series.Data, PieSeries.Data, or FunnelSeries.Data property with a PointDataCollection object.

  2. Add a PointData object to the point data collection.

  3. Specify the point’s PointDataBase.Argument and PointData.Value properties.

  4. Repeat steps 2-3 to add other points.

For more information on how to populate a chart with data, refer to the following help topic: Load Chart Data.

Example

This example creates a Cartesian chart with 3 Stacked Bar series, populates them with data, and adjusts common settings.

<Window

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CartesianChart"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Charts="using:DevExpress.WinUI.Charts"
    x:Class="CartesianChart.MainWindow"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Charts:CartesianChart Margin="50">
            <Charts:CartesianChart.Legend>
                <Charts:Legend BorderThickness="0" Margin="0,-5,0,-5"/>
            </Charts:CartesianChart.Legend>
            <Charts:CartesianChart.Series>
                <Charts:Series DisplayName="Illinois">
                    <Charts:Series.View>
                        <Charts:BarSeriesView StackedMode="Stacked"/>
                    </Charts:Series.View>
                    <Charts:Series.Data>
                        <Charts:PointDataCollection ArgumentScaleType="Qualitative">
                            <Charts:PointData Argument="1998" Value="423.721"/>
                            <Charts:PointData Argument="2001" Value="476.851"/>
                            <Charts:PointData Argument="2004" Value="528.904"/>
                        </Charts:PointDataCollection>
                    </Charts:Series.Data>
                </Charts:Series>
                <Charts:Series DisplayName="Indiana">
                    <Charts:Series.View>
                        <Charts:BarSeriesView StackedMode="Stacked"/>
                    </Charts:Series.View>
                    <Charts:Series.Data>
                        <Charts:PointDataCollection ArgumentScaleType="Qualitative">
                            <Charts:PointData Argument="1998" Value="178.719" />
                            <Charts:PointData Argument="2001" Value="195.769" />
                            <Charts:PointData Argument="2004" Value="227.271" />
                        </Charts:PointDataCollection>
                    </Charts:Series.Data>
                </Charts:Series>
                <Charts:Series DisplayName="Michigan" >
                    <Charts:Series.View>
                        <Charts:BarSeriesView StackedMode="Stacked"/>
                    </Charts:Series.View>
                    <Charts:Series.Data>
                        <Charts:PointDataCollection ArgumentScaleType="Qualitative">
                            <Charts:PointData Argument="1998" Value="308.845" />
                            <Charts:PointData Argument="2001" Value="335.793" />
                            <Charts:PointData Argument="2004" Value="372.576" />
                        </Charts:PointDataCollection>
                    </Charts:Series.Data>
                </Charts:Series>
            </Charts:CartesianChart.Series>
        </Charts:CartesianChart>
    </Grid>
</Window>

Inheritance

Object
DependencyObject
UIElement
FrameworkElement
DevExpress.WinUI.Core.Internal.DXLogicalFrameworkElement
See Also