How can I remove grid lines from chart? I use standard Chart library.
Thanks!
Click the chart with the lines, and then click the Chart Design tab. Click Add Chart Element, click Gridlines, and then click More Gridline Options. Select No line. You can also click the line and press DELETE .
- The Legend displays the plotted data series with a predefined symbol and the name of the series.It also assigns a unique colour to each series. Gridlines- These are the parallel lines along the X-axis and Y-axis in the plot area which makes it easier to identify the value of each data point on the chart.
You can disable MajorGrid
or MinorGrid
of each of the axis of the desired chart-area:
mainChart.ChartAreas[0].AxisX.MajorGrid.Enabled = false; mainChart.ChartAreas[0].AxisX.MinorGrid.Enabled = false; mainChart.ChartAreas[0].AxisY.MajorGrid.Enabled = false; mainChart.ChartAreas[0].AxisY.MinorGrid.Enabled = false;
as seen below: https://github.com/sinairv/MSChartWrapper/blob/master/MSChartWrapper/ChartWrapper.cs#L58-L61
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With