Skip to content

Commit

Permalink
柱状图封装
Browse files Browse the repository at this point in the history
  • Loading branch information
xuuhan committed Aug 29, 2017
1 parent 4810254 commit e703694
Show file tree
Hide file tree
Showing 6 changed files with 302 additions and 162 deletions.
Binary file not shown.
24 changes: 23 additions & 1 deletion HXChartsDemo/HXCharts/HXBarChart.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,35 @@

#import <UIKit/UIKit.h>

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

@interface HXBarChart : UIView


/**
初始化方法
@param frame frame
@param markLabelCount 标注值个数
@param type 柱状图方向
@return self
*/
- (instancetype)initWithFrame:(CGRect)frame withMarkLabelCount:(int)markLabelCount withOrientationType:(OrientationType)type;

///文字数组
@property (nonatomic, strong) NSArray *titleArray;
///数值数组
@property (nonatomic, strong) NSArray *valueArray;
///渐变色数组
@property (nonatomic, strong) NSArray *colorArray;

///渐变色数组所占位置
@property (nonatomic, strong) NSArray *locations;
///单色数组
@property (nonatomic, strong) NSArray *singleColorArray;
///标注值
@property (nonatomic, weak) UIColor *markTextColor;
@property (nonatomic, weak) UIFont *markTextFont;
@end
Loading

0 comments on commit e703694

Please sign in to comment.