Public
Edited
Sep 18, 2023
Insert cell
Insert cell
xpto = d3.json(
"https://opensheet.elk.sh/1XhfVRnXDx815Q3bCfTCjLJIpQON_ZzWcCxP9xwa7kMQ/TABELA"
)
Insert cell
meudesenho = function (linhas) {
let codigo = `<svg width="500" height="500" viewBox="0 0 500 500">`;

for (let i = 0; i < linhas.length; i = i + 1) {
codigo =
codigo +
`<rect x="${linhas[i].px}" y="${linhas[i].py}" width="${linhas[i].wd}" height="${linhas[i].hg}" fill="${linhas[i].cor}" />`;
}

codigo = codigo + "</svg>";

return codigo;
}
Insert cell
html`${meudesenho(xpto)}`
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