Reputation: 3635
How can I remove chart grid lines in a System.Windows.Forms.DataVisualization.Charting
chart?
Upvotes: 7
Views: 5758
Reputation: 38210
you need to set the MajorGrid
and MinorGrid
property for the respective axis to false.
like chartArea.AxisX.MajorGrid.Enabled = false;
if you mean how to specify in the mark up then under chart areas
<asp:ChartArea .....
<AxisX ><MajorGrid Enabled="false" /><MinorGrid Enabled="false" /></AxisX>
<AxisY><MajorGrid Enabled="false" /><MinorGrid Enabled="false" /></AxisY>
</asp:ChartArea>
Upvotes: 8