I overcame the 3D charting slowness by (duh) changing the point style to inverted pyramid from sphere. Obviously, the graphics hardware (I hope its in hardware) is drawing tons of polygons to show tiny spheres and only a few for pyramids. Why inverted? I don’t really know, but my best guess is that it has to do with lighting and shading, which I’m sure to investigate one day soon. Funny that these tiny dots (up to 22,000 now) are trying to draw themselves in 3D when I can barely see them.
Funny enough, the speed advantage is not apparent on the old MacBook I was planning to demo on. If I had tried this on the wrong machine, I never would have known it works.
I’m doing an interesting charting project which will plot up to 500 thousand points, so I’m learning a bit about charts. There seems to be about a million different vendors selling .Net charts, so there’s a lot to choose from. The problem is there’s about a million different charts, so there’s too many to choose from. I’ll tell about a couple I’ve used today.
Unfortunately, when throwing a few thousand points at it, the performance wasn’t stellar.
I just switched to XCeed. It can do surface plots too, but its literally a thousand times faster at ploting points. They say they use GDI, but I think there’s a flux capacitor hidden in there somewhere. The only downside, is its not WPF, its windows forms. That doesn’t seem like too much of an issue though. The XCeed example code is a lot more focused and comprehensive than Chart FX, so far its been a win, but I’m just getting started with it.
The code I uploaded was a big hit, so here’s a quick and dirty app showing that the XCeed chart is 1000 times faster than Chart FX for plotting points:
With the same 5000 points given to both charts, XCeed charted in 9 ms and Chart FX took 3.5 seconds. When resizing the form, Chart FX will freeze up again for 3.5 seconds. The code is also a good sample of how to use a Windows Forms Control in a WPF application. Click here for code, with the usual no warranties.