Next‑generation predictive chart component built on D3
LineChart
component does this by combining traditional time‑series visualisation with forward‑looking predictions and on‑chart editing. Users can quickly see where things are headed, adjust expectations, and understand the factors driving outcomes – all without leaving the context of the dashboard.
🦐 Why “PRAWN”? Much like its shell‑fish namesake, a PRAWN component should be small, tasty and easy to consume. The acronym captures its four core principles:
Name | Type | Default | Description |
---|---|---|---|
data | DataPoint[] | — | Required data set. Each point contains x , y , and optional currency keys |
prediction | Prediction | MultiPointPrediction | undefined | Expected/optimistic/pessimistic forecast lines |
width | number | 800 | Width in pixels |
height | number | 400 | Height in pixels |
showGrid | boolean | true | Toggles background grid |
showLatestValue | boolean | false | Show sticky latest‑point label |
lineColor | string | #2563eb | Primary line colour |
theme | 'light' | 'dark' | 'light' | Pre‑set colour themes |
utils/types.ts
for advanced options like drag‑to‑edit predictions, custom date formats and currency symbols.
Tour
overlay so you can guide first‑time users through the metrics that matter: