The problem is that you're trying to set properties on the selectedPointStyle
property, which is nil
by default. In the same way that you created a new SChartPointStyle
object for the pointStyle
property, you need to create one for the selectedPointStyle
property.
Update your code to the following and you should observe the selection effect that you're after:
- (SChartSeries*)sChart:(ShinobiChart *)chart seriesAtIndex:(NSInteger)index {
SChartLineSeries* lineSeries = [[SChartLineSeries alloc] init];
lineSeries.selectionMode = SChartSelectionPoint;
SChartLineSeriesStyle *style = [SChartLineSeriesStyle new];
style.pointStyle = [SChartPointStyle new];
style.pointStyle.showPoints = YES;
style.pointStyle.color = [UIColor whiteColor];
style.pointStyle.radius = @(5);
style.selectedPointStyle = [SChartPointStyle new];
style.selectedPointStyle.showPoints = YES;
style.selectedPointStyle.color = [UIColor orangeColor];
style.selectedPointStyle.radius = @(15);
[lineSeries setStyle:style];
return lineSeries;
}
In answer to your other question, dashed lines are not currently supported as part of ShinobiCharts.