How to Draw Simple Line chart in iphone? - iphone

I am a newbie to the graph functionality in an iPhone application.
I am having array of numbers for which I want to make the simple static line graph without using the coreplot library since I have already tried this which seemed to me quite complicated.
Can anyone please fix out my problem ?

You can draw Line chart using CoreAnimation.
Alternatively you can use core plot also : http://code.google.com/p/core-plot/

hi You can Draw your simple line chart without using core plot just refer following link.
http://code4app.net/ios/Line-Chart/4fc844616803faf26a000002
here you can get demo for simple line graph.
I hope this will help full to you.

Related

How to create inverted cone graph using iPhone SDK?

I tried to google this but could not find anything.
Do you have any idea how to create inverted cone graph like this?
I don't think that there is any direct API which does this.
But you can try to draw or plot it using
Drawing and Printing Guide for iOS
or
try using CoreGraphics Framework at more basic level to draw something like what you want.
Hope this helps you.

How to draw a line from slice of a pie chart to its related title using coreplot in iphone sdk

Here I stuck with a problem in drawing the pie chart using coreplot in iphone sdk.
Actually my problem is to represent a line between each slice and the title of that slice I searched for the properties but I didn't found.
Anyone's help will be deeply appreciated.
Thank you all,
Monish.
There's nothing like that built into Core Plot currently. You could make a subclass of CPTTextLayer that draws the connecting line in addition to the text and use that to make custom data labels.

How would I replicate graphs like the following in Core Plot?

I would like to use the Core Plot framework to produce a graph that looks like the following:
Additionally, I would like to provide charts within a table view like the following:
How would I set up charts like these using Core Plot?
The first one is easy--it's just a scatter plot with a gradient fill. The examples included with the framework show how to do this.
See this thread on the Core Plot discussion board for ideas on how to approach the second problem: http://groups.google.com/group/coreplot-discuss/browse_thread/thread/00344ef4e0234a51
http://code.google.com/p/core-plot/w/list
You can refer this link for installing core-plot.
http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application. Also read the comments section in the above link for some changes.

Easy way to draw a line chart in Core Plot?

Is there an easy way to draw a line chart in Core Plot?
There are lots of examples included with Core Plot here.
You can use S7graphView .Its simple to draw line chart. http://code.google.com/p/s7graphview/
Depending on what you need and the scale of your project I'd rather stick with Core Plot..
It's way more active, comprehensive and better documented than S7graphView.

How to draw a piechart in iPhone

I want to draw a piechart in my application. Do anyone know any code or tutorial to help me out. I found some in the following link
http://rajeev.name/blog/2009/01/18/drawing-pie-charts-using-iphone-sdk/
but if there is any other more efficient way to do it, I want to learn it.
I'm not sure if you know how to do pie charts on other platforms, but there really are some basic techniques that you should be aware of and understand, before embarking on creating pie charts on ANY platform.
See here for a pretty good discussion. There are many more out there, if you want to learn more.
Applying that to the iPhone isn't going to be child's play, but it's not too hard either. If you are looking for a library to do the work for you, look around and you'd probably find something to give you a head start.
KeepEdge offers an iPhone charting/graphing API:
http://www.keepedge.com/products/iphone_charting/
You can also check the source code of AppMobile, which has a pie chart embedded inside it:
http://github.com/omz/AppSales-Mobile/tree/master
I will recommend you to look at the "Animating Pie Slices Using a Custom CALayer" page!.
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