@squadbase/vantage 0.6.2-dev1.9d91dda → 0.6.2-dev1.abc3f77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/dist/add-4GHF2TX2.js +6 -0
  2. package/dist/add-4GHF2TX2.js.map +1 -0
  3. package/dist/{build-TVKFIVFQ.js → build-A23M4GCH.js} +9 -9
  4. package/dist/{build-TVKFIVFQ.js.map → build-A23M4GCH.js.map} +1 -1
  5. package/dist/{check-3KHZXZMQ.js → check-FBHT6W6J.js} +7 -7
  6. package/dist/{check-3KHZXZMQ.js.map → check-FBHT6W6J.js.map} +1 -1
  7. package/dist/chunk-2IAPIOPS.js +152 -0
  8. package/dist/chunk-2IAPIOPS.js.map +1 -0
  9. package/dist/{chunk-5ZOP4SQR.js → chunk-2N72FKLB.js} +12 -7
  10. package/dist/chunk-2N72FKLB.js.map +1 -0
  11. package/dist/chunk-57GHR5LN.js +163 -0
  12. package/dist/chunk-57GHR5LN.js.map +1 -0
  13. package/dist/{chunk-P7W4LR3Z.js → chunk-5C2SEDPH.js} +22 -5
  14. package/dist/chunk-5C2SEDPH.js.map +1 -0
  15. package/dist/chunk-6OTTGAPO.js +44 -0
  16. package/dist/chunk-6OTTGAPO.js.map +1 -0
  17. package/dist/{chunk-RPZAALCX.js → chunk-7S52M2SL.js} +256 -165
  18. package/dist/chunk-7S52M2SL.js.map +1 -0
  19. package/dist/{chunk-U2M6HGKQ.js → chunk-AABMKHEU.js} +4 -4
  20. package/dist/{chunk-U2M6HGKQ.js.map → chunk-AABMKHEU.js.map} +1 -1
  21. package/dist/{chunk-PVTHHV7X.js → chunk-ANZLVSEP.js} +28 -7
  22. package/dist/chunk-ANZLVSEP.js.map +1 -0
  23. package/dist/chunk-CKWPK4RO.js +50 -0
  24. package/dist/chunk-CKWPK4RO.js.map +1 -0
  25. package/dist/{chunk-QI3XQKHS.js → chunk-GNXCX4WE.js} +10 -3
  26. package/dist/chunk-GNXCX4WE.js.map +1 -0
  27. package/dist/chunk-JXFCSF3K.js +673 -0
  28. package/dist/chunk-JXFCSF3K.js.map +1 -0
  29. package/dist/{chunk-PXRX5PEC.js → chunk-PDOBHMUQ.js} +3 -3
  30. package/dist/chunk-PDOBHMUQ.js.map +1 -0
  31. package/dist/chunk-QOXXOFGL.js +7051 -0
  32. package/dist/chunk-QOXXOFGL.js.map +1 -0
  33. package/dist/{chunk-ZVANIULZ.js → chunk-RNTDBX6S.js} +4 -4
  34. package/dist/{chunk-ZVANIULZ.js.map → chunk-RNTDBX6S.js.map} +1 -1
  35. package/dist/{chunk-CEXAQQ5W.js → chunk-S5MDTHH7.js} +180 -18
  36. package/dist/chunk-S5MDTHH7.js.map +1 -0
  37. package/dist/chunk-SDJTTMLK.js +1877 -0
  38. package/dist/chunk-SDJTTMLK.js.map +1 -0
  39. package/dist/{chunk-LMUACBMA.js → chunk-SHZM3EXB.js} +68 -12
  40. package/dist/chunk-SHZM3EXB.js.map +1 -0
  41. package/dist/{chunk-A2UUGASH.js → chunk-U736PVHY.js} +2 -2
  42. package/dist/chunk-U736PVHY.js.map +1 -0
  43. package/dist/{chunk-JKLLFVEU.js → chunk-UWSQUHX6.js} +4 -99
  44. package/dist/chunk-UWSQUHX6.js.map +1 -0
  45. package/dist/cli.js +12 -11
  46. package/dist/cli.js.map +1 -1
  47. package/dist/client/index.d.ts +34 -3
  48. package/dist/client/index.js +211 -12
  49. package/dist/client/index.js.map +1 -1
  50. package/dist/components/index.d.ts +1740 -29
  51. package/dist/components/index.js +7 -4
  52. package/dist/delta-text-CvwBGJ95.d.ts +15 -0
  53. package/dist/{dev-GDKATCC7.js → dev-H4I2JL63.js} +10 -10
  54. package/dist/dev-H4I2JL63.js.map +1 -0
  55. package/dist/doc/index.d.ts +215 -2
  56. package/dist/doc/index.js +309 -5
  57. package/dist/doc/index.js.map +1 -1
  58. package/dist/{docs-EJJ3BECT.js → docs-JVP4RPKT.js} +3 -3
  59. package/dist/{docs-EJJ3BECT.js.map → docs-JVP4RPKT.js.map} +1 -1
  60. package/dist/{doctor-WQXPXP6K.js → doctor-B2O3GJDU.js} +7 -7
  61. package/dist/{doctor-WQXPXP6K.js.map → doctor-B2O3GJDU.js.map} +1 -1
  62. package/dist/format-U0cQl069.d.ts +243 -0
  63. package/dist/markdown/index.js +1 -1
  64. package/dist/markdown/index.js.map +1 -1
  65. package/dist/{preview-OGMCNQUO.js → preview-T6CLSQVX.js} +3 -3
  66. package/dist/{preview-OGMCNQUO.js.map → preview-T6CLSQVX.js.map} +1 -1
  67. package/dist/query/index.d.ts +0 -11
  68. package/dist/query/index.js +2 -2
  69. package/dist/{routes-MWBWWOJ2.js → routes-PVKNT777.js} +6 -6
  70. package/dist/{routes-MWBWWOJ2.js.map → routes-PVKNT777.js.map} +1 -1
  71. package/dist/{search-6Y422SV6.js → search-5LC4XPB5.js} +3 -3
  72. package/dist/{search-6Y422SV6.js.map → search-5LC4XPB5.js.map} +1 -1
  73. package/dist/slide/index.d.ts +272 -1
  74. package/dist/slide/index.js +974 -4
  75. package/dist/slide/index.js.map +1 -1
  76. package/dist/table/index.js +14 -10
  77. package/dist/table/index.js.map +1 -1
  78. package/dist/ui/index.d.ts +148 -12
  79. package/dist/ui/index.js +1340 -88
  80. package/dist/ui/index.js.map +1 -1
  81. package/dist/{upgrade-HCANX4GQ.js → upgrade-6DT7ADRP.js} +7 -7
  82. package/dist/{upgrade-HCANX4GQ.js.map → upgrade-6DT7ADRP.js.map} +1 -1
  83. package/dist/vite/index.d.ts +10 -0
  84. package/dist/vite/index.js +4 -4
  85. package/docs/en/changelog.md +2 -0
  86. package/docs/en/components.md +42 -17
  87. package/docs/en/doc/delta-text.md +40 -0
  88. package/docs/en/doc/doc-action-items.md +49 -0
  89. package/docs/en/doc/doc-callout.md +38 -0
  90. package/docs/en/doc/doc-data-table.md +60 -0
  91. package/docs/en/doc/doc-executive-summary.md +64 -0
  92. package/docs/en/doc/doc-figure.md +56 -0
  93. package/docs/en/doc/doc-key-findings.md +61 -0
  94. package/docs/en/doc/doc-kpi-scorecard.md +80 -0
  95. package/docs/en/doc/doc-notes-and-sources.md +43 -0
  96. package/docs/en/doc/doc-report-header.md +46 -0
  97. package/docs/en/pages-and-metadata.md +15 -0
  98. package/docs/en/parts/area-chart.md +99 -0
  99. package/docs/en/parts/bar-chart.md +91 -0
  100. package/docs/en/parts/bar-list.md +50 -0
  101. package/docs/en/parts/category-bar.md +37 -0
  102. package/docs/en/parts/chart-frame.md +39 -0
  103. package/docs/en/parts/data-table.md +22 -0
  104. package/docs/en/parts/delta.md +51 -0
  105. package/docs/en/parts/donut-chart.md +72 -0
  106. package/docs/en/parts/format.md +43 -0
  107. package/docs/en/parts/funnel-steps.md +2 -1
  108. package/docs/en/parts/heatmap.md +53 -0
  109. package/docs/en/parts/kpi-card.md +58 -0
  110. package/docs/en/parts/legend.md +35 -0
  111. package/docs/en/parts/line-chart.md +94 -0
  112. package/docs/en/parts/metric-value.md +3 -2
  113. package/docs/en/parts/progress-circle.md +33 -0
  114. package/docs/en/parts/sample-data.md +39 -0
  115. package/docs/en/parts/scatter-chart.md +56 -0
  116. package/docs/en/parts/sparkline.md +1 -1
  117. package/docs/en/parts/tracker.md +36 -0
  118. package/docs/en/parts/trend-indicator.md +17 -1
  119. package/docs/en/parts/updated-at.md +30 -0
  120. package/docs/en/parts/waterfall-chart.md +56 -0
  121. package/docs/en/slide/slide-chart-full.md +48 -0
  122. package/docs/en/slide/slide-chart-insight.md +52 -0
  123. package/docs/en/slide/slide-columns.md +46 -0
  124. package/docs/en/slide/slide-comparison.md +68 -0
  125. package/docs/en/slide/slide-cover.md +39 -0
  126. package/docs/en/slide/slide-exec-summary.md +47 -0
  127. package/docs/en/slide/slide-heading.md +38 -0
  128. package/docs/en/slide/slide-kpi-grid.md +55 -0
  129. package/docs/en/slide/slide-kpi-hero.md +58 -0
  130. package/docs/en/slide/slide-next-actions.md +49 -0
  131. package/docs/en/slide/slide-scorecard-table.md +54 -0
  132. package/docs/en/slide/slide-section.md +44 -0
  133. package/docs/en/slide/slide-source-line.md +34 -0
  134. package/docs/en/ui/alert-dialog.md +42 -0
  135. package/docs/en/ui/avatar.md +31 -0
  136. package/docs/en/ui/combobox.md +74 -0
  137. package/docs/en/ui/drawer.md +41 -0
  138. package/docs/en/ui/empty.md +1 -1
  139. package/docs/en/ui/error-state.md +4 -3
  140. package/docs/en/ui/field.md +42 -0
  141. package/docs/en/ui/hover-card.md +21 -0
  142. package/docs/en/ui/kbd.md +17 -0
  143. package/docs/en/ui/loading.md +1 -1
  144. package/docs/en/ui/pagination.md +36 -0
  145. package/docs/en/ui/radio-group.md +21 -0
  146. package/docs/en/ui/toast.md +44 -0
  147. package/docs/en/ui/toggle-group.md +4 -3
  148. package/docs/en/ui-and-theming.md +1 -1
  149. package/docs/index.json +1184 -114
  150. package/docs/ja/changelog.md +33 -0
  151. package/docs/ja/components.md +68 -101
  152. package/docs/ja/doc/delta-text.md +40 -0
  153. package/docs/ja/doc/doc-action-items.md +49 -0
  154. package/docs/ja/doc/doc-callout.md +38 -0
  155. package/docs/ja/doc/doc-data-table.md +60 -0
  156. package/docs/ja/doc/doc-executive-summary.md +64 -0
  157. package/docs/ja/doc/doc-figure.md +56 -0
  158. package/docs/ja/doc/doc-key-findings.md +61 -0
  159. package/docs/ja/doc/doc-kpi-scorecard.md +80 -0
  160. package/docs/ja/doc/doc-notes-and-sources.md +43 -0
  161. package/docs/ja/doc/doc-report-header.md +46 -0
  162. package/docs/ja/page-types/csv.md +83 -0
  163. package/docs/ja/page-types/doc.md +83 -0
  164. package/docs/ja/page-types/excel.md +82 -0
  165. package/docs/ja/page-types/slide.md +133 -0
  166. package/docs/ja/page-types.md +47 -0
  167. package/docs/ja/pages-and-metadata.md +15 -0
  168. package/docs/ja/parts/area-chart.md +85 -0
  169. package/docs/ja/parts/bar-chart.md +95 -0
  170. package/docs/ja/parts/bar-list.md +58 -0
  171. package/docs/ja/parts/category-bar.md +36 -0
  172. package/docs/ja/parts/chart-frame.md +36 -0
  173. package/docs/ja/parts/data-table.md +22 -0
  174. package/docs/ja/parts/delta.md +51 -0
  175. package/docs/ja/parts/donut-chart.md +66 -0
  176. package/docs/ja/parts/echart.md +3 -0
  177. package/docs/ja/parts/format.md +44 -0
  178. package/docs/ja/parts/funnel-steps.md +27 -8
  179. package/docs/ja/parts/heatmap.md +45 -0
  180. package/docs/ja/parts/kpi-card.md +56 -0
  181. package/docs/ja/parts/legend.md +36 -0
  182. package/docs/ja/parts/line-chart.md +84 -0
  183. package/docs/ja/parts/metric-value.md +3 -2
  184. package/docs/ja/parts/progress-circle.md +34 -0
  185. package/docs/ja/parts/sample-data.md +61 -0
  186. package/docs/ja/parts/scatter-chart.md +69 -0
  187. package/docs/ja/parts/sparkline.md +2 -2
  188. package/docs/ja/parts/tracker.md +32 -0
  189. package/docs/ja/parts/trend-indicator.md +17 -1
  190. package/docs/ja/parts/updated-at.md +27 -0
  191. package/docs/ja/parts/waterfall-chart.md +61 -0
  192. package/docs/ja/routing.md +8 -86
  193. package/docs/ja/slide/slide-chart-full.md +48 -0
  194. package/docs/ja/slide/slide-chart-insight.md +52 -0
  195. package/docs/ja/slide/slide-columns.md +46 -0
  196. package/docs/ja/slide/slide-comparison.md +68 -0
  197. package/docs/ja/slide/slide-cover.md +39 -0
  198. package/docs/ja/slide/slide-exec-summary.md +47 -0
  199. package/docs/ja/slide/slide-heading.md +38 -0
  200. package/docs/ja/slide/slide-kpi-grid.md +55 -0
  201. package/docs/ja/slide/slide-kpi-hero.md +58 -0
  202. package/docs/ja/slide/slide-next-actions.md +49 -0
  203. package/docs/ja/slide/slide-scorecard-table.md +54 -0
  204. package/docs/ja/slide/slide-section.md +44 -0
  205. package/docs/ja/slide/slide-source-line.md +34 -0
  206. package/docs/ja/ui/alert-dialog.md +41 -0
  207. package/docs/ja/ui/avatar.md +31 -0
  208. package/docs/ja/ui/combobox.md +74 -0
  209. package/docs/ja/ui/drawer.md +41 -0
  210. package/docs/ja/ui/empty.md +1 -1
  211. package/docs/ja/ui/error-state.md +4 -3
  212. package/docs/ja/ui/field.md +42 -0
  213. package/docs/ja/ui/hover-card.md +21 -0
  214. package/docs/ja/ui/kbd.md +16 -0
  215. package/docs/ja/ui/loading.md +1 -1
  216. package/docs/ja/ui/pagination.md +36 -0
  217. package/docs/ja/ui/radio-group.md +21 -0
  218. package/docs/ja/ui/toast.md +46 -0
  219. package/docs/ja/ui/toggle-group.md +4 -3
  220. package/docs/ja/ui-and-theming.md +14 -7
  221. package/package.json +41 -31
  222. package/registry/ui/accordion.tsx +76 -0
  223. package/registry/ui/alert-dialog.tsx +189 -0
  224. package/registry/ui/alert.tsx +80 -0
  225. package/registry/ui/app-shell.tsx +287 -0
  226. package/registry/ui/area-chart.tsx +3701 -0
  227. package/registry/ui/attention-list.tsx +303 -0
  228. package/registry/ui/avatar.tsx +110 -0
  229. package/registry/ui/badge.tsx +56 -0
  230. package/registry/ui/bar-chart.tsx +3698 -0
  231. package/registry/ui/bar-list.tsx +3743 -0
  232. package/registry/ui/box-plot-chart.tsx +3906 -0
  233. package/registry/ui/breadcrumb.tsx +128 -0
  234. package/registry/ui/button.tsx +62 -0
  235. package/registry/ui/calendar.tsx +223 -0
  236. package/registry/ui/card.tsx +107 -0
  237. package/registry/ui/category-bar.tsx +1290 -0
  238. package/registry/ui/chart-frame.tsx +1393 -0
  239. package/registry/ui/checkbox.tsx +30 -0
  240. package/registry/ui/collapsible.tsx +23 -0
  241. package/registry/ui/combobox.tsx +310 -0
  242. package/registry/ui/command.tsx +198 -0
  243. package/registry/ui/dashboard-card.tsx +217 -0
  244. package/registry/ui/data-table.tsx +693 -146
  245. package/registry/ui/date-range-picker.tsx +390 -0
  246. package/registry/ui/delta.tsx +191 -0
  247. package/registry/ui/dialog.tsx +161 -0
  248. package/registry/ui/donut-chart.tsx +3751 -0
  249. package/registry/ui/drawer.tsx +229 -0
  250. package/registry/ui/dropdown-menu.tsx +274 -0
  251. package/registry/ui/echart.tsx +1040 -0
  252. package/registry/ui/field.tsx +240 -0
  253. package/registry/ui/filter-bar.tsx +392 -0
  254. package/registry/ui/funnel-steps.tsx +3569 -0
  255. package/registry/ui/heatmap.tsx +1786 -0
  256. package/registry/ui/histogram-chart.tsx +3986 -0
  257. package/registry/ui/hover-card.tsx +52 -0
  258. package/registry/ui/input-group.tsx +160 -0
  259. package/registry/ui/input.tsx +24 -0
  260. package/registry/ui/kbd.tsx +30 -0
  261. package/registry/ui/kpi-card.tsx +704 -0
  262. package/registry/ui/label.tsx +22 -0
  263. package/registry/ui/legend.tsx +3563 -0
  264. package/registry/ui/line-chart.tsx +3699 -0
  265. package/registry/ui/metric-value.tsx +62 -0
  266. package/registry/ui/multi-select.tsx +232 -0
  267. package/registry/ui/page-shell.tsx +282 -0
  268. package/registry/ui/pagination.tsx +140 -0
  269. package/registry/ui/paired-chart.tsx +3827 -0
  270. package/registry/ui/placeholder.tsx +36 -0
  271. package/registry/ui/popover.tsx +92 -0
  272. package/registry/ui/progress-circle.tsx +867 -0
  273. package/registry/ui/progress.tsx +85 -0
  274. package/registry/ui/radio-group.tsx +39 -0
  275. package/registry/ui/sample-data.tsx +86 -0
  276. package/registry/ui/scatter-chart.tsx +4212 -0
  277. package/registry/ui/scroll-area.tsx +56 -0
  278. package/registry/ui/searchable-select.tsx +214 -0
  279. package/registry/ui/section-header.tsx +43 -0
  280. package/registry/ui/segmented-control.tsx +76 -0
  281. package/registry/ui/select.tsx +255 -0
  282. package/registry/ui/separator.tsx +27 -0
  283. package/registry/ui/sheet.tsx +139 -0
  284. package/registry/ui/sidebar.tsx +725 -0
  285. package/registry/ui/skeleton.tsx +17 -0
  286. package/registry/ui/slider.tsx +56 -0
  287. package/registry/ui/sparkline.tsx +230 -0
  288. package/registry/ui/spinner.tsx +14 -0
  289. package/registry/ui/states.tsx +90 -0
  290. package/registry/ui/status-badge.tsx +121 -0
  291. package/registry/ui/switch.tsx +34 -0
  292. package/registry/ui/table.tsx +118 -0
  293. package/registry/ui/tabs.tsx +84 -0
  294. package/registry/ui/textarea.tsx +22 -0
  295. package/registry/ui/toast.tsx +250 -0
  296. package/registry/ui/toggle-group.tsx +91 -0
  297. package/registry/ui/toggle.tsx +47 -0
  298. package/registry/ui/tooltip.tsx +72 -0
  299. package/registry/ui/tracker.tsx +849 -0
  300. package/registry/ui/trend-indicator.tsx +74 -0
  301. package/registry/ui/updated-at.tsx +122 -0
  302. package/registry/ui/waterfall-chart.tsx +4248 -0
  303. package/skills/vantage-add-feature/SKILL.md +9 -7
  304. package/skills/vantage-design/SKILL.md +34 -24
  305. package/skills/vantage-design/references/extract.md +16 -14
  306. package/skills/vantage-design/references/format.md +6 -5
  307. package/skills/vantage-design/references/presets.md +60 -110
  308. package/skills/vantage-pitfalls/SKILL.md +10 -1
  309. package/skills/vantage-slide/SKILL.md +54 -36
  310. package/templates/AGENTS.md +26 -3
  311. package/templates/agents/csv.md +2 -1
  312. package/templates/agents/doc.md +52 -3
  313. package/templates/agents/page.md +54 -9
  314. package/templates/agents/slide.md +70 -2
  315. package/templates/agents/xlsx.md +2 -1
  316. package/theme.css +247 -138
  317. package/dist/add-DY4AXANK.js +0 -6
  318. package/dist/add-DY4AXANK.js.map +0 -1
  319. package/dist/chunk-5ZOP4SQR.js.map +0 -1
  320. package/dist/chunk-A2UUGASH.js.map +0 -1
  321. package/dist/chunk-CEXAQQ5W.js.map +0 -1
  322. package/dist/chunk-DTDVSFRY.js +0 -29
  323. package/dist/chunk-DTDVSFRY.js.map +0 -1
  324. package/dist/chunk-JKLLFVEU.js.map +0 -1
  325. package/dist/chunk-LMUACBMA.js.map +0 -1
  326. package/dist/chunk-NKFBFDRZ.js +0 -2241
  327. package/dist/chunk-NKFBFDRZ.js.map +0 -1
  328. package/dist/chunk-P7W4LR3Z.js.map +0 -1
  329. package/dist/chunk-PVTHHV7X.js.map +0 -1
  330. package/dist/chunk-PXRX5PEC.js.map +0 -1
  331. package/dist/chunk-QI3XQKHS.js.map +0 -1
  332. package/dist/chunk-RPZAALCX.js.map +0 -1
  333. package/dist/chunk-VA776YE5.js +0 -316
  334. package/dist/chunk-VA776YE5.js.map +0 -1
  335. package/dist/dev-GDKATCC7.js.map +0 -1
