PNChart icon indicating copy to clipboard operation
PNChart copied to clipboard

barchart根本没法使用

Open zhouhesheng opened this issue 7 years ago • 0 comments

太多bug: 代码: static NSNumberFormatter *barChartFormatter; if (!barChartFormatter) { barChartFormatter = [[NSNumberFormatter alloc] init]; barChartFormatter.numberStyle = kCFNumberFormatterDecimalStyle; barChartFormatter.allowsFloats = NO; barChartFormatter.maximumFractionDigits = 0; } self.barChart0 = [[PNBarChart alloc] initWithFrame:self.bkview0.bounds]; self.barChart0.yLabelFormatter = ^(CGFloat yValue) { return [barChartFormatter stringFromNumber:@(yValue)]; }; self.barChart0.yChartLabelWidth = 40; self.barChart0.barWidth = 40; self.barChart0.chartMarginLeft = 0; self.barChart0.chartMarginRight = 0; self.barChart0.chartMarginTop = 0; self.barChart0.chartMarginBottom = 0;

    self.barChart0.showChartBorder = YES;
    [self.barChart0 setXLabels:@[@"2", @"3", @"4", @"5"]];
    [self.barChart0 setYValues:@[@10, @20, @30, @40]];
    [self.barChart0 setStrokeColors:@[PNGreen, PNRed, PNGreen, PNRed]];
    self.barChart0.isGradientShow = NO;
    self.barChart0.isShowNumbers = NO;
    [self.barChart0 strokeChart];
    
    [self.bkview0 addSubview:self.barChart0];

结果竟然跑出去了:

simulator screen shot 2017 6 19 4 10 41

看看reveal的截图:

2017-06-19 4 10 47

zhouhesheng avatar Jun 19 '17 07:06 zhouhesheng