Skip to main content

SimpleDiagram.LayoutDirection Property

Gets or sets a value that specifies whether the chart control positions multiple pies vertically (in columns) or horizontally (in rows).

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
[XtraSerializableProperty]
public LayoutDirection LayoutDirection { get; set; }

Property Value

Type Description
LayoutDirection

A LayoutDirection enumeration value.

Available values:

Name Description
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 SimpleDiagram.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 SimpleDiagram.Dimension property.

Remarks

You can use the LayoutDirection and SimpleDiagram.Dimension properties to change the layout of multiple pie charts in a diagram. The SimpleDiagram.Dimension property specifies how many pie charts can be displayed in one row or column.

Property Settings Dimension = 3 Dimension = 2
LayoutDirection = Horizontal Dimension_LayoutDirection_3_Horizontal.png Dimension_LayoutDirection_2_Horizontal.png
LayoutDirection = Vertical Dimension_LayoutDirection_3_Vertical.png Dimension_LayoutDirection_2_Vertical.png

Pie charts in an incomplete row or column automatically change their size to occupy all the available space.

The value that you assign to the LayoutDirection property is ignored while the ChartControl.AutoLayout property is enabled. For this reason, you should disable AutoLayout before the LayoutDirection property value is changed.

chartControl1.AutoLayout = false;
((SimpleDiagram)chartControl1.Diagram).Dimension = 3;
((SimpleDiagram)chartControl1.Diagram).LayoutDirection = LayoutDirection.Vertical;
See Also