Back to Devexpress

XYDiagram.Rotated Property

corelibraries-devexpress-dot-xtracharts-dot-xydiagram.md

latest6.1 KB
Original Source

XYDiagram.Rotated Property

Gets or sets whether the diagram is rotated.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public virtual bool Rotated { get; set; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
Public Overridable Property Rotated As Boolean

Property Value

TypeDescription
Boolean

true to rotate the diagram; otherwise, false.

|

Remarks

If the Rotated property is enabled, the X-axis is displayed vertically, and the Y-axis is displayed horizontally.

Note that the Rotated property doesn’t affect the functionality of the axes. To clarify - the axis of arguments is still the X-axis, and the axis of values - the Y-axis.

Rotated = falseRotated = true

For more information, refer to Diagram and Axes.

Example

The following code shows how to change the XYDiagram.Rotated property value. Note that this code is valid only if the current chart’s diagram (returned by its ChartControl.Diagram or WebChartControl.Diagram property) is an XYDiagram or its descendant.

csharp
((DevExpress.XtraCharts.XYDiagram)chartControl1.Diagram).Rotated = true;
vb
CType(chartControl1.Diagram, DevExpress.XtraCharts.XYDiagram).Rotated = True

The following code snippets (auto-collected from DevExpress Examples) contain references to the Rotated 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.

asp-net-web-forms-web-chart-control-create-drill-down-chart/CS/DrillDownChart/WebForm1.aspx.cs#L36

csharp
if (e.Series[0].View is StackedBarSeriesView) {
    diagram.Rotated = true;
    WebChartControl1.CrosshairOptions.ShowArgumentLine = false;

winforms-chart-drill-down/CS/Form1.cs#L70

csharp
chartControl.ToolTipEnabled = DefaultBoolean.True;
diagram.Rotated = true;
diagram.AxisX.Label.DXFont = this.linkFont;

winforms-chart-create-a-full-stacked-spline-area-chart/CS/FullStackedSplineAreaChart/Form1.cs#L39

csharp
// Access the diagram's options.
((XYDiagram)fullStackedSplineAreaChart.Diagram).Rotated = true;

winforms-charts-create-side-by-side-bar-chart/CS/Form1.cs#L38

csharp
// Rotate the diagram (if necessary).
((XYDiagram)sideBySideBarChart.Diagram).Rotated = true;

asp-net-web-forms-web-chart-control-create-drill-down-chart/VB/DrillDownChart/WebForm1.aspx.vb#L37

vb
If TypeOf e.Series(0).View Is StackedBarSeriesView Then
    diagram.Rotated = True
    WebChartControl1.CrosshairOptions.ShowArgumentLine = False

winforms-chart-drill-down/VB/Form1.vb#L79

vb
chartControl.ToolTipEnabled = DefaultBoolean.[True]
diagram.Rotated = True
diagram.AxisX.Label.DXFont = Me.linkFont

winforms-chart-create-a-full-stacked-spline-area-chart/VB/FullStackedSplineAreaChart/Form1.vb#L36

vb
' Access the diagram's options.
CType(fullStackedSplineAreaChart.Diagram, XYDiagram).Rotated = True
' Add a title to the chart and hide the legend.

winforms-charts-create-side-by-side-bar-chart/VB/Form1.vb#L36

vb
' Rotate the diagram (if necessary).
CType(sideBySideBarChart.Diagram, XYDiagram).Rotated = True
' Add a title to the chart (if necessary).

See Also

Diagram

Axes

XYDiagram Class

XYDiagram Members

DevExpress.XtraCharts Namespace