use d3.chart to define reusable column chart