core-plot

Core Plot skipped values Graph

和自甴很熟 提交于 2019-12-02 01:06:32
i'm trying to draw a Graph with a user-friendly timeline having every day/week (to be decided by time range) as a label at x-axis. However, the datasource values are given on another basis - there might be 10 entries one day and the eleventh comes in a month. See the photoshop image: With the latest Core Plot drop I cannot find a way to do it, need your help. Regards, user792677. The scatter plot asks the datasource for x-y pairs of data. There is no requirement that either value follow some sort of sequence or regular pattern. Other plot types work similarly, although the names and number of

iOS Core Plot CPTAxisLabel alignment to CPTPlot

眉间皱痕 提交于 2019-12-01 21:54:59
Please look at this image below. I have attached file. My problem with CPTAxisLabel labels. They are placed under the tick, but they are not placed under the CPTPlot as I want. How can I add left offset to this labels? I need that my labels will be placed middle the CPTPlot object. (UPDATED:) -(void)configureGraph { NSInteger max = 0; for (NSNumber *number in self.values) { NSInteger num = [number integerValue]; if (num > max) { max = num; } } CPTGraph *graph = [[CPTXYGraph alloc] initWithFrame:self.bounds]; graph.plotAreaFrame.masksToBorder = NO; self.hostedGraph = graph; graph.paddingBottom

How do you enable touch selection of a section in a Core Plot pie chart?

一曲冷凌霜 提交于 2019-12-01 21:44:16
I am using the Core Plot framework to draw a pie chart, and am having no issues in drawing the pie chart itself. However, I need the pie chart to be interactive in nature, i.e., if I tap on any particular section in the pie chart, it should trigger the navigation to a page showing details of that particular section. I tried using the method -(void)pieChart:sliceWasSelectedAtRecordIndex: , but that delegate method was never called. What do I need to enable this touch interaction? I have implemented pie piece selection in my iPad app with CorePlot 0.2.2. Your guess to use (void)pieChart

core-plot remove decimal points from axis labels

不羁的心 提交于 2019-12-01 21:02:59
问题 Can someone tell me how to remove the decimal points from the Axis labels? Instead of 10.0 I'd like to have only 10 showing. 回答1: Set the labelFormatter property on the axis to a new formatter. This is a standard NSNumberFormatter object. See Apple's class documentation for details on the options available. 回答2: CPTXYAxis *x = axisSet.xAxis; NSNumberFormatter *Xformatter = [[NSNumberFormatter alloc] init]; [Xformatter setGeneratesDecimalNumbers:NO]; [Xformatter setNumberStyle

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

a 夏天 提交于 2019-12-01 18:56:17
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

Coreplot graph fill color along y-axis

大城市里の小女人 提交于 2019-12-01 13:33:39
![enter image description here][1] Can anybody tell how to draw dark blue masked area on coreplot graph from y-axis 4 to 10 and through out the x-axis like i showed in the figure. Core Plot calls that a "background limit band". There are examples in several of the example apps, including the Plot Gallery. CPTPlotRange *range = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(4.0) length:CPTDecimalFromDouble(6.0)]; CPTFill *bandFill = [CPTFill fillWithColor:[CPTColor blueColor]]; [yAxis addBackgroundLimitBand:[CPTLimitBand limitBandWithRange:range fill:bandFill]]; 来源: https:/

Core-Plot: Unknown class CPLayerHostingView in Interface Builder file

隐身守侯 提交于 2019-12-01 10:54:18
Using core-plot does not seem to be an easy integration task. Header path are already setup. In Interface-Builder I create an CPLayerHostingView which belongs to a View Controller which is instantiated by Interface Builder. When the nib file is loaded I get the message: Unknown class CPLayerHostingView in Interface Builder file I found, that there are two different versions of that object. One for Mac-Only called "CPLayerHostingView", one for iPhone only called "CPGraphHostingView". If following the poplular example at http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone

Coreplot graph fill color along y-axis

耗尽温柔 提交于 2019-12-01 09:56:29
问题 ![enter image description here][1] Can anybody tell how to draw dark blue masked area on coreplot graph from y-axis 4 to 10 and through out the x-axis like i showed in the figure. 回答1: Core Plot calls that a "background limit band". There are examples in several of the example apps, including the Plot Gallery. CPTPlotRange *range = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(4.0) length:CPTDecimalFromDouble(6.0)]; CPTFill *bandFill = [CPTFill fillWithColor:[CPTColor blueColor]];

Moving date on x-axis

試著忘記壹切 提交于 2019-12-01 01:54:52
I have been playing with Core Plot and trying to create a dynamic date x-axis. From the date plot example I have managed to create a static date axis, but would like to create a two-minute window at any time and update the xRange values. I am not sure on how to pass dates as the xRange min and length values and display time on the x-axis. I have looked at examples, but I haven't been able to utilize NSTimeInterval (if this is how to do it...). Below is the picture (if it helps) Below is my attempt so far; can someone please advise me on how to achieve this? - (void)loadView { // Alloc & Init

iPhone Development: Core-Plot performance Slow when handling a huge data

纵饮孤独 提交于 2019-12-01 01:22:00
iPhone Development: Core-Plot performance slow when handling a huge data. I tried to put 500 Data into Plot. The performance show that it is really slow. And most of the CandleStick Chart all mix together... Anyone has any solution for me, please? Be aware of the size of the plot area. If you have more data points than pixels, filter the data set as @benzado suggested. Use graphical elements that are fast to draw--opaque colors, no gradients, no images, no shadows. If the bars are only going to be a few pixels wide, don't set both the fill and border line; use whichever one draws faster.