I'm trying to plot roughly a million data points (x,y) (floats) into a xamDataChart. When using a CategoryXAxis and LineSeries, the performance is excellent and zooming is smooth.
When using a NumericXAxis and a ScatterLineSeries, I am experiencing a significant loss in performance. This can be reproduced by adapting the "BindingHighVolumeData" sample.
Also, I am experiencing rendering artifacts when zooming deep into the graph:
Thes issues do not occur when using a CategoryXAxis.
I am currently evaluating to buy Infragistics DV for Silverlight for its stellar performance. However, I do need a precise x,y plot. As far as I understand CategoryXAxis will align my data points with a constant x spacing, correct?
Why is the performance of ScatterLineSeries so much worse? Is there a recommended way to draw a high performance xy line plot?
Hi,
Did you come up with a scenario where the use of CategoryDateTimeXAxis for the X data would be inappropriate? I think most situations where you have monotonically increasing X values where the x data is non-equidistant probably map back to date time data. But I'm sure there could be some exceptions. But can you think of any examples that would be important to you?
And if the data is non monotonically increasing in x value, then you have a much bigger problem, and it can be rather hard to make any performance gaurantees. Think about the case where you had 1 million completely random x,y points so that you had no choice but to render 1 million line segments on the screen to accurately capture what the image should look like. This is doable, but it makes it hard to maintain interactive performance for panning and zooming. The geometry cannot be simplified without decreasing its fidelity to the data it is trying to represent.
The current ScatterLineSeries does not assume that the data monotonically increases in the X direction so can't do very much to simplify the geometry its being asked to push to the screen.
LineSeries can, however, even in the case where you use CategoryDateTimeXAxis, so that remains my recommendation. If there is a situation, though, were CategoryDateTimeXAxis is inappropriate, lets discuss it, and I can probably help you with a workaround. And in the medium to long term, it would probably help if we added an OrderedX axis as described above. It may even be possible to do this today as a user extension. But I have not investigated this.
The prioritization of that feature work would be aided by any concrete examples you can provide of scenarios where you have monotonically increasing X data but it would be inappropriate to represent them as time values.
You may also want to inquire with productmanager@infragistics.com or developer support, as to whether your feature request has been duly noted.
Hope this helps!
-Graham
The rendering issue seems fixed in the 2011.2 Release (Silverlight 5 version).
Unfortunately I have not been able to get a Feedback on the ScatterLineSeries performance issue. I think I logged the feature request two or three times now but didn't even receive a confirmation email!. Part of the reason I have not been able to pursue this issue further is that the project I have been working on that needs this chart has been put on backlog for a while but its coming up now again.
I did a re-assessment of current Silverlight Charts from various vendors and their performance for my scenario, and Infragistics still seems the top choice. I'd be happy to buy your components, however I need to be sure I can get the performance story right.
I saw that ScatterBase is offered as a base class, do you think it is possible to implement my own FastScatterLineSeries if necessary? Or would Axis be the right extension point?
Thanks Graham, I filed a feature request.
Graphical corruption on zooming in too far appears to be an issue with the clipping algorithms for this series. Mostly that its falling back on Silverlight's clipper that has some erroneous behavior. I've recorded this as bug number 88467.
I think that OrderedNumericXAxis would be an excellent feature request: http://devcenter.infragistics.com/Protected/RequestFeature.aspx
It seems to me like it would be a good idea to add it to the product with high priority as this scenario has cropped up before, but many factors would affect how soon it would make it into the product. You could email productmanager@infragistics.com if you would like to discuss the matter further. CategoryDateTimeXAxis was designed to suit this scenario with DateTime data, but it would be quite useful to have a generalized x axis (and y axis for that matter) that performed this function for scatter plots. The more constraints the chart it allowed to place on the data, the more performance on that data will approach the performance of the CategoryXAxis.
Also, we are always looking to further improve the performance of the generalized scatter case. So I'll take a look at your sample, were it seems there might be a rendering bug, and let you know if there is anything you can do in the application side to speed things up, or that we can do to improve the performance.
One other thing I can mention is that if you use a fixed axis labels extent for the y axis, this can often help performance of initial display and zooming. If you allow the labels to automatically adjust the width of the label area this can often result in the chart having to be rerendered to accomodate. You can pick a fixed axis extent like this:
<ig:NumericYAxis.LabelSettings>
<ig:AxisLabelSettings Extent="50" />
</ig:NumericYAxis.LabelSettings>
I'll get back to you with a bug number for the rendering artifacts, as I suspect it must be an issue with ScatterLineSeries.