If this is your entire page, then you forgot to source jsapi, so I'm
surprised that it work in any case.


- Sergey


On Wed, Apr 2, 2014 at 10:13 AM, John Brines <[email protected]> wrote:

> Hi Guys,
>
> I can run the following script from my own computer by double clicking on
> the HTML file, but when I run it from the web server it doesn't show the
> chart. Any ideas?
>
> Any ideas/
>
> John
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
>   <head>
>     <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
>     <title>
>       Google Visualization API Sample
>     </title>
>     <script type="text/javascript"
> src="demo/js/jquery/jquery-1.8.3.js"></script>
>     <script type="text/javascript">
>       google.load('visualization', '1', {packages: ['corechart']});
>       google.setOnLoadCallback(drawChart);
>     </script>
>     <script type="text/javascript">
>       function drawVisualization() {
>         // Some raw data (not necessarily accurate)
>
> // this has to be a global function
> function drawChart() {
>    // grab the CSV
>    $.get("march2014.csv", function(csvString) {
>       // transform the CSV string into a 2-dimensional array
>       var arrayData = $.csv.toArrays(csvString, {onParseValue:
> $.csv.hooks.castToScalar});
>       // this new DataTable object holds all the data
>       var data = new google.visualization.arrayToDataTable(arrayData);
>       // this view can select a subset of the data at a time
>       var view = new google.visualization.DataView(data);
>       view.setColumns([0,1]);
>
>         var options = {
>           title : 'March 2014 Helpdesk Tickets',
>           vAxis: {title: "Tickets"},
>           hAxis: {title: "Day"},
>           seriesType: "bars",
>           series: {2: {type: "line"},
>    3: {type: "line"},
>    4: {type: "line"}}
>         };
>         var chart = new
> google.visualization.ComboChart(document.getElementById('chart_div'));
>         chart.draw(data, options);
>       }
>       google.setOnLoadCallback(drawVisualization);
>     </script>
>   </head>
>   <body>
>     <div id="chart_div" style="width: 1500px; height: 600px;"></div>
>   </body>
> </html>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization 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-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>

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

Reply via email to