Sunday, 10 July 2016

carto - Including chart based on fields in CartoDB infowindow?


I would like to make graphs, pie charts, etc based on fields in my table within my infowindows. Is there a way to accomplish this?



Answer



In cartodb.js you have an example integration with google charts. Other charting libraries should work in the same way. You can see it working here.


The key is to call the chart function inside the infowindow template, note draw_chart call:



 var INFOWINDOW_TEMPLATE = [
'
',
' x',
'
',
'
',
'
',
'

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...