Anyone know how to create line graphs on iOS without using Core-Plot but using inbuilt frameworks? Desperately searching for an answer.
4 Answers
Some of the charting libraries for iPhone/iPad that I found were:
http://code.google.com/p/core-plot/
http://sebkade.wordpress.com/2010/05/06/basic-graph-class-for-iphone/
You can use whatever you feel convenient with.
I would prefer using Core Plot Library though
Hope this helps you.
EDIT:
You can refer to this link to integrate the graph library core plot into your app.
http://tech.pro/tutorial/939/using-core-plot-in-an-iphone-application
And once your core plot repository is downloaded,you can go to the folder suggested by Brad Larson (in the below link) to get a tutorial for line chart.
Are there any examples for how to draw a line chart in Core Plot on the iPhone?
Also you can refer it here:
http://code.google.com/p/core-plot/source/browse/#hg/examples

- 1
- 1

- 19,381
- 28
- 133
- 216
-
Did this answer help you? Did you refer to any other libraries? – Parth Bhatt Aug 31 '11 at 11:14
-
1Sorry! My company had a network issue. About the answer, some of the links don't work. And I did mention in my question that I didn't endorse core-plot (I was asked not to by my senior lead) and I wanted something with the inbuilt frameworks. In fact, if I were to be honest, none of the links were helpful. But seriously, thanks for the effort! :) I am currently scrutinizing the CoreGraphics methods. – Joel Joseph Aug 31 '11 at 11:51
-
Actually can you ask your senior what is wrong with the core-plot? – Parth Bhatt Aug 31 '11 at 11:55
-
1Will do. :) Do you have any sample code that uses core-plot to plot line graphs? I am going crazy with this thing! – Joel Joseph Aug 31 '11 at 12:06
-
@Joel Joseph: Downlaod the core plot repository. There under the repository itself it has multiple examples which shows each and every kind of charts it supports. Tutorial for line graph is included in that repository itself. – Parth Bhatt Aug 31 '11 at 12:21
-
@Joel Joseph: You can refer to **EDIT** section of my answer for directions about the line chart example and integration of core-plot in iphone app. – Parth Bhatt Aug 31 '11 at 12:30
-
1+1 for Core-plot, which is a fabulous library. – Kheldar Aug 31 '11 at 12:32
-
@Kheldar: Thanks a lot. Yeah I agree core plot is the most fabulous carting library available atleast for iOS. – Parth Bhatt Aug 31 '11 at 12:34
-
@Parth I believe he asked "without using Core-Plot but using inbuilt frameworks?" – Ayrad Dec 29 '11 at 14:24
-
Just recently made my project open check it out: https://github.com/jsetting32/JSGraphKit – jsetting32 Mar 08 '15 at 00:57
Apple have some sample code for drawing graphic in Quartz here:
http://developer.apple.com/library/ios/#samplecode/AccelerometerGraph/Introduction/Intro.html

- 31,146
- 5
- 78
- 83
-
This code doesn't plot any graph for me on the simulator. :S Any idea what could be the reason? I use iOS SDK 4.3 version. Thanks for the effort! – Joel Joseph Aug 31 '11 at 11:39
-
1this code uses accelerometer reading which won't be available in simulator – Mihir Mehta May 29 '13 at 09:46
-
...you should have access to a device when developing. There's no point just testing your apps on the simulator alone, it doesn't reflect what actually happens on the real device. – lxt May 29 '13 at 11:14
As well as CorePlot, there are several commercial tools for iOS charting:
As a full disclosure, I work for Scott Logic which is the parent company for ShinobiControls.

- 68,894
- 15
- 164
- 232
-
1Since your profile says you work closely with the ninjas who develop ShinobiControls, this recommendation isn't entirely frank. – Jonathan Leffler May 04 '12 at 05:53
-
1@JonathanLeffler sorry, I see your point. I have added a full disclosure, which is I believe acceptable form for this sort of thing on StackOverflow. – ColinE May 04 '12 at 07:26
-
@JonathanLeffler I have also changed the answer to include all the commercial charting libraries I am aware of that are not detailed in the accepted answer. – ColinE May 04 '12 at 08:02
-
Try to use CoreAnimation, CoreGraphics, Quartz frameworks.

- 29,669
- 15
- 106
- 125
-
4Hmmm..What do I say, I was hoping for a more concrete answer. I am quite new to this development field. I did have an idea I had to use CoreGraphics and Quartz frameworks. Anyways, thanks for the help! Appreciated. :) – Joel Joseph Aug 31 '11 at 11:36