PDA

View Full Version : [CLOSED] download a chart in jpg format



JCarlosF
Apr 15, 2013, 8:53 PM
I can not download a chart in jpg format, i try this but did not work, help me please
thanks


function saveChart(btn) {
Ext.MessageBox.confirm('Confirmar Descarga', 'Desea descargar la grafica?', function (choice) {
if (choice == 'yes') {
btn.up('panel').down('chart').save({
type: 'image/jpg'
});
}
});
}

Vladimir
Apr 15, 2013, 10:13 PM
Here is the note from 'save' method documentation



Important: By default, chart data is sent to a server operated by Sencha to do data processing. You may change this default by setting the defaultUrl (http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.draw.engine.ImageExporter-property-defaultUrl) of theExt.draw.engine.ImageExporter (http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.draw.engine.ImageExporter) class. In addition, please note that this service only creates PNG images.


So, Sencha server (default server) supports PNG only

JCarlosF
Apr 17, 2013, 11:20 PM
Here is the note from 'save' method documentation



So, Sencha server (default server) supports PNG only



ok, thanks!