core-plot

Problem with NSNumber and plotting a graph with Core-Plot

I try to plot a Bar Chart with Core-Plot with an Array (content are NSIntegers) given one view before. After transfering the Array in an NSInteger, i must convert it into a NSDecimalNumber, and in this process, my NSInteger (for example 45) becomes "60900224"... Here's the code extract: -(NSNumber *)numberForPlot:(CPPlot *)plot field:...

iphone hostingView does not fit parent view

hello, I have some problems with the layout of my core plot graph. To be more precise, I have created a GraphViewController (.h, .m and associated nib file). In the nib file I have added another UIView. This embedded view will be used to set the graph (as I do not want it to use the whole view). I then need to create a hosting view  from...

Using RGraph for iPhone data plot

I am using CorePlot for plotting data graph on iPhone. Recently I encountered RGraph based on html5 technology. CorePlot is a little over complicated for my purpose. Does anybody have the experience for using RGraph on iPhone? ...

How to correctly add Core Plot label/annotation to a CPPieChart object?

I am testing a CPPieChart and finding that the data source delegate method -sliceLabelForPieChart:recordIndex: is not displaying a slice label. In addition, there is no title property for the pie chart type. So I figured I would test using a UILabel instance: UILabel *viewTitle = [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 1...

How to plot nagative values on graph in core plot?

How to plot negative values on graph in core plot. I am able to draw lines with positive decimal values but in case of negative values my graph shows nothing neither on axis nor on graph. Please suggest any examples or any sample code would work. TIA ...

Core-Plot: How to keep axises are always at bottom-left side of screen

Dear all, Currently, I can keep the axises at bottom-left side of screen by using CPConstraints, isFloatingAxis and set a properly value for orthogonalCoordinateDecimal, but when I change the xRange and yRange value, the axises are moved, so is there anyway to keep them always at bottom-left side without re-calculate and change orthogon...

Problem when converting NSString to NSNumber in iPhone

Hey I am having problem when converting string (YaxisData) to NSNumber. I have to return a NSNumber for Core-plot to get the graph done but its not working. Here's the sample code -(NSNumber *)numberForPlot:(CPPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index{ NSNumber *num = [NSNumber numberWithDouble:[[YaxisData...

I can't get my axes to display using isFloatingAxis in core-plot

I'm using core-plot to display data that doesn't pass through zero on x or y axes, and I'd like the axes to be displayed too. The data is displayed correctly but the axes aren't shown at all. I see that the API has changed recently and it appears that the property to use is isFloatingAxis but I still can't get it to display. My code is b...

core-plot: still do not understand how to have custom label AND ticks

Hello, I have this problem since a long time and I cannot find anything to solve this. I read several forum but was not able to find a working solution. I have the following code: // Adjust graph using above data CPXYPlotSpace *plotSpace = (CPXYPlotSpace *)graph.defaultPlotSpace; plotSpace.xRange = [CPPlotRange plotRang...

How do you draw vertical line using coreplot CPPlotSymbol?

Hi All, How do I draw a vertical line on plotSymbol using Custom PlotSymbol? If it would be grateful, give any samples regarding that. Sri ...

[NSDecimalNumber notANumber] data point in new version of core-plot framework

Dear all, I wrote the delegate of CPPlotDataSource like this: -(NSNumber *)numberForPlot:(CPPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index { NSNumber *num = [[dataForPlot objectAtIndex:index] valueForKey:(fieldEnum == CPScatterPlotFieldX ? @"x" : @"y")]; if ([(NSString *)plot.identifier isEqualToStrin...

trouble getting multiple plot spaces to work in core-plot

I apologize for cross-posting to this and to the discussion list, but more eyes are better. I'm trying to create a discontinuous plot using the method described here: http://groups.google.com/group/coreplot-discuss/browse_thread/thread/..., and I'm having trouble getting the plots to render. I have one continuous plot that is associa...

Using core-plot, how can you convert a touched point to the plot space?

I have a very simple graph that I want to enable touch on, I have the first part working: plotSpace.delegate = self; and the method: -(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceDownEvent:(id)event atPoint:(CGPoint)point { NSLog(@"touched at: x: %f y: %f", point.x, point.y); } How do I convert the point "point...

what do the square brackets next to an NSDecimal object mean?

Im using core-plot for my graphing component of my iPhone app, and I have been using NSDecimal object a lot. One of the lines of their code that I have seen is like this: -(void)plotPoint:(NSDecimal *)plotPoint forPlotAreaViewPoint:(CGPoint)point { NSDecimal x; //do some calculations on x plotPoint[CPCoordinateX] = x; } W...

How do I get xcode to find the Core Plot header? (iPhone)

I can't seem to make Xcode find the Core Plot header. I've done the following: Clone the hg repo; Drag the CorePlot-CocoaTouch.xcodeproj file into my project; Opened the CP project and compiled it successfully; Dragged the lib file into the target's static link list; Added CorePlot-CocoaTouch as a direct dependency for the target. Bu...

How to add a label to a plot

I have core-plot graph like this: How can I add a label to each of these plots. I have seen some references about adding a CPTextLayer to the graph, but could not figure it out how to do it. Is there an example somebody can point me to? ...

How to draw Y-axis grid in core-plot?

Hi, How to draw X-axis grid, ie draw horizontal line against y=axis value? please help me out? sri ...

iPhone CorePlot - Strange error

Hello, I downloaded the CorePlotSDK, installed it using the readme instructions: copied the coreplotsdk directory to ~/Library/SDKs/ - imported in the PCH file - added $HOME/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk to the additional SDKs and -ObjC -all_load -lCorePlot to the other linker flags setting. Now, if I try to build the p...

CALayers not showing when drawn the first time

I've been struggling with a strange problem which has arisen in using the CorePlot framework, but which I suspect isn't an error in the framework itself. I'm hoping somebody here will have seen something similar, and can point me in a productive direction. I have a tabbed view in which graphs are shown. The tab that is initially activ...

how should i move up or down the custom plot symbol drawing using Core-plot in iPhone?

I used to charts using core-plot framework, my requirement is draw vertical line as a plot symbol in scatter chart, i need to move up or down according the value, how should i do it? please help me out? Sri ...