XJYChart 2.5.0

XJYChart 2.5.0

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布最后发布2018年12月

JunyiXie维护。



XJYChart 2.5.0

  • 谢俊逸

XJYChart

Version Platform License

XJYChart - 一个高性能、优雅、易于集成的图表框架。最好的iOS Objc图表。

  • 更美观的图表
  • 支持图表滚动
  • 支持图表区域填充
  • 支持图表动画
  • 支持图表触摸
  • 支持图表高亮

安装

CocoaPods

XJYChart通过CocoaPods提供。安装它,只需将以下行添加到Podfile中

pod "XJYChart"

然后,运行以下命令

$ pod install

如何使用

快速使用

例如

初始化

- (instancetype)initWithFrame:(CGRect)frame 
                dataItemArray:(NSMutableArray<XLineChartItem*>*)dataItemArray 
            dataDiscribeArray:(NSMutableArray<NSString*>*)dataDiscribeArray
                    topNumber:(NSNumber*)topNumbser
                 bottomNumber:(NSNumber*)bottomNumber
                    graphMode:(XLineGraphMode)graphMode
           chartConfiguration:(XLineChartConfiguration*)configuration;
  • frame: 视图的边框矩形
  • dataItemArray: 线数据
  • topNumber: 坐标系顶部数值
  • bottomNumber: 坐标系底部数值
  • graphMode: 想要使用的线图类型。例如:MutiLineGraph(多线图),AreaLineGraph(区域线图),StackAreaLineGraph(堆叠区域线图)
  • chartConfiguration: 图表详细配置项。例如:lineMode(线模式),shadow(阴影)

图表数据

- (instancetype)initWithDataNumberArray:(NSMutableArray*)numberArray
                                  color:(UIColor*)color;
  • numberArray: 线中的数值
  • color: 线填充颜色

图表配置

XNormalLineChartConfiguration* configuration =
   [[XNormalLineChartConfiguration alloc] init];
configuration.lineMode = CurveLine;
configuration.isShowShadow = YES;

许可证

XJYChart遵循MIT许可证。有关更多信息,请参阅LICENSE文件。