Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export entire chart as image #26

Open
hasantayyar opened this issue May 26, 2014 · 2 comments
Open

Export entire chart as image #26

hasantayyar opened this issue May 26, 2014 · 2 comments

Comments

@hasantayyar
Copy link
Contributor

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

@hasantayyar
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@hasantayyar and others