dbpatterns icon indicating copy to clipboard operation
dbpatterns copied to clipboard

Export entire chart as image

Open hasantayyar opened this issue 10 years ago • 2 comments

Capturing the entire chart like this http://jsfiddle.net/hasantayyar/AqAE2/2/ will be a cool function.

hasantayyar avatar May 26 '14 11:05 hasantayyar

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; 
      }
    });

hasantayyar avatar Jul 06 '14 18:07 hasantayyar