XYDiagram2D.PanesPanel Property
Gets or sets a panes panel that specifies how to arrange panes within a single XYDiagram2D.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v19.1.dll
Declaration
Property Value
Type | Description |
---|---|
ItemsPanelTemplate | A ItemsPanelTemplate object that is a panes panel. |
Example
This example demonstrates the capability of XY-series to be plotted individually in a multiple pane chart.
To accomplish this task, it is necessary to bind each XY-series (e.g., AreaSeries2D, LineSeries2D, BarSideBySideSeries2D objects) to a corresponding pane using the XYDiagram2D.SeriesPane attached property.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-plot-xy-series-individually-in-a-multiple-pane-chart-e3814.
<Window x:Class="WpfApplication.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="350" Width="525" >
<Grid>
<dxc:ChartControl>
<dxc:ChartControl.Diagram>
<dxc:XYDiagram2D EnableAxisXNavigation="True">
<dxc:XYDiagram2D.PanesPanel>
<ItemsPanelTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="1.3*"/>
<RowDefinition Height="1.7*"/>
</Grid.RowDefinitions>
</Grid>
</ItemsPanelTemplate>
</dxc:XYDiagram2D.PanesPanel>
<dxc:XYDiagram2D.DefaultPane>
<dxc:Pane x:Name="pane1" Grid.Row="0">
<dxc:Pane.AxisXScrollBarOptions>
<dxc:ScrollBarOptions Visible="False" />
</dxc:Pane.AxisXScrollBarOptions>
</dxc:Pane>
</dxc:XYDiagram2D.DefaultPane>
<dxc:XYDiagram2D.Panes>
<dxc:Pane x:Name="pane2" Grid.Row="1">
<dxc:Pane.AxisXScrollBarOptions>
<dxc:ScrollBarOptions Visible="False" />
</dxc:Pane.AxisXScrollBarOptions>
</dxc:Pane>
<dxc:Pane x:Name="pane3" Grid.Row="2"/>
</dxc:XYDiagram2D.Panes>
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D Visible="True" GridSpacing="2" Interlaced="True">
<dxc:AxisX2D.Range>
<dxc:AxisRange SideMarginsEnabled="False" />
</dxc:AxisX2D.Range>
</dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>
<dxc:XYDiagram2D.Series>
<dxc:LineSeries2D ArgumentScaleType="Numerical" >
<dxc:LineSeries2D.Label>
<dxc:SeriesLabel dxc:MarkerSeries2D.Angle="90"/>
</dxc:LineSeries2D.Label>
<dxc:LineSeries2D.Points>
<dxc:SeriesPoint Value="16.48" Argument="2000"/>
<dxc:SeriesPoint Value="23.78" Argument="2001"/>
<dxc:SeriesPoint Value="17.74" Argument="2002"/>
<dxc:SeriesPoint Value="34.4" Argument="2003"/>
<dxc:SeriesPoint Value="52.5" Argument="2004"/>
</dxc:LineSeries2D.Points>
</dxc:LineSeries2D>
<dxc:AreaSeries2D ArgumentScaleType="Numerical" MarkerVisible="False"
dxc:XYDiagram2D.SeriesPane="{Binding ElementName=pane2}">
<dxc:AreaSeries2D.Label>
<dxc:SeriesLabel Visible="False" />
</dxc:AreaSeries2D.Label>
<dxc:AreaSeries2D.Points>
<dxc:SeriesPoint Argument="2000" Value="22.956" />
<dxc:SeriesPoint Argument="2001" Value="48.252" />
<dxc:SeriesPoint Argument="2002" Value="76.617" />
<dxc:SeriesPoint Argument="2003" Value="42.804" />
<dxc:SeriesPoint Argument="2004" Value="25.639" />
</dxc:AreaSeries2D.Points>
</dxc:AreaSeries2D>
<dxc:BarSideBySideSeries2D ArgumentScaleType="Numerical" BarWidth="1.3"
dxc:XYDiagram2D.SeriesPane="{Binding ElementName=pane3}" >
<dxc:BarSideBySideSeries2D.Label>
<dxc:SeriesLabel Visible="False" />
</dxc:BarSideBySideSeries2D.Label>
<dxc:BarSideBySideSeries2D.Points>
<dxc:SeriesPoint Argument="2000" Value="12.956" />
<dxc:SeriesPoint Argument="2001" Value="65.296" />
<dxc:SeriesPoint Argument="2002" Value="24.365" />
<dxc:SeriesPoint Argument="2003" Value="62.187" />
<dxc:SeriesPoint Argument="2004" Value="26.835" />
</dxc:BarSideBySideSeries2D.Points>
</dxc:BarSideBySideSeries2D>
</dxc:XYDiagram2D.Series>
</dxc:XYDiagram2D>
</dxc:ChartControl.Diagram>
</dxc:ChartControl>
</Grid>
</Window>
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PanesPanel property.
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.