SChartScatterSeries ignores the selected style

161 views Asked by At

With ShinobiGrids I'm doing a simple test application for the iPad. I create a scatterplot and I want white points on the graph. When a point is selected by user, I want that the point becomes red. SChartScatterSeries allows me to set a style for normal point and another for selected ones.

However, no matter what kind of style I try to set for selected points, I get a purple circle for the selected point. Even if I change theme, result does not change. What am I doing wrong?

SChartScatterSeries *series = [SChartScatterSeries new];

series.crosshairEnabled = YES;

series.title = [self titleForKey:key];
series.selectionMode =  SChartSelectionPoint;

SChartScatterSeriesStyle *style = [SChartScatterSeriesStyle new];
style.pointStyle = [SChartPointStyle new];
style.pointStyle.showPoints = YES;
style.pointStyle.color = [UIColor whiteColor];
style.pointStyle.radius = [NSNumber numberWithInt:5];
style.pointStyle.innerRadius = [NSNumber numberWithFloat:0.0];

SChartScatterSeriesStyle *style2 = [SChartScatterSeriesStyle new];
style2.pointStyle = [SChartPointStyle new];
style2.pointStyle.showPoints = YES;
style2.pointStyle.color = [UIColor redColor];
style2.pointStyle.radius = [NSNumber numberWithInt:10];
style2.pointStyle.innerRadius = [NSNumber numberWithInt:5];

[series setStyle:style];
[series setSelectedStyle:style2];
1

There are 1 answers

0
Tom Kelly On BEST ANSWER

The "selectedStyle" is used for when you want to select an entire series. In this case, you sound like you are trying to select an individual point, in which case you want to set;

style.selectedPointStyle.color = [UIColor redColor];

As a point of full disclosure, I work for ShinobiControls :)