Hi Infragistics Support,
Can you provide some guidance/tips/suggestions for a new user of your controls?
I have a requirement to display ~400 series. Each with ~6000 points (for a total of ~2,400,000 points). Will Infragistics WPF chart control be able to handle this and still provide a good user experience?
Some other requirements: will need zoom and pan, Series hit testing but not necessarily point (marker) hit testing. I believe the data will normally be evenly spaced in the X direction but cannot guarantee that.
How would Infragistics recommend charting this data to achieve a good user experience (i.e. the char is still "snappy")?
Please let me know if any more information would help. Thanks!
Chris
One caveat:
As that is a code sample, rather than something we ship for the product, it obviously doesn't have much scrutiny in terms of testing etc. If you like it, definitely suggest we add something along those lines to the product at http://ideas.infragistics.com and maybe we'll get it rolled into the product someday soon.
-Graham
Chris,
I've got something neat for you here: https://gist.github.com/gmurray81/52776872c9cdac3a6efb
Please note this also requires a generic.xaml (included in the gist) that you'll need to set up in the project that you add OrderedScatterLineSeries to. The easiest thing to do to get this set up is to do an Add New Item in VS and select WPF => Custom Control and add one to your project called OrderedScatterLineSeries. This will add the Generic.Xaml to your project and make sure that is all set up correctly. You should then be able to use the stuff from the gist.
The gist is an old sample I dug up that I wrote quote a while ago which implements a custom scatter line series which assumes more constraints on the data provided to it. I also tweaked it a bit more for your scenario, and fixed a few bugs. You should be able to drop it in as a replacement for ScatterLineSeries in your sample and comment out the lines that relate to the markers (this series doesn't support those as of yet). You should see its a lot smoother than ScatterLineSeries, and maybe even a bit smoother than LineSeries.
Now, you can also try setting UseHairline=true on that series (added this just for you). This will lower the fidelity a tad, but will make things even smoother. Normally this custom series, and the series built into the chart, are trying to simplify the line somewhat, but they want to make sure to represent the data faithfully, so what they actually end up drawing is a polygon that spans the min/max y values. Specifying UseHairline=true on this custom series will make sure that it only every uses a Polyline to render the series, and if the data points are especially dense in a region, it will only actually represent the max values, rather than spanning both the min and max values over that range. Let me know if I should elaborate further there.
Anyhow, this decreases the complexity of the visuals we are passing to WPF quite a bit so can boost things more for you, at the sacrifice of a bit of fidelity. The line will still make sure to encompass your max values in that mode, but doesn't necessarily encompass the min peaks. Anyhow, for greater fidelity you can leave that off. And in either case case, if you zoom in, you'll see all the data.
To decrease fidelity even further, to boost perf, you can start playing with the resolution setting on this series, or the built in chart series. Raising that to higher values will decrease fidelity further, but simplify the visuals pushed to WPF.
Try all the above with BitmapCache on or off, I'm not sure if it will help or hinder you with your scenario. Basically turn it on if the scenario you have set up seems to be slowing down the crosshair/tooltip/etc in addition to the zoom performance.
Hope this helps!
Hi Graham.
Thanks again for the valuable insight. I'm going to be speaking with our domain expert soon to get more information about the data and how we will expect it to arrive. This will provide me with better knowledge on whether or not we can switch to a LineSeries or not.
Please let me know if you have any more information or changes to suggest. Feel free to send back the code I sent if you can so I can see some comparisons to the original.
If you don't have anything more, go ahead and mark this question as "answered".
Thanks again for the support. Infragistics has a good product. Perhaps this area is something that can be tweaked to make graphs with lots of series perform even better. (Maybe if there were more parameters we could set to provide hints about the data...hmmm?)
I experimented with using LineSeries rather than ScatterLineSeries in your scenario and the experience is much smoother. This, of course, would only be appropriate if the sampling interval was the same for all your instruments, or could be aligned to be the same, does that seem like it would work?
Profiling the application, it definitely seems like you are losing some performance to ScatterLineSeries and it boils down to us being less able to simplify the visuals efficiently, without losing graphical fidelity. The crux with ScatterLineSeries is that we can't assume that the data you provide proceeds in an orderly "line-like" fashion, since this constraint does not actually exist with that series type, you could technically pick an entirely different X-Y location for every data point, and this would generate an absolutely worst case scenario for the renderer.
But your dat is, in reality, much more orderly and constrained. You can indicate these constraints to the chart by using LineSeries rather than ScatterLineSeries. However, it is possible that those constraints are too restrictive, in your scenario. Here's what Category series expect:
We could also try to tune the ScatterLineSeries more to your scenario, but that would be a feature request. For example, we could add an option whereby you indicate that your data has additional constraints (monotonically increases on x values, for example) which could help performance.
Let me also dig a bit. I'm remembering creating a sample once that created a custom scatter line series with some additional constraints on the data provided which may perform better in your scenario. Still, I'd recommend looking into whether LineSeries, is right for you.
Please look for an email from me.
Thanks.