开发者

How can I turn off the x-axis labels in an ASP.NET Chart Control?

开发者 https://www.devze.com 2023-02-07 11:15 出处:网络
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.

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?


Yes just set the AxisX.LabelStyle to false

e.g

Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Enabled = false;


I use following code, and works well too.

chart1.ChartAreas[0].AxisY.Enabled = AxisEnabled.False;
0

精彩评论

暂无评论...
验证码 换一张
取 消