Implementation of some ideas from ggplot2 on top of d3.js