Back to Devexpress

SimpleDiagram2D.LayoutDirection Property

wpf-devexpress-dot-xpf-dot-charts-dot-simplediagram2d-4b47b083.md

latest3.7 KB
Original Source

SimpleDiagram2D.LayoutDirection Property

Gets or sets a value that specifies the manner in which multiple 2D Pie charts are positioned within a chart control’s diagram.

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public LayoutDirection LayoutDirection { get; set; }
vb
Public Property LayoutDirection As LayoutDirection

Property Value

TypeDescription
LayoutDirection

A LayoutDirection enumeration value.

|

Available values:

NameDescription
Horizontal

Specifies that pie charts are positioned horizontally (by rows) within a chart control’s diagram. The number of pie charts within a single row is specified by the diagram’s SimpleDiagram2D.Dimension or SimpleDiagram3D.Dimension property.

| | Vertical |

Specifies that pie charts are positioned vertically (by columns) within a chart control’s diagram. The number of pie charts within a single column is specified by the diagram’s SimpleDiagram2D.Dimension or SimpleDiagram3D.Dimension property.

|

Remarks

The LayoutDirection property can be used with the SimpleDiagram2D.Dimension property to adjust the layout of more than one pie chart within a diagram. Depending upon the LayoutDirection property’s value, pie charts are positioned in lines either horizontally (by rows) or vertically (by columns). The SimpleDiagram2D.Dimension property specifies how many pie charts can be displayed within one row or column.

The following images shows the LayoutDirection property in action:

Property ValueExample
LayoutDirection = “Vertical”
(Dimension = “3”)
LayoutDirection = “Horizontal”
(Dimension = “3”)

Note that a pie chart(s) that is displayed within an incomplete row or column automatically changes its size to attempt to occupy all the available free space.

Example

This example shows how to use the SimpleDiagram2D.LayoutDirection and SimpleDiagram2D.Dimension properties to arrange multiple pies within a simple diagram.

xaml
<dxc:ChartControl AutoLayout="False">
    <dxc:SimpleDiagram2D LayoutDirection="Vertical" Dimension="3">
        <!-...-->
    </dxc:SimpleDiagram2D>
</dxc:ChartControl>

See Also

Dimension

SimpleDiagram2D Class

SimpleDiagram2D Members

DevExpress.Xpf.Charts Namespace