Issues moving to FrozenCharts

45 views
Skip to first unread message

Daniel Buttery

unread,
Aug 19, 2015, 9:27:31 AM8/19/15
to Google Visualization API
Hi all.

Following the imminent update I've been trying to modify a number of my pages as listed in the Frozen Charts example, and haven't been able to get any chart working.

I've modified my normal boilerplate JSFiddle which I use a a base when giving examples here and in SO with the changes made:


This results in functions being marked as undefined and is the simplest level I could get.

It is entirely possible I'm missing something obvious as I'm knackered, but any help would be appreciated.

Thanks,

Dan

Daniel LaLiberte

unread,
Aug 19, 2015, 9:39:45 AM8/19/15
to Google Visualization API
Try this instead:  https://jsfiddle.net/dlaliberte/m7o9L0eg/2/

There were several problems, but the most interesting one was that the drawChart function was not defined at the time you were calling google.charts.setOnLoadCallback, so I moved it to the end of the javascript block.  This has nothing to do with the frozen code loader, because the same problem would occur when using the google.load() call and google.setOnLoadCallback().

--
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/0d16b3d1-c45b-4d98-ae05-5e925cb52124%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
dlaliberte@Google.com   5CC, Cambridge MA
daniel.laliberte@GMail.com 9 Juniper Ridge Road, Acton MA

Daniel Buttery

unread,
Aug 19, 2015, 9:46:26 AM8/19/15
to Google Visualization API
Cheers for that. I'll see if there are any loading order fixes I can apply to my 'proper' pages, and let you know either way the result.

Daniel Buttery

unread,
Aug 20, 2015, 4:10:00 AM8/20/15
to Google Visualization API
Hi all - again, probably missed something obvious but am still having issues getting Maps to work with Frozen Charts.


Two things occur with this fiddle:
  • Filters work but seem to have lost their styling
  • After around 10 seconds the map fails to load and returns 'google[sd] is not a function'.
Any help appreciated!
A

Daniel LaLiberte

unread,
Aug 20, 2015, 8:51:43 AM8/20/15
to Google Visualization API
Hi Daniel,

The filters style is a known problem that I should have a solution for in a few hours.

The maps failure is a surprise, but it turns out that because the map chart loads map data via google.load(), you still have to load jsapi with:

<script type="text/javascript" src="//www.google.com/jsapi"></script>



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

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

Daniel Buttery

unread,
Aug 20, 2015, 9:11:48 AM8/20/15
to Google Visualization API
Thank you sir - adding the separate jsapi load did indeed resolve the issue with that fiddle. I'll do some further testing with my dashboards and if anything else crops up I'll let you know.

Thanks,

Dan
Reply all
Reply to author
Forward
0 new messages