Back to Devexpress

XYDiagram2D.Panes Property

wpf-devexpress-dot-xpf-dot-charts-dot-xydiagram2d-4f29fc3c.md

latest4.1 KB
Original Source

XYDiagram2D.Panes Property

Provides access to the diagram‘s pane collection.

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public PaneCollection Panes { get; }
vb
Public ReadOnly Property Panes As PaneCollection

Property Value

TypeDescription
PaneCollection

A PaneCollection object which is the collection of a diagram’s panes.

|

Remarks

By default, a chart’s diagram displays a single default pane, which is represented by a Pane object, and is accessible via the XYDiagram2D.DefaultPane property.

Note

The collection returned by the Panes property doesn’t contain the default pane.

For more information, refer to Panes.

Example

This example demonstrates how to assign a pane and a secondary X-axis to a series. The example uses the following classes and properties:

SymbolDescription
XYDiagram2D.SecondaryAxesXGets the collection of secondary X-axes.
SecondaryAxisX2DA secondary X-axis in the Chart Control’s Cartesian Diagram.
XYSeries2D.AxisXSpecifies the X-axis (or its View Model) that measures the series.
XYDiagram2D.PanesProvides access to the diagram‘s pane collection.
PaneAn individual pane within the Chart Control’s Cartesian Diagram.
XYSeries2D.PaneSpecifies the pane (or its View Model) on which the series is plotted.
xaml
<dxc:XYDiagram2D.Panes>
    <dxc:Pane x:Name="secondPane" Margin="0,4,0,0"/>
</dxc:XYDiagram2D.Panes>
<dxc:XYDiagram2D.SecondaryAxesX>
    <dxc:SecondaryAxisX2D x:Name="secondAxisX" Alignment="Near">
        <dxc:SecondaryAxisX2D.QualitativeScaleOptions>
            <dxc:QualitativeScaleOptions AutoGrid="False" AggregateFunction="Sum"/>
        </dxc:SecondaryAxisX2D.QualitativeScaleOptions>
    </dxc:SecondaryAxisX2D>
</dxc:XYDiagram2D.SecondaryAxesX>
    <dxc:BarSideBySideSeries2D x:Name="secondSeries" DisplayName="Meat/Poultry"
                               ArgumentDataMember="ProductName" ValueDataMember="ExtendedPrice" FilterString="[CategoryName] = 'Meat/Poultry'"
                               Pane="{Binding ElementName=secondPane}" AxisX="{Binding ElementName=secondAxisX}" Legend="{Binding ElementName=secondLegend}"/>

See Also

XYDiagram2D Class

XYDiagram2D Members

DevExpress.Xpf.Charts Namespace