ShinobiCharts: Plotting Pie Graph from SQLite DB?


#1

Hi all. Anyone know of a tutorial or even sample code that uses data pulled from a SQLite db to plot a (pie) graph? I’m new to this, and I could use some help. Thanks in advance! 

Mike 


#2

This isn’t really related to the chart at all.  You’ve got to do your “normal” method to pull your data from the DB and put it into your NSArray object, and then point your chart delegate methods at that NSArray object.  If it’s really SQLite I assume you’ve got that as a local database on the iPhone, and there are a zillion tutorials on using SQLite on the phone.  If it’s not, then you’d use something like AFNetworking to contact your webserver and run a script (likely a .php script) that talks to the database on the server and then sends the data back.  Again, lots of tutorials if you google this type of thing.