यहां एक वैकल्पिक समाधान है जो सीधे प्रिंटिंग करता है। यह chart.print() फ़ंक्शन पर आधारित है, लेकिन यह एकाधिक चार्ट पर काम करता है। 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);
}
});
मैं इसे देख लूंगा, लेकिन जेएसफ़िल्ड में जो कुछ मैं देखता हूं उससे अच्छा लगता है! –
हाइचार्ट्स ने फ़ाइलों को हटा दिया, आप इसे पहले लिंक के बजाय बेहतर इस्तेमाल कर सकते हैं http://jsfiddle.net/q5Rzu/147/ – fcortes
क्या आप मेरी मदद कर सकते हैं? मैं एक समय में 5 चार्ट प्रिंट करना चाहता हूं। लेकिन मैं पहले पृष्ठ के शीर्ष पर एक टिटल देना चाहता हूं। उसको कैसे करे ? –