core-plot

How to install CorePlot framework correctly?

醉酒当歌 提交于 2019-12-23 03:55:28
问题 I want to use CorePlot.framework in Mac OS X. However, I cannot install it correctly though it has costed me several hours. I downloaded it (0.4 version) from google host site, and have tried to put CorePlot.framework in "/Library/Frameworks/" or some other custom places. I also have added it into "link binary and libraries". unfortunately, the compiler always cannot find "" . Any one who have some experience can give me some advice to install and use it? 回答1: If you check the readme files,

Format long numbers for axis labels core plot

感情迁移 提交于 2019-12-22 12:44:12
问题 I am trying to format long numbers in form of "k" for my axis labels. For example; if I have 10000 , I would like it to be displayed as 10k . I have already tried to follow this answer. But I could not manage to get formatted numbers. What I need to do additionally? Please guide me. Thanks. EDIT: HumanReadableFormatter.h @interface HumanReadableFormatter : NSNumberFormatter @end HumanReadableFormatter.m I have modified code from the link above to meet my requirements. #import

Format long numbers for axis labels core plot

吃可爱长大的小学妹 提交于 2019-12-22 12:43:17
问题 I am trying to format long numbers in form of "k" for my axis labels. For example; if I have 10000 , I would like it to be displayed as 10k . I have already tried to follow this answer. But I could not manage to get formatted numbers. What I need to do additionally? Please guide me. Thanks. EDIT: HumanReadableFormatter.h @interface HumanReadableFormatter : NSNumberFormatter @end HumanReadableFormatter.m I have modified code from the link above to meet my requirements. #import

How do I draw horizontal bars in a chart using Core Plot?

☆樱花仙子☆ 提交于 2019-12-22 09:09:51
问题 I'm beginner with the Core Plot framework. Right now, I am able to render bar charts on the screen. However, I need to draw a horizontal bar chart that has the bars extending from the Y axis, like so: ^ y| |**** |******* |********** |****** |---------------> x How would I implement such a horizontal bar chart in Core Plot? 回答1: you said you are using core-plot, there are sample codes with the framework, in which barChart has been implemented. You can have a look at it. EDIT: Sorry I saw you

Core plot mouseMoved

本秂侑毒 提交于 2019-12-22 08:59:53
问题 I would like to show (annotate) values in a scatterplot as the mouse is moved/hovering over a symbol or line. I understand this question has been asked before but I can only find answers that require the user to click the plot to show this information. I have tried to implement the mouseMoved method in my plotView delegate: - (void)mouseMoved:(NSEvent *)theEvent { NSPoint location = [hostingView convertPoint: [theEvent locationInWindow] fromView: nil]; CGPoint mouseLocation = NSPointToCGPoint

Keeping the y-axis fixed at place?

萝らか妹 提交于 2019-12-22 01:07:18
问题 this is the code in the continuation of this question....Allow horizontal scrolling only in the core-plot barchart? -(BOOL)pointingDeviceDraggedAtPoint:(CGPoint)interactionPoint { if ( !self.allowsUserInteraction || !self.graph.plotArea ) { return NO; } CGPoint pointInPlotArea = [self.graph.plotArea convertPoint:interactionPoint toLayer:self.graph.plotArea]; if ( isDragging ) { pointInPlotArea.y = lastDragPoint.y;//-- Madhup Changed it for allwoing scrolling only in horizontal direction --//

How to set custom tick marks in Core Plot to icons?

痴心易碎 提交于 2019-12-22 00:23:08
问题 Is there a way to make tick mark (major tick mark) to be UIImage (custom graphics) instead of text? I have values in one of the axis I need to present as icons. I do not see any delegate for this but maybe someone knows the trick? 回答1: Axis labels can have any CPTLayer (which is a direct subclass of Core Animation's CALayer ) as its content. Set your image as the layer background and build a custom label using this layer. Several of the Core Plot example apps demonstrate custom labels,

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

为君一笑 提交于 2019-12-21 05:39:18
问题 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" to the plot space of my graph? I can see the methods, but Im unsure on how to use them, the doco, although large, doesnt really describe them well enough :) Thanks a

core-plot and NSDate (iPhone)

心已入冬 提交于 2019-12-21 02:46:29
问题 I wish to plot a line graph where the x-axis is defined as a number of days between two dates and the y-axis is a value that varies on each of the days. I can plot the y values as an NSNumber but I have no idea how to set the ranges and the markup on the x-axis. I have looked at the date example in the "examples" directory of the core-plot distribution but have found it a little confusing. Does anyone know of a tutorial, or code sample, which might asist me in this regard? Thank you in

How do I animate the appearance of a bar chart in Core Plot?

浪子不回头ぞ 提交于 2019-12-21 02:46:07
问题 When first displaying a bar chart using Core Plot, I'd like the bars to grow upward until they reach their correct heights. How would you create such an animation using this framework? 回答1: This is what I did: In my viewDidLoad controller's method I created the CPTXYGraph: graph = [[CPTXYGraph alloc] initWithFrame:self.view.bounds]; I added animation to the empty graph: CAKeyframeAnimation *scale = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; Then in animationDidStop delegate's