6

I have a Force Directed Graph that I've generated with D3 and within each node (which are represented as large circles) I'd like to pack in a bunch of smaller circles using D3's Circle Packing. Is it possible to use both of these layouts in one visualization? How does one insert a layout into a node?

VividD
  • 10,456
  • 6
  • 64
  • 111
guidoism
  • 7,820
  • 8
  • 41
  • 59

1 Answers1

2

I figured it out once I realized that svg elements were just regular dom nodes and I could manipulate them with jquery. I ended up created two svg locations, one for display and one for creation of svg objects. I built one object at a time in the builder location and then moved it off to somewhere else in order to work on the next guy. When I was ready I built the force graph on the main display and populated the nodes there with the circle packed nodes that I had saved off somewhere else.

guidoism
  • 7,820
  • 8
  • 41
  • 59
  • 2
    Very cool! It would be very nice if you make your example accessible somehow. – VividD Jan 11 '14 at 14:25
  • 1
    I'm in the same position as @VividD, looking to achieve this and curious if there are code snippets that could offer some guidance. – Brian Jan 27 '14 at 21:08
  • Ah. Very un-d3-ish. I would like to see whether there's a d3 Way. – Mars Feb 26 '15 at 06:18