http://www.w3.org/TR/SVG/types.html#__svg__SVGLocatable__getBBox
Which would be:
d3.select("#theBarGroup").node().getBBox()
Alternatively, the data-driven way would be to bind some data to your
rectangle, modify that, and then recompute the transform from the
data. That way, you don't have to pull data back out of the DOM.
Mike