@@ -0,0 +1,94 @@
1
+ # LineChart
2
+
3
+ > A typed line chart for trends and comparisons. Pass rows, the x-axis column and the series columns.
4
+
5
+ Draws one or more series as lines. Pass **the rows (`data`), the x-axis column (`index`) and the
6
+ series columns (`categories`)** instead of an ECharts option; the legend, tooltip and axis formats
7
+ come with it. Colours follow the `--chart-1` … `--chart-5` tokens and track light / dark. Under the
8
+ hood it is an [`EChart`](parts/echart) inside a chart frame (title, summary, loading
9
+ skeleton, empty state). The value axis starts at 0 unless `lineOptions.fitToData` is set.
10
+
11
+ ```tsx
12
+ import { LineChart } from "@squadbase/vantage/components";
13
+ import type { LineChartProps, ChartEventPayload } from "@squadbase/vantage/components";
14
+ ```
15
+
16
+ | Prop | Type | Default | Description |
17
+ | --- | --- | --- | --- |
18
+ | `data` | `Record<string, unknown>[]` | | An array of rows. **Required.** One row is one x-axis point. Numeric columns are a number or a numeric string (such as a SQL DECIMAL); anything else counts as a gap. |
19
+ | `index` | `string` | | The column used for the x axis. **Required.** |
20
+ | `categories` | `string[]` | | The columns drawn as series. **Required.** Their order is the legend and colour order. Six or more fold into the five largest by total plus an Other series. |
21
+ | `lineOptions` | `LineChartOptions` | | Line-specific settings: `{ curveType, connectNulls, fitToData, targetLabelPosition }`. **Prefer this.** Takes precedence over the deprecated flat props of the same name. See below. |
22
+ | `forecast` | `ChartForecast` | | A forecast continuing one series: `{ data, category?, label? }`. `data` rows share the `index` key and carry the predicted value and an optional range. Always drawn as a dashed, lighter line. |
23
+ | `comparison` | `ChartComparison` | | Turns one of `categories` into a comparison line (prior year, plan…): `{ category, vs: "prior-period" \| "prior-year" \| "target" \| "custom", label? }`. Drawn as a thin grey line with no markers; the tooltip adds the main series' difference from it. `label` is required for `custom`. |
24
+ | `colors` | `ChartColors` | `["chart-1", …, "chart-5"]` | Series colours: `"chart-1"` … `"chart-5"` or a semantic tone (`"positive"` / `"warning"` / `"negative"` / `"neutral"`). An array follows series order; a record is keyed by series name. |
25
+ | `labels` | `Record<string, string>` | | Maps `index` values and series names to display names (axes, legend, tooltip, data table). |
26
+ | `format` | `ValueFormat` | `"compact"` | Number format: `"compact"` / `"number"` / `"currency"` / `"percent"` / `"multiple"` / `"duration"`, or `{ type, digits, currency, notation, unit, divisor, durationUnit }`. Same values as the KPI components. Axes use a short form; the tooltip uses the same format. |
27
+ | `valueFormatter` | `(value: number) => string` | | A function escape hatch for the format. Takes precedence over `format`; kept for compatibility. |
28
+ | `title` | `string` | | The chart heading. It labels the plot area for screen readers. |
29
+ | `summary` | `string \| "auto"` | | A one-sentence summary shown under the title and used as the plot's `aria-describedby`. `"auto"` builds one from `data`. Omitted means no summary. |
30
+ | `isLoading` | `boolean` | | Show a skeleton shaped like the final chart, at the same height. |
31
+ | `emptyState` | `ChartEmptyState` | | What to show when `data` is empty: `{ title?, description?, action? }`. The frame keeps its height. `action` takes one node, such as a button. |
32
+ | `height` | `number \| string` | `288` | Plot-area height in px. A CSS length string is accepted for compatibility only and is deprecated; pass a number. |
33
+ | `actions` | `boolean \| { includeTitle?: boolean }` | `false` | Show PNG save / copy buttons at the top right on hover. The PNG includes the title and summary unless you pass `{ includeTitle: false }`. |
34
+ | `fileName` | `string` | `"chart.png"` | File name for the saved PNG. Use with `actions`. |
35
+ | `chartOptions` | `EChartsOption` | | An escape hatch deep-merged last into the generated ECharts option. |
36
+ | `highlight` | `"auto" \| "none"` | `"auto"` | Label the max and latest value (first series only, two series or fewer). |
37
+ | `provisionalFrom` | `string \| number` | | An `index` value; points from here on are provisional and drawn lighter or dashed. Distinct from `forecast`. |
38
+ | `provisionalLabel` | `string` | | Name of the provisional range in legend and tooltip. |
39
+ | `target` | `number` | | A target value, drawn as a dotted horizontal line. The value axis always includes it. |
40
+ | `targetLabel` | `string` | | Label for the target line. |
41
+ | `annotations` | `ChartAnnotation[]` | | Notes at given positions: `{ at, label, to? }`. `at` / `to` are `index` values; with `to` it becomes a band, otherwise a vertical line. |
42
+ | `showLegend` | `boolean` | `true` | Show the legend. |
43
+ | `showTooltip` | `boolean` | `true` | Show the tooltip on hover. |
44
+ | `showGridLines` | `boolean` | `true` | Grid lines on the value axis. |
45
+ | `showXAxis` | `boolean` | `true` | Show the x axis. |
46
+ | `showYAxis` | `boolean` | `true` | Show the y axis. |
47
+ | `startEndOnly` | `boolean` | `false` | Label only the first and last x-axis ticks. |
48
+ | `yAxisWidth` | `number` | | Width of the y-axis labels (px). Fix it to align plot areas across stacked charts. |
49
+ | `minValue` | `number` | | Lower bound of the value axis; the line chart starts from the value you give. The axis widens if the data goes below it. |
50
+ | `maxValue` | `number` | | Upper bound of the value axis. The axis widens if the data exceeds it. Pass the same value to charts you compare side by side. |
51
+ | `allowDecimals` | `boolean` | `true` | `false` limits ticks to integers. |
52
+ | `xAxisLabel` | `string` | | Name of the x axis. |
53
+ | `yAxisLabel` | `string` | | Name of the y axis. |
54
+ | `onValueChange` | `(value: ChartEventPayload \| null) => void` | | Called on a click. Receives the clicked row plus `eventType` and `categoryClicked` (the series name); clicking the same point again passes `null`. When set, everything but the selection dims. |
55
+ | `ariaLabel` | `string` | | Screen-reader label for the plot area when there is no `title`. |
56
+ | `className` | `string` | | Classes to add (to the outer `<figure>`). |
57
+ | `curveType` | `"linear" \| "smooth" \| "step"` | | **Deprecated.** Use `lineOptions.curveType`. |
58
+ | `connectNulls` | `boolean` | | **Deprecated.** Use `lineOptions.connectNulls`. |
59
+ | `autoMinValue` | `boolean` | | **Deprecated.** Use `lineOptions.fitToData`. |
60
+ | `loading` | `boolean` | | **Deprecated.** Use `isLoading`. |
61
+
62
+ ## lineOptions
63
+
64
+ | Prop | Type | Default | Description |
65
+ | --- | --- | --- | --- |
66
+ | `curveType` | `"linear" \| "smooth" \| "step"` | `"linear"` | The line shape. |
67
+ | `connectNulls` | `boolean` | `false` | Join the line across gaps (`null` values). |
68
+ | `fitToData` | `boolean` | `false` | Fit the value axis to the data range instead of starting at 0. The lowest tick label is omitted so it does not collide with the first x label (the grid line stays). |
69
+ | `targetLabelPosition` | `"start" \| "end" \| "legend"` | `"start"` | Where the `target` label goes: above the line's left end, above its right end, or in the legend only (when the area around the line is crowded). The legend always names the target. |
70
+
71
+ > [!WARNING]
72
+ > The flat `curveType`, `connectNulls` and `autoMinValue` props still work but are **deprecated**. Use
73
+ > `lineOptions.curveType`, `lineOptions.connectNulls` and `lineOptions.fitToData`; when both are
74
+ > given, `lineOptions` wins.
75
+
76
+ ## Comparing against last year
77
+
78
+ Mark one of `categories` as a comparison line with `comparison`. It is drawn as a thin grey line
79
+ with no markers, and the tooltip adds the main series' difference from it.
80
+
81
+ ```tsx
82
+ <LineChart
83
+ data={rows}
84
+ index="month"
85
+ categories={["Revenue", "Last year"]}
86
+ comparison={{ category: "Last year", vs: "prior-year" }}
87
+ />
88
+ ```
89
+
90
+ ## LineChart or EChart
91
+
92
+ Start with this typed chart. Reach for [`EChart`](parts/echart) only for what these
93
+ props cannot express — dual axes, scatter plots, heatmaps. Small tweaks can go through
94
+ `chartOptions`.
@@ -2,7 +2,8 @@
2
2
 
