123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- //
- // DVXBarView.h
- // xxxxx
- //
- // Created by Fire on 15/11/11.
- // Copyright © 2015年 DuoLaiDian. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- @class DVXBarView;
- @protocol DVXBarViewDelegate <NSObject>
- @optional
- - (void)xBarView:(DVXBarView *)xBarView didClickButtonAtIndex:(NSInteger)index;
- @end
- @interface DVXBarView : UIView
- @property (weak, nonatomic) id<DVXBarViewDelegate> delegate;
- /**
- * 文字大小
- */
- @property (strong, nonatomic) UIFont *textFont;
- /**
- * 文字颜色
- */
- @property (strong, nonatomic) UIColor *textColor;
- /**
- * x轴文字与坐标轴间隙
- */
- @property (assign, nonatomic) CGFloat xAxisTextGap;
- /**
- * 坐标轴颜色
- */
- @property (strong, nonatomic) UIColor *axisColor;
- /**
- * y值的数组
- */
- @property (strong, nonatomic) NSArray *xValues;
- /**
- * y值的数组2
- */
- @property (strong, nonatomic) NSArray *xValues2;
- /**
- * y值的数组3
- */
- @property (strong, nonatomic) NSArray *xValues3;
- /**
- * y值的标题数组
- */
- @property (strong, nonatomic) NSArray *xTitles;
- /**
- * y值的标题数组2
- */
- @property (strong, nonatomic) NSArray *xTitles2;
- /**
- * y值的标题数组3
- */
- @property (strong, nonatomic) NSArray *xTitles3;
- /**
- * 柱与柱之间的间距
- */
- @property (assign, nonatomic) CGFloat barGap;
- /**
- * x轴的文字集合
- */
- @property (strong, nonatomic) NSArray *xAxisTitleArray;
- /**
- * y轴分为几段
- */
- @property (assign, nonatomic) int numberOfYAxisElements;
- /**
- * y轴的最大值
- */
- @property (assign, nonatomic) CGFloat yAxisMaxValue;
- /**
- * 是否显示点Label
- */
- @property (assign, nonatomic, getter=isShowPointLabel) BOOL showPointLabel;
- /**
- * 视图的背景颜色
- */
- @property (strong, nonatomic) UIColor *backColor;
- /**
- * 柱的宽度
- */
- @property (assign, nonatomic) CGFloat barWidth;
- /**
- * 柱的颜色
- */
- @property (strong, nonatomic) UIColor *barColor;
- /**
- * 柱的颜色
- */
- @property (strong, nonatomic) UIColor *barColor2;
- /**
- * 柱的颜色
- */
- @property (strong, nonatomic) UIColor *barColor3;
- /**
- * 柱的选中的颜色
- */
- @property (strong, nonatomic) UIColor *barSelectedColor;
- /**
- * pointLabel是否添加百分号
- */
- @property (assign, nonatomic, getter=isPercent) BOOL percent;
- /**
- * 点是否允许点击
- */
- @property (assign, nonatomic, getter=isBarUserInteractionEnabled) BOOL barUserInteractionEnabled;
- /**
- * 显示竖线
- */
- @property (assign, nonatomic, getter=isShowVerticalLine) BOOL showVerticalLine;
- /**
- * 标记选中哪一个柱子
- */
- @property (assign, nonatomic) NSInteger index;
- /**
- * 是否横屏
- */
- @property (assign,nonatomic,getter=isLandspace) BOOL landspace;
- /**
- * 是否是截图
- */
- @property (assign,nonatomic,getter=isShotImage) BOOL shotImage;
- - (void)draw;
- -(void)selectedIndex:(NSInteger)index;
- @end
|