我正在页面上打印图表。我可以绘制和修改图形,但它有一些无法更改或删除的网格线。这是代码和屏幕截图:
Chart chart2 = new Chart();
ChartArea area2 = new ChartArea();
chart2.ChartAreas.Add(area2);
Series s2 = new Series();
s2.Name = "S2";
s2.ChartType = SeriesChartType.Line;
s2.XValueType = ChartValueType.Double;
s2.YValueType = ChartValueType.Double;
chart2.Series.Add(s2);
chart2.Series["S2"].Points.DataBindXY(x2, y2);
Rectangle myRec1 = new System.Drawing.Rectangle(30,25,100,100);
// draw!
chart2.Printing.PrintPaint(e.Graphics, myRec1);
图片 :
我尝试了几乎所有系列和SO的属性,但我认为这不是原因。