boardplot 0.0.0-stage → 0.53.0

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 (818) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/LICENSE +201 -0
  3. package/NOTICE.md +180 -0
  4. package/README.md +208 -2
  5. package/THIRD_PARTY_NOTICES.md +1110 -0
  6. package/dist/DiagnosticDetails-UNYNYCAH.js +69 -0
  7. package/dist/ReaderBox-VOJSJ66R.js +137 -0
  8. package/dist/annotateEngine-DLMFJZ67.js +30 -0
  9. package/dist/build-identity.json +6 -0
  10. package/dist/chunk-24BHMKDD.js +83 -0
  11. package/dist/chunk-263SZKIL.js +8 -0
  12. package/dist/chunk-27QADBDV.js +211 -0
  13. package/dist/chunk-2CVH5E57.js +128 -0
  14. package/dist/chunk-2DOR5SS6.js +446 -0
  15. package/dist/chunk-2EQE4E3I.js +22 -0
  16. package/dist/chunk-2FNNAPCI.js +24 -0
  17. package/dist/chunk-2L2Q53EP.js +251 -0
  18. package/dist/chunk-2LMCD3ZR.js +6 -0
  19. package/dist/chunk-2ND7ZITT.js +3069 -0
  20. package/dist/chunk-2QT5ZUHO.js +2937 -0
  21. package/dist/chunk-2RSG7JYI.js +24 -0
  22. package/dist/chunk-2V6CLH33.js +1392 -0
  23. package/dist/chunk-2VWJ5BGO.js +566 -0
  24. package/dist/chunk-2WNYRWHG.js +51 -0
  25. package/dist/chunk-323YZWYJ.js +548 -0
  26. package/dist/chunk-33PB4V6K.js +382 -0
  27. package/dist/chunk-33PLBIMA.js +176 -0
  28. package/dist/chunk-3A2IEBCN.js +195 -0
  29. package/dist/chunk-3D3D3D23.js +25 -0
  30. package/dist/chunk-3EZRM4YM.js +92 -0
  31. package/dist/chunk-3H2W76TB.js +2353 -0
  32. package/dist/chunk-3JEQGGVD.js +19 -0
  33. package/dist/chunk-3QWZAEW5.js +26 -0
  34. package/dist/chunk-3SIRPKMP.js +12 -0
  35. package/dist/chunk-3SQCCESO.js +1592 -0
  36. package/dist/chunk-3XHJHQWU.js +42 -0
  37. package/dist/chunk-4G2O2ZPJ.js +83 -0
  38. package/dist/chunk-4JLBVIGW.js +24 -0
  39. package/dist/chunk-4RRNJLCM.js +746 -0
  40. package/dist/chunk-4UVW5WU6.js +76 -0
  41. package/dist/chunk-4X66BTP5.js +344 -0
  42. package/dist/chunk-53OYF4ZT.js +687 -0
  43. package/dist/chunk-57ZGVAU3.js +179 -0
  44. package/dist/chunk-5HECRVXJ.js +62 -0
  45. package/dist/chunk-5LGSRWFC.js +63 -0
  46. package/dist/chunk-5LYXD6ME.js +1112 -0
  47. package/dist/chunk-66RFKRGO.js +28 -0
  48. package/dist/chunk-6KWIQ5KF.js +18 -0
  49. package/dist/chunk-6OCR6ITN.js +72 -0
  50. package/dist/chunk-6RBTTCQD.js +802 -0
  51. package/dist/chunk-6Y7EXYLR.js +563 -0
  52. package/dist/chunk-7CTKTIPF.js +613 -0
  53. package/dist/chunk-7EVIIADO.js +185 -0
  54. package/dist/chunk-7X2ZYVAX.js +89 -0
  55. package/dist/chunk-7X65ZQN4.js +38 -0
  56. package/dist/chunk-A4QZXLXF.js +7 -0
  57. package/dist/chunk-A6CQPJWR.js +49 -0
  58. package/dist/chunk-A7IEVBYI.js +35 -0
  59. package/dist/chunk-ACXX2JNL.js +6 -0
  60. package/dist/chunk-ADKCLH3Z.js +98 -0
  61. package/dist/chunk-ADWSGPH5.js +23 -0
  62. package/dist/chunk-AG2CJ4JY.js +203 -0
  63. package/dist/chunk-AHQ4L3BE.js +30 -0
  64. package/dist/chunk-AOQ6VF5H.js +6 -0
  65. package/dist/chunk-AQROQDLR.js +3303 -0
  66. package/dist/chunk-AWTG3RFF.js +85 -0
  67. package/dist/chunk-B54RN2FD.js +692 -0
  68. package/dist/chunk-B67K6OWJ.js +48 -0
  69. package/dist/chunk-B6GFKYBZ.js +40 -0
  70. package/dist/chunk-BBL3R5YZ.js +186 -0
  71. package/dist/chunk-BBRBCMNR.js +28 -0
  72. package/dist/chunk-BIDIGDGH.js +6 -0
  73. package/dist/chunk-BLFWUMTD.js +12 -0
  74. package/dist/chunk-BM6SFFWF.js +6 -0
  75. package/dist/chunk-BMRD6MAH.js +24 -0
  76. package/dist/chunk-BPKXEMRE.js +197 -0
  77. package/dist/chunk-BUPLB3EX.js +129 -0
  78. package/dist/chunk-BW5VLBSZ.js +15 -0
  79. package/dist/chunk-BWGRWGVA.js +295 -0
  80. package/dist/chunk-BWLOXQDV.js +131 -0
  81. package/dist/chunk-BWTX7LUG.js +203 -0
  82. package/dist/chunk-C54QLNE4.js +69 -0
  83. package/dist/chunk-CAQ5P4VN.js +296 -0
  84. package/dist/chunk-CCCEBIUZ.js +296 -0
  85. package/dist/chunk-CDZHNLO6.js +42 -0
  86. package/dist/chunk-CJGSJKPO.js +25 -0
  87. package/dist/chunk-CN7JRHST.js +25 -0
  88. package/dist/chunk-CNX7EGSU.js +266 -0
  89. package/dist/chunk-COYOTQC2.js +75 -0
  90. package/dist/chunk-CRNMNZJD.js +1161 -0
  91. package/dist/chunk-CUVUDK4O.js +68 -0
  92. package/dist/chunk-CWDHCSL2.js +2919 -0
  93. package/dist/chunk-CYOJZ3GQ.js +631 -0
  94. package/dist/chunk-D4SOADBD.js +19 -0
  95. package/dist/chunk-D7SHZDA3.js +1808 -0
  96. package/dist/chunk-DAVHGK27.js +657 -0
  97. package/dist/chunk-DCCJRLAJ.js +422 -0
  98. package/dist/chunk-DCTCUZ5L.js +51 -0
  99. package/dist/chunk-DDCB7ZA5.js +2511 -0
  100. package/dist/chunk-DDI2W4TR.js +149 -0
  101. package/dist/chunk-DIHUGBZO.js +61 -0
  102. package/dist/chunk-DJHIQWSG.js +25 -0
  103. package/dist/chunk-DO5OZJAO.js +302 -0
  104. package/dist/chunk-DOFYKPTC.js +18 -0
  105. package/dist/chunk-DRTA6JG5.js +160 -0
  106. package/dist/chunk-DRW6KGBK.js +1062 -0
  107. package/dist/chunk-DU4A5AOY.js +1156 -0
  108. package/dist/chunk-DYS7EIXY.js +294 -0
  109. package/dist/chunk-E4IQ6M4S.js +24 -0
  110. package/dist/chunk-EFUWFB64.js +24 -0
  111. package/dist/chunk-EHBB2Z4D.js +290 -0
  112. package/dist/chunk-EHVESNLV.js +30 -0
  113. package/dist/chunk-EJPVVGD7.js +67 -0
  114. package/dist/chunk-EKQK5D6G.js +14 -0
  115. package/dist/chunk-EUADDXAV.js +30 -0
  116. package/dist/chunk-F6CNPC4L.js +47 -0
  117. package/dist/chunk-FBAYZSFC.js +2806 -0
  118. package/dist/chunk-FBB4BWKN.js +30 -0
  119. package/dist/chunk-FF23FYQD.js +1269 -0
  120. package/dist/chunk-FG6EDGMI.js +53 -0
  121. package/dist/chunk-FHA3KMFC.js +43 -0
  122. package/dist/chunk-FIANWJXX.js +19 -0
  123. package/dist/chunk-FIWNDOMO.js +6 -0
  124. package/dist/chunk-FV3VF36K.js +2721 -0
  125. package/dist/chunk-G5FMTRG5.js +37 -0
  126. package/dist/chunk-GCBOHVDZ.js +229 -0
  127. package/dist/chunk-GDOW2KNP.js +19 -0
  128. package/dist/chunk-GTG3IGLF.js +2674 -0
  129. package/dist/chunk-GZTNTHSW.js +21 -0
  130. package/dist/chunk-H4H4O62O.js +46 -0
  131. package/dist/chunk-H5G7T35P.js +24 -0
  132. package/dist/chunk-H63XQ3OO.js +942 -0
  133. package/dist/chunk-H67RTX46.js +43 -0
  134. package/dist/chunk-HA4IPWMM.js +841 -0
  135. package/dist/chunk-HKYTOJLV.js +33 -0
  136. package/dist/chunk-HOAH5XBR.js +542 -0
  137. package/dist/chunk-HTYFQHRC.js +24 -0
  138. package/dist/chunk-HYY5V2KL.js +19 -0
  139. package/dist/chunk-HZI56ASJ.js +79 -0
  140. package/dist/chunk-I6VAWNNU.js +24 -0
  141. package/dist/chunk-IBXXZVG7.js +80 -0
  142. package/dist/chunk-IDDA5INB.js +60 -0
  143. package/dist/chunk-IK4BHOPZ.js +33 -0
  144. package/dist/chunk-IL5T7I2A.js +27 -0
  145. package/dist/chunk-ILSXT6KT.js +24 -0
  146. package/dist/chunk-IV2UXZXX.js +16 -0
  147. package/dist/chunk-IYEFEBRN.js +41 -0
  148. package/dist/chunk-IYMI7YI4.js +829 -0
  149. package/dist/chunk-J6I2YFJH.js +58 -0
  150. package/dist/chunk-JFBEAUJ6.js +24 -0
  151. package/dist/chunk-JR7Y5ONB.js +27 -0
  152. package/dist/chunk-JSEYUJUQ.js +836 -0
  153. package/dist/chunk-JYBT2JNY.js +61 -0
  154. package/dist/chunk-K3HSQPSM.js +24 -0
  155. package/dist/chunk-KAXJFL7N.js +43 -0
  156. package/dist/chunk-KDMKHR5A.js +32 -0
  157. package/dist/chunk-KKWZWP67.js +24 -0
  158. package/dist/chunk-KOJ5QETJ.js +8 -0
  159. package/dist/chunk-KPKXJYQH.js +19 -0
  160. package/dist/chunk-KSJVENRU.js +113 -0
  161. package/dist/chunk-KZJOV4QW.js +33 -0
  162. package/dist/chunk-KZS46KDY.js +58 -0
  163. package/dist/chunk-L3JWM7FR.js +50 -0
  164. package/dist/chunk-L4S6UFTL.js +26 -0
  165. package/dist/chunk-L6DJ4ZY5.js +2008 -0
  166. package/dist/chunk-L7RHB734.js +23 -0
  167. package/dist/chunk-LCWJS34U.js +38 -0
  168. package/dist/chunk-LFTAMH7I.js +24 -0
  169. package/dist/chunk-LFX7W4B7.js +113 -0
  170. package/dist/chunk-LINZPU5D.js +8 -0
  171. package/dist/chunk-LIWLBLCT.js +83 -0
  172. package/dist/chunk-LNKY5Z2X.js +23 -0
  173. package/dist/chunk-LS7HVBI7.js +24 -0
  174. package/dist/chunk-M4EUXOLU.js +170 -0
  175. package/dist/chunk-M4SPKUZE.js +7 -0
  176. package/dist/chunk-M4YLED7M.js +17 -0
  177. package/dist/chunk-MBKZYJRC.js +1424 -0
  178. package/dist/chunk-MCYM3RNF.js +227 -0
  179. package/dist/chunk-MF6IVSBJ.js +48 -0
  180. package/dist/chunk-MIAPBQCA.js +24 -0
  181. package/dist/chunk-MJZHFH5R.js +1075 -0
  182. package/dist/chunk-MQFCG4KS.js +1467 -0
  183. package/dist/chunk-MVV6RQMG.js +128 -0
  184. package/dist/chunk-MYMT5KJL.js +1182 -0
  185. package/dist/chunk-MZL6LGKO.js +587 -0
  186. package/dist/chunk-N23YFPPI.js +47 -0
  187. package/dist/chunk-N3G2FYDL.js +300 -0
  188. package/dist/chunk-N3TPMXS3.js +161 -0
  189. package/dist/chunk-N73IBH55.js +58 -0
  190. package/dist/chunk-N7J7CZS6.js +43 -0
  191. package/dist/chunk-NCB3YLHF.js +28 -0
  192. package/dist/chunk-NHQGRKEA.js +63 -0
  193. package/dist/chunk-NKIYLFXZ.js +2774 -0
  194. package/dist/chunk-NOSDEJ3K.js +25934 -0
  195. package/dist/chunk-NQDVMUHX.js +433 -0
  196. package/dist/chunk-NSSNYY6Y.js +58 -0
  197. package/dist/chunk-NY5NUFDZ.js +117 -0
  198. package/dist/chunk-O3S2KNIW.js +25 -0
  199. package/dist/chunk-O3VN6BTL.js +24 -0
  200. package/dist/chunk-ONZLC47B.js +88 -0
  201. package/dist/chunk-OQEBOVUO.js +30 -0
  202. package/dist/chunk-OUEGGWH7.js +24 -0
  203. package/dist/chunk-OURX73UJ.js +728 -0
  204. package/dist/chunk-P25VEGGX.js +24 -0
  205. package/dist/chunk-P26Z62UV.js +24 -0
  206. package/dist/chunk-P5RNWMZC.js +2984 -0
  207. package/dist/chunk-P6KZIZDV.js +987 -0
  208. package/dist/chunk-PEUSKIFV.js +168 -0
  209. package/dist/chunk-PFVTYFSL.js +24 -0
  210. package/dist/chunk-PWROWDZS.js +137 -0
  211. package/dist/chunk-Q3CV2JJ2.js +3650 -0
  212. package/dist/chunk-QBR6IKIX.js +50 -0
  213. package/dist/chunk-QGCEHR6S.js +13 -0
  214. package/dist/chunk-QHRE2M6V.js +26 -0
  215. package/dist/chunk-QKL7IY42.js +38 -0
  216. package/dist/chunk-QO6HEXIZ.js +272 -0
  217. package/dist/chunk-QOIVXZUF.js +24 -0
  218. package/dist/chunk-QPWRHDLZ.js +17 -0
  219. package/dist/chunk-QSXK6PJL.js +19 -0
  220. package/dist/chunk-QTZVVZ2A.js +54 -0
  221. package/dist/chunk-QWXWVPNE.js +18 -0
  222. package/dist/chunk-QY5ZKUWY.js +383 -0
  223. package/dist/chunk-QZAT46PP.js +95 -0
  224. package/dist/chunk-RA66JA3D.js +24 -0
  225. package/dist/chunk-REOPXBUR.js +600 -0
  226. package/dist/chunk-RGZGLKFB.js +648 -0
  227. package/dist/chunk-RL3NUWMY.js +3378 -0
  228. package/dist/chunk-RNOJSEES.js +16 -0
  229. package/dist/chunk-ROXO4R3J.js +16 -0
  230. package/dist/chunk-RPIW5T55.js +40 -0
  231. package/dist/chunk-RQ5DNYLG.js +10 -0
  232. package/dist/chunk-RZNYW7UP.js +133 -0
  233. package/dist/chunk-S32YYDIB.js +420 -0
  234. package/dist/chunk-S4QSJAGY.js +44 -0
  235. package/dist/chunk-S6UX7KB6.js +335 -0
  236. package/dist/chunk-SDSONLMZ.js +2546 -0
  237. package/dist/chunk-SGD3ZHID.js +250 -0
  238. package/dist/chunk-SKRSCTT5.js +28 -0
  239. package/dist/chunk-SMCDXUIO.js +24 -0
  240. package/dist/chunk-SPTPFY4S.js +528 -0
  241. package/dist/chunk-SREWFAAJ.js +90 -0
  242. package/dist/chunk-SS42FJVN.js +3875 -0
  243. package/dist/chunk-SVZDXFPX.js +891 -0
  244. package/dist/chunk-SZPTTNW7.js +16 -0
  245. package/dist/chunk-T3IGJARD.js +22 -0
  246. package/dist/chunk-TA3TFKYZ.js +86 -0
  247. package/dist/chunk-TBGUEF3M.js +939 -0
  248. package/dist/chunk-TGK6KUGN.js +331 -0
  249. package/dist/chunk-TJSND556.js +1783 -0
  250. package/dist/chunk-TKOJZQAJ.js +24 -0
  251. package/dist/chunk-TM4OC53S.js +97 -0
  252. package/dist/chunk-TNEHPP3H.js +18 -0
  253. package/dist/chunk-TWOREVKJ.js +1760 -0
  254. package/dist/chunk-TXS3U77A.js +60 -0
  255. package/dist/chunk-UB6ODJHO.js +134 -0
  256. package/dist/chunk-UBZXQIDR.js +24 -0
  257. package/dist/chunk-ULTSSIOU.js +38 -0
  258. package/dist/chunk-UMDEWWXT.js +33 -0
  259. package/dist/chunk-V6O6KVOA.js +347 -0
  260. package/dist/chunk-VABRPZVC.js +43 -0
  261. package/dist/chunk-VDAKTZQP.js +18 -0
  262. package/dist/chunk-VDAZPGR2.js +79 -0
  263. package/dist/chunk-VERLFNWR.js +25 -0
  264. package/dist/chunk-VH2UUU7K.js +24 -0
  265. package/dist/chunk-VJ3FCGQF.js +12 -0
  266. package/dist/chunk-VK5ZDV67.js +47 -0
  267. package/dist/chunk-VKQNDOAI.js +40 -0
  268. package/dist/chunk-VTEV3WVF.js +690 -0
  269. package/dist/chunk-VXZFQKBJ.js +21 -0
  270. package/dist/chunk-WI5ITCOH.js +22 -0
  271. package/dist/chunk-WLZ54FWG.js +120 -0
  272. package/dist/chunk-WYJEOMNY.js +31 -0
  273. package/dist/chunk-WZGJSQKN.js +29 -0
  274. package/dist/chunk-WZL4EEBS.js +11 -0
  275. package/dist/chunk-X4YNDLVA.js +54 -0
  276. package/dist/chunk-X6SUFTD7.js +17 -0
  277. package/dist/chunk-XB4KZ6WO.js +81 -0
  278. package/dist/chunk-XJI6SWFS.js +569 -0
  279. package/dist/chunk-XJP5DKIL.js +29 -0
  280. package/dist/chunk-XN4ARQ2W.js +47 -0
  281. package/dist/chunk-XN7MQO45.js +359 -0
  282. package/dist/chunk-XQCQZBGX.js +100 -0
  283. package/dist/chunk-XXOHXA3A.js +69 -0
  284. package/dist/chunk-XZOHR765.js +127 -0
  285. package/dist/chunk-YCNLQYTC.js +133 -0
  286. package/dist/chunk-YCRGWQBS.js +526 -0
  287. package/dist/chunk-YF2PYLC4.js +210 -0
  288. package/dist/chunk-YG5GUELW.js +935 -0
  289. package/dist/chunk-YS6KMYM4.js +91 -0
  290. package/dist/chunk-YWP7XFKD.js +12 -0
  291. package/dist/chunk-Z2MGTKDR.js +20 -0
  292. package/dist/chunk-Z6CL7AR6.js +24 -0
  293. package/dist/chunk-Z7X3RGGA.js +22 -0
  294. package/dist/chunk-ZF43WRG3.js +29 -0
  295. package/dist/chunk-ZMF7WEGG.js +60 -0
  296. package/dist/chunk-ZNHFLJSY.js +375 -0
  297. package/dist/chunk-ZQ4VFQID.js +76 -0
  298. package/dist/chunk-ZQF34VPS.js +72 -0
  299. package/dist/chunk-ZU425HNM.js +24 -0
  300. package/dist/chunk-ZZU5R5UU.js +24 -0
  301. package/dist/cli/index.js +9 -0
  302. package/dist/core-3VCCUFVX.js +32 -0
  303. package/dist/core-4BZQQSHS.js +33 -0
  304. package/dist/core-4VT4MHNB.js +38 -0
  305. package/dist/core-5535KXRD.js +40 -0
  306. package/dist/core-5HQBPCHL.js +35 -0
  307. package/dist/core-6RYHWUJO.js +35 -0
  308. package/dist/core-7BZJCIXN.js +35 -0
  309. package/dist/core-AJTVU6X7.js +37 -0
  310. package/dist/core-C6YUSTZI.js +57 -0
  311. package/dist/core-EEB7HTCL.js +33 -0
  312. package/dist/core-EFMVDWNH.js +38 -0
  313. package/dist/core-ETAGQBZO.js +34 -0
  314. package/dist/core-FVR3WZEC.js +36 -0
  315. package/dist/core-GCTFVYMH.js +29 -0
  316. package/dist/core-GES44OTS.js +33 -0
  317. package/dist/core-GGQREDSI.js +47 -0
  318. package/dist/core-HRYOV6QD.js +38 -0
  319. package/dist/core-IKD3EE3S.js +38 -0
  320. package/dist/core-JM4R426L.js +32 -0
  321. package/dist/core-KKQS3WI2.js +40 -0
  322. package/dist/core-LA6XDYG7.js +40 -0
  323. package/dist/core-MJ7JWQT5.js +37 -0
  324. package/dist/core-MLROKJ2M.js +53 -0
  325. package/dist/core-MR52YBRX.js +31 -0
  326. package/dist/core-NP4VHWXL.js +29 -0
  327. package/dist/core-NQLNZDX5.js +41 -0
  328. package/dist/core-NSIJEKLI.js +44 -0
  329. package/dist/core-OJUQLIQ5.js +35 -0
  330. package/dist/core-PB3VUQSS.js +32 -0
  331. package/dist/core-Q6VLFFYC.js +56 -0
  332. package/dist/core-QY7AVIKZ.js +51 -0
  333. package/dist/core-SBQMHWTA.js +52 -0
  334. package/dist/core-UHECQHJ2.js +38 -0
  335. package/dist/core-V5FV4NWL.js +56 -0
  336. package/dist/core-WGM4XUN3.js +58 -0
  337. package/dist/core-WUQVFARS.js +34 -0
  338. package/dist/core-Z2F3IGSR.js +42 -0
  339. package/dist/dataTable-3CPPIHB3.js +58 -0
  340. package/dist/engine-FXFBCWHB.js +961 -0
  341. package/dist/fixtures.d.ts +1 -0
  342. package/dist/fixtures.js +41 -0
  343. package/dist/fontTables-WYCZNRE7.js +18 -0
  344. package/dist/fonts.d.ts +1 -0
  345. package/dist/fonts.js +19 -0
  346. package/dist/geo/dach.d.ts +1 -0
  347. package/dist/geo/dach.js +14 -0
  348. package/dist/geo/de-states.d.ts +1 -0
  349. package/dist/geo/de-states.js +14 -0
  350. package/dist/geo/eu27.d.ts +1 -0
  351. package/dist/geo/eu27.js +14 -0
  352. package/dist/geo/europe.d.ts +1 -0
  353. package/dist/geo/europe.js +14 -0
  354. package/dist/geo/index.d.ts +1 -0
  355. package/dist/geo/index.js +41 -0
  356. package/dist/geo/us-states.d.ts +1 -0
  357. package/dist/geo/us-states.js +14 -0
  358. package/dist/geo/world.d.ts +1 -0
  359. package/dist/geo/world.js +14 -0
  360. package/dist/index.d.ts +1 -0
  361. package/dist/index.js +364 -0
  362. package/dist/main-YLKBTHJP.js +569 -0
  363. package/dist/mcp/server.js +1025 -0
  364. package/dist/module-SVEW5ZUE.js +137233 -0
  365. package/dist/react/bar.d.ts +1 -0
  366. package/dist/react/bar.js +81 -0
  367. package/dist/react/bartable.d.ts +1 -0
  368. package/dist/react/bartable.js +70 -0
  369. package/dist/react/box.d.ts +1 -0
  370. package/dist/react/box.js +65 -0
  371. package/dist/react/bullet.d.ts +1 -0
  372. package/dist/react/bullet.js +72 -0
  373. package/dist/react/butterfly.d.ts +1 -0
  374. package/dist/react/butterfly.js +66 -0
  375. package/dist/react/choropleth.d.ts +1 -0
  376. package/dist/react/choropleth.js +67 -0
  377. package/dist/react/cohort.d.ts +1 -0
  378. package/dist/react/cohort.js +70 -0
  379. package/dist/react/column.d.ts +1 -0
  380. package/dist/react/column.js +86 -0
  381. package/dist/react/combo.d.ts +1 -0
  382. package/dist/react/combo.js +86 -0
  383. package/dist/react/creative.d.ts +1 -0
  384. package/dist/react/creative.js +61 -0
  385. package/dist/react/diagram.d.ts +1 -0
  386. package/dist/react/diagram.js +60 -0
  387. package/dist/react/dimswitch.d.ts +1 -0
  388. package/dist/react/dimswitch.js +72 -0
  389. package/dist/react/dot.d.ts +1 -0
  390. package/dist/react/dot.js +70 -0
  391. package/dist/react/export.d.ts +1 -0
  392. package/dist/react/export.js +658 -0
  393. package/dist/react/funnel.d.ts +1 -0
  394. package/dist/react/funnel.js +63 -0
  395. package/dist/react/gantt.d.ts +1 -0
  396. package/dist/react/gantt.js +62 -0
  397. package/dist/react/grid.d.ts +1 -0
  398. package/dist/react/grid.js +67 -0
  399. package/dist/react/heatmap.d.ts +1 -0
  400. package/dist/react/heatmap.js +68 -0
  401. package/dist/react/histogram.d.ts +1 -0
  402. package/dist/react/histogram.js +86 -0
  403. package/dist/react/index.d.ts +1 -0
  404. package/dist/react/index.js +504 -0
  405. package/dist/react/kpi.d.ts +1 -0
  406. package/dist/react/kpi.js +67 -0
  407. package/dist/react/likert.d.ts +1 -0
  408. package/dist/react/likert.js +83 -0
  409. package/dist/react/line.d.ts +1 -0
  410. package/dist/react/line.js +81 -0
  411. package/dist/react/mekko.d.ts +1 -0
  412. package/dist/react/mekko.js +71 -0
  413. package/dist/react/pareto.d.ts +1 -0
  414. package/dist/react/pareto.js +90 -0
  415. package/dist/react/pie.d.ts +1 -0
  416. package/dist/react/pie.js +64 -0
  417. package/dist/react/prepare.d.ts +1 -0
  418. package/dist/react/prepare.js +278 -0
  419. package/dist/react/pvm.d.ts +1 -0
  420. package/dist/react/pvm.js +68 -0
  421. package/dist/react/pyramid.d.ts +1 -0
  422. package/dist/react/pyramid.js +67 -0
  423. package/dist/react/sankey.d.ts +1 -0
  424. package/dist/react/sankey.js +59 -0
  425. package/dist/react/scatter.d.ts +1 -0
  426. package/dist/react/scatter.js +63 -0
  427. package/dist/react/slope.d.ts +1 -0
  428. package/dist/react/slope.js +64 -0
  429. package/dist/react/sparkline.d.ts +1 -0
  430. package/dist/react/sparkline.js +59 -0
  431. package/dist/react/spec.d.ts +1 -0
  432. package/dist/react/spec.js +379 -0
  433. package/dist/react/status.d.ts +1 -0
  434. package/dist/react/status.js +64 -0
  435. package/dist/react/story.d.ts +1 -0
  436. package/dist/react/story.js +140 -0
  437. package/dist/react/table.d.ts +1 -0
  438. package/dist/react/table.js +69 -0
  439. package/dist/react/theme.d.ts +1 -0
  440. package/dist/react/theme.js +53 -0
  441. package/dist/react/tilemap.d.ts +1 -0
  442. package/dist/react/tilemap.js +66 -0
  443. package/dist/react/treemap.d.ts +1 -0
  444. package/dist/react/treemap.js +61 -0
  445. package/dist/react/variance.d.ts +1 -0
  446. package/dist/react/variance.js +65 -0
  447. package/dist/react/waffle.d.ts +1 -0
  448. package/dist/react/waffle.js +62 -0
  449. package/dist/react/waterfall.d.ts +1 -0
  450. package/dist/react/waterfall.js +68 -0
  451. package/dist/resvg-ZOVDIZTV.js +23 -0
  452. package/dist/rows.d.ts +1 -0
  453. package/dist/rows.js +23 -0
  454. package/dist/rowsModule-YVLAROIP.js +27 -0
  455. package/dist/schema-2K6C3U24.js +23 -0
  456. package/dist/schema-2KIHLTYI.js +23 -0
  457. package/dist/schema-4HY2MWZC.js +30 -0
  458. package/dist/schema-4S5CXHAO.js +24 -0
  459. package/dist/schema-5BKQV56C.js +27 -0
  460. package/dist/schema-5HA5DSYN.js +24 -0
  461. package/dist/schema-5NKJPSBD.js +23 -0
  462. package/dist/schema-65FOKNHK.js +43 -0
  463. package/dist/schema-6OHZWHUI.js +23 -0
  464. package/dist/schema-6RYJS2GM.js +24 -0
  465. package/dist/schema-6W4M3WJ4.js +23 -0
  466. package/dist/schema-7TLSFG6M.js +24 -0
  467. package/dist/schema-AMFRKUFS.js +27 -0
  468. package/dist/schema-B7CZPPB4.js +28 -0
  469. package/dist/schema-BNRNHGHQ.js +26 -0
  470. package/dist/schema-E4MRCGPZ.js +24 -0
  471. package/dist/schema-F3WYTR65.js +26 -0
  472. package/dist/schema-FA6XIHTW.js +23 -0
  473. package/dist/schema-GZNOW4LX.js +23 -0
  474. package/dist/schema-HEIDGCSL.js +23 -0
  475. package/dist/schema-JB2H6KPA.js +23 -0
  476. package/dist/schema-MPXZNWV3.js +23 -0
  477. package/dist/schema-NHNQK6XO.js +23 -0
  478. package/dist/schema-NN6UPDPW.js +23 -0
  479. package/dist/schema-O4YNAGIY.js +23 -0
  480. package/dist/schema-O7AKK232.js +29 -0
  481. package/dist/schema-OJCML6LV.js +24 -0
  482. package/dist/schema-ORTRMYI6.js +24 -0
  483. package/dist/schema-PJ6P52BC.js +23 -0
  484. package/dist/schema-RTWES6NR.js +24 -0
  485. package/dist/schema-S36SRYGO.js +24 -0
  486. package/dist/schema-S3TCLTYD.js +23 -0
  487. package/dist/schema-SWWMOLOR.js +54 -0
  488. package/dist/schema-WOSEZNKG.js +26 -0
  489. package/dist/schema-Y6KBWUUR.js +23 -0
  490. package/dist/schema-YQYTLKSW.js +23 -0
  491. package/dist/schema-ZUUUY3QS.js +33 -0
  492. package/dist/specValidation-VNWIKLHH.js +49 -0
  493. package/dist/theme.d.ts +1 -0
  494. package/dist/theme.js +24 -0
  495. package/dist/themeShapeRules-2D3KWSPQ.js +11 -0
  496. package/dist/types/core/a11y/accessibility.d.ts +43 -0
  497. package/dist/types/core/a11y/recordsShared.d.ts +44 -0
  498. package/dist/types/core/a11y/structuralRecords.d.ts +6 -0
  499. package/dist/types/core/a11y/types.d.ts +116 -0
  500. package/dist/types/core/annotate.d.ts +300 -0
  501. package/dist/types/core/annotateArms.d.ts +37 -0
  502. package/dist/types/core/annotateFields.d.ts +30 -0
  503. package/dist/types/core/annotateGapBracket.d.ts +66 -0
  504. package/dist/types/core/annotateLinks.d.ts +47 -0
  505. package/dist/types/core/annotateTargets.d.ts +90 -0
  506. package/dist/types/core/axis.d.ts +179 -0
  507. package/dist/types/core/bandSelect.d.ts +10 -0
  508. package/dist/types/core/bands.d.ts +14 -0
  509. package/dist/types/core/calendarLabels.d.ts +101 -0
  510. package/dist/types/core/charts/band/stacks.d.ts +155 -0
  511. package/dist/types/core/charts/bar/fixtures.d.ts +9 -0
  512. package/dist/types/core/charts/bar/layout.d.ts +95 -0
  513. package/dist/types/core/charts/bartable/fixtures.d.ts +4 -0
  514. package/dist/types/core/charts/bartable/types.d.ts +192 -0
  515. package/dist/types/core/charts/box/fixtures.d.ts +12 -0
  516. package/dist/types/core/charts/box/types.d.ts +110 -0
  517. package/dist/types/core/charts/bullet/fixtures.d.ts +11 -0
  518. package/dist/types/core/charts/butterfly/fixtures.d.ts +9 -0
  519. package/dist/types/core/charts/choropleth/fixtures.d.ts +3 -0
  520. package/dist/types/core/charts/choropleth/overlayTypes.d.ts +68 -0
  521. package/dist/types/core/charts/choropleth/types.d.ts +117 -0
  522. package/dist/types/core/charts/cohort/fixtures.d.ts +12 -0
  523. package/dist/types/core/charts/cohort/types.d.ts +165 -0
  524. package/dist/types/core/charts/column/anomaly.d.ts +204 -0
  525. package/dist/types/core/charts/column/fixtures.d.ts +12 -0
  526. package/dist/types/core/charts/column/layout.d.ts +116 -0
  527. package/dist/types/core/charts/column/model.d.ts +295 -0
  528. package/dist/types/core/charts/column/types.d.ts +56 -0
  529. package/dist/types/core/charts/combo/endpoints.d.ts +165 -0
  530. package/dist/types/core/charts/combo/fixtures.d.ts +12 -0
  531. package/dist/types/core/charts/combo/layout.d.ts +48 -0
  532. package/dist/types/core/charts/creative/fixtures.d.ts +4 -0
  533. package/dist/types/core/charts/creative/types.d.ts +73 -0
  534. package/dist/types/core/charts/diagram/fixtures.d.ts +3 -0
  535. package/dist/types/core/charts/dimswitch/compile.d.ts +20 -0
  536. package/dist/types/core/charts/dimswitch/fixtures.d.ts +3 -0
  537. package/dist/types/core/charts/dimswitch/types.d.ts +152 -0
  538. package/dist/types/core/charts/dot/fixtures.d.ts +11 -0
  539. package/dist/types/core/charts/funnel/fixtures.d.ts +11 -0
  540. package/dist/types/core/charts/gantt/fixtures.d.ts +9 -0
  541. package/dist/types/core/charts/gantt/layout.d.ts +63 -0
  542. package/dist/types/core/charts/grid/fixtures.d.ts +3 -0
  543. package/dist/types/core/charts/grid/metricStack.d.ts +108 -0
  544. package/dist/types/core/charts/grid/metricStackSchema.d.ts +74 -0
  545. package/dist/types/core/charts/grid/normalize.d.ts +99 -0
  546. package/dist/types/core/charts/grid/schema.d.ts +168 -0
  547. package/dist/types/core/charts/heatmap/fixtures.d.ts +11 -0
  548. package/dist/types/core/charts/histogram/fixtures.d.ts +15 -0
  549. package/dist/types/core/charts/histogram/types.d.ts +98 -0
  550. package/dist/types/core/charts/kpi/fixtures.d.ts +9 -0
  551. package/dist/types/core/charts/likert/fixtures.d.ts +11 -0
  552. package/dist/types/core/charts/likert/layout.d.ts +111 -0
  553. package/dist/types/core/charts/line/fixtures.d.ts +16 -0
  554. package/dist/types/core/charts/line/types.d.ts +6 -0
  555. package/dist/types/core/charts/mekko/fixtures.d.ts +13 -0
  556. package/dist/types/core/charts/pareto/fixtures.d.ts +5 -0
  557. package/dist/types/core/charts/pareto/layout.d.ts +68 -0
  558. package/dist/types/core/charts/pie/fixtures.d.ts +14 -0
  559. package/dist/types/core/charts/pvm/fixtures.d.ts +13 -0
  560. package/dist/types/core/charts/pvm/types.d.ts +118 -0
  561. package/dist/types/core/charts/pyramid/fixtures.d.ts +4 -0
  562. package/dist/types/core/charts/pyramid/types.d.ts +92 -0
  563. package/dist/types/core/charts/sankey/fixtures.d.ts +4 -0
  564. package/dist/types/core/charts/sankey/types.d.ts +116 -0
  565. package/dist/types/core/charts/scatter/fixtures.d.ts +12 -0
  566. package/dist/types/core/charts/scatter/types.d.ts +58 -0
  567. package/dist/types/core/charts/slope/fixtures.d.ts +13 -0
  568. package/dist/types/core/charts/sparkline/fixtures.d.ts +9 -0
  569. package/dist/types/core/charts/status/fixtures.d.ts +8 -0
  570. package/dist/types/core/charts/status/layout.d.ts +71 -0
  571. package/dist/types/core/charts/table/fitFormats.d.ts +67 -0
  572. package/dist/types/core/charts/table/fixtures.d.ts +7 -0
  573. package/dist/types/core/charts/table/resolve.d.ts +72 -0
  574. package/dist/types/core/charts/table/view.d.ts +156 -0
  575. package/dist/types/core/charts/tilemap/fixtures.d.ts +3 -0
  576. package/dist/types/core/charts/tilemap/types.d.ts +94 -0
  577. package/dist/types/core/charts/treemap/fixtures.d.ts +4 -0
  578. package/dist/types/core/charts/treemap/types.d.ts +78 -0
  579. package/dist/types/core/charts/variance/fixtures.d.ts +12 -0
  580. package/dist/types/core/charts/waffle/fixtures.d.ts +5 -0
  581. package/dist/types/core/charts/waffle/types.d.ts +117 -0
  582. package/dist/types/core/charts/waterfall/fixtures.d.ts +9 -0
  583. package/dist/types/core/claims/browser.d.ts +49 -0
  584. package/dist/types/core/claims/manifest.d.ts +22 -0
  585. package/dist/types/core/dateFormat.d.ts +39 -0
  586. package/dist/types/core/deferred.d.ts +121 -0
  587. package/dist/types/core/diagnostics/describe.d.ts +149 -0
  588. package/dist/types/core/diagnostics/jsonPatch.d.ts +36 -0
  589. package/dist/types/core/doc/bareChart.d.ts +2 -0
  590. package/dist/types/core/doc/diagnostics.d.ts +124 -0
  591. package/dist/types/core/doc/docExpand.d.ts +39 -0
  592. package/dist/types/core/doc/document.d.ts +43 -0
  593. package/dist/types/core/doc/ownedDocumentCopy.d.ts +5 -0
  594. package/dist/types/core/doc/specError.d.ts +6 -0
  595. package/dist/types/core/emptyData.d.ts +27 -0
  596. package/dist/types/core/eventLane.d.ts +208 -0
  597. package/dist/types/core/fontMetrics/index.d.ts +47 -0
  598. package/dist/types/core/fontMetrics/injected.d.ts +40 -0
  599. package/dist/types/core/fontMetrics/tableDocument.d.ts +73 -0
  600. package/dist/types/core/fontMetrics/tables.generated.d.ts +17 -0
  601. package/dist/types/core/footer.d.ts +59 -0
  602. package/dist/types/core/format.d.ts +149 -0
  603. package/dist/types/core/formatPrecision.d.ts +136 -0
  604. package/dist/types/core/formatSpec.d.ts +304 -0
  605. package/dist/types/core/frame.d.ts +583 -0
  606. package/dist/types/core/geo/packs/all.d.ts +7 -0
  607. package/dist/types/core/geo/packs/dach.d.ts +16 -0
  608. package/dist/types/core/geo/packs/de-states.d.ts +16 -0
  609. package/dist/types/core/geo/packs/eu27.d.ts +16 -0
  610. package/dist/types/core/geo/packs/europe.d.ts +16 -0
  611. package/dist/types/core/geo/packs/index.d.ts +22 -0
  612. package/dist/types/core/geo/packs/registry.d.ts +37 -0
  613. package/dist/types/core/geo/packs/us-states.d.ts +16 -0
  614. package/dist/types/core/geo/packs/world.d.ts +16 -0
  615. package/dist/types/core/geo/tiles/eu27.generated.d.ts +412 -0
  616. package/dist/types/core/geo/tiles/europe.generated.d.ts +842 -0
  617. package/dist/types/core/geo/tiles/index.d.ts +8 -0
  618. package/dist/types/core/geo/tiles/types.d.ts +36 -0
  619. package/dist/types/core/geo/tiles/us-states.generated.d.ts +952 -0
  620. package/dist/types/core/geo/tiles/world.generated.d.ts +968 -0
  621. package/dist/types/core/geo/types.d.ts +146 -0
  622. package/dist/types/core/geometry.d.ts +102 -0
  623. package/dist/types/core/grid/sharedScale.d.ts +82 -0
  624. package/dist/types/core/icons.d.ts +227 -0
  625. package/dist/types/core/inputError.d.ts +14 -0
  626. package/dist/types/core/isoDate.d.ts +2 -0
  627. package/dist/types/core/isoTime.d.ts +7 -0
  628. package/dist/types/core/label/categoryRow.d.ts +332 -0
  629. package/dist/types/core/label/occupied.d.ts +41 -0
  630. package/dist/types/core/label/ownership.d.ts +83 -0
  631. package/dist/types/core/label/solver.d.ts +384 -0
  632. package/dist/types/core/label/tickRow.d.ts +78 -0
  633. package/dist/types/core/live/types.d.ts +50 -0
  634. package/dist/types/core/normalize/shared.d.ts +56 -0
  635. package/dist/types/core/notes.d.ts +174 -0
  636. package/dist/types/core/othersShade.d.ts +9 -0
  637. package/dist/types/core/periodYears.d.ts +9 -0
  638. package/dist/types/core/polyline.d.ts +11 -0
  639. package/dist/types/core/rangeRules.d.ts +19 -0
  640. package/dist/types/core/ratioTier.d.ts +120 -0
  641. package/dist/types/core/readerStrings.d.ts +13 -0
  642. package/dist/types/core/reading.d.ts +120 -0
  643. package/dist/types/core/registry.d.ts +178 -0
  644. package/dist/types/core/repaintGeometry.d.ts +19 -0
  645. package/dist/types/core/request.d.ts +124 -0
  646. package/dist/types/core/rows.d.ts +47 -0
  647. package/dist/types/core/scale.d.ts +106 -0
  648. package/dist/types/core/schema/capability.d.ts +229 -0
  649. package/dist/types/core/schema/namedColumns.d.ts +45 -0
  650. package/dist/types/core/schema/reference.d.ts +31 -0
  651. package/dist/types/core/schema/refusals.d.ts +45 -0
  652. package/dist/types/core/schema/unknownKeys.d.ts +45 -0
  653. package/dist/types/core/seriesIdentity.d.ts +120 -0
  654. package/dist/types/core/shareRounding.d.ts +49 -0
  655. package/dist/types/core/sizing.d.ts +330 -0
  656. package/dist/types/core/staticFooter.d.ts +6 -0
  657. package/dist/types/core/story.d.ts +41 -0
  658. package/dist/types/core/structureCounts.d.ts +10 -0
  659. package/dist/types/core/svg/renderSvg.d.ts +51 -0
  660. package/dist/types/core/target.d.ts +89 -0
  661. package/dist/types/core/text.d.ts +113 -0
  662. package/dist/types/core/theme.d.ts +478 -0
  663. package/dist/types/core/themeFields.d.ts +11 -0
  664. package/dist/types/core/themeRules.d.ts +111 -0
  665. package/dist/types/core/themeShape.d.ts +87 -0
  666. package/dist/types/core/themeValidate.d.ts +15 -0
  667. package/dist/types/core/timeAxis.d.ts +106 -0
  668. package/dist/types/core/types/annotations.d.ts +227 -0
  669. package/dist/types/core/types/cell.d.ts +82 -0
  670. package/dist/types/core/types/data.d.ts +314 -0
  671. package/dist/types/core/types/diagram.d.ts +234 -0
  672. package/dist/types/core/types/index.d.ts +8 -0
  673. package/dist/types/core/types/options.d.ts +1583 -0
  674. package/dist/types/core/types/scene.d.ts +990 -0
  675. package/dist/types/core/types/sizing.d.ts +51 -0
  676. package/dist/types/core/types/table.d.ts +873 -0
  677. package/dist/types/core/types/theme.d.ts +806 -0
  678. package/dist/types/core/zoom.d.ts +106 -0
  679. package/dist/types/fixtures/index.d.ts +40 -0
  680. package/dist/types/fixtures/registry.d.ts +15 -0
  681. package/dist/types/fonts.d.ts +10 -0
  682. package/dist/types/index.d.ts +70 -0
  683. package/dist/types/react/BoardplotTheme.d.ts +9 -0
  684. package/dist/types/react/DimSwitchChart.d.ts +36 -0
  685. package/dist/types/react/ScaleGroup.d.ts +31 -0
  686. package/dist/types/react/SceneRenderer.d.ts +23 -0
  687. package/dist/types/react/SizePlaceholder.d.ts +51 -0
  688. package/dist/types/react/StoryFrame.d.ts +42 -0
  689. package/dist/types/react/TableChart.d.ts +220 -0
  690. package/dist/types/react/a11ySurface.d.ts +20 -0
  691. package/dist/types/react/barrelCharts.d.ts +1023 -0
  692. package/dist/types/react/charts/bar.d.ts +28 -0
  693. package/dist/types/react/charts/bartable.d.ts +27 -0
  694. package/dist/types/react/charts/box.d.ts +27 -0
  695. package/dist/types/react/charts/bullet.d.ts +28 -0
  696. package/dist/types/react/charts/butterfly.d.ts +28 -0
  697. package/dist/types/react/charts/choropleth.d.ts +27 -0
  698. package/dist/types/react/charts/cohort.d.ts +52 -0
  699. package/dist/types/react/charts/column.d.ts +27 -0
  700. package/dist/types/react/charts/combo.d.ts +7 -0
  701. package/dist/types/react/charts/creative.d.ts +27 -0
  702. package/dist/types/react/charts/diagram.d.ts +162 -0
  703. package/dist/types/react/charts/dimswitch.d.ts +6 -0
  704. package/dist/types/react/charts/dot.d.ts +28 -0
  705. package/dist/types/react/charts/funnel.d.ts +28 -0
  706. package/dist/types/react/charts/gantt.d.ts +28 -0
  707. package/dist/types/react/charts/grid.d.ts +29 -0
  708. package/dist/types/react/charts/heatmap.d.ts +28 -0
  709. package/dist/types/react/charts/histogram.d.ts +27 -0
  710. package/dist/types/react/charts/kpi.d.ts +28 -0
  711. package/dist/types/react/charts/likert.d.ts +27 -0
  712. package/dist/types/react/charts/line.d.ts +28 -0
  713. package/dist/types/react/charts/mekko.d.ts +28 -0
  714. package/dist/types/react/charts/pareto.d.ts +28 -0
  715. package/dist/types/react/charts/pie.d.ts +28 -0
  716. package/dist/types/react/charts/pvm.d.ts +27 -0
  717. package/dist/types/react/charts/pyramid.d.ts +27 -0
  718. package/dist/types/react/charts/sankey.d.ts +27 -0
  719. package/dist/types/react/charts/scatter.d.ts +28 -0
  720. package/dist/types/react/charts/slope.d.ts +28 -0
  721. package/dist/types/react/charts/sparkline.d.ts +28 -0
  722. package/dist/types/react/charts/status.d.ts +27 -0
  723. package/dist/types/react/charts/table.d.ts +6 -0
  724. package/dist/types/react/charts/tilemap.d.ts +27 -0
  725. package/dist/types/react/charts/treemap.d.ts +27 -0
  726. package/dist/types/react/charts/variance.d.ts +28 -0
  727. package/dist/types/react/charts/waffle.d.ts +28 -0
  728. package/dist/types/react/charts/waterfall.d.ts +28 -0
  729. package/dist/types/react/createChartComponent.d.ts +135 -0
  730. package/dist/types/react/export/clipboard.d.ts +8 -0
  731. package/dist/types/react/export/csv.d.ts +2 -0
  732. package/dist/types/react/export/frame.d.ts +35 -0
  733. package/dist/types/react/export/index.d.ts +7 -0
  734. package/dist/types/react/export/png.d.ts +14 -0
  735. package/dist/types/react/export/svg.d.ts +5 -0
  736. package/dist/types/react/export/types.d.ts +69 -0
  737. package/dist/types/react/export/useExport.d.ts +17 -0
  738. package/dist/types/react/exportLink.d.ts +49 -0
  739. package/dist/types/react/footerFrame.d.ts +25 -0
  740. package/dist/types/react/hover/dataTable.d.ts +13 -0
  741. package/dist/types/react/hover/engine.d.ts +210 -0
  742. package/dist/types/react/hover/keyboard.d.ts +44 -0
  743. package/dist/types/react/hover/labelCard.d.ts +170 -0
  744. package/dist/types/react/hover/placement.d.ts +49 -0
  745. package/dist/types/react/index.d.ts +16 -0
  746. package/dist/types/react/parseChartSpec.d.ts +16 -0
  747. package/dist/types/react/prepare.d.ts +32 -0
  748. package/dist/types/react/prepared.d.ts +53 -0
  749. package/dist/types/react/preparedTable.d.ts +15 -0
  750. package/dist/types/react/rowsInput.d.ts +55 -0
  751. package/dist/types/react/rowsModule.d.ts +18 -0
  752. package/dist/types/react/rowsStore.d.ts +50 -0
  753. package/dist/types/react/scale-group.d.ts +2 -0
  754. package/dist/types/react/scaleGroupContext.d.ts +22 -0
  755. package/dist/types/react/scenePaint.d.ts +10 -0
  756. package/dist/types/react/scrollState.d.ts +26 -0
  757. package/dist/types/react/spec.d.ts +82 -0
  758. package/dist/types/react/specValidation.d.ts +45 -0
  759. package/dist/types/react/story.d.ts +15 -0
  760. package/dist/types/react/theme.d.ts +9 -0
  761. package/dist/types/react/themeContext.d.ts +44 -0
  762. package/dist/types/react/useChartLayout.d.ts +22 -0
  763. package/dist/types/react/useContainerSize.d.ts +57 -0
  764. package/dist/types/react/useHover.d.ts +100 -0
  765. package/dist/types/react/useZoom.d.ts +50 -0
  766. package/dist/types/rows.d.ts +63 -0
  767. package/dist/types/tableLooks.d.ts +6 -0
  768. package/dist/types/theme.d.ts +3 -0
  769. package/dist/types/validate.d.ts +3 -0
  770. package/dist/validate.d.ts +1 -0
  771. package/dist/validate.js +223 -0
  772. package/docs/FONTS.md +68 -0
  773. package/docs/TELEMETRY.md +94 -0
  774. package/docs/manual.md +850 -0
  775. package/docs/reference/bar.md +222 -0
  776. package/docs/reference/bartable.md +143 -0
  777. package/docs/reference/box.md +93 -0
  778. package/docs/reference/bullet.md +118 -0
  779. package/docs/reference/butterfly.md +117 -0
  780. package/docs/reference/choropleth.md +148 -0
  781. package/docs/reference/cohort.md +149 -0
  782. package/docs/reference/column.md +275 -0
  783. package/docs/reference/combo.md +219 -0
  784. package/docs/reference/creative.md +147 -0
  785. package/docs/reference/diagram.md +191 -0
  786. package/docs/reference/dimswitch.md +1395 -0
  787. package/docs/reference/dot.md +117 -0
  788. package/docs/reference/fixtures.md +1089 -0
  789. package/docs/reference/funnel.md +121 -0
  790. package/docs/reference/gantt.md +138 -0
  791. package/docs/reference/grid.md +302 -0
  792. package/docs/reference/heatmap.md +127 -0
  793. package/docs/reference/histogram.md +77 -0
  794. package/docs/reference/kpi.md +115 -0
  795. package/docs/reference/likert.md +113 -0
  796. package/docs/reference/line.md +436 -0
  797. package/docs/reference/mekko.md +114 -0
  798. package/docs/reference/options.md +313 -0
  799. package/docs/reference/pareto.md +102 -0
  800. package/docs/reference/pie.md +114 -0
  801. package/docs/reference/pvm.md +114 -0
  802. package/docs/reference/pyramid.md +99 -0
  803. package/docs/reference/react.md +706 -0
  804. package/docs/reference/reading.md +28 -0
  805. package/docs/reference/sankey.md +110 -0
  806. package/docs/reference/scatter.md +211 -0
  807. package/docs/reference/slope.md +126 -0
  808. package/docs/reference/sparkline.md +74 -0
  809. package/docs/reference/status.md +107 -0
  810. package/docs/reference/table.md +673 -0
  811. package/docs/reference/theme.md +361 -0
  812. package/docs/reference/tilemap.md +121 -0
  813. package/docs/reference/treemap.md +86 -0
  814. package/docs/reference/variance.md +126 -0
  815. package/docs/reference/waffle.md +106 -0
  816. package/docs/reference/waterfall.md +164 -0
  817. package/llms.txt +57 -0
  818. package/package.json +437 -4
