-
Notifications
You must be signed in to change notification settings - Fork 1
Notes
http://stackoverflow.com/questions/23770194/d3-force-directed-layout-bounding-box http://stackoverflow.com/questions/21646822/clip-d3-voronoi-with-d3-hull
Have multiple FDG using the multi-focal example http://localhost:8000/src/fdg/mutilfoci.html
Mike Bostock
10/04/2012
Another option is to adjust the force layout's parameters dynamically based on the data. For example, by increasing the gravity force, you make it harder for nodes to escape the canvas. More discussion here: http://stackoverflow.com/questions/9901565/charge-based-on-size-d3-force-layout
See the Polygon methods, including calculation of the centre of the polygon https://github.com/mbostock/d3/wiki/Polygon-Geom
.attr("width", width)
.attr("height", height)
.on("mousemove", function() { vertices[0] = d3.mouse(this); redraw(); });```
### Adding a transitory log message
var div = d3.select("body").append("div") .style("float", "left")
function log(message) { return function() { div.append("p") .text(message) .style("background", "#ff0") .transition() .duration(2500) .style("opacity", 1e-6) .remove(); };