質問編集履歴
6
バージョン情報追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
###実現したいこと
|
2
|
+
|
3
|
+
[ブログ記事](https://www.appcoda.com/ios-charts-api-tutorial/)を参考に、グラフ描画ライブラリ「[ios-charts](https://github.com/danielgindi/Charts)」を用いたデモファイル「[iOSChartsDemo](https://www.dropbox.com/s/9ehz8ca5g4npoc2/iOSChartsDemoStarter.zip?dl=0)」をもとに、レーダーチャートを書きたいです。
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
###エラー内容
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
```
|
14
|
+
|
15
|
+
Argument labels '(value:, xIndex:)' do not match any available overloads
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
Incorrect argument label in call (have 'yVals:label:'; expected 'values:label:')
|
20
|
+
|
21
|
+
```
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
###該当コード
|
4
26
|
|
5
27
|
該当のコードを以下に記します。
|
6
28
|
|
@@ -86,7 +108,7 @@
|
|
86
108
|
|
87
109
|
|
88
110
|
|
89
|
-
|
111
|
+
###スクリーンショット
|
90
112
|
|
91
113
|
|
92
114
|
|
@@ -239,3 +261,27 @@
|
|
239
261
|
|
240
262
|
|
241
263
|
```
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
###補足情報(言語/FW/ツール等のバージョンなど)
|
268
|
+
|
269
|
+
######バージョン情報
|
270
|
+
|
271
|
+
Alamofire 3.4
|
272
|
+
|
273
|
+
Charts 2.2.5
|
274
|
+
|
275
|
+
XCode 7
|
276
|
+
|
277
|
+
iOS 9.3.5
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
######利用しているライブラリ
|
282
|
+
|
283
|
+
[ios-charts](https://github.com/danielgindi/Charts)
|
284
|
+
|
285
|
+
[Alamofire](https://github.com/Alamofire/Alamofire)
|
286
|
+
|
287
|
+
[SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON.git)
|
5
ブログ記事URL追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
グラフ描画ライブラリ「[ios-charts](https://github.com/danielgindi/Charts)」を用いたデモファイル「[iOSChartsDemo](https://www.dropbox.com/s/9ehz8ca5g4npoc2/iOSChartsDemoStarter.zip?dl=0)」をもとに、レーダーチャートを書きたいのですが、2箇所のエラーによりプログラムが動作しません。
|
1
|
+
2015年に投稿された[ブログ記事](https://www.appcoda.com/ios-charts-api-tutorial/)を参考にグラフ描画ライブラリ「[ios-charts](https://github.com/danielgindi/Charts)」を用いたデモファイル「[iOSChartsDemo](https://www.dropbox.com/s/9ehz8ca5g4npoc2/iOSChartsDemoStarter.zip?dl=0)」をもとに、レーダーチャートを書きたいのですが、2箇所のエラーによりプログラムが動作しません。
|
2
2
|
|
3
3
|
|
4
4
|
|
4
s
test
CHANGED
File without changes
|
test
CHANGED
@@ -86,7 +86,7 @@
|
|
86
86
|
|
87
87
|
|
88
88
|
|
89
|
-
エラーメッセージ
|
89
|
+
エラーメッセージを以下に示します。
|
90
90
|
|
91
91
|
|
92
92
|
|
3
メソッド宣言元の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
グラフ描画ライブラリ「[ios-charts](https://www.dropbox.com/s/9ehz8ca5g4npoc2/iOSChartsDemoStarter.zip?dl=0)」を
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
該当の
|
1
|
+
グラフ描画ライブラリ「[ios-charts](https://github.com/danielgindi/Charts)」を用いたデモファイル「[iOSChartsDemo](https://www.dropbox.com/s/9ehz8ca5g4npoc2/iOSChartsDemoStarter.zip?dl=0)」をもとに、レーダーチャートを書きたいのですが、2箇所のエラーによりプログラムが動作しません。
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
該当のコードを以下に記します。
|
6
6
|
|
7
7
|
|
8
8
|
|
@@ -86,7 +86,7 @@
|
|
86
86
|
|
87
87
|
|
88
88
|
|
89
|
-
エラーメッセージが下
|
89
|
+
エラーメッセージが以下に示します。
|
90
90
|
|
91
91
|
|
92
92
|
|
@@ -96,6 +96,146 @@
|
|
96
96
|
|
97
97
|
おそらく引数の記述に問題があるのだと思いますが、ググれどググれどわからず、どうかよろしくお願いします。
|
98
98
|
|
99
|
-
|
99
|
+
BarChartDataEntry, BarChartDataSetおよびBarChartDataの宣言元を下記に示します。
|
100
|
+
|
101
|
+
|
102
|
+
|
100
|
-
|
103
|
+
```Swift
|
104
|
+
|
105
|
+
public class BarChartDataEntry: ChartDataEntry
|
106
|
+
|
107
|
+
{
|
108
|
+
|
109
|
+
public required init()
|
110
|
+
|
111
|
+
{
|
112
|
+
|
113
|
+
super.init()
|
114
|
+
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
/// Constructor for stacked bar entries.
|
120
|
+
|
121
|
+
public init(x: Double, yValues: [Double])
|
122
|
+
|
123
|
+
{
|
124
|
+
|
125
|
+
super.init(x: x, y: BarChartDataEntry.calcSum(yValues))
|
126
|
+
|
127
|
+
self._yVals = yValues
|
128
|
+
|
129
|
+
calcRanges()
|
130
|
+
|
131
|
+
calcPosNegSum()
|
132
|
+
|
133
|
+
}
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
/// Constructor for normal bars (not stacked).
|
138
|
+
|
139
|
+
public override init(x: Double, y: Double)
|
140
|
+
|
141
|
+
{
|
142
|
+
|
143
|
+
super.init(x: x, y: y)
|
144
|
+
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
/// Constructor for stacked bar entries.
|
150
|
+
|
151
|
+
public init(x: Double, yValues: [Double], label: String)
|
152
|
+
|
153
|
+
{
|
154
|
+
|
155
|
+
super.init(x: x, y: BarChartDataEntry.calcSum(yValues), data: label)
|
156
|
+
|
157
|
+
self._yVals = yValues
|
158
|
+
|
159
|
+
calcRanges()
|
160
|
+
|
161
|
+
calcPosNegSum()
|
162
|
+
|
163
|
+
}
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
/// Constructor for normal bars (not stacked).
|
168
|
+
|
169
|
+
public override init(x: Double, y: Double, data: AnyObject?)
|
170
|
+
|
171
|
+
{
|
172
|
+
|
101
|
-
|
173
|
+
super.init(x: x, y: y, data: data)
|
174
|
+
|
175
|
+
}
|
176
|
+
|
177
|
+
```
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
```Swift
|
182
|
+
|
183
|
+
public class BarChartDataSet: BarLineScatterCandleBubbleChartDataSet, IBarChartDataSet
|
184
|
+
|
185
|
+
{
|
186
|
+
|
187
|
+
public required init()
|
188
|
+
|
189
|
+
{
|
190
|
+
|
191
|
+
super.init()
|
192
|
+
|
193
|
+
initialize()
|
194
|
+
|
195
|
+
}
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
public override init(values: [ChartDataEntry]?, label: String?)
|
200
|
+
|
201
|
+
{
|
202
|
+
|
203
|
+
super.init(values: values, label: label)
|
204
|
+
|
205
|
+
initialize()
|
206
|
+
|
207
|
+
}
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
```
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
```Swift
|
216
|
+
|
217
|
+
public class BarChartData: BarLineScatterCandleBubbleChartData
|
218
|
+
|
219
|
+
{
|
220
|
+
|
221
|
+
public override init()
|
222
|
+
|
223
|
+
{
|
224
|
+
|
225
|
+
super.init()
|
226
|
+
|
227
|
+
}
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
public override init(dataSets: [IChartDataSet]?)
|
232
|
+
|
233
|
+
{
|
234
|
+
|
235
|
+
super.init(dataSets: dataSets)
|
236
|
+
|
237
|
+
}
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
```
|
2
URL編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,8 +1,4 @@
|
|
1
|
-
グラフ描画ライブラリ「[
|
1
|
+
グラフ描画ライブラリ「[ios-charts](https://www.dropbox.com/s/9ehz8ca5g4npoc2/iOSChartsDemoStarter.zip?dl=0)」を使って、レーダーチャートを書きたいのですが、2箇所のエラーによりライブラリが動作しません。
|
2
|
-
|
3
|
-
ios-charts
|
4
|
-
|
5
|
-
```」を使って、レーダーチャートを書きたいのですが、2箇所のエラーによりライブラリが動作しません。
|
6
2
|
|
7
3
|
|
8
4
|
|
1
ファイルダウンロードURL
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
グラフ描画ライブラリ「[ios-charts](https://github.com/danielgindi/Charts)
|
1
|
+
グラフ描画ライブラリ「[[ios-charts](https://github.com/danielgindi/Charts)](https://www.dropbox.com/s/9ehz8ca5g4npoc2/iOSChartsDemoStarter.zip?dl=0)力
|
2
|
+
|
3
|
+
ios-charts
|
4
|
+
|
5
|
+
```」を使って、レーダーチャートを書きたいのですが、2箇所のエラーによりライブラリが動作しません。
|
2
6
|
|
3
7
|
|
4
8
|
|
@@ -95,3 +99,7 @@
|
|
95
99
|
|
96
100
|
|
97
101
|
おそらく引数の記述に問題があるのだと思いますが、ググれどググれどわからず、どうかよろしくお願いします。
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
*デモ用ファイルのダウンロードURLが間違っていたので修正しました。
|