Skip to main content

shapeUsagePanel

@forge/monorepo


@forge/monorepo / frontend/src / shapeUsagePanel

Function: shapeUsagePanel()

shapeUsagePanel(report, options?): UsagePanelData

Defined in: frontend/src/usage-panel.ts:131

Shape a report into panel data.

state is decided from eventCount, not from the bucket array. A range can legitimately contain buckets whose totals are all zero — a rollup job that ran over a quiet hour writes one — and treating that as "loaded" would draw the zeroed chart the empty state exists to avoid.

Parameters

report

UsageReportView | null

options?

error?

boolean

loading?

boolean

Returns

UsagePanelData