I have a chart with gaps.
I attached the sample.
Observed behaviour: the series {4,2} is not visible. If uncomment line with renderableSeries.PointMarker, the series is visible.
Expected behaviour: visualize {4,2} by same way as with PointMarker, but w/o PointMarkers for other points connected with lines. Or how set point marker only for {4,2}?
double[] x = { 1, 2, 3, 4, 5, 6, 7 };
double[] y = { 5, 3, double.NaN, 2, double.NaN, 1, 4 };
var dataSeries = new XyDataSeries<double, double>();
dataSeries.Append(x, y);
var renderableSeries = new FastLineRenderableSeries()
{
Stroke = Colors.Red,
DataSeries = dataSeries,
StrokeThickness = 2,
DrawNaNAs = LineDrawMode.Gaps,
};
//renderableSeries.PointMarker = new EllipsePointMarker() { Width = 5, Height = 5, Fill = renderableSeries.Stroke, Stroke = renderableSeries.Stroke, StrokeThickness = 2 };//<--- uncomment to see {4,2} data point
sciChart.RenderableSeries.Add(renderableSeries);
Image with expected behaviour is attached.
- Ivan Voyager asked 8 years ago
- last edited 8 years ago
- You must login to post comments
Hi Ivan,
I know this sounds like expected behaviour but our API won’t allow it very easily. To get a point marker, we need to let you, the user, specify the point-marker. But if you do, it draws point markers at every point (not just the isolate points).
I would suggest, as a workaround, to do one of two things:
-
You can set a small EllipsePointMarker with pixel size = 1,1 on the series, The points will not be visible normally but when a point is isolated, they will be visible.
-
You can inherit our FastLineRenderableSeries, and using the techniques here on our CustomRenderableSeries API, search for isolated points and draw a small ellipse at these locations.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 8 years ago
- You must login to post comments
Please login first to submit.