dbpatterns
dbpatterns copied to clipboard
Export entire chart as image
Capturing the entire chart like this http://jsfiddle.net/hasantayyar/AqAE2/2/ will be a cool function.
You can try this on document view page. Easy to implement
$.getScript("https://rawgit.com/niklasvh/html2canvas/master/build/html2canvas.min.js");
then
$("#entities").css("height",$(window).height())
html2canvas( document.getElementById("entities") , {
onrendered: function(canvas) {
var can = canvas;
var img = new Image();
img.src = can.toDataURL();
var url = img.src.replace(/^data:image\/[^;]/, 'data:application/octet-stream');
window.location = url;
}
});