I'm trying to get the selection values for a 1-dimensional brush, but I'm having trouble understanding what the argument for d3.brushSelection() should be. I see that the documentation says that the argument should be a node, but I don't know exactly what it means. Is it supposed to be the specific HTML element on which the brush is called on, or the svg element that holds the brush? I have tried both and both return null.
var xBrush = d3.brushX()
.extent([[0,0], [xWidth,xHeight]])
.on("brush", brushed);
xChart.append("g")
.attr("class", "brush")
.call(xBrush);