Hi, I want to display a page with Google Visualization stored in device, but got an error message like this: Console: ReferenceError: Can't find variable: google line: 5 source: file:///android_asset/area_chart.html line 5 referers to this line - google.load("visualization", "1", {packages:["areachart"]}); Why it works fine in browser running in PC and Android Web browser when browsing Google web page, but not work as put html file in assets directory.
Thanks, Senshan Here is the code: <html> <head> <script type="text/javascript" src="http://www.google.com/jsapi"></ script> <script type="text/javascript"> google.load("visualization", "1", {packages:["areachart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Year'); data.addColumn('number', 'Sales'); data.addColumn('number', 'Expenses'); data.addRows(4); data.setValue(0, 0, '2004'); data.setValue(0, 1, 1000); data.setValue(0, 2, 400); data.setValue(1, 0, '2005'); data.setValue(1, 1, 1170); data.setValue(1, 2, 460); data.setValue(2, 0, '2006'); data.setValue(2, 1, 660); data.setValue(2, 2, 1120); data.setValue(3, 0, '2007'); data.setValue(3, 1, 1030); data.setValue(3, 2, 540); var chart = new google.visualization.AreaChart(document.getElementById('chart_div')); chart.draw(data, {width: 800, height: 240, legend: 'bottom', title: 'Company Performance'}); } </script> </head> <body> <div id="chart_div"></div> </body> </html> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---