Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MTShipp

macrumors 6502a
Original poster
Mar 25, 2009
826
183
Raleigh, North Carolina
I am trying to figure out how to draw a simple trending graph. I do not need anything fancy. Just some whole number points over a short period of time. I have the 'Beginning iPhone Development' book but that is not shown in the chapters. Can someone tell me where to find info on that? If it is in the SDK, please tell me how to find it.
 

Niiro13

macrumors 68000
Feb 12, 2008
1,719
0
Illinois
Unless I am mistaken, you'd have to draw the graphs yourself using Quartz 2D functions

Example:
PHP:
 CGContextRef context = UIGraphicsGetCurrentContext();
	CGContextSetStrokeColorWithColor(context, [[UIColor blackColor] CGColor]);
	CGContextBeginPath(context);
	CGContextMoveToPoint(context, 20.0f, 40.0f);
	CGContextAddLineToPoint(context, 20.0f, 210.0f);
	CGContextAddLineToPoint(context, 210.0f, 210.0f);
	CGContextStrokePath(context);

That will get you the axis line for both the x and the y (yeah, a lot for just two lines >_<).

At least that's what I believe you have to do.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.