title: Attaching arbitrary data to objects in D3.js
body: <p>This relates mostly with what a "best practice" would be with D3.js. I want to attach arbitrary information to different svg elements that I have on a page, after they are created. In D3, it looks like one generally generates svg elements from a dataset. I want to attach data to these svg elements at any time, without adding their HTML attributes.</p>
  
  <p>Is there a good way of doing this? Do I need to use an auxillary array/object or is there a way to apply data to the elements themselves?</p>