AreaStepSeries2D Class
The 2D Step Area series.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v19.2.dll
Declaration
Example
The following example demonstrates how to create a Step Area chart. To do this, it is necessary to assign the ChartControl.Diagram property to XYDiagram2D, and then add an AreaStepSeries2D
object with points to the diagram’s Diagram.Series collection.
Also, this example shows how to add a chart title.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-create-a-2d-step-area-chart-e3511.
<Window x:Class="AreaStep2DChart.MainWindow"
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="MainWindow" Height="500" Width="625">
<Grid>
<dxc:ChartControl>
<dxc:ChartControl.Diagram>
<dxc:XYDiagram2D>
<dxc:XYDiagram2D.Series>
<dxc:AreaStepSeries2D Transparency="0.7">
<dxc:AreaStepSeries2D.Points>
<dxc:SeriesPoint Argument="ExxonMobil" Value="277.02" />
<dxc:SeriesPoint Argument="General Electric" Value="328.54" />
<dxc:SeriesPoint Argument="Microsoft" Value="297.02" />
<dxc:SeriesPoint Argument="Citigroup" Value="255.3" />
<dxc:SeriesPoint Argument="Royal Dutch Shell plc" Value="173.54" />
<dxc:SeriesPoint Argument="Procter & Gamble" Value="131.89" />
</dxc:AreaStepSeries2D.Points>
</dxc:AreaStepSeries2D>
</dxc:XYDiagram2D.Series>
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D>
<dxc:AxisX2D.Label>
<dxc:AxisLabel Staggered="True" />
</dxc:AxisX2D.Label>
</dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>
<dxc:XYDiagram2D.AxisY>
<dxc:AxisY2D>
<dxc:AxisY2D.Range>
<dxc:AxisRange MinValue="125" MaxValue="390" />
</dxc:AxisY2D.Range>
<dxc:AxisY2D.Title>
<dxc:AxisTitle Content="Market value (billion US$)" />
</dxc:AxisY2D.Title>
</dxc:AxisY2D>
</dxc:XYDiagram2D.AxisY>
</dxc:XYDiagram2D>
</dxc:ChartControl.Diagram>
<dxc:ChartControl.Titles>
<dxc:Title Dock="Top" HorizontalAlignment="Center">Corporations with Highest Market Value in 2004</dxc:Title>
</dxc:ChartControl.Titles>
</dxc:ChartControl>
</Grid>
</Window>
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AreaStepSeries2D 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.