I am receiving a json array from an api that that contains numeric days (30) as keys and values for each of those days as values.
Here's what I have:
self.queryChart.xElements = [[NSMutableArray alloc] initWithArray:[[stats allValues] mutableCopy]]; self.queryChart.yElements = [[NSMutableArray alloc] initWithArray:[[stats allKeys] mutableCopy]];
However I'm getting an "Invalid Values" message on the chart.
The values are:
Stats: {
1 = 4;
10 = 4;
12 = 10;
13 = 9;
14 = 12;
15 = 25;
16 = 12;
17 = 13;
18 = 14;
19 = 16;
2 = 2;
20 = 6;
21 = 4;
22 = 6;
23 = 3;
24 = 2;
25 = 10;
26 = 8;
27 = 2;
28 = 4;
29 = 5;
3 = 2;
30 = 1;
31 = 1;
4 = 3;
5 = 1;
6 = 5;
7 = 0;
8 = 4;
9 = 2;
}
any guidance would be greatly appreciated.