Published
Edited
Nov 3, 2020
Insert cell
Insert cell
Insert cell
Insert cell
{
const width = 500;
const height = 500;
const svg = d3.create("svg")
.attr("width", width)
.attr("height", height)
const offsetX = width / 2
const offsetY = height / 2
svg.append("circle")
.attr("r", 10)
.attr("cx", offsetX)
.attr("cy", offsetY)
.attr("transform", `translate(${offsetX},${offsetY}) scale(${scale}) translate(${-offsetX},${-offsetY})`)
return svg.node()
}
Insert cell
d3 = require("d3@6")
Insert cell
import {slider} from "@jashkenas/inputs"
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