Updating title when data changes


I’m just getting started with Shinobi Charts on iOS. In my chart, when the data changes, I want to change the title of the chart.

Right now I’m doing this, where getTitle is the function that gives me the text for the title. But the new title gets overlaid on top of the old title, instead of replacing the old title. So I end up with many superimposed titles that are obviously unreadable. How am I supposed to replace the title?

pieChart.title = [self getTitle];
    [pieChart reloadData];
    [pieChart redrawChart];


Ugh, I found the problem, not in this part of the code at all. I was re-adding the chart on top of the old chart in another part of the code.