removing grid lines in C# Chart & making thicker g

2019-04-07 18:40发布

I'm using the built in chart class of .net 4 and I just cant find a way to remove the grid lines on the chart. Is there a way of doing it? And another question, how do I make the graph lines thicker?

Thanks :)

标签: c# charts
3条回答
Deceive 欺骗
2楼-- · 2019-04-07 19:07

I believe the line width can be changed using BorderWidth and BorderDashStyle of the series.

For the gridlines, try playing with MajorGrid, MinorGrid, MajorTickMark, MinorTickMark and Interval on the axis.

查看更多
贪生不怕死
3楼-- · 2019-04-07 19:16
Chart1.ChartAreas["ChartArea1"].AxisX.MajorGrid.Enabled = false;
Chart1.ChartAreas["ChartArea1"].AxisY.MajorGrid.Enabled = false;

This will remove gridlines from chartarea.

查看更多
聊天终结者
4楼-- · 2019-04-07 19:16

with the chart selected go to its settings menu and click into chartarea(collection).go to Axes(collection) clicking on this will open a new menu. you will find the grid settings under gridtickmarks-majorgrid. with this you can change/delete the grid with no code required.

查看更多
登录 后发表回答