09-17-2009 09:01 AM
I am trying to draw some graphics on ScatterPlot.
So everytime the graph repaints I need to redraw my graphics.
I try doing this on AfterDrawPlotArea event.
My chart crashes.
Does anyone have a solution?
-pankil
09-17-2009 09:03 AM
By the way,
I am using Visual C# 2008 with measurement studio.
09-18-2009 02:08 PM
pankil,
When you say the chart crashes, what happens to the chart? Is an error thrown? What code do you have in the event callback?
Have you tried using the BeforeDrawPlotArea event?
09-19-2009 12:12 PM
I use graphics to draw shapes on the ScatterGraph
I cannot use BeforeDrawPlotArea event because I need the graph to be all painted before I draw any graphics else it shall refresh and I shall have to repaint and as far as I know there is no AfterPaint event in ScatterGraph
When the graph crashes, I get an error, '...collection has been modified...'
09-21-2009 03:10 PM
pankil,
Can you post the code for your AfterDrawPlotArea callback? I'd like to see how you're drawing on the plot to see if there is anything strange going on.
09-30-2009 10:41 AM
Well I figured my code did have a bug.
Fixed it.
10-01-2009 08:11 AM
Pankil,
Could you post what the problem was? That way if anyone else comes across this forum post in the future with a similar problem, they can see how the issue was resolved.
10-10-2009 12:07 PM
I added a Graphical object I needed to draw on the graph to a list.
So everytime I repainted the object it would add coies to the list thus entering a infinite loop.
Fixed it.