boardplot 0.56.0 → 0.57.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.
- package/CHANGELOG.md +110 -0
- package/README.md +3 -3
- package/dist/{ReaderBox-GLCKYXBU.js → ReaderBox-GCIITQCX.js} +4 -4
- package/dist/{annotateEngine-QVNAE3EH.js → annotateEngine-JMZI6QEG.js} +1 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-CKGSGRP7.js → chunk-26WNBTWB.js} +20 -4
- package/dist/{chunk-UBCVBBJJ.js → chunk-2AJWRVZ2.js} +4 -3
- package/dist/{chunk-XMP2DNLI.js → chunk-2BHLRHF2.js} +2 -2
- package/dist/{chunk-2NRHD2G7.js → chunk-2HD5RY2U.js} +11 -3
- package/dist/{chunk-6QDMRPXI.js → chunk-2I76VFMZ.js} +184 -239
- package/dist/{chunk-XC5IRUEL.js → chunk-2KCK63DD.js} +2 -2
- package/dist/{chunk-ZEYBI47P.js → chunk-2WTD3GCR.js} +11 -3
- package/dist/{chunk-BTDGWHGJ.js → chunk-2X6XY4K4.js} +4 -4
- package/dist/{chunk-5S3JQ5AT.js → chunk-3DUGZ7ML.js} +149 -118
- package/dist/{chunk-JTFKRDDA.js → chunk-3LNVEE5Z.js} +1 -1
- package/dist/{chunk-JCAGVAB3.js → chunk-43PCSBVQ.js} +563 -10
- package/dist/{chunk-F2EVCJ4U.js → chunk-4JNHF6JW.js} +10 -10
- package/dist/{chunk-ECBUFKCP.js → chunk-4RN4OM6I.js} +3 -3
- package/dist/{chunk-A2GAWGVJ.js → chunk-4U2WSW6F.js} +20 -20
- package/dist/{chunk-CCDXK5NA.js → chunk-53OEKS4L.js} +5 -3
- package/dist/{chunk-YPYD6OJ3.js → chunk-54HEIM2A.js} +2 -2
- package/dist/{chunk-IGJ2G5C6.js → chunk-5H4HFRDO.js} +6 -6
- package/dist/{chunk-EMFUZKYK.js → chunk-5HTGSB6Y.js} +3 -3
- package/dist/{chunk-WXJ5MHLH.js → chunk-5JTRCSBN.js} +1 -1
- package/dist/{chunk-67QSW5RW.js → chunk-5P4MXWKP.js} +3 -3
- package/dist/{chunk-EBB4PYBN.js → chunk-5RHP7YTL.js} +5 -5
- package/dist/{chunk-VVXKFU72.js → chunk-5TUDYKNL.js} +35 -27
- package/dist/{chunk-HZUAEMN5.js → chunk-5WSIH4SR.js} +1 -1
- package/dist/{chunk-KF7HD3EH.js → chunk-62JZL6FW.js} +43 -35
- package/dist/{chunk-S7NRL66K.js → chunk-6EE6XEMA.js} +4 -4
- package/dist/chunk-6JXBLQJ2.js +32 -0
- package/dist/{chunk-KBJMLXNW.js → chunk-6KHRMK3I.js} +14 -14
- package/dist/{chunk-2DOEZ5QY.js → chunk-6LQKU6YN.js} +4 -4
- package/dist/chunk-6VU2XI3W.js +89 -0
- package/dist/{chunk-DQ7YMQVX.js → chunk-6WJOHZPW.js} +5 -5
- package/dist/{chunk-ZMPH2OC4.js → chunk-6XU5XGYV.js} +7 -8
- package/dist/{chunk-MAFPVR4G.js → chunk-6ZN2XJFI.js} +10 -5
- package/dist/{chunk-PQLAZEQV.js → chunk-72OJBDRB.js} +204 -59
- package/dist/{chunk-T2YDWT54.js → chunk-73O6AOAA.js} +43 -30
- package/dist/{chunk-4JHMCXOB.js → chunk-76UL4CT4.js} +60 -24
- package/dist/chunk-7BQK2UDV.js +13 -0
- package/dist/{chunk-7PPMT5EJ.js → chunk-7EQU2TUN.js} +300 -64
- package/dist/{chunk-2HTYGMMG.js → chunk-7FAO4ICF.js} +2 -2
- package/dist/{chunk-6WHWXCHJ.js → chunk-7MYJUJZV.js} +6 -2
- package/dist/{chunk-CB4CERXZ.js → chunk-7P7D6WXR.js} +11 -2
- package/dist/{chunk-RT66UTLJ.js → chunk-A33MFWHW.js} +2 -2
- package/dist/{chunk-4JC3SE4G.js → chunk-A6XCVOC5.js} +1 -1
- package/dist/{chunk-QWCLWFKC.js → chunk-AFA32LHN.js} +132 -36
- package/dist/{chunk-T2CYNDYU.js → chunk-AFGQXMKT.js} +235 -80
- package/dist/{chunk-HOU2MZHC.js → chunk-AKJO6N4K.js} +2 -2
- package/dist/{chunk-MRAP2UVV.js → chunk-ANNQJWDX.js} +10 -10
- package/dist/{chunk-LGNJCPFP.js → chunk-AOIZJ7GR.js} +7 -7
- package/dist/chunk-B5A7X2BA.js +44 -0
- package/dist/{chunk-SS4YGK3E.js → chunk-BDCKHLUB.js} +15 -15
- package/dist/{chunk-XHRUXZD7.js → chunk-BFDPY7JM.js} +10 -3
- package/dist/{chunk-BK6P6KMW.js → chunk-BM2A3IGQ.js} +1 -1
- package/dist/{chunk-GQT2SY2S.js → chunk-BO5EJBLH.js} +247 -127
- package/dist/chunk-BQIADGJB.js +23 -0
- package/dist/{chunk-PJBEJR2U.js → chunk-BY5JGQFZ.js} +24 -7
- package/dist/{chunk-SXD3OYAR.js → chunk-C5SQEYTQ.js} +76 -55
- package/dist/{chunk-3465633G.js → chunk-CEMXGMQN.js} +2 -2
- package/dist/{chunk-AMR4SUAN.js → chunk-CIDOL4FO.js} +5 -5
- package/dist/{chunk-E7V3OHQQ.js → chunk-CT4RFZO4.js} +6 -6
- package/dist/{chunk-7Q37C6GZ.js → chunk-CV3NC75L.js} +1 -1
- package/dist/{chunk-FFJGC2DX.js → chunk-D3PQAVFW.js} +22 -12
- package/dist/{chunk-52WNCUIN.js → chunk-D5G67OER.js} +1 -1
- package/dist/{chunk-MOS6WFWM.js → chunk-D5RAVZ5C.js} +6 -7
- package/dist/{chunk-FNRPQIQE.js → chunk-DJBMA4FW.js} +4 -4
- package/dist/{chunk-4DZFR52I.js → chunk-DPUCT567.js} +2 -2
- package/dist/{chunk-TE4M52AA.js → chunk-DYSEZVIJ.js} +18 -2
- package/dist/{chunk-SA46CNMS.js → chunk-ED7GLWTF.js} +4 -1
- package/dist/{chunk-R5MEBBAA.js → chunk-EDBUVDRI.js} +117 -67
- package/dist/{chunk-TUW5IYGA.js → chunk-EEBMK6T6.js} +6 -6
- package/dist/{chunk-RLMC5CUP.js → chunk-EEL2N4Y6.js} +7 -8
- package/dist/{chunk-CF4NMRN7.js → chunk-EFKFZNQC.js} +24 -18
- package/dist/{chunk-UPTXFTKH.js → chunk-EHNGPUTO.js} +6 -6
- package/dist/{chunk-BISJK67O.js → chunk-EHQLLZCQ.js} +48 -21
- package/dist/{chunk-U3A6FMSI.js → chunk-EWR6WVOV.js} +6 -6
- package/dist/{chunk-RMC4OONA.js → chunk-EY4OA4OF.js} +985 -663
- package/dist/{chunk-YYJORENB.js → chunk-F4JAGDPD.js} +5 -5
- package/dist/{chunk-ZY72LSQK.js → chunk-FAFUMSPR.js} +33 -24
- package/dist/{chunk-CYKXROFG.js → chunk-FERP4WS3.js} +19 -9
- package/dist/{chunk-N5HN5QGH.js → chunk-FF7MV4D4.js} +1 -1
- package/dist/{chunk-O7REHICC.js → chunk-FJKFYQ5I.js} +10 -10
- package/dist/chunk-FL3FQ2YA.js +27 -0
- package/dist/{chunk-YOOHNQ3L.js → chunk-FX5VZK5F.js} +4 -0
- package/dist/{chunk-7M2GK7XQ.js → chunk-G5BUGYIL.js} +68 -16
- package/dist/{chunk-QZIHKQRH.js → chunk-G5CELEUR.js} +6 -6
- package/dist/{chunk-ZJFJ2IKQ.js → chunk-GADI2DU7.js} +11 -10
- package/dist/{chunk-F6OLHND5.js → chunk-GAFEN3H7.js} +2 -2
- package/dist/{chunk-GM3EGUYW.js → chunk-GHFTKVJN.js} +1 -1
- package/dist/chunk-GKDUIDU6.js +138 -0
- package/dist/{chunk-OJ5CQV7H.js → chunk-GKQLKUMF.js} +186 -82
- package/dist/{chunk-EGGDPDYJ.js → chunk-GS5UG6QD.js} +1 -1
- package/dist/{chunk-5TWY3ZIC.js → chunk-H2POQ4LB.js} +5 -5
- package/dist/{chunk-KD5GOR2K.js → chunk-H3EWFSWI.js} +93 -52
- package/dist/{chunk-CHAS5A5B.js → chunk-H6EJ63QN.js} +18 -16
- package/dist/{chunk-GIHH6VC2.js → chunk-HB3TH7GY.js} +3 -3
- package/dist/{chunk-FMDNJ6PC.js → chunk-HC6WHTBX.js} +2 -2
- package/dist/{chunk-63Y3ROZ7.js → chunk-HDSHS2QZ.js} +45 -30
- package/dist/{chunk-KTHFHD6C.js → chunk-HFFKN7PA.js} +11 -6
- package/dist/{chunk-QSMGZOT5.js → chunk-HGPFEG2L.js} +7 -8
- package/dist/{chunk-2YO4WRJN.js → chunk-HVX2E26J.js} +35 -25
- package/dist/{chunk-KLB2QC24.js → chunk-I3DLERI7.js} +1 -1
- package/dist/{chunk-SPSGUFTI.js → chunk-I4NUYVP5.js} +1 -1
- package/dist/{chunk-LKMFMNQX.js → chunk-I5ZADE2U.js} +1 -1
- package/dist/{chunk-CPGASWNN.js → chunk-I65OLJ2X.js} +1 -1
- package/dist/{chunk-SRAV6FPB.js → chunk-I6QGYRY4.js} +3 -3
- package/dist/{chunk-NCLRZQR6.js → chunk-I7KDPCC7.js} +3 -3
- package/dist/{chunk-6EYTD777.js → chunk-IFURKTOL.js} +2 -2
- package/dist/{chunk-Y54LU4CU.js → chunk-IPWUBZ4P.js} +1 -1
- package/dist/{chunk-BIGQKCU7.js → chunk-IRXTNSZL.js} +9 -9
- package/dist/{chunk-2FKEF2AC.js → chunk-IUVJVMKS.js} +11 -11
- package/dist/{chunk-ZKJ5L35C.js → chunk-IVQT2E3Y.js} +28 -17
- package/dist/{chunk-7DAH2E4T.js → chunk-IW3YUMPI.js} +2 -2
- package/dist/chunk-IXM6BAM4.js +53 -0
- package/dist/{chunk-YMTXTQCN.js → chunk-IZRTNCJQ.js} +5 -5
- package/dist/{chunk-QGFKSDQO.js → chunk-J22ETKDJ.js} +2 -2
- package/dist/{chunk-HJRNBKIT.js → chunk-JARJP576.js} +3 -3
- package/dist/{chunk-DD6RVD3S.js → chunk-JHWDTV4K.js} +5 -1
- package/dist/{chunk-P4SMC4BY.js → chunk-JIH52I36.js} +79 -79
- package/dist/{chunk-KQCKK3LD.js → chunk-JKXJWCJ5.js} +69 -34
- package/dist/{chunk-WI5VOSQX.js → chunk-JMOBA5ES.js} +2 -2
- package/dist/{chunk-AGDDH6XY.js → chunk-JMXNXLAC.js} +5 -1
- package/dist/{chunk-R2IKOLBK.js → chunk-JRRSKCGG.js} +3 -3
- package/dist/{chunk-IVRYF7QA.js → chunk-JSA3ESEJ.js} +1 -1
- package/dist/{chunk-WBETBGSC.js → chunk-K6Y4HBK7.js} +31 -31
- package/dist/{chunk-Z55DXFWS.js → chunk-KAAB2DIV.js} +23 -13
- package/dist/{chunk-UZLR25BW.js → chunk-KF3ZHLHQ.js} +7 -8
- package/dist/{chunk-GELSK76Y.js → chunk-KGS5Z7SL.js} +3 -3
- package/dist/{chunk-E2ZUBP4Q.js → chunk-KIXNHDXS.js} +7 -8
- package/dist/{chunk-7VMEM3LN.js → chunk-KJLH5EHD.js} +26 -26
- package/dist/{chunk-KLIZXSBK.js → chunk-KLQKHA3T.js} +6 -6
- package/dist/chunk-KQ2WZ6BY.js +11 -0
- package/dist/{chunk-DF3XEFQ7.js → chunk-KUMJI5B6.js} +10 -10
- package/dist/{chunk-SE7MJ2LQ.js → chunk-L2XRUG4P.js} +7 -8
- package/dist/{chunk-JYBT2JNY.js → chunk-LE3LSEUL.js} +27 -2
- package/dist/{chunk-75WIUG2W.js → chunk-LFX5BERN.js} +140 -60
- package/dist/{chunk-MJPXHCBW.js → chunk-LGMV7ZV4.js} +4 -4
- package/dist/{chunk-3V62N3Z7.js → chunk-LO3AGGE3.js} +7 -8
- package/dist/{chunk-7KSUMFBK.js → chunk-LSKCKGCF.js} +5 -1
- package/dist/{chunk-NHC2ADGI.js → chunk-LSR3SBJ4.js} +45 -34
- package/dist/{chunk-V634AXDM.js → chunk-LUZ7HXBT.js} +1 -1
- package/dist/{chunk-5PPQIF4D.js → chunk-LW4ZQGVL.js} +2 -2
- package/dist/{chunk-H3IBJQ5A.js → chunk-M2OQK2FO.js} +1 -1
- package/dist/{chunk-4LTN7SND.js → chunk-M74H7QYD.js} +1 -1
- package/dist/{chunk-TXBO2LWM.js → chunk-MOQFYJ3F.js} +6 -6
- package/dist/{chunk-VPL3JYC6.js → chunk-MQ5EKWIG.js} +51 -9
- package/dist/{chunk-X3KCQEYZ.js → chunk-MTCDGSYW.js} +9 -1
- package/dist/{chunk-FCECYJVA.js → chunk-NCCDEUHD.js} +1 -1
- package/dist/{chunk-IGVAWAOK.js → chunk-NIDH22DI.js} +31 -7
- package/dist/{chunk-5DTCOOLU.js → chunk-NINK4G7U.js} +2 -2
- package/dist/{chunk-HHXIVFAU.js → chunk-NO7GRVUU.js} +10 -8
- package/dist/{chunk-X23SZHV5.js → chunk-NRYERHEI.js} +6 -6
- package/dist/{chunk-V5JQQMFQ.js → chunk-O4D27FKH.js} +1 -1
- package/dist/{chunk-I7H5DU34.js → chunk-O7Y6RJ4D.js} +21 -9
- package/dist/{chunk-2NN676RI.js → chunk-OAT6FWKL.js} +7 -8
- package/dist/{chunk-JHWYG7V5.js → chunk-OF7FMGH5.js} +6 -6
- package/dist/{chunk-GLQ3KCTY.js → chunk-OKM5LYYP.js} +7 -8
- package/dist/{chunk-JCIXYOND.js → chunk-OTGNVAI4.js} +2 -2
- package/dist/{chunk-EIL3KHAL.js → chunk-PSYPB22T.js} +3 -3
- package/dist/{chunk-JXBZIJCG.js → chunk-PYGEIPPH.js} +1 -1
- package/dist/{chunk-KZJ5VM6E.js → chunk-PZ3TQFSY.js} +15 -1
- package/dist/{chunk-K3VZ5QJK.js → chunk-Q7VPTN5X.js} +4 -4
- package/dist/{chunk-ZVM5TFGR.js → chunk-QFIRPOXR.js} +6 -2
- package/dist/{chunk-YHD2FZFP.js → chunk-QHPJ5ZKS.js} +6 -6
- package/dist/{chunk-QLANK3VN.js → chunk-QLWUFEKR.js} +6 -6
- package/dist/{chunk-64LJDGJH.js → chunk-QNLESRH6.js} +3 -1
- package/dist/{chunk-RJGCYGC3.js → chunk-QRZESG66.js} +38 -27
- package/dist/{chunk-76Q7E3TM.js → chunk-QYOZ46ZQ.js} +70 -23
- package/dist/{chunk-E555EDOQ.js → chunk-QZMLSK43.js} +221 -62
- package/dist/{chunk-NGA7ICG4.js → chunk-RDJ3ZU6O.js} +16 -13
- package/dist/{chunk-6MJUW5R5.js → chunk-RHBQ2Q5H.js} +95 -44
- package/dist/{chunk-ZYQYX66L.js → chunk-RHVP62HI.js} +6 -6
- package/dist/{chunk-F5BYLT3M.js → chunk-RMVCKO6N.js} +13 -11
- package/dist/chunk-RRPTQGRU.js +47 -0
- package/dist/{chunk-IRXVV65V.js → chunk-S2TSXUYP.js} +6 -6
- package/dist/{chunk-OG2YUVBW.js → chunk-SD6ENKTO.js} +7 -2
- package/dist/{chunk-6AMN7IKJ.js → chunk-SHAAMKN7.js} +43 -22
- package/dist/{chunk-DLUNQHFO.js → chunk-SHCW2TCA.js} +9 -9
- package/dist/{chunk-54ROMBU7.js → chunk-SSZB3VXG.js} +17 -17
- package/dist/chunk-SXAZDIGM.js +84 -0
- package/dist/{chunk-QHRE2M6V.js → chunk-T2L5H2WW.js} +4 -3
- package/dist/{chunk-RPIKNMZA.js → chunk-T3WCDDIL.js} +7 -2
- package/dist/{chunk-JIEVDGAF.js → chunk-T5MBORBK.js} +1 -1
- package/dist/{chunk-32LLDRPI.js → chunk-TDDSWNGD.js} +23 -15
- package/dist/{chunk-7VVHTOE7.js → chunk-TGR6PRKG.js} +2 -2
- package/dist/{chunk-QJWLNP64.js → chunk-TKERVBJ3.js} +7 -8
- package/dist/{chunk-43GGVT7W.js → chunk-TMXRTYGT.js} +10 -4
- package/dist/{chunk-BIVL764T.js → chunk-TQ5HHNM3.js} +2 -2
- package/dist/{chunk-WN3HEU3P.js → chunk-TWRFVW3J.js} +4 -2
- package/dist/{chunk-7FKY6YWU.js → chunk-TXMS7QUJ.js} +3 -3
- package/dist/{chunk-O6ZTIDWB.js → chunk-UBXIGE2P.js} +3 -2
- package/dist/{chunk-JTC5SEAQ.js → chunk-UCIAHSJK.js} +2 -2
- package/dist/{chunk-BVYIKLQ5.js → chunk-UD6U4EF5.js} +1 -1
- package/dist/{chunk-DMAMWUYY.js → chunk-UFZXZJJG.js} +5 -5
- package/dist/{chunk-SNQ7D5R7.js → chunk-UIHGGWES.js} +51 -11
- package/dist/{chunk-27OIGDRK.js → chunk-UP4JSNDR.js} +1 -1
- package/dist/{chunk-JEUL777U.js → chunk-USFIDSTO.js} +7 -5
- package/dist/{chunk-PZ46S2SY.js → chunk-V3UE3TB7.js} +2 -2
- package/dist/{chunk-KDSYZLF6.js → chunk-V5IFI3FV.js} +8 -1
- package/dist/{chunk-BSATR6ZO.js → chunk-V62B23VC.js} +13 -1
- package/dist/{chunk-WWGPTEQB.js → chunk-VFLMBA2M.js} +66 -16
- package/dist/{chunk-5P2TTHBZ.js → chunk-VM5CQ7CG.js} +2 -2
- package/dist/{chunk-UREXN6WG.js → chunk-VMGTNB6H.js} +6 -6
- package/dist/{chunk-2NSQIPAA.js → chunk-VT7PBGL2.js} +6 -6
- package/dist/{chunk-CXETOLPX.js → chunk-VY2NPB2Q.js} +1 -1
- package/dist/{chunk-F77TMAUY.js → chunk-VY67Q6CJ.js} +18 -18
- package/dist/{chunk-7STMIK2X.js → chunk-W5SVS4B6.js} +2 -2
- package/dist/{chunk-MD6DCQMA.js → chunk-W7Q6PLT4.js} +37 -37
- package/dist/{chunk-JVZTKQFS.js → chunk-WDAZ2MT4.js} +8 -4
- package/dist/{chunk-MZACASZY.js → chunk-WE5WVQE4.js} +13 -1
- package/dist/chunk-WJQX7HBH.js +54 -0
- package/dist/{chunk-MS7O3KDJ.js → chunk-WKWCNS6K.js} +6 -6
- package/dist/{chunk-4KQHKPB3.js → chunk-WSKZZ2ZB.js} +11 -12
- package/dist/{chunk-SMHZXHHD.js → chunk-WZB6R2ZX.js} +6 -4
- package/dist/{chunk-37PKNVLS.js → chunk-X5OVVMZX.js} +1 -1
- package/dist/{chunk-MPO5TVGF.js → chunk-XFCBH3TI.js} +3 -3
- package/dist/{chunk-CAJ54IEP.js → chunk-XJUZC53Y.js} +1 -1
- package/dist/chunk-XN7JDII2.js +2047 -0
- package/dist/{chunk-4KMZAK6J.js → chunk-XNV7VOIT.js} +4 -4
- package/dist/{chunk-YK2KWNTU.js → chunk-XR7VOF2V.js} +9 -7
- package/dist/{chunk-WTQAG2OT.js → chunk-XYUXB5VK.js} +8 -3
- package/dist/{chunk-QB5HV4IY.js → chunk-Y5IKCXQR.js} +7 -8
- package/dist/{chunk-FNMH5WEY.js → chunk-Y5WHM2Q5.js} +1 -1
- package/dist/{chunk-IGNBQT23.js → chunk-Y7Q3VEYC.js} +96 -5
- package/dist/{chunk-L6YVK6VC.js → chunk-YB6QGOCO.js} +1 -1
- package/dist/{chunk-BYCJ6TKI.js → chunk-YBYV56FS.js} +3 -3
- package/dist/{chunk-DLDDRXAI.js → chunk-YCUNFAEE.js} +77 -37
- package/dist/{chunk-V7F4F6JA.js → chunk-YFI5PN5O.js} +5 -7
- package/dist/{chunk-ZL6IHMOW.js → chunk-YGPLUENN.js} +88 -58
- package/dist/chunk-YGZEG3JV.js +123 -0
- package/dist/{chunk-JGFHNAHS.js → chunk-YJGFT63R.js} +8 -3
- package/dist/{chunk-XQMYQ4TN.js → chunk-YNHPPZ7S.js} +1 -1
- package/dist/{chunk-EZZ533MH.js → chunk-YO5UKKCQ.js} +1 -1
- package/dist/{chunk-YZZLIYPA.js → chunk-YTEJYLU7.js} +5 -1
- package/dist/{chunk-CCJP6QZO.js → chunk-Z257SH5U.js} +1 -1
- package/dist/{chunk-ETMHDCEH.js → chunk-Z2BDTZDT.js} +13 -11
- package/dist/{chunk-MOK3ZS6P.js → chunk-ZDD3MJ2H.js} +1 -1
- package/dist/{chunk-6364WO5D.js → chunk-ZNX5J7D7.js} +2 -2
- package/dist/{chunk-UZTQUPTB.js → chunk-ZSYU6LIH.js} +4 -4
- package/dist/{chunk-JFFREZGT.js → chunk-ZTSJ7NY6.js} +6 -2
- package/dist/chunk-ZV3SNRJI.js +122 -0
- package/dist/cli/index.js +1 -1
- package/dist/{core-MU4ALRR7.js → core-4M4RY7MX.js} +4 -1
- package/dist/{core-XW7UJFJZ.js → core-4PW4MXWR.js} +4 -1
- package/dist/{core-LB5M7XL4.js → core-5S5CJHBG.js} +5 -1
- package/dist/{core-LGJZUP6H.js → core-7TTM4KRP.js} +6 -1
- package/dist/{core-GSILPKUR.js → core-7XKNJM7Y.js} +4 -1
- package/dist/{core-JDFUZFRH.js → core-A7HXVSKB.js} +5 -1
- package/dist/{core-K3JX5WPM.js → core-AMWCZTOT.js} +2 -1
- package/dist/{core-BLHEJ5OK.js → core-AVA4XLQ2.js} +4 -1
- package/dist/{core-ILPXXC2Z.js → core-BJZEJ63L.js} +5 -1
- package/dist/{core-3KLQSYWB.js → core-CCB3IXGD.js} +4 -1
- package/dist/{core-BBNY2BX4.js → core-D2OIGYC7.js} +2 -1
- package/dist/{core-4RR6VSXM.js → core-DMDAXVMY.js} +3 -1
- package/dist/{core-HDNWVLJW.js → core-EMSJRGSE.js} +4 -1
- package/dist/{core-A5AKUB7H.js → core-FCSA74RT.js} +2 -1
- package/dist/{core-WZ4CHVYL.js → core-FTQBESDS.js} +3 -1
- package/dist/{core-G3LXHW73.js → core-GS4DXDDG.js} +4 -1
- package/dist/{core-H5HO2CED.js → core-JDZDBTID.js} +2 -1
- package/dist/{core-VKZSQFRG.js → core-L3UR75IJ.js} +2 -1
- package/dist/{core-AR2T32Y3.js → core-MAW4S3KA.js} +4 -1
- package/dist/{core-4HFVG4CP.js → core-N2JEWJ7D.js} +3 -1
- package/dist/{core-BOG33BFD.js → core-OBPTBKX6.js} +4 -1
- package/dist/{core-HTD5RHE7.js → core-OFPPRHYY.js} +5 -1
- package/dist/{core-ZLSQHZ3I.js → core-QFAVWFI3.js} +4 -1
- package/dist/{core-TCSW24N6.js → core-QM34237W.js} +4 -1
- package/dist/{core-WJNK7F2J.js → core-SKMHEA4Y.js} +5 -1
- package/dist/{core-7S3XMW5O.js → core-T3OSZOVV.js} +2 -1
- package/dist/{core-7Y5BZZON.js → core-UNX4ZV4M.js} +4 -1
- package/dist/{core-DFZMOO7E.js → core-VRVL6LIM.js} +5 -1
- package/dist/{core-J2JD5ODO.js → core-VT35VDVS.js} +4 -1
- package/dist/{core-TKZZZ6UW.js → core-VWYXK2R3.js} +4 -1
- package/dist/{core-E2XOSHPR.js → core-WNT6ZMRO.js} +5 -1
- package/dist/{core-RR2CAZC5.js → core-WP73P4CW.js} +4 -1
- package/dist/{core-DD62MWEW.js → core-WPEYRK6Y.js} +2 -1
- package/dist/{core-YMXYUGF5.js → core-WXZJ7V7S.js} +2 -1
- package/dist/{core-5UF44NDI.js → core-XKXDXALI.js} +3 -1
- package/dist/{core-GLOZY6Z7.js → core-ZACFV6XR.js} +2 -1
- package/dist/{core-QPSAYRFT.js → core-ZSERZGK6.js} +5 -1
- package/dist/{dataTable-CNDRVGA5.js → dataTable-7IO546LM.js} +10 -2
- package/dist/{engine-FVEIM3WV.js → engine-US3N6UCH.js} +17 -9
- package/dist/fixtures.js +3 -1
- package/dist/fonts.js +1 -1
- package/dist/geo/dach.js +1 -1
- package/dist/geo/de-states.js +1 -1
- package/dist/geo/eu27.js +1 -1
- package/dist/geo/europe.js +1 -1
- package/dist/geo/index.js +2 -2
- package/dist/geo/us-states.js +1 -1
- package/dist/geo/world.js +1 -1
- package/dist/index.js +31 -19
- package/dist/{main-THU6VIVU.js → main-2UWKGUHR.js} +27 -13
- package/dist/mcp/server.js +23 -13
- package/dist/react/bar.js +6 -1
- package/dist/react/bartable.js +8 -1
- package/dist/react/box.js +6 -1
- package/dist/react/bullet.js +7 -1
- package/dist/react/butterfly.js +6 -1
- package/dist/react/choropleth.js +8 -1
- package/dist/react/cohort.js +9 -1
- package/dist/react/column.js +6 -1
- package/dist/react/combo.js +6 -1
- package/dist/react/creative.js +8 -1
- package/dist/react/diagram.js +8 -1
- package/dist/react/dimswitch.js +6 -1
- package/dist/react/dot.js +6 -1
- package/dist/react/export.js +25 -18
- package/dist/react/funnel.js +6 -1
- package/dist/react/gantt.js +7 -1
- package/dist/react/grid.js +5 -1
- package/dist/react/heatmap.js +7 -1
- package/dist/react/histogram.js +6 -1
- package/dist/react/index.js +93 -84
- package/dist/react/kpi.js +7 -1
- package/dist/react/likert.js +6 -1
- package/dist/react/line.js +6 -1
- package/dist/react/mekko.js +6 -1
- package/dist/react/pareto.js +6 -1
- package/dist/react/pie.js +6 -1
- package/dist/react/prepare.js +35 -20
- package/dist/react/pvm.js +7 -1
- package/dist/react/pyramid.js +6 -1
- package/dist/react/sankey.js +8 -1
- package/dist/react/scatter.js +6 -1
- package/dist/react/slope.js +7 -1
- package/dist/react/sparkline.js +7 -1
- package/dist/react/spec.js +17 -11
- package/dist/react/status.js +7 -1
- package/dist/react/story.js +4 -2
- package/dist/react/table.js +6 -1
- package/dist/react/theme.js +8 -3
- package/dist/react/tilemap.js +7 -1
- package/dist/react/treemap.js +7 -1
- package/dist/react/variance.js +6 -1
- package/dist/react/waffle.js +7 -1
- package/dist/react/waterfall.js +7 -1
- package/dist/rows.js +3 -2
- package/dist/{rowsModule-LI6KOS46.js → rowsModule-DYDVHBAX.js} +2 -1
- package/dist/{schema-ZQSIR5UC.js → schema-3KMU5737.js} +1 -1
- package/dist/{schema-YLE4XXQQ.js → schema-4JRNXEZF.js} +3 -1
- package/dist/{schema-KPEPBGAX.js → schema-626QXX4G.js} +3 -1
- package/dist/{schema-72EEMYS3.js → schema-6PL46VXZ.js} +3 -1
- package/dist/{schema-JH57NFXJ.js → schema-6V5K3J2V.js} +4 -1
- package/dist/{schema-H2EC4GAQ.js → schema-A2XUZUCV.js} +3 -1
- package/dist/{schema-QPOBZUAR.js → schema-CNJ4Y6CT.js} +3 -1
- package/dist/{schema-5KDEQBBT.js → schema-DHMMGDTI.js} +3 -1
- package/dist/{schema-BKUFZLLI.js → schema-F2Q6MH7W.js} +3 -1
- package/dist/{schema-PL3EU6EQ.js → schema-FC6J6KZC.js} +5 -1
- package/dist/{schema-AXRDF6ND.js → schema-FGE5YK3S.js} +3 -1
- package/dist/{schema-5DUTAVO7.js → schema-FSYDLMGD.js} +1 -1
- package/dist/{schema-PQZWO3BP.js → schema-G5KSSI5W.js} +1 -1
- package/dist/{schema-25INXAMY.js → schema-GXOG4MXL.js} +1 -1
- package/dist/{schema-AMT7P7KB.js → schema-HEB6ZDI5.js} +3 -1
- package/dist/{schema-HH5HOORE.js → schema-I44IDRGD.js} +1 -1
- package/dist/{schema-VYECMPON.js → schema-IFTIMTS3.js} +1 -1
- package/dist/{schema-QCIE6M2P.js → schema-IUY7VYHJ.js} +3 -1
- package/dist/{schema-M5JBHQIV.js → schema-J4HCSD5C.js} +5 -2
- package/dist/{schema-B2GCEYXD.js → schema-JCU6LTYD.js} +1 -1
- package/dist/{schema-FDFQKIO5.js → schema-JJWORI7D.js} +3 -1
- package/dist/{schema-GNTKL5DN.js → schema-K4V4PYBO.js} +3 -1
- package/dist/{schema-L5U4OROI.js → schema-LGLQBRC4.js} +3 -1
- package/dist/{schema-THXXFY6I.js → schema-MD22QYZU.js} +1 -1
- package/dist/{schema-7NSV542V.js → schema-MGETMQYC.js} +3 -1
- package/dist/{schema-ZG6ZKFRZ.js → schema-MQB6CE5V.js} +3 -1
- package/dist/{schema-OU35XA3Z.js → schema-NMIYKGHE.js} +3 -1
- package/dist/{schema-5ZTGVQAJ.js → schema-NOBNFD2F.js} +3 -1
- package/dist/{schema-MMVPMJEF.js → schema-OXO2XY4Y.js} +1 -1
- package/dist/{schema-LOQ3AFC7.js → schema-PHIHMDVB.js} +1 -1
- package/dist/{schema-ZEVJMFLV.js → schema-UXWKA3PI.js} +3 -1
- package/dist/{schema-GN6GAIU5.js → schema-WBOPCTPC.js} +1 -1
- package/dist/{schema-BBTXTWYI.js → schema-WFGDVBJK.js} +1 -1
- package/dist/{schema-J7TNCZIP.js → schema-WX2RS4OU.js} +3 -1
- package/dist/{schema-QORUB6EK.js → schema-XIHAKX3B.js} +18 -1
- package/dist/{schema-R5Y6NVBH.js → schema-XRSORYBI.js} +3 -1
- package/dist/{schema-CGQID64D.js → schema-YDZCGL56.js} +3 -1
- package/dist/{specValidation-VHLGDEME.js → specValidation-XGELWQUU.js} +2 -1
- package/dist/theme.js +5 -1
- package/dist/types/core/charts/bartable/types.d.ts +14 -1
- package/dist/types/core/charts/box/types.d.ts +3 -1
- package/dist/types/core/charts/choropleth/layout.d.ts +1 -5
- package/dist/types/core/charts/choropleth/types.d.ts +19 -0
- package/dist/types/core/charts/cohort/types.d.ts +16 -3
- package/dist/types/core/charts/creative/types.d.ts +21 -0
- package/dist/types/core/charts/dimswitch/compile.d.ts +15 -2
- package/dist/types/core/charts/dimswitch/types.d.ts +24 -1
- package/dist/types/core/charts/gantt/calendar.d.ts +20 -0
- package/dist/types/core/charts/gantt/columns.d.ts +56 -0
- package/dist/types/core/charts/gantt/layout.d.ts +8 -2
- package/dist/types/core/charts/gantt/model.d.ts +296 -0
- package/dist/types/core/charts/grid/metricStack.d.ts +9 -0
- package/dist/types/core/charts/grid/metricStackSchema.d.ts +13 -0
- package/dist/types/core/charts/histogram/types.d.ts +8 -0
- package/dist/types/core/charts/likert/layout.d.ts +10 -8
- package/dist/types/core/charts/pvm/types.d.ts +9 -1
- package/dist/types/core/charts/pyramid/types.d.ts +3 -1
- package/dist/types/core/charts/sankey/types.d.ts +5 -1
- package/dist/types/core/charts/status/layout.d.ts +3 -0
- package/dist/types/core/charts/table/resolve.d.ts +14 -0
- package/dist/types/core/footer.d.ts +2 -0
- package/dist/types/core/formatSpec.d.ts +10 -0
- package/dist/types/core/frame.d.ts +1 -1
- package/dist/types/core/geo/types.d.ts +2 -0
- package/dist/types/core/geometry.d.ts +1 -1
- package/dist/types/core/normalize/shared.d.ts +2 -0
- package/dist/types/core/registry.d.ts +4 -5
- package/dist/types/core/request.d.ts +6 -0
- package/dist/types/core/schema/capability.d.ts +20 -7
- package/dist/types/core/schema/generatedColumns.d.ts +168 -0
- package/dist/types/core/text.d.ts +16 -0
- package/dist/types/core/themeGeometry.d.ts +9 -0
- package/dist/types/core/timeAxis.d.ts +6 -1
- package/dist/types/core/types/diagram.d.ts +7 -0
- package/dist/types/core/types/options.d.ts +83 -12
- package/dist/types/core/types/table.d.ts +21 -3
- package/dist/types/index.d.ts +2 -0
- package/dist/types/react/barrelCharts.d.ts +16 -5
- package/dist/types/react/charts/butterfly.d.ts +2 -2
- package/dist/types/react/charts/dot.d.ts +7 -1
- package/dist/types/react/charts/pareto.d.ts +4 -1
- package/dist/types/react/charts/variance.d.ts +3 -1
- package/dist/types/react/hover/labelCard.d.ts +11 -2
- package/dist/types/react/prepare.d.ts +7 -1
- package/dist/types/theme.d.ts +2 -0
- package/dist/validate.js +15 -5
- package/docs/manual.md +31 -3
- package/docs/reference/bar.md +3 -0
- package/docs/reference/bartable.md +16 -1
- package/docs/reference/box.md +8 -1
- package/docs/reference/bullet.md +12 -1
- package/docs/reference/butterfly.md +7 -1
- package/docs/reference/choropleth.md +14 -1
- package/docs/reference/cohort.md +25 -5
- package/docs/reference/column.md +1 -0
- package/docs/reference/combo.md +1 -0
- package/docs/reference/creative.md +13 -0
- package/docs/reference/diagram.md +5 -0
- package/docs/reference/dimswitch.md +50 -32
- package/docs/reference/dot.md +7 -2
- package/docs/reference/fixtures.md +57 -0
- package/docs/reference/funnel.md +5 -0
- package/docs/reference/gantt.md +10 -2
- package/docs/reference/grid.md +9 -2
- package/docs/reference/heatmap.md +6 -0
- package/docs/reference/histogram.md +2 -2
- package/docs/reference/kpi.md +5 -1
- package/docs/reference/likert.md +8 -0
- package/docs/reference/options.md +4 -3
- package/docs/reference/pareto.md +1 -1
- package/docs/reference/pvm.md +7 -1
- package/docs/reference/pyramid.md +6 -0
- package/docs/reference/react.md +1 -2
- package/docs/reference/sankey.md +6 -2
- package/docs/reference/slope.md +6 -0
- package/docs/reference/sparkline.md +1 -1
- package/docs/reference/status.md +7 -1
- package/docs/reference/table.md +16 -4
- package/docs/reference/tilemap.md +1 -1
- package/docs/reference/treemap.md +1 -1
- package/docs/reference/waffle.md +1 -1
- package/docs/reference/waterfall.md +4 -1
- package/package.json +1 -1
- package/dist/chunk-FG5L2LUK.js +0 -89
- package/dist/chunk-IFQN4GKK.js +0 -1852
- package/dist/chunk-O36WX56O.js +0 -13
- package/dist/chunk-WIVFIVFZ.js +0 -27
- package/dist/chunk-ZWNRLIFT.js +0 -24
|
@@ -1,36 +1,43 @@
|
|
|
1
1
|
import {
|
|
2
2
|
liftOrFallback
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZNX5J7D7.js";
|
|
4
|
+
import {
|
|
5
|
+
nameTrackRefusals,
|
|
6
|
+
overrideIgnored,
|
|
7
|
+
widthCapped,
|
|
8
|
+
widthFloored,
|
|
9
|
+
yieldingWidths
|
|
10
|
+
} from "./chunk-YGZEG3JV.js";
|
|
4
11
|
import {
|
|
5
12
|
fixedBarRow
|
|
6
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ED7GLWTF.js";
|
|
7
14
|
import {
|
|
8
15
|
roundingUnavailable,
|
|
9
16
|
shareRoundingNotes,
|
|
10
17
|
sumConsistentShares
|
|
11
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IFURKTOL.js";
|
|
12
19
|
import {
|
|
13
20
|
accumulateStack
|
|
14
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-USFIDSTO.js";
|
|
15
22
|
import {
|
|
16
23
|
digitSeat,
|
|
17
24
|
digitSeatEdge
|
|
18
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5HTGSB6Y.js";
|
|
19
26
|
import {
|
|
20
27
|
warnIncompleteComposition
|
|
21
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-I3DLERI7.js";
|
|
22
29
|
import {
|
|
23
30
|
rowLabelBand
|
|
24
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-PSYPB22T.js";
|
|
25
32
|
import {
|
|
26
33
|
fittedLabel
|
|
27
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-XFCBH3TI.js";
|
|
28
35
|
import {
|
|
29
36
|
chartPalette
|
|
30
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-IW3YUMPI.js";
|
|
31
38
|
import {
|
|
32
39
|
yearSpanFromLabels
|
|
33
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-3LNVEE5Z.js";
|
|
34
41
|
import {
|
|
35
42
|
structureCount
|
|
36
43
|
} from "./chunk-XCROSJ2Z.js";
|
|
@@ -41,10 +48,13 @@ import {
|
|
|
41
48
|
headRule,
|
|
42
49
|
totalGround,
|
|
43
50
|
totalRule
|
|
44
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-I4NUYVP5.js";
|
|
45
52
|
import {
|
|
46
53
|
tableRuleInk
|
|
47
54
|
} from "./chunk-Z2MGTKDR.js";
|
|
55
|
+
import {
|
|
56
|
+
generatedIdWarnings
|
|
57
|
+
} from "./chunk-SXAZDIGM.js";
|
|
48
58
|
import {
|
|
49
59
|
CARD_CLASS_WIDTH,
|
|
50
60
|
calendarCategories,
|
|
@@ -53,7 +63,7 @@ import {
|
|
|
53
63
|
heightOmitted,
|
|
54
64
|
rowDrivenHeight,
|
|
55
65
|
rowSizing
|
|
56
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-AFGQXMKT.js";
|
|
57
67
|
import {
|
|
58
68
|
PRIORITY,
|
|
59
69
|
authoredNotes,
|
|
@@ -69,17 +79,17 @@ import {
|
|
|
69
79
|
normalizeLegendOption,
|
|
70
80
|
solveFrame,
|
|
71
81
|
solveLabels
|
|
72
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-WSKZZ2ZB.js";
|
|
73
83
|
import {
|
|
74
84
|
disclosureNote,
|
|
75
85
|
footerType,
|
|
76
86
|
quietMethodNote
|
|
77
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-WZB6R2ZX.js";
|
|
78
88
|
import {
|
|
79
89
|
nonAdditiveFormat,
|
|
80
90
|
roundedNumber,
|
|
81
91
|
seriesRasterFormatter
|
|
82
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-D3PQAVFW.js";
|
|
83
93
|
import {
|
|
84
94
|
cagr,
|
|
85
95
|
chartStrings,
|
|
@@ -104,14 +114,14 @@ import {
|
|
|
104
114
|
textScaleOf,
|
|
105
115
|
themeForWidth,
|
|
106
116
|
withSegmentSeams
|
|
107
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-JARJP576.js";
|
|
108
118
|
import {
|
|
109
119
|
NormalizeError,
|
|
110
120
|
TARGET_SIZE,
|
|
111
121
|
accessibleTitle,
|
|
112
122
|
resolveSize,
|
|
113
123
|
resolveSubtitle
|
|
114
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-FX5VZK5F.js";
|
|
115
125
|
import {
|
|
116
126
|
maxOf,
|
|
117
127
|
minOf,
|
|
@@ -120,7 +130,7 @@ import {
|
|
|
120
130
|
import {
|
|
121
131
|
defaultMeasurer,
|
|
122
132
|
splitNameBreaks
|
|
123
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-UIHGGWES.js";
|
|
124
134
|
|
|
125
135
|
// src/core/strings/bartable.ts
|
|
126
136
|
var EN = {
|
|
@@ -370,6 +380,36 @@ function combinedShareNotes(options, rows, panels, locale, authored) {
|
|
|
370
380
|
return [disclosureNote(chartString(options, "combinedShareRangeNote", { v1: label, v2: entry.fmt(lowPart), v3: entry.fmt(lowWhole), v4: unit, v5: name, v6: pct(lowPart, lowWhole), v7: entry.fmt(highPart), v8: entry.fmt(highWhole), v9: pct(highPart, highWhole) }))];
|
|
371
381
|
});
|
|
372
382
|
}
|
|
383
|
+
function alignedIn(left, right, w, align) {
|
|
384
|
+
return align === "right" ? right - w : Math.min(align === "left" ? left : left + (right - left - w) / 2, right - w);
|
|
385
|
+
}
|
|
386
|
+
function columnKeyWarnings(data, options, compact, sharedScale) {
|
|
387
|
+
let warnings = [], panelIds = data.panels.map((panel) => panel.id), columnIds = (data.columns ?? []).map((column) => column.id), overrides = options.columnOverrides ?? {};
|
|
388
|
+
pushAll(warnings, generatedIdWarnings("bartable", "columnOverrides", options.columnOverrides, ["label", ...columnIds, ...panelIds])), pushAll(warnings, generatedIdWarnings("bartable", "columnOrder", options.columnOrder, [...columnIds.length > 0 ? ["numbers"] : [], "panels"])), pushAll(warnings, nameTrackRefusals(overrides, [...columnIds, ...panelIds]));
|
|
389
|
+
for (let id of panelIds)
|
|
390
|
+
if (overrides[id]?.width !== void 0 && sharedScale ? warnings.push(overrideIgnored(id, "width", "under sharedScale or a cascade the one scale sets the panel width")) : overrides[id]?.width !== void 0 && compact && warnings.push(overrideIgnored(id, "width", "the compact form draws each panel across the whole width")), compact && panelIds.length > 1) for (let key of ["headAlign", "align"]) overrides[id]?.[key] !== void 0 && warnings.push(overrideIgnored(id, key, "the compact form names several panels in a key"));
|
|
391
|
+
if (compact) {
|
|
392
|
+
for (let key of ["width", "align"]) overrides.label?.[key] !== void 0 && warnings.push(overrideIgnored("label", key, "the compact form sets each row name above its bar"));
|
|
393
|
+
options.columnOrder !== void 0 && warnings.push({ code: "option-ignored", severity: "warn", field: ["options", "columnOrder"], message: "columnOrder has no effect: the compact form keeps the number columns at the right edge", suggest: "Remove columnOrder, or draw the chart wider.", fix: [{ op: "remove", path: "/options/columnOrder" }] });
|
|
394
|
+
}
|
|
395
|
+
if (options.total === !1 && options.totalPosition !== void 0 && warnings.push({ code: "option-ignored", severity: "warn", field: ["options", "totalPosition"], message: "totalPosition has no effect: total is false, so no Total row is drawn", suggest: "Remove totalPosition, or set total to true.", fix: [{ op: "remove", path: "/options/totalPosition" }] }), options.columnHeads === !1) {
|
|
396
|
+
let units = [...new Set(data.panels.flatMap((panel) => panel.unit ?? []))];
|
|
397
|
+
units.length > 0 && warnings.push({
|
|
398
|
+
code: "column-heads-unit-hidden",
|
|
399
|
+
severity: "warn",
|
|
400
|
+
field: ["options", "columnHeads"],
|
|
401
|
+
message: `columnHeads: false removes the only print of the unit ${units.join(", ")}`,
|
|
402
|
+
suggest: "Name the unit in the subtitle or a footnote."
|
|
403
|
+
}), panelIds.length + columnIds.length > 1 && warnings.push({
|
|
404
|
+
code: "column-heads-names-hidden",
|
|
405
|
+
severity: "warn",
|
|
406
|
+
field: ["options", "columnHeads"],
|
|
407
|
+
message: "columnHeads: false removes the only names of the number columns and panels",
|
|
408
|
+
suggest: "Name them in the subtitle or a footnote, or keep the heads."
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
return warnings;
|
|
412
|
+
}
|
|
373
413
|
var CASCADE_LIFT = /* @__PURE__ */ Symbol("bartableCascadeLift");
|
|
374
414
|
function layoutBarTable(authored, options = {}) {
|
|
375
415
|
if (options.variant !== "cascade" || options[CASCADE_LIFT] !== void 0) return layoutBarTableOnce(authored, options);
|
|
@@ -387,7 +427,7 @@ function layoutBarTableOnce(authored, options) {
|
|
|
387
427
|
throw new NormalizeError("bartable-cascade", "options.segmentValues", "segmentValues sets the part values of variant 'panels', and a cascade bar is one part that prints its own value", "set variant 'panels', or drop segmentValues");
|
|
388
428
|
let cascadeOptions = options.variant === "cascade" ? options.cascade ?? {} : void 0;
|
|
389
429
|
cascadeOptions && checkCascade(split.data, cascadeOptions.growth);
|
|
390
|
-
let warnings = [], data = withAggregates(split.data, options, warnings);
|
|
430
|
+
let warnings = [], data = withAggregates(split.data, options, warnings), overrides = options.columnOverrides ?? {}, headsDrawn = options.columnHeads !== !1, valuesPrinted = options.labels?.point !== !1;
|
|
391
431
|
if (options.rounding === "sum-consistent" && cascadeOptions?.share === !1 && !options.combinedShare && cascadeOptions.growth?.measure !== "share-change")
|
|
392
432
|
throw new NormalizeError("bartable-rounding", "options.rounding", "rounding 'sum-consistent' sets how the share columns print, and this table prints none", "set cascade.share on, or drop options.rounding");
|
|
393
433
|
if (options.rounding === "sum-consistent" && !cascadeOptions)
|
|
@@ -422,7 +462,7 @@ function layoutBarTableOnce(authored, options) {
|
|
|
422
462
|
], { fmt, spec } = seriesRasterFormatter(panel.format ?? options.format, raster, locale, panel.unit, options.target), endTexts = rowSums.map((sum, r) => {
|
|
423
463
|
let end = ranges[r];
|
|
424
464
|
return sum === null ? stateGlyph[blankState(panel, r) ?? "none"] : end ? range(fmt(end.low), fmt(end.high)) : fmt(sum);
|
|
425
|
-
}), totalText = total === void 0 ? void 0 : total === null ? glyph : typeof total == "number" ? fmt(total) : range(fmt(total.low), fmt(total.high)), label2 = panel.label ?? panel.id, repeatsSubtitle = data.panels.length === 1 && panel.unit !== void 0 && label2.trim().toLowerCase() === (resolveSubtitle(options.subtitle)?.measure ?? "").trim().toLowerCase();
|
|
465
|
+
}), totalText = total === void 0 ? void 0 : total === null ? glyph : typeof total == "number" ? fmt(total) : range(fmt(total.low), fmt(total.high)), label2 = panel.label ?? panel.id, headOverride = overrides[panel.id]?.label, repeatsSubtitle = headOverride === void 0 && data.panels.length === 1 && panel.unit !== void 0 && label2.trim().toLowerCase() === (resolveSubtitle(options.subtitle)?.measure ?? "").trim().toLowerCase();
|
|
426
466
|
return {
|
|
427
467
|
panel,
|
|
428
468
|
stacks,
|
|
@@ -434,10 +474,10 @@ function layoutBarTableOnce(authored, options) {
|
|
|
434
474
|
spec,
|
|
435
475
|
endTexts,
|
|
436
476
|
totalText,
|
|
437
|
-
head: repeatsSubtitle ? panel.unit : panel.unit ? `${label2}, ${panel.unit}` : label2,
|
|
477
|
+
head: headOverride ?? (repeatsSubtitle ? panel.unit : panel.unit ? `${label2}, ${panel.unit}` : label2),
|
|
438
478
|
// A period panel (cascade, or a year alone) heads with a category value and keeps its case and face;
|
|
439
479
|
// a unit alone keeps its case.
|
|
440
|
-
fieldHead: !repeatsSubtitle && cascadeOptions === void 0 && !isNumberAlone(label2),
|
|
480
|
+
fieldHead: !repeatsSubtitle && cascadeOptions === void 0 && !isNumberAlone(headOverride ?? label2),
|
|
441
481
|
unitHead: repeatsSubtitle,
|
|
442
482
|
max: Math.max(0, maxOf(stacks.map((stack, r) => ranges[r]?.high ?? stack.positive)))
|
|
443
483
|
};
|
|
@@ -478,7 +518,7 @@ function layoutBarTableOnce(authored, options) {
|
|
|
478
518
|
lift: options[CASCADE_LIFT] ?? "full"
|
|
479
519
|
}) : void 0;
|
|
480
520
|
cascade && pushAll(warnings, cascade.warnings);
|
|
481
|
-
let showShare = cascadeOptions !== void 0 && cascadeOptions.share !== !1, margin = { ...canvasMargin(theme, size.width), ...options.margin }, noteFont = { family: theme.type.family, ...footerType(theme.type.footnote, options.target, textScaleOf(options)) }, noteW = Math.max(1, size.width - (margin.left ?? 0) - (margin.right ?? 0)), partsPrinted = panels.map((entry) => !cascade && series.length > 1 && options.segmentValues !== !1 && entry.spec.decimals <= PART_DECIMALS), partsMissTotal = panels.some((entry, p) => partsPrinted[p] && entry.rowSums.some((sum, r) => {
|
|
521
|
+
let showShare = cascadeOptions !== void 0 && cascadeOptions.share !== !1, margin = { ...canvasMargin(theme, size.width), ...options.margin }, noteFont = { family: theme.type.family, ...footerType(theme.type.footnote, options.target, textScaleOf(options)) }, noteW = Math.max(1, size.width - (margin.left ?? 0) - (margin.right ?? 0)), partsPrinted = panels.map((entry) => !cascade && series.length > 1 && options.segmentValues !== !1 && valuesPrinted && entry.spec.decimals <= PART_DECIMALS), partsMissTotal = panels.some((entry, p) => partsPrinted[p] && entry.rowSums.some((sum, r) => {
|
|
482
522
|
if (sum === null || entry.ranges[r]) return !1;
|
|
483
523
|
let rounded = series.reduce((acc, s) => acc + roundedNumber(Math.max(0, entry.panel.values[s.id]?.[r] ?? 0), entry.spec), 0);
|
|
484
524
|
return Math.abs(rounded - roundedNumber(sum, entry.spec)) > 1e-9 * Math.max(1, Math.abs(sum));
|
|
@@ -518,43 +558,72 @@ function layoutBarTableOnce(authored, options) {
|
|
|
518
558
|
measure
|
|
519
559
|
},
|
|
520
560
|
occupied
|
|
521
|
-
), plot = frame.plot, cellFont = { family: theme.type.family, ...theme.type.label }, headFont = { ...cellFont, ...theme.type.axis }, fieldFont = fieldHeadFont(theme), fieldText = (text) => fieldHeadText(text, theme), totalFont = { ...cellFont, weight: tableEmphasis(theme) }, width = (text, font) => measure(text, font).width, compact = options.mode === "compact"
|
|
561
|
+
), plot = frame.plot, cellFont = { family: theme.type.family, ...theme.type.label }, headFont = { ...cellFont, ...theme.type.axis }, fieldFont = fieldHeadFont(theme), fieldText = (text) => fieldHeadText(text, theme), totalFont = { ...cellFont, weight: tableEmphasis(theme) }, width = (text, font) => measure(text, font).width, compact = options.mode === "compact";
|
|
562
|
+
pushAll(warnings, columnKeyWarnings(data, options, compact, sharedScale || cascadeOptions !== void 0));
|
|
563
|
+
let interleaved = compact && panels.length > 1, fitRows = (maxW, lines) => {
|
|
522
564
|
let fit = (w, n) => rowLabelBand(rows, cellFont, w, n, lineBox(cellFont), measure, { target: options.target, typeRole: "label", breakAfter: !0 }), cut = (band2) => band2.labels.some((label2) => label2.title !== void 0), pieces = (label2) => label2.split(/\s+/).flatMap(splitNameBreaks), band = fit(maxW, lines), most = Math.max(lines, maxOf(rows.map((row) => pieces(row.label).length)));
|
|
523
565
|
for (let n = lines + 1; cut(band) && n <= most; n++) band = fit(maxW, n);
|
|
524
566
|
return cut(band) && (band = fit(Math.max(maxW, maxOf(rows.flatMap((row) => pieces(row.label).map((word) => width(word, cellFont))))), most)), band;
|
|
525
|
-
},
|
|
526
|
-
let
|
|
567
|
+
}, panelsFirst = !compact && (() => {
|
|
568
|
+
let order = options.columnOrder ?? [], at = (id) => {
|
|
569
|
+
let i = order.indexOf(id);
|
|
570
|
+
return i < 0 ? id === "numbers" ? order.length : order.length + 1 : i;
|
|
571
|
+
};
|
|
572
|
+
return at("panels") < at("numbers");
|
|
573
|
+
})(), weights = panels.map((entry) => entry.panel.weight ?? 1), weightSum = weights.reduce((sum, weight) => sum + weight, 0), endReserves = panels.map((entry) => {
|
|
574
|
+
let texts2 = valuesPrinted ? entry.endTexts : entry.endTexts.filter((_, r) => entry.rowSums[r] === null);
|
|
575
|
+
return texts2.length === 0 ? 0 : maxOf(texts2.map((text) => width(text, cellFont))) + END_GAP;
|
|
576
|
+
}), totalWidths = panels.map((entry) => showTotal && entry.totalText !== void 0 ? width(entry.totalText, totalFont) : 0), shareHead = fieldText(options.strings?.share ?? chartString(options, "shareHeading")), shareWs = panels.map((_, p) => showShare ? Math.max(headsDrawn ? width(shareHead, fieldFont) : 0, maxOf(cascade.panels[p].shareTexts.map((text) => width(text, cellFont)))) : 0), bracketWs = panels.map((_, p) => {
|
|
577
|
+
let combined = cascade?.panels[p].combined;
|
|
578
|
+
return combined ? BRACKET_GAP + BRACKET_ARM + BRACKET_TEXT_GAP + width(combined.text, totalFont) : 0;
|
|
579
|
+
}), growth = cascade?.growth, growthHead = growth ? fieldText(growth.head) : "", growthOverhang = !compact && !(panelsFirst && numberColumns.length > 0) ? bracketWs[panels.length - 1] : 0, growthInner = growth ? Math.max(maxOf(growth.texts.map((text, r) => width(text, r === rows.length ? totalFont : cellFont))), ...interleaved || growthOverhang > 0 || !headsDrawn ? [] : growthHead.split(/\s+/).map((word) => width(word, fieldFont))) : 0, growthFit = (w) => fitText(growthHead, fieldFont, w, 3, measure, { target: options.target, typeRole: "axis" });
|
|
580
|
+
for (; growth && headsDrawn && !interleaved && growthFit(growthInner + growthOverhang).title !== void 0 && growthInner < width(growthHead, fieldFont); ) growthInner += 4;
|
|
581
|
+
let growthW = growth ? PANEL_GAP + growthInner : 0, extras = panels.map((_, p) => PANEL_GAP + (cascade ? (showShare ? SHARE_GAP + shareWs[p] : 0) + bracketWs[p] : endReserves[p])), spans = panels.map((entry) => cascade ? cascade.panels[panels.indexOf(entry)].total : entry.max), extrasSum = extras.reduce((sum, w) => sum + w, 0), spanSum = spans.reduce((sum, v) => sum + v, 0), minTracks = panels.map((entry, p) => cascade ? Math.max(MIN_TRACK, ...(headsDrawn ? entry.head.split(/\s+/) : []).map((word) => width(word, headFont)), totalWidths[p] + 2 * END_GAP) : Math.max(MIN_RUN, totalWidths[p] - endReserves[p])), panelsW = sharedScale ? extrasSum + maxOf(minTracks.map((min, p) => spans[p] > 0 ? min / spans[p] : 0)) * spanSum : cascade ? Math.max(extrasSum + minTracks.reduce((sum, w) => sum + w, 0), maxOf(panels.map((_, p) => (extras[p] + minTracks[p]) * weightSum / weights[p]))) : panels.reduce((sum, _entry, p) => sum + PANEL_GAP + Math.max((panels.length > 1 ? PREFERRED_RUN : MIN_RUN) + endReserves[p], totalWidths[p]), 0), words = (label2) => label2.split(/\s+/).flatMap(splitNameBreaks), labelWidth = compact ? void 0 : overrides.label?.width, valueFloor = (entry) => CELL_AIR + Math.max(
|
|
582
|
+
maxOf(entry.texts.map((text) => width(text, cellFont))),
|
|
583
|
+
showTotal && entry.totalText !== void 0 ? width(entry.totalText, totalFont) : 0
|
|
584
|
+
), labelRoom = plot.w - growthW - panelsW - numberColumns.reduce((sum, entry) => sum + valueFloor(entry), 0), { labels: rowText, width: rowBandW } = compact ? { labels: [], width: 0 } : fitRows(labelWidth === void 0 ? plot.w * 0.3 : Math.max(1, Math.min(labelWidth, labelRoom) - LABEL_GAP), 3), labelFloor = Math.max(rowBandW, showTotal ? width(totalLabel, totalFont) : 0) + LABEL_GAP;
|
|
585
|
+
labelWidth !== void 0 && labelWidth > Math.max(labelRoom, labelFloor) && warnings.push(widthCapped("bartable", "label")), labelWidth !== void 0 && labelWidth < labelFloor && warnings.push(widthFloored("bartable", "label"));
|
|
586
|
+
let labelTrack = compact ? 0 : labelWidth === void 0 ? labelFloor : Math.max(labelFloor, Math.min(labelWidth, labelRoom)), labelTrackFloor = labelWidth === void 0 ? labelTrack : Math.max(maxOf(rows.flatMap((row) => words(row.label).map((word) => width(word, cellFont)))), showTotal ? width(totalLabel, totalFont) : 0) + LABEL_GAP, x = plot.x + labelTrack, numberNaturals = numberColumns.map((entry, i) => {
|
|
587
|
+
let name = overrides[entry.column.id]?.label ?? entry.column.label ?? entry.column.id, head2 = fieldText(name), overhang = i === 0 && !compact && !panelsFirst && headsDrawn ? labelTrack : 0, inner = Math.max(
|
|
527
588
|
maxOf(entry.texts.map((text) => width(text, cellFont))),
|
|
528
589
|
showTotal && entry.totalText !== void 0 ? width(entry.totalText, totalFont) : 0,
|
|
529
|
-
...overhang > 0 ? [] : head2.split(/\s+/).map((word) => width(word, fieldFont))
|
|
590
|
+
...overhang > 0 || !headsDrawn ? [] : head2.split(/\s+/).map((word) => width(word, fieldFont))
|
|
530
591
|
), headFitAt = (w) => fitText(head2, fieldFont, w, 3, measure, { target: options.target, typeRole: "axis" });
|
|
531
|
-
for (; (overhang > 0 || interleaved && cascade?.growth) && headFitAt(inner + overhang).title !== void 0 && inner < width(head2, fieldFont); ) inner += 4;
|
|
532
|
-
|
|
592
|
+
for (; headsDrawn && (overhang > 0 || interleaved && cascade?.growth) && headFitAt(inner + overhang).title !== void 0 && inner < width(head2, fieldFont); ) inner += 4;
|
|
593
|
+
return { entry, name, head: head2, overhang, inner, headFitAt };
|
|
594
|
+
}), numberSurplus = numberNaturals.map((natural) => {
|
|
595
|
+
let asked = overrides[natural.entry.column.id]?.width;
|
|
596
|
+
return asked !== void 0 && asked < CELL_AIR + natural.inner && warnings.push(widthFloored("bartable", natural.entry.column.id)), asked === void 0 ? 0 : Math.max(0, asked - CELL_AIR - natural.inner);
|
|
597
|
+
}), numberSurplusSum = numberSurplus.reduce((sum, value) => sum + value, 0), numberRoom = Math.max(0, plot.w - growthW - (compact ? LABEL_GAP + MIN_COMPACT_LABEL : labelTrack + panelsW) - numberNaturals.reduce((sum, natural) => sum + CELL_AIR + natural.inner, 0)), numberScale = numberSurplusSum > numberRoom ? numberRoom / numberSurplusSum : 1, numberTracks = numberNaturals.map(({ entry, name, head: head2, overhang, inner: natural, headFitAt }, i) => {
|
|
598
|
+
numberScale < 1 && numberSurplus[i] > 0 && warnings.push(widthCapped("bartable", entry.column.id));
|
|
599
|
+
let inner = numberSurplus[i] > 0 ? natural + numberSurplus[i] * numberScale : natural, track = { ...entry, name, head: head2, inner, headFit: headFitAt(inner + overhang), right: x + CELL_AIR + inner };
|
|
533
600
|
return x += CELL_AIR + inner, track;
|
|
534
|
-
}), fixedW = x - plot.x,
|
|
535
|
-
let combined = cascade?.panels[p].combined;
|
|
536
|
-
return combined ? BRACKET_GAP + BRACKET_ARM + BRACKET_TEXT_GAP + width(combined.text, totalFont) : 0;
|
|
537
|
-
}), growth = cascade?.growth, growthHead = growth ? fieldText(growth.head) : "", growthOverhang = compact ? 0 : bracketWs[panels.length - 1], growthInner = growth ? Math.max(maxOf(growth.texts.map((text, r) => width(text, r === rows.length ? totalFont : cellFont))), ...interleaved || growthOverhang > 0 ? [] : growthHead.split(/\s+/).map((word) => width(word, fieldFont))) : 0, growthFit = (w) => fitText(growthHead, fieldFont, w, 3, measure, { target: options.target, typeRole: "axis" });
|
|
538
|
-
for (; growth && !interleaved && growthFit(growthInner + growthOverhang).title !== void 0 && growthInner < width(growthHead, fieldFont); ) growthInner += 4;
|
|
539
|
-
let growthW = growth ? PANEL_GAP + growthInner : 0, sideW = compact ? fixedW + growthW : 0;
|
|
601
|
+
}), fixedW = x - plot.x, minFixedW = labelWidth === void 0 && numberSurplusSum === 0 ? fixedW : labelTrackFloor + numberNaturals.reduce((sum, natural) => sum + CELL_AIR + natural.inner, 0), sideW = compact ? fixedW + growthW : 0, minSideW = compact ? minFixedW + growthW : 0;
|
|
540
602
|
compact && (numberTracks.forEach((track) => {
|
|
541
603
|
track.right += plot.w - sideW;
|
|
542
604
|
}), { labels: rowText } = fitRows(Math.max(MIN_COMPACT_LABEL, plot.w - sideW - LABEL_GAP), 2));
|
|
543
|
-
let
|
|
544
|
-
let
|
|
605
|
+
let compactW = plot.w - (cascade ? sideW : 0), restW = Math.max(0, plot.w - fixedW - growthW), sharedK = spanSum > 0 ? Math.max(0, restW - extrasSum) / spanSum : 0, compactK = minOf(spans.map((span, p) => span > 0 ? Math.max(0, compactW - extras[p] + PANEL_GAP) / span : 1 / 0)), runFloors = panels.map((_, p) => Math.max(PREFERRED_RUN, totalWidths[p] - endReserves[p])), panelWidth = (p) => compact || sharedScale || cascade ? void 0 : overrides[panels[p].panel.id]?.width, runRoom = Math.max(0, restW - panels.reduce((sum, _entry, p) => sum + PANEL_GAP + endReserves[p], 0)), runSurplus = panels.map((entry, p) => {
|
|
606
|
+
let asked = panelWidth(p);
|
|
607
|
+
return asked !== void 0 && asked < PANEL_GAP + endReserves[p] + runFloors[p] && warnings.push(widthFloored("bartable", entry.panel.id)), asked === void 0 ? 0 : Math.max(0, asked - PANEL_GAP - endReserves[p] - runFloors[p]);
|
|
608
|
+
}), runSurplusSum = runSurplus.reduce((sum, value) => sum + value, 0), runSpare = Math.max(0, runRoom - runFloors.reduce((sum, floor) => sum + floor, 0)), runScale = runSurplusSum > runSpare ? runSpare / runSurplusSum : 1;
|
|
609
|
+
panels.forEach((entry, p) => {
|
|
610
|
+
runScale < 1 && runSurplus[p] > 0 && warnings.push(widthCapped("bartable", entry.panel.id));
|
|
611
|
+
});
|
|
612
|
+
let heldRun = (p) => runFloors[p] + runSurplus[p] * runScale, ownRuns = (() => {
|
|
613
|
+
let total = runRoom, held = new Set(panels.flatMap((_, p) => panelWidth(p) === void 0 ? [] : [p])), runs = panels.map(() => 0);
|
|
545
614
|
for (let pass = 0; pass <= panels.length; pass++) {
|
|
546
|
-
let free = total - [...held].reduce((sum, p) => sum +
|
|
547
|
-
runs = panels.map((_entry, p) => held.has(p) ?
|
|
615
|
+
let free = total - [...held].reduce((sum, p) => sum + heldRun(p), 0), freeWeight = weights.reduce((sum, weight, p) => held.has(p) ? sum : sum + weight, 0);
|
|
616
|
+
runs = panels.map((_entry, p) => held.has(p) ? heldRun(p) : freeWeight > 0 ? Math.max(0, free) * weights[p] / freeWeight : 0);
|
|
548
617
|
let low = panels.map((_entry, p) => p).filter((p) => !held.has(p) && runs[p] < runFloors[p] - 1e-9);
|
|
549
618
|
if (low.length === 0 || held.size + low.length >= panels.length) break;
|
|
550
619
|
low.forEach((p) => held.add(p));
|
|
551
620
|
}
|
|
552
621
|
return runs;
|
|
553
|
-
})(), headingFloorRow = Math.max(BAR_H + 4, maxOf(rowText.map((text) => text.h + 2))), headingLines = !compact && !heightOmitted(options.size) && plot.h < 3 * lineBox(headFont) + HEAD_GAP + (showTotal ? TOTAL_GAP : 0) + (rows.length + (showTotal ? 1 : 0)) * headingFloorRow ? 2 : 3, shareColW = showShare ? SHARE_GAP + Math.max(0, maxOf(shareWs)) : 0, periodNameFull = interleaved && cascade ? maxOf(panels.map((entry) => width(entry.head, headFont))) : 0, periodNameW = interleaved && cascade ? Math.min(periodNameFull, plot.w / 3) + END_GAP : 0, interleavedRun = (p) => Math.max(0, cascade ? plot.w - growthW - shareColW - periodNameW : plot.w - endReserves[p]), interleavedK = minOf(spans.map((span, p) => span > 0 ? interleavedRun(p) / span : 1 / 0)), commonShareRight = plot.x + plot.w - growthW, keyTextW = Math.max(1, plot.w - KEY_W - KEY_GAP - CELL_AIR - (cascade ? plot.x + plot.w - commonShareRight + (showShare ? width(shareHead, fieldFont) : 0) : sideW)), panelTracks = panels.map((entry, p) => {
|
|
622
|
+
})(), headingFloorRow = Math.max(BAR_H + 4, maxOf(rowText.map((text) => text.h + 2))), headingLines = !compact && !heightOmitted(options.size) && plot.h < 3 * lineBox(headFont) + HEAD_GAP + (showTotal ? TOTAL_GAP : 0) + (rows.length + (showTotal ? 1 : 0)) * headingFloorRow ? 2 : 3, shareColW = showShare ? SHARE_GAP + Math.max(0, maxOf(shareWs)) : 0, periodNameFull = interleaved && cascade && headsDrawn ? maxOf(panels.map((entry) => width(entry.head, headFont))) : 0, periodNameW = interleaved && cascade && headsDrawn ? Math.min(periodNameFull, plot.w / 3) + END_GAP : 0, interleavedRun = (p) => Math.max(0, cascade ? plot.w - growthW - shareColW - periodNameW : plot.w - endReserves[p]), interleavedK = minOf(spans.map((span, p) => span > 0 ? interleavedRun(p) / span : 1 / 0)), commonShareRight = plot.x + plot.w - growthW, keyTextW = Math.max(1, plot.w - KEY_W - KEY_GAP - CELL_AIR - (cascade ? plot.x + plot.w - commonShareRight + (showShare ? width(shareHead, fieldFont) : 0) : sideW)), panelsStart = x = panelsFirst ? plot.x + labelTrack : x, panelTracks = panels.map((entry, p) => {
|
|
554
623
|
let face = entry.fieldHead || entry.unitHead ? fieldFont : headFont, head2 = entry.fieldHead ? fieldText(entry.head) : entry.head;
|
|
555
624
|
if (interleaved) {
|
|
556
625
|
let scale2 = sharedScale ? Number.isFinite(interleavedK) ? interleavedK : 0 : spans[p] > 0 ? interleavedRun(p) / spans[p] : 0, headFit2 = cascade ? fitText(head2, face, Math.max(1, periodNameW - END_GAP), 1, measure, { target: options.target, typeRole: "axis" }) : fitText(head2, face, keyTextW, 2, measure, { target: options.target, typeRole: "axis" });
|
|
557
|
-
return { ...entry, head: head2, face, origin: plot.x, scale: scale2, trackW: spans[p] * scale2, shareRight: commonShareRight, headFit: headFit2 };
|
|
626
|
+
return { ...entry, head: head2, face, origin: plot.x, scale: scale2, trackW: spans[p] * scale2, shareRight: commonShareRight, headFit: headFit2, headW: keyTextW };
|
|
558
627
|
}
|
|
559
628
|
let w = compact ? compactW + PANEL_GAP : sharedScale ? extras[p] + spans[p] * sharedK : cascade ? restW * weights[p] / weightSum : PANEL_GAP + endReserves[p] + ownRuns[p], origin = compact ? plot.x : x + PANEL_GAP, run = Math.max(0, cascade ? w - extras[p] : w - PANEL_GAP - endReserves[p]), scale = sharedScale ? compact ? Number.isFinite(compactK) ? compactK : 0 : sharedK : spans[p] > 0 ? run / spans[p] : 0, trackW = spans[p] * scale;
|
|
560
629
|
compact || (x += w);
|
|
@@ -563,8 +632,12 @@ function layoutBarTableOnce(authored, options) {
|
|
|
563
632
|
let before = headFit.lines[headFit.lines.length - 2].split(" "), last = `${before.pop()} ${entry.panel.unit}`;
|
|
564
633
|
width(last, face) <= headW && (headFit.lines.splice(-2, 2, ...before.length ? [before.join(" ")] : [], last), headFit.w = Math.max(...headFit.lines.map((line2) => width(line2, face))), headFit.h = headFit.lines.length * lineBox(face));
|
|
565
634
|
}
|
|
566
|
-
return { ...entry, head: head2, face, origin, scale, trackW, shareRight: origin + trackW + SHARE_GAP + shareWs[p], headFit };
|
|
567
|
-
})
|
|
635
|
+
return { ...entry, head: head2, face, origin, scale, trackW, shareRight: origin + trackW + SHARE_GAP + shareWs[p], headFit, headW };
|
|
636
|
+
});
|
|
637
|
+
panelsFirst && numberTracks.forEach((track) => {
|
|
638
|
+
track.right += x - panelsStart;
|
|
639
|
+
});
|
|
640
|
+
let growthTrack = growth ? { right: plot.x + plot.w, headFit: growthFit(interleaved ? Math.max(growthInner, plot.w * 0.4) : growthInner + growthOverhang) } : void 0, overlaps = (left, right, otherLeft, otherRight) => left < otherRight + 1 && right + 1 > otherLeft, shareBox = interleaved && growthTrack && showShare ? measure(shareHead, fieldFont) : void 0, shareRight = panelTracks[0]?.shareRight ?? 0, shareLift = shareBox ? Math.max(0, maxOf(numberTracks.filter((track) => overlaps(shareRight - shareBox.width, shareRight, track.right - track.headFit.w, track.right)).map((track) => track.headFit.h + 2))) : 0, growthLift = interleaved && growthTrack ? Math.max(
|
|
568
641
|
showShare && growthTrack.headFit.w > growthInner ? lineBox(headFont) + 2 : 0,
|
|
569
642
|
maxOf(numberTracks.filter((track) => overlaps(growthTrack.right - growthTrack.headFit.w, growthTrack.right, track.right - track.headFit.w, track.right)).map((track) => track.headFit.h + 2)),
|
|
570
643
|
shareBox && overlaps(growthTrack.right - growthTrack.headFit.w, growthTrack.right, shareRight - shareBox.width, shareRight) ? shareLift + shareBox.height + 2 : 0
|
|
@@ -592,20 +665,25 @@ function layoutBarTableOnce(authored, options) {
|
|
|
592
665
|
if (mainNotes.length > 0) return layoutBarTable(authored, { ...options, [SLIVER_NOTE]: mainNotes });
|
|
593
666
|
}
|
|
594
667
|
}
|
|
595
|
-
let heads = [...numberTracks, ...interleaved ? [] : panelTracks, ...growthTrack ? [growthTrack] : []].map((track) => track.headFit), keyH = interleaved && !cascade ? panelTracks.reduce((sum, track) => sum + track.headFit.h + 2, 0) - 2 : 0, headH = Math.max(lineBox(headFont), keyH, maxOf(heads.map((head2) => head2.h)), shareHeadH, (growthTrack?.headFit.h ?? 0) + growthLift), house = fixedBarRow(theme, rowText.map((text) => text.h + 4)), naturalRowH = house?.step ?? Math.max(ROW_PITCH, maxOf(rowText.map((text) => text.h + 4))), barH = house ? house.step * house.fraction : BAR_H, floorRowH = Math.max(barH + 4, maxOf(rowText.map((text) => text.h + 2))), rowCount = rows.length + (showTotal ? 1 : 0), blockH = headH +
|
|
668
|
+
let heads = [...numberTracks, ...interleaved ? [] : panelTracks, ...growthTrack ? [growthTrack] : []].map((track) => track.headFit), keyH = interleaved && !cascade ? panelTracks.reduce((sum, track) => sum + track.headFit.h + 2, 0) - 2 : 0, headH = headsDrawn ? Math.max(lineBox(headFont), keyH, maxOf(heads.map((head2) => head2.h)), shareHeadH, (growthTrack?.headFit.h ?? 0) + growthLift) : 0, headGap = headsDrawn ? HEAD_GAP : 0, house = fixedBarRow(theme, rowText.map((text) => text.h + 4)), naturalRowH = house?.step ?? Math.max(ROW_PITCH, maxOf(rowText.map((text) => text.h + 4))), barH = house ? house.step * house.fraction : BAR_H, floorRowH = Math.max(barH + 4, maxOf(rowText.map((text) => text.h + 2))), rowCount = rows.length + (showTotal ? 1 : 0), blockH = headH + headGap + (showTotal ? TOTAL_GAP : 0), minimumBlockH = (headsDrawn ? Math.max(
|
|
596
669
|
lineBox(headFont),
|
|
597
670
|
maxOf(numberTracks.map((track) => track.headFit.h)),
|
|
598
671
|
maxOf(panelTracks.map((track) => Math.min(track.headFit.h, 2 * lineBox(headFont)))),
|
|
599
672
|
shareHeadH,
|
|
600
673
|
(growthTrack?.headFit.h ?? 0) + growthLift
|
|
601
|
-
)
|
|
674
|
+
) : 0) + headGap + (showTotal ? TOTAL_GAP : 0);
|
|
675
|
+
if (labelWidth !== void 0 && fixedHeightCanvas(options) && minimumBlockH + rowCount * floorRowH > plot.h) {
|
|
676
|
+
let { width: _width, ...nameSettings } = overrides.label, wider = layoutBarTable(authored, { ...options, columnOverrides: { ...overrides, label: nameSettings } });
|
|
677
|
+
return { ...wider, warnings: [...wider.warnings, overrideIgnored("label", "width", "the wrapped row names would not fit the pinned height")] };
|
|
678
|
+
}
|
|
679
|
+
let tight = interleaved && !cascade, tightFont = { ...cellFont, lineHeight: 1 }, valueFont = tight ? tightFont : cellFont, barLineH = Math.max(barH, measure("0", valueFont).height) + (interleaved ? 2 : 6), panelBarH = (p) => interleaved && !cascade && p > 0 ? THIN_BAR : barH, totalLineH = Math.max(lineBox(totalFont), measure(totalLabel, totalFont).height) + 2, nameBoxH = (r) => tight && rowText[r].lines.length === 1 ? measure(rowText[r].lines[0], tightFont).height : rowText[r].h, nameH = (r) => nameBoxH(r) + 2, unitTops = [0];
|
|
602
680
|
for (let r = 0; r < rows.length; r++) unitTops.push(unitTops[r] + nameH(r) + (interleaved ? panels.length * barLineH + ROW_GAP : barLineH));
|
|
603
|
-
let comboAfter = interleaved && cascade && bracketRows && bracketLabel !== void 0 && cascade.panels.some((c) => c.combined) ? bracketRows.at(-1) : -1, periodTexts = panels.map((entry) => entry.panel.label ?? entry.panel.id), periodW = Math.max(0, maxOf(periodTexts.map((text) => width(text, cellFont)))), comboShareW = Math.max(0, maxOf((cascade?.panels ?? []).map((c) => c.combined ? width(c.combined.text, totalFont) : 0))), comboFit = comboAfter >= 0 ? fitText(comboRowLabel, totalFont, Math.max(MIN_COMPACT_LABEL, commonShareRight - comboShareW - periodW - 2 * CELL_AIR - plot.x), 3, measure, { target: options.target, typeRole: "label" }) : void 0, comboPitch = lineBox(cellFont) + 2, combinedH = comboFit ? 2 * COMBINED_PAD + Math.max(comboFit.h, panels.length * comboPitch) + ROW_GAP : 0, rowTopIn = (r) => unitTops[r] + (comboAfter >= 0 && r > comboAfter ? combinedH : 0), rowsSpan = unitTops[rows.length] + combinedH, totalIn = (p) => showTotal && (compact && !interleaved ? panels[p].totalText !== void 0 || p === 0 && (numberColumns.some((column) => column.totalText !== void 0) || !!growth?.texts[rows.length]) : panels.some((panel) => panel.totalText !== void 0) || numberColumns.some((column) => column.totalText !== void 0) || !!growth?.texts[rows.length]), totalBars = panels.map((_entry, p) => p).filter((p) => cascade && panels[p].totalText !== void 0), compactTotalH = interleaved ? totalLineH + totalBars.length * barLineH : totalLineH + barLineH, compactBlockH = (p) => headH +
|
|
681
|
+
let comboAfter = interleaved && cascade && bracketRows && bracketLabel !== void 0 && cascade.panels.some((c) => c.combined) ? bracketRows.at(-1) : -1, periodTexts = panels.map((entry) => overrides[entry.panel.id]?.label ?? entry.panel.label ?? entry.panel.id), periodW = Math.max(0, maxOf(periodTexts.map((text) => width(text, cellFont)))), comboShareW = Math.max(0, maxOf((cascade?.panels ?? []).map((c) => c.combined ? width(c.combined.text, totalFont) : 0))), comboFit = comboAfter >= 0 ? fitText(comboRowLabel, totalFont, Math.max(MIN_COMPACT_LABEL, commonShareRight - comboShareW - periodW - 2 * CELL_AIR - plot.x), 3, measure, { target: options.target, typeRole: "label" }) : void 0, comboPitch = lineBox(cellFont) + 2, combinedH = comboFit ? 2 * COMBINED_PAD + Math.max(comboFit.h, panels.length * comboPitch) + ROW_GAP : 0, rowTopIn = (r) => unitTops[r] + (comboAfter >= 0 && r > comboAfter ? combinedH : 0), rowsSpan = unitTops[rows.length] + combinedH, totalIn = (p) => showTotal && (compact && !interleaved ? panels[p].totalText !== void 0 || p === 0 && (numberColumns.some((column) => column.totalText !== void 0) || !!growth?.texts[rows.length]) : panels.some((panel) => panel.totalText !== void 0) || numberColumns.some((column) => column.totalText !== void 0) || !!growth?.texts[rows.length]), totalBars = panels.map((_entry, p) => p).filter((p) => cascade && panels[p].totalText !== void 0), compactTotalH = interleaved ? totalLineH + totalBars.length * barLineH : totalLineH + barLineH, compactBlockH = (p) => headH + headGap + rowsSpan + (showTotal ? TOTAL_GAP : 0) + (totalIn(p) ? compactTotalH : 0), compactRowsH = interleaved ? compactBlockH(0) : panels.reduce((sum, _entry, p) => sum + compactBlockH(p), 0) + (panels.length - 1) * BLOCK_GAP, spareRowH = options.heightFill !== "none" && fixedHeightCanvas(options) && !compact && !house ? Math.floor(Math.min(naturalRowH * MAX_ROW_GROWTH, (plot.h - blockH) / rowCount)) : 0, rowH = compact ? barLineH : Math.max(floorRowH, Math.min(naturalRowH, (plot.h - blockH) / rowCount), spareRowH);
|
|
604
682
|
rowH > naturalRowH && (barH += Math.round((rowH - naturalRowH) * BAR_GROWTH));
|
|
605
|
-
let cellBarH = cascade ? interleaved ? barH : Math.max(barH, rowH - (compact ? 6 : 8)) : barH, totalBarH = cascade ? interleaved ? barH : Math.max(barH, rowH - 6) : barH, tableTop = plot.y, rowsTop = tableTop + headH +
|
|
683
|
+
let cellBarH = cascade ? interleaved ? barH : Math.max(barH, rowH - (compact ? 6 : 8)) : barH, totalBarH = cascade ? interleaved ? barH : Math.max(barH, rowH - 6) : barH, tableTop = plot.y, rowsTop = tableTop + headH + headGap, rowsBottom = rowsTop + rows.length * rowH, totalTop = rowsBottom + TOTAL_GAP, tableH = compact ? compactRowsH : blockH + rowCount * rowH, chromeH = size.height - plot.h, grow = rowDrivenHeight({ options, width: size.width, height: size.height, chromeH, rowsH: compact ? compactRowsH : blockH + rowCount * naturalRowH });
|
|
606
684
|
if (grow !== void 0) return layoutBarTable(authored, { ...options, size: { width: size.width, height: grow } });
|
|
607
|
-
let scene = [...frame.nodes], under = [], contrastInk = /* @__PURE__ */ new Set(), mutedInk = /* @__PURE__ */ new Set(), marks = { segments: [], cells: [] }, requests = [], rightAligned = /* @__PURE__ */ new Set(), fonts = /* @__PURE__ */ new Map(), tableRight = plot.x + plot.w, line = (id, x1, y1, x2, y2, lineWidth, stroke, part) => scene.push({ t: "line", id, x1, y1, x2, y2, stroke, width: lineWidth, owner: {}, part }), label = (id, kind, owner, text, font, rect, fitted) => {
|
|
608
|
-
fonts.set(id, font), requests.push({
|
|
685
|
+
let scene = [...frame.nodes], under = [], contrastInk = /* @__PURE__ */ new Set(), mutedInk = /* @__PURE__ */ new Set(), marks = { segments: [], cells: [] }, requests = [], rightAligned = /* @__PURE__ */ new Set(), fonts = /* @__PURE__ */ new Map(), tableRight = plot.x + plot.w, line = (id, x1, y1, x2, y2, lineWidth, stroke, part) => scene.push({ t: "line", id, x1, y1, x2, y2, stroke, width: lineWidth, owner: {}, part }), label = (id, kind, owner, text, font, rect, fitted, align) => {
|
|
686
|
+
fonts.set(id, font), align === "right" && rightAligned.add(id), requests.push({
|
|
609
687
|
id,
|
|
610
688
|
kind,
|
|
611
689
|
owner,
|
|
@@ -613,44 +691,46 @@ function layoutBarTableOnce(authored, options) {
|
|
|
613
691
|
font,
|
|
614
692
|
typeRole: kind === "axisTitle" ? "axis" : "label",
|
|
615
693
|
...fitted ? fittedLabel(fitted, font) : { lines: [text] },
|
|
694
|
+
...align === "left" ? { align: "start" } : align === "center" ? { align: "middle" } : {},
|
|
616
695
|
priority: PRIORITY.endpoint,
|
|
617
696
|
candidates: [{ slot: `${id}:fixed`, rect, penalty: 0 }]
|
|
618
697
|
});
|
|
619
698
|
}, rowText1 = (text, font, top, at, bandH = rowH) => {
|
|
620
699
|
let box = measure(text, font);
|
|
621
700
|
return { x: "left" in at ? at.left : at.right - box.width, y: top + (bandH - box.height) / 2, w: box.width, h: box.height };
|
|
622
|
-
}, blockTop = (p) => tableTop + (compact ? panels.slice(0, p).reduce((sum, _entry, q) => sum + compactBlockH(q) + BLOCK_GAP, 0) : 0), rowsTopOf = (p) => blockTop(p) + headH +
|
|
701
|
+
}, blockTop = (p) => tableTop + (compact ? panels.slice(0, p).reduce((sum, _entry, q) => sum + compactBlockH(q) + BLOCK_GAP, 0) : 0), rowsTopOf = (p) => blockTop(p) + headH + headGap, totalLead = (p) => options.totalPosition === "top" && totalIn(p) ? (compact ? compactTotalH : rowH) + TOTAL_GAP : 0, rowsBottomOf = (p) => compact ? rowsTopOf(p) + totalLead(p) + rowsSpan : rowsBottom + totalLead(p), place = (p, r) => {
|
|
623
702
|
if (interleaved) {
|
|
624
703
|
if (r < rows.length) {
|
|
625
|
-
let top3 = rowsTopOf(0) + rowTopIn(r);
|
|
704
|
+
let top3 = rowsTopOf(0) + totalLead(0) + rowTopIn(r);
|
|
626
705
|
return { labelTop: top3, labelH: tight ? nameBoxH(r) : lineBox(cellFont), barTop: top3 + nameH(r) + p * barLineH };
|
|
627
706
|
}
|
|
628
|
-
let top2 = rowsBottomOf(0) + TOTAL_GAP;
|
|
707
|
+
let top2 = totalLead(0) > 0 ? rowsTopOf(0) : rowsBottomOf(0) + TOTAL_GAP;
|
|
629
708
|
return { labelTop: top2, labelH: totalLineH, barTop: top2 + totalLineH + Math.max(0, totalBars.indexOf(p)) * barLineH };
|
|
630
709
|
}
|
|
631
710
|
if (!compact) {
|
|
632
|
-
let top2 = r < rows.length ? rowsTop + r * rowH : totalTop;
|
|
711
|
+
let top2 = r < rows.length ? rowsTop + totalLead(0) + r * rowH : totalLead(0) > 0 ? rowsTop : totalTop;
|
|
633
712
|
return { labelTop: top2, labelH: rowH, barTop: top2 };
|
|
634
713
|
}
|
|
635
714
|
if (r < rows.length) {
|
|
636
|
-
let top2 = rowsTopOf(p) + unitTops[r];
|
|
715
|
+
let top2 = rowsTopOf(p) + totalLead(p) + unitTops[r];
|
|
637
716
|
return { labelTop: top2, labelH: lineBox(cellFont), barTop: top2 + nameH(r) };
|
|
638
717
|
}
|
|
639
|
-
let top = rowsBottomOf(p) + TOTAL_GAP;
|
|
718
|
+
let top = totalLead(p) > 0 ? rowsTopOf(p) : rowsBottomOf(p) + TOTAL_GAP;
|
|
640
719
|
return { labelTop: top, labelH: totalLineH, barTop: top + totalLineH };
|
|
641
720
|
}, nameId = (p, id) => p === 0 ? id : `${id}:${panels[p].panel.id}`, blocks = compact && !interleaved ? panels.map((_entry, p) => p) : [0], headBottom = tableTop + headH;
|
|
642
|
-
numberTracks.forEach((track) => {
|
|
643
|
-
let id = `head:${track.column.id}
|
|
644
|
-
|
|
721
|
+
headsDrawn && numberTracks.forEach((track) => {
|
|
722
|
+
let id = `head:${track.column.id}`, override = overrides[track.column.id], align = override?.headAlign ?? override?.align ?? "right";
|
|
723
|
+
label(
|
|
645
724
|
id,
|
|
646
725
|
"axisTitle",
|
|
647
726
|
{ colId: track.column.id },
|
|
648
727
|
track.head,
|
|
649
728
|
fieldFont,
|
|
650
|
-
{ x: track.right - track.headFit.w, y: headBottom - track.headFit.h, w: track.headFit.w, h: track.headFit.h },
|
|
651
|
-
track.headFit
|
|
729
|
+
{ x: alignedIn(track.right - track.inner, track.right, track.headFit.w, align), y: headBottom - track.headFit.h, w: track.headFit.w, h: track.headFit.h },
|
|
730
|
+
track.headFit,
|
|
731
|
+
align
|
|
652
732
|
);
|
|
653
|
-
}), panelTracks.forEach((track, p) => {
|
|
733
|
+
}), headsDrawn && panelTracks.forEach((track, p) => {
|
|
654
734
|
if (interleaved) {
|
|
655
735
|
let top = cascade ? place(p, 0).barTop : tableTop + headH - keyH + panelTracks.slice(0, p).reduce((sum, other) => sum + other.headFit.h + 2, 0);
|
|
656
736
|
if (cascade)
|
|
@@ -680,19 +760,20 @@ function layoutBarTableOnce(authored, options) {
|
|
|
680
760
|
rightAligned.add(id2), label(id2, "axisTitle", { colId: `share:${track.panel.id}` }, shareHead, fieldFont, { x: track.shareRight - box2.width, y: tableTop + headH - shareLift - box2.height, w: box2.width, h: box2.height });
|
|
681
761
|
return;
|
|
682
762
|
}
|
|
683
|
-
let headBottom2 = blockTop(p) + headH;
|
|
763
|
+
let headBottom2 = blockTop(p) + headH, headAlign = overrides[track.panel.id]?.headAlign ?? overrides[track.panel.id]?.align;
|
|
684
764
|
if (label(
|
|
685
765
|
`head:${track.panel.id}`,
|
|
686
766
|
"axisTitle",
|
|
687
767
|
{ colId: track.panel.id },
|
|
688
768
|
track.head,
|
|
689
769
|
track.face,
|
|
690
|
-
{ x: track.origin, y: headBottom2 - track.headFit.h, w: track.headFit.w, h: track.headFit.h },
|
|
691
|
-
track.headFit
|
|
770
|
+
{ x: headAlign === void 0 ? track.origin : alignedIn(track.origin, track.origin + track.headW, track.headFit.w, headAlign), y: headBottom2 - track.headFit.h, w: track.headFit.w, h: track.headFit.h },
|
|
771
|
+
track.headFit,
|
|
772
|
+
headAlign
|
|
692
773
|
), isNumberAlone(track.head) && (requests[requests.length - 1].role = "axis"), !showShare) return;
|
|
693
774
|
let id = `head:share:${track.panel.id}`, box = measure(shareHead, fieldFont);
|
|
694
775
|
rightAligned.add(id), label(id, "axisTitle", { colId: `share:${track.panel.id}` }, shareHead, fieldFont, { x: track.shareRight - box.width, y: headBottom2 - box.height, w: box.width, h: box.height });
|
|
695
|
-
}), growthTrack && (rightAligned.add("head:growth"), label(
|
|
776
|
+
}), growthTrack && headsDrawn && (rightAligned.add("head:growth"), label(
|
|
696
777
|
"head:growth",
|
|
697
778
|
"axisTitle",
|
|
698
779
|
{ colId: "growth" },
|
|
@@ -705,13 +786,15 @@ function layoutBarTableOnce(authored, options) {
|
|
|
705
786
|
let box = measure(text, font), y = top + (rowH - box.height) / 2, candidates = [], pad = total ? TOTAL_PAD : VALUE_PAD, fitsInside = box.width + 2 * pad <= rect.w, inside = (penalty) => candidates.push({ slot: `${id}:inside`, rect: { x: rect.x + pad, y, w: box.width, h: box.height }, penalty, insideFill: paintColor(theme, fill), insidePaint: fill }), left = rect.x - VALUE_PAD - box.width, right = rect.x + rect.w + VALUE_PAD, at = (slot, x2, penalty) => candidates.push({ slot: `${id}:${slot}`, rect: { x: x2, y, w: box.width, h: box.height }, penalty }), atStart = rect.x <= lo + 0.5;
|
|
706
787
|
total || atStart ? fitsInside && inside(0) : (left >= lo && at("left", left, 0), fitsInside && inside(1)), right + box.width <= hi && at("right", right, 2), left < lo && left >= lo - PANEL_GAP + 4 && at("leftGap", left, 3), at("rightOut", right, 4), candidates.splice(0, candidates.length, ...candidates.filter((candidate) => candidate.rect.x >= plot.x && candidate.rect.x + candidate.rect.w <= tableRight)), fonts.set(id, font), contrastInk.add(id), requests.push({ id, kind: "segment", owner, text, font, typeRole: "label", lines: [text], priority: PRIORITY.endpoint, candidates });
|
|
707
788
|
}, head = headRule(theme);
|
|
708
|
-
blocks.forEach((p) => line(nameId(p, "bartable-head-rule"), plot.x, rowsTopOf(p) - HEAD_GAP / 2, tableRight, rowsTopOf(p) - HEAD_GAP / 2, head.width, head.stroke, "tableHeaderRule"));
|
|
789
|
+
headsDrawn && blocks.forEach((p) => line(nameId(p, "bartable-head-rule"), plot.x, rowsTopOf(p) - HEAD_GAP / 2, tableRight, rowsTopOf(p) - HEAD_GAP / 2, head.width, head.stroke, "tableHeaderRule"));
|
|
709
790
|
let shaded = new Set(!cascade && options.combinedShare ? options.combinedShare.rows : []);
|
|
710
|
-
|
|
791
|
+
rows.forEach((row, r) => {
|
|
711
792
|
if (!shaded.has(row.id)) return;
|
|
712
793
|
let at = place(0, r), air = interleaved ? ROW_GAP / 2 : 0, top = at.labelTop - air, bottom = compact ? (r + 1 < rows.length ? place(0, r + 1).labelTop : rowsBottomOf(0) + 2 * air) - air : at.labelTop + rowH;
|
|
713
794
|
under.push({ t: "rect", id: `combined-band:${row.id}`, rect: { x: plot.x, y: top, w: tableRight - plot.x, h: bottom - top }, fill: { token: "others", tint: 0.5 }, owner: {}, part: "combinedBand" });
|
|
714
|
-
})
|
|
795
|
+
});
|
|
796
|
+
let nameAlign = compact ? void 0 : overrides.label?.align, nameX = (w) => nameAlign === void 0 ? plot.x : alignedIn(plot.x, plot.x + labelTrack - LABEL_GAP, w, nameAlign);
|
|
797
|
+
if (rows.forEach((row, r) => {
|
|
715
798
|
let text = rowText[r];
|
|
716
799
|
blocks.forEach((p) => {
|
|
717
800
|
let at = place(p, r), ruleY = at.labelTop - (interleaved ? ROW_GAP / 2 : 0);
|
|
@@ -721,14 +804,15 @@ function layoutBarTableOnce(authored, options) {
|
|
|
721
804
|
{ categoryId: row.id },
|
|
722
805
|
row.label,
|
|
723
806
|
cellFont,
|
|
724
|
-
{ x:
|
|
725
|
-
text
|
|
807
|
+
{ x: nameX(text.w), y: compact ? at.labelTop : at.labelTop + (rowH - text.h) / 2, w: text.w, h: compact ? nameBoxH(r) : text.h },
|
|
808
|
+
text,
|
|
809
|
+
nameAlign
|
|
726
810
|
);
|
|
727
811
|
});
|
|
728
812
|
let side = place(0, r);
|
|
729
813
|
if (numberTracks.forEach((track) => {
|
|
730
|
-
let id = `cell:${track.column.id}:${row.id}`,
|
|
731
|
-
|
|
814
|
+
let id = `cell:${track.column.id}:${row.id}`, align = overrides[track.column.id]?.align ?? "right", box = rowText1(track.texts[r], valueFont, side.labelTop, { right: track.right }, side.labelH), rect = { ...box, x: alignedIn(track.right - track.inner, track.right, box.w, align) };
|
|
815
|
+
label(id, "point", { categoryId: row.id, colId: track.column.id }, track.texts[r], cellFont, rect, void 0, align), marks.cells.push({ rowId: row.id, colId: track.column.id, kind: "column", value: track.column.values[r] ?? null, text: track.texts[r], rect });
|
|
732
816
|
}), panelTracks.forEach((track, p) => {
|
|
733
817
|
let stack = track.stacks[r], top = place(p, r).barTop;
|
|
734
818
|
if (cascade) {
|
|
@@ -737,7 +821,7 @@ function layoutBarTableOnce(authored, options) {
|
|
|
737
821
|
let value = stack.total, rect2 = { x: track.origin + c.starts[r] * track.scale, y: barY2, w: value * track.scale, h: cellBarH }, text2 = track.fmt(value);
|
|
738
822
|
marks.segments.push({ rowId: row.id, panelId: track.panel.id, seriesId, value, text: text2, rect: rect2 });
|
|
739
823
|
let fill = rowPaint(r, 0);
|
|
740
|
-
if (rect2.w > 0 && (scene.push({ t: "rect", id: `segment:${track.panel.id}:${row.id}:${seriesId}`, rect: rect2, fill, owner: owner2, part: "segment", display: { value: text2 } }), occupied.claim(rect2, "mark", owner2, "segment")), barValue(`end:${track.panel.id}:${row.id}`, owner2, text2, cellFont, rect2, fill, top, track.origin, track.origin + track.trackW), marks.cells.push({ rowId: row.id, colId: track.panel.id, kind: "end", value, text: text2, rect: rect2 }), !showShare) return;
|
|
824
|
+
if (rect2.w > 0 && (scene.push({ t: "rect", id: `segment:${track.panel.id}:${row.id}:${seriesId}`, rect: rect2, fill, owner: owner2, part: "segment", display: { value: text2 } }), occupied.claim(rect2, "mark", owner2, "segment")), valuesPrinted && barValue(`end:${track.panel.id}:${row.id}`, owner2, text2, cellFont, rect2, fill, top, track.origin, track.origin + track.trackW), marks.cells.push({ rowId: row.id, colId: track.panel.id, kind: "end", value, text: text2, rect: rect2 }), !showShare) return;
|
|
741
825
|
let id = `cell:share:${track.panel.id}:${row.id}`, shareRect = rowText1(c.shareTexts[r], cellFont, top, { right: track.shareRight });
|
|
742
826
|
rightAligned.add(id), label(id, "point", { categoryId: row.id, colId: `share:${track.panel.id}` }, c.shareTexts[r], cellFont, shareRect), marks.cells.push({ rowId: row.id, colId: `share:${track.panel.id}`, kind: "share", value: c.shares[r], text: c.shareTexts[r], rect: shareRect });
|
|
743
827
|
return;
|
|
@@ -790,7 +874,7 @@ function layoutBarTableOnce(authored, options) {
|
|
|
790
874
|
}), occupied.claim(rect2, "mark", owner, "rangeExtension");
|
|
791
875
|
}
|
|
792
876
|
let rect = rowText1(endText, valueFont, top, { left: track.origin + (range2?.high ?? stack.positive) * track.scale + END_GAP });
|
|
793
|
-
label(`end:${track.panel.id}:${row.id}`, "total", owner, endText, cellFont, rect);
|
|
877
|
+
(valuesPrinted || track.rowSums[r] === null) && label(`end:${track.panel.id}:${row.id}`, "total", owner, endText, cellFont, rect);
|
|
794
878
|
let sum = track.rowSums[r] ?? null;
|
|
795
879
|
marks.cells.push({ rowId: row.id, colId: track.panel.id, kind: "end", value: range2?.low ?? sum, ...range2 ? { range: range2 } : {}, text: endText, rect });
|
|
796
880
|
}), growthTrack) {
|
|
@@ -802,7 +886,7 @@ function layoutBarTableOnce(authored, options) {
|
|
|
802
886
|
let c = cascade.panels[p];
|
|
803
887
|
if (!c.combined || !bracketRows) return;
|
|
804
888
|
if (interleaved) {
|
|
805
|
-
let top = rowsTopOf(0) + unitTops[comboAfter + 1], ruleStroke = { token: "inkMuted" };
|
|
889
|
+
let top = rowsTopOf(0) + totalLead(0) + unitTops[comboAfter + 1], ruleStroke = { token: "inkMuted" };
|
|
806
890
|
p === 0 && ([top + 1, top + combinedH - ROW_GAP - 1].forEach((y, i) => scene.push({ t: "line", id: `combined-rule:${i === 0 ? "top" : "bottom"}`, x1: plot.x, y1: y, x2: commonShareRight, y2: y, stroke: ruleStroke, width: strokeToken(theme, "hair"), dash: dashToken(theme, "dotted"), owner: {}, part: "combinedRule" })), label("combined:label", "category", {}, comboRowLabel, totalFont, { x: plot.x, y: top + COMBINED_PAD, w: comboFit.w, h: comboFit.h }, comboFit));
|
|
807
891
|
let lineTop = top + COMBINED_PAD + p * comboPitch, box2 = measure(c.combined.text, totalFont), rect2 = { x: track.shareRight - box2.width, y: lineTop + (lineBox(cellFont) - box2.height) / 2, w: box2.width, h: box2.height };
|
|
808
892
|
rightAligned.add(`combined:${track.panel.id}`), label(`combined:${track.panel.id}`, "total", { colId: `share:${track.panel.id}` }, c.combined.text, totalFont, rect2), marks.cells.push({ colId: `share:${track.panel.id}`, kind: "share", combined: !0, value: c.combined.value, text: c.combined.text, rect: rect2 });
|
|
@@ -819,16 +903,19 @@ function layoutBarTableOnce(authored, options) {
|
|
|
819
903
|
blocks.forEach((p) => {
|
|
820
904
|
let at = place(p, rows.length);
|
|
821
905
|
if (totalIn(p)) {
|
|
822
|
-
let bandH = compact ? compactTotalH : Math.min(rowH, Math.max(ROW_PITCH, totalLineH + 4, cascade ? totalBarH + 6 : 0)), bottom = at.labelTop + (compact ? compactTotalH : (rowH + bandH) / 2), top = !compact && bandH < rowH ? bottom - bandH : rowsBottomOf(p) + TOTAL_GAP / 2;
|
|
823
|
-
under.push({ t: "rect", id: nameId(p, "bartable-total-ground"), rect: { x: plot.x, y: top, w: tableRight - plot.x, h: bottom - top }, fill: ground, owner: {}, part: "tableTotalGround" }), line(nameId(p, "bartable-total-rule"), plot.x, top, tableRight, top, rule.width, rule.stroke, "tableTotalRule"), line(nameId(p, "bartable-total-rule-below"), plot.x, bottom, tableRight, bottom, rule.width, rule.stroke, "tableTotalRule");
|
|
906
|
+
let bandH = compact ? compactTotalH : Math.min(rowH, Math.max(ROW_PITCH, totalLineH + 4, cascade ? totalBarH + 6 : 0)), bottom = at.labelTop + (compact ? compactTotalH : (rowH + bandH) / 2), first = totalLead(p) > 0, top = !compact && bandH < rowH ? bottom - bandH : first ? at.labelTop - headGap / 2 : rowsBottomOf(p) + TOTAL_GAP / 2;
|
|
907
|
+
under.push({ t: "rect", id: nameId(p, "bartable-total-ground"), rect: { x: plot.x, y: top, w: tableRight - plot.x, h: bottom - top }, fill: ground, owner: {}, part: "tableTotalGround" }), first && headsDrawn && top === at.labelTop - headGap / 2 || line(nameId(p, "bartable-total-rule"), plot.x, top, tableRight, top, rule.width, rule.stroke, "tableTotalRule"), line(nameId(p, "bartable-total-rule-below"), plot.x, bottom, tableRight, bottom, rule.width, rule.stroke, "tableTotalRule");
|
|
908
|
+
}
|
|
909
|
+
if (totalIn(p)) {
|
|
910
|
+
let box = rowText1(totalLabel, totalFont, at.labelTop, { left: plot.x }, at.labelH);
|
|
911
|
+
label(nameId(p, "total:label"), "category", {}, totalLabel, totalFont, { ...box, x: nameX(box.w) }, void 0, nameAlign);
|
|
824
912
|
}
|
|
825
|
-
totalIn(p) && label(nameId(p, "total:label"), "category", {}, totalLabel, totalFont, rowText1(totalLabel, totalFont, at.labelTop, { left: plot.x }, at.labelH));
|
|
826
913
|
});
|
|
827
914
|
let side = place(0, rows.length), totalX = plot.x + width(totalLabel, totalFont) + CELL_AIR;
|
|
828
915
|
if (numberTracks.forEach((track) => {
|
|
829
916
|
if (track.totalText === void 0) return;
|
|
830
|
-
let id = `total:${track.column.id}`,
|
|
831
|
-
|
|
917
|
+
let id = `total:${track.column.id}`, align = overrides[track.column.id]?.align ?? "right", box = rowText1(track.totalText, totalFont, side.labelTop, { right: track.right }, side.labelH), rect = { ...box, x: alignedIn(track.right - track.inner, track.right, box.w, align) };
|
|
918
|
+
label(id, "grandTotal", { colId: track.column.id }, track.totalText, totalFont, rect, void 0, align), marks.cells.push({ colId: track.column.id, kind: "total", value: track.total, text: track.totalText, rect });
|
|
832
919
|
}), panelTracks.forEach((track, p) => {
|
|
833
920
|
if (track.totalText === void 0) return;
|
|
834
921
|
let totalTop2 = interleaved && !cascade ? place(p, rows.length).labelTop : place(p, rows.length).barTop;
|
|
@@ -860,7 +947,19 @@ function layoutBarTableOnce(authored, options) {
|
|
|
860
947
|
node.t !== "text" || !placed || !rightAligned.has(placed.id) || (node.x = placed.rect.x + placed.rect.w, node.align = "end");
|
|
861
948
|
}
|
|
862
949
|
pushAll(scene, texts), pushAll(warnings, solved.warnings);
|
|
863
|
-
let segmentNames = series.map((s) => s.label ?? s.id).join(", "),
|
|
950
|
+
let segmentNames = series.map((s) => s.label ?? s.id).join(", "), tightest = sharedScale ? minTracks.reduce((best, min, p) => spans[p] > 0 && min / spans[p] > minTracks[best] / spans[best] ? p : best, 0) : -1, widest = spans.indexOf(maxOf(spans)), wideHint = () => tightest >= 0 && tightest !== widest && spans[tightest] > 0 ? `The '${panels[tightest].panel.label ?? panels[tightest].panel.id}' panel's total is ${formatAutomaticPercent(spans[tightest] / spans[widest] * 100, spans[tightest] / spans[widest] < 0.1 ? 1 : 0, !1, locale)} of the '${panels[widest].panel.label ?? panels[widest].panel.id}' panel's, and the panels share one scale, so its track needs ${Math.round(minTracks[tightest])}px. Set options.sharedScale to false to give each panel its own width.` : void 0, kMin = Math.max(0, maxOf(minTracks.map((min, p) => spans[p] > 0 ? min / spans[p] : 0))), compactPanelsW = maxOf(panels.map((_, p) => extras[p] - PANEL_GAP + (sharedScale ? spans[p] * kMin : minTracks[p]))), cascadeRest = growthW + shareColW + END_GAP + (sharedScale ? kMin * maxOf(spans) : maxOf(minTracks)), interleavedPanelsW = cascade ? Math.min(cascadeRest + periodNameFull, 1.5 * cascadeRest) : maxOf(panels.map((_, p) => MIN_RUN + endReserves[p])), minWidth = size.width - plot.w + (interleaved ? Math.max(interleavedPanelsW, minSideW + LABEL_GAP + MIN_COMPACT_LABEL) : compact ? Math.max(compactPanelsW + (cascade ? minSideW : 0), minSideW + LABEL_GAP + MIN_COMPACT_LABEL) : minFixedW + growthW + panelsW);
|
|
951
|
+
if (panelsFirst && numberColumns.length > 0 && minWidth > size.width) {
|
|
952
|
+
let { columnOrder: _order, ...defaultOrder } = options, drawn = layoutBarTable(authored, defaultOrder);
|
|
953
|
+
return { ...drawn, warnings: [...drawn.warnings, {
|
|
954
|
+
code: "option-ignored",
|
|
955
|
+
severity: "warn",
|
|
956
|
+
field: ["options", "columnOrder"],
|
|
957
|
+
message: "columnOrder has no effect at this width: the number heads need their room over the name track",
|
|
958
|
+
suggest: "Draw the chart wider, or remove columnOrder.",
|
|
959
|
+
fix: [{ op: "remove", path: "/options/columnOrder" }]
|
|
960
|
+
}] };
|
|
961
|
+
}
|
|
962
|
+
let sizeHint = minWidth > size.width ? wideHint() : void 0;
|
|
864
963
|
return {
|
|
865
964
|
type: "bartable",
|
|
866
965
|
size,
|
|
@@ -888,7 +987,7 @@ function layoutBarTableOnce(authored, options) {
|
|
|
888
987
|
a11y: {
|
|
889
988
|
title: accessibleTitle(options.title, chartString(options, "bartableTitle", { v1: rows.length })),
|
|
890
989
|
counts: [structureCount("rows", rows.length, void 0, options), structureCount("panels", panels.length, panels.length === 1 ? chartString(options, "barPanelOne") : chartString(options, "barPanels", { v1: panels.length }))],
|
|
891
|
-
desc: chartString(options, "bartableDescStart", { v1: rows.length, v2: columns.length ? chartString(options, "tableColumnsClause", { v1: numberTracks.map((track) => track.name).join(", ") }) : "" }) + `${panels.length === 1 ? chartString(options, "barPanelOne") : chartString(options, "barPanels", { v1: panels.length })}, ${panels.map((entry) => entry.head).join("; ")}, ${sharedScale ? chartString(options, "sharedScale") : chartString(options, "ownScale")}. ${cascade ? chartString(options, "cascadeDesc", { v1: showShare ? chartString(options, "shareColumnClause") : "", v2: bracketRows ? chartString(options, "combinedShareBracket", { v1: bracketLabel }) : "", v3: growth ? chartString(options, "lastColumnClause", { v1: growth.head }) : "" }) : ""}` + chartString(options, "segmentsSentence", { v1: segmentNames, v2: cascade ? chartString(options, "cascadeValueLabels") : chartString(options, "barEndTotalRange") + (solved.placed.some((placed) => placed.id.startsWith("part:")) ? chartString(options, "barPartValues") : "") }) + `${ranged ? chartString(options, "rangeBarDesc") : ""}${showTotal ? chartString(options, "tableTotalRow", { v1: totalLabel }) : ""}`
|
|
990
|
+
desc: chartString(options, "bartableDescStart", { v1: rows.length, v2: columns.length ? chartString(options, "tableColumnsClause", { v1: numberTracks.map((track) => track.name).join(", ") }) : "" }) + `${panels.length === 1 ? chartString(options, "barPanelOne") : chartString(options, "barPanels", { v1: panels.length })}, ${panels.map((entry) => entry.head).join("; ")}, ${sharedScale ? chartString(options, "sharedScale") : chartString(options, "ownScale")}. ${cascade ? chartString(options, "cascadeDesc", { v1: showShare ? chartString(options, "shareColumnClause") : "", v2: bracketRows ? chartString(options, "combinedShareBracket", { v1: bracketLabel }) : "", v3: growth ? chartString(options, "lastColumnClause", { v1: growth.head }) : "" }) : ""}` + chartString(options, "segmentsSentence", { v1: segmentNames, v2: valuesPrinted ? cascade ? chartString(options, "cascadeValueLabels") : chartString(options, "barEndTotalRange") + (solved.placed.some((placed) => placed.id.startsWith("part:")) ? chartString(options, "barPartValues") : "") : "" }) + `${ranged ? chartString(options, "rangeBarDesc") : ""}${showTotal ? chartString(options, "tableTotalRow", { v1: totalLabel }) : ""}`
|
|
892
991
|
},
|
|
893
992
|
warnings,
|
|
894
993
|
debug: { occupied: occupied.snapshot(), decisions: solved.decisions }
|
|
@@ -903,6 +1002,11 @@ var bartableCore = {
|
|
|
903
1002
|
summary: "Table rows with number columns and stacked bars. One panel when the rows compare one measure (impact in $bn, split into Run and Grow); several panels when the same split reads in different units side by side ($bn and % of EBITDA). Each panel has its own scale; the end label is the row total or an authored range, whose bar fills the segments to low and extends lightly to high. variant 'cascade': panels as periods of one total (category share by year).",
|
|
904
1003
|
aliases: ["bar-table", "table-bars"],
|
|
905
1004
|
layout: layoutBarTable,
|
|
1005
|
+
finishLayout: (layout) => yieldingWidths("bartable", layout, (data) => [...(data.columns ?? []).map((column) => column.id), ...data.panels.map((panel) => panel.id)], {
|
|
1006
|
+
head: (id) => `head:${id}`,
|
|
1007
|
+
// Only number cells read align. Nothing inside a panel does: its Total and values keep their place.
|
|
1008
|
+
cell: (label, id, data) => (data.columns ?? []).some((column) => column.id === id) && (label.startsWith(`cell:${id}:`) || label === `total:${id}`)
|
|
1009
|
+
}),
|
|
906
1010
|
categoryLabels: calendarCategories,
|
|
907
1011
|
defaults: { total: !0 },
|
|
908
1012
|
annotationKinds: []
|