[英]How can I turn off the x-axis labels in an ASP.NET Chart Control?
I want to programmatically turn on/off the labels on an Chart Control. 我想以编程方式打开/关闭图表控件上的标签。
The chart is for a load of stats, by person, and I want to be able to anonymise it by removing the labels. 该图表是按人数加载统计信息,我希望能够通过删除标签来匿名化。
Can this be done from the Chart Control, or do I need to do it at the underlying data-table? 这可以通过Chart Control完成,还是需要在底层数据表中完成?
Yes just set the AxisX.LabelStyle to false 是的,只需将AxisX.LabelStyle设置为false即可
eg 例如
Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Enabled = false;
我使用以下代码,也很好用。
chart1.ChartAreas[0].AxisY.Enabled = AxisEnabled.False;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.