Rotation
AxisTickLabels.Rotation property
获取或设置刻度标签的旋转角度(以度为单位)。
public int Rotation { get; set; }
评论
可接受值的范围是 -180 到 180(含)。默认值为 0。
例子
展示如何更改轴刻度标签的方向和旋转。
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// 插入柱形图。
Shape shape = builder.InsertChart(ChartType.Column, 432, 252);
AxisTickLabels xTickLabels = shape.Chart.AxisX.TickLabels;
AxisTickLabels yTickLabels = shape.Chart.AxisY.TickLabels;
// 设置轴刻度标签的方向和旋转。
xTickLabels.Orientation = ShapeTextOrientation.VerticalFarEast;
xTickLabels.Rotation = -30;
yTickLabels.Orientation = ShapeTextOrientation.Horizontal;
yTickLabels.Rotation = 45;
doc.Save(ArtifactsDir + "Charts.TickLabelsOrientationRotation.docx");
也可以看看
- class AxisTickLabels
- 命名空间 Aspose.Words.Drawing.Charts
- 部件 Aspose.Words