google-chart icon indicating copy to clipboard operation
google-chart copied to clipboard

Bug with line chart API

Open ORESoftware opened this issue 6 years ago • 4 comments

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:

screenshot 2018-03-05 19 48 38

ORESoftware avatar Mar 06 '18 03:03 ORESoftware

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

ORESoftware avatar Mar 06 '18 04:03 ORESoftware

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.

wesalvaro avatar Mar 09 '18 04:03 wesalvaro

+1

ORESoftware avatar Mar 09 '18 05:03 ORESoftware

You should wait for finish the request, put await or then after the request and wait it to end

AndreMendesMarcondes avatar Aug 30 '21 17:08 AndreMendesMarcondes