This topic shows how to rotate the axis label at design time and programmatically using the Rotation property.
To set the y-axis labels at design time:
To set the y-axis labels programmatically:
To programmatically rotate the Y-axis annotation to a 60 degree angle so it appears slanted toward the use the following code:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
BarChart.Axis.Y.Labels.AxisLabelStyle.Rotation = 60 |
To write code in C#
C# |
Copy Code
|
---|---|
BarChart.Axis.Y.Labels.AxisLabelStyle.Rotation = 60; |
This topic illustrates the following:
The following image shows the Y-Axis labels rotated to a 60 degree angle: