

Every state


default


hover


focus


inspect


down
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| title | string | "Orders" | Title text. |
| period | string | "Last 30 days" | The period the card covers ("Last 30 days"). |
| values | number[] | [62, 58, 71, 66, 74, 69, 52, 55, 78, 81, 77, 84, 70, 61, 66, 88, 92, 85, 90, 83, 72, 76, 94, 97, 91, 99, 86, 80, 102,… | One value per point, oldest first. The figure is the sum unless you pass `value`. |
| previous | number[] | null | [55, 60, 57, 63, 59, 66, 48, 51, 64, 62, 68, 65, 58, 50, 56, 71, 69, 74, 70, 67, 57, 60, 73, 71, 76, 78, 66, 63, 79, 82] | The same points one period earlier, drawn dashed. Null or left out: no comparison line. |
| labels | string[] | days | A label per point for the readout and the table ("Tue 12 Nov"). |
| value | number | null | null | The big figure. Left out: the sum of `values`. |
| change | number | null | 21.6 | Change against the previous period, in percent (12.4 = +12.4 %). Null or left out: no change line. |
| unit | string | "orders" | What a value counts, for the readout ("orders"). |
| currentLabel | string | "This period" | Names of the two lines in the legend. |
| previousLabel | string | "Period before" | Previous label. |
| changeLabel | string | "vs the 30 days before" | Words around the change ("vs last month"). |
| format | Intl.NumberFormatOptions | { maximumFractionDigits: 0 } | Number style for the figure and the readout. |
| locale | string | "en-IE" | Locale for numbers and dates. |
| defaultActive | number | null | null | The point the readout starts on (index). Left out: the last point. |
| className | string | – | Extra classes on the outer element. |


