Highcharts context menu causes chart to disappear on return from print screen only on Chrome -


we using highcharts 4.0.4 , php server side script. there multiple charts on page , each chart has context menu print/save options.

the context menu works fine, when control returns print screen page, respective chart either corrupted in size or disappears altogether.

strangely bad behavior observed on chrome not ie.

a fiddle demonstrating behavior.

code along fiddle 

any or guidance on how tackle problem appreciated.

defaulty in highcharts elements hidden apart of current chart. can wrap exporting function , dismiss part of code.

(function (h) {     h.wrap(h.chart.prototype, 'print', function (proceed) {         var chart = this,             container = chart.container,             origdisplay = [],             win = window,             origparent = container.parentnode,             body = document.body,             childnodes = body.childnodes;          if (chart.isprinting) { // block button while in printing mode             return;         }          chart.isprinting = true;           // print         win.focus(); // #1510         win.print();          // allow browser prepare before reverting         settimeout(function () {              // put chart in             origparent.appendchild(container);               chart.isprinting = false;          }, 1000);      }); })(highcharts); 

example: http://jsfiddle.net/nd5xf/5/


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -