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.
- Mobile Developers asked 5 years ago
- You must login to post comments
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.
- Nazar Rudnyk answered 5 years ago
- You must login to post comments
Please login first to submit.