Since the Embed API appears to still be depending on the old loader, I
wonder what would happen if you just add the following to your code, after
loading the new loader.

    <script type="text/javascript"
src="https://www.gstatic.com/charts/loader.js";></script>
    <script type="text/javascript">
      google.load = google.load || google.charts.load;

      google.setOnLoadCallback = google.setOnLoadCallback ||
google.charts.setOnLoadCallback;

      ...

That way, google.load will be defined.  In recent versions of the loader, I
made it work with the old loader arguments as well.


On Thu, Feb 16, 2017 at 9:27 AM, Francesco Moglia <[email protected]>
wrote:

> I was wondering how to implement both api's in the same document.
>
> I have a dashboard where i need both chart to display some data and embed
> api to display data directly from google analytics.
>
>
> What i'm trying to do is displaying both this code https://ga-dev-tools.
> appspot.com/embed-api/basic-dashboard/ and this https://google-
> developers.appspot.com/chart/interactive/docs/quick_start
>
> since trying to do this is throwing thi error:
>
> Uncaught TypeError: window.google.load is not a function
>     at g (cb=gapi.loaded_0:890)
>     at fV (cb=gapi.loaded_0:890)
>     at IP._.k.iba (cb=gapi.loaded_0:906)
>     at _.fp._.k.q0 (cb=gapi.loaded_0:491)
>     at _.du.Vh (cb=gapi.loaded_0:734)
>     at cb=gapi.loaded_0:896
>     at h.r2 (cb=gapi.loaded_0:79)
>     at xs (cb=gapi.loaded_0:82)
>     at Wq (cb=gapi.loaded_0:82)
>     at _.C.uea (cb=gapi.loaded_0:81)
>
>
> Thanks in advance
>
> --
> 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 google-visualization-api@
> 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/dfa85c1d-b386-44d1-b109-
> 9c25db47392a%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/dfa85c1d-b386-44d1-b109-9c25db47392a%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>
[email protected] <[email protected]>   5CC, Cambridge 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 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/CAOtcSJNmu8%3DKtZOu868pVtQ_-%3DRSG4DPU8judF58tte8dhuVYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to