I'm using 2009 vol 2 xamchart barchart. I'm creating a rotate3d transform that rotates the chart with the mouse. There are a mere 25 columns and 25 series (i'm plotting pixel intensities in an x,y region). The chart initializes resonably fast. The rotate transform is barely acceptable - somewhat choppy. If I increase the datapoints to say a 35 by 35 region, it takes seconds for the chart to redisplay after the rotate3d transform is changed. It's unusable. The chart is the same size, only more datapoints - why would the rotate transform perform worse? I'm not recomputing anything other than a new transform, and I have also tried enablerefresh = false. Any idea what might be going on and how to resolve? Seems like the chart is doing something behind the scenes...
Thanks in advance.
Thanks for looking into this. I tried the dispatcher timer; it does not help. I don't think it's a threading issue.
This line in the sample code simply takes a long time to execute. The more data that is bound to the chart, the longer it takes to execute.
IntensityChart.Transform3D = new System.Windows.Media.Media3D.RotateTransform3D(oQR3D);
Thanks for the sample! I had some engineers who work on the XamChart look at it. Here is one idea for optimizing your code:
It might improve things to batch these updates to once every 50 milliseconds (using a DispatcherTimer) instead of applying them every time the MouseMove event is raised.
Does this make sense to you? Using a DispatcherTimer makes your code work on a thread. Let me know if you'd like more assistance on this case.
Thanks!
Yes. I've duplicated it in the attached zipped project.
I initialize with 25 x 25. You hold the left mouse button down and move the mouse and the chart rotates. You will see it a bit choppy, but ok. You can increase the x and y via the text boxes and click build data button, which will build a new datatable and bind it to the grid. You will see the rotation performance degrades significantly.
To better determine what is going on with performance, I would need to reproduce the same behavior. Is this something you could replicate with a small sample WPF project?