Forked from Mike Bostock's focus+context zoom gist to demonstrate how we can drive a d3 brush with code.
anybody know how to brush with code in #d3js?
— klr (@timelyportfolio) September 10, 2014
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
So I found this discussion, but I could not find an example demonstrating the steps proposed by Athan Reines.
For auto-redraw such that the focus of a 1D brush matches the graphed domain, you need to do as follows: