使用CorePlot 1.6版.运行iOS 8.3.
我正在使用Core-Plot和ScatterPlot来表示多行.当我滚动时,图形移动到跳跃并锁定.我不知道会发生什么.你能帮助我吗?这是我的代码:
#import <UIKit/UIKit.h>
#import "CorePlot-CocoaTouch.h"
@interface TemporalLineViewController:UIViewController<CPTPlotDataSource,
CPTScatterPlotDelegate>
@property (strong, nonatomic) IBOutlet CPTGraphHostingView *hostingView;
@end
@interface TemporalLineViewController (){
NSMutableDictionary *dates;
}
@property (nonatomic, readwrite, strong) NSArray *plotData;
@end
@implementation TemporalLineViewController
-(CPTGraph *)createGraph{
initWithFrame:CGRectMake(viewGraph.frame.origin.x, viewGraph.frame.origin.y, 500, viewGraph.frame.size.height)];
CPTGraph *graph = [[CPTXYGraph alloc] initWithFrame:hostingView.bounds];
[graph applyTheme:[CPTTheme themeNamed:kCPTSlateTheme]];
hostingView.hostedGraph=graph;
// Axes
CPTXYAxisSet *axisSet = (CPTXYAxisSet *)graph.axisSet;
CPTXYAxis *x = axisSet.xAxis;
x.majorIntervalLength = CPTDecimalFromDouble(ONEDAY);
x.orthogonalCoordinateDecimal = CPTDecimalFromDouble(0.0);
x.minorTicksPerInterval = 0;
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"dd/MM/yyyy"];
CPTTimeFormatter *timeFormatter = …Run Code Online (Sandbox Code Playgroud)