Hi I want to use google graph to plot graph in android webview. I am calling a web service to get the data. I just need to pass those data to javascript to plot the graph. Here is the data that using by google graph api.
var data = google.visualization.arrayToDataTable([
['Frequency', 'HVAC', 'Lighting', 'Overall', 'Cost'],
['00:00',100,200,0,80],
['00:00',0,0,522,50],
['1:00',125,78,0,115],
['1:00',0,0,153,125],
['2:00',100,90,0,100],
['2:00',0,0,119,120]
]);
and graph options like
var options = {
title : 'Monthly Coffee Production by Country',
vAxis: {title: "Cups"},
hAxis: {title: "Month"},
seriesType: "bars",
isStacked: true,
series: {3: {type: "line"}}
};
I think this is a javascript array. I need to pass the data to javascript. Can I pass this kind of array from an android context to javascript?