如何从图表中删除网格线在WindowsForm? [英] How to delete grid lines from Chart in WindowsForm?

查看:116
本文介绍了如何从图表中删除网格线在WindowsForm?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从图表中删除网格线?我使用标准图库。

How can I remove grid lines from chart? I use standard Chart library.

谢谢!

推荐答案

假设一个ChartArea,你可以试试这些设置:

Assuming a single ChartArea, you can try these settings:

chart1.ChartAreas[0].AxisX.MajorGrid.LineWidth = 0;
chart1.ChartAreas[0].AxisY.MajorGrid.LineWidth = 0;



否则,你可能要使用:

Otherwise you may want to use:

chart1.ChartAreas["ChartArea1"].AxisX.MajorGrid.LineWidth = 0;
chart1.ChartAreas["ChartArea1"].AxisY.MajorGrid.LineWidth = 0;

其中,ChartArea1是系列属性 - >图表 - >图表区ChartArea1

where, "ChartArea1" is the Series Property-->Chart-->Chart Area "ChartArea1"

这篇关于如何从图表中删除网格线在WindowsForm?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