Published
Edited
Apr 3, 2021
Insert cell
Insert cell
Insert cell
y = d3.scaleTime()
.domain([new Date(2012, 0, 1, 0), new Date(2012, 0, 1, 23, 59)])
.range([margin.top, height - margin.bottom])
Insert cell
x = d3.scaleTime()
.domain(d3.extent(data, d => d3.timeDay.round(d.date))).nice()
.range([margin.left, width - margin.right])
Insert cell
color = d3.scaleSequential()
.domain(d3.extent(data, d => d.strokes))
.interpolator(d3.interpolateReds)
Insert cell
Insert cell
formatY = function(d) { return new Date(2012, 0, 1, d.getHours(), d.getMinutes()); };
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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