hi all,
i have written an API in html5. and this is how i load it
HTML Code:
$(document).ready(function(){
oChart= new _chart("canvas4");
oChart.props.values= = [{ Name: "Rob", max:33, actual : 10, actual2: 15, color: "red" },
                          { Name: "Carole", max: 28, actual : 9, actual2: 17,color: "greenyellow" },
                          { Name: "David", max: 36, actual : 16, actual2: 8,color: "cyan" }						   					  
						   ];;
oChart.refresh();
});
the dilema is, figures in the values array should be updated every second, and i can do that by calling ajax method that returns a tring in the format
[color][{ Name: "Rob", max:33, actual : 10, actual2: 15, color: "red" },
{ Name: "Carole", max: 28, actual : 9, actual2: 17,color: "greenyellow" },
{ Name: "David", max: 36, actual : 16, actual2: 8,color: "cyan" }
];[/color]
how to evaluate the returned string into the values array ??
thanks in advance ..