Hello,
I am getting the google api key error for my google chart maps.
I am fetching data from which I am displaying a variety of charts. This meant that I needed to be able to load the google api and set a callback and pass the callback the data I just got from the ajax.
google.load('visualization', '1.0', {'packages':['corechart','bar','table','controls','map'] , "callback" : function()
{
buildCharts(data);
}
});
I wasn't able to pass data using the way described in the documentation.
google.charts.setOnLoadCallback(drawChart);
... which is why instead I included the jsapi and then loaded the visualization module that way. This seemed to be the only way I can both specify a callback and also give that callback data.
But now I have the API key error and I read that I need to use v45 or "upcoming". This doesn't appear to be a valid setting for version when loading the google visualization module in this way. And it also doesn't seem to be using the <mapsApiKey> param.
Is there a way for me to do a callback and also pass data using "setOnLoadCallback" so that I can load the google charts using:
google.charts.load('43', {packages: ['corechart']});??? Or can someone help me figure out the correct way for me to call the module, tell it what version to use and give it an api key?
Thank you!