[visualization-api] Re: Official documentation on how to include multiple charts on the same page?
I am glad. -- 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] Re: Official documentation on how to include multiple charts on the same page?
Noted. I'll put it in the docs when I get a chance. Thanks for the suggestion! Jon On Fri, Aug 1, 2014 at 2:03 PM, WhoSoLovesUs d...@rvt.com wrote: Hi, ok I got it working ... thanks so much for sharing this :) Something like this would be handy to have in the Google Charts documentation somewhere, as I've seen it is a commonly asked question On Thursday, July 31, 2014 9:17:50 PM UTC-7, Andrew Gallant wrote: There are many ways to include multiple charts on the same page. The thing they all share in common are that each chart has to have a unique container div, so if I create 3 charts on a page, I might put them in 3 container divs with id's chart1, chart2, and chart3. You can separate out the code for each chart into its own function, or you can combine them all together, eg: function drawCharts () { // code to draw chart1 // code to draw chart2 // code to draw chart3 } google.load('visualization', '1', {packages: ['corechart'], callback: drawCharts}); is functionally equivalent to: function drawChart1 () { // code to draw chart1 } function drawChart2 () { // code to draw chart2 } function drawChart3 () { // code to draw chart3 } function drawCharts () { drawChart1(); drawChart2(); drawChart3(); } google.load('visualization', '1', {packages: ['corechart'], callback: drawCharts}); Is that what you are looking for? On Thursday, July 31, 2014 5:46:24 PM UTC-4, WhoSoLovesUs wrote: Hi, To someone familiar and comfortable with javascript this may seem like an easy task... But I'd like to put three charts on the same web page Is there any official documentation from Google about what to do in this case? I've looked online a fair bit; the problem is that every individual solution looks a little different to my eyes (not surprisingly) Thanks, basically I'm looking for some hand holding and explanation here :) -- 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.
[visualization-api] Re: Official documentation on how to include multiple charts on the same page?
Hi Andrew, Thanks for sharing; I'm not quite there with your example though. Please see my code, which is just the example area chart code from the Google I'd just like three of the same chart: script type=text/javascript src=https://www.google.com/jsapi;/script script type=text/javascript google.load(visualization, 1, {packages:[corechart]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Date', 'Impressions'], ['2014-07-01', 1850], ['2014-07-02', 1950], ['2014-07-03', 2100], ['2014-07-04', 1900], ['2014-07-05', 2000], ['2014-07-06', 2170], ['2014-07-07', 1660], ['2014-07-08', 2030], ['2014-07-09', 2130], ['2014-07-10', 2230] ]); var options = { hAxis: {textPosition: 'none'}, vAxis: { textPosition: 'none', gridlines: {color:'transparent'}, baselineColor:'transparent', minValue: 0 }, theme: 'maximized', legend: 'none' }; var chart = new google.visualization.AreaChart(document.getElementById('chart_div')); chart.draw(data, options); } /script On Thursday, July 31, 2014 9:17:50 PM UTC-7, Andrew Gallant wrote: There are many ways to include multiple charts on the same page. The thing they all share in common are that each chart has to have a unique container div, so if I create 3 charts on a page, I might put them in 3 container divs with id's chart1, chart2, and chart3. You can separate out the code for each chart into its own function, or you can combine them all together, eg: function drawCharts () { // code to draw chart1 // code to draw chart2 // code to draw chart3 } google.load('visualization', '1', {packages: ['corechart'], callback: drawCharts}); is functionally equivalent to: function drawChart1 () { // code to draw chart1 } function drawChart2 () { // code to draw chart2 } function drawChart3 () { // code to draw chart3 } function drawCharts () { drawChart1(); drawChart2(); drawChart3(); } google.load('visualization', '1', {packages: ['corechart'], callback: drawCharts}); Is that what you are looking for? On Thursday, July 31, 2014 5:46:24 PM UTC-4, WhoSoLovesUs wrote: Hi, To someone familiar and comfortable with javascript this may seem like an easy task... But I'd like to put three charts on the same web page Is there any official documentation from Google about what to do in this case? I've looked online a fair bit; the problem is that every individual solution looks a little different to my eyes (not surprisingly) Thanks, basically I'm looking for some hand holding and explanation here :) -- 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] Re: Official documentation on how to include multiple charts on the same page?
Hi Saji, not too sure what I'm looking at here (though I notice there are multiple charts on the same page) On Thursday, July 31, 2014 5:29:40 PM UTC-7, Saji Antony wrote: May be you could check my hobby project view-source:http://www.smart-earn.com/fundamentals/p/summary/3201 and an example of json data http://www.smart-earn.com/gj/8/3201 -- 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] Re: Official documentation on how to include multiple charts on the same page?
Hi, ok I got it working ... thanks so much for sharing this :) Something like this would be handy to have in the Google Charts documentation somewhere, as I've seen it is a commonly asked question On Thursday, July 31, 2014 9:17:50 PM UTC-7, Andrew Gallant wrote: There are many ways to include multiple charts on the same page. The thing they all share in common are that each chart has to have a unique container div, so if I create 3 charts on a page, I might put them in 3 container divs with id's chart1, chart2, and chart3. You can separate out the code for each chart into its own function, or you can combine them all together, eg: function drawCharts () { // code to draw chart1 // code to draw chart2 // code to draw chart3 } google.load('visualization', '1', {packages: ['corechart'], callback: drawCharts}); is functionally equivalent to: function drawChart1 () { // code to draw chart1 } function drawChart2 () { // code to draw chart2 } function drawChart3 () { // code to draw chart3 } function drawCharts () { drawChart1(); drawChart2(); drawChart3(); } google.load('visualization', '1', {packages: ['corechart'], callback: drawCharts}); Is that what you are looking for? On Thursday, July 31, 2014 5:46:24 PM UTC-4, WhoSoLovesUs wrote: Hi, To someone familiar and comfortable with javascript this may seem like an easy task... But I'd like to put three charts on the same web page Is there any official documentation from Google about what to do in this case? I've looked online a fair bit; the problem is that every individual solution looks a little different to my eyes (not surprisingly) Thanks, basically I'm looking for some hand holding and explanation here :) -- 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] Re: Official documentation on how to include multiple charts on the same page?
May be you could check my hobby project view-source:http://www.smart-earn.com/fundamentals/p/summary/3201 and an example of json data http://www.smart-earn.com/gj/8/3201 -- 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] Re: Official documentation on how to include multiple charts on the same page?
There are many ways to include multiple charts on the same page. The thing they all share in common are that each chart has to have a unique container div, so if I create 3 charts on a page, I might put them in 3 container divs with id's chart1, chart2, and chart3. You can separate out the code for each chart into its own function, or you can combine them all together, eg: function drawCharts () { // code to draw chart1 // code to draw chart2 // code to draw chart3 } google.load('visualization', '1', {packages: ['corechart'], callback: drawCharts}); is functionally equivalent to: function drawChart1 () { // code to draw chart1 } function drawChart2 () { // code to draw chart2 } function drawChart3 () { // code to draw chart3 } function drawCharts () { drawChart1(); drawChart2(); drawChart3(); } google.load('visualization', '1', {packages: ['corechart'], callback: drawCharts}); Is that what you are looking for? On Thursday, July 31, 2014 5:46:24 PM UTC-4, WhoSoLovesUs wrote: Hi, To someone familiar and comfortable with javascript this may seem like an easy task... But I'd like to put three charts on the same web page Is there any official documentation from Google about what to do in this case? I've looked online a fair bit; the problem is that every individual solution looks a little different to my eyes (not surprisingly) Thanks, basically I'm looking for some hand holding and explanation here :) -- 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.