Back to Devexpress

SimpleDiagram.LayoutDirection Property

corelibraries-devexpress-dot-xtracharts-dot-simplediagram-bd886144.md

latest3.8 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public LayoutDirection LayoutDirection { get; set; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
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 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 SettingsDimension = 3Dimension = 2
LayoutDirection = Horizontal
LayoutDirection = Vertical

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.

csharp
chartControl1.AutoLayout = false;
((SimpleDiagram)chartControl1.Diagram).Dimension = 3;
((SimpleDiagram)chartControl1.Diagram).LayoutDirection = LayoutDirection.Vertical;
vb
chartControl1.AutoLayout = False
CType(chartControl1.Diagram, SimpleDiagram).Dimension = 3
CType(chartControl1.Diagram, SimpleDiagram).LayoutDirection = LayoutDirection.Vertical

See Also

Dimension

SimpleDiagram Class

SimpleDiagram Members

DevExpress.XtraCharts Namespace