Brushes can be used to draw a barchart. This gives an easy way to input or adjust values with the mouse !!!
The d3 brush is a complex piece of logic taking care of events and user feed-backs. Among other characterics it exposes a nice selection rectangle which can be used as a bar !!!
2D-brushes come in two flavors see official API v4 doc
- d3.brushX()