单军华
2017-03-03 764722d0366346dc435aa906abdd25655e3b0769
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// Created by Jörg Polakowski on 14/12/13.
// Copyright (c) 2013 kevinzhow. All rights reserved.
//
 
#import "PNLineChartData.h"
 
 
@implementation PNLineChartColorRange
 
- (id)initWithRange:(NSRange)range color:(UIColor *)color {
    self = [super init];
    if (self) {
        self.range = range;
        self.color = color;
    }
    return self;
}
 
 
- (id)copyWithZone:(NSZone *)zone {
    PNLineChartColorRange *copy = [[self class] allocWithZone:zone];
    copy.color = self.color;
    copy.range = self.range;
    return copy;
}
 
@end
 
@implementation PNLineChartData
 
- (id)init
{
    self = [super init];
    if (self) {
        [self setupDefaultValues];
    }
    
    return self;
}
 
- (void)setupDefaultValues
{
    _inflexionPointStyle = PNLineChartPointStyleNone;
    _inflexionPointWidth = 6.f;
    _lineWidth = 2.f;
    _alpha = 1.f;
    _showPointLabel = NO;
    _pointLabelColor = [UIColor blackColor];
    _pointLabelFormat = @"%1.f";
    _rangeColors = nil;
}
 
@end