Aug 1, 2017

I wrote this small piece of code to create a kind of heatmap/calendar with d3. One day a coworker asked me to create a interactive graph that could show a calendar of fruits and vegetables.

It had to be responsive and able to read the data from a json. So I wrote it following Mike Bostock's Nested selections.

It's not a plugin to the way you instantiate an object and you access a number of methods. I just decided to keep the basics in a repository so I could access it in the future if I need it or someone else.

It uses rollup.js and sass. You just need to execute npm install and npm start.

Go to the repo.

d3 npm rollup sass