How to update data in stack bar chart in D3
I am able to populate a stacked bar chart first time, but my requirement is to update the stacked bar chart with new data on button click. On button click, i m making call to backend and getting the data, Could you please guide me as how to update the stacked bar char chart. My problem is passing the new data to bar chart. d3.json("http://myhost/ITLabourEffortChart/effort/effort",function(error, data){ color.domain(d3.keys(data.effort[0]).filter(function(key) { return key !== "qName"; })); data.effort.forEach(function(d) { var y0 = 0; d.effortHr = color.domain().map(function(name) { return