We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproduce
(async () => { const drawChart = ` var container = document.getElementById('chart_div');const data = google.visualization.arrayToDataTable([['Country', 'Popularity'],['Germany', 200],['United States', 300],['Brazil', 400],['Canada', 500],['France', 600],['RU', 700] ]);var options={};var chart = new google.visualization.GeoChart(container);chart.draw(data, options); `; const image = await GoogleChartsNode.render(drawChart, { width: 400, height: 300, package: 'geochart' }); fs.writeFileSync('/tmp/google-chart.png', image); })();
The text was updated successfully, but these errors were encountered:
@typpo Any thoughts on this? I'm experiencing the same issue
Python example, inspired by: https://developers.google.com/chart/interactive/docs/gallery/geochart
import requests code = ''' var container = document.getElementById('geochart'); var chart = new google.visualization.GeoChart(container); var data = google.visualization.arrayToDataTable([ ['Country', 'Popularity'], ['Germany', 200], ['United States', 300], ['Brazil', 400], ['Canada', 500], ['France', 600], ['RU', 700] ]); var options = {} chart.draw(data, options); ''' resp = requests.post('https://quickchart.io/google-charts/render', json={ 'width': 600, 'height': 300, 'packages': 'geochart', # optional 'code': code, 'mapsApiKey': '<MY GMAPS API KEY; however, it gives the same error regardless>', }) with open('chart.png', 'wb') as f: f.write(resp.content)
Execution
$ python quickchart.py $ cat chart.png Error: Evaluation failed: Error: Must draw chart before calling getImageURI. at gvjs_E_.gvjs_.ah (https://www.gstatic.com/charts/51/js/jsapi_compiled_geochart_module.js:81:133) at __puppeteer_evaluation_script__:5:25%
Sorry, something went wrong.
No branches or pull requests
Reproduce
The text was updated successfully, but these errors were encountered: