SeriesPointCollection Class

Represents a collection that stores the data points of an individual series.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v20.1.dll

Declaration

[NonCategorized]
public class SeriesPointCollection :
    ChartElementCollection<SeriesPoint>,
    IList<SeriesPoint>,
    ICollection<SeriesPoint>,
    IEnumerable<SeriesPoint>,
    IEnumerable,
    IList,
    ICollection
<NonCategorized>
Public Class SeriesPointCollection
    Inherits ChartElementCollection(Of SeriesPoint)
    Implements IList(Of SeriesPoint),
               ICollection(Of SeriesPoint),
               IEnumerable(Of SeriesPoint),
               IEnumerable,
               IList,
               ICollection

Related API Members

The following members accept/return SeriesPointCollection objects:

Remarks

Each series represents a set of data points. A series holds its data points within its Series.Points collection, represented by the SeriesPointCollection class. The properties and methods exposed by the SeriesPointCollection class can be used to perform common collection operations such as adding new or deleting existing items. Each item of the collection is represented by a SeriesPoint object. Individual items can be accessed using indexer notation.

Data points are automatically added to a collection of the SeriesPointCollection type when a series is bound to a data source (data binding can be performed using a series' Series.DataSource property). If a series is not bound to data, the collection of data points can be populated manually, at design time or runtime.

Examples

The following example demonstrates how to create a 2D Side-by-Side Bar. To do this, it is necessary to assign the ChartControl.Diagram property to XYDiagram2D, and then add two series with points to the diagram's Diagram.Series collection.

<Window x:Class="SideBySideBar2DChart.Window1" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts" 
        Title="Window1" Height="350" Width="620">
    <Grid>
        <dxc:ChartControl Name="chartControl1">
            <dxc:ChartControl.Diagram>
                <dxc:XYDiagram2D>
                    <dxc:XYDiagram2D.Series>
                        <dxc:BarSideBySideSeries2D DisplayName="First Series" BarWidth="0.5">
                            <!--region #Model-->
                            <dxc:BarSideBySideSeries2D.Model>
                                <dxc:Quasi3DBar2DModel />
                            </dxc:BarSideBySideSeries2D.Model>
                            <!--endregion #Model-->
                            <dxc:BarSideBySideSeries2D.Points>
                                <dxc:SeriesPoint Argument="A" Value="1" />
                                <dxc:SeriesPoint Argument="B" Value="2" />
                                <dxc:SeriesPoint Argument="C" Value="3" />
                                <dxc:SeriesPoint Argument="D" Value="4" />
                            </dxc:BarSideBySideSeries2D.Points>
                        </dxc:BarSideBySideSeries2D>
                        <dxc:BarSideBySideSeries2D DisplayName="Second Series" BarWidth="0.5">
                            <!--region #Model2-->
                            <dxc:BarSideBySideSeries2D.Model>
                                <dxc:Quasi3DBar2DModel />
                            </dxc:BarSideBySideSeries2D.Model>
                            <!--endregion #Model2-->
                            <dxc:BarSideBySideSeries2D.Points>
                                <dxc:SeriesPoint Argument="A" Value="4" />
                                <dxc:SeriesPoint Argument="B" Value="3" />
                                <dxc:SeriesPoint Argument="C" Value="2" />
                                <dxc:SeriesPoint Argument="D" Value="1" />
                            </dxc:BarSideBySideSeries2D.Points>
                        </dxc:BarSideBySideSeries2D>
                    </dxc:XYDiagram2D.Series>
                </dxc:XYDiagram2D>
            </dxc:ChartControl.Diagram>
            <dxc:ChartControl.Legend>
                <dxc:Legend />
            </dxc:ChartControl.Legend>
        </dxc:ChartControl>
    </Grid>
</Window>
See Also