<div id='div_46133_11159_RET_24832316219'></div> <script type='text/javascript'> google.setOnLoadCallback(drawgraphs_46133_11159_24832316219); function drawgraphs_46133_11159_24832316219 () { // debugger here helps var conversiongraph_data = new google.visualization.DataTable(); conversiongraph_data.addColumn('number', 'time_slot'); conversiongraph_data.addColumn('number', 'Group'); conversiongraph_data.addColumn('number', 'Control'); conversiongraph_data.addColumn('number', 'Traffic volume'); conversiongraph_data.addRows([ [-126,1.308,1.220, 47363 ] , [-102,1.509,1.446, 43549 ] , [-78,1.274,1.352, 43467 ] , [-54,1.329,1.405, 44394 ] , [-30,1.106,1.099, 34343 ] , [-6,1.292,1.322, 6071 ] ]); var options = { chart: { title: 'conversion rate' }, width: 1200, height: 300, axes: { y:{ Conv: {label: 'conversion rate %'}, Vol: {label:'Volume (sessions)'} } }, series: { // Gives each series an axis name that matches the Y-axis below. 0: {axis: 'Conv'}, 1: {axis: 'Conv'}, 2: {axis: 'Vol'} }, colors: ['red', 'blue', 'lightgray'] }; var chart = new google.charts.Line(document.getElementById('div_46133_11159_RET_24832316219')); // material chart style chart.draw(conversiongraph_data, options); } </script> <div id='div_46133_11159_RET_18779513343'></div> <script type='text/javascript'> google.setOnLoadCallback(drawgraphs_46133_11159_18779513343); function drawgraphs_46133_11159_18779513343 () { // debugger here helps var conversiongraph_data = new google.visualization.DataTable(); conversiongraph_data.addColumn('number', 'time_slot'); conversiongraph_data.addColumn('number', 'Group'); conversiongraph_data.addColumn('number', 'Control'); conversiongraph_data.addColumn('number', 'Traffic volume'); conversiongraph_data.addRows([ [-126,8.291,8.106, 47363 ] , [-102,8.529,8.612, 43549 ] , [-78,8.638,8.664, 43467 ] , [-54,9.006,9.310, 44394 ] , [-30,8.525,8.762, 34343 ] , [-6,9.164,9.201, 6071 ] ]); var options = { chart: { title: 'Add to cart' }, width: 1200, height: 300, axes: { y:{ Conv: {label: 'Add to cart %'}, Vol: {label:'Volume (sessions)'} } }, series: { // Gives each series an axis name that matches the Y-axis below. 0: {axis: 'Conv'}, 1: {axis: 'Conv'}, 2: {axis: 'Vol'} }, colors: ['red', 'blue', 'lightgray'] }; var chart = new google.charts.Line(document.getElementById('div_46133_11159_RET_18779513343')); // material chart style chart.draw(conversiongraph_data, options); } </script>
It seems to me that the google.setOnLoadCallback was not used correctly here.
It's just that it started acting like it should.
This callback is called one time, when the google library are loaded. And not when each scripts are loaded.
However, the fact that we cannot use it to know the Googles libs loading state is not useful !
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/fb7fda69-9b77-45f0-8969-fe5f73007f98%40googlegroups.com.
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-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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/81c73156-69e1-475e-a537-87915bc71041%40googlegroups.com.