BWS
BWS

Reputation: 3846

MSCharts Axis Label: not always angled correctly

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

Upvotes: 0

Views: 698

Answers (1)

Hans Derks
Hans Derks

Reputation: 1027

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

Upvotes: 1

Related Questions