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?
- Johnny Yeh asked 4 years ago
- last edited 4 years ago
- You must login to post comments
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
- Andrew Burnett-Thompson answered 4 years ago
- You must login to post comments
Please login first to submit.