新版本

This commit is contained in:
roy
2019-03-12 09:26:46 +08:00
parent cbbfcb098a
commit c08d198e11
431 changed files with 19432 additions and 9136 deletions
+38
View File
@@ -0,0 +1,38 @@
//
// PNPieChartDataItem.m
// PNChartDemo
//
// Created by Hang Zhang on 14-5-5.
// Copyright (c) 2014年 kevinzhow. All rights reserved.
//
#import "PNPieChartDataItem.h"
#import <UIKit/UIKit.h>
@implementation PNPieChartDataItem
+ (instancetype)dataItemWithValue:(CGFloat)value
color:(UIColor*)color{
PNPieChartDataItem *item = [PNPieChartDataItem new];
item.value = value;
item.color = color;
return item;
}
+ (instancetype)dataItemWithValue:(CGFloat)value
color:(UIColor*)color
description:(NSString *)description {
PNPieChartDataItem *item = [PNPieChartDataItem dataItemWithValue:value color:color];
item.textDescription = description;
return item;
}
- (void)setValue:(CGFloat)value{
NSAssert(value >= 0, @"value should >= 0");
if (value != _value){
_value = value;
}
}
@end