Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net MSCharts轴标签:角度不总是正确的_Asp.net_Vb.net_Mschart - Fatal编程技术网

Asp.net MSCharts轴标签:角度不总是正确的

Asp.net MSCharts轴标签:角度不总是正确的,asp.net,vb.net,mschart,Asp.net,Vb.net,Mschart,我是哈茨。有时,我可以使轴标签以45度角显示。有没有办法强迫它始终保持45度 有时候是这样的: 但是,有时是这样的(可能是列数的函数?) 代码隐藏: Chart1.ChartAreas("ChartArea1").AxisX.IsLabelAutoFit = True Chart1.ChartAreas("ChartArea1").AxisX.LabelAutoFitStyle = DataVisualization.Charting.LabelAutoFitStyles.LabelsAng

我是哈茨。有时,我可以使轴标签以45度角显示。有没有办法强迫它始终保持45度

有时候是这样的:

但是,有时是这样的(可能是列数的函数?)

代码隐藏:

Chart1.ChartAreas("ChartArea1").AxisX.IsLabelAutoFit = True
Chart1.ChartAreas("ChartArea1").AxisX.LabelAutoFitStyle = DataVisualization.Charting.LabelAutoFitStyles.LabelsAngleStep45
Chart1.ChartAreas("ChartArea1").AxisX.LabelStyle.Enabled = True
你试过这个吗
art1.图表区域(“图表区域1”).AxisX.LabelStyle.Angle=45

你有没有试过这一款art1.ChartAreas(“ChartArea1”).AxisX.LabelStyle.Angle=45;是的。根据汉斯的回答,我已经测试过了。它起作用了。请试一试。@handerks--(和@mit)--这似乎已经做到了!!如果你把它作为答案贴出来,我会接受的。谢谢