Question

I'm formatting MSCHARTS. I can get the AXIS label to appear on 45 degree angle, SOMETIMES. Is there a way to force it to ALWAYS be 45 degrees?

Sometimes it's correct like this: enter image description here

But, sometimes it's like this (could be a function of the number of columns?): enter image description here

code-behind:

Chart1.ChartAreas("ChartArea1").AxisX.IsLabelAutoFit = True
Chart1.ChartAreas("ChartArea1").AxisX.LabelAutoFitStyle = DataVisualization.Charting.LabelAutoFitStyles.LabelsAngleStep45
Chart1.ChartAreas("ChartArea1").AxisX.LabelStyle.Enabled = True
Was it helpful?

Solution

Have you tried this one art1.ChartAreas("ChartArea1").AxisX.LabelStyle.Angle = 45;

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top