Orientation
AxisTickLabels.Orientation property
获取或设置刻度标签文本的方向。
public ShapeTextOrientation Orientation { get; set; }
评论
默认值为Horizontal。
请注意,一些ShapeTextOrientation
值不会影响数值轴上刻度标签 text 的方向。
例子
展示如何更改轴刻度标签的方向和旋转。
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");
也可以看看
- enum ShapeTextOrientation
- class AxisTickLabels
- 命名空间 Aspose.Words.Drawing.Charts
- 部件 Aspose.Words