score:0

Accepted answer

I needed to rewrite brushed function to following to update the line chart.

  function brushed(){
        console.log("brush called");
        x.domain(brush.empty() ? x1.domain() : brush.extent());
        **focus.selectAll(".line").attr("d", function(d) { return line(d.values); })**
        focus.select(".x.axis").call(xAxis);
    }

updated plnkr link


Related Query

More Query from same tag