core-plot

the axis is drawn under the plot in core plot

强颜欢笑 提交于 2019-12-11 20:11:58
问题 I have a graph, and I want to add two blue axes to this graph, in addition to x-axis and y-axis. However, these blue axes appear under the plot. Any idea how to bring the blue axes on top of the plot? Thank you in advance. blueAxisList = [[NSMutableDictionary alloc] init]; CPTXYAxis *blueAxis = [blueAxisList objectForKey:name]; blueAxis = [[CPTXYAxis alloc] init]; blueAxis.coordinate = CPTCoordinateX; blueAxis.plotSpace = plotSpace; CPTMutableLineStyle *lineStyle = [CPTMutableLineStyle

Swift 4, CorePlot, send chart via mail app (with MessageUI)

帅比萌擦擦* 提交于 2019-12-11 17:47:04
问题 Can I somehow take the chart (which was made with CorePlot) from view and send it as a file to another person via mail app? I want to send mail with the help of MessageUI. I feel fine if just the picture will be sent. 回答1: Use the -imageOfLayer method to get a PNG of the graph or the -dataForPDFRepresentationOfLayer method to get a PDF and attach the resulting file to a message. 来源: https://stackoverflow.com/questions/49743016/swift-4-coreplot-send-chart-via-mail-app-with-messageui

Delegate method in the ios coreplot framework for CPTScatterPlot does not work

拜拜、爱过 提交于 2019-12-11 17:33:39
问题 I was trying to use the delegate method -(void)ScatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)index in the ios coreplot framework. Unfortunately, it does not seem to work. This method is declared in the header file CPTScatterPlot.h . Please help!! Thanks! 回答1: Try increasing the plotSymbolMarginForHitDetection . The default of 0.0 means you have to hit the plot point exactly for it to register. 来源: https://stackoverflow.com/questions/11550624/delegate-method

How to access CALayer of individual bar in core-plot?

强颜欢笑 提交于 2019-12-11 13:31:22
问题 I am trying to perform an animation on each bar in the chart, however I am not quite sure how to access the calayer of each individual bar. 回答1: There isn't one. All of the bars are drawn in one layer. If you need to animate them individually, make a separate CPTBarPlot (a subclass of CALayer ) for each bar. 回答2: I have another approach to this considering any performance issues you may face in future if your bars increases. You have a temporary CPTBarPlot with only one bar, to be used just

Unable to Build Core-plot with Xcode 6.4

一个人想着一个人 提交于 2019-12-11 10:25:23
问题 Please check the attached image I have no clue what this error means. NOTE: I have added core-plot into my project using cocoa-pods. 回答1: Core Plot 2.0 requires Xcode 7. It uses the new Objective-C generic collection notation. It will run on iOS 6, but requires the latest Xcode to build. 来源: https://stackoverflow.com/questions/33011484/unable-to-build-core-plot-with-xcode-6-4

How to show bar values on CorePlot -Stacked bar chart

梦想与她 提交于 2019-12-11 10:22:17
问题 I have used core-plot to display stacked bar chart in my application, I followed this nice tutorial to implement the stacked bar chart, now the graph looks like below. "http://www.gilthonwe.com/2012/06/09/stacked-bar-chart-coreplot-ios/" I used the below code to display the bar values while user touches them on the screen. -(void)barPlot:(CPTBarPlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)index { if (plot.isHidden == YES) { return; } static CPTMutableTextStyle *style = nil; if (!style)

How to give names in PieChart each slice Coreplot iphone?

杀马特。学长 韩版系。学妹 提交于 2019-12-11 08:46:16
问题 I draw PieChart with 4 slices in iPhone app. I want to add Names in each Slice in Pie Chart. Am using Core-Plot9. And also i want to give different colors for each slice in PieChart. How can do this? Please suggest me any idea/sample code to do this. Please help me. Thanks in advance. 回答1: download the samples from given link then go to CorePlot_0.9->Source->examples->CPTTestApp-iPhone check this sample. it will give you an idea how to solve your problem? core plot example 来源: https:/

Coreplot line chart line is not visible

爷,独闯天下 提交于 2019-12-11 06:46:04
问题 I tried to make a line graph with core plot but I have a problem. There is no line in the simulator though the number(for:...) function (last lines) works and the data is retrieved. I've been trying to do this for 60 hours and I don't know what's wrong here. And there are no more details. Here is my code: import UIKit import CorePlot class dottedLine: UIViewController { @IBOutlet var hostView: CPTGraphHostingView! var plot: CPTScatterPlot! override func viewDidLayoutSubviews() { super

How do I pad a graph so that lines aren't clipped by the edges?

◇◆丶佛笑我妖孽 提交于 2019-12-11 06:29:44
问题 I've had a pretty good look around for an answer to this, and tried several solutions in my code, nothing found so far. I have a line graph that I am plotting, a CPTScatterPlot graph, and I have got points adding to it correctly. I want to show each of these points as a dot about 3-5 pixels in diameter, and connected by lines that are about 3 pixels wide. This all works fine. The problem is that when the plot is a straight along one of the edges of the graph hosting view, the lines and dots

CorePlot 0.9: alternatives to isFloatingAxis property

折月煮酒 提交于 2019-12-11 04:46:50
问题 https://github.com/djw/core-plot/tree/9282845bddbb8c40ff314bbfa158beff797c91f7/examples This states that the isFloatingAxis property has been removed from at least version 0.9. Does anyone know how to float the x axis without this property? In other words, if I want the origin of the graph to be (0,6000) lets say, how can I maintain the x axis inside the plot range, while the y axis is NOT set to: y.orthogonalCoordinateDecimal = CPTDecimalFromInt(0); 回答1: I was able to figure this out by