Błażej
Błażej

Reputation: 3635

Remove grid lines from Winforms Chart

How can I remove chart grid lines in a System.Windows.Forms.DataVisualization.Charting chart?

Upvotes: 7

Views: 5758

Answers (1)

V4Vendetta
V4Vendetta

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

Related Questions