Google Chart API throwing error on Android browser

124 views
Skip to first unread message

Sutikshan Dubey

unread,
Jun 20, 2011, 8:19:11 AM6/20/11
to Google Chart API
I have following code inside asp.net mvc 3 Razor view. Script tags are
inside Body element. It is working fine on FireFox and Chrome on my
desktop. It is throwing error when I open this page on Android
Browser:-

"Cannot read property 'appendchild' of null.

<script type="text/javascript" src="https://www.google.com/jsapi"></
script>
<script type="text/javascript">
google.load("visualization", "1", { packages:
["corechart","table"] });
google.setOnLoadCallback(drawChart);

...
...

var chartBar = new
google.visualization.BarChart(document.getElementById('chart_div'));
chartBar.draw(data, { height: 340, width: 500, title: 'Key
Figures', chartArea: {left: 2, top: 2}, colors:
['blue','red','green','yellow','orange','purple'],legend: 'right' });
}

</script>
<div id='chart_div'>
</div>
<div id='table_div'>
</div>

duniyadnd

unread,
Jul 14, 2011, 4:38:36 PM7/14/11
to google-c...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages