base class for a reusable d3.js component written in coffeescript