Aquí hay una solución alternativa que hace la impresión directamente. Se basa en la función chart.print(), pero funciona en múltiples gráficos.
Ver la demostración aquí: http://jsfiddle.net/jim31415/q5Rzu/150/
//--------------------------------------------------------------------
$("#print").click(function() {
printCharts([chart1, chart2, chart3]);
});
//--------------------------------------------------------------------
function printCharts(charts) {
var origDisplay = [],
origParent = [],
body = document.body,
childNodes = body.childNodes;
// hide all body content
Highcharts.each(childNodes, function (node, i) {
if (node.nodeType === 1) {
origDisplay[i] = node.style.display;
node.style.display = "none";
}
});
// put the charts back in
$.each(charts, function (i, chart) {
origParent[i] = chart.container.parentNode;
body.appendChild(chart.container);
});
// print
window.print();
// allow the browser to prepare before reverting
setTimeout(function() {
// put the charts back in
$.each(charts, function (i, chart) {
origParent[i].appendChild(chart.container);
});
// restore all body content
Highcharts.each(childNodes, function (node, i) {
if (node.nodeType === 1) {
node.style.display = origDisplay[i];
}
});
}, 500);
}
});
Lo investigaré, pero se ve bien por lo que veo en jsFiddle. –
Highcharts eliminó los archivos, puede usar esto en lugar del primer enlace mejor http://jsfiddle.net/q5Rzu/147/ – fcortes
¿Me puede ayudar? Quiero imprimir un 5 gráficos a la vez. Pero quiero poner un título en la parte superior de la primera página. Como hacer eso ? –