@@ -0,0 +1,1395 @@
1
+ # Dimension switch table
2
+
3
+ Contents: [Use cases](#use-cases), [Chart IDs](#chart-ids), [Minimal spec](#minimal-spec), [Data](#data), [Options](#options), [Annotations](#annotations), [What the table is for](#what-the-table-is-for), [Mental model](#mental-model), [Host data: what to supply and how to compute it](#host-data-what-to-supply-and-how-to-compute-it), [Measures: values, formats, changes and judgement](#measures-values-formats-changes-and-judgement), [Statements: subtotals, results and drivers](#statements-subtotals-results-and-drivers), [View options](#view-options), [Worked example](#worked-example), [React usage](#react-usage), [Common mistakes](#common-mistakes), [Sizing](#sizing), [Fixtures](#fixtures), [Not for](#not-for).
4
+
5
+ <!-- Generated by scripts/generate-reference.mjs from the boardplot describe, list and fixtures payloads. -->
6
+
7
+ A KPI table: measures by one hierarchical dimension by period, switchable between KPI rows over members and member rows over KPIs. The host supplies additive sums per member and period; Boardplot derives ratios, changes and judgement. Type `dimswitch`. Aliases: `dim-switch-table`, `dim-switch`.
8
+
9
+ ## Use cases
10
+
11
+ - Weekly KPIs by channel
12
+ - Channels by KPI with changes
13
+ - Changes judged against the period before
14
+
15
+ ## Chart IDs
16
+
17
+ - `dimswitch.by-measure`: fixture `by-measure`
18
+ - `dimswitch.by-member`: fixture `by-member`
19
+
20
+ ## Minimal spec
21
+
22
+ ```json
23
+ {
24
+ "type": "dimswitch",
25
+ "data": {
26
+ "dimension": {
27
+ "label": "Channel",
28
+ "total": { "id": "total", "label": "Total" },
29
+ "members": [{ "id": "paid", "label": "Paid Search" }, { "id": "organic", "label": "Organic" }],
30
+ "headline": ["spend", "revenue"]
31
+ },
32
+ "measures": [
33
+ {
34
+ "id": "orders",
35
+ "scale": "count",
36
+ "label": "Orders",
37
+ "change": "relative",
38
+ "value": { "field": "orders" },
39
+ "judge": { "family": "volume", "base": "orders" }
40
+ },
41
+ {
42
+ "id": "new",
43
+ "scale": "count",
44
+ "label": "New customers",
45
+ "parentId": "orders",
46
+ "value": { "field": "nc" }
47
+ },
48
+ {
49
+ "id": "existing",
50
+ "scale": "count",
51
+ "label": "Existing customers",
52
+ "parentId": "orders",
53
+ "value": { "op": "sub", "a": { "field": "orders" }, "b": { "field": "nc" } }
54
+ },
55
+ {
56
+ "id": "revenue",
57
+ "scale": "money",
58
+ "label": "Net revenue",
59
+ "value": { "field": "rev" },
60
+ "format": "$1.2",
61
+ "unit": "$"
62
+ },
63
+ {
64
+ "id": "spend",
65
+ "scale": "money",
66
+ "label": "Marketing spend",
67
+ "value": { "field": "spend" },
68
+ "format": "$1.2",
69
+ "unit": "$"
70
+ },
71
+ {
72
+ "id": "cac",
73
+ "scale": "perUnit",
74
+ "label": "CAC",
75
+ "value": { "op": "div", "a": { "field": "spend" }, "b": { "field": "nc" } },
76
+ "format": "$1.2",
77
+ "unit": "$",
78
+ "judge": { "family": "cost", "base": "nc" }
79
+ }
80
+ ],
81
+ "periods": [
82
+ { "id": "range", "label": "Range", "kind": "range" },
83
+ { "id": "prior", "label": "Prior", "kind": "prior" },
84
+ { "id": "w1", "label": "Week 1" },
85
+ { "id": "w2", "label": "Week 2", "partial": true }
86
+ ],
87
+ "facts": [
88
+ {
89
+ "memberId": "total",
90
+ "periodId": "range",
91
+ "sums": { "orders": 120, "nc": 60, "rev": 12000, "spend": 1800 },
92
+ "ref": { "orders": 110, "nc": 50, "rev": 11000, "spend": 1900 }
93
+ },
94
+ {
95
+ "memberId": "total",
96
+ "periodId": "prior",
97
+ "sums": { "orders": 128, "nc": 62, "rev": 12500, "spend": 1830 },
98
+ "ref": { "orders": 110, "nc": 50, "rev": 11000, "spend": 1900 }
99
+ },
100
+ {
101
+ "memberId": "total",
102
+ "periodId": "w1",
103
+ "sums": { "orders": 136, "nc": 64, "rev": 13000, "spend": 1860 },
104
+ "ref": { "orders": 110, "nc": 50, "rev": 11000, "spend": 1900 }
105
+ },
106
+ {
107
+ "memberId": "total",
108
+ "periodId": "w2",
109
+ "sums": { "orders": 144, "nc": 66, "rev": 13500, "spend": 1890 },
110
+ "ref": { "orders": 110, "nc": 50, "rev": 11000, "spend": 1900 }
111
+ },
112
+ {
113
+ "memberId": "paid",
114
+ "periodId": "range",
115
+ "sums": { "orders": 105, "nc": 53, "rev": 10500, "spend": 1600 },
116
+ "ref": { "orders": 95, "nc": 43, "rev": 9500, "spend": 1700 }
117
+ },
118
+ {
119
+ "memberId": "paid",
120
+ "periodId": "prior",
121
+ "sums": { "orders": 113, "nc": 55, "rev": 11000, "spend": 1630 },
122
+ "ref": { "orders": 95, "nc": 43, "rev": 9500, "spend": 1700 }
123
+ },
124
+ {
125
+ "memberId": "paid",
126
+ "periodId": "w1",
127
+ "sums": { "orders": 121, "nc": 57, "rev": 11500, "spend": 1660 },
128
+ "ref": { "orders": 95, "nc": 43, "rev": 9500, "spend": 1700 }
129
+ },
130
+ {
131
+ "memberId": "paid",
132
+ "periodId": "w2",
133
+ "sums": { "orders": 129, "nc": 59, "rev": 12000, "spend": 1690 },
134
+ "ref": { "orders": 95, "nc": 43, "rev": 9500, "spend": 1700 }
135
+ },
136
+ {
137
+ "memberId": "organic",
138
+ "periodId": "range",
139
+ "sums": { "orders": 60, "nc": 32, "rev": 6000 },
140
+ "ref": { "orders": 50, "nc": 22, "rev": 5000 }
141
+ },
142
+ {
143
+ "memberId": "organic",
144
+ "periodId": "prior",
145
+ "sums": { "orders": 68, "nc": 34, "rev": 6500 },
146
+ "ref": { "orders": 50, "nc": 22, "rev": 5000 }
147
+ },
148
+ {
149
+ "memberId": "organic",
150
+ "periodId": "w1",
151
+ "sums": { "orders": 76, "nc": 36, "rev": 7000 },
152
+ "ref": { "orders": 50, "nc": 22, "rev": 5000 }
153
+ },
154
+ {
155
+ "memberId": "organic",
156
+ "periodId": "w2",
157
+ "sums": { "orders": 84, "nc": 38, "rev": 7500 },
158
+ "ref": { "orders": 50, "nc": 22, "rev": 5000 }
159
+ }
160
+ ]
161
+ },
162
+ "options": { "variant": "by-measure", "depth": 1, "title": "Channel performance" }
163
+ }
164
+ ```
165
+
166
+ ## Data
167
+
168
+ | Path | Type | Required | Meaning |
169
+ |---|---|---|---|
170
+ | dimension | object | yes | One hierarchical dimension. |
171
+ | dimension.label | string | yes | Dimension name, such as Channel. It heads the label column and the member section in by-member. |
172
+ | dimension.total | object | yes | Source total member. |
173
+ | dimension.total.id | string | yes | Total member id in facts. |
174
+ | dimension.total.label | string | yes | Total row label. |
175
+ | dimension.total.heading | string | | by-measure: section heading over the measures before the first group. Absent, the total label. |
176
+ | dimension.total.fields | array | | Fields that apply even when the drawn windows hold only null. |
177
+ | dimension.members | array | yes | One hierarchy of dimension members. |
178
+ | dimension.members[].id | string | yes | Stable id or display label. |
179
+ | dimension.members[].label | string | yes | Stable id or display label. |
180
+ | dimension.members[].parentId | string | | Parent member id; absent for a top-level member. |
181
+ | dimension.members[].fields | array | | Fields that apply even when the drawn windows hold only null. |
182
+ | dimension.headline | array | yes | Folded by-member row figure: the first measure id here that applies to the member. |
183
+ | dimension.sums | boolean | | True derives parent and total sums from children (default false: supplied sums). True records differences from supplied sums; with false, members need not add up. |
184
+ | measures | array | yes | KPI rows (a measure with parentId or splitOf is a split). |
185
+ | measures[].id | string | yes | Stable id or display label. |
186
+ | measures[].label | string | yes | Stable id or display label. |
187
+ | measures[].value | object \| number | | Required, except on a subtotal (a measure that other measures name in partOf): absent, Boardplot adds up its parts with their signs. |
188
+ | measures[].value.field (measures[].value branch 1) | string | yes | Field name in facts[].sums. |
189
+ | measures[].value.measure (measures[].value branch 2) | string | yes | Another measure's value, by measure id. A percent measure enters as a fraction (42.5% reads 0.425). |
190
+ | measures[].value.total (measures[].value branch 3) | object \| number | yes | Expression over additive sums, other measures and constants. A Total operand evaluates its whole expression against dimension.total.id in the same current, prior, displayed-period ref or plan window. Nested Total keeps this scope. |
191
+ | measures[].value.op (measures[].value branch 5) | string | yes | Arithmetic (x/0 prints n.m., 0/0 prints n/a). One of `'add'`, `'sub'`, `'mul'`, `'div'`. |
192
+ | measures[].value.a (measures[].value branch 5) | object \| number | yes | Expression over additive sums, other measures and constants. A Total operand evaluates its whole expression against dimension.total.id in the same current, prior, displayed-period ref or plan window. Nested Total keeps this scope. |
193
+ | measures[].value.b (measures[].value branch 5) | object \| number | yes | Expression over additive sums, other measures and constants. A Total operand evaluates its whole expression against dimension.total.id in the same current, prior, displayed-period ref or plan window. Nested Total keeps this scope. |
194
+ | measures[].value.factor (measures[].value branch 5) | number | | Multiplier of the result: 100 for a percent level, 1000 for CPM. |
195
+ | measures[].scale | string | | Precision rule from the largest absolute Range or period value; changes do not count. Money and count take it over every member row of the measure, so the measure prints in one magnitude: a member at 210k under a 1.2M total prints 0.21M, not 210.0k. Per unit and percent take it per row. Money: k, M or B with one decimal at 1000 or more, else whole units; every member row prints at the precision of the measure: a nonzero figure below it prints the bound (<0.01M), an exact zero prints 0, and a count never gains decimals. Per unit: fractional values keep authored precision. Without a format, start whole at 10 or more, else one decimal, then raise precision for rounding error above 1%, up to 20 decimals. Integer-only rows keep those defaults. Money and per unit drop format affixes; put the currency in unit. Count and percent keep the format; defaults 1,234 and 1.2%. Scaled money and automatic count rows add decimals for rounding error above 1% of the largest value of the measure, up to 20; held whole thousands stay whole. Nonzero values never print as zero. Absent keeps the format. One of `'money'`, `'perUnit'`, `'count'`, `'percent'`. |
196
+ | measures[].bands | array | | Range and period value bands in original units; percent levels use percentage points. Select the first value <= to, or the last band above all bounds. Missing tone means neutral. Bands replace level change colours; judge still colours comparisons. Partial windows and failed sample floors stay neutral. |
197
+ | measures[].bands[].tone | string | | Semantic band tone. One of `'good'`, `'warn'`, `'bad'`, `'neutral'`. |
198
+ | measures[].bands[].to | number | yes | Upper endpoint of this band in the value units. |
199
+ | measures[].bands[].label | string | | Visible name of this band. |
200
+ | measures[].format | string | | Format example, such as 1.2% or 1,234; see scale. |
201
+ | measures[].unit | string | | Unit after the KPI label, such as EUR. A % or pp unit beside a percent format is left out. |
202
+ | measures[].parentId | string | | Split of this root measure: drawn under it only with splits on. |
203
+ | measures[].splitOf | string | | Dual-role measure (a root with splits off, a split of this root with splits on). Cannot combine with parentId. |
204
+ | measures[].change | string | | Change shown: relative percent (default); pp, the difference of percent levels; absolute, current minus reference in the measure format with a sign (statement lines: the changes then add up down the statement). One of `'relative'`, `'pp'`, `'absolute'`. |
205
+ | measures[].judge | object | | Judge the change against thresholds (unjudged money and count rows outside a statement draw bars). |
206
+ | measures[].judge.family (measures[].judge branch 1) | string | yes | Threshold family (cost is lower-is-better). One of `'volume'`, `'cost'`, `'rate'`. |
207
+ | measures[].judge.base (measures[].judge branch 1) | string \| array | yes | One field or a nonempty list of unique fields. All listed fields must meet their own minimumSample floor in every required member and Total window. |
208
+ | measures[].judge.family (measures[].judge branch 2) | string | yes | Effect on the statement result, in thresholds.effect units. One of `'effect'`. |
209
+ | measures[].judge.base (measures[].judge branch 2) | string \| array | | One field or a nonempty list of unique fields. All listed fields must meet their own minimumSample floor in every required member and Total window. |
210
+ | measures[].partOf | string | | Statement: the subtotal line this measure adds up into (a measure id). The subtotal value is the signed sum of its parts unless it has its own value. |
211
+ | measures[].sign | number | | Statement: the line subtracts (a cost authored as a positive amount). options.signs decides how it prints. One of `-1`. |
212
+ | measures[].result | true | | Statement: a result line. Its value names its lines, e.g. { op: 'sub', a: { measure: 'income' }, b: { measure: 'costs' } }. No sign, no partOf. One of `true`. |
213
+ | measures[].drivers | object \| number | | Statement: how this line follows from driver measures, as a formula over { measure } and numbers, e.g. (AOV - returns) x margin. The named measures are drivers: printed under the same subtotal (or their own partOf), never added, judged by their effect. |
214
+ | measures[].drivers.measure (measures[].drivers branch 1) | string | yes | Driver measure id; its value may use Total operands. |
215
+ | measures[].drivers.op (measures[].drivers branch 3) | string | yes | Arithmetic over driver measure values. One of `'add'`, `'sub'`, `'mul'`, `'div'`. |
216
+ | measures[].drivers.a (measures[].drivers branch 3) | object \| number | yes | Driver formula over measure references and constants only. |
217
+ | measures[].drivers.b (measures[].drivers branch 3) | object \| number | yes | Driver formula over measure references and constants only. |
218
+ | measures[].drivers.factor (measures[].drivers branch 3) | number | | Multiplier of the result. |
219
+ | measures[].group | string | | Group label. by-measure heads each group with a section row; by-member nests the group under a label row in every member block. |
220
+ | measures[].divider | true | | The measure opens a family of KPIs: its rows take the rule above them. One of `true`. |
221
+ | measures[].inTotalBlock | boolean | | false leaves the measure out of the total block in by-member; by-measure keeps its total row. Default true. |
222
+ | groupHeadings | object | | by-measure section heading per measure group label. Absent, the group label heads its section. |
223
+ | effectLabel | string | | Tag of a driver's effect in the cell hover text, such as Margin effect. Absent: no effect line. The line is hidden in the cell (inlineVisibility effect false) and shows in the hover. |
224
+ | changeLabel | string | | Tag of the change line under each period value, such as WoW; it also opens the hover text of the cell. |
225
+ | periods | array | yes | One range, one prior, zero or one plan, then at least one displayed period in order. The host owns dates and reference windows. |
226
+ | periods[].id | string | yes | Stable id or display label. |
227
+ | periods[].label | string | yes | Column head (prior or plan: head of the comparison column, such as vs prior or vs plan). |
228
+ | periods[].subLabel | string | | Second head line, such as W38 or dates. |
229
+ | periods[].partial | boolean | | Cut or running window (muted, never judged). Its ref covers the same days one period earlier. |
230
+ | periods[].kind | string | | Block role: range is the selection, prior the window of equal length before it. plan adds the Range vs-plan column (pl), without prorating. Absent for a displayed period. One of `'range'`, `'prior'`, `'plan'`. |
231
+ | facts | array | yes | Additive sums per member and period, one entry each. |
232
+ | facts[].memberId | string | yes | Stable id or display label. |
233
+ | facts[].periodId | string | yes | Stable id or display label. |
234
+ | facts[].sums | object | yes | Sums by field: an absent field drops its measures, null is missing, 0 is data. Absent means absent from every fact of the member. |
235
+ | facts[].ref | object | | Sums of the period before (partial: the same days one period earlier). Only displayed periods take ref; Range compares with prior and optional plan. |
236
+
237
+ ## Options
238
+
239
+ | Path | Type | Values | Default | Meaning |
240
+ |---|---|---|---|---|
241
+ | mountCollapsed | boolean | | | Default true. false removes closed descendants from the React DOM and defers offscreen leaf paint. |
242
+ | signs | string | `'signed'`, `'operators'`, `'plain'` | | How sign -1 rows print. signed (default) negates them; operators draws + − × =; plain draws neither. |
243
+ | driverTones | string | `'grouped'`, `'always'`, `'never'` | | Driver tones. 'grouped' (default): drivers with a parentId whose parent is not a section heading do, as statement lines do. 'always': every driver. 'never': driver ink only, as before 0.28. Neutral figures and labels keep the driver ink. |
244
+ | judgements | string | `'all'`, `'exceptions'` | | Which tones show. exceptions: strong good and bad only. |
245
+ | variant | string | `'by-measure'`, `'by-member'` | `'by-measure'` | by-measure: KPI rows over members (by-member: members over KPIs, Total first). In by-member the Total block is always open. |
246
+ | encodings | object | | | Per-column opt-in visual encodings. |
247
+ | encodings.*.type (encodings.* branch 5) | string | `'arrow'` | | Select the arrow lane. |
248
+ | encodings.*.scale (encodings.* branch 5) | string | `'absolute'`, `'relative'` | | 'absolute' cuts the change itself at 10 and 2 (points on a percent column); 'relative' cuts its share of the column's largest change at 10% and 2%. Default 'absolute' on a percent column, 'relative' elsewhere. |
249
+ | encodings.*.type (encodings.* branch 6) | string | `'heat'` | | Select the heat lane. |
250
+ | encodings.*.cap (encodings.* branch 6) | object | | | Where the lane saturates; without it the largest magnitude in the column does, on both sides of zero. One lane per table, on a variance column. |
251
+ | encodings.*.cap.pct (encodings.* branch 6) | number | | | Percent-column tint cap in points. Example: 20 for a ±20% YoY lane. |
252
+ | encodings.*.cap.abs (encodings.* branch 6) | number | | | Other numeric tint cap in source units. |
253
+ | encodings.*.alpha (encodings.* branch 6) | number | | | Tint weight at the cap; default 0.18, and 0.26 on scale 'status', where every painted cell takes it. Text stays readable up to 0.18 on every shipped theme and up to 0.35 on a status ground; above that the figures take the contrast ink. |
254
+ | encodings.*.excludeTotals (encodings.* branch 6) | boolean | | | Leave total rows untinted; default true. Heat reads a variance, and a total has none worth colouring. |
255
+ | encodings.*.steps (encodings.* branch 6) | integer | | | Band count. 5 gives the cohort ladder: 6 / 14 / 26 / 42 % of the ink over the background, then the full ink with inverse text, from the theme token surface.heatSteps. A stepped lane measures the data rows only, so a closing row does not set the scale. |
256
+ | encodings.*.scale (encodings.* branch 6) | string | `'column'`, `'absolute'`, `'diverging'`, `'status'` | | Where a band comes from. 'column' (default) normalises over this column's own min and max; with two or more such columns the table adds the note that shading compares values within each column. 'absolute' cuts at bins, so every column of a grid reads on one scale. 'diverging' measures the distance from the column average and paints good above and bad below; under polarity 'lowerIsBetter' the sides swap. 'status' is a traffic light against the same centre: a value within tolerance of it paints warn, farther above good and farther below bad, the other way round on a column with polarity lowerIsBetter; it reads no steps, bins, span or cap. |
257
+ | encodings.*.bins (encodings.* branch 6) | array | | | Ascending band edges. On scale 'absolute' a value takes the band of the last edge it reaches (e.g. [30, 40, 50, 60] gives five bands); on 'diverging' they are the \|distance\| edges, default [1, 4]. Given without steps, they set the band count themselves. |
258
+ | encodings.*.span (encodings.* branch 6) | number | | | Spread that fills a column ramp. Measured in column units; a smaller spread takes bands from the lightest up, so a spread of 1 point is not painted like one of 30. Omitted, every column's own min and max fill the ramp. |
259
+ | encodings.*.center (encodings.* branch 6) | string | `'total'` | | Centre: column total. On scales 'diverging' and 'status' a reader can check every band against that printed figure. Omitted, or in a column without a total row value, the centre is the average of the column's data rows. |
260
+ | encodings.*.tolerance (encodings.* branch 6) | object | | | Warn band of scale 'status'. A value at most this far from the centre paints warn, the boundary included; default { pct: 5 }. Give exactly one of pct and abs. |
261
+ | encodings.*.tolerance.pct (encodings.* branch 6) | number | | | Percent of the centre. 5 reads 62 to 68 as warn around 65. |
262
+ | encodings.*.tolerance.abs (encodings.* branch 6) | number | | | Column units. 2 reads 63 to 67 as warn around 65. |
263
+ | encodings.*.columns (encodings.* branch 6) | array | | | Further columns this rule paints. A sixty-column cohort grid names its lane once instead of sixty times, and a column that carries its own entry keeps it. Leave a column out to keep it unshaded. |
264
+ | totalPosition | string | `'top'`, `'bottom'` | | Total-row position; variant supplies the default. |
265
+ | density | string | `'compact'`, `'regular'`, `'relaxed'` | | Cell spacing: 'compact', 'regular' or 'relaxed'. The cohort densities do not apply: every cell holds a value and a change line, and cohort rows are fixed one-liners. |
266
+ | nulls | string | `'blank'`, `'dash'` | | What a MISSING cell prints. 'dash' (the default) keeps the em dash; 'blank' leaves it empty, which is what a cohort staircase needs — a cohort acquired in May has not been observed at M8, and a triangle of dashes is noise. The explicit states na, nm and suppressed keep their glyphs. |
267
+ | figures | boolean | | | Print the cell figures; default true. false draws the heat grounds alone in 22 px cells, over any width authored for the figures, on 14 px rows or the line box of the text a row still prints where that is taller, so a sixty-column triangle fits one screen. The heads keep their labels and the numbers stay in the markup for a reader who cannot see the grounds. Refused on a table without a heat lane in encodings. |
268
+ | expansion | object | | | Row-id exceptions over depth (id: JSON.stringify([variant, memberId, measureId])). |
269
+ | expansion.expanded | array | | | Row ids to open. |
270
+ | expansion.collapsed | array | | | Row ids to fold. |
271
+ | columnVisibility | object | | | Visibility by column-toggle id. |
272
+ | inlineVisibility | object | | | Visibility by inlineGroup. An absent group is visible, so a Changes control hides every MoM line of a table with one entry. |
273
+ | magnitude | string | `'auto'`, `'thousand'`, `'million'` | | Money scale for all rows and columns. 'thousand' prints whole thousands, 'million' keeps the example's decimals, and no column rolls up on its own. The scale letter leaves the cells and hoists to the frame, the column header or, where the format sits on the row, the row label. 'auto' (the default) lets each column and money row pick from its own largest value. |
274
+ | foldOn | string | `'row'`, `'toggle'` | | React only. What folds a parent row. 'row': a click on the row folds it, and selects it too where the host made it selectable. 'toggle': only the fold mark folds; a row click only selects. Default: 'toggle' for a selectable row, else 'row'. Enter and Space follow the click. |
275
+ | groupGround | string | `'expanded'`, `'always'`, `'none'` | | Group row ground. 'expanded' (default): only an open group's header row. 'always': folded or open, as before 0.28. 'none': no group ground. The Total keeps its ground. Absent: theme table.groupGround. |
276
+ | anchorWash | boolean | | | Wash expanded level-0 anchors; no control. |
277
+ | stickyLabels | boolean \| integer \| object | | | Pin header and columns. React only; static output shows the whole table. true pins one column, a number pins that many (2 for a cohort grid), and the last carries a hairline shadow. The object form sets head, columns, top and sections. Page mode is refused with React fillHeight. Off in print. |
278
+ | stickyLabels.head | string \| false | `'table'`, `'page'`, `false` | | Head pin mode. 'table' (default): in the table's own scroll box, which the host sizes. 'page': to the page scroll at `top` px; the body has no vertical scroll box, and no overflow ancestor may sit above the table. false: no pinned head. |
279
+ | stickyLabels.columns | integer | | | Columns. Default 1. |
280
+ | stickyLabels.top | number | | | Offset in px. Clears a host toolbar. Default 0; above 0 needs head: 'page'. |
281
+ | stickyLabels.sections | boolean | | | Section label. Default false. true keeps the active section label under the head until the next section starts. |
282
+ | frameFill | string | `'values'`, `'none'` | `'values'` | Under rowExtent 'frame'. 'values' (default): automatic value tracks grow in whole pixels, up to maxGrowth (default 2.5). An unauthored label track takes the rest. 'none': columns keep their widths; an empty track carries the row ground and rules to the edge. |
283
+ | rowLabelLines | number | `1`, `2` | `2` | Lines a row label may take before it is cut with an ellipsis (default 2). A label breaks at a space or after _ - / or a dot, so a long campaign name wraps instead of ending in '…'. 1 keeps every label on one line. The hover card always prints the full name. |
284
+ | lastTrackFlex | boolean | | | Extend the last track to the frame edge only when it has no authored width and rowExtent is tracks. Default false. |
285
+ | rowExtent | string | `'tracks'`, `'frame'` | `'frame'` | Where rows end. 'frame' (default) fills the width inside the frame margins. An explicit 'frame' also carries row grounds and rules through authored side margins. frameFill controls track growth. 'tracks' stops rows at the last column. Column bands stop at their columns. Tables use horizontal rules and explicit column separators; there is no single vertical end rule. |
286
+ | sortIndicator | string | `'all'`, `'sorted'` | | Which sortable headers draw a chevron. 'all' (the default) draws one on every sortable header; 'sorted' draws it on the sorted one alone and keeps the others' reserve, so no track moves. |
287
+ | levelOffset | integer | | | Shift non-total rows down the level ladder. Default 0. A board whose top rows are groups rather than KPI lines reads one rung too heavy: 1 steps them down in size, weight, air, ground, indent and label ink, -1 steps them up. The rungs stay floored at the top and at the deepest step. |
288
+ | cellPadX | number | | | Horizontal cell padding in px. Default 12; only when it cannot fit, use 5 for 20–24 columns or 3 for 25 or more. |
289
+ | groupRule | string | `'label'`, `'span'` | `'span'` | Heading rule. 'span' (default) rules every column of the group, so it shows which columns the heading covers; 'label' underlines the heading text alone. |
290
+ | groupAlign | string | `'left'`, `'center'`, `'right'` | `'center'` | Heading position. 'center' (default) centres the heading over its columns; in the React grid a group wider than the visible scroll area starts its heading at the first column, and the heading stays in view while the group scrolls. 'left' always starts it at the first column, 'right' ends it at the last. A heading wider than its columns starts at the first column. |
291
+ | fitFormats | boolean | | | Fit figures to authored widths. Remove decimals, then use the next unit up. |
292
+ | maxGrowth | number \| false | `false` (or another value of its type) | `2.5` | Value-track growth cap; default 2.5, false removes the cap. Applies to SVG and React frame fill; the label track takes the remaining width. Also caps React container fit growth. |
293
+ | labelIndent | object | | | Tree indent from row edge. Absent: cell air without marks; cell air plus 24 with outlineMarks: true or interactive fold buttons. Then 16 per rung. |
294
+ | labelIndent.base | number | | | Level-0 start from row edge, padding included. |
295
+ | labelIndent.step | number | | | px per rung; default 16. |
296
+ | outlineMarks | boolean | | `false` | Fold marks beside parent rows. Drawn in static SVG/PNG and read-only grids. Default false: no marks or gutter. true draws the marks and reserves their gutter. Interactive grids keep their fold buttons either way. |
297
+ | depth | integer | | `1` | Open rungs: 1 roots folded, 2 one member level open, 3 two levels; the same in both variants. Maximum member levels plus one. Splits add no rung. |
298
+ | splits | boolean | | `false` | Show split measures under their root measure. |
299
+ | order | string \| object | `'sheet'` (or another value of its type) | | Sibling order: sheet, or {by: measure id} on Range values, descending. Ties by id, missing values last. |
300
+ | order.by | string | | | Stable id or display label. |
301
+ | order.desc | boolean | | | Descending order; default true. |
302
+ | show | string | `'always'`, `'withData'` | | withData hides a member only when every field of every measure that applies to it is zero or empty in Range; a member with any value there stays, because it still counts in the Total. Its child members hide with it. |
303
+ | thresholds | object | | | Change thresholds, separate from value bands. Resolve each family: kind override, family setting, default (volume [2,10], cost [5,15], rate [3,10]). period controls displayed changes, prior controls pp, plan controls pl. Cost is lower-is-better; pp changes use relative levels. Effect needs an explicit pair for each used kind. Pairs satisfy 0 <= first <= second. |
304
+ | thresholds.volume | array | | | Relative percent change thresholds for volume; default [2,10]. |
305
+ | thresholds.cost | array | | | Relative percent change thresholds for cost; default [5,15], lower is better. |
306
+ | thresholds.rate | array | | | Relative percent change thresholds for rate; default [3,10]. |
307
+ | thresholds.effect | array | | | Effect thresholds in the statement unit. An explicit pair must resolve for each used comparison kind. |
308
+ | thresholds.period | object | | | Family overrides for displayed-period changes. Unset families use the family setting or default. |
309
+ | thresholds.period.volume | array | | | Relative percent change thresholds for volume; default [2,10]. |
310
+ | thresholds.period.cost | array | | | Relative percent change thresholds for cost; default [5,15], lower is better. |
311
+ | thresholds.period.rate | array | | | Relative percent change thresholds for rate; default [3,10]. |
312
+ | thresholds.period.effect | array | | | Effect thresholds in the statement unit. An explicit pair must resolve for each used comparison kind. |
313
+ | thresholds.prior | object | | | Family overrides for pp, the Range vs-prior column. |
314
+ | thresholds.prior.volume | array | | | Relative percent change thresholds for volume; default [2,10]. |
315
+ | thresholds.prior.cost | array | | | Relative percent change thresholds for cost; default [5,15], lower is better. |
316
+ | thresholds.prior.rate | array | | | Relative percent change thresholds for rate; default [3,10]. |
317
+ | thresholds.prior.effect | array | | | Effect thresholds in the statement unit. An explicit pair must resolve for each used comparison kind. |
318
+ | thresholds.plan | object | | | Family overrides for pl, the Range vs-plan column. |
319
+ | thresholds.plan.volume | array | | | Relative percent change thresholds for volume; default [2,10]. |
320
+ | thresholds.plan.cost | array | | | Relative percent change thresholds for cost; default [5,15], lower is better. |
321
+ | thresholds.plan.rate | array | | | Relative percent change thresholds for rate; default [3,10]. |
322
+ | thresholds.plan.effect | array | | | Effect thresholds in the statement unit. An explicit pair must resolve for each used comparison kind. |
323
+ | widths | object | | | Fixed track widths of the value columns. |
324
+ | widths.label | number | | | Width of the whole label track in px, indent and affix included. It stays fixed when the frame has room. Absent, the label text adds up to 320 px, indent and affix on top; wider content lets labels use the room. |
325
+ | widths.range | number | | | Range track in px; default 110. |
326
+ | widths.change | number | | | Change track in px; default 92. |
327
+ | widths.period | number | | | Track of each period in px; default 94. |
328
+ | minimumSample | object | | | Minimum judge base per sum field in BOTH windows (below it: neutral). Default none. |
329
+
330
+ Plus the [shared options](options.md). This type does not accept `detailFields`, `labels`, `categoryLabels`, `valueAxis`, `categoryAxis`, `secondaryAxis`, `rowLabels`, `topN`, `bandFraction`, `story`, `hatchStrength`, `rounding`.
331
+
332
+ ## Annotations
333
+
334
+ This type takes no annotations.
335
+
336
+ ## What the table is for
337
+
338
+ Use `dimswitch` for a KPI report over one dimension and a run of periods: for example orders, revenue, spend and CAC by channel, week by week. The reader switches the same numbers between two variants: KPI rows with the channels under each KPI, or channel rows with the KPIs under each channel. The reader also opens the rows level by level, shows split measures, and shows or hides the change lines.
339
+
340
+ The host supplies additive sums: one set for each member and period. Boardplot computes ratios, differences, changes, judgement and display formats from these sums. The layout result keeps the calculation records in `computedCells`. Amount and change records contain a full expression in `op` and its source values in `inputs`. Source references name the member, period, `sums` or `ref` window, and field.
341
+
342
+ CLI and MCP manifests publish amount, change and partition records. The reading lists numeric derivations and marks whether each value is drawn. A hidden record has an empty displayed value. Exact raw values stay unchanged. Unavailable results retain their state as records without an arithmetic promise; the reading does not list them as numeric derivations. Effect and Shapley records still lack source operands and are not published as verifiable calculations.
343
+
344
+ Do not use `dimswitch` for these cases:
345
+
346
+ - Two dimensions at once, such as channel by country: use `table` with a row tree, or draw one `dimswitch` for each country.
347
+ - A plain list: use `table`. A statement with authored figures and no sums per period, such as a printed annual P&L: use `table` with `sign`, `kind: "subtotal"`, `"result"` and `"driver"` rows. A statement that Boardplot computes from sums per period, such as a contribution margin per order by week, is a `dimswitch` statement: see [Statements](#statements-subtotals-results-and-drivers).
348
+ - One KPI over time: use `line`. One figure with its change: use `kpi`.
349
+ - Calendar logic: Boardplot does no date arithmetic. The host computes every window, its sums and its reference sums.
350
+
351
+ Read the sections below in order: [Mental model](#mental-model), [Host data](#host-data-what-to-supply-and-how-to-compute-it), [Measures](#measures-values-formats-changes-and-judgement), [Statements](#statements-subtotals-results-and-drivers), [View options](#view-options), [Worked example](#worked-example), [React usage](#react-usage) and [Common mistakes](#common-mistakes). The [Data](#data) and [Options](#options) tables above list every field.
352
+
353
+ ## Mental model
354
+
355
+ The data is a cube with three axes: the measures (one measure is one KPI), one hierarchical dimension (members with `parentId`, under one Total) and the periods. Each value cell is computed from the sums of one member in one window.
356
+
357
+ The columns are the same in every view. The label column comes first; its head is `KPI` in by-measure and `dimension.label` in by-member. The Range column shows the whole selection. The vs prior column shows the change of Range against the Prior window. Then comes one column for each displayed period. The label, Range and vs prior columns stay pinned while the periods scroll.
358
+
359
+ `variant` chooses the row tree. `by-measure` (the default) puts the measures of the Total at the top and the members under each measure. This is the outline of the [worked example](#worked-example) at depth 3 with splits off:
360
+
361
+ ```
362
+ KPI (head of the label column)
363
+ ALL CHANNELS section row: dimension.total.heading
364
+ Orders rung 0: a measure of the Total
365
+ Paid search rung 1: a top-level member
366
+ Brand search rung 2: a child member
367
+ Generic search
368
+ Paid social
369
+ Email
370
+ New customers the same members under every measure
371
+ ...
372
+ New-customer share
373
+ Net revenue divider: true draws a rule above it
374
+ AOV
375
+ PAID MEDIA, CHANNELS WITH SPEND section row of the group "Paid media"
376
+ Marketing spend
377
+ Paid search
378
+ Brand search
379
+ Generic search
380
+ Paid social Email has no spend, so it has no row here
381
+ CAC
382
+ ...
383
+ ```
384
+
385
+ `by-member` starts with the Total block, then a section row with `dimension.label`, then one row for each top-level member. An open member row shows its member block: its measures one step in, then its child members. This is the same example in by-member at depth 3:
386
+
387
+ ```
388
+ Channel (head of the label column: dimension.label)
389
+ Total the Total block: always open, no figures
390
+ Orders
391
+ New customers
392
+ New-customer share
393
+ Net revenue
394
+ AOV
395
+ Paid media group label row
396
+ Marketing spend
397
+ CAC
398
+ CHANNEL section row: dimension.label
399
+ Paid search rung 0; folded, it shows its headline figure
400
+ Orders the member block
401
+ ...
402
+ Paid media
403
+ Marketing spend
404
+ CAC
405
+ Brand search rung 1: a child member with its own block
406
+ Orders
407
+ ...
408
+ Generic search
409
+ Paid social
410
+ Email no spend: no Paid media group
411
+ Orders
412
+ ...
413
+ ```
414
+
415
+ `depth` opens the row tree level by level, like the outline buttons 1, 2 and 3 of a spreadsheet. Every row that can fold has an outline level, and depth d shows the rows of level d or less. Without a statement, the levels are the member levels, with the same meaning in both variants. Depth 1 shows the measures of the Total only; by-member also shows the top-level members as folded rows. Depth 2 also shows every measure of the top-level members. Depth 3 also shows every measure of their children. In general, depth d shows the measures of the Total and of d − 1 member levels; by-member also shows the next member level as folded rows. The maximum depth is the number of member levels plus one, so 3 for a dimension with two levels. A statement adds levels: see [Depth with a statement](#statements-subtotals-results-and-drivers). Section rows, group label rows, split rows and change lines take no level.
416
+
417
+ These are the row counts of the worked example. They include section rows and group label rows, not change lines.
418
+
419
+ | variant | splits | depth 1 | depth 2 | depth 3 |
420
+ |---|---|---|---|---|
421
+ | by-measure | off | 9 | 28 | 42 |
422
+ | by-measure | on | 10 | 32 | 48 |
423
+ | by-member | off | 13 | 36 | 52 |
424
+ | by-member | on | 14 | 40 | 58 |
425
+
426
+ `splits` is a separate switch, not a depth. A split is a measure with `parentId`: it shows only when splits are on, one step under its root measure, wherever the root measure has a row (under the Total and under every member). A dual-role measure has `splitOf` instead: with splits off it is a root measure of its own, and with splits on it moves under its root measure. In the worked example, New customers is dual-role and Existing customers is a split of Orders.
427
+
428
+ `group` collects measures. In by-measure each group starts a section row. `groupHeadings` sets the text of that row, and `dimension.total.heading` names the section over the measures before the first group. by-measure has section rows only when at least one measure has a group. In by-member each member block shows a group label row with the measures of the group under it. A member for which no measure of the group applies shows no group label row. `divider: true` draws a rule above the rows of a measure, to start a family of KPIs without a section row.
429
+
430
+ In by-member the Total block is always open and the reader cannot fold it. `inTotalBlock: false` leaves a measure out of the Total block, for example a platform KPI that has no meaning for the total; by-measure keeps the Total row of that measure. A folded member row shows its headline: the first measure in `dimension.headline` that applies to the member. The measure label and unit follow the member label, for example `Paid search Marketing spend, USD`. An open member row shows no figures.
431
+
432
+ ## Host data: what to supply and how to compute it
433
+
434
+ Boardplot does no date arithmetic. Do these steps in the host, in SQL or in code, and pass the result as `data`:
435
+
436
+ 1. Choose the windows. Range is the selection, for example 14 Sep to 7 Oct. Prior is the window of the same length directly before it, here 21 Aug to 13 Sep. The displayed periods are the calendar units inside the range, such as ISO weeks (Monday to Sunday) or months.
437
+ 2. Mark the partial periods. A period is partial when the range cuts it, or when it is still running (its last day is after the last day with data). Set `partial: true`. Boardplot mutes the column and never judges it.
438
+ 3. Find the reference window of each displayed period. For a full period, it is the unit before: W39 for W40. For a partial period, it is the same days of the unit before: W41 from Monday to Wednesday compares with Monday to Wednesday of W40. For a month cut after day 7, use days 1 to 7 of the month before; when the month before is shorter, stop at its last day. Range has no reference window of its own: it compares with Prior.
439
+ 4. Sum each additive field for each member and window. Put the sums of the window in `sums` and the sums of its reference window in `ref`. Supply one fact for the Total and for each member in each period, including Range and Prior. Range and Prior take no `ref`.
440
+ 5. Write `periods` in this order: the range block, the prior block, then the displayed periods. `label` is the first head line and `subLabel` the second, such as `14 Sep` and `W38`. The prior `label` heads the vs prior column, so write `vs prior` there and put the dates of the Prior window in its `subLabel`.
441
+
442
+ Supply sums, never ratios. A field in `sums` is a total that you can add: orders, revenue, spend, new customers, sessions. Do not put a ratio, an average or a rate in `sums`. Boardplot computes CAC as the spend sum divided by the new-customer sum of the same window, which is the weighted ratio. An average of daily ratios gives a different, wrong number: a day with spend 100 and 1 new customer (CAC 100) and a day with spend 900 and 30 new customers (CAC 30) average to 65, but the true CAC is 1,000 / 31 = 32.3. Boardplot also needs the parts to compute the ratio again for each member and for the Total.
443
+
444
+ This query sketch gives one result row for each member and window. `daily` holds one row for each day and leaf channel. `rollup` maps each member to the leaves it covers; the total covers every leaf. `windows` holds Range, Prior and each displayed period, with `ref_first` and `ref_last` null for Range and Prior.
445
+
446
+ ```
447
+ SELECT w.period_id, r.member_id,
448
+ SUM(CASE WHEN d.day BETWEEN w.first_day AND w.last_day THEN d.orders END) AS orders,
449
+ SUM(CASE WHEN d.day BETWEEN w.first_day AND w.last_day THEN d.new_customers END) AS nc,
450
+ SUM(CASE WHEN d.day BETWEEN w.first_day AND w.last_day THEN d.spend END) AS spend,
451
+ SUM(CASE WHEN d.day BETWEEN w.ref_first AND w.ref_last THEN d.orders END) AS ref_orders,
452
+ SUM(CASE WHEN d.day BETWEEN w.ref_first AND w.ref_last THEN d.new_customers END) AS ref_nc,
453
+ SUM(CASE WHEN d.day BETWEEN w.ref_first AND w.ref_last THEN d.spend END) AS ref_spend
454
+ FROM windows AS w
455
+ CROSS JOIN rollup AS r
456
+ JOIN daily AS d ON d.leaf_id = r.leaf_id
457
+ GROUP BY w.period_id, r.member_id;
458
+ ```
459
+
460
+ Map each result row to one fact: `{ "memberId": member_id, "periodId": period_id, "sums": { "orders": orders, "nc": nc, "spend": spend }, "ref": { "orders": ref_orders, "nc": ref_nc, "spend": ref_spend } }`. A SQL `SUM` over no rows gives NULL. Change that NULL to 0 for a field that applies to the member, and remove the key for a field that does not apply. The [React usage](#react-usage) example does this mapping.
461
+
462
+ A measure applies to a member when every local field that its `value` reads has a number in at least one fact of that member. Otherwise Boardplot leaves the row of that measure out for that member. If the Total lacks a field, the measure is left out everywhere. The three states of a field mean different things:
463
+
464
+ - Absent or `null` in every fact of the member: the measure does not apply. Use this for a structural absence, such as spend for Email. A SQL export that gives `null` works as it is.
465
+ - `null` in some facts only: the measure applies, and those values are missing. Their cells print the missing glyph (—).
466
+ - `0`: data. A window without activity is 0.
467
+
468
+ To keep a row when the selected windows hold only `null` for a field, declare the field on the member: `{ "id": "email", "label": "Email", "fields": ["spend"] }` (and `dimension.total.fields` for the Total). The row then stays and prints the missing glyph. A statement line never leaves by applicability: see [Statements](#statements-subtotals-results-and-drivers). Decide applicability on the whole source data, not on the selected range, so rows do not appear and disappear when the reader changes the range. Source tables often fill spend with 0 for channels that never have spend. Remove that field or set it to `null` for those members; a 0 draws Marketing spend 0 and CAC 0.0 rows.
469
+
470
+ By default Boardplot uses the sums that you supply for every member and for the Total. Members do not have to add up to their parent: a channel list can leave out small channels, and members can overlap. Set `dimension.sums: true` only for a true partition. Boardplot then derives the sums of each parent, and of the Total, from its children, so supply no fact for the Total or for a parent member; for both `sums` and `ref`, and records the difference to any supplied parent sum as a reconciliation record. A field present on only some children adds up over those children. A `null` child value makes the parent value `null`.
471
+
472
+ ## Measures: values, formats, changes and judgement
473
+
474
+ `value` is an expression over the field names in `sums`: `{ "field": "orders" }`, or `{ "op": "add" | "sub" | "mul" | "div", "a": ..., "b": ..., "factor": 100 }`. An operand can also be another measure, `{ "measure": "income" }`, or a number. A percent measure enters as a fraction: a margin of 42.5% reads 0.425. Expressions nest, and `factor` multiplies the result of its own operation. Examples:
475
+
476
+ - Existing customers: `{ "op": "sub", "a": { "field": "orders" }, "b": { "field": "nc" } }`
477
+ - CAC: `{ "op": "div", "a": { "field": "spend" }, "b": { "field": "nc" } }`
478
+ - New-customer share in percent: `{ "op": "div", "a": { "field": "nc" }, "b": { "field": "orders" }, "factor": 100 }`
479
+ - CPM: `{ "op": "div", "a": { "field": "spend" }, "b": { "field": "impressions" }, "factor": 1000 }`
480
+
481
+ `{ "total": expression }` evaluates its whole expression against `dimension.total.id` in the same window. This includes expanded measure references, prior, displayed-period `ref`, and plan. Nested Total operands keep that scope. Total fields do not become required member fields. A missing Total input keeps the applicable member row and prints missing. `show: "withData"` still checks the member fields. Calculation records name the Total member and source window. Use this operand in measure values, including driver values; `drivers` formulas still accept only measure references and numbers.
482
+
483
+ Boardplot evaluates the expression on the sums of each member and window, and again on the reference sums for the change. A missing operand gives a missing cell (—). A division by zero prints n.m.; 0 divided by 0 prints n/a.
484
+
485
+ `scale` sets the precision of a row from its own values. Boardplot takes the largest absolute value of the row in Range and in the displayed periods; the vs prior column and the change lines do not count.
486
+
487
+ - `money`: 1,000 or more prints thousands with one decimal (364.3k). Below 1,000 the row prints whole units (980). If a nonzero value would print as 0.0k, the whole row prints whole units (5,520, 40 and 450).
488
+ - `perUnit`: fractional values keep the precision in `format`. Without a format, start with whole units at 10 or more, else one decimal; add decimals when rounding error exceeds 1%, up to 20 decimals. Integer-only rows keep the starting precision. It never abbreviates: 2,400 stays 2,400.
489
+ - `count`: keeps `format`; the default is `1,234`.
490
+ - `percent`: keeps `format`; the default is `1.2%`. The value must already be in percent: use `factor: 100`.
491
+ - No `scale`: keeps `format` as written; the default is `1,234`.
492
+
493
+ Scaled `money` and automatic `count` rows add decimals when rounding error exceeds 1%, up to 20 decimals. The row keeps one precision and its existing magnitude. An explicit whole-thousand scale stays whole.
494
+
495
+ `money` drops the prefix, suffix and decimals of `format`. `perUnit` drops the prefix and suffix, but keeps authored precision for fractional values. Put the currency in `unit`. The unit prints after the KPI label, such as `Net revenue USD`, and not in the cells. Member rows and split rows repeat no unit. A `%` or `pp` unit next to a percent format is left out, because the cells already show it. A nonzero value never prints as zero: the row takes more decimals (0.004).
496
+
497
+ Each period value has a change line under it, and Range has the vs prior column. `change: "relative"` (the default) prints the percent change against the reference: whole percent from 5% and at 0% (+7%), and one decimal below 5% (+4.2%). With `relative`, a change of 1,000% or more, or a reference of 0 or less, prints n.m. A missing reference prints n/a. 0 against 0 prints nothing. `change: "pp"` prints the difference of the two percent levels with one decimal (+0.9pp). Use `pp` for shares and rates. `change: "absolute"` prints the current value minus the reference value, in the measure format with a sign (+0.4). Use it on statement lines, where the changes add up down the statement.
498
+
499
+ `judge` colours a measure. `family` sets the direction and the default thresholds: `volume` (higher is better, [2, 10]), `cost` (lower is better, [5, 15]) and `rate` (higher is better, [3, 10]). The thresholds are relative percent changes. A favourable change of at least the first threshold is good, and of at least the second threshold strong good. An adverse change of at least the first threshold is warn, and of at least the second threshold bad. A smaller change is neutral. A `pp` measure is also judged on the relative change of its level: a share that goes from 40% to 41.2% is +3% relative, which is good for a `rate`, while the cell prints +1.2pp. There is no lower-is-better rate family in 0.24.0: for a rate where lower is better (a return rate or a bounce rate), use `cost`, which shares `thresholds.cost` with CAC. A statement line can use the family `effect` instead: see [Statements](#statements-subtotals-results-and-drivers).
500
+
501
+ `measures[].bands` colours Range and displayed-period values. Each band has `to`, optional `tone` and optional `label`. Use a nonempty list with finite, strictly ascending bounds. The first band with `value <= to` wins. Below all bounds uses the first; above all bounds uses the last. Values are unrounded and in their original units; percent levels use percentage points. An omitted tone means neutral. Partial or missing values stay neutral. Bands use the current sample floors when `judge.base` exists; changes still use `judge` and both windows. Without bands, level colours stay unchanged.
502
+
503
+ A ratio of the Total divides the Total sums. Total CAC divides all spend by all new customers, including the new customers of members without spend. For a paid-only CAC, supply a field such as `nc_paid` that is absent or `null` for members without spend, and use it as the denominator.
504
+
505
+ `judge.base` accepts a field name or a nonempty list of unique field names, such as `["orders", "sessions"]`. All listed fields must meet their own `minimumSample` floor in every required window. Missing or null fields fail, even with the default floor of zero. Equality passes. Changes require current and reference samples; value bands require only the current sample. Total-dependent measures also check the same declared fields in their Total windows. No extra base field is inferred. A failed floor changes only the tone; values and changes stay visible. Without bands, Range stays neutral and the vs prior column carries its judgement. A measure without `judge` prints its comparison changes muted.
506
+
507
+ A `money` or `count` measure without `judge` is a size, not a performance. Its period cells draw a grey bar, scaled to the largest full period of the row. Its Range cells draw a bar scaled to the largest member of the same measure; the Total row has no Range bar.
508
+
509
+ The order of `measures` is the row order; splits follow their root measure. A split cannot have splits of its own, and a measure cannot have both `parentId` and `splitOf`. `dimension.headline` lists the measures for folded member rows in by-member: put the measure that best sums up a paid channel first (spend), then a fallback for the members where it does not apply (revenue).
510
+
511
+ ## Statements: subtotals, results and drivers
512
+
513
+ A statement is a group of measures that add up to results, such as a contribution-margin (CM) statement per order or a P&L in money. It sits in the same table as the KPIs, under its own section. Give its measures one `group`: that group is the statement. A group is a statement when any of its measures has `partOf`, `sign`, `result` or `drivers`, or is named by the `partOf` or `drivers` of another measure. A part takes the group of its subtotal, so give `group` to the top-level lines only.
514
+
515
+ Each statement line has one of four roles:
516
+
517
+ - **Part**: a measure with `partOf` set to the id of its subtotal, such as Shipping with `partOf: "costs"`.
518
+ - **Subtotal**: a measure that other measures name in `partOf`, such as Costs. Leave out its `value`: Boardplot adds up its parts with their signs. If you give it a `value`, Boardplot keeps that value and warns `dimswitch-subtotal-footing` when it differs from the sum of the parts by more than half a printed unit. Boardplot never overwrites it.
519
+ - **Result**: a top-level measure with `result: true` and a `value` that names its lines, such as Margin after order costs = `{ "op": "sub", "a": { "measure": "income" }, "b": { "measure": "costs" } }`. A result takes no `sign` and no `partOf`. The last result of each statement block takes the closing rule, a double rule by default (theme `table.finalRule`).
520
+ - **Driver**: a measure that the `drivers` formula of another line names, such as Price before discounts for Gross profit. A driver explains that line, prints in its block, and is never added. It takes no `sign`, `result` or `drivers`.
521
+
522
+ Supply costs as positive sums and set `sign: -1` on the line that subtracts. Set it on the subtotal Costs, not on each part: the contribution sign of a line is the product of the signs up its `partOf` chain, so Shipping under Costs subtracts. Boardplot computes values, relative changes and n.m. rules on the supplied values, before any sign. The table option `signs` decides how a sign prints:
523
+
524
+ - `"signed"` (the default): a line with contribution sign −1 prints its value and its absolute changes negated, so the column adds up from top to bottom. Relative and pp changes keep their sign. A driver is never negated, and a result prints its own value, negative or not.
525
+ - `"operators"`: values print as supplied, and an operator stands before the label: − for a line with `sign: -1`, + for a later part of a block, = for a result, and for a driver the operator of its place in the formula (−, ×, ÷ or +).
526
+ - `"plain"`: neither.
527
+
528
+ In `operators` mode a cost that rises prints a positive change, because values print as supplied; the colour still shows the effect. Each figure rounds on its own, so a printed subtotal can differ by one in the last digit from the sum of its printed parts; Boardplot adds the exact values.
529
+
530
+ Write a per-order line as a ratio of sums: `{ "op": "div", "a": { "field": "ship" }, "b": { "field": "orders" } }`. Use the same denominator for every line of a per-unit statement, so the parts add up to their subtotal in every window. Boardplot divides the sums of each window, so Range is the weighted value of the whole selection, never an average of the weeks. Give statement lines a fixed `format` such as `1.2` when small changes need a fixed decimal place. Use `scale: "perUnit"` to keep that precision for fractional values and place the currency in `unit`. Omit `scale` to keep the format on every value. Boardplot assumes no currency. Put the currency in `unit`, in the group heading or in the format (`€1.2`, `CHF 1.2`).
531
+
532
+ Set `change: "absolute"` on statement lines. In `signed` mode, the absolute changes of the parts then add up to the change of their subtotal, and the changes of the lines add up to the change of each result. A percent driver, such as a gross margin, uses `pp`. `relative` stays possible, but relative changes do not add up.
533
+
534
+ A line with drivers names them in a formula over `{ "measure": id }` and numbers. Gross profit per order = (price before discounts − returns per order) × gross margin is `"drivers": { "op": "mul", "a": { "op": "sub", "a": { "measure": "aovbd" }, "b": { "measure": "ret" } }, "b": { "measure": "gm" } }`. A percent measure enters the formula as a fraction. Boardplot checks in every window that the formula gives the value of the line, and warns `dimswitch-driver-footing` when it does not; the warning names a percent driver that has a `factor: 100` value but no `scale: "percent"`. The drivers print in the block of the line they explain, after its parts: here under Income, after Gross profit and Delivery charges. Set `partOf` on a driver to place it elsewhere. A line can have at most six drivers. Define a percent driver on the base the formula uses: a gross margin of `{ "op": "div", "a": { "field": "gp" }, "b": { "op": "sub", "a": { "field": "revbd" }, "b": { "field": "returns" } }, "factor": 100 }` with `scale: "percent"` makes (AOV − returns) × margin give gross profit exactly.
535
+
536
+ `judge: { "family": "effect" }` colours a statement line by its effect on the statement result, in the statement unit. The effect of a line is its change times its contribution sign: when shipping costs rise by 0.4 per order, the effect is −0.4. The effect of a driver is its share of the change of the line it explains, times the contribution sign of that line. Boardplot splits the change of the line with the Shapley method: the effect of each driver is its marginal effect, averaged over every order in which the drivers can move. The shares add up exactly to the change of the line. For (A − R) × m this is the midpoint rule: ΔA × average m, −ΔR × average m and Δm × average (A − R). The split is arithmetic; it does not prove a cause.
537
+
538
+ Set the effect thresholds in the statement unit: `options.thresholds.effect: [0.3, 1]` means 0.3 and 1 currency per order. An effect of 0.3 or more is good, of 1 or more strong good; −0.3 or less is warn, −1 or less bad. An explicit effect pair must resolve for each used comparison kind: use the family pair or `thresholds.period.effect`, `thresholds.prior.effect` and `thresholds.plan.effect`. Boardplot refuses effect lines with different scales or formats, because one pair of thresholds cannot judge two units. Drivers are exempt: their effect is in the unit of the line they explain. Use thresholds for the currency of the data; do not reuse EUR thresholds for CHF or for total money. `judge.base` is optional for `effect` and keeps its `minimumSample` meaning. A partial period, a missing value and an effect of 0 stay neutral. `data.effectLabel`, such as `"Margin effect"`, adds the effect of each driver cell to its hover text; that line stays hidden in the cell (`inlineVisibility.effect` is false unless you set it).
539
+
540
+ A statement line never leaves the table because of applicability. A missing field prints the missing glyph (—), and a subtotal or result that reads it is missing too, never a smaller number. With `dimension.sums: true`, a member fact that lacks a statement field makes the parent sum missing for that period; a member with no fact in a period adds nothing. Statement lines draw no size bars.
541
+
542
+ Depth with a statement counts the statement levels too. In by-measure the statement opens first, then the members: depth 1 shows the top-level lines, depth 2 also the parts of each subtotal, and depth 3 also the members under every line. A KPI outside the statement opens its members at the same depth as the statement lines, so one depth means one thing across the table. A line with parts or drivers under it has no member rows in by-measure; read a subtotal per member in by-member. In by-member the members open first, then the statement: with one member level, depth 2 opens the member blocks and depth 3 the parts of each subtotal in every block. A Total-only statement (no members) has two depths: 1 folded, 2 open. A result has no rows under it, so it shows at every depth.
543
+
544
+ This is the outline of the example below at depth 2, with the operators of `signs: "operators"`:
545
+
546
+ ```
547
+ ORDERS
548
+ Orders
549
+ CONTRIBUTION MARGIN · USD PER ORDER · CHANGES IN USD
550
+ Income subtotal
551
+ Gross profit part (explained by the three drivers)
552
+ + Delivery charges part
553
+ Price before discounts driver
554
+ − Returns and refunds driver
555
+ × Gross margin driver (percent, pp change)
556
+ − Costs subtotal with sign -1
557
+ Payment fees part
558
+ + Delivery
559
+ + Handling
560
+ = Margin after order costs result
561
+ − Sales costs subtotal with sign -1
562
+ Advertising
563
+ + Promotions
564
+ = Final margin result, closing double rule
565
+ ```
566
+
567
+ ```json
568
+ {
569
+ "type": "dimswitch",
570
+ "data": {
571
+ "dimension": {
572
+ "label": "Shop",
573
+ "total": { "id": "total", "label": "Total", "heading": "Orders" },
574
+ "members": [],
575
+ "headline": ["orders"]
576
+ },
577
+ "changeLabel": "WoW",
578
+ "effectLabel": "Margin effect",
579
+ "groupHeadings": { "Contribution margin": "Contribution margin · USD per order · changes in USD" },
580
+ "measures": [
581
+ {
582
+ "id": "orders",
583
+ "label": "Orders",
584
+ "value": { "field": "orders" },
585
+ "scale": "count",
586
+ "judge": { "family": "volume", "base": "orders" }
587
+ },
588
+ {
589
+ "id": "income",
590
+ "label": "Income",
591
+ "format": "1.2",
592
+ "change": "absolute",
593
+ "judge": { "family": "effect" },
594
+ "group": "Contribution margin"
595
+ },
596
+ {
597
+ "id": "gp",
598
+ "label": "Gross profit",
599
+ "value": { "op": "div", "a": { "field": "gp" }, "b": { "field": "orders" } },
600
+ "format": "1.2",
601
+ "change": "absolute",
602
+ "judge": { "family": "effect" },
603
+ "partOf": "income",
604
+ "drivers": {
605
+ "op": "mul",
606
+ "a": { "op": "sub", "a": { "measure": "aovbd" }, "b": { "measure": "ret" } },
607
+ "b": { "measure": "gm" }
608
+ }
609
+ },
610
+ {
611
+ "id": "shipi",
612
+ "label": "Delivery charges",
613
+ "value": { "op": "div", "a": { "field": "shipi" }, "b": { "field": "orders" } },
614
+ "format": "1.2",
615
+ "change": "absolute",
616
+ "judge": { "family": "effect" },
617
+ "partOf": "income"
618
+ },
619
+ {
620
+ "id": "aovbd",
621
+ "label": "Price before discounts",
622
+ "value": { "op": "div", "a": { "field": "revbd" }, "b": { "field": "orders" } },
623
+ "format": "1.2",
624
+ "change": "absolute",
625
+ "judge": { "family": "effect" }
626
+ },
627
+ {
628
+ "id": "ret",
629
+ "label": "Returns and refunds",
630
+ "value": { "op": "div", "a": { "field": "returns" }, "b": { "field": "orders" } },
631
+ "format": "1.2",
632
+ "change": "absolute",
633
+ "judge": { "family": "effect" }
634
+ },
635
+ {
636
+ "id": "gm",
637
+ "label": "Gross margin",
638
+ "value": {
639
+ "op": "div",
640
+ "a": { "field": "gp" },
641
+ "b": { "op": "sub", "a": { "field": "revbd" }, "b": { "field": "returns" } },
642
+ "factor": 100
643
+ },
644
+ "scale": "percent",
645
+ "change": "pp",
646
+ "judge": { "family": "effect" }
647
+ },
648
+ {
649
+ "id": "costs",
650
+ "label": "Costs",
651
+ "format": "1.2",
652
+ "change": "absolute",
653
+ "judge": { "family": "effect" },
654
+ "sign": -1,
655
+ "group": "Contribution margin"
656
+ },
657
+ {
658
+ "id": "pay",
659
+ "label": "Payment fees",
660
+ "value": { "op": "div", "a": { "field": "pay" }, "b": { "field": "orders" } },
661
+ "format": "1.2",
662
+ "change": "absolute",
663
+ "judge": { "family": "effect" },
664
+ "partOf": "costs"
665
+ },
666
+ {
667
+ "id": "ship",
668
+ "label": "Delivery",
669
+ "value": { "op": "div", "a": { "field": "ship" }, "b": { "field": "orders" } },
670
+ "format": "1.2",
671
+ "change": "absolute",
672
+ "judge": { "family": "effect" },
673
+ "partOf": "costs"
674
+ },
675
+ {
676
+ "id": "pick",
677
+ "label": "Handling",
678
+ "value": { "op": "div", "a": { "field": "pick" }, "b": { "field": "orders" } },
679
+ "format": "1.2",
680
+ "change": "absolute",
681
+ "judge": { "family": "effect" },
682
+ "partOf": "costs"
683
+ },
684
+ {
685
+ "id": "cm2",
686
+ "label": "Margin after order costs",
687
+ "value": { "op": "sub", "a": { "measure": "income" }, "b": { "measure": "costs" } },
688
+ "format": "1.2",
689
+ "change": "absolute",
690
+ "judge": { "family": "effect" },
691
+ "group": "Contribution margin",
692
+ "result": true
693
+ },
694
+ {
695
+ "id": "mkt",
696
+ "label": "Sales costs",
697
+ "format": "1.2",
698
+ "change": "absolute",
699
+ "judge": { "family": "effect" },
700
+ "sign": -1,
701
+ "group": "Contribution margin"
702
+ },
703
+ {
704
+ "id": "spend",
705
+ "label": "Advertising",
706
+ "value": { "op": "div", "a": { "field": "spend" }, "b": { "field": "orders" } },
707
+ "format": "1.2",
708
+ "change": "absolute",
709
+ "judge": { "family": "effect" },
710
+ "partOf": "mkt"
711
+ },
712
+ {
713
+ "id": "disc",
714
+ "label": "Promotions",
715
+ "value": { "op": "div", "a": { "field": "disc" }, "b": { "field": "orders" } },
716
+ "format": "1.2",
717
+ "change": "absolute",
718
+ "judge": { "family": "effect" },
719
+ "partOf": "mkt"
720
+ },
721
+ {
722
+ "id": "cm3",
723
+ "label": "Final margin",
724
+ "value": { "op": "sub", "a": { "measure": "cm2" }, "b": { "measure": "mkt" } },
725
+ "format": "1.2",
726
+ "change": "absolute",
727
+ "judge": { "family": "effect" },
728
+ "group": "Contribution margin",
729
+ "result": true
730
+ }
731
+ ],
732
+ "periods": [
733
+ { "id": "range", "label": "Range", "subLabel": "7 to 23 Sep", "kind": "range" },
734
+ { "id": "prior", "label": "vs prior", "subLabel": "21 Aug to 6 Sep", "kind": "prior" },
735
+ { "id": "w1", "label": "7 Sep", "subLabel": "W37" },
736
+ { "id": "w2", "label": "14 Sep", "subLabel": "W38" },
737
+ { "id": "w3", "label": "21 Sep", "subLabel": "to 23 Sep", "partial": true }
738
+ ],
739
+ "facts": [
740
+ {
741
+ "memberId": "total",
742
+ "periodId": "range",
743
+ "sums": {
744
+ "orders": 2400,
745
+ "revbd": 172800,
746
+ "returns": 2160,
747
+ "gp": 75060,
748
+ "shipi": 6000,
749
+ "pay": 4320,
750
+ "ship": 25200,
751
+ "pick": 6480,
752
+ "spend": 72000,
753
+ "disc": 8400
754
+ }
755
+ },
756
+ {
757
+ "memberId": "total",
758
+ "periodId": "prior",
759
+ "sums": {
760
+ "orders": 2200,
761
+ "revbd": 156200,
762
+ "returns": 1760,
763
+ "gp": 67430,
764
+ "shipi": 5720,
765
+ "pay": 3960,
766
+ "ship": 23320,
767
+ "pick": 5940,
768
+ "spend": 70400,
769
+ "disc": 7480
770
+ }
771
+ },
772
+ {
773
+ "memberId": "total",
774
+ "periodId": "w1",
775
+ "sums": {
776
+ "orders": 800,
777
+ "revbd": 56800,
778
+ "returns": 640,
779
+ "gp": 24710,
780
+ "shipi": 2000,
781
+ "pay": 1440,
782
+ "ship": 8480,
783
+ "pick": 2160,
784
+ "spend": 25600,
785
+ "disc": 2800
786
+ },
787
+ "ref": {
788
+ "orders": 760,
789
+ "revbd": 53960,
790
+ "returns": 680,
791
+ "gp": 23230,
792
+ "shipi": 1900,
793
+ "pay": 1370,
794
+ "ship": 8130,
795
+ "pick": 2050,
796
+ "spend": 25080,
797
+ "disc": 2660
798
+ }
799
+ },
800
+ {
801
+ "memberId": "total",
802
+ "periodId": "w2",
803
+ "sums": {
804
+ "orders": 860,
805
+ "revbd": 62780,
806
+ "returns": 860,
807
+ "gp": 27250,
808
+ "shipi": 2150,
809
+ "pay": 1550,
810
+ "ship": 8940,
811
+ "pick": 2320,
812
+ "spend": 24940,
813
+ "disc": 3010
814
+ },
815
+ "ref": {
816
+ "orders": 800,
817
+ "revbd": 56800,
818
+ "returns": 640,
819
+ "gp": 24710,
820
+ "shipi": 2000,
821
+ "pay": 1440,
822
+ "ship": 8480,
823
+ "pick": 2160,
824
+ "spend": 25600,
825
+ "disc": 2800
826
+ }
827
+ },
828
+ {
829
+ "memberId": "total",
830
+ "periodId": "w3",
831
+ "sums": {
832
+ "orders": 380,
833
+ "revbd": 27360,
834
+ "returns": 300,
835
+ "gp": 11910,
836
+ "shipi": 950,
837
+ "pay": 680,
838
+ "ship": 3990,
839
+ "pick": 1030,
840
+ "spend": 11400,
841
+ "disc": 1140
842
+ },
843
+ "ref": {
844
+ "orders": 370,
845
+ "revbd": 27010,
846
+ "returns": 330,
847
+ "gp": 11550,
848
+ "shipi": 930,
849
+ "pay": 670,
850
+ "ship": 3850,
851
+ "pick": 1000,
852
+ "spend": 11100,
853
+ "disc": 1220
854
+ }
855
+ }
856
+ ]
857
+ },
858
+ "options": {
859
+ "title": "Margin after order costs rises 0.6 to 18.8 per order as sales costs fall 1.9",
860
+ "depth": 2,
861
+ "signs": "signed",
862
+ "thresholds": { "effect": [0.3, 1] },
863
+ "widths": { "range": 120, "change": 120 }
864
+ }
865
+ }
866
+ ```
867
+
868
+ ## View options
869
+
870
+ `variant` (`by-measure` by default, or `by-member`), `depth` (1 by default) and `splits` (false by default) choose the view; see [Mental model](#mental-model). In React they are props that the host controls.
871
+
872
+ `expansion` adds row-id exceptions on top of the depth defaults: `expanded` opens rows and `collapsed` folds rows. A row id is the JSON text of an array: `["by-measure","total","spend"]` is the Total row of Marketing spend in by-measure, `["by-measure","search","cac"]` is the Paid search row under CAC, and `["by-member","search"]` is the Paid search member row in by-member. A change line has the id of its row plus `:change`. Build the ids with `dimswitchRowId(variant, memberId, measureId)` from `boardplot` (it returns `JSON.stringify([variant, memberId, measureId])`), and leave out `measureId` for a member row in by-member. An id of the other variant has no effect. An expanded row shows only when all its parents are open, and an id of a hidden row has no effect and gives no warning. In by-measure at depth 1, to show the Paid search row of Marketing spend, expand the Total row of Marketing spend as well: `[dimswitchRowId("by-measure", "total", "spend"), dimswitchRowId("by-measure", "search", "spend")]`. The [worked example](#worked-example) opens the Paid search rows of Marketing spend and CAC this way.
873
+
874
+ `order` sorts the members among their siblings. `"sheet"` (the default) keeps the order of `dimension.members`. `{ "by": "revenue" }` sorts by the Range value of that measure, descending; `"desc": false` sorts ascending. Ties sort by member id, and missing values come last. `show: "withData"` hides a member only when every field of every measure that applies to it is zero or empty in Range; a member with any value there stays, because it still counts in the Total. Its child members hide with it. A member with no measure field that applies always shows.
875
+
876
+ An optional period with `kind: "plan"` adds one `pl` comparison column: label, Range, vs prior (`pp`), vs plan (`pl`), then displayed periods. Zero or one plan is allowed. At least one displayed period is required. `pl` is a reserved column id. The plan `label` and `subLabel` head `pl`; `widths.change` sets its width. The host must supply comparable actual and plan windows. Boardplot does not prorate plan or use prior as a fallback. Sample floors must pass in actual and plan. A partial Range or plan disables plan judgement. Plan uses the same change modes and effect calculations as prior.
877
+
878
+ `thresholds.period`, `thresholds.prior` and `thresholds.plan` override change thresholds for displayed changes, `pp` and `pl`. Resolve each family separately: kind override, family setting, then family default. Defaults remain volume `[2,10]`, cost `[5,15]` and rate `[3,10]`. Each pair must be finite and satisfy `0 <= first <= second`. Effect needs an explicit pair for each used kind. These thresholds judge changes, separate from value bands.
879
+
880
+ `thresholds` replaces the thresholds of a family, such as `{ "cost": [3, 12] }`. `minimumSample` sets the smallest judge base for each sum field, such as `{ "orders": 30, "nc": 20 }`; see [Measures](#measures-values-formats-changes-and-judgement).
881
+
882
+ `inlineVisibility: { "change": false }` hides the change lines. They are visible when you do not set it. In React, the hover text of each period cell still shows the change, tagged with `changeLabel`, such as `WoW +24%`.
883
+
884
+ `widths` fixes the track widths in px: `label` is the cap of the whole label column, indent and affix included (a longer label is cut; absent, the label text adds up to 320 px to the column, with the indent and the affix on top, and a column made wider by other content lets labels use the room), `range` the Range column (110), `change` each vs prior or vs plan column (92) and `period` each period column (94). Widen `range` and `change` when their `subLabel` holds dates. Render the table at the width the page shows it: at a narrow width a long unit can cut the KPI label.
885
+
886
+ `dimswitch` takes the `table` options except `topN`. It always draws the steering table. It sets these defaults, and an option that you set wins: `stickyLabels: 3` (label, Range and vs prior pinned), or `4` when plan is present, `rowExtent: "frame"`, `mountCollapsed: false` (closed rows stay out of the DOM), `fitFormats: true` and `labelIndent: { "base": 25, "step": 17 }`. `options.format` has no effect and warns `format-unused`: set `measures[].format`.
887
+
888
+ The report-sheet look comes from `theme.overrides.table`. `tones: "fill"` paints judged cells with `grounds` (`good`, `goodStrong`, `warn`, `bad`) and keeps the figures in the text ink. `rows: { "lineHeight": 1.44, "pad": 3 }` prints every rung at one size. `weights` sets the label weights of member rows and measure rows. `mark: "boxed"` draws a framed open and close mark. `headRule: "ink"` and `blockRule: "rule"` set the rules under the heads and around an open block. `head: { "case": "asis" }` keeps period heads as written (`14 Sep`) instead of capitals. `bar` sets the size bar colours, `ofWhich: "ink"` prints split rows in the text ink instead of the muted ink, and `endRule: "none"` drops the right edge rule inside a host card. The worked example uses this look; the fixture `sheet` and [Theme](theme.md) show the other tokens.
889
+
890
+ A long omitted-period list names the first eight periods, then "and N more" with the exact count left out. It follows the supplied period order and uses the shared note rule, which also names a lone ninth period. The existing `notes.maxListed` option sets another limit: 0 draws only the count, and `"all"` draws every name. The reading keeps the full list in the note text. Its `short` field holds the text drawn in SVG and React.
891
+
892
+ ## Worked example
893
+
894
+ An invented web shop sells through four leaf channels: Brand search and Generic search under Paid search, Paid social, and Email. Email has no spend. The host sums daily rows into windows. Range is 14 Sep to 7 Oct 2026 (24 days), and Prior is the 24 days before it, 21 Aug to 13 Sep. The displayed periods are the ISO weeks W38 to W41. W41 runs from Monday to Wednesday, so it is partial, and its reference window is Monday to Wednesday of W40. The fields are `orders`, `nc` (new customers), `rev` (net revenue) and `spend`; no Email fact has `spend`.
895
+
896
+ The measures: Orders (count, judged as volume), New customers (dual-role: a root with splits off, a split of Orders with splits on), Existing customers (a split of Orders: orders − nc), New-customer share (nc / orders × 100, a `pp` change, judged as rate), Net revenue (money, unjudged, so it draws size bars), AOV (rev / orders, per unit, judged as volume), and the group Paid media with Marketing spend (money, unjudged) and CAC (spend / nc, judged as cost). `minimumSample` asks for 200 orders and 50 new customers in both windows. `expansion` opens the Paid search rows of Marketing spend and CAC, and the theme gives the report-sheet look of [View options](#view-options).
897
+
898
+ What it draws, in by-measure at depth 2 with splits off (32 rows): the section ALL CHANNELS with Orders, New customers, New-customer share, Net revenue and AOV, each followed by Paid search, Paid social and Email; then the section PAID MEDIA, CHANNELS WITH SPEND with Marketing spend and CAC, each followed by Paid search and Paid social only. Under those two measures `expansion` opens Paid search, so Brand search and Generic search show there; the other Paid search rows carry a closed (+) mark. Without `expansion` the view has 28 rows. Orders print 4,641 for Range and +7% vs prior, judged good. The CAC of Paid search climbs from 50 to 53, 58 and 62 over the four weeks, and its vs prior change of +9% is judged warn (cost, at least 5%). Under it, Generic search drives the rise (60 to 78) while Brand search stays at 39 or 40. The weekly cells of Email new customers stay neutral, because 22 a week is below the minimum sample of 50. The W41 column is muted and not judged, but its changes compare the same three days.
899
+
900
+ In by-member at depth 1 (13 rows) the same spec shows the open Total block with its seven measures, the section CHANNEL, and three folded member rows: Paid search with 61.3k (Marketing spend, USD), Paid social with 27.3k, and Email with 86.1k (Net revenue, USD), because spend does not apply to Email.
901
+
902
+ ```json
903
+ {
904
+ "type": "dimswitch",
905
+ "data": {
906
+ "dimension": {
907
+ "label": "Channel",
908
+ "total": { "id": "total", "label": "Total", "heading": "All channels" },
909
+ "members": [
910
+ { "id": "search", "label": "Paid search" },
911
+ { "id": "brand", "label": "Brand search", "parentId": "search" },
912
+ { "id": "generic", "label": "Generic search", "parentId": "search" },
913
+ { "id": "social", "label": "Paid social" },
914
+ { "id": "email", "label": "Email" }
915
+ ],
916
+ "headline": ["spend", "revenue"]
917
+ },
918
+ "changeLabel": "WoW",
919
+ "groupHeadings": { "Paid media": "Paid media, channels with spend" },
920
+ "measures": [
921
+ {
922
+ "id": "orders",
923
+ "label": "Orders",
924
+ "value": { "field": "orders" },
925
+ "scale": "count",
926
+ "judge": { "family": "volume", "base": "orders" }
927
+ },
928
+ {
929
+ "id": "new",
930
+ "label": "New customers",
931
+ "value": { "field": "nc" },
932
+ "scale": "count",
933
+ "splitOf": "orders",
934
+ "judge": { "family": "volume", "base": "nc" }
935
+ },
936
+ {
937
+ "id": "existing",
938
+ "label": "Existing customers",
939
+ "value": { "op": "sub", "a": { "field": "orders" }, "b": { "field": "nc" } },
940
+ "scale": "count",
941
+ "parentId": "orders"
942
+ },
943
+ {
944
+ "id": "share",
945
+ "label": "New-customer share",
946
+ "value": { "op": "div", "a": { "field": "nc" }, "b": { "field": "orders" }, "factor": 100 },
947
+ "scale": "percent",
948
+ "change": "pp",
949
+ "judge": { "family": "rate", "base": "orders" }
950
+ },
951
+ {
952
+ "id": "revenue",
953
+ "label": "Net revenue",
954
+ "value": { "field": "rev" },
955
+ "scale": "money",
956
+ "unit": "USD",
957
+ "divider": true
958
+ },
959
+ {
960
+ "id": "aov",
961
+ "label": "AOV",
962
+ "value": { "op": "div", "a": { "field": "rev" }, "b": { "field": "orders" } },
963
+ "scale": "perUnit",
964
+ "unit": "USD",
965
+ "judge": { "family": "volume", "base": "orders" }
966
+ },
967
+ {
968
+ "id": "spend",
969
+ "label": "Marketing spend",
970
+ "value": { "field": "spend" },
971
+ "scale": "money",
972
+ "unit": "USD",
973
+ "group": "Paid media"
974
+ },
975
+ {
976
+ "id": "cac",
977
+ "label": "CAC",
978
+ "value": { "op": "div", "a": { "field": "spend" }, "b": { "field": "nc" } },
979
+ "scale": "perUnit",
980
+ "unit": "USD",
981
+ "group": "Paid media",
982
+ "judge": { "family": "cost", "base": "nc" }
983
+ }
984
+ ],
985
+ "periods": [
986
+ { "id": "range", "label": "Range", "subLabel": "14 Sep–7 Oct", "kind": "range" },
987
+ { "id": "prior", "label": "vs prior", "subLabel": "21 Aug–13 Sep", "kind": "prior" },
988
+ { "id": "w38", "label": "14 Sep", "subLabel": "W38" },
989
+ { "id": "w39", "label": "21 Sep", "subLabel": "W39" },
990
+ { "id": "w40", "label": "28 Sep", "subLabel": "W40" },
991
+ { "id": "w41", "label": "5 Oct", "subLabel": "W41", "partial": true }
992
+ ],
993
+ "facts": [
994
+ {
995
+ "memberId": "total",
996
+ "periodId": "range",
997
+ "sums": { "orders": 4641, "nc": 1801, "rev": 364277, "spend": 88583 }
998
+ },
999
+ {
1000
+ "memberId": "search",
1001
+ "periodId": "range",
1002
+ "sums": { "orders": 2662, "nc": 1112, "rev": 208407, "spend": 61292 }
1003
+ },
1004
+ {
1005
+ "memberId": "brand",
1006
+ "periodId": "range",
1007
+ "sums": { "orders": 1469, "nc": 495, "rev": 119618, "spend": 19455 }
1008
+ },
1009
+ {
1010
+ "memberId": "generic",
1011
+ "periodId": "range",
1012
+ "sums": { "orders": 1193, "nc": 617, "rev": 88789, "spend": 41837 }
1013
+ },
1014
+ {
1015
+ "memberId": "social",
1016
+ "periodId": "range",
1017
+ "sums": { "orders": 1006, "nc": 613, "rev": 69794, "spend": 27291 }
1018
+ },
1019
+ {
1020
+ "memberId": "email",
1021
+ "periodId": "range",
1022
+ "sums": { "orders": 973, "nc": 76, "rev": 86076 }
1023
+ },
1024
+ {
1025
+ "memberId": "total",
1026
+ "periodId": "prior",
1027
+ "sums": { "orders": 4346, "nc": 1648, "rev": 342411, "spend": 80214 }
1028
+ },
1029
+ {
1030
+ "memberId": "search",
1031
+ "periodId": "prior",
1032
+ "sums": { "orders": 2555, "nc": 1062, "rev": 200070, "spend": 53475 }
1033
+ },
1034
+ {
1035
+ "memberId": "brand",
1036
+ "periodId": "prior",
1037
+ "sums": { "orders": 1439, "nc": 486, "rev": 117101, "spend": 19062 }
1038
+ },
1039
+ {
1040
+ "memberId": "generic",
1041
+ "periodId": "prior",
1042
+ "sums": { "orders": 1116, "nc": 576, "rev": 82969, "spend": 34413 }
1043
+ },
1044
+ {
1045
+ "memberId": "social",
1046
+ "periodId": "prior",
1047
+ "sums": { "orders": 837, "nc": 511, "rev": 57999, "spend": 26739 }
1048
+ },
1049
+ {
1050
+ "memberId": "email",
1051
+ "periodId": "prior",
1052
+ "sums": { "orders": 954, "nc": 75, "rev": 84342 }
1053
+ },
1054
+ {
1055
+ "memberId": "total",
1056
+ "periodId": "w38",
1057
+ "sums": { "orders": 1309, "nc": 503, "rev": 103897, "spend": 23633 },
1058
+ "ref": { "orders": 1295, "nc": 494, "rev": 102447, "spend": 23633 }
1059
+ },
1060
+ {
1061
+ "memberId": "search",
1062
+ "periodId": "w38",
1063
+ "sums": { "orders": 753, "nc": 313, "rev": 59557, "spend": 15755 },
1064
+ "ref": { "orders": 753, "nc": 313, "rev": 59277, "spend": 15755 }
1065
+ },
1066
+ {
1067
+ "memberId": "brand",
1068
+ "periodId": "w38",
1069
+ "sums": { "orders": 424, "nc": 143, "rev": 34850, "spend": 5616 },
1070
+ "ref": { "orders": 424, "nc": 143, "rev": 34688, "spend": 5616 }
1071
+ },
1072
+ {
1073
+ "memberId": "generic",
1074
+ "periodId": "w38",
1075
+ "sums": { "orders": 329, "nc": 170, "rev": 24707, "spend": 10139 },
1076
+ "ref": { "orders": 329, "nc": 170, "rev": 24589, "spend": 10139 }
1077
+ },
1078
+ {
1079
+ "memberId": "social",
1080
+ "periodId": "w38",
1081
+ "sums": { "orders": 275, "nc": 168, "rev": 19249, "spend": 7878 },
1082
+ "ref": { "orders": 261, "nc": 159, "rev": 18193, "spend": 7878 }
1083
+ },
1084
+ {
1085
+ "memberId": "email",
1086
+ "periodId": "w38",
1087
+ "sums": { "orders": 281, "nc": 22, "rev": 25091 },
1088
+ "ref": { "orders": 281, "nc": 22, "rev": 24977 }
1089
+ },
1090
+ {
1091
+ "memberId": "total",
1092
+ "periodId": "w39",
1093
+ "sums": { "orders": 1331, "nc": 515, "rev": 100799, "spend": 24799 },
1094
+ "ref": { "orders": 1309, "nc": 503, "rev": 103897, "spend": 23633 }
1095
+ },
1096
+ {
1097
+ "memberId": "search",
1098
+ "periodId": "w39",
1099
+ "sums": { "orders": 762, "nc": 317, "rev": 57554, "spend": 16921 },
1100
+ "ref": { "orders": 753, "nc": 313, "rev": 59557, "spend": 15755 }
1101
+ },
1102
+ {
1103
+ "memberId": "brand",
1104
+ "periodId": "w39",
1105
+ "sums": { "orders": 424, "nc": 143, "rev": 33301, "spend": 5616 },
1106
+ "ref": { "orders": 424, "nc": 143, "rev": 34850, "spend": 5616 }
1107
+ },
1108
+ {
1109
+ "memberId": "generic",
1110
+ "periodId": "w39",
1111
+ "sums": { "orders": 338, "nc": 174, "rev": 24253, "spend": 11305 },
1112
+ "ref": { "orders": 329, "nc": 170, "rev": 24707, "spend": 10139 }
1113
+ },
1114
+ {
1115
+ "memberId": "social",
1116
+ "periodId": "w39",
1117
+ "sums": { "orders": 288, "nc": 176, "rev": 19269, "spend": 7878 },
1118
+ "ref": { "orders": 275, "nc": 168, "rev": 19249, "spend": 7878 }
1119
+ },
1120
+ {
1121
+ "memberId": "email",
1122
+ "periodId": "w39",
1123
+ "sums": { "orders": 281, "nc": 22, "rev": 23976 },
1124
+ "ref": { "orders": 281, "nc": 22, "rev": 25091 }
1125
+ },
1126
+ {
1127
+ "memberId": "total",
1128
+ "periodId": "w40",
1129
+ "sums": { "orders": 1360, "nc": 531, "rev": 108939, "spend": 26926 },
1130
+ "ref": { "orders": 1331, "nc": 515, "rev": 100799, "spend": 24799 }
1131
+ },
1132
+ {
1133
+ "memberId": "search",
1134
+ "periodId": "w40",
1135
+ "sums": { "orders": 779, "nc": 327, "rev": 62270, "spend": 19048 },
1136
+ "ref": { "orders": 762, "nc": 317, "rev": 57554, "spend": 16921 }
1137
+ },
1138
+ {
1139
+ "memberId": "brand",
1140
+ "periodId": "w40",
1141
+ "sums": { "orders": 424, "nc": 143, "rev": 35279, "spend": 5616 },
1142
+ "ref": { "orders": 424, "nc": 143, "rev": 33301, "spend": 5616 }
1143
+ },
1144
+ {
1145
+ "memberId": "generic",
1146
+ "periodId": "w40",
1147
+ "sums": { "orders": 355, "nc": 184, "rev": 26991, "spend": 13432 },
1148
+ "ref": { "orders": 338, "nc": 174, "rev": 24253, "spend": 11305 }
1149
+ },
1150
+ {
1151
+ "memberId": "social",
1152
+ "periodId": "w40",
1153
+ "sums": { "orders": 300, "nc": 182, "rev": 21266, "spend": 7878 },
1154
+ "ref": { "orders": 288, "nc": 176, "rev": 19269, "spend": 7878 }
1155
+ },
1156
+ {
1157
+ "memberId": "email",
1158
+ "periodId": "w40",
1159
+ "sums": { "orders": 281, "nc": 22, "rev": 25403 },
1160
+ "ref": { "orders": 281, "nc": 22, "rev": 23976 }
1161
+ },
1162
+ {
1163
+ "memberId": "total",
1164
+ "periodId": "w41",
1165
+ "sums": { "orders": 641, "nc": 252, "rev": 50642, "spend": 13225 },
1166
+ "ref": { "orders": 628, "nc": 245, "rev": 49753, "spend": 12235 }
1167
+ },
1168
+ {
1169
+ "memberId": "search",
1170
+ "periodId": "w41",
1171
+ "sums": { "orders": 368, "nc": 155, "rev": 29026, "spend": 9568 },
1172
+ "ref": { "orders": 360, "nc": 151, "rev": 28461, "spend": 8578 }
1173
+ },
1174
+ {
1175
+ "memberId": "brand",
1176
+ "periodId": "w41",
1177
+ "sums": { "orders": 197, "nc": 66, "rev": 16188, "spend": 2607 },
1178
+ "ref": { "orders": 197, "nc": 66, "rev": 16208, "spend": 2607 }
1179
+ },
1180
+ {
1181
+ "memberId": "generic",
1182
+ "periodId": "w41",
1183
+ "sums": { "orders": 171, "nc": 89, "rev": 12838, "spend": 6961 },
1184
+ "ref": { "orders": 163, "nc": 85, "rev": 12253, "spend": 5971 }
1185
+ },
1186
+ {
1187
+ "memberId": "social",
1188
+ "periodId": "w41",
1189
+ "sums": { "orders": 143, "nc": 87, "rev": 10010, "spend": 3657 },
1190
+ "ref": { "orders": 138, "nc": 84, "rev": 9672, "spend": 3657 }
1191
+ },
1192
+ {
1193
+ "memberId": "email",
1194
+ "periodId": "w41",
1195
+ "sums": { "orders": 130, "nc": 10, "rev": 11606 },
1196
+ "ref": { "orders": 130, "nc": 10, "rev": 11620 }
1197
+ }
1198
+ ]
1199
+ },
1200
+ "options": {
1201
+ "title": "Orders grew 7% while paid search CAC rose every week",
1202
+ "variant": "by-measure",
1203
+ "depth": 2,
1204
+ "expansion": { "expanded": ["[\"by-measure\",\"search\",\"spend\"]", "[\"by-measure\",\"search\",\"cac\"]"] },
1205
+ "minimumSample": { "orders": 200, "nc": 50 },
1206
+ "widths": { "range": 120, "change": 120 },
1207
+ "size": { "width": 1050 },
1208
+ "theme": {
1209
+ "preset": "boardroom",
1210
+ "overrides": {
1211
+ "table": {
1212
+ "tones": "fill",
1213
+ "rows": { "lineHeight": 1.44, "pad": 3 },
1214
+ "weights": { "member": 700, "measure": 600 },
1215
+ "mark": "boxed",
1216
+ "headRule": "ink",
1217
+ "blockRule": "rule",
1218
+ "head": { "case": "asis" }
1219
+ }
1220
+ }
1221
+ }
1222
+ }
1223
+ }
1224
+ ```
1225
+
1226
+ ## React usage
1227
+
1228
+ `DimSwitchChart` from `boardplot/react/dimswitch` takes `data` and every option as its own prop; it has no `options` prop. The type `DimSwitchData` comes from `boardplot`, and the types `DimSwitchView` and `DimSwitchViewReason` come from the component entry.
1229
+
1230
+ The component draws no switches. The host draws the Variant, Depth, Splits and Changes controls and passes their values as the props `variant`, `depth`, `splits` and `inlineVisibility={{ change }}`. `variant`, `depth`, `splits` and `collapsed` each have a `default...` twin, which sets the start value when the host does not control the prop. An uncontrolled `variant`, `depth` or `splits` never changes after the first render, because the component has no control for it. Offer depth values from 1 to the number of member levels plus one; a higher depth throws.
1231
+
1232
+ `onViewChange(next, reason)` reports the view `{ variant, depth, splits, collapsed }` after each change. The reason `collapsed` means that the reader opened or folded a row. The reasons `variant`, `depth` and `splits` mean that the prop changed; `next.collapsed` then holds the folds that apply now. Pass `onViewChange={setView}` to keep one view state.
1233
+
1234
+ A change of `variant` or `depth` resets the manual folds to the depth defaults, with `expansion` on top. A change of `splits` or of the Changes switch keeps the manual folds. Control `collapsed` only to restore a saved view, and then store `next.collapsed` from every `onViewChange` call. Do not start it with `[]`: an empty list opens every row. Leave it undefined, or pass the saved list.
1235
+
1236
+ The `TableChart` host props pass through: `size="container"` with `fallbackSize`, `fit`, `fillHeight`, `stickyLabels`, `rowExtent`, `cellPadX`, `fontMetrics`, `measureWidths`, `hover`, `onRowSelect`, `handleRef` and `onScrollChange`. `toolbar` is false by default. `isRowSelectable(row, { collapsed })` also passes through; `collapsed` is true while the row is folded shut. `mountCollapsed` is false by default here, so the browser paints a leaf row only near the viewport; to capture a whole long table, add the host CSS `.bp-table-grid [data-bp-defer-row]{content-visibility:visible!important}` first. See [React](react.md).
1237
+
1238
+ Speed: the component compiles the cube again only when `data`, `variant`, `splits` or another option changes. `depth`, `collapsed` and the Changes switch change only the folds or the CSS, so they are fast. The component compares `data` by content: keep it the same object while it does not change (`useMemo`), because a deep compare of a large cube also takes time. Closed rows are not mounted, so the cost grows with the open rows times the period columns. Rows that open fade and slide in over the theme duration `motion.layout` (160 ms by default), and rows that close go at once; `motion: "reduce"` on `BoardplotTheme`, or the reader setting for reduced motion, turns this off. In one development measurement, opening 350 rows with 60 period columns took about 0.6 s. A Day grain over a long range gives one column for each day: offer Day only for short ranges, and use Week or Month for longer ones.
1239
+
1240
+ This host component maps query rows to facts (see [Host data](#host-data-what-to-supply-and-how-to-compute-it)) and draws the four controls. Its Range is W40 and the running W41 (Monday to Wednesday); Prior is the 10 days before.
1241
+
1242
+ ```tsx
1243
+ import { useMemo, useState } from 'react';
1244
+ import { DimSwitchChart, type DimSwitchView } from 'boardplot/react/dimswitch';
1245
+ import type { DimSwitchData, DimSwitchSums } from 'boardplot';
1246
+
1247
+ // Query result rows: member, period, orders, nc, spend, ref_orders, ref_nc, ref_spend.
1248
+ type Row = [string, string, ...(number | null)[]];
1249
+ const ROWS: Row[] = [
1250
+ ['total', 'range', 1445, 474, 22600, null, null, null], ['total', 'prior', 1402, 453, 20700, null, null, null],
1251
+ ['total', 'w40', 990, 322, 15400, 968, 315, 14400], ['total', 'w41', 455, 152, 7200, 451, 148, 6750],
1252
+ ['search', 'range', 1040, 442, 22600, null, null, null], ['search', 'prior', 1000, 422, 20700, null, null, null],
1253
+ ['search', 'w40', 710, 300, 15400, 692, 294, 14400], ['search', 'w41', 330, 142, 7200, 321, 137, 6750],
1254
+ ['brand', 'range', 600, 206, 8100, null, null, null], ['brand', 'prior', 580, 196, 7900, null, null, null],
1255
+ ['brand', 'w40', 410, 140, 5600, 402, 136, 5500], ['brand', 'w41', 190, 66, 2500, 185, 63, 2450],
1256
+ ['generic', 'range', 440, 236, 14500, null, null, null], ['generic', 'prior', 420, 226, 12800, null, null, null],
1257
+ ['generic', 'w40', 300, 160, 9800, 290, 158, 8900], ['generic', 'w41', 140, 76, 4700, 136, 74, 4300],
1258
+ ['email', 'range', 405, 32, null, null, null, null], ['email', 'prior', 402, 31, null, null, null, null],
1259
+ ['email', 'w40', 280, 22, null, 276, 21, null], ['email', 'w41', 125, 10, null, 130, 11, null],
1260
+ ];
1261
+ const FIELDS = ['orders', 'nc', 'spend'];
1262
+ // Decided on the whole source, not on the selected range: Email never has spend.
1263
+ const WITHOUT_SPEND = new Set(['email']);
1264
+
1265
+ function sums(member: string, values: (number | null)[]): DimSwitchSums {
1266
+ const out: DimSwitchSums = {};
1267
+ FIELDS.forEach((field, index) => {
1268
+ if (field === 'spend' && WITHOUT_SPEND.has(member)) return; // Absent: spend and CAC do not apply.
1269
+ out[field] = values[index] ?? 0; // A window without activity is 0, not missing.
1270
+ });
1271
+ return out;
1272
+ }
1273
+
1274
+ function toCube(rows: Row[]): DimSwitchData {
1275
+ return {
1276
+ dimension: {
1277
+ label: 'Channel',
1278
+ total: { id: 'total', label: 'Total' },
1279
+ members: [
1280
+ { id: 'search', label: 'Paid search' },
1281
+ { id: 'brand', label: 'Brand search', parentId: 'search' },
1282
+ { id: 'generic', label: 'Generic search', parentId: 'search' },
1283
+ { id: 'email', label: 'Email' },
1284
+ ],
1285
+ headline: ['spend', 'orders'],
1286
+ },
1287
+ changeLabel: 'WoW',
1288
+ measures: [
1289
+ { id: 'orders', label: 'Orders', value: { field: 'orders' }, scale: 'count', judge: { family: 'volume', base: 'orders' } },
1290
+ { id: 'new', label: 'New customers', value: { field: 'nc' }, scale: 'count', splitOf: 'orders', judge: { family: 'volume', base: 'nc' } },
1291
+ { id: 'spend', label: 'Marketing spend', value: { field: 'spend' }, scale: 'money', unit: 'USD', divider: true },
1292
+ { id: 'cac', label: 'CAC', value: { op: 'div', a: { field: 'spend' }, b: { field: 'nc' } }, scale: 'perUnit', unit: 'USD', judge: { family: 'cost', base: 'nc' } },
1293
+ ],
1294
+ periods: [
1295
+ { id: 'range', label: 'Range', subLabel: '28 Sep–7 Oct', kind: 'range' },
1296
+ { id: 'prior', label: 'vs prior', subLabel: '18–27 Sep', kind: 'prior' },
1297
+ { id: 'w40', label: '28 Sep', subLabel: 'W40' },
1298
+ { id: 'w41', label: '5 Oct', subLabel: 'W41', partial: true },
1299
+ ],
1300
+ facts: rows.map(([member, period, ...values]) => ({
1301
+ memberId: member,
1302
+ periodId: period,
1303
+ sums: sums(member, values.slice(0, 3)),
1304
+ ...(period === 'range' || period === 'prior' ? {} : { ref: sums(member, values.slice(3)) }),
1305
+ })),
1306
+ };
1307
+ }
1308
+
1309
+ export function ChannelTable() {
1310
+ const data = useMemo(() => toCube(ROWS), []);
1311
+ // view.collapsed is not passed back: the component keeps the manual folds.
1312
+ const [view, setView] = useState<DimSwitchView>({ variant: 'by-measure', depth: 1, splits: false, collapsed: [] });
1313
+ const [changes, setChanges] = useState(true);
1314
+ const pick = (next: Partial<DimSwitchView>) => setView({ ...view, ...next });
1315
+ return (
1316
+ <section>
1317
+ <div role="toolbar" aria-label="Table view">
1318
+ <button type="button" aria-pressed={view.variant === 'by-measure'} onClick={() => pick({ variant: 'by-measure' })}>By KPI</button>
1319
+ <button type="button" aria-pressed={view.variant === 'by-member'} onClick={() => pick({ variant: 'by-member' })}>By channel</button>
1320
+ {[1, 2, 3].map((depth) => (
1321
+ <button key={depth} type="button" aria-pressed={view.depth === depth} onClick={() => pick({ depth })}>Depth {depth}</button>
1322
+ ))}
1323
+ <button type="button" aria-pressed={view.splits} onClick={() => pick({ splits: !view.splits })}>Splits</button>
1324
+ <button type="button" aria-pressed={changes} onClick={() => setChanges(!changes)}>Changes</button>
1325
+ </div>
1326
+ <DimSwitchChart
1327
+ data={data}
1328
+ variant={view.variant}
1329
+ depth={view.depth}
1330
+ splits={view.splits}
1331
+ onViewChange={setView}
1332
+ inlineVisibility={{ change: changes }}
1333
+ minimumSample={{ nc: 50 }}
1334
+ title={false}
1335
+ size="container"
1336
+ fallbackSize={{ width: 960, height: 480 }}
1337
+ />
1338
+ </section>
1339
+ );
1340
+ }
1341
+ ```
1342
+
1343
+ ## Common mistakes
1344
+
1345
+ Each item names the mistake, the symptom and the fix.
1346
+
1347
+ - **Averaging daily ratios.** Symptom: CAC, AOV or a rate differs from a check on the totals, and the members do not match the Total. Fix: supply the additive parts (spend and new customers) and let `value` divide them.
1348
+ - **A ratio in `sums`.** Symptom: under `dimension.sums: true` a parent shows the sum of the rates of its children, and without it a Total rate does not match the weighted rate of its members. Fix: put the numerator and the denominator in `sums`, and write the ratio as `{ "op": "div", ... }`.
1349
+ - **Missing ref sums.** Symptom: every change line under a period prints n/a and no period cell is coloured; only the vs prior column works. Fix: add `ref` to each fact of a displayed period.
1350
+ - **A full week as the reference of a partial week.** Symptom: on a Wednesday the running week shows a change near −55% (three days against seven); without `partial: true` it is also judged bad. Fix: compare the partial period with the same days of the period before, and set `partial: true`.
1351
+ - **Zero-filled spend.** Symptom: Email shows Marketing spend 0 and CAC 0.0 rows. Fix: leave the `spend` key out, or set it to `null`, in every fact of a member that never has spend.
1352
+ - **Depth 4.** Symptom: the error `dimswitch depth must be between 1 and 3 (member levels + 1); got 4`. Fix: the maximum depth is the number of member levels plus one; offer depth controls up to that number.
1353
+ - **No range or prior block.** Symptom: `invalid-data` with `Exactly one range period is required.` or `Exactly one prior period is required.` Fix: add one period with `kind: "range"` and one with `kind: "prior"`, with facts for the Total and every member.
1354
+ - **A format for a money row.** Symptom: `format: "$1.2"` with `scale: "money"` prints no `$` in the cells and no decimals below 1,000. Fix: put the currency in `unit`. `money` sets its own precision. `perUnit` keeps authored precision for fractional values; `count`, `percent` and measures without a scale keep the format.
1355
+ - **A format in `options`.** Symptom: the warning `format-unused`. Fix: set `measures[].format`.
1356
+ - **A percent without factor.** Symptom: a share prints 0.4% instead of 38.8%, and the warning `percent-scale-suspect` names the row. Fix: add `factor: 100` to the `div`.
1357
+ - **Unknown ids in facts.** Symptom: `invalid-data` with `Unknown member '<id>'; use the total id or a dimension.members id.` or `Unknown period '<id>'; use a periods id.` at `/data/facts/<index>`. Fix: use only the Total id, member ids from `dimension.members` and ids from `periods`.
1358
+ - **A narrow render.** Symptom: a KPI label is cut while its unit stays ("… USD"), or a wrapped label overlaps the change tag. Boardplot gives no warning for this yet. Cause: Range, vs prior and every period column keep their widths, and the label column takes the rest of the frame, up to `widths.label` (320 px). A render without `size` is about 780 px wide. Fix: give the table the width the page shows it at, at least the label width plus Range, vs prior and the period columns (about 1,050 px for 4 to 8 weeks), or shorten `unit`.
1359
+ - **Dates in the Range or vs prior sub-label.** Symptom: the warning `table-column-clipped` for column `range` or `pp` (the vs prior column), with a path such as `/data/columns/2/width` that does not exist in a dimswitch spec. Fix: widen `options.widths.range` or `options.widths.change`.
1360
+ - **Splits on in by-measure.** Symptom: the Total row of a split (New customers under Orders) comes after the member rows of its measure when that measure is open, at the member indent. This is a known layout limit of 0.24.0. Read splits in by-member, where each split sits directly under its measure.
1361
+ - **Averaging per-order lines of a statement over weeks.** Symptom: Range does not match the weeks, and the parts do not add up to the subtotal. Fix: supply the sums of each window and divide by the orders of the same window.
1362
+ - **Setting `sign: -1` on every cost part.** Symptom: in `signed` mode the parts print positive under a negative subtotal. Fix: set `sign: -1` on the subtotal only; a part inherits the sign of its subtotal.
1363
+ - **Authored costs that are already negative.** Symptom: a cost line adds to the result, and its effect has the wrong colour. Fix: supply costs as positive sums and use `sign: -1`.
1364
+ - **A per-unit line without a fixed format.** Symptom: a small per-order change fits inside the default 1% rounding limit. Fix: set `format: "1.2"` for fractional per-unit values, or omit `scale` to keep the format on every value.
1365
+ - **A result without a value.** Symptom: the schema refuses the measure. Fix: name the lines of the result in its `value` with `{ "measure": id }`.
1366
+ - **Effect thresholds from another unit.** Symptom: every cell is coloured, or none. Fix: set `thresholds.effect` in the currency and the denominator of the statement.
1367
+
1368
+ ## Sizing
1369
+
1370
+ Floor 280 × 80 px; fit `content`.
1371
+
1372
+ Below the floor a render is refused with `size-below-floor` and the pixels it needs. `measure` returns the natural and comfortable size for a given spec; see [Sizing in the manual](../manual.md#sizing).
1373
+
1374
+ ## Fixtures
1375
+
1376
+ | ID | Kind | Use case |
1377
+ |---|---|---|
1378
+ | by-measure | example | KPIs and their channel members |
1379
+ | by-member | example | Channels and their KPIs |
1380
+ | sheet | example | KPIs on the report sheet |
1381
+ | statement | example | A contribution-margin statement per order |
1382
+ | statement-channels | example | The statement with the channels folded under the Total |
1383
+ | statement-operators | example | The statement by channel with operators |
1384
+ | statement-plain | example | The statement as supplied, Total folded |
1385
+ | statement-ink-only | example | The statement with driver ink only, no group ground and the old frame |
1386
+ | statement-all-tones | example | The statement with every driver tone, a group ground that stays when folded and a page-pinned head |
1387
+ | total-rate-lift | example | Member rate relative to the Total rate |
1388
+ | bands-and-plan | example | Value bands with separate prior and plan changes |
1389
+ | thresholds-by-kind | example | Separate thresholds for each change kind |
1390
+ | multiple-sample-bases | example | Judge only when both sample fields pass |
1391
+ | card-notes-de | torture | German engine notes on a phone card |
1392
+
1393
+ ## Not for
1394
+
1395
+ Two dimensions at once, such as channel by country, or a plain list of rows: use table. One KPI over time: use line or kpi. Calendar logic: the host computes the windows and their sums, and Boardplot does no date arithmetic.