how to draw a bar graph with tow y- axis in iOS? - iphone

I am using core-plot framework for drawing graphs. But I need to draw two bars with two y-axis. Please help providing sample code/example links.
Thanks in advance.

For your requirement this bellow link is very useful to you..also in this example many graphs and charts available
MIMChart-Library
and this tutorial with core-plot library
how-to-draw-graphs-with-core-plot-part
using-core-plot-to-draw-line-graphs
i hope this help you..

The "Axis Demo" in the Plot Gallery example app included with Core Plot shows how to do this. You create another axis and add it to the axes array of the axis set. The secondary y-axis can share the same plot space as the other axes or be assigned to another plot space if it needs to have a different scale.

Related

WaterFall in CorePlot

How to plot waterfall chart using coreplot in ipad.I am able to draw pie chart and other chart but not getting way to draw it. please share if any one have working example it will be very helpfull
Use a bar plot. Set barBasesVary to YES on the plot and return base values from your datasource in addition to the usual location and tip values.

Core Plot - Hide graph beyond one side of axis

I'm looking for a way to hide parts of a graph (namely the axes and plot) on a certain side of an axis (enclosed by the red boxes in the image below). I would like the labels to still be visible and the graph to still be scrollable.
I've tried setting visibleRange but it hides the axes for a fixed range, and doesn't quite work when the graph is scrollable.
Thanks in advance for any help.
Set padding on the plot area frame. See the Plot Gallery example app for sample code.
Just i have an idea, but i am not sure whether this will satisfy you or not.
I have used the axisContstrains property for both X and Y axis.
So the plots inside your boxes are not plotted for me. I hope this will help to this questions.

Get every point plot data information when clicked on graph core plot

I am using the core plot to draw graph but i need to show every plot point info on touch on every plot coordinate.Please help me how can i show the info my data on every plot accordingly.
Thanks in advance.
I guess you should save the location and information of each plot point and check that against the touch you receive from the user. When you have drawn something on a canvas there is no way to ask it for information about a certain point.
Use a plot delegate to get notified of the touch. There are several examples in the Plot Gallery and CPTTestApp (Mac) example apps.

iPhone Core-plot: Chart Zoom In Zoom out, Y axis Bigger, Y axis Smaller

I am now using Core-plot for iPhone chart Development.
But it has some requirement i can not reach.
I am now using CorePlot 0.4, example code AAPLot to develop
Please have a look the following image, then you will know what is my problem
Thank you very much...
I really need help for this problem,
thank you
i want my result like this application
I see several questions here:
Y-axis scale: Try the CPTAxisLabelingPolicyAutomatic labeling policy on your y-axis. If that doesn't give you enough control, use a different labeling policy and use a plot space delegate to adjust the labeling parameters as the user zooms in and out.
Disappearing x-axis: Make it a "floating" axis. For example,
x.axisConstraints = [CPTConstraints constraintWithLowerOffset:0.0];
Maximum zoom level: Use the globalXRange and globalYRange plot space properties. If you need more control, you can use a plot space delegate.
Scroll bars: This isn't directly supported. You could use a plot space delegate to update the scroll bar position.

Sample Tutorials Of Plotting A 2D Graph On Phone SDK

Can someone give me some good tutorials on Creating a 2D plot on IPhone given a variable number of x,y coordinates?
If you're looking for something beyond just plotting the points, check out the open source Core Plot framework for Mac and iPhone. It's still a young project, but it can handle a scatter plot (with or without lines between the points) along with labeled axes just fine. There are a number of example programs included with the framework that demonstrate some of its capabilities.
You can do this with the CGContextAddLineToPoint method.
http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_paths/dq_paths.html#//apple_ref/doc/uid/TP30001066-CH211