score:0

The fisheye plugin at https://github.com/d3/d3-plugins/tree/master/fisheye provides a scaled z-value that you can use in whatever manner you want, so that it does allow for circles with different radii. The github readme does not include an example of how to combine fisheye's scale (returns as z) with nodes that have different radius values but if you take the basic example:

node.each(function(d) { d.fisheye = fisheye(d); })
  .attr("cx", function(d) { return d.fisheye.x; })
  .attr("cy", function(d) { return d.fisheye.y; })
  .attr("r", function(d) { return d.fisheye.z * 4.5; });

It's clear to see you could change the r function to something more interesting:

  .attr("r", function(d) { return d.fisheye.z * d.size; });

And it would work fine with differently sized elements.


More Query from same tag