Public
Edited
Jul 25, 2022
Importers
Insert cell
Insert cell
Insert cell
Insert cell
function makeNode(d) {
// Check whether the node exists in allTableNames or allColumnNames
const isTableName = _.includes(allTableNames, d);
// A function to create nodes in the shape you want for your network
return {
id: d,
x: width / 2,
y: height / 2,
r: isTableName ? 15 : 4,
fill: isTableName ? "#CCC" : "#999"
};
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
html`<style>

.link {
stroke: #CCC;
stroke-width: 1px;
}

.node {
/* cursor: move; */
// fill: #ccc;
stroke: #000;
stroke-width: 0.5px;
}

.tag-node {
/*opacity: 0.5;*/
}

.node.fixed {
fill: #f00;
}

.label {
fill: black;
font-size: 5px;
font-family: courier;
text-anchor: middle;
}

</style>`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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