xkcd graph style in d3

I saw an article on Hacker News about duplicating the xkcd hand-drawn graph style saw I thought I would give it a shot using d3 javascript library. I have very limited experience with d3 but think I came up with something relatively close.


View live example, or See Source

View source of the live example to see the code, the key is adding a jitter to the equation to give the hand-drawn look. I also used a hand drawn font I found at xkcdsucks forum

Hi, I’m Marcus Kazmierczak

Profile Photo I'm an engineer trying to do my small part to make the web a little better. I believe open source can help empower people, and grow our collective knowledge; moving the world forward. I hope this site is a small contribution to that collective.