SeriesPoint Class
An individual series point in the series.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v20.1.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Charts, DevExpress.Wpf.Charts
Declaration
public class SeriesPoint :
DependencyObject,
IPlatformSeriesPoint,
ISeriesPoint,
IInteractiveElement,
ISeriesPointValues,
IChartElement,
IOwnedElement,
INotificationOwner,
INotifyPropertyChanged,
ISupportTag,
IWeakEventListener
Related API Members
The following members return SeriesPoint objects:
Remarks
The SeriesPoint class implements the functionality of an individual series data point in a series. Each point has two coordinates.
X-coordinate (the point’s argument).
Specified via the SeriesPoint.Argument or property, and depends on the scale type assigned to the Series.ArgumentScaleType property.
Y-coordinate (the point’s value).
Generally, it is specified via the SeriesPoint.Value property, and depends on the scale type assigned to the Series.ValueScaleType property.
However, some series view types may use more than a single value. Not to be considered extra axis coordinates, these values represent additional information in visual forms specific to such view types (e.g. Financial Views).
For such series, the SeriesPoint.Value property doesn’t work, and the corresponding attached property should be used, instead (e.g. FinancialSeries2D.HighValue or FinancialSeries2D.OpenValue). The same is true of additional values, which are also provided via attached properties (such as the BubbleSeries2D.Weight property attached to points of the BubbleSeries2D and BubbleSeries3D series). These properties are listed at Attached Properties.
Note
If a point misses any of the arguments or values implied by the series view and scale type, it is considered empty, meaning that it isn’t drawn on the diagram, leaving a gap in the series data.
Points of a single series are stored within its Series.Points collection (represented by an instance of the SeriesPointCollection class). The collection provides the standard means for manipulating its items (such as adding, removing and accessing them), and each data point in it is available via the Item property of the collection, using indexer notation.
The Series.PointOptions property provides access to settings that define the data representation format of data points.
Example
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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-create-a-2d-side-by-side-bar-chart-e1257.
<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>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the SeriesPoint class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.