31

Looking at adding some data graphing to a new iPhone app in development (ala the Stocks app).

I realize I could buckle down and do some Quartz drawing but I'm hoping that someone somewhere has a tip on a Cocoa graphing framework that works on iOS.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Hunter
  • 4,343
  • 5
  • 42
  • 44

4 Answers4

29

Core Plot

There's a plotting framework in active development on Core Plot.

It works on both Mac and iPhone.

Community
  • 1
  • 1
Dave DeLong
  • 242,470
  • 58
  • 448
  • 498
  • Core plot is good for small datasets, but it's really slow. There's a performance comparison here which compares against iOS-Charts, Coreplot, and two commercial charts for larger datasets, or frequent update: https://www.scichart.com/ios-chart-performance-comparison/ – Dr. Andrew Burnett-Thompson Jul 17 '17 at 18:15
7

Despite eisernWolf spamming links to his Google Code page, it is actually pretty OK.

Core Plot is by far the more advanced library, and the way you want to go for math type applications.

But if your goal is some simple data visualisation, s7graphview has the following going for it:

  • Much simpler than core plot.
  • Distributed as source code. Just drop the files into your project.
  • It's a good way to learn how some of the Core Animation stuff works.

Also I think the default style is a little nicer than Core Plot.

Megasaur
  • 626
  • 8
  • 20
3

If all you need to do is draw line graphs, take a look at the Seismic example that Apple posted - you can yank large quantities of code from that.

wisequark
  • 3,288
  • 20
  • 12
0

I was wondering the same thing and came across this sample code (AccelerometerGraph).

link to Apple Dev site.

I have begun to play with core-plot as well. It is quite nice.

SplittingField
  • 731
  • 5
  • 11