Public
Edited
Apr 12, 2023
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
margin = ({top: 20, right: 30, bottom: 30, left: 40}) // Cambiá estos valores para ver el efecto
Insert cell
Insert cell
// width = 954 // (Opcional, si no está definida se considera que vale lo mismo que el ancho de la celda)
Insert cell
height = 500 // Alto
Insert cell
Insert cell
x = d3.scaleLinear()
.domain([0, 1])
.range([margin.left, width - margin.right]) // x va de (margen izquierdo) -> (ancho - margen derecho)
Insert cell
y = d3.scaleLinear()
.domain([0, 1])
.range([height - margin.bottom, margin.top]) // y va de (altura - margen inferior) -> (margen superior)
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