Help needed on publishing 3 charts on the same HTML Page

45 views
Skip to first unread message

Fernando Labombarda

unread,
Mar 18, 2016, 3:25:46 PM3/18/16
to Google Visualization API
Hello everyone, 

I need some help to identify what is wrong. Basically I need to publish 3 charts on 1 HTML page.
Is working fine for the first 2 (line chart) but the 3rd one is Gauge, it doesn't come up and I can't find the reason.
The page can be visualized from here: http://flabombarda.net16.net/view.php

Can someone with better experience help me identifying what is wrong ?

What is curious is the fact that if I put the code of the 3rd one on a separated HTML, without the other 2, it works, so looks like there is a naming conflict that I cannot find.
I already renamed the function drawChart (like I did for the previous charts) but still not working.

Any help would be appreciated.

Sergey Grabkovsky

unread,
Mar 18, 2016, 3:44:27 PM3/18/16
to Google Visualization API
Hello Fernando,

Your issue is that you're including the loader.js script multiple times and calling google.charts.load multiple times. You should not include loader.js multiple times under any circumstances. However, the multiple google.charts.load call issue should be fixed in a subsequent release. In the meantime, change your first google.charts.load call to include all your packages.

--
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/b2906428-da46-4f80-aa2d-01ddf9272002%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

gra...@google.com


Daniel LaLiberte

unread,
Mar 18, 2016, 3:48:09 PM3/18/16
to Google Visualization API

Fernando Labombarda

unread,
Mar 18, 2016, 3:55:00 PM3/18/16
to Google Visualization API
Thanks for the very quick feedback pointing the issue.
It makes sense, I reviewed the page you sent with the details, but in my Case I have 2 different charts, line and another one Gauge.
I don't know how to workaround this, the example of the link you sent mention 2 charts from the same type, so they can "share" the same google.carts.load() function.

Any clue ?

Many thanks again !


On Friday, March 18, 2016 at 4:44:27 PM UTC-3, Sergey wrote:
Hello Fernando,

Your issue is that you're including the loader.js script multiple times and calling google.charts.load multiple times. You should not include loader.js multiple times under any circumstances. However, the multiple google.charts.load call issue should be fixed in a subsequent release. In the meantime, change your first google.charts.load call to include all your packages.

On Fri, Mar 18, 2016 at 3:25 PM Fernando Labombarda <flabo...@gmail.com> wrote:
Hello everyone, 

I need some help to identify what is wrong. Basically I need to publish 3 charts on 1 HTML page.
Is working fine for the first 2 (line chart) but the 3rd one is Gauge, it doesn't come up and I can't find the reason.
The page can be visualized from here: http://flabombarda.net16.net/view.php

Can someone with better experience help me identifying what is wrong ?

What is curious is the fact that if I put the code of the 3rd one on a separated HTML, without the other 2, it works, so looks like there is a naming conflict that I cannot find.
I already renamed the function drawChart (like I did for the previous charts) but still not working.

Any help would be appreciated.

--
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+unsub...@googlegroups.com.

Sergey Grabkovsky

unread,
Mar 18, 2016, 3:56:46 PM3/18/16
to Google Visualization API
Fernando,

You can specify multiple packages in your google.charts.load function like so: google.charts.load('current', {'packages':['corechart', 'gauge']});
You should still be able to keep the multiple google.charts.setOnLoadCallback calls, but I would recommend that you combine your drawChart functions into one instead of doing that.

On Fri, Mar 18, 2016 at 3:55 PM Fernando Labombarda <flabo...@gmail.com> wrote:
Thanks for the very quick feedback pointing the issue.
It makes sense, I reviewed the page you sent with the details, but in my Case I have 2 different charts, line and another one Gauge.
I don't know how to workaround this, the example of the link you sent mention 2 charts from the same type, so they can "share" the same google.carts.load() function.

Any clue ?

Many thanks again !


On Friday, March 18, 2016 at 4:44:27 PM UTC-3, Sergey wrote:
Hello Fernando,

Your issue is that you're including the loader.js script multiple times and calling google.charts.load multiple times. You should not include loader.js multiple times under any circumstances. However, the multiple google.charts.load call issue should be fixed in a subsequent release. In the meantime, change your first google.charts.load call to include all your packages.

On Fri, Mar 18, 2016 at 3:25 PM Fernando Labombarda <flabo...@gmail.com> wrote:
Hello everyone, 

I need some help to identify what is wrong. Basically I need to publish 3 charts on 1 HTML page.
Is working fine for the first 2 (line chart) but the 3rd one is Gauge, it doesn't come up and I can't find the reason.
The page can be visualized from here: http://flabombarda.net16.net/view.php

Can someone with better experience help me identifying what is wrong ?

What is curious is the fact that if I put the code of the 3rd one on a separated HTML, without the other 2, it works, so looks like there is a naming conflict that I cannot find.
I already renamed the function drawChart (like I did for the previous charts) but still not working.

Any help would be appreciated.

--
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.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

gra...@google.com


--
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.

For more options, visit https://groups.google.com/d/optout.

Fernando Labombarda

unread,
Mar 18, 2016, 4:10:19 PM3/18/16
to Google Visualization API
Hi Sergey, 

Problem solved after loading gauge also, I'll work now on your recommendation to keep it cleaner!

Many thanks for your help !


On Friday, March 18, 2016 at 4:56:46 PM UTC-3, Sergey wrote:
Fernando,

You can specify multiple packages in your google.charts.load function like so: google.charts.load('current', {'packages':['corechart', 'gauge']});
You should still be able to keep the multiple google.charts.setOnLoadCallback calls, but I would recommend that you combine your drawChart functions into one instead of doing that.

On Fri, Mar 18, 2016 at 3:55 PM Fernando Labombarda <flabo...@gmail.com> wrote:
Thanks for the very quick feedback pointing the issue.
It makes sense, I reviewed the page you sent with the details, but in my Case I have 2 different charts, line and another one Gauge.
I don't know how to workaround this, the example of the link you sent mention 2 charts from the same type, so they can "share" the same google.carts.load() function.

Any clue ?

Many thanks again !


On Friday, March 18, 2016 at 4:44:27 PM UTC-3, Sergey wrote:
Hello Fernando,

Your issue is that you're including the loader.js script multiple times and calling google.charts.load multiple times. You should not include loader.js multiple times under any circumstances. However, the multiple google.charts.load call issue should be fixed in a subsequent release. In the meantime, change your first google.charts.load call to include all your packages.

On Fri, Mar 18, 2016 at 3:25 PM Fernando Labombarda <flabo...@gmail.com> wrote:
Hello everyone, 

I need some help to identify what is wrong. Basically I need to publish 3 charts on 1 HTML page.
Is working fine for the first 2 (line chart) but the 3rd one is Gauge, it doesn't come up and I can't find the reason.
The page can be visualized from here: http://flabombarda.net16.net/view.php

Can someone with better experience help me identifying what is wrong ?

What is curious is the fact that if I put the code of the 3rd one on a separated HTML, without the other 2, it works, so looks like there is a naming conflict that I cannot find.
I already renamed the function drawChart (like I did for the previous charts) but still not working.

Any help would be appreciated.

--
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+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

gra...@google.com


--
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+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages