forked from AAChartModel/AAChartKit-Swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAACredits.swift
110 lines (90 loc) ยท 2.92 KB
/
AACredits.swift
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//
// AACredits.swift
// AAInfographicsDemo
//
// Created by AnAn on 2020/7/17.
// Copyright ยฉ 2020 An An. All rights reserved.
//*************** ...... SOURCE CODE ...... ***************
//***...................................................***
//*** https://github.com/AAChartModel/AAChartKit ***
//*** https://github.com/AAChartModel/AAChartKit-Swift ***
//***...................................................***
//*************** ...... SOURCE CODE ...... ***************
/*
* -------------------------------------------------------------------------------
*
* ๐ ๐ ๐ ๐ โโโ WARM TIPS!!! โโโ ๐ ๐ ๐ ๐
*
* Please contact me on GitHub,if there are any problems encountered in use.
* GitHub Issues : https://github.com/AAChartModel/AAChartKit-Swift/issues
* -------------------------------------------------------------------------------
* And if you want to contribute for this project, please contact me as well
* GitHub : https://github.com/AAChartModel
* StackOverflow : https://stackoverflow.com/users/12302132/codeforu
* JianShu : https://www.jianshu.com/u/f1e6753d4254
* SegmentFault : https://segmentfault.com/u/huanghunbieguan
*
* -------------------------------------------------------------------------------
*/
public class AACredits: AAObject {
public var enabled: Bool?
public var href: String?
public var position: AAPosition?
public var style: AAStyle?
public var text: String?
@discardableResult
public func enabled(_ prop: Bool?) -> AACredits {
enabled = prop
return self
}
@discardableResult
public func href(_ prop: String?) -> AACredits {
href = prop
return self
}
@discardableResult
public func position(_ prop: AAPosition?) -> AACredits {
position = prop
return self
}
@discardableResult
public func style(_ prop: AAStyle?) -> AACredits {
style = prop
return self
}
@discardableResult
public func text(_ prop: String?) -> AACredits {
text = prop
return self
}
public override init() {
}
}
public class AAPosition: AAObject {
public var align: String?
public var verticalAlign: String?
public var x: Float?
public var y: Float?
@discardableResult
public func align(_ prop: AAChartAlignType?) -> AAPosition {
align = prop?.rawValue
return self
}
@discardableResult
public func verticalAlign(_ prop: AAChartVerticalAlignType?) -> AAPosition {
verticalAlign = prop?.rawValue
return self
}
@discardableResult
public func x(_ prop: Float?) -> AAPosition {
x = prop
return self
}
@discardableResult
public func y(_ prop: Float?) -> AAPosition {
y = prop
return self
}
public override init() {
}
}