Pre loader

SeriesSelectionModifer gets triggered when clicking a DataPoint

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

Hi scicharts team,

For our application we have a point and series selection feature for a Line Chart but i have noticed that When i select a point and highlight it, Series selection changed function also gets triggered even though i didnt want to select the series.

Is there any work around for this that can suppress the sereis selection when clicking data point ?

Version
5.0+
  • You must to post comments
1
0

Hi Rahul,

This is by design, whenever you hit a “dataPoint” via DataPointSelectionModifier(), you still hit a series, so that gets triggered.

But, when you hit a series, SeriesSelectionModifier() does not always hit an exact data-point (where the point-marker sits) cause it can hit in between points and still return a hit for the series.

One easy fix is to loop over all renderable series that are NOT supposed to have both a series & data point selection modifier and run this on them:

const ssm = new SeriesSelectionModifier({
onSelectionChanged: (args) => console.log("SERIES CHANGED")
});
// for this purpose, this next line removes the series selection modifier on all series, but you should only do this on series that need just a DataPointSelectionModifier.
sciChartSurface.renderableSeries.asArray().forEach(rs => ssm.includeSeries(lineSeries, false));

Hope this helps!

Best,
Andrei Vascul,
Software Developer, SciChart Ltd.

  • You must to post comments
0
0

Hi Andrei,
i dont think this exactly solves my issue,

All my renderable series need to have both SeriesSelectionModifier and DataPointSelectionModifer, but onChange of datapoint i need to suppress the Series’s onchanged function since im only clicking on a point marker

  • Andrew Burnett-Thompson
    Hi Rahul, noted, and I passed the same feedback to our team – that users may wish to have both DataPoint selection and SeriesSelection enabled. Working on it
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.