News for hackers. Stuff that matters.
Re:Create your own XKCD-style Graphs by eranation on Wednesday October 24, 2012 @02:15PM (#4694234)
I was about to say: "another one?" but this is actually pretty cool, kind of sums up all other posts on this topic in the past few weeks. Open source evolution at it's best. Each new post is something that adds a little more on the previous, gives proper credit, and the end result is something useful, that will make any boring graph a little less boring, this is why HN is so great.

From a question on stackexchange on Mathematica (I think) to basic implementation in HTML5/JavaScript, to a fully functional graph generator that needs no code.

The next evolution I assume can have a jsfiddle like short URLs, share buttons, and a voting mechanism for best graphs.

Re:Create your own XKCD-style Graphs by imkevinxu on Wednesday October 24, 2012 @02:26PM (#4694289)
Thanks there! I agree, I was heavily inspired by the Mathematica solution and after looking at Dan's D3 JS code I knew a simple UI was finally possible so I made it all last night.

Ideally I'd like to be able to export the d3 graphs as images, any idea on how to do that?

Re:Create your own XKCD-style Graphs by eric_bullington on Wednesday October 24, 2012 @06:54PM (#4695437)
I've not yet tried it, but check out this: https://github.com/sampumon/SVG.toDataURL

Which apparently originates from this paper: http://svgopen.org/2010/papers/62-From_SVG_to_Canvas_and_Bac...

Re:Create your own XKCD-style Graphs by imkevinxu on Wednesday October 24, 2012 @08:32PM (#4695766)
Thanks! Will look into it.
Re:Create your own XKCD-style Graphs by eranation on Wednesday October 24, 2012 @03:20PM (#4694571)
I'm sure you looked at the same articles, and found it surprising there is no easy way apparently. but a brute force way will be to send the final SVG / Canvas to the server side and render it there?

EDIT: this seems like a nice approach:

http://stackoverflow.com/questions/4912092/using-html5-canva...

Re:Create your own XKCD-style Graphs by baconner on Wednesday October 24, 2012 @05:56PM (#4695252)
I've been having a lot of success with phantom.js for converting browser rendered svg to various formats. I imagine there are a ton of svg>image options but phantom is nice in that its nearly WYSIWYG output vs chrome.
Re:Create your own XKCD-style Graphs by enjalot on Friday October 26, 2012 @01:17PM (#4703175)
another client side option is canvg http://code.google.com/p/canvg/ which is more wrapping around a dataURL.