Code No Longer Works: b is undefined/Cannot read property 'd' of undefined

114 views
Skip to first unread message

Sean Noble

unread,
Sep 19, 2020, 11:53:38 AM9/19/20
to Google Visualization API
This code has worked without issue and now a few days ago it stopped? There is nothing in the error log and just on the div itself in Chrome it says "Cannot read property 'd' of undefined" and Firefox says "b is undefined".


<div id="curve_chart"></div>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>

<script type="text/javascript">
google.charts.load('current', {'packages':['corechart', 'line']});
google.charts.setOnLoadCallback(drawChart);

function drawChart() {
var data = google.visualization.arrayToDataTable([
["Day", "New Signups (Week of Sep 14th)"],
['Mon', 148],
['Tue', 128],
['Wed', 133],
['Thu', 128],
['Fri', 133],
['Sat', 48],
['Sun', 0]
]);




var options = {
title: 'Company Performance',
//curveType: 'function',
legend: { position: 'bottom' }
};

var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));

chart.draw(data, options);

}

</script>  

Daniel LaLiberte

unread,
Sep 19, 2020, 12:50:16 PM9/19/20
to Google Visualization API
It's working fine for me:   https://jsfiddle.net/dlaliberte/hsuft0k1/
Can you point to your web page, in case there is something different about it?

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/3e5d0e2e-faf1-48f5-85ee-df63dab9a02dn%40googlegroups.com.


--

Sean Noble

unread,
Sep 19, 2020, 1:44:07 PM9/19/20
to Google Visualization API
I just put the entire webpage in a fiddle and it worked fine. Maybe the domain was banned from using it? Is there any restrictions on using it, I thought there was only restrictions on having it displayed on their gallery. I have used other Google APIs like translate with no problems on this domain.

Daniel LaLiberte

unread,
Sep 19, 2020, 2:21:35 PM9/19/20
to Google Visualization API
Are you asking if the gstatic.com domain was banned?  That's where the loader and all of the Google Charts API is loaded from.

The error you reported suggests that you are getting a mix of different incompatible versions, perhaps due to caching, or something else going on in your web page or browser.

You don't need both 'corechart' and 'line' by the way.  You are using LineChart, which is a corechart, whereas the material chart called 'Line' is in the 'line' package.  This shouldn't cause any version conflict, however, so the error makes me suspicious of what else is going on.  

Sean Noble

unread,
Sep 19, 2020, 2:56:25 PM9/19/20
to Google Visualization API
No, I mean I wonder if my domain is banned from using this. Is there a way to check if my domain was banned?

Daniel LaLiberte

unread,
Sep 19, 2020, 3:43:07 PM9/19/20
to Google Visualization API
Check in your browser's debugger to see what is coming in over the network when you try to load the page.

Sean Noble

unread,
Sep 19, 2020, 3:58:41 PM9/19/20
to Google Visualization API
There's nothing regarding the charts. 

DevTools failed to load SourceMap: Could not load content for chrome-extension://liecbddmkiiihnedobmlmillhodjkdmb/js/content.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for chrome-extension://liecbddmkiiihnedobmlmillhodjkdmb/js/intercom-link-expand-loader.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
contentscript.bundle.js:85 successfully updated user preferred location
contentscript.bundle.js:116 User saved

Sean Noble

unread,
Sep 19, 2020, 11:13:28 PM9/19/20
to Google Visualization API
Just wanted to post an update, it was because of mootools and 49 and later being incompatible, I just changed the version to 48 and it works fine now. Thanks!

https://github.com/google/google-visualization-issues/issues/2849
Reply all
Reply to author
Forward
0 new messages