Pre loader

RolloverModifier with Thousands of Series

0
0

I’ve attached a screen-shot of the proof-of-concept App I am currently working on. It’s build according to the MVVM guidelines.

This App deals with large amounts of scientific measurement data. Each single measurement is flagged as belonging to a category: Outlier, Regular-Sample, Negative-Control, Positive-Control.

A single measurement is shown as a FastLineRenderableSeries on the “MST time traces” chart and as a single impulse (FastImpulseRenderableSeries) on the “Ranking plot”.
The charts use colours (grey, blue, green, red) in order to visualize the categories. Additionally there’s a “Selected” state, used to highlight the currently selected measurements and which is kept in sync across the DataGrid and the two charts (displayed pink on the charts).

Since the charts display such a vast amount of items (about 5000) I’ve to make sure that the important categories remain visible on the charts and do not get shadowed by less important categories. On the lines-chart I just have to care about the sequence of the IChartSeriesViewModel inside the ObservableCollection which I bind to the SeriesSource of the SciChartSurface. On the impulse-chart I have to split up each category into its own IChartSeriesViewModel. I therefore have up to 5 FastImpulseRenderableSeries shown on the “Ranking plot” (Outlier, RegularSample, NegativeControl, PositiveControl, Selected). This way the “selected items” always stick out of the crowd.

Now that you know a bit about my context: The otherwise terrific implementation of the standard RolloverModifier, which deals very elegantly with jammed charts like my “MST time traces”, is not very suited on my “Ranking plot”. As soon as there is more than one series, it displays RolloverMarkers for each of the series and generates as many SeriesInfo instances in its RolloverData-Property, which inconveniently aren’t sorted by distance to the mouse pointer, but by series index. The vertical line gets stuck at the first series’ XValue, which happens to be the less important category in my use case (outliers). (I’m using SourceMode=AllSeries).

Therefore question number 1: Is there a way for the RolloverModifier to display only the nearest series’ datapoint? If there isn’t: it would be great if you could extend the list of available SourceModes by something like “SourceMode.OnlyNearest” and implement such behaviour. For the time being: Is it my only option to write my own implementation of the RolloverModifier?

As to your other suggestions:

  • I can’t use PaletteProvider for the colouring, because of two reasons: The colouring is based on data (categories) which is not exposed on IRenderableSeries, thus not available to the PaletteProvider. It would actually need a reference to the corresponding ViewModel instance of a measurement. (BTW: I’m feeding those ViewModels to SciChart; they implement IChartSeriesViewModel.)
    The second reason is that a PaletteProvider won’t solve the “shadowing” problem, since it would not be able to influence the “Z-order” of the plots.

  • The SeriesInfo generated by the RolloverModifier also doesn’t expose any of the really interesting info I’d like to include on the RolloverMarkers. It’s the meta-data which is most interesting to the user in this context, less the plot data which he is already seeing displayed on the chart. I’ve meanwhile worked around this, by creating a converter which takes the XValue of an Impulse and converts it into a reference to the corresponding Measurement-ViewModel.

I hope I do not sound like only being complaining about SciChart. I’m actually very pleased with its performance when dealing with several thousands of plots on a chart. No other charting library I’ve tested so far has matched that!
I also love the interactive line annotations and the ChartModifiers. Furthermore, it was astonishingly simple to write my own “RectangleSeriesSelectionModifier”, which I can now deploy on any SciChart instance with just a single line of XAML. Nice work!

Best regards,
Axel.

Images
  • You must to post comments
0
0

Ok I’m gonna give you a suggestion for the rollover.

Yuriy – can you assist with the other issues Axel is experiencing?

You can get the RolloverModifier to operate only on SelectedSeries. Also SelectSeries have the benefit of always being highest in the Z-order. Please see the RolloverModifier demo for guidance (Change the dropdown box from AllSeries to SelectedSeries to see the difference in operation as you click on a series to select).

Next part. There is also an extensive Hit-Test API which you could use to set a single series to IsSelected on mouse-over. E.g. if you wanted to automatically select a series to bring it to the front (plus make it Rollover eligible) as you move the mouse, you could create a custom ChartModifier and use this API to do it.

BTW I’m really glad you like the ChartModifier API! We’re working on improving this and documenting it fully for v2.0 as it is really a powerful, yet hidden feature! 🙂

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies