Accessing LineSeries/Points directly


#1

I’m sure this is a simple thing to do, though it’s not working for me.

I’m looking to access lineSeries for my chart directly and manipulate them. For example:

SChartLineSeries *series = (SChartLineSeries*)[selfsChart:self.chartseriesAtIndex:0];



    series.style.lineColor = [UIColorredColor];

Here, self.chart is my SChart as a property, I would have assumed this would work - but there you go. Ideas as to why this doesn’t work?


#2

Try  redrawing ([chart redrawChart] your chart for any styling changes to take place. (Note, a chart reload ([chart reloadData]) will query for a new series object from your data source, so take this into account when modifying the series directly.)

Jan


#3

The issue was actually that in the method:

-(SChartSeries *)sChart:(ShinobiChart *)chart seriesAtIndex:(int)index{

I was setting the colour as blue, and this was being called after and overriding my call to change to red!