3
3
  > The KPI number, with MetricUnit for the unit.
4
4
 
5
- A tight-tracking display for a KPI's number. Units and other trailing text go in `MetricUnit`.
5
+ A tight-tracking display for a KPI's number. Units and other trailing text go in `MetricUnit`. For a whole KPI
6
+ tile, consider [`KpiCard`](parts/kpi-card) first — it also shows the change and the previous actual.
6
7
 
7
8
  ```tsx
8
9
  import { MetricValue, MetricUnit, metricValueVariants } from "@squadbase/vantage/components";
@@ -18,6 +19,6 @@ It carries vertical margin (`my-4`) by default. Inside a card, pass `className="
18
19
  ```tsx
19
20
  <DashboardCardPreset title="Revenue">
20
21
  <MetricValue className="my-0">$12,400</MetricValue>
21
- <TrendIndicator value={12.4} direction="up" />
22
+ <Delta value={12_400} comparison={{ previous: 11_030, vs: "prior-period" }} />
22
23
  </DashboardCardPreset>
23
24
  ```
@@ -0,0 +1,33 @@
1
+ # ProgressCircle
2
+
3
+ > A ring showing progress toward a target, with anything you like in the middle.
4
+
5
+ Fills the ring to `value / max`. Children sit in the centre, so put the percentage or an icon
6
+ there. It is a single `<svg>`, so a row of them in KPI tiles stays light.
7
+
8
+ ```tsx
9
+ import { ProgressCircle } from "@squadbase/vantage/components";
10
+ ```
11
+
12
+ | Prop | Type | Default | Description |
13
+ | --- | --- | --- | --- |
14
+ | `value` | `number` | `0` | Current value, clamped to `0`–`max`. |
15
+ | `max` | `number` | `100` | The value of a full ring. |
16
+ | `radius` | `number` | `32` | Outer radius in px. The whole part is `radius * 2` square. |
17
+ | `strokeWidth` | `number` | `6` | Stroke width in px. |
18
+ | `color` | `ChartColor` | `"chart-1"` | `"chart-1"` … `"chart-5"`, a meaning colour (`"positive"` …) or a CSS colour. The track is the same colour, lightened. |
19
+ | `showAnimation` | `boolean` | `false` | Animate on mount and when the value changes. Always off under `prefers-reduced-motion`. |
20
+ | `children` | `ReactNode` | | What to put in the centre (e.g. `72%`). |
21
+ | `className` | `string` | | Classes to add. |
22
+
23
+ Remaining props go to the outer `<div>`, which carries `role="progressbar"` and `aria-valuenow`.
24
+
25
+ ## Formatting is up to you
26
+
27
+ The centre is just your children. To show a real number rather than a percentage, write it there.
28
+
29
+ ```tsx
30
+ <ProgressCircle value={3_400_000} max={5_000_000} radius={40} strokeWidth={8}>
31
+ <span className="text-xs">3.4M</span>
32
+ </ProgressCircle>
33
+ ```
@@ -0,0 +1,39 @@
1
+ # SampleData
2
+
3
+ > Marks the values inside it as sample values that are not yet connected to real data.
4
+
5
+ Wrap a draft laid out before its queries are wired, or a screen built from column definitions only,
6
+ and every card inside is marked as showing sample values. This is not the same as `provisional` on
7
+ `KpiCard` and the charts, which means *preliminary*: real values that are not final yet. For a single
8
+ value in running text or a heading, use [`Placeholder`](parts/placeholder) instead.
9
+
10
+ ```tsx
11
+ import { SampleData, SampleBadge } from "@squadbase/vantage/components";
12
+ import type { SampleDataProps, SampleBadgeProps } from "@squadbase/vantage/components";
13
+ ```
14
+
15
+ | Prop | Type | Default | Description |
16
+ | --- | --- | --- | --- |
17
+ | `label` | `string` | `"見本の値"` | Text of the mark. |
18
+ | `children` | `ReactNode` | | The cards to mark. |
19
+
20
+ ## How it behaves
21
+
22
+ - **No box of its own.** It renders `display: contents`, so the grid of the parent still sees the
23
+ cards inside as its direct children, and `KpiCard` rows keep lining up.
24
+ - **The card shows the mark.** The nearest `KpiCard` or `DashboardCardPreset` inside it puts a
25
+ `SampleBadge` in its header, once (also while loading). A card claims the mark, so parts anywhere
26
+ inside that card do not repeat it. Put a bare chart in a `DashboardCardPreset` to have it marked.
27
+ - **The mark is a word, not only a colour.** It uses `--warning` on `--warning-subtle`, and its
28
+ `title` says what it means.
29
+
30
+ ```tsx
31
+ <SampleData>
32
+ <KpiCard label="Revenue" value={12400000} format={{ type: "currency", currency: "JPY" }} />
33
+ </SampleData>
34
+ ```
35
+
36
+ ## SampleBadge
37
+
38
+ `SampleBadge` is the mark itself, for placing by hand. It takes `label` (default `"見本の値"`) and
39
+ the usual `<span>` attributes.
@@ -0,0 +1,56 @@
1
+ # ScatterChart
2
+
3
+ > A typed scatter chart, or bubble chart with `size`. Shows how two numbers relate across items.
4
+
5
+ Each row is one point: pass the column for the x axis (`x`) and the y axis (`y`). Add `size` for a
6
+ bubble chart, `series` to colour by group, and `referenceLines` for targets or averages. Both axes
7
+ fit the data rather than starting at 0, because a scatter plot is read by position. It renders
8
+ inside [`ChartFrame`](parts/chart-frame).
9
+
10
+ ```tsx
11
+ import { ScatterChart } from "@squadbase/vantage/components";
12
+ import type { ScatterChartProps, ScatterReferenceLine } from "@squadbase/vantage/components";
13
+ ```
14
+
15
+ | Prop | Type | Default | Description |
16
+ | --- | --- | --- | --- |
17
+ | `data` | `T[]` | | One row per point. **Required.** Rows whose x or y is not a number are not drawn. |
18
+ | `x` | `NumericKeys<T>` | | The column for the horizontal axis, e.g. `"adSpend"`. **Required.** |
19
+ | `y` | `NumericKeys<T>` | | The column for the vertical axis, e.g. `"revenue"`. **Required.** |
20
+ | `size` | `NumericKeys<T>` | | The column for point area; turns this into a bubble chart. Area is proportional from 0; `null` and values ≤ 0 get the smallest size. The value shows in the tooltip. |
21
+ | `index` | `keyof T` | | The column naming each point. It becomes the tooltip heading and the data table's first column. |
22
+ | `labelKey` | `keyof T` | | The column printed beside each point (store name, say). Overlapping labels are thinned; the tooltip always has it. With `highlight`, non-highlighted series get no label. |
23
+ | `series` | `keyof T` | | The column to split series by (e.g. `"channel"`). Each value gets a colour and a legend entry. Beyond five series, the five largest stay and the rest fold into a grey "Other". |
24
+ | `seriesLabel` | `string` | | A small heading to the left of the legend, shown only when a legend is shown. |
25
+ | `highlight` | `string \| string[]` | | Series (values of the `series` column) to bring forward. They are drawn opaque and in front; the rest fade behind. Ignored when nothing matches. |
26
+ | `referenceLines` | `ScatterReferenceLine[]` | | `{ axis: "x" \| "y"; value: number; label?: string }`. Draws a vertical (`x`) or horizontal (`y`) neutral line, widening the axis to include it. |
27
+ | `colors` | `ChartSeriesColor[] \| Record<string, ChartSeriesColor>` | | Series colours: an array in order of appearance, or a record by series name. "Other" is always grey. |
28
+ | `labels` | `Record<string, string>` | | Column name or series value → display name, used in axis titles, legend, tooltip and the data table. |
29
+ | `format` | `ValueFormat` | `"compact"` | Default format for x, y and size. Override per axis with `xFormat` / `yFormat` / `sizeFormat`. |
30
+ | `xFormat` | `ValueFormat` | | Format of the x axis and x values. Wins over `format`. |
31
+ | `yFormat` | `ValueFormat` | | Format of the y axis and y values. Wins over `format`. |
32
+ | `sizeFormat` | `ValueFormat` | | Format of `size` values (tooltip, table). Wins over `format`. |
33
+ | `valueFormatter` | `(value: number) => string` | | Escape hatch: one function for x, y and size that wins over every `format`. |
34
+ | `minValue` | `number` | | Lower limit of the **y** axis. The axis widens if data falls below it. |
35
+ | `maxValue` | `number` | | Upper limit of the **y** axis. The axis widens if data exceeds it. |
36
+ | `xMinValue` | `number` | | Lower limit of the x axis. |
37
+ | `xMaxValue` | `number` | | Upper limit of the x axis. |
38
+ | `fitToData` | `boolean` | `true` | Fit both axes to the data range. `false` starts both at 0. |
39
+ | `showLegend` | `boolean` | `true` | Show the legend (only with two or more series). |
40
+ | `showTooltip` | `boolean` | `true` | Show the tooltip on hover. |
41
+ | `title` | `string` | | Heading of the chart. |
42
+ | `summary` | `string \| "auto"` | | `"auto"` builds one from the point count and the point with the largest y. Omitted means no summary. |
43
+ | `isLoading` | `boolean` | `false` | Show a skeleton with the same height. |
44
+ | `emptyState` | `ChartEmptyState` | | Shown when `data` is empty or no point can be drawn. |
45
+ | `height` | `number` | `288` | Height of the plot area in px. |
46
+ | `chartOptions` | `EChartsOption` | | Escape hatch: deep-merged last into the generated ECharts option. |
47
+ | `actions` | `boolean \| ChartActionsOptions` | `false` | Show PNG save / copy buttons on hover. `{ includeTitle: false }` leaves the heading out of the image. |
48
+ | `fileName` | `string` | `"chart.png"` | File name for the saved PNG. |
49
+ | `ariaLabel` | `string` | | Label read aloud when there is no `title`. |
50
+ | `className` | `string` | | Classes to add (on the outer figure). |
51
+
52
+ ## Comparing several charts
53
+
54
+ To compare scatter plots side by side, give all of them the same `minValue` / `maxValue` and
55
+ `xMinValue` / `xMaxValue` so the axes line up. To share one legend, set `showLegend={false}` on each
56
+ and place a [`Legend`](parts/legend) next to them.
@@ -44,4 +44,4 @@ series. `Sparkline` conveys the *shape* of a series and nothing else — **no ti
44
44
  > [!NOTE]
