I have been working on this a long time and also am a bit of a novice when it come to sql and making it talk to these charts.
what I have is this (see screenshot). The JSON that I have generated is as follows:
{"cols":[{"label":"firstname","type":"string"},{"label":"mike","type":"number"},{"label":"alex","type":"number"},{"label":"tommy","type":"number"}],"rows":[{"c":[{"v":"9 October 2013, 3:53 PM"},{"v":2}]},{"c":[{"v":"10 October 2013, 2:08 PM"},{"v":3}]},{"c":[{"v":"11 October 2013, 10:07 AM"},{"v":5}]},{"c":[{"v":"14 October 2013, 3:56 PM"},{"v":5}]},{"c":[{"v":"14 October 2013, 3:58 PM"},{"v":3}]}]}
I need to figure out how to A generate the firstnames from the database. Right now I have just hand coded them in. I tried using a foreach such as the rows are generated but it returned an error saying invalid column label:firstname. I have aslo attached my php and html that are making this work.
I know how the json needs to look I just dont know how to make it look that way. Here is how it needs to look:
{"cols":[{"label":"firstname","type":"string"},{"label":"mike","type":"number"},{"label":"alex","type":"number"},{"label":"tommy","type":"number"}],"rows":[{"c":[{"v":"9 October 2013, 3:53 PM"},{"v":4.4},{"v":4.3},{"v":3.1},{"v":4.3}]},{"c":[{"v":"10 October 2013, 2:08 PM"},{"v":4.4},{"v":4.3},{"v":3.1},{"v":4.3}]},{"c":[{"v":"11 October 2013, 10:07 AM"},{"v":4.4},{"v":4.3},{"v":3.1},{"v":4.3}]} etc...
you can see the change that there are multiple values per person now. Those are all the 'rank' values. The current values are actually associated with different people. so I would need the names in the columns to match up with the date and the 'rank' values associated with that person.
I think I am close I just need a little help. Does anyone know how to do this?
Thanks,
Mike