title: In NV D3 horizontal bar chart how to use Json as a data?
body: <p>Its the source program of nv d3 bar chart program now I separated the hard code of bar chart data, i.e data.json, its not showing chart now. </p>
  
  <pre><code> &lt;script&gt;
     d3.json("Data.json", function (data) {
     var chart;
     nv.addGraph(function() {
     chart = nv.models.multiBarHorizontalChart()
    .x(function(d) { return d.label })
    .y(function(d) { return d.value })
    .margin({top: 30, right: 20, bottom: 50, left: 175})
    .showValues(true)
    .tooltips(false)
    .showControls(false);
  
     chart.yAxis
    .tickFormat(d3.format(',.2f'));
  
    d3.select('#chart1 svg')
    .datum(data)
    .transition().duration(500)
    .call(chart);
  
    nv.utils.windowResize(chart.update);
  
   chart.dispatch.on('stateChange', function(e) { nv.log('New State:', JSON.stringify(e));                   
     });
  
    return chart;
    });
  
    });
  
    &lt;/script&gt;
  </code></pre>
  
  <p>Here is the data.json which I separated from source its not working</p>
  
  <pre><code> [
    { 
      "label" : "Group A" ,
      "value" : -1.8746444827653
    } , 
    { 
      "label" : "Group B" ,
      "value" : -8.0961543492239
    } , 
    { 
      "label" : "Group C" ,
      "value" : -0.57072943117674
    } , 
    { 
      "label" : "Group D" ,
      "value" : -2.4174010336624
    } , 
    {
      "label" : "Group E" ,
      "value" : -0.72009071426284
    } , 
    { 
      "label" : "Group F" ,
      "value" : -0.77154485523777
    } , 
    { 
      "label" : "Group G" ,
      "value" : -0.90152097798131
    } , 
    {
      "label" : "Group H" ,
      "value" : -0.91445417330854
    } , 
    { 
      "label" : "Group I" ,
      "value" : -0.055746319141851
    }
  ]
  </code></pre>
  
  <p>Please help me what went wrong when I separate json</p>