barGroup
          .append('rect')
          .attr('class', function(d) {
            return 'bar ' + d.type;
          })