Public
Edited
Oct 19, 2022
Insert cell
import {ForceGraph} from "@d3/force-directed-graph-canvas"
Insert cell

chart = ForceGraph(miserables, {
nodeId: (d) => d.id,
nodeGroup: (d) => d.group,
linkStrokeWidth: (l) => Math.sqrt(l.value),
width,
height: 600,
invalidation, // a promise to stop the simulation when the cell is re-run
})

Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more