root = Card([header, controlsForm, sep1, kpiHeading, kpiSection, sep2, finHeading, revHeading, revenueChart, costHeading, costsChart, sep3, orgHeading, budgetChart, headcountHeading, headcountChart, sep4, riskHeading, riskTable, initHeading, initTable, sep5, boardHeading, boardList], "card", "column", "l")
header = CardHeader("Quarterly Command View", "Q3 2024 · All regions")
controlsForm = Form("controls", controlsButtons, [quarterField, regionField])
quarterField = FormControl("Quarter", quarterSelect)
quarterSelect = Select("quarter", [q1Item, q2Item, q3Item, q4Item], "Select quarter", null, "q3", "medium")
q1Item = SelectItem("q1", "Q1 2024")
q2Item = SelectItem("q2", "Q2 2024")
q3Item = SelectItem("q3", "Q3 2024")
q4Item = SelectItem("q4", "Q4 2024")
regionField = FormControl("Region", regionSelect)
regionSelect = Select("region", [regionAll, regionNa, regionEu, regionApac], "All regions", null, "all", "medium")
regionAll = SelectItem("all", "All regions")
regionNa = SelectItem("na", "North America")
regionEu = SelectItem("eu", "Europe")
regionApac = SelectItem("apac", "APAC")
controlsButtons = Buttons([exportBtn])
exportBtn = Button("Export pack", ["export", "q3", "all"], "primary")
sep1 = Separator("horizontal", true)
kpiHeading = Heading("Key Metrics", "h2")
kpiSection = Table([kpiMetric, kpiValue])
kpiMetric = Col("Metric", ["Revenue", "Costs", "Profit", "Runway", "Pipeline", "Win rate", "Customers", "Churn", "NPS"])
kpiValue = Col("Value", ["$12.8M", "$9.5M", "$3.3M", "14 months", "$62.4M", "34%", "1,284", "2.1%", "47"])
sep2 = Separator("horizontal", true)
finHeading = Heading("Quarterly Financials", "h2")
revHeading = Heading("Revenue by Quarter", "h3")
revenueChart = BarChart(["Q1", "Q2", "Q3", "Q4"], [revenueSeries], "grouped", "Quarter", "USD (M)")
revenueSeries = Series("Revenue", [9.2, 10.4, 12.8, 14.1])
costHeading = Heading("Costs by Quarter", "h3")
costsChart = LineChart(["Q1", "Q2", "Q3", "Q4"], [costsSeries], "linear", "Quarter", "USD (M)")
costsSeries = Series("Costs", [6.8, 7.9, 9.5, 10.2])
sep3 = Separator("horizontal", true)
orgHeading = Heading("Budget & Headcount", "h2")
budgetChart = HorizontalBarChart(["Engineering", "Sales", "Marketing", "Ops", "Finance", "Support"], [budgetPlanSeries, budgetActualSeries], "grouped", "USD (M)", "Department")
budgetPlanSeries = Series("Plan", [8.0, 4.5, 3.2, 2.8, 1.5, 2.0])
budgetActualSeries = Series("Actual", [8.4, 4.2, 3.6, 3.1, 1.4, 2.3])
headcountHeading = Heading("Headcount by Department", "h3")
headcountChart = BarChart(["Engineering", "Sales", "Marketing", "Ops", "Finance", "Support"], [headcountSeries], "grouped", "Department", "Headcount")
headcountSeries = Series("Headcount", [240, 180, 95, 70, 45, 60])
sep4 = Separator("horizontal", true)
riskHeading = Heading("Top Risks", "h2")
riskTable = Table([riskName, riskOwner, riskScore])
riskName = Col("Risk", ["Cloud cost overrun", "Key sales hires slipping", "Churn uptick in SMB", "Supply chain delays", "Regulatory delay in EU"])
riskOwner = Col("Owner", ["Jamie Chen", "Sara Osei", "Maya Patel", "Alex Rivera", "Nina Kowalski"])
riskScore = Col("Score", ["High", "High", "Medium", "Medium", "Low"])
initHeading = Heading("Strategic Initiatives", "h2")
initTable = Table([initName, initStatus, initOwner])
initName = Col("Initiative", ["AI platform rollout", "EU expansion", "Enterprise tier launch", "Cost optimization program", "Customer health scoring"])
initStatus = Col("Status", ["On track", "At risk", "On track", "On track", "Behind"])
initOwner = Col("Owner", ["Priya Shah", "Marco Ruiz", "Dana White", "Tom Becker", "Leila Haddad"])
sep5 = Separator("horizontal", true)
boardHeading = Heading("Next Board Meeting", "h2")
boardList = ListBlock([boardItem1, boardItem2, boardItem3, boardItem4, boardItem5])
boardItem1 = ListItem("Approve Q4 guidance", "Present revised revenue and cost outlook")
boardItem2 = ListItem("Ratify EU expansion plan", "Phased entry with initial EUR 6M budget")
boardItem3 = ListItem("Review CEO compensation proposal", "Compensation committee recommendation attached")
boardItem4 = ListItem("Approve stock option refresh", "For key hires and retention program")
boardItem5 = ListItem("Update on AI platform rollout", "Security review and pilot customer results")