views:

954

answers:

4

Hi, I'm writing a stock charting application on iPhone using core-plot. What kind of chart should I use to plot the volume chart? Since I will also need to overlay the price charts onto the volume chart, how should I go about doing this?

Here's an image for reference (By no means am I trying to reimplement stockcharts functionality, just wanted to create a simple charts with volume information overlaid on the price charts):

example

Thanks!

+1  A: 

What about using a Javascript charting library inside a WebView for your charts? You could then use something like Emprise: http://www.ejschart.com/

Jackson Miller
That sounds good, but I need a native solution.
futureelite7
Just out of curiosity, why do you need a native solution? Inside a webview with a local copy of the Javascript library the charts would be available offline and the app would still be a native app
Jackson Miller
A: 

Well i don't think its possible using current build of core-plot. But you can write a implementation of your own OR in best case extend core-plot to do that & submit a patch so other can benefit from your work.

Read Quartz 2D Drawing API & you will easily be able to create a complicated graph like above.

http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_overview/dq_overview.html

Gaurav Verma
That seems to be the case. I'll just see what I can do. As mentioned above, the final chart doesn't have to be that complicated, but I'm working on making core plot display overlays etc right now.
futureelite7
A: 

If you look at the latest builds of the framework, Drew just added an open-high-low-close plot type, which is a CPTradingRangePlot with a CPTradingRangePlotStyleOHLC plot style. For an example of this in action, along with a bar chart tracking trading volume, see the latest version of the AAPLot example application that ships with the framework: alt text

Brad Larson
A: 

I need to plot date instead of bottom graph. can any one please tell me how can I plot date in AAPlot example provided with framework..?

xmax