Wednesday, 15 May 2013

javascript - Multiple chart export in HighChart is not same as the one displayed on the screen -



javascript - Multiple chart export in HighChart is not same as the one displayed on the screen -

i have multiple charts (trellis model) using highcharts share same y axis (i.e category axis).. when seek export chart, x axis(series) not coming see on screen. please take @ jsfiddle sample , allow me know. help appreciated. exported output match on screen. not coming in export. title in exported file not matching ones on screen. if save individual chart svg file, see values in x axis, i.e 0m, 1m, 2m..etc, when in ui 3 charts combined, smartly displaying values 2.5m, 5m, 7.5m etc. should create happen?i.e export match ui.

jsfiddle file issue

--

it's caused not setting strict width chart, default values 600x400 used, described in docs.

solution: set widths each chart when using getsvg() method:

var container = $(chart.container); var svg = chart.getsvg({ chart: { width: container.width() } });

demo: http://jsfiddle.net/tg8f9fgo/5/ or http://jsfiddle.net/tg8f9fgo/4/

javascript jquery html5 charts highcharts

No comments:

Post a Comment