I have been trying below function to generate CSV for download, but what I am seeing is that I can get CSV data only in alert
.
function ExportMyChart(type) {
var chartObj = getChartFromId('myChartIdAmount4');
if( chartObj.hasRendered() ){
if(type === 'CSV'){
alert(chartObj.getDataAsCSV());
}else{
chartObj.exportChart({ exportAtClient: '1', exportFormat: type, exportAction: 'download' });
}
}
}
chartObj.exportChart
is not working for CSV, is there any way i can make it work for CSV as it work for PDF, JPEG ?. I would appreciate any help on this. Thanks.
if(type ==='CSV')
becausechartObj.exportChart({ exportAtClient: '1', exportFormat: type, exportAction: 'download' });
gives error if I use it for CSV – SargentexportChart
fails to work with CSV, any thought why is it so – Sargent