+9

Knowing when InvalidePlot (Rendering) has completed

csharpuser 9 ár síðan updated by SHK 6 ár síðan 3
I have a plot with a large number of points (>300000) and when I call, PlotView.InvalidatePlot(true), it takes a while to render. This is acceptable but I would like to put up an hourglass or some other indication that things will take a while. I'm having some problems though as I don't know when the Rendering is complete. I can't find an event that I can subscribe to. Is there one?


I call MyPlot.InvalidatePlot(true); from the main GUI thread. If my understanding is correct, InvalidatePlot works on another thread. Presumeably, it must get back on the GUI thread to actually plot data. I tried using the following:


Mouse.OverrideCursor = Cursors.Wait;
MyPlot.InvalidatePlot(true);
Mouse.OverrideCursor = null;


and other similar ideas but to no avail. I'm guessing that InvalidatePlot is a non blocking call. What I really need to do is switch to Cursors.Wait and then in some event, set the cursor back again. I was hoping for something like:


MyPlot.RenderingCompleted or some such thing. Can someone give me some pointers?


Regards,
Dave
+2

2 years and nothing? :( I'm facing similar challenges with applying a data stream to heatmapseries and the heatmap takes time to generate, thus I occasionally get exceptions from the data updating too quickly

Same problem too in WPF app. How to put a hourglass during plot rendering?

Did you guys got any solution for this issue?


I have got it working automatically by writing the InvalidatePlot() invocation call inside the UI Dispatcher thread, It worked for 2 days, currently it's not working!!


Also I am facing an issue in which I need to bind Data property HeatMapSeries with 10000x10000 2D array. It throws System.OutOfMemory exception. This problem exists for the 2D array of size 2000x2000 or higher.