最近项目中用到一些图表展示数据,闲下来封装了一下,支持折线图、柱状图、 饼状图、环形图,其中折线图、柱状图支持tap手势缩放、pan手势缩放。代码地址:https://github.com/Rochang/LCChartView。
使用方法:
/* 每种图形样式都支持颜色,文字的自定义设置,修复对应的属性即可 */
// 数据
LCChartViewModel *model0 = [LCChartViewModel modelWithColor:RandomColor plots:[self randomArrayWithCount:12] project:@"1组"];
LCChartViewModel *model1 = [LCChartViewModel modelWithColor:RandomColor plots:[self randomArrayWithCount:12] project:@"2组"];
LCChartViewModel *model2 = [LCChartViewModel modelWithColor:Ra