Ok, the JSON is good. There are a couple of changes you need to make in
the HTML file:
1) remove the JSON.parse from the DataTable constructor. jQuery should be
returning a javascript object (since you have the data type specified as
JSON), so you don't want to parse it again. It should look like this:
var data = new google.visualization.DataTable(jsonData);
2) remove the option parameter from the Dashboard#draw call as you don't
have an "option" variable declared, and the dashboard's don't support any
options anyway. It should look like this:
dashboard.draw(data);
Everything else looks good.
On Sunday, April 7, 2013 12:00:14 AM UTC-4, kolo ken wrote:
>
> goo2.php Output :
>
>
> {"cols":[{"label":"Semester","type":"string"},{"label":"Subject","type":"string"},{"label":"Category","type":"string"},{"label":"Skill1","type":"number"},{"label":"Skill2","type":"number"},{"label":"Skill3","type":"number"},{"label":"Skill4","type":"number"},{"label":"Mark","type":"number"}],"rows":[{"c":[{"v":"1"},{"v":"BCM1111"},{"v":"Lab"},{"v":78},{"v":76},{"v":87},{"v":67},{"v":88}]},{"c":[{"v":"1"},{"v":"BCM1111"},{"v":"Lecture"},{"v":58},{"v":66},{"v":77},{"v":77},{"v":98}]},{"c":[{"v":"1"},{"v":"BCM2222"},{"v":"Lecture"},{"v":68},{"v":76},{"v":77},{"v":77},{"v":78}]},{"c":[{"v":"1"},{"v":"BCM2222"},{"v":"Lab"},{"v":68},{"v":56},{"v":77},{"v":87},{"v":78}]},{"c":[{"v":"2"},{"v":"BCM1111"},{"v":"Lab"},{"v":68},{"v":56},{"v":77},{"v":87},{"v":78}]},{"c":[{"v":"2"},{"v":"BCM1111"},{"v":"Lecture"},{"v":68},{"v":76},{"v":77},{"v":57},{"v":68}]},{"c":[{"v":"2"},{"v":"BCM2222"},{"v":"Lecture"},{"v":68},{"v":76},{"v":87},{"v":97},{"v":58}]},{"c":[{"v":"2"},{"v":"BCM2222"},{"v":"Lab"},{"v":68},{"v":76},{"v":47},{"v":87},{"v":38}]},{"c":[{"v":"2"},{"v":"BCM2223"},{"v":"Lab"},{"v":68},{"v":76},{"v":67},{"v":57},{"v":38}]}]}
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.