3

I'm looking for some very simple to develop line graph library. However, all the examples seem quite complicated. I have a database with two main fields, date and value.

Can anyone point me at or provide me with an example of code which will do just that ?

Jules
  • 7,568
  • 14
  • 102
  • 186
  • 1
    possible duplicate of [Cocoa Graphing/Plotting Framework that Works on iPhoneOS](http://stackoverflow.com/questions/263472/cocoa-graphing-plotting-framework-that-works-on-iphoneos) – Brad Larson Oct 07 '10 at 16:54

2 Answers2

3

I've used the CorePlot library with success. Here is a really good tutorial on how to use it.

willcodejavaforfood
  • 43,223
  • 17
  • 81
  • 111
  • @Jules - And the problem with that is...? – willcodejavaforfood Oct 06 '10 at 15:24
  • @Jules - So unless someone provides you with the exact code to plot a graph from date and value (not specifying their types) you are not interested? :) – willcodejavaforfood Oct 06 '10 at 15:52
  • Perhaps you could let me know WHY that tutorial is not good for you, what you've tried and what your problem is with whatever you have tried? – willcodejavaforfood Oct 06 '10 at 15:53
  • "So unless someone provides you with the exact code" not at all, but I'd like to find an example which looks close to what I want before I spend too much time working on something. – Jules Oct 06 '10 at 16:05
  • 1
    Note that the Switch On The Code example uses an older version of the framework. I'd actually recommend using one of the example applications that ship with the framework as the basis for a new application. The CPTestApp-iPhone should be a good starting point, because it shows how to do a simple line chart from X,Y data. – Brad Larson Oct 07 '10 at 16:52
  • @Jules - Simply look inside the `examples` directory within the source code you downloaded for the Core Plot framework. All of the various examples should be there. – Brad Larson Oct 08 '10 at 15:36
  • +1 on the comment that the coreplot tutorial on switchonthecode is out of date. You have to read the comments to find the bug fixes – Daddy Nov 09 '10 at 14:02
0

There's example code for line graphs in Apple's Accelerometer sample app.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153