Saturday, 17 August 2013

Changing an array object's elements

Changing an array object's elements

First of all here is a fiddle. I want to dynamically change parameters of
variable data. If you look at Firebug console you can look at the data
array object. I have looked up much but i couldn't figure out the data.
In short i want to regenerate the data array object with return_data
elements. The return_data object's elements are dynamic. In the fiddle it
has 3 elements but it may different than 3. How can i dymanically change
it?
Thanks in advance.
var return_data =
[{"name":"mrzurafa","count":315,"pop":5,"impact":7.37},{"name":"mutcato","count":20,"pop":5,"impact":56},{"name":"s0lukciyerli","count":3488,"pop":5,"impact":25.65}];
var data = google.visualization.arrayToDataTable([
['name','impact','pop','temp','count'],
['beyinsiz',80.66,1.67,2,33739900],
['mutcato',79.84,1.36,4,81902307],
['s0lukciyerli',78.6,1.84,8,5523095],
['herbkubilenadam',81.55,2.96,10,748560000],
['mrzurafa',88.09,2.05,40,307007000]
]);

No comments:

Post a Comment