Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kaishuu0123
Created April 2, 2014 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaishuu0123/9930217 to your computer and use it in GitHub Desktop.
Save kaishuu0123/9930217 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
$("#graph_button").click(function () {
var img = document.getElementById("graph_img");
g = graph_data[999]
Dygraph.Export.asPNG(g, img);
console.log(img);
window.location.href = img.src; //.replace('image/png','image/octet-stream');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment