google-chart
google-chart copied to clipboard
Bug with line chart API
I am seeing what appears to be a bug with the line chart API: https://developers.google.com/chart/interactive/docs/gallery/linechart
here is the problem:
https://stackoverflow.com/questions/49122990/getting-cannot-read-property-vb-of-undefined-error-with-google-chart-api
the error appears to be internal to the Chart API lib:

Yeah this is a bug, this happens when Google Charts receives an empty array:
data.addRows([]);
that's something that Google Charts should handle, instead of breaking. :(
You're right that there isn't a whole lot of error checking in cases like that. It'd be a good idea to not only handle that but also add some tests for these kinds of cases.
+1
You should wait for finish the request, put await or then after the request and wait it to end