Public
Edited
Dec 26, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width: width,
height: 420,
marginRight: 120,
color: {
legend: true,
label: "Number of orders",
type: "linear",
domain: [731302, 101279],
scheme: "YlGnBu"
},
marks: [
Plot.lineY(pizza, Plot.binX({y: 'sum'}, {
x: "order_date",
y: "orders",
z: "pizza_name",
stroke: "total_sold",
interval: d3.utcWeek,
tip: true
})),
]
})
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width: 720,
height: 420,
facet: {
data: pizza,
y: "pizza_name",
x: "size",
marginRight: 90,
label: ""
},
color: {
legend: true,
domain: ["Classic", "Specialty", "Vegetarian"],
range: ["purple", "orange", "green"]
},
marks: [
Plot.areaY(pizza, Plot.binX({y: 'sum'}, {
x: "order_date",
y: "orders",
interval: d3.utcWeek,
tip: true,
fill: "category",
})),
Plot.ruleY([0])
],
y: {
tickFormat: d => ""
}
})
Insert cell
Insert cell
pizza
Type Table, then Shift-Enter. Ctrl-space for more options.

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