Patrick, In the JavaScript console, I see you are getting the error message: "Uncaught Error: google.charts.load() cannot be called more than once."
As it says, the current implementation of google.charts.load() can't be called more than one time in a page, so you'll have to arrange that all packages you'll need are loaded in the one call, and then don't call it again. We'll fix that in a future version, but for now, it is a limitation you'll have to live with. On Wed, Aug 19, 2015 at 10:44 AM, Patrick Beaudan <[email protected]> wrote: > Thanks very much Daniel. I tire that and other variations on that theme, > but can't make it work in one instance on our site (home page at > www.beladv.com should have this gauge, but it does not come up. > > Strangely I use the same function to create this gauge on other pages of > my site, and the gauge comes up fine. > > I have similar issues with some line charts. The same line chart functions > work on parts of the site, but no longer work on other parts. If anyone > else is having similar issues I'd appreciate a pointer. I'll research this > more and post a fix when I find what the problem was. > > > On Wednesday, August 19, 2015 at 4:20:51 AM UTC-7, Daniel Buttery wrote: >> >> This isn't tested but from what I understand you would need to modify >> your code as below: >> >> On Wednesday, 19 August 2015 03:02:14 UTC+1, Patrick Beaudan wrote: >>> >>> Does the *google.charts.load(**'41'**,* {packages: ['corechart']}); >>> work for all packages? It seems to not work for me for a gauge chart for >>> instance code below: >>> >>> google.charts.load("41", {packages:["corechart, gauge"]}); >>> google.charts.setOnLoadCallback(drawChart); >>> function drawChart() { $.ajax({ url: >>> "charts/chart_handler.php?chart=risk_return_gauge", dataType:"json", >>> success: function (jsonData) { var data = new >>> google.visualization.DataTable(jsonData); // Create our data table out of >>> JSON data loaded from server. var options = { width: 150, height: 150, >>> yellowFrom: 75, yellowTo: 100, greenFrom: 25, greenTo: 75, minorTicks: 5 }; >>> var chart = new >>> google.visualization.Gauge(document.getElementById('chart_riskReturnGauge_small')); >>> chart.draw(data, options); } }); } >>> >>> >>> >>> >>> >>> On Tuesday, July 28, 2015 at 5:11:12 AM UTC-7, Daniel LaLiberte wrote: >>>> >>>> *Introducing Frozen Google Charts* >>>> >>>> When we push out new releases of Google Charts, some of the changes are >>>> big, like entirely new chart types, but other changes are small, like >>>> enhancements to the appearance or behavior of existing charts. >>>> >>>> Many Google Chart creators fine-tune the look and feel of their charts >>>> until it's exactly what they want. Some of those users might feel more >>>> comfortable knowing that their charts will never change, regardless of what >>>> improvements we make in the future. For those users, we're proud to >>>> announce Frozen Google Charts. >>>> >>>> To load a frozen version, you must make some small changes in how you >>>> load the Google Charts packages. For example, here is the usual way >>>> of loading the stable version and drawing a 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); >>>> >>>> </script> >>>> >>>> You'll need to change your code to be like this (changes highlighted >>>> in bold): >>>> >>>> <script type="text/javascript" >>>> >>>> src="*https://www.gstatic.com/charts/loader.js* >>>> <https://www.gstatic.com/charts/loader.js>"></script> >>>> >>>> <script type="text/javascript"> >>>> >>>> *google.charts.load(**'41'**,* {packages: ['corechart']}); >>>> >>>> *google.charts.setOnLoadCallback*(drawChart); >>>> </script> >>>> >>>> >>>> Note that when you call google.charts.load(), you should not include >>>> the ‘visualization’ parameter, and the version number is a string. >>>> Only version ‘41’ is supported at this time, which corresponds to the >>>> current stable release, and additional frozen versions will be >>>> announced as we push out each new stable release. More details about >>>> using the frozen version loader will be available here >>>> <https://google-developers.appspot.com/chart/interactive/docs/library_loading_enhancements> >>>> . >>>> >>>> >>>> When you use a frozen version of Google Charts, all charts and >>>> features should work the same as for the stable version it was created >>>> from. But there are two minor, though important, limitations with >>>> loading frozen versions, which we expect to resolve in the near future. >>>> >>>> 1. You can only call google.charts.load() one time. You can >>>> instead list all the packages that you'll need in one call, so there is >>>> usually no need to make separate calls. >>>> 2. If you are using a ChartWrapper, you must explicitly load all >>>> the packages you'll need rather than relying on the ChartWrapper to >>>> automatically load them for you. >>>> >>>> We expect that frozen versions will remain available indefinitely, >>>> though we may retire frozen versions that have security concerns. We will >>>> typically not provide support for frozen versions, except to suggest >>>> upgrading to newer versions. >>>> >>>> Even if you don't plan to use the frozen version 41, it would help us >>>> if you could try it now with your charts and please let us know if you >>>> experience any problems. >>>> >>>> -- >>>> Daniel LaLiberte >>>> <https://plus.google.com/100631381223468223275?prsrc=2> - 978-394-1058 >>>> [email protected] 5CC, Cambridge MA >>>> [email protected] 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 [email protected]. > To post to this group, send email to > [email protected]. > 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/d56187d6-accb-40bd-a038-19ce7b3532ff%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/d56187d6-accb-40bd-a038-19ce7b3532ff%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> - 978-394-1058 [email protected] <[email protected]> 5CC, Cambridge MA [email protected] <[email protected]> 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 [email protected]. To post to this group, send email to [email protected]. 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/CAOtcSJNw%2Bewp9VgoJ2mpkHRtfzQw3iKd9U6ecscaMGJ8u6jB2Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
