highcharts - How to get the exported image without moving from the current window when using mobile devices -
i'm using highcharts draw data diverse graphs.
as know, if add exporting.js file in html document,
then display small button on top-right area within highcharts' canvas
the current problem happens when use smartphone.
when try export current graph, current browser window closed.
i can download file, previous window gone.
how can modify highcharts?
i want open new window when click 1 of export options.
thanks in advance.
i noticed issue on ios devices. there's quite simple workaround. default highcharts creates hidden <form>
element , submits data exporting server. can here specifying form's target attribute.
so, here's drop-in fix overrides default highcharts exporting module (just put after exporting.js)
highcharts.post = function (url, data) { var createelement = highcharts.createelement, discardelement = highcharts.discardelement, name, form; // create form form = createelement('form', { method: 'post', action: url, enctype: 'multipart/form-data', target: '_blank' }, { display: 'none' }, document.body); // add data (name in data) { createelement('input', { type: 'hidden', name: name, value: data[name] }, null, form); } // submit form.submit(); // clean discardelement(form); };
here can find working demo: http://jsfiddle.net/dwfv5/
Comments
Post a Comment