Skip to main content

ShapeTextFormat.TextRotation Property

Gets or sets the rotation angle of the text in a chart element.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

int TextRotation { get; set; }

Property Value

Type Description
Int32

An integer value which specifies the rotation angle in degrees. This value must be between -90 and 90.

Remarks

Use the TextRotation property to rotate the text displayed in the chart elements listed below.

Note

DevExpress SpreadsheetControl does not take the TextRotation property into account. However, you can access the property in code, export the document in supported formats, and see changes in Microsoft Excel.

Axis Labels

To rotate the text in axis labels, use the TextRotation property of the Axis object. DevExpress SpreadsheetControl takes this property into account.

Axis Labels Rotation

var chart = spreadsheetControl1.ActiveWorksheet.Charts[0];
chart.PrimaryAxes[0].TextRotation = -45;

The TextRotation property has no effect on the visual appearance of axis labels in the following charts:

  • Excel 2016 Charts
  • Radar Charts for WPF
  • X-Axis labels in Radar Charts for WinForms
Chart Title
Use the the ChartObject.Title property to access the ChartTitle object.
Axis Title
Use the Axis.Title property to access the ChartTitleOptions object.
Data Labels
Use the the ChartView.DataLabels property to access the DataLabelOptions object.
Trendline Label
Use the Trendline.Label property to access the TrendlineLabel object.
Unit Label of the Value Axis
Use the TextRotation property of the DisplayUnitOptions object.
See Also