title: Use d3.dispatch to broadcast events between d3 components
body: <p>I'm currently working on creating a library of reusable d3 components and want to create an "interactive layer" component that basically creates a svg rectangle over my visualization and then broadcasts interactions with it to other components listening for those interactions ie. mouseover, mousemove, click, etc.</p>
  
  <p>I've been following Mike Bostock's pattern for reusable d3 charts (<a href="http://bost.ocks.org/mike/chart/" rel="nofollow">http://bost.ocks.org/mike/chart/</a>) and while I can create a dispatcher inside of each component to dispatch events internally I haven't been able to be successful in making separate components listen for another component's dispatch events. So basically I want one dispatcher for my library that all components then listen to if used.</p>
  
  <p>I've done a lot of searching but haven't found an answer or even a hint as to how to do this, if anyone has any ideas it would be greatly appreciated.</p>