24

Anyone have experience with drawing graphs on the iPhone? Looks like GraphKit isn't an option, so it's up to the programmer to either write his own library (using OpenGL, I guess), or an existing library. I can't seem to find any libraries that are confirmed to work on the iPhone.

If you've written your own how did you go about it (opengl, quartz, etc), or if you used a library which one?

Parrots
  • 26,658
  • 14
  • 59
  • 78
  • 2
    Take a look at this question: http://stackoverflow.com/questions/263472/cocoa-graphing-plotting-framework-that-works-on-iphoneos – Marc Charbonneau Apr 27 '09 at 18:00
  • 1
    Since you are unsure whether to use OpenGL or Quartz2D, you will want to use Quartz2D. See the QuartzDemo and BubbleLevel sample projects on Apple's Developer Connection site to learn how to draw primitives (lines, rects, splines) in Quartz2D. – Alex Reynolds Apr 29 '09 at 00:16
  • possible duplicate of [Is there a good charting library for iPhone?](http://stackoverflow.com/questions/769749/is-there-a-good-charting-library-for-iphone) – Brad Larson Apr 01 '11 at 15:34

6 Answers6

13

I have been keeping my eye on this one:

core-plot

but I haven't yet tried it. Though it seams like it has potential.

chris.

PyjamaSam
  • 10,437
  • 3
  • 32
  • 20
  • CorePlot is a decent free charting library, but is very very slow. This looks bad if you try to add pinch zoom etc ... If you are happy to pay for a charting library, I would recommend Shinobi Controls (http://www.shinobicontrols.com) – ColinE Mar 18 '12 at 07:06
  • yes...i used this framework for more than 2 years.I start up a new project with only showing the chart by using this framework, the performance is really slow, especially i try to zoom in and zoom out when i have more than 1000 datas – nullmicgo Feb 15 '13 at 03:36
4

Ive used coreplot...got an appstore app with it...not thrilled about its use. Its very customizable, maybe TOO customizable. It gave me quite a bit of trouble setting it up and i still have problems with is. Id like to know how Roambi.com does their porting from excel, it looks pretty good. MSOffice4mac should just come out with a direct port to iphone

Mars
  • 41
  • 1
3

Have tried and used CorePlot, on my way to a app-store app. Was a pain setting it up and then digging in deep, certainly the best graphing option currently.

dsaw
  • 577
  • 5
  • 12
1

I have tried to plot a graph using Quartz 2D . It looks more like a drawing. But I am fixing the axes and plotting the coordinates according to the axes. But the problem is I want to make the graph user interactive. Each coordinate on the graph will further have to drill down showing the details of the coordinate. So how can I make the coordinates interactive .

1

You can check out the PowerPlot library which is an iOS native library. It is the only choice (to my knowledge) that not only has the "usual" assortment of charts, but also graphs (with nodes and connections) among the views. It is not based on OpenGL, but on Quartz. It also does not target the desktop version of MacOS, focusing specifically on iOS.

Licensing policy is dual license - developers can choose GPLv3 or a commercial one.

user8472
  • 3,268
  • 3
  • 35
  • 62
1

I've done graphs in an application before using Quartz2D. Since the graph was particularly wide, I had to use a CATiledLayer for the view, which I think was what caused more issues than it fixed. The graph looked nice, but in the end, it was just too difficult to deal with. Too many bugs when trying to draw too much of the graph at once, or trying to draw the graph several times in a row quickly as the user changes between different views.

At this point, my suggestion would be to try something in OpenGL, though I don't know how you'd go about achieving it, since line drawing is pretty basic on the iPhone in OpenGL.

Ed Marty
  • 39,590
  • 19
  • 103
  • 156