Skip to content

Invalid values when using allKeys and allValues to generate mutable array for x and y #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DevGW opened this issue Jan 10, 2018 · 0 comments

Comments

@DevGW
Copy link

DevGW commented Jan 10, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant