http://apps.wentworthpeople.com.au/graph.html
I'm wanting to add data to the graph but I don't know how to get the data from the arrays to the function.. I've these comments in the code:
Code:/* this is an example of the code that i'd like to have written programmatically. $('#typedChart').gchart('change', {series: [$.gchart.series('Tom', [95.97, 91.80, 14, 23, 95.97], 'red'), $.gchart.series('Dick', [34, 34, 67, 86,34], 'green'), $.gchart.series('Harry', [50, 45, 52, 54,50], 'blue')]}); I'm thinking of looping through the arrays (names, idealist etc)and creating some kind of string that's inserted something like: $.each(names, function(index, value) { mystring += "$.gchart.series('" + names[index] +"', "+ idealist[index]+ ", " +go_getter[index]+", "+pursuader[index]+", "+nurturer[index]+", "+idealist[index]+"], '"+somerandomColor+"'),"; }); $('#typedChart').gchart('change', {series: [mystring]}); // but I don't think this will work.. $ needs to be escaped for starters.. */


Reply With Quote

Bookmarks