Pre loader

Select a point

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

This might need to be two separate questions, but is there a way to select a point in a line series. or, can I style a pointMarker differently for each data point?

I would prefer to not have to do this with annotations.

Version
2.5.0
  • You must to post comments
0
0

Hi There,

You can’t select points out of the box, but you can create custom special modifier similar to ours SeriesSelectionModifier.
As for styling – sure, you can style pointMarkers differently for each point via palette provider, please see the code below:

@interface PointMarkerPaletteProvider : SCIPaletteProvider
@end

@implementation PointMarkerPaletteProvider {
    SCILineSeriesStyle *_lineStyle;
}

- (instancetype)init {
    self = [super init];
    if (self) {
        _lineStyle = [SCILineSeriesStyle new];
        _lineStyle.pointMarker = [SCIEllipsePointMarker new];
        _lineStyle.pointMarker.fillStyle = [[SCISolidBrushStyle alloc] initWithColorCode:0xffff0000];
    }
    return self;
}

- (id<SCIStyleProtocol>)styleForX:(double)x Y:(double)y Index:(int)index {
    return index % 2 == 0 ? _lineStyle : nil;
}

@end

Hope that helps.
Best Regards,
Nazar R.

  • 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