Grouping nodes in a Force-Directed Graph
This example shows a force-directed graph of character interactions from *Les Misérables*, with colored convex hulls grouping nodes that share the same community. Users can drag individual nodes or entire group hulls independently, and adjust the hull’s scale via a slider or change its curve type (e.g., `d3.curveCatmullRomClosed`) from a dropdown. The visualization uses `d3.forceSimulation` for layout and `d3.polygonHull` to compute each group’s boundary, rendering nodes as SVG circles and links as lines with animated transitions.
AI-generated descriptionExample of a force-directed graph with an extra layer for grouping nodes.
Nodes and groups can be dragged indepedently. The type of curve and the scale of the shape can be tuned in order to define the contour of the group shapes
forked from <a href='http://bl.ocks.org/XavierGimenez/'>XavierGimenez</a>'s block: <a href='http://bl.ocks.org/XavierGimenez/a8e8c5e9aed71ba96bd52332682c0399'>Grouping nodes in a Force-Directed Graph</a>