127

I have a need to render and display charts (bar charts for now, but more types may be needed later) in an iPhone app I'm working on. I've done some looking around and it doesn't look like there are any really good, mature charting libraries for iPhone yet. I've also looked for something written for Cocoa on the Mac that can be adapted, but haven't found anything great yet.

Anybody dealt with this before? Any recommendations?

I did find Core Plot, but it seems to be in the early stages of development.

Edit to add some details of requirements (as they currently stand ;) )

  • Bar Charts
  • Horizontal bar charts
  • Double stacked bar charts
  • Axis labels (including rotated 90 degrees on the y axis)
  • Labels above each bar on the chart
  • Shaded or custom backgrounds
JP Illanes
  • 3,665
  • 39
  • 56
Mike Akers
  • 12,039
  • 14
  • 58
  • 71
  • SwiftCharts: https://github.com/i-schuetz/SwiftCharts open source, free, easy to use and customize. Video: https://www.youtube.com/watch?v=cyAlKil3Pyk – User May 11 '15 at 17:09
  • Have you considered SciChart? https://github.com/ABTSoftware/SciChart.iOS.Examples. Very fast, flexible and powerful. Not open source sadly but the team will work hard for your business. – Dr. Andrew Burnett-Thompson Apr 19 '17 at 15:34
  • 1
    For those of us coming from Google, have a look at https://github.com/danielgindi/Charts – Jakob Egger Sep 21 '17 at 12:00
  • Mike, which solution have you found the be the best? – daniel Feb 24 '20 at 17:37

8 Answers8

78

One of the many factors that motivated the Core Plot project was the lack of good plotting frameworks on the iPhone. Core Plot also encompases many other use cases including desktop systems, but its design has included iPhone support from the beginning. It's getting pretty close to useable and is currently in use in several shipping iPhone and OS X applications.

Edit 2/10

Core Plot has come a long way since I first posted the summary. The framework now has bar charts (including horizontal bar charts, I believe), axis labels (including aribrarty rotations), and fills and backgrounds for graphs. I'm not sure about stacked bar charts, but it wouldn't be hard to add to the CPBarPlot class that implements bar charts. As for annotations, there is a CPAnotation class which you could subclass to add your annotations, if there isn't the exact functionality you need.

Project on github.

Manvik
  • 977
  • 14
  • 26
Barry Wark
  • 107,306
  • 24
  • 181
  • 206
  • 1
    Agreed. There are some very good scientifically-minded Cocoa programmers working on this, so I'd expect it to advance rapidly. Also, the Google Group for this is at http://groups.google.com/group/coreplot-discuss?hl=en . The archives are worth reading through, to see where people are going with this. – Brad Larson Apr 20 '09 at 22:56
  • 1
    I've looked into Core Plot and it looks like bar charts are completely unimplemented. Still I'll keep an eye on this project. – Mike Akers Apr 20 '09 at 23:27
  • 3
    In the interim, many features have been added to Core Plot, including bar charts, horizontal bar charts, custom plot labels, angled labels, and themes (including custom backgrounds). – Brad Larson Dec 23 '09 at 19:12
  • 1
    CorePlot is ok feature-wise, but it is painfully slow. Mutli touch interactions are very sluggish. Totally spoils the experience in an otherwise slick iPhone or iPad app. – ColinE Mar 13 '12 at 07:25
  • Has anyone used CorePlot recently? What or how much has it improved since then? – Pier-Luc Gendreau Dec 18 '13 at 18:59
7

As a commercial alternative to CorePlot, I'd recommend giving ShinobiControls a go, they have some pretty good looking charts. They also have very good performance, rendering charts with 100,000+ points at 60fps and multi-touch support.

As a full disclosure, I work for Scott Logic which is the parent company for ShinobiControls.

ColinE
  • 68,894
  • 15
  • 164
  • 232
4

I have my own library called PowerPlot which is available under a dual-license model.

You can just follow the above link to install the demo app which shows off several sample charts. You can also download the GPL-version of the library and check out if it fits your needs. With the exception of horizontal bar charts it has the features requested - specifically, bar charts, stacked bar charts, various axis label positions and orientations.

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

I needed a Radar Chart (or Spider web chart) and I couldn't find any, so I made my own implementation:

RPRadarChart

You are free to use it in whatever you want, if you do, let me know! I'll be slowly adding more features to it, if you want something specific ask me through github.

JP Illanes
  • 3,665
  • 39
  • 56
3

there is new, nice Pie Chart 3D library. 3D charts which you can rotate and scale with fingers + protocol for getting information about tapped slice

http://iphone.orpi.pl/?p=20

plusz
  • 224
  • 2
  • 16
3

I went through my own search a year or two ago, and ended up making my own line graphing classes because I couldn't find anything that worked exactly the way I needed it to. The two big ones to look at though, are SM2DGraphView and GraphX. I haven't tried either in an iPhone project, but I know SM2DGraphView is open source so you could modify it if needed.

I've also considered using a WebView to use a JavaScript graphing library, but that's just a thought.

Marc Charbonneau
  • 40,399
  • 3
  • 75
  • 82
1

This one seems ok as well

s7graphview

(but never tried it really).

NANNAV
  • 4,875
  • 4
  • 32
  • 50
yonel
  • 7,855
  • 2
  • 44
  • 51
  • 2
    I've used this one, and it'll work, but for very basic data sets. Some of the issues I ran into though was it's inability to plot values below zero, and it had a tendency to round any non-integer values. – Josh Buhler Feb 08 '10 at 06:12
1

You can theoretically use the Google Chart API along with a Cocoa wrapper. This could be a light-weight solution.

Julien Chastang
  • 17,592
  • 12
  • 63
  • 89