iOS开发杂货铺iOS学习图表

HXCharts使用详解

2017-09-04  本文已影响463人  H的幻想世界

接上文

本文主要介绍一些HXCharts的使用细节

标注值

Snip20170904_123.png Snip20170904_126.png Snip20170904_127.png
///折线图
- (void)setValue:(NSArray *)valueArray withYLineCount:(int)count;  ///count设置标注值个数

///柱状图
- (instancetype)initWithFrame:(CGRect)frame withMarkLabelCount:(int)markLabelCount withOrientationType:(OrientationType)type;  ///markLabelCount设置标注值个数

///仪表盘
@property (nonatomic, assign) int markLabelCount;///标注值个数

颜色

Snip20170904_133.png Snip20170904_134.png
///渐变色数组
@property (nonatomic, strong) NSArray *colorArray;
///渐变色数组所占位置
@property (nonatomic, strong) NSArray *locations;

2.单色:

///单色
@property (nonatomic, strong) UIColor *singleColor;

柱状图的横竖向设置

Snip20170904_136.png Snip20170904_137.png
typedef NS_ENUM(NSInteger, OrientationType) {
    OrientationHorizontal = 0,///横向
    OrientationVertical = 1,///竖向
};

- (instancetype)initWithFrame:(CGRect)frame withMarkLabelCount:(int)markLabelCount withOrientationType:(OrientationType)type;

更多属性请到.h文件查看,还有什么问题或者建议或者好的设计思路请留言或者+QQ152882888我们一起讨论 感谢。

最后再发一遍demo地址:https://github.com/xuuhan/HXCharts

上一篇 下一篇

猜你喜欢

热点阅读