一个封装简单使用简单的雷达视图

一个可以

猛戳此处获取代码

LQRadarChart

中文

LQRadarChart 是一个简单的可定制的雷达图

Base

基本概念 描述 演示
Step 背景多边形圈数, 最小值为1
image
image
Row 多边形边数, 最小值为三
image
image
Section 同时展现数据组数
image
image

LQRadarChartDataSource

通过 LQRadarChartDataSource 可以对 RadarChart 的 row,section,setp 进行设置, 并且获取每个 Section 的数据进行绘制

- (NSInteger)numberOfStepForRadarChart:(LQRadarChart *)radarChart;
- (NSInteger)numberOfRowForRadarChart:(LQRadarChart *)radarChart;
- (NSInteger)numberOfSectionForRadarChart:(LQRadarChart *)radarChart;
- (NSString *)titleOfRowForRadarChart:(LQRadarChart *)radarChart row:(NSInteger)row;
- (CGFloat)valueOfSectionForRadarChart:(LQRadarChart *)radarChart row:(NSInteger)row section:(NSInteger)section;

LQRadarChartDelegate

通过 LQRadarChartDelegate 可以对 RadarChart 的 UI 进行定制


- (UIColor *)colorOfTitleForRadarChart:(LQRadarChart *)radarChart;
- (UIColor *)colorOfLineForRadarChart:(LQRadarChart *)radarChart;
- (UIColor *)colorOfFillStepForRadarChart:(LQRadarChart *)radarChart step:(NSInteger)step;
- (UIColor *)colorOfSectionFillForRadarChart:(LQRadarChart *)radarChart section:(NSInteger)section;
- (UIColor *)colorOfSectionBorderForRadarChart:(LQRadarChart *)radarChart section:(NSInteger)section;
- (UIFont *)fontOfTitleForRadarChart:(LQRadarChart *)radarChart;

LQRadarChart属性

@property(nonatomic,assign) CGFloat radius;
@property(nonatomic,assign) CGFloat minValue;
@property(nonatomic,assign) CGFloat maxValue;

@property(nonatomic,assign) BOOL showPoint;
@property(nonatomic,assign) BOOL showBorder;
@property(nonatomic,assign) BOOL fillArea;
@property(nonatomic,assign) BOOL clockwise;
@property(nonatomic,assign) BOOL autoCenterPoint;

@property(nonatomic,assign) CGPoint centerPoint;



/*** 设置完成后需 reload ***/

猛戳此处获取代码

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 173,372评论 25 708
  • 发现 关注 消息 iOS 第三方库、插件、知名博客总结 作者大灰狼的小绵羊哥哥关注 2017.06.26 09:4...
    肇东周阅读 12,245评论 4 61
  • 《怀疑》 我等了好久好久,直到我开始怀疑爱情是不是已经逃走。 《唇边诗句》 我用唇边的诗句,烘烤思念你的话语。 《...
    何鲸洛阅读 310评论 0 0
  • 2017年8月8日北京时间21点14分 九寨沟县发生7.0级地震 时间已经快过去三个月,现在回想起来还是一...
    MAGUOYUE阅读 337评论 0 0
  • 你好
    张小隽阅读 190评论 0 0