score:1

Accepted answer

Why are you using brush.extent() as a getter? You have to change the scale's domain instead, using d3.event.selection, like this:

xFocus.domain(d3.event.selection === null ? xContext.domain() : 
    d3.event.selection.map(xContext.invert, xContext));

Also, you have to pass d.values to the line generator, not just d.

Here is your updated bl.ocks: https://bl.ocks.org/GerardoFurtado/cb7048512af17ed3683e79637eee40d7/9d8d7945bbcb39dabb568dd68247316d2ace5ac3


Related Query