iPhone, how do I draw a simple line graph from an array of prices and dates? - iphone

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 ?

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

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

Related

How to draw line graphs in Swift?

For a new app I need to draw a line graph. That graph needs to consist of two references lines, and one line based on measurements per day (min 14 days, max 32 days). Up to the current date, that line based on measurements needs to be solid. From the current date up to the max, it needs to be dashed. For now, the data is in arrays.
I tried to find examples and also saw a framework called Core Plot. I do like the design of the Health graphs a lot. Maybe that is also possible with Core Plot.
Instead of figuring out the details myself, I was hoping I could find somebody (with experience with Core Plot) to setup an example app. So I have more of a head start developing my own app. Willing to pay for the effort, though.
Hope Stackoverflow is the right place for such a question.
Thanks.
Jan
Stack overflow is most definitely not the right site for "please do all my work for me" questions. If you look at the Core-Plot project on Github it includes an example application, and a wiki with sample plots
It looks like the DropPlot Example App (from the samples wiki) is an example of a line plot. I suggest you start from that.
Here's what it's graph looks like

Candlestick chart on bitcoinwisdom

Im in need for good candlestick chart for my web app and chart at http://bitcoinwisdom.com/ is really what Im looking for. I like the way you can zoom and move with it. Is it possible to figure out what they are using or do you think they made it up on their own? If so with what tools? Another amazing charting can be found here https://www.tradingview.com/e/ these two sites have even better charting than some desktop apps and I wanna know how they did it.
In searching the bitcoinwisdom's forums I found a couple posts asking for the exact same thing. In fact, I stumbled upon your SO post here looking for the same thing.
According to those forum posts' responses they used d3js.org with the rest being custom code. Unfortunately for us as their implementation is very impressive! View source on the page and look for the JS files they are referencing. The code is obfuscated and minified so porting it will be very difficult.

How to create a simple graph just showing two lines in iphone

I want to create a simple graph which will get the values and shows the graph like below image shown
I have also create other graphs using pie chart class but how to make this simple graph to show two line with like this
You can create a bar (or column) chart for iPhone using SciChart.
There is an example showing Objective-C and Swift code] to generate a column chart here: https://www.scichart.com/example/ios-column-chart-demo/
There's a quick tutorial on how to add series to an iOS/iPhone/iPad chart here, as well as source code for the tutorial on github.
Disclosure: I am the tech lead of the SciChart project
A commonly used Cocoa "native" charting library is Core Plot.. Whilst I've yet to personally use it, it seems to be quite popular and is under active development.
or
You can check out the PowerPlot library. It is a powerful choice for native charts on iOS, here are a two sample bar graphs:
The Images Like
Using PowerPlot, the code needed to generate these two graphs is available here (upper chart) and here (lower chart).
Possible duplicate of Bar Graphs in iOS app this thread.
On the provided link there are a lot of frameworks which you can use. For drawing simple graphs there are simpler frameworks than CorePlot.
You can check this Quartz-2d Tutorial.

Sample code using Core-Plot for iPhone

I'm trying to find some sample code for Core-Plot on the iPhone. So far, all the examples I've found plot equations such as X^2 or 1/X, etc. over some range. My goal is to find some sample code that just plots two points ((1,2) and (2,3), for example) and connects them with a line.
It seems simple, but I've yet to find out how to approach this. I've checked the Core-Plot Wiki, and am again only able to find more complex examples.
Appreciate any help, thank you.
Have you looked at the examples included with Core Plot? There's a mix of Mac and iOS apps. Except for the hosting view, the API is identical on both platforms.

How to create chart application in iphone

I'm assigned with new task for creating chart application in iphone like.,(BarChart,PieChart,etc..,).But,i have no idea for chart application in iphone.Please anyone help me out to guide me to start chart application in iphone.If any of the frameworks or API used for this kind of chart application means please explain that also.
Give a shot to:
Core-Plot Framework
To get it working, read here.
You can also see the accepted answer of this SO question.
For a little bar-chart tutorial go here.
There is also:
s7graphview less features but It's an option.
If you can rely on the web, although it's a far from optimal solution, you can embed a UIWebView in your application, and use the Google Graph Visualization API or you can use a UIWebView with an HTML5 graph library lake rgraph. Look here for a jQuery based solution. Filament Group made also this one.
At the and some sample code from Apple (Accelerometer Graph).
A commonly used Cocoa "native" charting library is core-plot. Whilst I've yet to personally use it, it seems to be quite popular and is under active development.
Here you go, but next time please use the search function first:
http://code.google.com/p/core-plot/
Cocoa Graphing/Plotting Framework that Works on iPhoneOS
A popular one is core plot. http://code.google.com/p/core-plot/