Inspired by nv.d3.js