Google Charts Embed Api Is Not Working
I'm using Embed API to include GA charts on my site from ServiceAccount. The site is a Single Page application with AngularJS. I've created several directives for every chart type
Solution 1:
I found the answer. You can try this, alternate the "gapi script"
(function (w, d, s, g, js, fs) {
if ($('#googleCache').length > 0) return;
g = w.gapi || (w.gapi = {}); g.analytics = { q: [], ready: function (f) { this.q.push(f); } };
js = d.createElement(s); fs = d.getElementsByTagName(s)[0];
js.src = 'https://apis.google.com/js/platform.js';
js.id = "googleCache";
fs.parentNode.insertBefore(js, fs); js.onload = function () { g.load('analytics'); };
}(window, document, 'script'));
Post a Comment for "Google Charts Embed Api Is Not Working"