How do I rotate the text orientation of the text on the X Axiz of the Microsoft ASP.NET Chart Control? I am using .NET 4.
Is this done under the Series?
This class encapsulates all the functionality for axes in the Chart control, and is exposed by the AxisX, AxisY, AxisX2 and AxisY2 properties of ChartArea objects. For all charts - except bar, stacked bar, pie and doughnut - the primary and secondary axes are as follows: Bottom horizontal axis. Top horizontal axis. Left vertical axis.
The control reproduces the behavior of the built-in Label control but allows the text to be rotated. It allows the user to set the text, angle of rotation, text alignment, and auto-size properties in the designer.
Bottom horizontal axis. Top horizontal axis. Left vertical axis. Right vertical axis. Bar and stacked-bar charts have their axes rotated 90 degrees clockwise, so the primary X axis for these two chart types is the left-vertical axis. Note There can be only one set of axes - two vertical and two horizontal - for each ChartArea object.
You can control the axis bounds by setting the axis Min and Max properties. You can also customize the scale to better meet your needs when the data is spread over a large range by configuring a logarithmic scale (log scale). FlexChart will use a logarithmic axis when you set the LogBase property of the axis.
MyChart.ChartAreas[0].AxisX.LabelStyle.Angle = -90; // Can vary from -90 to 90.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With