Public
Edited
Dec 30, 2022
Insert cell
Insert cell
chartTest1 = FileAttachment("Chart test@1.png").image()
Insert cell
data = [
{x: "2022-12-01T00:00:00+0000", y: 1000},
{x: "2022-12-02T00:00:00+0000", y: 1},
{x: "2022-12-02T12:00:00+0000", y: 1},
{x: "2022-12-03T00:00:00+0000", y: 2},
{x: "2022-12-04T00:00:00+0000", y: 3},
{x: "2022-12-05T00:00:00+0000", y: 4},
{x: "2022-12-06T00:00:00+0000", y: 5},
];
Insert cell
Plot.plot({
marginLeft: 50,
grid: true,
y: {
label: "Count",
domain: [0, 1000],
},
x: {
label: "Days",
domain: [new Date('2022-12-01T00:00:00+0000'), new Date('2022-12-07T00:00:00+0000')],
},
marks: [
Plot.ruleY([0]),
Plot.rectY(data, {x: "x", y: "y", interval: d3.utcDay}),
]
})
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