Pre loader

Some questions about data point dragging

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

0
0

Dear SciChart Team:

I have two questions to ask:

Question 1

I can use renderableSeries.PointMarker, like this:

renderableSeries.PointMarker = new EllipsePointMarker()
                            {
                                Fill = Colors.LightSteelBlue,
                                Stroke = Colors.White,
                                StrokeThickness = POINTMARKER_STROKETHICKNESS,
                                Width = POINTMARKER_WIDTH,
                                Height = POINTMARKER_HEIGHT,
                            };

But I only want to set some points to PointMarker, not all points. How can i do?

Question 2

I want to drag data-points, and I have referenced this example: Custom ChartModifiers – Select and drag a point
But I only want to move the specified data points, not all the points. What should I do?

Version
4.2.2.9777
  • You must to post comments
0
0

Hi Johnny,

We no longer support v4.2.2 (earliest supported is v5.4) so some answers may not apply.

Question 1

If you want to hide some point-markers, then you can set the Y-value to double.NaN. This removes the point from the series (its called a null point in scichart)

Question 2

The select & drag data-point example showcases our custom modifier API which allows you to create any kind of interaction with the chart. If you wanted to check if the point is selected first, you can check

DataSeries.Metadata[index]?.IsSelected == true

Try modifying the code in the example at this point

    public void OffsetPointAt(IDataSeries series, int index, double offset)
    {
        double yValue = ((double)series.YValues[index]); // Before here, check if the point is selected 
        yValue += offset;
        series.YValues[index] = yValue;

        series.InvalidateParentSurface(RangeMode.None);
    }

The full code for the custom modifiers can also be found on Github, so you can modify it easily.

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