Rotation

AxisTickLabels.Rotation property

Gets or sets the rotation of the tick labels in degrees.

public int Rotation { get; set; }

Remarks

The range of acceptable values is from -180 to 180 inclusive. The default value is 0.

Examples

Shows how to change orientation and rotation for axis tick labels.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert a column chart.
Shape shape = builder.InsertChart(ChartType.Column, 432, 252);
AxisTickLabels xTickLabels = shape.Chart.AxisX.TickLabels;
AxisTickLabels yTickLabels = shape.Chart.AxisY.TickLabels;

// Set axis tick label orientation and rotation.
xTickLabels.Orientation = ShapeTextOrientation.VerticalFarEast;
xTickLabels.Rotation = -30;
yTickLabels.Orientation = ShapeTextOrientation.Horizontal;
yTickLabels.Rotation = 45;

doc.Save(ArtifactsDir + "Charts.TickLabelsOrientationRotation.docx");

See Also