Back to Devexpress

ShapeTextFormat.TextRotation Property

officefileapi-devexpress-dot-spreadsheet-dot-charts-dot-shapetextformat-5b1ffebf.md

latest3.3 KB
Original Source

ShapeTextFormat.TextRotation Property

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

Namespace : DevExpress.Spreadsheet.Charts

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
int TextRotation { get; set; }
vb
Property TextRotation As Integer

Property Value

TypeDescription
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.

csharp
var chart = spreadsheetControl1.ActiveWorksheet.Charts[0];
chart.PrimaryAxes[0].TextRotation = -45;
vb
Dim 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 TitleUse the the ChartObject.Title property to access the ChartTitle object.Axis TitleUse the Axis.Title property to access the ChartTitleOptions object.Data LabelsUse the the ChartView.DataLabels property to access the DataLabelOptions object.Trendline LabelUse the Trendline.Label property to access the TrendlineLabel object.Unit Label of the Value AxisUse the TextRotation property of the DisplayUnitOptions object. See Also

ShapeTextFormat Interface

ShapeTextFormat Members

DevExpress.Spreadsheet.Charts Namespace