[visualization-api] Google Query link format
Hello, Can someone specify the format that the data source URL is suppose to be in? This is for a Google docs spreadsheet. I've tried the one shown on the API Language Reference page, but I still get a 'Request timed out' error. I'll paste the html code, and if the URL is correct, can anyone see what is wrong with the code? !DOCTYPE html html head script type=text/javascript src=https://www.google.com/jsapi;/script script type=text/javascript google.load(visualization, 1, {packages:[table]}); function initialize() { var query = new google.visualization.Query('https://docs.google.com/spreadsheets/d/1CrLw83xkUvISKTwE-etZkwUvLc_To_97af-0Sqr6RKQ/pubhtml'); var string = prompt('Enter query:'); query.setQuery(string); query.send(queryResponse); } function queryResponse(response) { if (response.isError()) { alert(response.getMessage() + response.getDetailedMessage()); return; } var data = response.getDataTable(); var table = new google.visualization.Table(document.getElementById('table_div')); alert(data); table.draw(data); } /script /head body button id='query' onclick='initialize()'Enter Query/button div id=table_div/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 google-visualization-api+unsubscr...@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.
Re: [visualization-api] Google Query link format
Hi Doreen, Your URL is the problem. As the documentation page at https://developers.google.com/chart/interactive/docs/querylanguage says, you need to add '/gviz/tq?tq=' to your URL, without the pubhtml, like this: ' https://docs.google.com/spreadsheets/d/1CrLw83xkUvISKTwE-etZkwUvLc_To_97af-0Sqr6RKQ/gviz/tq?tq= ' Here is a working version of your code: http://jsfiddle.net/dlaliberte/Ltwe7p1b/ On Wed, Jul 1, 2015 at 9:35 AM, doreent...@gmail.com wrote: Hello, Can someone specify the format that the data source URL is suppose to be in? This is for a Google docs spreadsheet. I've tried the one shown on the API Language Reference page, but I still get a 'Request timed out' error. I'll paste the html code, and if the URL is correct, can anyone see what is wrong with the code? !DOCTYPE html html head script type=text/javascript src= https://www.google.com/jsapi;/script script type=text/javascript google.load(visualization, 1, {packages:[table]}); function initialize() { var query = new google.visualization.Query(' https://docs.google.com/spreadsheets/d/1CrLw83xkUvISKTwE-etZkwUvLc_To_97af-0Sqr6RKQ/pubhtml' ); var string = prompt('Enter query:'); query.setQuery(string); query.send(queryResponse); } function queryResponse(response) { if (response.isError()) { alert(response.getMessage() + response.getDetailedMessage()); return; } var data = response.getDataTable(); var table = new google.visualization.Table(document.getElementById('table_div')); alert(data); table.draw(data); } /script /head body button id='query' onclick='initialize()'Enter Query/button div id=table_div/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 google-visualization-api+unsubscr...@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. -- Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2 - 978-394-1058 dlalibe...@google.com dlalibe...@google.com 5CC, Cambridge MA daniel.lalibe...@gmail.com daniel.lalibe...@gmail.com 9 Juniper Ridge Road, Acton MA -- 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+unsubscr...@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.
Re: [visualization-api] Google PieChart
Yes. Jon On Wed, Jul 1, 2015 at 8:17 AM, Bogdan Ghetu bogdan.ghetu...@gmail.com wrote: Hi, I am working on an statistics application and I want to use Google PieCharts. Could I use for free PieCharts if I will sell my application? Thanks! -- 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+unsubscr...@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 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+unsubscr...@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.
Re: [visualization-api] Migration to WebComponents (Polymer)
Alex, We don't plan to require use of WebComponents or Polymer, though we do try to coexist with any libraries that people may use within their pages. The current API doesn't require all that much JavaScript for most applications, and it is mostly declarative JSON-like structures. If you use a ChartWrapper, there is very little JavaScript you still have to write: https://developers.google.com/chart/interactive/docs/drawing_charts#chartwrapper We do plan to continue with this general strategy of making it easier to deploy charts. On Wed, Jul 1, 2015 at 5:57 AM, Alex M alexander.ma...@gmail.com wrote: The charts API is very javascript intense. Do you have any plans to migrate to WebComponents or even integrate with Polymer? -- 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+unsubscr...@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. -- Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2 - 978-394-1058 dlalibe...@google.com dlalibe...@google.com 5CC, Cambridge MA daniel.lalibe...@gmail.com daniel.lalibe...@gmail.com 9 Juniper Ridge Road, Acton MA -- 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+unsubscr...@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.
[visualization-api] Google PieChart
Hi, I am working on an statistics application and I want to use Google PieCharts. Could I use for free PieCharts if I will sell my application? Thanks! -- 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+unsubscr...@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.
Re: [visualization-api] Two queries in one chart
I added: function AddKeyColumn(arr) { arr.addColumn('string', 'key'); arr.Lf.forEach(function(element, index, array) { var datatimeString = element.c[0].v; arr.setCell(index, 2, datatimeString.slice(-2)); }); } And changed: var edata = data = new google.visualization.data.join(dataArray[0], dataArray[1], 'full', [ [2, 2] ], [1], [1]); Now it works. Thanks for your help!! On Tuesday, June 30, 2015 at 2:30:30 PM UTC+2, Daniel LaLiberte wrote: Hi Mark, I don't think it would work to mix string and number values on the same domain axis. It looks like what you should be using for both is datetime, if I understand how you have encoded the values. Also, the values should not be given as strings as you have done, but should use the recognized string notation described here: https://developers.google.com/chart/interactive/docs/datesandtimes#dates-and-times-using-the-date-string-representation-- Finally, the order of the columns may make a difference, especially for what is shown in tooltips. Each domain column should be followed by the series columns that apply to it, like this: [ {type: 'datetime', role: 'domain', label:ga:dateHour 2014}, {type: 'number', label:ga:transactions}, {type: 'datetime', role: 'domain', label:ga:dateHour 2015}, {type: 'number', label:ga:transactions} ] On Tue, Jun 30, 2015 at 5:49 AM, Mark mark@gmail.com javascript: wrote: It would be something like adding: edata.addColumn({type:'string', role:'domain'}); edata.addColumn({type:'number', role:'domain'}); ? On Tuesday, June 30, 2015 at 10:17:51 AM UTC+2, Mark wrote: Hello Daniel, Thanks for your reply. I read the domain roles documentation but I don't really understand how to apply it to my code. Could you help me out with this, or give me a start? Thanks! On Monday, June 29, 2015 at 4:25:30 PM UTC+2, Daniel LaLiberte wrote: Hey Mark, With two sets of similar domain values, shifted by a year, you probably want to use the 'domain' role for the second set. See https://developers.google.com/chart/interactive/docs/roles for how to do this. On Mon, Jun 29, 2015 at 5:51 AM, Mark mark@gmail.com wrote: Hi Sergey, Thanks for your reply. I tried using the join method. And it works. But since the date in the frist query is not the same as in the second query it doesn't display the areachart like I want it to. Is there any way I could change this? What I want is to compare today's transactions to the transactions 364 days ago. What I've got: http://s11.postimg.org/4jb4kqsb7/chart1.png What I want: http://s17.postimg.org/5f3vqas3j/chart2.png My code: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html head meta http-equiv=content-type content=text/html; charset=UTF-8 titletest_join/title /title script type=text/javascript src=//www.google.com/jsapi/script script type=text/javascript function drawChart() { // create an array containing one false for each query var ready = [false, false]; // create an array to hold the DataTables var dataArray = []; function handleQueryResponse(response, index) { if (response.isError()) { alert('Error in query ' + index + ': ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } ready[index] = true; dataArray[index] = response.getDataTable(); var allReady = true; // check if all the queries have returned for (var i = 0; i ready.length; i++) { if (!ready[i]) { allReady = false; break; } } // if all the queries have returned, draw the charts and tables if (allReady) { var options = { title: 'test', legend: {position: 'bottom'}, interpolateNulls: true, hAxis: { title: 'Date', titleTextStyle: { color: 'red' }, }, }; var edata = data = new google.visualization.data.join(dataArray[0], dataArray[1], 'full', [[0, 0]], [1], [1]); var tables = []; tables[0] = new google.visualization.Table(document.getElementById('table_div0')); tables[0].draw(dataArray[0]); tables[1] = new google.visualization.Table(document.getElementById('table_div1')); tables[1].draw(edata); var charts = []; charts[0] = new google.visualization.AreaChart(document.getElementById('visualization0'));
Re: [visualization-api] Google Query link format
Thank you very much. On Wednesday, July 1, 2015 at 10:12:29 AM UTC-4, Daniel LaLiberte wrote: Hi Doreen, Your URL is the problem. As the documentation page at https://developers.google.com/chart/interactive/docs/querylanguage says, you need to add '/gviz/tq?tq=' to your URL, without the pubhtml, like this: ' https://docs.google.com/spreadsheets/d/1CrLw83xkUvISKTwE-etZkwUvLc_To_97af-0Sqr6RKQ/gviz/tq?tq= ' Here is a working version of your code: http://jsfiddle.net/dlaliberte/Ltwe7p1b/ On Wed, Jul 1, 2015 at 9:35 AM, doree...@gmail.com javascript: wrote: Hello, Can someone specify the format that the data source URL is suppose to be in? This is for a Google docs spreadsheet. I've tried the one shown on the API Language Reference page, but I still get a 'Request timed out' error. I'll paste the html code, and if the URL is correct, can anyone see what is wrong with the code? !DOCTYPE html html head script type=text/javascript src= https://www.google.com/jsapi;/script script type=text/javascript google.load(visualization, 1, {packages:[table]}); function initialize() { var query = new google.visualization.Query(' https://docs.google.com/spreadsheets/d/1CrLw83xkUvISKTwE-etZkwUvLc_To_97af-0Sqr6RKQ/pubhtml' ); var string = prompt('Enter query:'); query.setQuery(string); query.send(queryResponse); } function queryResponse(response) { if (response.isError()) { alert(response.getMessage() + response.getDetailedMessage()); return; } var data = response.getDataTable(); var table = new google.visualization.Table(document.getElementById('table_div')); alert(data); table.draw(data); } /script /head body button id='query' onclick='initialize()'Enter Query/button div id=table_div/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 google-visualization-api+unsubscr...@googlegroups.com javascript:. To post to this group, send email to google-visua...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2 - 978-394-1058 dlali...@google.com javascript: 5CC, Cambridge MA daniel.l...@gmail.com javascript: 9 Juniper Ridge Road, Acton MA -- 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+unsubscr...@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.
Re: [visualization-api] How to enable Data Markers on Barcharts?
Since you're asking about chm, that suggests you're using Image Charts, which are limited compared to the interactive Google Charts. Information on how to annotate bars in Google Charts is here: https://developers.google.com/chart/interactive/docs/gallery/barchart#labeling-bars Jon On Tue, Jun 30, 2015 at 2:38 PM, Harish Koushik s.harishkous...@gmail.com wrote: Hi Users, Can you please let me know how to enable data points on Bar charts? I used the parameter chm to enable Data pointers but it is not displaying the desired points. Regards, Koushik -- 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+unsubscr...@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 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+unsubscr...@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.
Re: [visualization-api] [Event Listeners] IE 8 Support?
Christian, We would actually like to drop support for IE8, though we are continuing to support it as long as it is not too difficult. The addListener method *should* work, and I don't know why it is failing. It might be the particular event you are listening for in the particular chart, so if you could provide details, and even better, an example that shows the problem, that would help us narrow this down more quickly. I'm curious if you actually have IE8 users who are finding problems, or if you are just finding errors in testing on that platform. On Wed, Jul 1, 2015 at 10:19 AM, Christian Alexander c...@njit.edu wrote: Hey everyone, I couldn't find a definitive answer doing some board digging- I was wondering if the addListener method (part of Events) works on IE 8. I'm pretty sure the answer to this is no (as I have a ready listener that doesn't fire when viewing on IE 8, but works across other browsers). Is there any possible way to get the addListener method to work on IE 8? Thanks Regards, Christian -- 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+unsubscr...@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. -- Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2 - 978-394-1058 dlalibe...@google.com dlalibe...@google.com 5CC, Cambridge MA daniel.lalibe...@gmail.com daniel.lalibe...@gmail.com 9 Juniper Ridge Road, Acton MA -- 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+unsubscr...@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.
Re: [visualization-api] [Event Listeners] IE 8 Support?
Daniel, I realized it wasn't a problem with the Event Listener. I tried to delete the message as there shouldn't be a problem with the listeners on IE 8. From what I gained out of the problem, it was a problem with VML drawing the charts. I ultimately decided to ignore it as I don't anticipate using IE 8 to look at my graphs (but I was trying to have support for all browsers, just as practice for developing real-world applications). Thanks again for providing great support :) On Wednesday, July 1, 2015 at 12:07:20 PM UTC-4, Daniel LaLiberte wrote: Christian, We would actually like to drop support for IE8, though we are continuing to support it as long as it is not too difficult. The addListener method *should* work, and I don't know why it is failing. It might be the particular event you are listening for in the particular chart, so if you could provide details, and even better, an example that shows the problem, that would help us narrow this down more quickly. I'm curious if you actually have IE8 users who are finding problems, or if you are just finding errors in testing on that platform. On Wed, Jul 1, 2015 at 10:19 AM, Christian Alexander cg...@njit.edu javascript: wrote: Hey everyone, I couldn't find a definitive answer doing some board digging- I was wondering if the addListener method (part of Events) works on IE 8. I'm pretty sure the answer to this is no (as I have a ready listener that doesn't fire when viewing on IE 8, but works across other browsers). Is there any possible way to get the addListener method to work on IE 8? Thanks Regards, Christian -- 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+unsubscr...@googlegroups.com javascript:. To post to this group, send email to google-visua...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- Daniel LaLiberte https://plus.google.com/100631381223468223275?prsrc=2 - 978-394-1058 dlali...@google.com javascript: 5CC, Cambridge MA daniel.l...@gmail.com javascript: 9 Juniper Ridge Road, Acton MA -- 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+unsubscr...@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.
[visualization-api] MySQL database connect
Hi guys! There is a possibility to connect the graphics MySql database? And if there as I can do it ? Thanks in advance -- 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+unsubscr...@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.
[visualization-api] Defer loading google charts
I have this google charts code which works fine: script type=text/javascript src=https://www.google.com/jsapi;/script script type=text/javascript async google.load(visualization, 1, {packages:[corechart]}); var t1 = 'IndexTitle' var t2 = 'IndicatorTitle' google.setOnLoadCallback(function(){drawChart1(t1)}); google.setOnLoadCallback(function(){drawChart2(t2)}); function drawChart1(t){ var data = new google.visualization.DataTable(); data.addColumn('string','Date'); data.addColumn('number','Close'); data.addColumn({type: 'string', role: 'tooltip'}); data.addRows([ChartIndexData...]); var options = { title: t, colors:['black'], legend: {position: 'none'}, chartArea:{left:60,top:20,width:'90%',height:'90%'} }; var chart = new google.visualization.LineChart(document.getElementById('chart1_div')); chart.draw(data, options); } function drawChart2(t){ var data = new google.visualization.DataTable(); data.addColumn('string', 'Date'); data.addColumn('number', ''); data.addColumn({type: 'string', role: 'tooltip'}); data.addRows([ChartIndicatorData...]); var options = { title: t, legend: {position: 'none'}, chartArea:{left:60,top:20,width:'90%',height:'60%'} }; var chart = new google.visualization.LineChart(document.getElementById('chart2_div')); chart.draw(data, options); }% /script The problem is when I test the page on Google PageSpeed insite the score is 49/100 because of the script above: Remove render-blocking JavaScript:https://www.google.com/jsapi https://www.google.com/…ile=visualizationv=1packages=corechart https://www.google.com/…at+en,default+en,ui+en,corechart+en.I.js Optimize CSS Delivery of the following: https://www.google.com/…bdd6ab2d343a51d49841bf93d022fb/ui+en.css https://ajax.googleapis.com/…static/modules/gviz/1.0/core/tooltip.css As I understand I have to load javascript Asynchronous or defer the loading. How do I fix it. -- 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+unsubscr...@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.