What are the alternatives to Core-Plot for drawing graphs in iPhone SDK

人走茶凉 提交于 2019-11-27 19:56:18

问题


Are there any alternatives to Core-Plot for drawing graphs in iPhone SDK?

I am having hard time integrating core-plot in my app. Lot of issues.

Can you please suggest some alternatives to core-plot?


回答1:


Some of the alternatives that I found were:

http://sebkade.wordpress.com/2010/05/06/basic-graph-class-for-iphone/

http://www.rgraph.net/

http://www.ivisualization.com/

http://www.vvi.com/apps/vvidget

http://cocoacontrols.com/platforms/ios/controls/tapku-graph (thanks Sudo for this link)

http://www.shinobicontrols.com/ (latest addition)

https://github.com/sweetynebhwani/deSimpleChart

These links do not work. They are already down:

http://code.google.com/p/s7graphview/

I hope this helps.




回答2:


If what you intend to draw is relatively easy, you may get quick results by using Quartz and drawing the graph yourself. Just subclass an UIView and override its drawRect: method.


A very, very simple example of drawing a square, 10x50 pixels at a fixed position, via Quartz:

- (void) drawRect:(CGRect)rect
{
    CGContextRef ctx = UIGraphicsGetCurrentContext();
    CGColorRef red = [[UIColor redColor] CGColor];

    CGRect barRect = CGRectMake(10.f, 20.f, 10.f, 50.f);
    CGContextSetFillColorWithColor(ctx, red);
    CGContextFillRect(ctx, barRect);
}



回答3:


Since the OP asked his questions, there has been an abundance of new chart libraries. GraphKit, TWRCharts, to name only two. CocoaControls lists a lot more, if you do a search for 'graph'. So I'd like to gather more feedback with regards to this question.




回答4:


iOSPlot, iOS:Chart, KeepEdge Library, Shinobi Controls



来源:https://stackoverflow.com/questions/5065416/what-are-the-alternatives-to-core-plot-for-drawing-graphs-in-iphone-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!