Pizza Orders Visual Exploration | Arin CHANDRA | Observable
ojs
ojs
ojs
ojs
Author
Arin CHANDRA
@arin-chandra
Comments (3)
Angie Hjort
Oct 12
Plot.plot({ title: "2022 Daily Pizza Revenue Trends", width: 850, height: 400, x: { label: "Date", type: "time" }, y: { grid: true, label: "Daily Revenue ($)" }, color: { scheme: "Category10", legend: true }, marks: [ Plot.ruleY([0]), Plot.lineY( pizzaorders, Plot.windowY( { k: 7, reduce: "mean" }, // 7-day rolling average filter Plot.groupX( { y: "sum" }, { x: "orderDate", y: "total", stroke: "category", strokeWidth: 2.5, tip: true } ) ) ), Plot.text(["🛞"], {x: new Date("2022-07-01"), y: 4700, text: d => d, fontSize: 18}), Plot.link([""], {x1: new Date("2022-06-14"), x2: new Date("2022-07-18"), y: 1500}), Plot.link([""], {x1: new Date("2022-06-14"), x2: new Date("2022-07-18"), y: 8500}), Plot.link([""], {x: new Date("2022-07-18"), y1:1500, y2: 8500}), Plot.link([""], {x: new Date("2022-06-14"), y1:1500, y2: 8500}), ] })
Reply
Angie Hjort
Oct 12
pizzaorders.toSorted((a,b)=> a.orderDate - b.orderDate),
Reply
Angie Hjort
Oct 12
use label formatting for week days instead of legend
Reply
Add comment
Subscribe to notifications
© 2026 Observable, Inc.
Terms of service
Privacy policy
Product
About
Pricing
Documentation
Release notes
Contact us
Open source
Notebook Kit
Plot
D3
Community
Explore
Forum
Bluesky
YouTube
X
0
Follow
Follow
Pizza Orders Visual Exploration | Arin CHANDRA | Observable