Published
Edited
Feb 7, 2021
123 forks
Insert cell
Insert cell
buildvis = {
const width = 960
const height = 800
const svg = d3.select(DOM.svg(width, height))
.attr("viewBox", [-width / 2, -height / 2, width, height])
// Configure os nodes e os links
// Crie a constante simulation usando a função forceSimulation definida em outra célula
//Crie os elementos svg para os links e guarde-os em link
//Crie os elementos svg para os nodes e guarde-os em node
// Defina a função ticked
// Once we append the vis elments to it, we return the DOM element for Observable to display above.
return svg.node()
}
Insert cell
Insert cell
Insert cell
d3 = require('d3@5')
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