3

I have a circle packing diagram as an svg created in inkscape. Now I want to implement a zooming in and out function with JavaScript and that the labels of the smaller circles only appear when I zoom in, and fade out as I zoom out. Is there a working example of this somewhere?

Here is an example of zooming behaviour I am looking for http://www.nytimes.com/interactive/2008/05/03/business/20080403_SPENDING_GRAPHIC.html?_r=0

VividD
  • 10,456
  • 6
  • 64
  • 111
Imo
  • 1,455
  • 4
  • 28
  • 53

1 Answers1

1

Yes, please take a look at this example: bl.ocks.org/mbostock/7607535

It contains all bits and peaces for implementintg the behavior you look for:

enter image description here

enter image description here

VividD
  • 10,456
  • 6
  • 64
  • 111