Published unlisted
Edited
Feb 14, 2022
Insert cell
Insert cell
start = new Date()
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width: width,
y: {
grid: true,
label: "↑ count"
},
//x: { domain:[d3.min(data, d => d.date), d3.max(data, d=>d.date)]},
x: { domain:[start, range.ceil(d3.max(data, d=>d.date))], nice:range},
marks: [
Plot.rectY(data, Plot.binX({y: "count"}, {x: k => k.date, thresholds: range, fill: "#444791"})),
Plot.ruleY([0])
]
})

Insert cell
Insert cell
Plot.plot({
width: width,
y: {
grid: true,
label: "↑ count"
},
// x: { domain:[rawStartDate, new Date()]},
marks: [
Plot.rectY(data, Plot.binX({y: "count"}, {x: k => k.date, thresholds: range, fill: "#444791"})),
Plot.ruleY([0])
]
})

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