Disable d3 brush resize

d3.js

Solution

There's no explicit option for that, but all you need to do is reset the domain in the brush event handler, for example

var brush = d3.svg.brush().on("brush", brushed);

function brushed() {
  brush.extent(desiredDomain);
}

Problem

Is it possible to have a brush that is a static width ie a brush that is not resizable? It would still need to be draggable. There doesn't seem to be anything indicating whether it's possible in the documentation.

Original source