--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
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 a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/cnXYDr411tQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
-- -ken burkhalter
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 optionsvar options = {title: "Temperatures",legend: 'none'};// create the chart object and draw itvar 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 a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/cnXYDr411tQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
-- -ken burkhalter
Sergey -
Let me do this over again so you are not mislead. The first screenshot, I just sent, was a capture from my desktop computer where I have been debugging, but the actual HTML code page runs on my web serverm which is what the capture below reflects ....
-- -ken burkhalter
On 12/3/2014 4:32 PM, Ken Burkhalter wrote:
Sergey -
Let me do this over again so you are not mislead. The first screenshot, I just sent, was a capture from my desktop computer where I have been debugging, but the actual HTML code page runs on my web serverm which is what the capture below reflects ....
Assuming you can view the code capture I posted in the previous message, you can see that I am NOT using any "file" protocols. Everything is nice Kosher HTTP tags.
[:-)}
On 12/3/2014 4:22 PM, 'Sergey Grabkovsky' via Google Visualization API wrote:
You might be accessing your HTML file via the file:// protocol, which would be a different domain than http://. If that's not the problem, then it would be immensely helpful if you could post a screenshot of your browser window (with the address bar and everything) accessing the page with the developer tools open.
On Wed Dec 03 2014 at 4:19:26 PM Ken Burkhalter <kenbur...@gmail.com> wrote:
Gad, this is worse than getting teeth pulled [:-)}--
I made the changes (I think, I've included a view of the current code below) but now I am getting the following error which doesn't seem to jibe with reality ...
"n.I.js:266 Uncaught Error: CSV files on other domains are not supported. Please use sendMethod: 'xhr' or 'auto' and serve your .csv file from the same domain as this page."
which makes absolutely no sense at all as the page's html document sits in the same directory as all the other web server pages (including index.html).
Everything is definately on the same domain!
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 google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
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 a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/cnXYDr411tQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
-- -ken burkhalter--
-- -ken burkhalter
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 google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/cnXYDr411tQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
-- -ken burkhalter
Been trying for two days to figure out how to read a CVS Table that contains Hour clo-1(x-axis) and Temperature col-2(y-axis) and make it ready to display as a scatter Chart in Google Charts.attaching my sample code to read a local (CSV) data file and make it ready to Chart .
This doesn't seem to work, although I thought it should (my data file is example.csv in the same directory folder as the page HTML code). All I get is a blank page displayed ....
<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);
/////////////function drawChart() {$.get("example.csv", function(csvString) {var arrayData = $.csv.toArrays(csvString,{onParseValue: $.csv.hooks.castToScalar}),data = new google.visualization.arrayToDataTable(arrayData),
// set chart optionsvar options = {
title: "Temperatures",
legend: 'none'};// create the chart object and draw it
var chart = new google.visualization.ScatterChart(document.getElementById('chart_div'));
chart.draw(data, options);}</script></head><body><div id="chart_div" style="width: 900px; height: 500px;"></div></body></html>