On Ruby on Rails application Uncaught Error: google.charts.load() cannot be called more than once.

49 views
Skip to first unread message

Oleksandr Gochu

unread,
Feb 29, 2016, 9:53:24 AM2/29/16
to Google Visualization API
First of all I want to say thank you for everybody who help me with last error. 
And now I'm here one more time.
I found that one of posts is very likely on my question but it was made but in spanish, that is why I want to duplicate it in english.

Here the short explication of my problem. 
In the first loading of chart in my main-page, all works as it must be (file page_1_160229.png). But after navigating though menu of application I need return to main page and in this case the charts doesn't appear  (file page_2_160229.png) instead of in "Developer tools"

Is somebody have some ideas how I can fix it?

Regards,
Oleksandr Gochu

P.S. Because of rules of privacity I must hide the options in the menu and in the charts' axis on the attached file.


page_1_160229.png
page_2_160229.png

Daniel LaLiberte

unread,
Feb 29, 2016, 10:27:12 AM2/29/16
to Google Visualization API
Oleksandr,

The error message you are seeing is caused by calling google.charts.load more than one time within the page, as it says.  This version of the loader doesn't work that way, but it is a sign that you are probably loading the library in the wrong place.  You'll have to move the code that calls google.charts.load() and google.charts.onLoadSetCallback() to another place so that it will only be called one time when the page loads.

--
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/cbc99482-4732-4e81-a83b-55f986cb4e05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages