Hi there, 
I have created a simple page that shows a line chart using google api. The 
problem is, sometimes it showing on the browser, sometimes it doesn't. Can 
you help me figure out is there something wrong with my code.
 

<html>
<head>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization','1',{packages:['corechart']});
google.setOnLoadCallback(drawVisualization);
function drawVisualization(){
var data = new google.visualization.DataTable();
data.addColumn('string','DateTime');
data.addColumn('number','GBPUSD');
data.addColumn('number','EURUSD');
data.addRows(10);
data.setValue(0,0,'22 Dec 07:00');
data.setValue(0,1,'0.00000');
data.setValue(0,2,'0.00000');
data.setValue(1,0,'22 Dec 07:30');
data.setValue(1,1,'-107.0');
data.setValue(1,2,'-72.0');
data.setValue(2,0,'22 Dec 08:00');
data.setValue(2,1,'78.0');
data.setValue(2,2,'71.0');
data.setValue(3,0,'22 Dec 08:30');
data.setValue(3,1,'126.0');
data.setValue(3,2,'-77.0');
data.setValue(4,0,'22 Dec 09:00');
data.setValue(4,1,'197.0');
data.setValue(4,2,'-42.0');
data.setValue(5,0,'22 Dec 09:30');
data.setValue(5,1,'288.0');
data.setValue(5,2,'-29.0');
data.setValue(6,0,'22 Dec 10:00');
data.setValue(6,1,'256.0');
data.setValue(6,2,'22.0');
data.setValue(7,0,'22 Dec 10:30');
data.setValue(7,1,'264.0');
data.setValue(7,2,'-1.0');
data.setValue(8,0,'22 Dec 11:00');
data.setValue(8,1,'387.0');
data.setValue(8,2,'8.0');
data.setValue(9,0,'22 Dec 11:30');
data.setValue(9,1,'362.0');
data.setValue(9,2,'11.0');
var options={
width:800,
height:600,
interpolateNulls:true,
hAxis:{
textStyle:{
fontSize:10,
},
},
vAxis:{
textStyle:{
fontSize:10,
},
}
}
var chart = new 
google.visualization.LineChart(document.getElementById('visualization'));
chart.draw(data,options);
}
</script>
</head>
<body>
<div id='visualization' style='width: 800px; height: 600px;'></div>
</body>
</html>

Thanks....

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart 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-chart-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to