0

hi i am trying to draw some bar graphes based on some numbers. Just wondering if there is a library out there that can make my life easier.

Thanks

jin
  • 114
  • 2
  • 12
  • 1
    possible duplicate of [Objective-C Charting Framework](http://stackoverflow.com/questions/2454302/objective-c-charting-framework) – NG. Feb 25 '11 at 18:56
  • 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 Feb 25 '11 at 19:07

3 Answers3

0

Core Plot

indragie
  • 18,002
  • 16
  • 95
  • 164
0

If it is cocos2d like in ur tag, here it is..

Under any CCLayer, overwrite the draw function.. Means you declare your own draw function.. Note that the line drawn will be at z:0.

If you have any other addchild on the layer, make sure that their z are less than 0.. Meaning.. [self addChild:spr z:-1]; Else you will not see the line..

Here's the codes:

-(void)draw{
glColor4f(0.8, 1.0, 0.8, 1.0);  
glLineWidth(10.0f);
drawLine(xStartPoint,yStartPoint,xEndPoint,yEndPoint);
}
xuanweng
  • 1,939
  • 1
  • 11
  • 10
0

refer this site for full objective c coding for drawing bar graphs: -http://bertmcdowell.com/?page_id=606

Srinivas
  • 1,059
  • 1
  • 11
  • 26