root = Card([appHeader, controlsForm, kpiHeading, kpiTable, revHeading, revChart, costsHeading, costsChart, budgetHeading, budgetChart, headHeading, headChart, risksHeading, risksTable, initHeading, initTable, boardHeading, boardList, followUps], "card", "column", "xl")
appHeader = CardHeader("Quarterly Command View", "Q4 FY2024 · All regions")
controlsForm = Form("controls", controlButtons, [quarterField, regionField])
controlButtons = Buttons([applyBtn, exportBtn])
applyBtn = Button("Apply")
exportBtn = Button("Export pack", null, "primary")
quarterField = FormControl("Quarter", quarterSelect)
quarterSelect = Select("quarter", [q1, q2, q3, q4], "Select quarter", null, "Q4")
q1 = SelectItem("Q1", "Q1")
q2 = SelectItem("Q2", "Q2")
q3 = SelectItem("Q3", "Q3")
q4 = SelectItem("Q4", "Q4")
regionField = FormControl("Region", regionSelect)
regionSelect = Select("region", [regionAll, regionNA, regionEU, regionAPAC], "Select region", null, "all")
regionAll = SelectItem("all", "All regions")
regionNA = SelectItem("na", "North America")
regionEU = SelectItem("eu", "Europe")
regionAPAC = SelectItem("apac", "Asia Pacific")
kpiHeading = Heading("Key metrics", "h2")
kpiTable = Table([kpiMetric, kpiValue])
kpiMetric = Col("Metric", ["Revenue", "Costs", "Profit", "Months of runway", "Sales pipeline", "Win rate", "Customers", "Churn", "NPS"])
kpiValue = Col("Value", ["$48.2M", "$31.7M", "$16.5M", "14.2", "$92.4M", "34%", "12,480", "2.1%", "58"])
revHeading = Heading("Revenue by quarter", "h2")
revChart = LineChart(["Q1", "Q2", "Q3", "Q4"], [revSeries], "natural", "Quarter", "USD M")
revSeries = Series("Revenue", [38.2, 41.5, 44.8, 48.2])
costsHeading = Heading("Costs by quarter", "h2")
costsChart = LineChart(["Q1", "Q2", "Q3", "Q4"], [costSeries], "natural", "Quarter", "USD M")
costSeries = Series("Costs", [29.4, 30.1, 30.9, 31.7])
budgetHeading = Heading("Budget vs plan by department", "h2")
budgetChart = HorizontalBarChart(["Engineering", "Sales", "Marketing", "Operations", "Finance", "People"], [planSeries, actualSeries], "grouped", "USD M")
planSeries = Series("Plan", [12.0, 9.0, 7.0, 6.0, 4.0, 3.0])
actualSeries = Series("Actual", [12.5, 8.2, 7.8, 6.1, 4.2, 3.4])
headHeading = Heading("Headcount by department", "h2")
headChart = HorizontalBarChart(["Engineering", "Sales", "Marketing", "Operations", "Finance", "People"], [headSeries], null, "Employees")
headSeries = Series("Headcount", [120, 85, 40, 60, 25, 30])
risksHeading = Heading("Top risks", "h2")
risksTable = Table([riskName, riskOwner, riskLevel])
riskName = Col("Risk", ["Cloud dependency", "Key person risk in sales", "Supply chain delays", "Regulatory changes", "Talent attrition"])
riskOwner = Col("Owner", ["CTO", "CRO", "COO", "GC", "CHRO"])
riskLevel = Col("Level", ["High", "Medium", "High", "Medium", "Low"])
initHeading = Heading("Strategic initiatives", "h2")
initTable = Table([initName, initStatus])
initName = Col("Initiative", ["AI platform launch", "EU expansion", "Enterprise tier", "Cost optimization", "Customer health program"])
initStatus = Col("Status", ["On track", "At risk", "On track", "Complete", "On track"])
boardHeading = Heading("Next board meeting", "h2")
boardList = ListBlock([boardItem1, boardItem2, boardItem3, boardItem4], "number")
boardItem1 = ListItem("Approve FY2025 budget", "Owner: CFO · Due Nov 20")
boardItem2 = ListItem("Review AI platform launch plan", "Owner: CTO · Due Nov 22")
boardItem3 = ListItem("Ratify EU expansion hiring plan", "Owner: CHRO · Due Nov 25")
boardItem4 = ListItem("Discuss Q4 guidance update", "Owner: CFO · Due Nov 27")
followUps = FollowUpBlock([followUp1, followUp2, followUp3])
followUp1 = FollowUpItem("Drill into Q4 revenue by region")
followUp2 = FollowUpItem("Show the full board deck")
followUp3 = FollowUpItem("Compare budget variances")