This is my javascript junction to export the chart. The problem is there:
function ObjetoExportador(sourceCharts) {
//Posicionamos capa de Exportar
document.getElementById("DVExportar").style.top = document.documentElement.scrollTop;
var arrayCharts = new Array();
var obj;
var myExportComponent;
for (var i in sourceCharts) {
obj = getChartFromId(sourceCharts);
if (obj != null && obj.hasRendered()) {
arrayCharts.push(String(sourceCharts));
}
}
//toFile();
GraficaExportacionActual = 'fcBatchExporter';
//ContadorExportacionActual+=1;
//eliminarElementoId("fcBatchExporter");
//document.getElementById("fcexpDiv").style.display='';
var objfc = document.getElementById(GraficaExportacionActual);
if (objfc == null) {
myExportComponent = new FusionChartsExportObject(GraficaExportacionActual, "chart/FCExporter.swf");
myExportComponent.sourceCharts = arrayCharts;
myExportComponent.componentAttributes.fullMode = '1';
myExportComponent.exportAttributes.exportAtClient = '1';
myExportComponent.componentAttributes.btnSaveAllTitle = 'Guardar todos'
myExportComponent.componentAttributes.saveAllTitle = 'Fichero único:';
myExportComponent.exportAttributes.btnSaveTitle = 'Guardar';
myExportComponent.componentAttributes.defaultExportFileName = 'Mis Graficos.pdf'
//myExportComponent.exportAttributes.defaultExportFileName = 'algo.pdf';
myExportComponent.componentAttributes.saveMode = 'both';
myExportComponent.componentAttributes.showAllowedTypes = '1';
myExportComponent.componentAttributes.width = '350';
myExportComponent.componentAttributes.height = '340';
myExportComponent.componentAttributes.showMessage = '1';
myExportComponent.componentAttributes.message = 'Graficos capturados.';
myExportComponent.componentAttributes.btnsavetitle = 'Guardar'
myExportComponent.componentAttributes.btndisabledtitle = 'Waiting for export 2222';
//myExportComponent.debugMode = true;
myExportComponent.Render("fcexpDiv");
//myExportComponent.BeginExport();
}
if ($("#DVExportar").is(':hidden')) {
$("#DVExportar").toggle(400);
//$('#DVExportar').slideToggle('2000', "easeInBack", function () { });
}
for (var i in sourceCharts) {
obj = getChartFromId(sourceCharts);
if (obj != null && obj.hasRendered()) {
//wrWin(obj.getDataAsCSV());
obj.exportChart();
//obj.exportChart({ exportFormat: 'png'});
}
}
}
Thanks