2013-10-16 15 views
0

我正在格式化MSCHARTS。我可以讓AXIS標籤以45度角出現,有時候。有沒有辦法強制它始終是45度?MSCharts Axis標籤:並不總是角度正確

有時它是正確的是這樣的: enter image description here

但是,有時候是這樣的(可能是列數的函數): enter image description here

後臺代碼:

Chart1.ChartAreas("ChartArea1").AxisX.IsLabelAutoFit = True 
Chart1.ChartAreas("ChartArea1").AxisX.LabelAutoFitStyle = DataVisualization.Charting.LabelAutoFitStyles.LabelsAngleStep45 
Chart1.ChartAreas("ChartArea1").AxisX.LabelStyle.Enabled = True 
+0

你有沒有試過這個art1.ChartAreas(「ChartArea1」)。AxisX.LabelStyle.Angle = 45; –

+0

BWS〜是的。根據漢斯的回答,我已經測試過它。它正在工作。請嘗試。 – mit

+0

@HansDerks - (和@mit)---似乎已經做到了!如果您將其作爲答案發布,我會接受它。謝謝! – BWS

回答

1

你試過這個嗎? art1.ChartAreas(「ChartArea1」)。AxisX.LabelStyle.Angle = 45;

+0

謝謝@Hans - 這似乎現在工作! – BWS