45
45
  > It is `aria-hidden="true"`, so screen readers skip it. Put the actual number next to it as text —
46
46
  > [`MetricValue`](parts/metric-value) or
47
- > [`TrendIndicator`](parts/trend-indicator).
47
+ > [`Delta`](parts/delta).
@@ -0,0 +1,36 @@
1
+ # Tracker
2
+
3
+ > A row of small blocks, one per period, coloured by status. For uptime and batch results.
4
+
5
+ One period is one block, coloured by status. It suits **consecutive states**: daily uptime, batch
6
+ success or failure, a daily target hit or missed. Hover a block to see its `tooltip`. It is plain
7
+ HTML, not ECharts, and the colours follow the theme.
8
+
9
+ ```tsx
10
+ import { Tracker } from "@squadbase/vantage/components";
11
+ import type { TrackerBlock } from "@squadbase/vantage/components";
12
+ ```
13
+
14
+ | Prop | Type | Default | Description |
15
+ | --- | --- | --- | --- |
16
+ | `data` | `TrackerBlock[]` | | An array of `{ color?: ChartColor; tooltip?: string; key?: string \| number }`. **Required.** Oldest on the left. |
17
+ | `defaultColor` | `ChartColor` | | Colour of blocks with no `color`. Defaults to a lightened muted-foreground grey (for no data / not run). |
18
+ | `hoverEffect` | `boolean` | `true` | Fade the block under the pointer. |
19
+ | `className` | `string` | | Classes to add. The height defaults to `h-6`. |
20
+
21
+ Remaining props go to the outer `<div>`.
22
+
23
+ ## Assigning colours to states
24
+
25
+ `color` is `"positive"` / `"negative"` / `"warning"` / `"info"` (the area tokens, `--<tone>-fill`),
26
+ `"chart-1"` … `"chart-5"`, or a CSS colour.
27
+
28
+ ```tsx
29
+ const COLOR = { ok: "positive", warn: "warning", error: "negative" } as const;
30
+
31
+ <Tracker data={days.map((d) => ({ color: COLOR[d.status], tooltip: `${d.date} ${d.label}` }))} />
32
+ ```
33
+
34
+ > [!NOTE]
35
+ > Colour should not carry the meaning alone. Put the date and the state in `tooltip`; it is also the
36
+ > block's accessible name (`role="img"`), and blocks with a tooltip are keyboard focusable.
@@ -1,6 +1,22 @@
1
1
  # TrendIndicator
