iOS 图表库:FSLineChart

jopen 10年前

FSLineChart 是简单的 iOS 线性图表库,很容易调节(大小,颜色,线宽度,标签显示等等),同时还包括非常好的展示动画。

NSArray* months = @[@"January", @"February", @"March", @"April", @"May", @"June", @"July"];    FSLineChart* lineChart = [[FSLineChart alloc] initWithFrame:CGRectMake(20, 260, [UIScreen mainScreen].bounds.size.width - 40, 166)];    lineChart.labelForIndex = ^(NSUInteger item) {      return months[item];  };    lineChart.labelForValue = ^(CGFloat value) {      return [NSString stringWithFormat:@"%.02f €", powf(10,value)];  };    [lineChart setChartData:chartData];

iOS 图表库:FSLineChart

项目主页:http://www.open-open.com/lib/view/home/1413358510997