Thanks all for the replies.

I have no problem charting manually entered data [as you had suggest Jon], 
my issue is in grabbing data from a file on my web server and charting it.

I tried your code suggestions Sergey, but am still coming up with a blank 
screen.

My code is shown below, hopefully someone can spot what I am doing wrong, 
rather than trying to give a verbal explanation of what to do. 

Sergey note I was unsure what the values should be in the csvColumns 
parameter. Since a search didn't reveal the definitions of the cvsColumns 
parameter, I assumed that 'number' meant there were number values in each 
column (which is true).  

Does there need to be a 'number' value stated for each column in the data 
array (a csv file with three [column] entries per line.)  In which case my 
my parameter should be csvColumns: ['number', 'number', 'number']

Also at the end of the csvColumns line, in your code sample, the code used 
a "," (coma),  Should that have really been a semi-colon (;) ?

<html>
  <head>
   <script src="https://www.google.com/jsapi";> </script>
   <script src="http://code.jquery.com/jquery-1.10.1.min.js";> </script>
   <script src="jquery.csv-0.71.js"> </script>
   
   <script>
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
  /////////////
var csvURL = "http://192.168.1.90/tempsD1.txt";
var queryOptions = {
csvColumns: ['number', 'number' /* Or whatever the columns in the CSV file 
are */],
csvHasHeader: false /* This should be false if your CSV file doesn't have a 
header */
}

var query = new google.visualization.Query(csvUrl, queryOptions);

query.send(handleQueryResponse);

function handleQueryResponse(response) {

if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' + 
response.getDetailedMessage());
return;
}

  var data = response.getDataTable();
 /
    function drawChart() {
  
     // set chart options
     var options = {
        title: "Temperatures",
        legend: 'none'
     };

     // create the chart object and draw it
    var chart = new 
google.visualization.LineChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }
    </script>
  </head>
  
  <body>
    <div id="chart_div" style="width: 900px; height: 500px;"></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.

Reply via email to