Public
Edited
Dec 5, 2022
1 fork
13 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
circleVizCell = {
const svg = d3.create("svg")
.attr("width", 100).attr("height", 100)

const circle = svg.append("circle")
.attr("r", 50).attr("cy", 50).attr("cx", 50)

// When returning the svg.node(), assign the update function -- which is called in the "watcher cell" below.
return Object.assign(svg.node(), {
update(col) {
circle.transition().duration(1200).attr('fill',col)
}
})
}
Insert cell
Insert cell
circleVizCell.update(circleColor)
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