SChartLegend alter label


How can i alter the text of a chart legend on the sChartRenderFinished ?

i was trying the following code but the count is allways 0

for (int i = 0; i < chart.legend.labels.count; i++) {
        UILabel *legendLabel = [chart.legend.labels objectAtIndex:i];
        //TO STUFF


Any ideas ? 


Hi Moonlace, 

Do you need to alter the labels after the chart has rendered or can you just set series.title when you pass the series to the datasource?


i need to alter the labels after the chart has rendered.


The legend will be contructured during render. You’ll need to do the modifications after layout using the delegate:

- (void)sChartRenderFinished:(ShinobiChart *)chart {
    if (_firstRun) {
        _firstRun = NO;
        for (UILabel *l in chart.legend.labels) {
            l.text = @"Shinobi";


That is what i am trying to do but it doesnt enter the loop.

I belive that at that point in time the legend is still empy or something since the legend apears with title for each series.


ok it now enters the loop but the names dont change