core-plot

Adding CPTGraphHostingView as a subview

╄→尐↘猪︶ㄣ 提交于 2020-01-05 18:25:10
问题 There isn't a lot of questions about this and none of them were answered in a way that could solve my problem, still sorry if I'm asking something that was asked already. My problem is that I'd like to use core plot to draw a graph inside a view. So I add the view on IB in my appviewcontroller.xib , but thenI can't find how to link that specific zone I just defined on IB to the file's owner. A bit of precision: I managed to use core plot in another application, when it was the main view, but

How to add coreplot-cocoaTouch.xcodeproj to my project?

我与影子孤独终老i 提交于 2020-01-05 12:15:49
问题 I am trying to use CorPlot to draw pie charts to display the data but while setting up the project when i am trying to include #import "CorePlot-CocoaTouch.h" it's giving errors saying "No such file or directory". Although i am doing all the necessary steps. Please let me know if there is something else i need to do except below steps. 1) Download mercurial and get the code through terminal command and save it in a folder. 2) drag n drop the coreplot-cocoaTouch.xcodeproj to my project. 3) Add

How to add coreplot-cocoaTouch.xcodeproj to my project?

半腔热情 提交于 2020-01-05 12:14:12
问题 I am trying to use CorPlot to draw pie charts to display the data but while setting up the project when i am trying to include #import "CorePlot-CocoaTouch.h" it's giving errors saying "No such file or directory". Although i am doing all the necessary steps. Please let me know if there is something else i need to do except below steps. 1) Download mercurial and get the code through terminal command and save it in a folder. 2) drag n drop the coreplot-cocoaTouch.xcodeproj to my project. 3) Add

How do observe touch events in core plot on ios?

两盒软妹~` 提交于 2020-01-05 08:44:47
问题 I added this code to my graphViewController: -(BOOL)pointingDeviceDownEvent:(id)event atPoint:(CGPoint)interactionPoint { NSLog(@"Touched."); } but it is not firing on touch. What am I doing wrong? 回答1: i'm using the CPPlotSpaceDelegate protocol to receive touches on ios. after setting the delegate for your defaultPlotSpace you'll get called on the following methods when touches are received -(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceUpEvent:(id)event atPoint:(CGPoint

How do observe touch events in core plot on ios?

自古美人都是妖i 提交于 2020-01-05 08:44:01
问题 I added this code to my graphViewController: -(BOOL)pointingDeviceDownEvent:(id)event atPoint:(CGPoint)interactionPoint { NSLog(@"Touched."); } but it is not firing on touch. What am I doing wrong? 回答1: i'm using the CPPlotSpaceDelegate protocol to receive touches on ios. after setting the delegate for your defaultPlotSpace you'll get called on the following methods when touches are received -(BOOL)plotSpace:(CPPlotSpace *)space shouldHandlePointingDeviceUpEvent:(id)event atPoint:(CGPoint

Core Plot IPad performance issue

£可爱£侵袭症+ 提交于 2020-01-05 04:30:38
问题 In my app, i got core plot bar chart on a scroll view with paging, on IPhone all work fine , you page between different pages, one of them is the plot with its own touch gestures and properties. Problem starts when i run the same code on IPad. plot becomes slow and laggy, all touch gestures takes a lot of time to response and the whole scroller paging becomes heavy and slow. the chart itself contains 100 points or so (not so big). I've read somewhere that the change of plot space between

CorePlot 1.0 + LLVM GCC 4.2 + ARC - How to?

我的梦境 提交于 2020-01-05 04:16:07
问题 I'm trying out CorePlot in a small personal project to draw some bar graphs. I started the project using Xcode 4.3.2 and ARC, thinking it'd make my life easier... The problem is, when using GCC 4.2 - the compiler doesn't recognise @autorelease . I got past that using: int retVal = 0; // @autoreleasepool { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([kerrAppDelegate class])); [pool drain]; // } return retVal; However

How to animate only x Axis in core plot?

社会主义新天地 提交于 2020-01-05 04:04:08
问题 I am animating x Axis value in core plot but with that my xAxis , yAxis is also animating and disappearing . My set up for graph is shown in here as I have some issue related to graph data I have asked question and here as u can see in code graph set up is correct : Graph set up code. What is missing? MY code for animation is as below: let plotSpace = graph.defaultPlotSpace as! CPTXYPlotSpace! let location = currentIndex let oldRange = CPTPlotRange(location: location , length: kMaxDataPoints

core plot Framework - How to set custom UIView in CPTPlotSpaceAnnotation

谁都会走 提交于 2020-01-04 05:48:23
问题 I want to set a custom uiview with label outlets in my graph, if a plot symbol was pressed, using the scatterPlot:plotSymbolWasSelectedAtRecordIndex: method. But how can I give the plot area the UIView or how can I override CPTLayer to draw my custom UIView? Thank you 回答1: CPTLayer is a subclass of CALayer , so you can't just use the custom UIView as a Core Plot annotation. However, you could insert your custom view as a sibling of the Core Plot hosting view ( not a subview!). Use the plot

How to rotate bar chart like the example “CPTTestApp-iPhone” provided in core plot?

血红的双手。 提交于 2020-01-03 00:52:26
问题 I am trying to have my bar chart have the same rotate behaviour as in the example provided in core plot. I am using xcode4 and been googling with no luck for a while to get this working . If i copy my code in the example it does work fine, how can I do it for my own project? See images below Portrait Landscape 回答1: Add this: $self.hostingView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);$ Credit isn't mine, the answer was also on Stack Overflow