Published
Edited
Oct 12, 2019
Fork of GraphMonkey
Insert cell
md`# GraphMarried`
Insert cell
nodes = 9
Insert cell
dot = require("@observablehq/graphviz")
Insert cell
graph = buildGraph(nodes)
Insert cell
dot`${graph}`
Insert cell
function buildGraph(nodes) {
let text = '';
for (let node = 0; node < nodes; node++) {
if (node == 0) {
text = node;
} else {
text += " -> Married -> " + node;
}
}
return `digraph G {${text}}`;
}
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