2
2
 
3
- > An arrow and a percentage; positiveIsGood decides the colour.
3
+ > Deprecated — use Delta for new code. An arrow and a percentage.
4
+
5
+ > [!WARNING]
6
+ > **Deprecated. Use [`Delta`](parts/delta) in new code.** `TrendIndicator` takes the
7
+ > direction and colour by hand, so the value and the arrow can disagree. `Delta` computes direction,
8
+ > rate, colour and label from the current and compared values. To show a KPI as a card, use
9
+ > [`KpiCard`](parts/kpi-card).
10
+
11
+ ```tsx
12
+ // Before
13
+ <TrendIndicator value={12.4} direction="up" />
14
+ <TrendIndicator value={0.4} direction="down" positiveIsGood={false} />
15
+
16
+ // After
17
+ <Delta value={1_240_000} comparison={{ previous: 1_103_000, vs: "prior-period" }} />
18
+ <Delta value={0.021} comparison={{ previous: 0.026, vs: "prior-period" }} polarity="lower-is-better" />
19
+ ```
4
20
 
5
21
  Shows a change as an arrow plus a percentage. **Up doesn't always mean good**, so the colour comes
6
22
  from `direction` combined with `positiveIsGood` — pass `positiveIsGood={false}` for metrics like
@@ -0,0 +1,30 @@
1
+ # UpdatedAt
2
+
3
+ > A freshness label such as "23 minutes ago". Shows the absolute time and zone on hover.
4
+
5
+ Renders a `<time>` whose `dateTime` is the ISO instant. The absolute time and zone
6
+ (`2026/10/20 16:41 JST`) appear in both a tooltip and the `title` attribute. The label text is
7
+ Japanese, in the form "23 分前に更新".
8
+
9
+ ```tsx
10
+ import { UpdatedAt } from "@squadbase/vantage/components";
11
+ import type { UpdatedAtProps } from "@squadbase/vantage/components";
12
+ ```
13
+
14
+ | Prop | Type | Default | Description |
15
+ | --- | --- | --- | --- |
16
+ | `at` | `Date \| string \| number` | | When the data was last updated. **Required.** |
17
+ | `variant` | `"relative" \| "absolute-first"` | `"relative"` | `"relative"` reads "23 分前に更新". `"absolute-first"` reads "16:41 更新(23 分前)", with the date added when it is not today. Use it on pages where "now" matters. |
18
+ | `timeZone` | `string` | | IANA time zone for the absolute time (e.g. `"Asia/Tokyo"`). Defaults to the runtime's zone. |
19
+ | `prefix` | `string` | | Text placed before the label, e.g. `"売上データ: "`. |
20
+ | `now` | `Date \| number` | | A fixed "current time" for tests and fixtures. It also disables the 60-second refresh. |
21
+ | `className` | `string` | | Classes to add. |
22
+
23
+ ## Hydration
24
+
25
+ The text depends on the clock and time zone of whoever renders, so the first render (server and
26
+ client) is an empty `<time>` carrying only the ISO `dateTime`. After mount it fills in the label and
27
+ refreshes every 60 seconds; the interval is cleared on unmount. The `<time>` sets
28
+ `suppressHydrationWarning`, so sample data built from `Date.now()` at module load does not warn.
29
+
30
+ Within a minute of `now`, the label reads "たった今" ("just now").
@@ -0,0 +1,56 @@
1
+ # WaterfallChart
2
+
3
+ > A typed waterfall chart. Shows how steps move a running total, such as revenue to gross profit.
4
+
5
+ Pass the steps as rows, the name column (`index`) and the amount column (`categories`), and it draws
6
+ a waterfall instead of you writing an ECharts option. Each row moves the running total by its value;
7
+ rows named in `totals` are bars from 0 to the total. Every step also prints its signed amount, so
8
+ colour is never the only carrier of direction. It renders inside
9
+ [`ChartFrame`](parts/chart-frame).
10
+
11
+ ```tsx
12
+ import { WaterfallChart } from "@squadbase/vantage/components";
13
+ import type { WaterfallChartProps, WaterfallMode } from "@squadbase/vantage/components";
14
+ ```
15
+
16
+ | Prop | Type | Default | Description |
17
+ | --- | --- | --- | --- |
18
+ | `data` | `T[]` | | The steps, left to right in row order. **Required.** |
19
+ | `index` | `keyof T` | | The column holding each step's name. **Required.** |
20
+ | `categories` | `NumericKeys<T>[]` | | The amount column as a one-element array. **Required.** Only the first is used. Values are numbers or numeric strings. |
21
+ | `totals` | `string[]` | | The `index` values of rows that are totals (e.g. `["Revenue", "Gross profit"]`). A total with a `null` value takes the running total so far; with a value, that value becomes the total and later steps continue from it. |
22
+ | `polarity` | `"higher-is-better" \| "lower-is-better" \| "neutral"` | `"higher-is-better"` | Whether an increase is good. Increases and decreases use `--positive-fill` / `--negative-fill`; `lower-is-better` swaps them (for churn, say), `neutral` uses one neutral colour. |
23
+ | `mode` | `"total" \| "delta"` | `"total"` | `"total"` draws totals as bars from 0. `"delta"` draws only the moves on a cumulative-change axis from 0, prints the opening and closing values in a note above the plot, and appends a net-change bar. Use it when the moves are small against the total (roughly under 5%). |
24
+ | `labels` | `Record<string, string>` | | Step name → display name, used on the axis, in the tooltip and the data table. Pass the `index` key to rename the table's first column. |
25
+ | `minValue` | `number` | | Lower limit of the value axis. The axis always includes 0, so only values ≤ 0 matter. It widens rather than clips. Pass the same `minValue` / `maxValue` to charts you compare side by side. |
26
+ | `maxValue` | `number` | | Upper limit of the value axis. It widens rather than clips. |
27
+ | `yAxisWidth` | `number` | | Width of the y-axis labels in px. Fix it to align the plot areas of stacked charts. |
28
+ | `showValues` | `boolean` | `true` | Print the signed amount on each bar (totals show the running total). |
29
+ | `showTooltip` | `boolean` | `true` | Show the tooltip (change and running total) on hover. |
30
+ | `format` | `ValueFormat` | `"compact"` | Number format: `"compact"`, `"number"`, `"currency"`, `"percent"`, `{ type, unit, … }`. |
31
+ | `valueFormatter` | `(value: number) => string` | | Escape hatch: a function that wins over `format`. |
32
+ | `title` | `string` | | Heading of the chart. |
33
+ | `summary` | `string \| "auto"` | | A one-sentence summary. `"auto"` builds one from the steps (first and last value, biggest increase and decrease). Omitted means no summary. |
34
+ | `isLoading` | `boolean` | `false` | Show a skeleton with the same height. |
35
+ | `emptyState` | `ChartEmptyState` | | Shown when `data` is empty: `{ title?, description?, action? }`. |
36
+ | `height` | `number` | `288` | Height of the plot area in px. |
37
+ | `chartOptions` | `EChartsOption` | | Escape hatch: deep-merged last into the generated ECharts option. |
38
+ | `actions` | `boolean \| ChartActionsOptions` | `false` | Show PNG save / copy buttons on hover. Title and summary are included in the image; turn that off with `{ includeTitle: false }`. |
39
+ | `fileName` | `string` | `"chart.png"` | File name for the saved PNG. |
40
+ | `ariaLabel` | `string` | | Label read aloud when there is no `title`. |
41
+ | `className` | `string` | | Classes to add (on the outer figure). |
42
+
43
+ ## Total or delta
44
+
45
+ When the moves are tiny next to the total, a `total` waterfall flattens them into hairlines on a tall
46
+ axis. Switch to `mode="delta"` so the axis is the change itself.
47
+
48
+ ```tsx
49
+ <WaterfallChart
50
+ data={rows}
51
+ index="step"
52
+ categories={["amount"]}
53
+ totals={["Revenue", "Gross profit"]}
54
+ summary="auto"
55
+ />
56
+ ```
@@ -0,0 +1,48 @@
1
+ # SlideChartFull
2
+
3
+ > One chart across all 12 columns, with a one-line note under it.
4
+
5
+ A slide that gives one chart the full width — for many categories or a long series. A one-line `note` under the chart can say how to read it or what to watch.
6
+
7
+ ```tsx
8
+ import { SlideChartFull } from "@squadbase/vantage/slide";
9
+ import type { SlideChartFullProps } from "@squadbase/vantage/slide";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (「… 時点」, 「出典: …」) are fixed in Japanese; `title`, `lead`, `points` and the like are your own text.
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Description |
18
+ | --- | --- | --- |
19
+ | `title` | `string` | The conclusion as one sentence (an action title). **Required.** |
20
+ | `chart` | `SlideChartInsightChart` | `{ type: "line" \| "bar" \| "area"; categories: string[]; series: { name: string; data: number[] }[] }`. **Required.** Same shape and rendering as `SlideChartInsight`. Two or more series show a legend. |
21
+ | `note` | `string` | One line under the chart: how to read it or what to watch. About 60 characters at most. |
22
+ | `asOf` | `string` | The date the numbers were taken, date only (e.g. `"2026-10-01"`). Shown as 「2026-10-01 時点」; don't write 「時点」 yourself. |
23
+ | `source` | `string` | Where the numbers come from (e.g. `"BI"`). Shown as 「出典: BI」. |
24
+
25
+ ## Usage
26
+
27
+ ```tsx
28
+ import { Slide, SlideChartFull } from "@squadbase/vantage/slide";
29
+
30
+ <Slide>
31
+ <SlideChartFull
32
+ title="Revenue hit a record high in September"
33
+ chart={{
34
+ type: "line",
35
+ categories: ["Apr", "May", "Jun", "Jul", "Aug", "Sep"],
36
+ series: [{ name: "Revenue (¥M)", data: [460, 480, 490, 500, 503, 540] }],
37
+ }}
38
+ note="September includes two large deals"
39
+ asOf="2026-10-01"
40
+ source="BI"
41
+ />
42
+ </Slide>
43
+ ```
44
+
45
+ ## Notes
46
+
47
+ - The chart is an `EChart` with no animation and no tooltip. The pptx export waits for it (`data-waitfor="canvas"`).
48
+ - To put reading points next to the chart, use `SlideChartInsight` instead.
@@ -0,0 +1,52 @@
1
+ # SlideChartInsight
2
+
3
+ > One chart and its reading — the most common slide in a report.
4
+
5
+ One chart (8 of 12 columns) and its reading (the other 4, up to 3 points). The chart is `line`, `bar` or `area`, built with canvas-size text, no tooltip and no animation, so it exports to pptx as it looks.
6
+
7
+ ```tsx
8
+ import { SlideChartInsight } from "@squadbase/vantage/slide";
9
+ import type { SlideChartInsightProps, SlideChartInsightChart } from "@squadbase/vantage/slide";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds are fixed in Japanese: the `asOf` / `source` line (「… 時点」/「出典: …」) cannot be overridden, while `title`, `insights`, `chart.categories` and `chart.series[].name` are your own text.
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | `title` | `string` | | The conclusion as one sentence (an action title). **Required.** |
20
+ | `chart` | `SlideChartInsightChart` | | `{ type: "line" \| "bar" \| "area"; categories: string[]; series: { name: string; data: number[] }[] }`. **Required.** Two or more series show a legend. |
21
+ | `insights` | `string[]` | | Points that read the chart, 2–3. **Required.** |
22
+ | `chartSide` | `"left" \| "right"` | `"left"` | Which side the chart takes. |
23
+ | `asOf` | `string` | | The date the numbers were taken, date only (e.g. `"2026-10-01"`). The block adds 「時点」 once, so don't write it. The label is fixed in Japanese. |
24
+ | `source` | `string` | | Where the numbers come from (e.g. `"社内 BI"`). Shown as 「出典: 社内 BI」; the "出典:" label is fixed in Japanese. |
25
+
26
+ ## Usage
27
+
28
+ ```tsx
29
+ import { Slide, SlideChartInsight } from "@squadbase/vantage/slide";
30
+
31
+ <Slide>
32
+ <SlideChartInsight
33
+ title="解約率は 6 月以降、毎月下がり続けている"
34
+ chart={{
35
+ type: "line",
36
+ categories: ["6 月", "7 月", "8 月", "9 月"],
37
+ series: [{ name: "解約率(%)", data: [2.7, 2.4, 2.1, 1.8] }],
38
+ }}
39
+ insights={[
40
+ "オンボーディング刷新後の 3 か月で 0.9pt 低下",
41
+ "低下は中小企業プランが中心",
42
+ ]}
43
+ asOf="2026-10-01"
44
+ source="社内 BI"
45
+ />
46
+ </Slide>
47
+ ```
48
+
49
+ ## Notes
50
+
51
+ - More than 3 insights are still drawn but log a `console.warn` — split the slide.
52
+ - Typed charts such as `LineChart` are not used; the block builds the chart with `EChart` directly.
@@ -0,0 +1,46 @@
1
+ # SlideColumns
2
+
3
+ > [Part] The 12-column layout of a slide's body — SlideColumns and SlideColumn.
4
+
5
+ The 12-column layout of one slide's body. `SlideColumns` lays out `SlideColumn`s, each taking `span` of the 12 columns (8 / 4, 6 / 6, 4 / 4 / 4, …). It is a **part** for the body row of the grid, not a whole-slide block.
6
+
7
+ ```tsx
8
+ import { SlideColumns, SlideColumn } from "@squadbase/vantage/slide";
9
+ import type { SlideColumnsProps, SlideColumnProps } from "@squadbase/vantage/slide";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **a slide part**, not a whole-slide block. Place it as a row in the 12-column grid inside a `<Slide>`; its root does not fill the canvas (100%×100%). All dimensions are fixed inside the part, so do not add your own. For how to build a deck, see [Slide](page-types/slide).
14
+
15
+ ## Props
16
+
17
+ ### SlideColumns
18
+
19
+ | Prop | Type | Default | Description |
20
+ | --- | --- | --- | --- |
21
+ | `children` | `ReactNode` | | The `SlideColumn`s. **Required.** |
22
+ | `align` | `"start" \| "center" \| "stretch"` | `"stretch"` | Vertical alignment of the columns in the row. |
23
+
24
+ ### SlideColumn
25
+
26
+ | Prop | Type | Description |
27
+ | --- | --- | --- |
28
+ | `span` | `number` | How many of the 12 columns it takes (1–12). **Required.** |
29
+ | `children` | `ReactNode` | The column's content. **Required.** |
30
+
31
+ ## Usage
32
+
33
+ ```tsx
34
+ import { SlideColumns, SlideColumn } from "@squadbase/vantage/slide";
35
+
36
+ <SlideColumns align="center">
37
+ <SlideColumn span={8}>{/* chart */}</SlideColumn>
38
+ <SlideColumn span={4}>{/* reading */}</SlideColumn>
39
+ </SlideColumns>
40
+ ```
41
+
42
+ ## Notes
43
+
44
+ - The spans should add up to 12.
45
+ - The gap and the number of columns come from the slide spec.
46
+ - If a column's content must fill the column's height, set `height: "100%"` on that content.
@@ -0,0 +1,68 @@
1
+ # SlideComparison
2
+
3
+ > A vs B, or before and after — 2 to 3 columns side by side.
4
+
5
+ A slide that compares 2 to 3 columns side by side. Each column has a heading, one main number (with its change) and a few points; an optional `verdict` line sits underneath. The columns share the 12 columns equally (6 / 6 or 4 / 4 / 4).
6
+
7
+ ```tsx
8
+ import { SlideComparison } from "@squadbase/vantage/slide";
9
+ import type { SlideComparisonProps, SlideComparisonColumn } from "@squadbase/vantage/slide";
10
+ ```
11
+
12
+ > [!NOTE]
13
+ > This is **the content of one `<Slide>`**. It does not include `<Slide>` itself, so put it directly inside one. The root fills the canvas (1920×1080) at 100% and takes no `className`. Margins, text sizes and the grid are fixed inside the block (a 12-column grid on 1920×1080), so don't add your own dimensions. For how to build a deck, see [Slide](page-types/slide). The labels the block adds (「… 時点」, 「出典: …」) are fixed in Japanese; `title`, `lead`, `points` and the like are your own text.
14
+
15
+ ## Props
16
+
17
+ | Prop | Type | Description |
18
+ | --- | --- | --- |
19
+ | `title` | `string` | The conclusion as one sentence (an action title). **Required.** |
20
+ | `columns` | `SlideComparisonColumn[]` | 2 to 3 columns. **Required.** Each column is described below. |
21
+ | `verdict` | `string` | One line saying which side wins or what follows. |
22
+ | `asOf` | `string` | The date the numbers were taken, date only (e.g. `"2026-10-01"`). Shown as 「2026-10-01 時点」; don't write 「時点」 yourself. |
23
+ | `source` | `string` | Where the numbers come from (e.g. `"BI"`). Shown as 「出典: BI」. |
24
+
25
+ ### SlideComparisonColumn
26
+
27
+ | Prop | Type | Default | Description |
28
+ | --- | --- | --- | --- |
29
+ | `heading` | `string` | | What the column is ("Old plan", "Before"). **Required.** |
30
+ | `points` | `string[]` | | Short points. **Required.** At most 3 per column, about 24 characters each. Write the same kind of point in each column, in the same order. |
31
+ | `value` | `number \| null` | | The main number. `null` shows 「—」. Formatted by `format`. |
32
+ | `format` | `ValueFormat` | | How to format the value (`"currency"`, `"percent"`, …). Also the default format of `delta`. |
33
+ | `display` | `string` | | A string you already formatted ("¥120M"). Wins over `value`. |
34
+ | `delta` | `{ value: number \| null; format?: ValueFormat }` | | The change of the main number itself (a ratio for `percent`). Its direction comes from the sign. Without `format`, the column's `format` is used. |
35
+ | `comparisonLabel` | `string` | | What `delta` is measured against (「前月比」, 「旧プラン比」). Printed muted before the change. |
36
+ | `betterWhen` | `"up" \| "down"` | `"up"` | Which direction of `delta` is good. Use `"down"` for churn and cost. |
37
+
38
+ ## Usage
39
+
40
+ ```tsx
41
+ import { Slide, SlideComparison } from "@squadbase/vantage/slide";
42
+
43
+ <Slide>
44
+ <SlideComparison
45
+ title="The new plan churns less than the old one"
46
+ columns={[
47
+ { heading: "Old plan", value: 0.024, format: "percent", points: ["¥9,800 per month", "No onboarding support"] },
48
+ {
49
+ heading: "New plan",
50
+ value: 0.018,
51
+ format: "percent",
52
+ delta: { value: -0.006 },
53
+ comparisonLabel: "旧プラン比",
54
+ betterWhen: "down",
55
+ points: ["¥12,800 per month", "With onboarding support"],
56
+ },
57
+ ]}
58
+ verdict="Onboarding support explains most of the gap"
59
+ asOf="2026-10-01"
60
+ source="BI"
61
+ />
62
+ </Slide>
63
+ ```
64
+
65
+ ## Notes
66
+
67
+ - Fewer than 2 or more than 3 columns, or too many or too long points, log a console warning. Split the slide.
68
+ - The change is drawn with `DeltaText` (▲ ▼ and 「増」/「減」). Polarity is set only by `betterWhen`.