How can I implement a stock volume chart using core plot on iPhone?
Asked Answered
S

3

9

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 http://www.imagechicken.com/uploads/1264166887000577000.png

Thanks!

Soulsearching answered 22/1, 2010 at 12:26 Comment(0)
D
1

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

De answered 27/1, 2010 at 1:48 Comment(1)
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 appDe
T
1

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
(source: sunsetlakesoftware.com)

Tourist answered 4/2, 2010 at 5:25 Comment(0)
C
0

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

Cadenza answered 27/1, 2010 at 12:2 Comment(1)
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.Soulsearching

© 2022 - 2024 — McMap. All rights reserved.