如何在asp.net中的图表中的轴上手动设置标签文本

问题描述:

嗨专家

我的错误图表中有一个图表控件。我想设置Axis x labes manullay ...意思是我想在X轴实验室上显示名称,添加等...我用谷歌搜索但没有找到任何解决方案..如何有可能PLZ回答... 。



谢谢

Hi Experts
I have a chart control in my aplication for error chart. I want to set Axis x labes manullay...means i want to show "name","add" etc on X Axis labes...I have googled but not found any solution..How it is possible plz answer....

Thanks

试试

Try
for (int c = 1; c < numOfColumns; c++)
  chart.ChartAreas[0].AxisX.CustomLabels.Add(new CustomLabel(c - 0.5, c + 0.5, labels[c], 0, LabelMarkStyle.None));



这里标签是你的数组包含所有标签。


Here labels is your array that contains all the labels.