回答編集履歴
1
IntAxisValueFormatter
test
CHANGED
@@ -19,3 +19,25 @@
|
|
19
19
|
|
20
20
|
|
21
21
|
試したChartsのバージョンが古い & Swift2なので、適当に修正して下さい。
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
# IntAxisValueFormatter
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
```swift
|
30
|
+
|
31
|
+
class IntAxisValueFormatter: NSObject, IAxisValueFormatter {
|
32
|
+
|
33
|
+
public func stringForValue(_ value: Double, axis: AxisBase?) -> String {
|
34
|
+
|
35
|
+
return String(Int(value))
|
36
|
+
|
37
|
+
}
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
```
|
42
|
+
|
43
|
+
|