Rotation

AxisTickLabels.Rotation property

Obtient ou définit la rotation des étiquettes de graduation en degrés.

public int Rotation { get; set; }

Remarques

La plage de valeurs acceptables s’étend de -180 à 180 inclus. La valeur par défaut est 0.

Exemples

Montre comment modifier l’orientation et la rotation des étiquettes de graduation des axes.

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

// Insérer un graphique à colonnes.
Shape shape = builder.InsertChart(ChartType.Column, 432, 252);
AxisTickLabels xTickLabels = shape.Chart.AxisX.TickLabels;
AxisTickLabels yTickLabels = shape.Chart.AxisY.TickLabels;

// Définir l'orientation et la rotation de l'étiquette de graduation de l'axe.
xTickLabels.Orientation = ShapeTextOrientation.VerticalFarEast;
xTickLabels.Rotation = -30;
yTickLabels.Orientation = ShapeTextOrientation.Horizontal;
yTickLabels.Rotation = 45;

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

Voir également