<link rel='stylesheet' href='nvd3/css/nv.d3.css'>
<link rel='stylesheet' href='nvd3/css/rNVD3.css'>

<script src='nvd3/js/jquery-1.8.2.min.js' type='text/javascript'></script>
<script src='nvd3/js/d3.v3.min.js' type='text/javascript'></script>
<script src='nvd3/js/nv.d3.min-new.js' type='text/javascript'></script>
<script src='nvd3/js/fisheye.js' type='text/javascript'></script>

<style>
.rChart {
  display: block;
  margin-left: auto; 
  margin-right: auto;
  width: 800px;
  height: 400px;
}  
</style>
<div id = 'chart128c73324ade' class = 'rChart nvd3'></div>    
<script type='text/javascript'>

$(document).ready(function(){ drawchart128c73324ade() }); function drawchart128c73324ade(){
var opts = { "dom": "chart128c73324ade", "width": 800, "height": 400, "x": "TYPE", "y": "total", "group": "BLOCK", "type": "multiBarChart", "id": "chart128c73324ade" }, data = [ { "BLOCK": "CoreBlock", "TYPE": "Electrical", "total": 1026 }, { "BLOCK": "CoreBlock", "TYPE": "HVAC", "total": 1643 }, { "BLOCK": "CoreBlock", "TYPE": "Plumbing", "total": 193 }, { "BLOCK": "NorthBlock", "TYPE": "Electrical", "total": 634 }, { "BLOCK": "NorthBlock", "TYPE": "HVAC", "total": 1299 }, { "BLOCK": "NorthBlock", "TYPE": "Plumbing", "total": 148 }, { "BLOCK": "SouthBlock", "TYPE": "Electrical", "total": 800 }, { "BLOCK": "SouthBlock", "TYPE": "HVAC", "total": 1631 }, { "BLOCK": "SouthBlock", "TYPE": "Plumbing", "total": 131 } ]

  if(!(opts.type==="pieChart" || opts.type==="sparklinePlus" || opts.type==="bulletChart")) {
    var data = d3.nest()
      .key(function(d){
        //return opts.group === undefined ? 'main' : d[opts.group]
        //instead of main would think a better default is opts.x
        return opts.group === undefined ? opts.y : d[opts.group];
      })
      .entries(data);
  }
  
  if (opts.disabled != undefined){
    data.map(function(d, i){
      d.disabled = opts.disabled[i]
    })
  }
  
  nv.addGraph(function() {
    var chart = nv.models[opts.type]()
      .width(opts.width)
      .height(opts.height)
      
    if (opts.type != "bulletChart"){
      chart
        .x(function(d) { return d[opts.x] })
        .y(function(d) { return d[opts.y] })
    }
      
     
    
      
    





   d3.select("#" + opts.id)
    .append('svg')
    .datum(data)
    .transition().duration(500)
    .call(chart);

   nv.utils.windowResize(chart.update);
   return chart;
  });
};
<script></script>