Published
Edited
Jun 27, 2022
Insert cell
Insert cell
Insert cell
Insert cell
config = ({
domain: ["A", "B", "C"], // 👀 change me!
padding: 0.6, // 👀
round: true, // 👀
range: [40, Math.min(700, width - 40)], // 👀
align: 0.5
})
Insert cell
scale = d3
.scalePoint()
.domain(config.domain)
.range(config.range)
.padding(config.padding)
.align(config.align)
.round(config.round)
Insert cell
Insert cell
Insert cell
scale.step()
Insert cell
Insert cell
d3 = require("d3-scale@3", "d3-array@2")
Insert cell
import {chart} from "@mbostock/phases-of-the-moon"
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