Public
Edited
Jan 14, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width,
title: `${nam} in ${years} for Pizza: ${Name_Pizza}`,
x: { label: "Time", grid: true },
y: {label: `${nam}`, grid: true },
color: { legend: true, scheme: "Tableau10", domain: Size },
marks: [
Plot.lineY(filteredData.filter(p => years.includes(p.Order_Year)), Plot.binX({y: 'sum'}, {
x: "Order_Date",
y: Selec,
z: "Size",
stroke: "Size",
interval: d3.utcMonth,
strokeWidth: 2,
tip: true })) ] })
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
nam = option === "Revenue" ? "Total Revenue ($)" : (option === "Orders" ? "# Total Orders" : null)
Insert cell
Selec = option === "Revenue" ? "Total_Revenue" : (option === "Orders" ? "Total_Orders" : null)
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