I tried the PrePaint event, but my line appears on the back side of the plotting area. If I draw a line from e.g. position (0,0) I can see the starting point of the line, but then it disappears under the plot area. How can I create a graphics object from the plot area? It is important for me to keep the interactivity with the chart.
Example code:
Graphics g = chart1.CreateGraphics();Pen pen = new Pen(Color.Red); pen.Width = 10;
g.DrawLine(pen, 0, 0, chart1.Width, chart1.Height);
pen.Dispose();
g.Dispose();