Back to Devexpress

AreaStackedSeries2D Class

wpf-devexpress-dot-xpf-dot-charts-dot-areastackedseries2d.md

latest5.3 KB
Original Source

AreaStackedSeries2D Class

Represents the 2D Stacked Area series.

Namespace : DevExpress.Xpf.Charts

Assembly : DevExpress.Xpf.Charts.v25.2.dll

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public class AreaStackedSeries2D :
    SegmentSeries2DBase,
    ISupportTransparency,
    ISupportSeriesBorder,
    IStackedView,
    IGeometryHolder
vb
Public Class AreaStackedSeries2D
    Inherits SegmentSeries2DBase
    Implements ISupportTransparency,
               ISupportSeriesBorder,
               IStackedView,
               IGeometryHolder

Example

The following example demonstrates how to create a 2D Stacked Area chart. To do this, it is necessary to assign the ChartControl.Diagram property to XYDiagram2D, and then add two AreaStackedSeries2D objects with points to the diagram’s Diagram.Series collection.

Also, this example shows how to add a legend (showing series names) to a chart.

xaml
<Window x:Class="StackedArea2DChart.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:AreaStackedSeries2D DisplayName="First Series" Transparency="0.5">
                            <dxc:AreaStackedSeries2D.Points>
                                <dxc:SeriesPoint Argument="A" Value="1" />
                                <dxc:SeriesPoint Argument="B" Value="3" />
                                <dxc:SeriesPoint Argument="C" Value="7" />
                                <dxc:SeriesPoint Argument="D" Value="4" />
                            </dxc:AreaStackedSeries2D.Points>
                        </dxc:AreaStackedSeries2D>
                        <dxc:AreaStackedSeries2D DisplayName="Second Series" Transparency="0.5">
                            <dxc:AreaStackedSeries2D.Points>
                                <dxc:SeriesPoint Argument="A" Value="2" />
                                <dxc:SeriesPoint Argument="B" Value="2" />
                                <dxc:SeriesPoint Argument="C" Value="5" />
                                <dxc:SeriesPoint Argument="D" Value="4" />
                            </dxc:AreaStackedSeries2D.Points>
                        </dxc:AreaStackedSeries2D>
                    </dxc:XYDiagram2D.Series>
                    <dxc:XYDiagram2D.AxisX>
                        <dxc:AxisX2D Range="SideMarginsEnabled=False" />
                    </dxc:XYDiagram2D.AxisX>
                </dxc:XYDiagram2D>
            </dxc:ChartControl.Diagram>
            <dxc:ChartControl.Legend>
                <dxc:Legend />
            </dxc:ChartControl.Legend>
        </dxc:ChartControl>
    </Grid>
</Window>

Implements

ILegendVisible

ISupportTransparency

Inheritance

Show 20 items

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control ChartElementBase ChartElement Series XYSeries XYSeries2D MarkerSeries2D SegmentSeries2DBase AreaStackedSeries2D AreaFullStackedSeries2D

AreaStepStackedSeries2D

SplineAreaStackedSeries2D

AreaStepFullStackedSeries2D

SplineAreaFullStackedSeries2D

See Also

AreaStackedSeries2D Members

DevExpress.Xpf.Charts Namespace