EDIT: I've now created a much more intuitive version of this chart. View version IV for a non-updating x axis and version V for a updating x axis. So you can basically ignore this one :)
For a bit more background, you can read my mini-blog about it Brushable & interactive bar chart in d3.js
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This brushable horizontal bar chart is another version of the Brushable Horizontal Bar Chart - I where I've made a change in the way the transitions occur.
Instead of the exiting bars moving inward, the bars now go to 0 height and 0 opacity. I've also removed some delay's that where in the previous one to make things change faster
You can find a next version in Brushable Horizontal Bar Chart - III where now also the x axis domain will update when you move the brush
https://d3js.org/d3.v3.min.js