core-plot

Core Plot: How to present popover from a bar selected by the user

天大地大妈咪最大 提交于 2019-12-01 00:38:52
What I would like to accomplish I am using Core Plot (1.1) to draw a bar chart and I would like to present a popover with further details below the bar which has been selected (tapped) by the user. Code My code looks like this: - (void)barPlot:(CPTBarPlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)idx { NSNumber *yValue = self.values[idx]; NSLog(@"barWasSelectedAtRecordIndex x: %i, y: %@",idx,yValue); NSDecimal plotPoint[2]; NSNumber *plotXvalue = [self numberForPlot:plot field:CPTScatterPlotFieldX recordIndex:idx]; plotPoint[CPTCoordinateX] = CPTDecimalFromFloat(plotXvalue.floatValue);

How Add a legend to Core Plot in iPhone SDK?

放肆的年华 提交于 2019-11-30 19:10:12
How can I add Legends in Core Plot framework? I am greatly appreciative of any guidance or help. Ahmad Kayyali There is no Legend class yet. You can fake it using an image sometimes, but it is not in Core Plot yet. Check drewmcco Comment Legends have not yet been implemented in Core Plot. You're more than welcome to contribute an implementation of them to the framework. In the meantime, you could construct a custom UIView with UILabels and colored lines to act as the legend for the graph, then add it as a sibling to the graph (not a subview, or it will not be rendered properly) and order it to

Core Plot: How to present popover from a bar selected by the user

大兔子大兔子 提交于 2019-11-30 19:08:54
问题 What I would like to accomplish I am using Core Plot (1.1) to draw a bar chart and I would like to present a popover with further details below the bar which has been selected (tapped) by the user. Code My code looks like this: - (void)barPlot:(CPTBarPlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)idx { NSNumber *yValue = self.values[idx]; NSLog(@"barWasSelectedAtRecordIndex x: %i, y: %@",idx,yValue); NSDecimal plotPoint[2]; NSNumber *plotXvalue = [self numberForPlot:plot field

missing required architecture x86_64 in file libCorePlot-CocoaTouch.a

痞子三分冷 提交于 2019-11-30 01:51:30
According to the Ray Wenderlich tutorial , I done the following : Step 1 - I downloaded CorePlot_1.4.zip on the official website Step 2 - I added to my project the CorePlotHeaders folder and the static library named libCorePlot-CocoaTouch.a (checking “Copy items into destination group’s folder (if needed)” ) Step 3 - I added into Other Linker Flags field the following : -ObjC Step 4 - I checked into Link Binary with Libraries if libCorePlot-CocoaTouch.a and QuartzCore frameworks were here Result : When I compile my project, it works fine when I'm using Iphone Retina (4-Inch) . But when I'm

how to pass time as xAxis data value in method numberForPlot using core plot?

孤街浪徒 提交于 2019-11-29 16:53:51
I need to create graph which is "Heart rate vs time". in xAxis I am showing time which is in format of "HH:mm:ss" and at y Axis its decimal value. My code is as below : data source for graph: var graphData:[(String,Double)] = [] let data = ("17:56:35",Double(65)) let data1 = ("18:04:13",Double(95)) let data2 = ("18:8:35",Double(25)) self.graphData.append(data) self.graphData.append(data1) self.graphData.append(data2) Set up graph and plot data code: func setGraph() { let tts = CPTMutableTextStyle() tts.fontSize = 75.0 tts.color = CPTColor(CGColor: UIColor.blackColor().CGColor) tts.fontName =

Can't submit app with CorePlot using Xcode4

吃可爱长大的小学妹 提交于 2019-11-29 15:19:30
问题 I created an application in XCode 4 that uses Core Plot. I installed Core plot as an aditional SDK following the instructions from here:http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications (Install SDK) The instructions for "static Library" haven't been updated yet fro XCode 4. I can run the app in the simulator, install it on my iPhone and everything works just ok. I was even able to send it to beta testers using several services like TestFlight. For this, I had to generate an

iphone, using an array to define in core-plot range

我们两清 提交于 2019-11-29 13:08:13
I'm almost done with a core-plot graph I've been working on for a couple of day now. There is something I am still not able to do (and I cannot find documentation on this), is to change the x axis labels to what I need. Today, I have an x axis with integer label beeing displayed every 5 values: "5 10 15...", I need to have labels coresponding to the last 24 hours. For instance if it's 15:00, I would need labels like: "15 16 17 ... 23 0 1 2 .. 15" I was thinking of using a NSArray for this and passing it to the plotSpace.xRange but I do not know if this is the good way to do it. Here is my code

Are there any examples for how to draw a line chart in Core Plot on the iPhone?

家住魔仙堡 提交于 2019-11-29 08:37:35
Is there some sample code or a tutorial out there about how to draw a line chart using the Core Plot framework? I can't find anything using Google. If you have downloaded the framework , go to the examples directory within your checked-out version. There are several examples there, including CPTestApp-iPhone (which demonstrates line, bar, and pie charts), CPTestApp-iPad (same, but for the iPad), StockPlot (which downloads stock charts and plots the line graphs for them), and AAPLot (which grabs Apple's stock price and plots it using an open-high-low-close chart). These examples are updated as

Using Core Plot 2 in an Xcode 5 project

╄→гoц情女王★ 提交于 2019-11-28 23:44:43
I'm using the instructions here to integrate Core Plot into my iOS Xcode 5 project and am having no end of issues. I tried using the Static Library Install but it seems this refers to 1.4 as there is no directory called CorePlotHeaders though if I try to use 1.4 I run into runtime issues. I've then tried to drag the CorePlot-CocoaTouch.xcodeproj as described in the Dependent Project Install but this only copies it as if its a file and not the whole project. Is there more current instructions for using it as a static library or how am I copying the project incorrectly into my project? If you

Allow horizontal scrolling only in the core-plot barchart?

我们两清 提交于 2019-11-28 23:21:23
问题 I am using core-plot lib to draw bar charts in my app like this My problem is that i want the enabling of grapgh movement only in horizontal direction so that I can see the records for a long period of time, But the problem is that i just wnt to keep the y axis fixed to its place, How can i do this? Waiting for help.... 回答1: Only recently has rudimentary user interaction been enabled in Core Plot graphs. To enable scrolling in any direction, you can set the allowsUserInteraction property of