2👍
✅
Issue comes from the async call to get the data. You start the chart initialization after this call but because it is async name
and count
will be undefined
at the time you create the chart.
Quick fix is to place the chart creation inside the success callback of the getJSON
Source:stackexchange.com