Published
Edited
Jun 4, 2018
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chart = {
// Create a square <svg> 128px by 128px.
const svg = d3.select(DOM.svg(400, 400));
svg
.attr("viewBox", "-150 0 400 400")

svg.append("g")
.attr('transform', 'translate(25, 25)')
.selectAll(".node")
.data(nodes)
.enter().append("rect")
.classed('node', true)
.attr('x', d=>d.x)
.attr('y', d=> d.y + 10 * d.depth)
.attr('width', d=>d.data[0])
.attr('height', d => d.data[1])
.style('fill', 'none')
.style('stroke', '#ccc')
return svg.node()
}
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