boardplot 0.55.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 +153 -0
- package/README.md +3 -3
- package/dist/{ReaderBox-3FFPHWSI.js → ReaderBox-GCIITQCX.js} +5 -5
- package/dist/{annotateEngine-ET4DM2OK.js → annotateEngine-JMZI6QEG.js} +1 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-RO2PSSAI.js → chunk-26WNBTWB.js} +21 -5
- package/dist/{chunk-3AJY353W.js → chunk-2AJWRVZ2.js} +4 -3
- package/dist/{chunk-NVGAEQ6M.js → chunk-2BHLRHF2.js} +2 -2
- package/dist/{chunk-CZ3WCG55.js → chunk-2HD5RY2U.js} +11 -3
- package/dist/{chunk-HR2BKLS3.js → chunk-2I76VFMZ.js} +186 -241
- package/dist/{chunk-3B3CFJ2H.js → chunk-2KCK63DD.js} +2 -2
- package/dist/{chunk-GDZI5ZJ7.js → chunk-2WTD3GCR.js} +11 -3
- package/dist/{chunk-EBC5TMI2.js → chunk-2X6XY4K4.js} +27 -10
- package/dist/{chunk-MJMOKPTF.js → chunk-3DUGZ7ML.js} +196 -138
- package/dist/{chunk-N5TZL74Y.js → chunk-3LNVEE5Z.js} +1 -1
- package/dist/{chunk-DB2JKPOX.js → chunk-43PCSBVQ.js} +567 -14
- package/dist/{chunk-WEMUCDPK.js → chunk-4JGBCBDZ.js} +1 -1
- package/dist/{chunk-7UPZPFHQ.js → chunk-4JNHF6JW.js} +12 -12
- package/dist/{chunk-4X3HNETE.js → chunk-4RN4OM6I.js} +3 -3
- package/dist/{chunk-Z7NHFNH3.js → chunk-4U2WSW6F.js} +107 -26
- package/dist/{chunk-6D4EO3S7.js → chunk-53OEKS4L.js} +5 -3
- package/dist/{chunk-E44W4EEG.js → chunk-54HEIM2A.js} +2 -2
- package/dist/{chunk-CLGUFVHM.js → chunk-5H4HFRDO.js} +6 -6
- package/dist/{chunk-SFG7NG23.js → chunk-5HTGSB6Y.js} +3 -3
- package/dist/{chunk-WXJ5MHLH.js → chunk-5JTRCSBN.js} +1 -1
- package/dist/{chunk-4Y7BA2NW.js → chunk-5P4MXWKP.js} +4 -4
- package/dist/{chunk-MLW72KWN.js → chunk-5RHP7YTL.js} +5 -5
- package/dist/{chunk-AB35GVPG.js → chunk-5TUDYKNL.js} +41 -31
- package/dist/{chunk-HZUAEMN5.js → chunk-5WSIH4SR.js} +1 -1
- package/dist/{chunk-YTCIGJUU.js → chunk-62JZL6FW.js} +45 -37
- package/dist/{chunk-S7NRL66K.js → chunk-6EE6XEMA.js} +4 -4
- package/dist/chunk-6JXBLQJ2.js +32 -0
- package/dist/{chunk-BGJRCG7N.js → chunk-6KHRMK3I.js} +46 -26
- package/dist/{chunk-3OZRODC4.js → chunk-6LQKU6YN.js} +4 -4
- package/dist/chunk-6VU2XI3W.js +89 -0
- package/dist/{chunk-E6HDUEGK.js → chunk-6WJOHZPW.js} +5 -5
- package/dist/{chunk-XJQXFVXY.js → chunk-6XU5XGYV.js} +7 -8
- package/dist/{chunk-QOWE55RR.js → chunk-6ZN2XJFI.js} +11 -6
- package/dist/{chunk-4WT3T5SH.js → chunk-72OJBDRB.js} +205 -60
- package/dist/{chunk-GFIT3FRE.js → chunk-73O6AOAA.js} +63 -47
- package/dist/{chunk-DEYAI662.js → chunk-76UL4CT4.js} +60 -24
- package/dist/chunk-7BQK2UDV.js +13 -0
- package/dist/{chunk-NHYKSPL4.js → chunk-7EQU2TUN.js} +304 -119
- package/dist/{chunk-FS6ZE5TG.js → chunk-7FAO4ICF.js} +2 -2
- package/dist/{chunk-LSF76AS3.js → chunk-7MYJUJZV.js} +6 -2
- package/dist/{chunk-D2QMNHCC.js → chunk-7P7D6WXR.js} +11 -2
- package/dist/{chunk-GCSCHK5Y.js → chunk-A33MFWHW.js} +3 -3
- package/dist/{chunk-3C24WWUQ.js → chunk-A6XCVOC5.js} +1 -1
- package/dist/{chunk-O7DVW3IE.js → chunk-AFA32LHN.js} +134 -37
- package/dist/{chunk-WALYNKBN.js → chunk-AFGQXMKT.js} +264 -88
- package/dist/{chunk-ZTMZOKVC.js → chunk-AKJO6N4K.js} +3 -3
- package/dist/{chunk-P6TA7M3G.js → chunk-ANNQJWDX.js} +11 -11
- package/dist/{chunk-KFGZMHIB.js → chunk-AOIZJ7GR.js} +7 -7
- package/dist/chunk-B5A7X2BA.js +44 -0
- package/dist/{chunk-HGT3UKDW.js → chunk-BDCKHLUB.js} +16 -16
- package/dist/{chunk-NUCYUKVH.js → chunk-BFDPY7JM.js} +10 -3
- package/dist/{chunk-BK6P6KMW.js → chunk-BM2A3IGQ.js} +1 -1
- package/dist/{chunk-H3AEYPRP.js → chunk-BO5EJBLH.js} +249 -129
- package/dist/chunk-BQIADGJB.js +23 -0
- package/dist/{chunk-F6CVYNDY.js → chunk-BY5JGQFZ.js} +24 -7
- package/dist/{chunk-WDIVAU5U.js → chunk-C5SQEYTQ.js} +78 -57
- package/dist/{chunk-NCZWLV7T.js → chunk-CEMXGMQN.js} +2 -2
- package/dist/{chunk-6H3OSHEY.js → chunk-CIDOL4FO.js} +5 -5
- package/dist/{chunk-WAPCCJUB.js → chunk-CT4RFZO4.js} +6 -6
- package/dist/{chunk-7Q37C6GZ.js → chunk-CV3NC75L.js} +1 -1
- package/dist/{chunk-GDVR3XHT.js → chunk-D3PQAVFW.js} +23 -13
- package/dist/{chunk-GMJFCBR6.js → chunk-D5G67OER.js} +1 -1
- package/dist/{chunk-BFFPYT3Y.js → chunk-D5RAVZ5C.js} +6 -7
- package/dist/{chunk-FQF7GSJK.js → chunk-DJBMA4FW.js} +4 -4
- package/dist/{chunk-4DZFR52I.js → chunk-DPUCT567.js} +2 -2
- package/dist/{chunk-ZHFUMVW7.js → chunk-DYSEZVIJ.js} +18 -2
- package/dist/{chunk-SA46CNMS.js → chunk-ED7GLWTF.js} +4 -1
- package/dist/{chunk-YXM4W3TN.js → chunk-EDBUVDRI.js} +118 -68
- package/dist/{chunk-JBMWRXDS.js → chunk-EEBMK6T6.js} +6 -6
- package/dist/{chunk-CYKIX3IQ.js → chunk-EEL2N4Y6.js} +7 -8
- package/dist/{chunk-PYV6ZIR6.js → chunk-EFKFZNQC.js} +24 -18
- package/dist/{chunk-IOKWBUQP.js → chunk-EHNGPUTO.js} +6 -6
- package/dist/{chunk-ZBSNF5F7.js → chunk-EHQLLZCQ.js} +49 -22
- package/dist/{chunk-ONKSGT2M.js → chunk-EWR6WVOV.js} +6 -6
- package/dist/{chunk-MTRV3BJL.js → chunk-EY4OA4OF.js} +1005 -666
- package/dist/{chunk-Y3L655X6.js → chunk-F4JAGDPD.js} +6 -6
- package/dist/{chunk-LRCO4G7C.js → chunk-FAFUMSPR.js} +35 -26
- package/dist/{chunk-63L35UCI.js → chunk-FERP4WS3.js} +19 -9
- package/dist/{chunk-N5HN5QGH.js → chunk-FF7MV4D4.js} +1 -1
- package/dist/{chunk-G63WXSQP.js → chunk-FJKFYQ5I.js} +23 -18
- package/dist/chunk-FL3FQ2YA.js +27 -0
- package/dist/{chunk-YOOHNQ3L.js → chunk-FX5VZK5F.js} +4 -0
- package/dist/{chunk-37A6CLR5.js → chunk-G5BUGYIL.js} +70 -18
- package/dist/{chunk-JU7S52HI.js → chunk-G5CELEUR.js} +6 -6
- package/dist/{chunk-EW47LNWH.js → chunk-GADI2DU7.js} +11 -10
- package/dist/{chunk-F6OLHND5.js → chunk-GAFEN3H7.js} +2 -2
- package/dist/{chunk-EXDMYV5W.js → chunk-GC4WOLV3.js} +1 -1
- package/dist/{chunk-WFSOKGGA.js → chunk-GHFTKVJN.js} +1 -1
- package/dist/chunk-GKDUIDU6.js +138 -0
- package/dist/{chunk-LA5OYJ5P.js → chunk-GKQLKUMF.js} +188 -84
- package/dist/{chunk-LLDKKEUD.js → chunk-GS5UG6QD.js} +1 -1
- package/dist/{chunk-BWVNCLUS.js → chunk-H2POQ4LB.js} +5 -5
- package/dist/{chunk-WSJDLZSZ.js → chunk-H3EWFSWI.js} +97 -53
- package/dist/{chunk-XPOMQWXY.js → chunk-H6EJ63QN.js} +20 -18
- package/dist/{chunk-Q3E74U2W.js → chunk-HB3TH7GY.js} +3 -3
- package/dist/{chunk-MLGEBFEX.js → chunk-HC6WHTBX.js} +2 -2
- package/dist/{chunk-X7XTIM6U.js → chunk-HDSHS2QZ.js} +47 -32
- package/dist/{chunk-QBJDHFJJ.js → chunk-HFFKN7PA.js} +11 -6
- package/dist/{chunk-K5S3K6QK.js → chunk-HGPFEG2L.js} +7 -8
- package/dist/{chunk-7Z73MM35.js → chunk-HVX2E26J.js} +46 -26
- package/dist/{chunk-KAYBRD4F.js → chunk-I3DLERI7.js} +2 -2
- package/dist/{chunk-SPSGUFTI.js → chunk-I4NUYVP5.js} +1 -1
- package/dist/{chunk-OHGEDG46.js → chunk-I5ZADE2U.js} +1 -1
- package/dist/{chunk-CPGASWNN.js → chunk-I65OLJ2X.js} +1 -1
- package/dist/{chunk-LAVVML3X.js → chunk-I6QGYRY4.js} +3 -3
- package/dist/{chunk-N7N5NIAU.js → chunk-I7KDPCC7.js} +3 -3
- package/dist/{chunk-UF3HSFAE.js → chunk-IFURKTOL.js} +3 -3
- package/dist/{chunk-Y54LU4CU.js → chunk-IPWUBZ4P.js} +1 -1
- package/dist/{chunk-IQDMZ33D.js → chunk-IRXTNSZL.js} +10 -10
- package/dist/{chunk-GD5TYS5R.js → chunk-IUVJVMKS.js} +13 -13
- package/dist/{chunk-E5OEWMNX.js → chunk-IVQT2E3Y.js} +66 -36
- package/dist/{chunk-7DAH2E4T.js → chunk-IW3YUMPI.js} +2 -2
- package/dist/chunk-IXM6BAM4.js +53 -0
- package/dist/{chunk-XVUQMZWV.js → chunk-IZRTNCJQ.js} +5 -5
- package/dist/{chunk-KZH2QI6S.js → chunk-J22ETKDJ.js} +2 -2
- package/dist/{chunk-HJRNBKIT.js → chunk-JARJP576.js} +3 -3
- package/dist/{chunk-4YHZSPAJ.js → chunk-JHWDTV4K.js} +5 -1
- package/dist/{chunk-PQYJZMCR.js → chunk-JIH52I36.js} +79 -79
- package/dist/{chunk-LFUJTEJO.js → chunk-JKXJWCJ5.js} +71 -36
- package/dist/{chunk-2BP6X5GX.js → chunk-JMOBA5ES.js} +2 -2
- package/dist/{chunk-2TAK2ELB.js → chunk-JMXNXLAC.js} +5 -1
- package/dist/{chunk-Z5V6ZM76.js → chunk-JRRSKCGG.js} +3 -3
- package/dist/{chunk-IVRYF7QA.js → chunk-JSA3ESEJ.js} +1 -1
- package/dist/{chunk-NOCIN2EM.js → chunk-K6Y4HBK7.js} +32 -32
- package/dist/{chunk-WQT6HIIY.js → chunk-KAAB2DIV.js} +23 -13
- package/dist/{chunk-GM2HIU6C.js → chunk-KF3ZHLHQ.js} +7 -8
- package/dist/{chunk-3XOWXLLQ.js → chunk-KGS5Z7SL.js} +3 -3
- package/dist/{chunk-AIU4GZV5.js → chunk-KIXNHDXS.js} +7 -8
- package/dist/{chunk-ILFQ75N4.js → chunk-KJLH5EHD.js} +29 -29
- package/dist/{chunk-UIYXMPDW.js → chunk-KLQKHA3T.js} +6 -6
- package/dist/chunk-KQ2WZ6BY.js +11 -0
- package/dist/{chunk-5SLJGRUO.js → chunk-KUMJI5B6.js} +32 -18
- package/dist/{chunk-XYYRHGQI.js → chunk-L2XRUG4P.js} +7 -8
- package/dist/{chunk-JYBT2JNY.js → chunk-LE3LSEUL.js} +27 -2
- package/dist/{chunk-RTXRIZYU.js → chunk-LFX5BERN.js} +167 -70
- package/dist/{chunk-D7G27EYZ.js → chunk-LGMV7ZV4.js} +4 -4
- package/dist/{chunk-H4VDQ7OE.js → chunk-LO3AGGE3.js} +7 -8
- package/dist/{chunk-UNMIUILK.js → chunk-LSKCKGCF.js} +5 -1
- package/dist/{chunk-CVIW2MV4.js → chunk-LSR3SBJ4.js} +78 -37
- package/dist/{chunk-V634AXDM.js → chunk-LUZ7HXBT.js} +1 -1
- package/dist/{chunk-B3AXM3MT.js → chunk-LW4ZQGVL.js} +2 -2
- package/dist/{chunk-H3IBJQ5A.js → chunk-M2OQK2FO.js} +1 -1
- package/dist/{chunk-AZM4YNRE.js → chunk-M74H7QYD.js} +2 -2
- package/dist/{chunk-M427S3G7.js → chunk-MOQFYJ3F.js} +6 -6
- package/dist/{chunk-QRVIS2QB.js → chunk-MQ5EKWIG.js} +51 -9
- package/dist/{chunk-LHKDZAWN.js → chunk-MSYTF3DZ.js} +10 -3
- package/dist/{chunk-LD4LML5P.js → chunk-MTCDGSYW.js} +9 -1
- package/dist/{chunk-KHRAJDBM.js → chunk-NCCDEUHD.js} +1 -1
- package/dist/{chunk-IGVAWAOK.js → chunk-NIDH22DI.js} +31 -7
- package/dist/{chunk-IF2ZABAM.js → chunk-NINK4G7U.js} +2 -2
- package/dist/{chunk-F5V7YFKS.js → chunk-NO7GRVUU.js} +10 -8
- package/dist/{chunk-EBVJCVXL.js → chunk-NRYERHEI.js} +6 -6
- package/dist/{chunk-OJ2BPQGQ.js → chunk-O4D27FKH.js} +1 -1
- package/dist/{chunk-RYPJB3RO.js → chunk-O7Y6RJ4D.js} +23 -11
- package/dist/{chunk-2C4SYWZ3.js → chunk-OAT6FWKL.js} +7 -8
- package/dist/{chunk-VL7WLE4H.js → chunk-OF7FMGH5.js} +6 -6
- package/dist/{chunk-V3MSLNSD.js → chunk-OKM5LYYP.js} +7 -8
- package/dist/{chunk-YV5KYGE5.js → chunk-OQQMDSCC.js} +1 -1
- package/dist/{chunk-QKWBDH2L.js → chunk-OTGNVAI4.js} +2 -2
- package/dist/{chunk-HFRQLMKK.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-MQYIBGZE.js → chunk-Q7VPTN5X.js} +4 -4
- package/dist/{chunk-XZLU3G23.js → chunk-QFIRPOXR.js} +6 -2
- package/dist/{chunk-QBRRJ5OR.js → chunk-QHPJ5ZKS.js} +6 -6
- package/dist/{chunk-R27IDIJI.js → chunk-QLWUFEKR.js} +6 -6
- package/dist/{chunk-COQEHO7B.js → chunk-QNLESRH6.js} +3 -1
- package/dist/{chunk-5UVJKB7L.js → chunk-QRZESG66.js} +40 -29
- package/dist/{chunk-KND4OM4B.js → chunk-QYOZ46ZQ.js} +70 -23
- package/dist/{chunk-HLOXWM2O.js → chunk-QZMLSK43.js} +244 -74
- package/dist/{chunk-NGA7ICG4.js → chunk-RDJ3ZU6O.js} +16 -13
- package/dist/{chunk-AF7EB6N6.js → chunk-RHBQ2Q5H.js} +104 -47
- package/dist/{chunk-Y2CAIAUI.js → chunk-RHVP62HI.js} +6 -6
- package/dist/{chunk-EAR43REB.js → chunk-RMVCKO6N.js} +16 -14
- package/dist/chunk-RRPTQGRU.js +47 -0
- package/dist/{chunk-IF76JRXT.js → chunk-S2TSXUYP.js} +6 -6
- package/dist/{chunk-O2KKQNGW.js → chunk-SD6ENKTO.js} +7 -2
- package/dist/{chunk-J5PL6JLL.js → chunk-SGDWLXUC.js} +1 -1
- package/dist/{chunk-75TWO5B2.js → chunk-SHAAMKN7.js} +45 -24
- package/dist/{chunk-NB7M4KX4.js → chunk-SHCW2TCA.js} +11 -11
- package/dist/{chunk-3ZAH24P6.js → chunk-SSZB3VXG.js} +19 -19
- package/dist/chunk-SXAZDIGM.js +84 -0
- package/dist/{chunk-QHRE2M6V.js → chunk-T2L5H2WW.js} +4 -3
- package/dist/{chunk-ODZJ4LW7.js → chunk-T3WCDDIL.js} +7 -2
- package/dist/{chunk-OOFSQ5AS.js → chunk-T5MBORBK.js} +1 -1
- package/dist/{chunk-OY2UJ4XK.js → chunk-TDDSWNGD.js} +25 -17
- package/dist/{chunk-5DMHMQFP.js → chunk-TGR6PRKG.js} +3 -3
- package/dist/{chunk-EGPXEY2K.js → chunk-TKERVBJ3.js} +7 -8
- package/dist/{chunk-6C64IBOG.js → chunk-TMXRTYGT.js} +10 -4
- package/dist/{chunk-RNIYG6PI.js → chunk-TQ5HHNM3.js} +2 -2
- package/dist/{chunk-LF6RTFNK.js → chunk-TWRFVW3J.js} +5 -3
- package/dist/{chunk-7FKY6YWU.js → chunk-TXMS7QUJ.js} +3 -3
- package/dist/{chunk-H5L2P2GO.js → chunk-UBXIGE2P.js} +3 -2
- package/dist/{chunk-7Q2WV6D2.js → chunk-UCIAHSJK.js} +2 -2
- package/dist/{chunk-BVYIKLQ5.js → chunk-UD6U4EF5.js} +1 -1
- package/dist/{chunk-4CJ6UCX4.js → chunk-UFZXZJJG.js} +5 -5
- package/dist/{chunk-SNQ7D5R7.js → chunk-UIHGGWES.js} +51 -11
- package/dist/{chunk-CKNOLGRR.js → chunk-UP4JSNDR.js} +1 -1
- package/dist/{chunk-3B3K7TD5.js → chunk-USFIDSTO.js} +8 -6
- 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-NA6WLZ66.js → chunk-VFLMBA2M.js} +68 -18
- package/dist/chunk-VJ7VBB6S.js +58 -0
- package/dist/{chunk-32IKJMUF.js → chunk-VM5CQ7CG.js} +3 -3
- package/dist/{chunk-6WZZADRL.js → chunk-VMGTNB6H.js} +6 -6
- package/dist/{chunk-WWIY6BBY.js → chunk-VT7PBGL2.js} +8 -8
- package/dist/{chunk-3L2VXXM4.js → chunk-VY2NPB2Q.js} +2 -2
- package/dist/{chunk-QEP3X3OV.js → chunk-VY67Q6CJ.js} +20 -20
- package/dist/{chunk-W45AR6EW.js → chunk-W5SVS4B6.js} +2 -2
- package/dist/{chunk-U7W7GYXP.js → chunk-W7Q6PLT4.js} +37 -37
- package/dist/{chunk-7GVYMGLK.js → chunk-WDAZ2MT4.js} +8 -4
- package/dist/{chunk-T5Y4HXYO.js → chunk-WE5WVQE4.js} +13 -1
- package/dist/chunk-WJQX7HBH.js +54 -0
- package/dist/{chunk-EC2PGJ64.js → chunk-WKWCNS6K.js} +6 -6
- package/dist/{chunk-2ALFFOKB.js → chunk-WSKZZ2ZB.js} +14 -14
- package/dist/{chunk-5SHI57XD.js → chunk-WZB6R2ZX.js} +7 -5
- package/dist/{chunk-MEMPP7VZ.js → chunk-X5OVVMZX.js} +1 -1
- package/dist/{chunk-UDKYY27B.js → chunk-XCROSJ2Z.js} +1 -1
- package/dist/{chunk-ROLR7HRB.js → chunk-XFCBH3TI.js} +3 -3
- package/dist/{chunk-XMN3Z43K.js → chunk-XJUZC53Y.js} +1 -1
- package/dist/chunk-XN7JDII2.js +2047 -0
- package/dist/{chunk-RUWNG2JC.js → chunk-XNV7VOIT.js} +4 -4
- package/dist/{chunk-KC52E5G4.js → chunk-XR7VOF2V.js} +10 -8
- package/dist/{chunk-Z2X4JQNY.js → chunk-XYUXB5VK.js} +8 -3
- package/dist/{chunk-SC42DPNV.js → chunk-Y5IKCXQR.js} +7 -8
- package/dist/{chunk-YLC42C3M.js → chunk-Y5WHM2Q5.js} +1 -1
- package/dist/{chunk-IGNBQT23.js → chunk-Y7Q3VEYC.js} +96 -5
- package/dist/{chunk-O6NJDRXE.js → chunk-YB6QGOCO.js} +2 -2
- package/dist/{chunk-AM2CG7VX.js → chunk-YBYV56FS.js} +3 -3
- package/dist/{chunk-O4WJWHCH.js → chunk-YCUNFAEE.js} +90 -42
- package/dist/{chunk-V7F4F6JA.js → chunk-YFI5PN5O.js} +5 -7
- package/dist/{chunk-SBR2RLEQ.js → chunk-YGPLUENN.js} +89 -59
- package/dist/chunk-YGZEG3JV.js +123 -0
- package/dist/{chunk-WG5CJGLU.js → chunk-YJGFT63R.js} +8 -3
- package/dist/{chunk-KEDNHCGB.js → chunk-YNHPPZ7S.js} +1 -1
- package/dist/{chunk-EZZ533MH.js → chunk-YO5UKKCQ.js} +1 -1
- package/dist/{chunk-SZXKV3BX.js → chunk-YTEJYLU7.js} +5 -1
- package/dist/{chunk-33FCWTGT.js → chunk-Z257SH5U.js} +1 -1
- package/dist/{chunk-O7W35PT3.js → chunk-Z2BDTZDT.js} +14 -12
- package/dist/{chunk-EQRFSVDD.js → chunk-ZDD3MJ2H.js} +1 -1
- package/dist/{chunk-APQPYM2Z.js → chunk-ZNX5J7D7.js} +3 -3
- package/dist/{chunk-VBVG6NEL.js → chunk-ZSYU6LIH.js} +5 -5
- package/dist/{chunk-2YNF6AHH.js → chunk-ZTSJ7NY6.js} +6 -2
- package/dist/chunk-ZV3SNRJI.js +122 -0
- package/dist/cli/index.js +1 -1
- package/dist/{core-6HMJHFRR.js → core-4M4RY7MX.js} +4 -1
- package/dist/{core-RPQBIOU4.js → core-4PW4MXWR.js} +4 -1
- package/dist/{core-MV6KGAUV.js → core-5S5CJHBG.js} +5 -1
- package/dist/{core-XMTKUXLO.js → core-7TTM4KRP.js} +6 -1
- package/dist/{core-EYJ3WJK4.js → core-7XKNJM7Y.js} +4 -1
- package/dist/{core-3IJPBNGC.js → core-A7HXVSKB.js} +5 -1
- package/dist/{core-CLLIG7ZU.js → core-AMWCZTOT.js} +2 -1
- package/dist/{core-2YTKFBNZ.js → core-AVA4XLQ2.js} +4 -1
- package/dist/{core-UAY2G7LN.js → core-BJZEJ63L.js} +5 -1
- package/dist/{core-PTRQPQTO.js → core-CCB3IXGD.js} +4 -1
- package/dist/{core-HJUGHAX7.js → core-D2OIGYC7.js} +2 -1
- package/dist/{core-NTWHFDM4.js → core-DMDAXVMY.js} +3 -1
- package/dist/{core-2SICIP63.js → core-EMSJRGSE.js} +3 -4
- package/dist/{core-MEC6A5DD.js → core-FCSA74RT.js} +2 -1
- package/dist/{core-CBEGB2NO.js → core-FTQBESDS.js} +3 -1
- package/dist/{core-GRWI22NS.js → core-GS4DXDDG.js} +4 -1
- package/dist/{core-CAL7YNFC.js → core-JDZDBTID.js} +2 -1
- package/dist/{core-H7KMWYP5.js → core-L3UR75IJ.js} +2 -1
- package/dist/{core-JMYMIH6Z.js → core-MAW4S3KA.js} +4 -1
- package/dist/{core-T4ZH3FAU.js → core-N2JEWJ7D.js} +3 -1
- package/dist/{core-T2KHX5LG.js → core-OBPTBKX6.js} +4 -1
- package/dist/{core-CTZLHGXE.js → core-OFPPRHYY.js} +5 -1
- package/dist/{core-QABTVASG.js → core-QFAVWFI3.js} +5 -1
- package/dist/{core-FX7HRKTF.js → core-QM34237W.js} +9 -1
- package/dist/{core-GQC6VDW5.js → core-SKMHEA4Y.js} +5 -1
- package/dist/{core-VBR253SM.js → core-T3OSZOVV.js} +2 -1
- package/dist/{core-7JKE7H32.js → core-UNX4ZV4M.js} +4 -1
- package/dist/core-VRVL6LIM.js +49 -0
- package/dist/{core-OIC5KJSD.js → core-VT35VDVS.js} +4 -1
- package/dist/{core-3647Z25D.js → core-VWYXK2R3.js} +4 -1
- package/dist/{core-YEFGEW3Z.js → core-WNT6ZMRO.js} +5 -1
- package/dist/{core-VMIBBHXI.js → core-WP73P4CW.js} +4 -1
- package/dist/{core-ULZ7XUQP.js → core-WPEYRK6Y.js} +2 -1
- package/dist/{core-PMYCLXT7.js → core-WXZJ7V7S.js} +2 -1
- package/dist/{core-KEB5PBCO.js → core-XKXDXALI.js} +3 -1
- package/dist/{core-OWCTIPHD.js → core-ZACFV6XR.js} +2 -1
- package/dist/{core-BMY7OL76.js → core-ZSERZGK6.js} +5 -1
- package/dist/{dataTable-2ZXK54TP.js → dataTable-7IO546LM.js} +11 -2
- package/dist/{engine-HGXSWGOI.js → engine-US3N6UCH.js} +51 -15
- 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 +32 -19
- package/dist/{main-PVT6FMGC.js → main-2UWKGUHR.js} +28 -13
- package/dist/mcp/server.js +24 -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 +27 -19
- package/dist/react/funnel.js +6 -1
- package/dist/react/gantt.js +8 -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 +94 -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 +36 -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 +12 -1
- package/dist/react/story.js +5 -3
- 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-JTDPTWXG.js → rowsModule-DYDVHBAX.js} +2 -1
- package/dist/{schema-GLN7IHSH.js → schema-3KMU5737.js} +1 -1
- package/dist/{schema-NVMEOHAW.js → schema-4JRNXEZF.js} +3 -1
- package/dist/{schema-7CPGNCOL.js → schema-626QXX4G.js} +3 -1
- package/dist/{schema-BMD5JR3Y.js → schema-6PL46VXZ.js} +3 -1
- package/dist/{schema-2Q7IJ22V.js → schema-6V5K3J2V.js} +4 -1
- package/dist/{schema-3XLO43SX.js → schema-A2XUZUCV.js} +3 -1
- package/dist/{schema-XKY2EQFH.js → schema-CNJ4Y6CT.js} +3 -1
- package/dist/{schema-BKHQ3ZUH.js → schema-DHMMGDTI.js} +3 -1
- package/dist/{schema-XHKSGMUH.js → schema-F2Q6MH7W.js} +3 -1
- package/dist/{schema-GGG2VOY7.js → schema-FC6J6KZC.js} +5 -1
- package/dist/{schema-ZE7WUNFS.js → schema-FGE5YK3S.js} +3 -1
- package/dist/{schema-WZLWHOMY.js → schema-FSYDLMGD.js} +1 -1
- package/dist/{schema-FYULDJFB.js → schema-G5KSSI5W.js} +1 -1
- package/dist/{schema-V3BPW4LA.js → schema-GXOG4MXL.js} +1 -1
- package/dist/{schema-76XRTBCJ.js → schema-HEB6ZDI5.js} +3 -1
- package/dist/{schema-HIDW4BA4.js → schema-I44IDRGD.js} +1 -1
- package/dist/{schema-BOGTPL7F.js → schema-IFTIMTS3.js} +1 -1
- package/dist/{schema-KIJA53MB.js → schema-IUY7VYHJ.js} +3 -1
- package/dist/{schema-C7NVOQNV.js → schema-J4HCSD5C.js} +5 -2
- package/dist/{schema-WIZ2TZAT.js → schema-JCU6LTYD.js} +1 -1
- package/dist/{schema-5KHDHTIX.js → schema-JJWORI7D.js} +3 -1
- package/dist/{schema-BUTNGYTT.js → schema-K4V4PYBO.js} +3 -1
- package/dist/{schema-LHMEXFLY.js → schema-LGLQBRC4.js} +3 -1
- package/dist/{schema-5753NOAL.js → schema-MD22QYZU.js} +1 -1
- package/dist/{schema-2M3LXR35.js → schema-MGETMQYC.js} +3 -1
- package/dist/{schema-FZKNIAIH.js → schema-MQB6CE5V.js} +3 -1
- package/dist/{schema-U26KG42U.js → schema-NMIYKGHE.js} +3 -1
- package/dist/{schema-MT6NA5AL.js → schema-NOBNFD2F.js} +3 -1
- package/dist/{schema-3OLBUVMZ.js → schema-OXO2XY4Y.js} +1 -1
- package/dist/{schema-G2PLJCYL.js → schema-PHIHMDVB.js} +1 -1
- package/dist/{schema-UHHFTVGS.js → schema-UXWKA3PI.js} +3 -1
- package/dist/{schema-J53LCIY3.js → schema-WBOPCTPC.js} +1 -1
- package/dist/{schema-TA3MSAPQ.js → schema-WFGDVBJK.js} +1 -1
- package/dist/{schema-MUTAVQMI.js → schema-WX2RS4OU.js} +3 -1
- package/dist/{schema-XATDKZPW.js → schema-XIHAKX3B.js} +18 -1
- package/dist/{schema-LEQNLBNG.js → schema-XRSORYBI.js} +3 -1
- package/dist/{schema-FNTAAXQ3.js → schema-YDZCGL56.js} +3 -1
- package/dist/{specValidation-X5XJBPTP.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 +5 -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/format.d.ts +4 -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/label/categoryRow.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 +23 -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 +18 -3
- package/dist/types/react/prepare.d.ts +7 -1
- package/dist/types/theme.d.ts +2 -0
- package/dist/validate.js +16 -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 +15 -2
- 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/line.md +1 -1
- 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 +2 -2
- 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-FI5EXISD.js +0 -27
- package/dist/chunk-O36WX56O.js +0 -13
- package/dist/chunk-YGTNVZJE.js +0 -89
- package/dist/chunk-ZGHBDMYF.js +0 -24
- package/dist/chunk-ZLYQWUNR.js +0 -1794
- package/dist/core-SKRADU7T.js +0 -41
|
@@ -1,55 +1,65 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compactBulletRefusals
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LE3LSEUL.js";
|
|
4
4
|
import {
|
|
5
5
|
valueLineExtent
|
|
6
6
|
} from "./chunk-QPWRHDLZ.js";
|
|
7
7
|
import {
|
|
8
8
|
warnMissingValue
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-I3DLERI7.js";
|
|
10
10
|
import {
|
|
11
11
|
asColumnHeads,
|
|
12
12
|
columnHeadFont,
|
|
13
13
|
fitHead,
|
|
14
14
|
headRequest
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
labelOn
|
|
18
|
-
} from "./chunk-EZZ533MH.js";
|
|
15
|
+
} from "./chunk-2KCK63DD.js";
|
|
19
16
|
import {
|
|
20
17
|
runAnnotatePass
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UCIAHSJK.js";
|
|
22
19
|
import {
|
|
23
20
|
rowLabelBand
|
|
24
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PSYPB22T.js";
|
|
25
22
|
import {
|
|
26
23
|
fittedLabel,
|
|
27
24
|
gutterBudget,
|
|
28
25
|
stepDownFont
|
|
29
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XFCBH3TI.js";
|
|
30
27
|
import {
|
|
31
28
|
breakUnsupported
|
|
32
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-IW3YUMPI.js";
|
|
30
|
+
import {
|
|
31
|
+
chartString
|
|
32
|
+
} from "./chunk-ZV3SNRJI.js";
|
|
33
33
|
import {
|
|
34
34
|
cardFrameTheme,
|
|
35
35
|
cardSize
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-VT7PBGL2.js";
|
|
37
37
|
import {
|
|
38
38
|
categoryTargetFields,
|
|
39
39
|
spliceAnnotationNodes
|
|
40
40
|
} from "./chunk-CDZHNLO6.js";
|
|
41
41
|
import {
|
|
42
42
|
BAND_PAD
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-O4D27FKH.js";
|
|
44
|
+
import {
|
|
45
|
+
labelOn
|
|
46
|
+
} from "./chunk-YO5UKKCQ.js";
|
|
44
47
|
import {
|
|
45
48
|
structureCount
|
|
46
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-XCROSJ2Z.js";
|
|
50
|
+
import {
|
|
51
|
+
alignedLeft,
|
|
52
|
+
alignedRight,
|
|
53
|
+
authoredTrackWidth,
|
|
54
|
+
columnOverrideWarnings,
|
|
55
|
+
orderedBlocks
|
|
56
|
+
} from "./chunk-GKDUIDU6.js";
|
|
47
57
|
import {
|
|
48
58
|
bandFor
|
|
49
59
|
} from "./chunk-263SZKIL.js";
|
|
50
60
|
import {
|
|
51
|
-
|
|
52
|
-
} from "./chunk-
|
|
61
|
+
generatedIdWarnings
|
|
62
|
+
} from "./chunk-SXAZDIGM.js";
|
|
53
63
|
import {
|
|
54
64
|
CARD_MIN_WIDTH,
|
|
55
65
|
applyAxisBounds,
|
|
@@ -67,7 +77,7 @@ import {
|
|
|
67
77
|
shownTickStep,
|
|
68
78
|
straightBreakGlyph,
|
|
69
79
|
valueAxisTitleRequest
|
|
70
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-AFGQXMKT.js";
|
|
71
81
|
import {
|
|
72
82
|
PRIORITY,
|
|
73
83
|
authoredFootnoteCount,
|
|
@@ -85,20 +95,22 @@ import {
|
|
|
85
95
|
rowLabelX,
|
|
86
96
|
solveFrame,
|
|
87
97
|
solveLabels
|
|
88
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-WSKZZ2ZB.js";
|
|
99
|
+
import {
|
|
100
|
+
emptyIdRecord
|
|
101
|
+
} from "./chunk-LINZPU5D.js";
|
|
89
102
|
import {
|
|
90
103
|
defaultFormatSpec,
|
|
91
104
|
exampleSpec,
|
|
92
105
|
formatWithSpec,
|
|
93
106
|
parseFormatExample,
|
|
94
107
|
roundedNumber
|
|
95
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-D3PQAVFW.js";
|
|
96
109
|
import {
|
|
97
110
|
autoDecimals,
|
|
98
|
-
chartStrings,
|
|
99
111
|
formatAutomaticNumber,
|
|
100
112
|
formatAutomaticPercent
|
|
101
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-MSYTF3DZ.js";
|
|
102
114
|
import {
|
|
103
115
|
cellMeta,
|
|
104
116
|
cellValue,
|
|
@@ -120,7 +132,7 @@ import {
|
|
|
120
132
|
strokeToken,
|
|
121
133
|
tableHeadFloorPx,
|
|
122
134
|
textScaleOf
|
|
123
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-JARJP576.js";
|
|
124
136
|
import {
|
|
125
137
|
contrastRatio
|
|
126
138
|
} from "./chunk-DRHQG44U.js";
|
|
@@ -133,7 +145,7 @@ import {
|
|
|
133
145
|
resolveHighlight,
|
|
134
146
|
resolveSize,
|
|
135
147
|
resolveSubtitle
|
|
136
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-FX5VZK5F.js";
|
|
137
149
|
import {
|
|
138
150
|
maxOf,
|
|
139
151
|
minOf,
|
|
@@ -141,122 +153,7 @@ import {
|
|
|
141
153
|
} from "./chunk-WYJEOMNY.js";
|
|
142
154
|
import {
|
|
143
155
|
defaultMeasurer
|
|
144
|
-
} from "./chunk-
|
|
145
|
-
|
|
146
|
-
// src/core/strings/bullet.ts
|
|
147
|
-
var EN = {
|
|
148
|
-
// reader-facing wording linked only by its consumers.
|
|
149
|
-
band: "Band",
|
|
150
|
-
start: "Start",
|
|
151
|
-
end: "End",
|
|
152
|
-
category: "Category",
|
|
153
|
-
attainment: "Attainment",
|
|
154
|
-
betterCapital: "Better",
|
|
155
|
-
worseCapital: "Worse",
|
|
156
|
-
bulletTargetTitle: "Bullet chart: {v1} KPIs in percent of {v2}",
|
|
157
|
-
kpisCount: "{v1} KPIs",
|
|
158
|
-
kpiRowsCount: "{v1} KPI rows",
|
|
159
|
-
bulletTargetDesc: "Bullet chart with {v1} KPI rows on one scale in percent of {v2} from 0 to {v3}%",
|
|
160
|
-
bulletBandsDesc: ". Bands mark below 80% of {v1}, 80 to 100%, and at or above {v2}; one line marks 100%. ",
|
|
161
|
-
bulletMirroredBandsDesc: ". Bands mark more than 20% off {v1}, up to 20% off, and on {v2} or better: below 80%, 80 to 100% and 100% and above where higher is better, above 120%, 100 to 120% and up to 100% where lower is better; one line marks 100%. ",
|
|
162
|
-
bulletLowerBandsDesc: ". Bands mark more than 20% off {v1}, up to 20% off, and on {v2} or better, where lower is better: above 120%, 100 to 120% and up to 100%; one line marks 100%. ",
|
|
163
|
-
bulletNeutralBandsDesc: "Neutral rows have no better side: up to 20% off {v1} runs from 80 to 120%, more than 20% off lies beyond, and only the line marks on {v1}. ",
|
|
164
|
-
bulletNeutralOnlyBandsDesc: ". No side is better: bands mark up to 20% off {v1}, from 80 to 120%, and more than 20% off beyond that; one line marks 100%. ",
|
|
165
|
-
bulletBelowLower: "Below {v1}, lower is better",
|
|
166
|
-
aboveTarget: "Above {v1}",
|
|
167
|
-
belowTarget: "Below {v1}",
|
|
168
|
-
bulletDescStart: "Bullet chart with {v1} KPI rows: a dark bar shows the actual value",
|
|
169
|
-
bulletTargetTick: " and a vertical tick marks the {v1}.",
|
|
170
|
-
bulletShadingDesc: " Background bands shade from darker grey (poor) to lighter grey (good); rows where lower is better invert the shading.",
|
|
171
|
-
bulletSeparateScale: " Each row is drawn on its own scale, so bar lengths compare within a row, not across rows.",
|
|
172
|
-
bulletTitle: "Bullet chart: {v1} KPIs vs {v2}",
|
|
173
|
-
none: "none",
|
|
174
|
-
horizontal: "horizontal",
|
|
175
|
-
top: "top",
|
|
176
|
-
left: "left",
|
|
177
|
-
lowerBetterHint: " \xB7 lower is better",
|
|
178
|
-
middle3: "Middle",
|
|
179
|
-
middle5: "Middle",
|
|
180
|
-
lowerMiddle: "Lower middle",
|
|
181
|
-
upperMiddle: "Upper middle",
|
|
182
|
-
belowTarget80: "below 80% of {v1}",
|
|
183
|
-
atOrAboveTarget: "at or above {v1}",
|
|
184
|
-
offTargetOver20: "more than 20% off {v1}",
|
|
185
|
-
offTargetUpTo20: "up to 20% off {v1}",
|
|
186
|
-
onTargetOrBetter: "on {v1} or better",
|
|
187
|
-
ofTarget: "of {v1}",
|
|
188
|
-
toneGood: "good",
|
|
189
|
-
toneBad: "bad",
|
|
190
|
-
toneWarn: "warn",
|
|
191
|
-
toneNeutral: "neutral",
|
|
192
|
-
// column heads and the first key band of the percent-of-target rows.
|
|
193
|
-
actualColumn: "Actual",
|
|
194
|
-
shareColumn: "% of {v1}",
|
|
195
|
-
deltaColumn: "vs {v1}",
|
|
196
|
-
below80: "below 80%",
|
|
197
|
-
// target and gap column heads beside KPI rows, and the line under each gap.
|
|
198
|
-
targetColumn: "Target",
|
|
199
|
-
gapColumn: "Gap to {v1}",
|
|
200
|
-
gapBelow: "below {v1}",
|
|
201
|
-
gapAbove: "above {v1}",
|
|
202
|
-
gapOn: "on {v1}"
|
|
203
|
-
}, DE = {
|
|
204
|
-
// reader-facing wording linked only by its consumers.
|
|
205
|
-
band: "Band",
|
|
206
|
-
start: "Start",
|
|
207
|
-
end: "Ende",
|
|
208
|
-
category: "Kategorie",
|
|
209
|
-
attainment: "Zielerreichung",
|
|
210
|
-
betterCapital: "Besser",
|
|
211
|
-
worseCapital: "Schlechter",
|
|
212
|
-
bulletTargetTitle: "Bullet-Diagramm: {v1} {v1|KPI|KPIs} als Prozent von {v2}",
|
|
213
|
-
kpisCount: "{v1} {v1|KPI|KPIs}",
|
|
214
|
-
kpiRowsCount: "{v1} {v1|KPI-Zeile|KPI-Zeilen}",
|
|
215
|
-
bulletTargetDesc: "Bullet-Diagramm mit {v1} {v1|KPI-Zeile|KPI-Zeilen} auf einer Skala als Prozent von {v2} von 0 bis {v3} %",
|
|
216
|
-
bulletBandsDesc: ". B\xE4nder zeigen unter 80 % von {v1}, 80 bis 100 %, sowie {v2} oder h\xF6her. Eine Linie zeigt 100 %. ",
|
|
217
|
-
bulletMirroredBandsDesc: ". B\xE4nder zeigen mehr als 20 % vom {v1} entfernt, bis 20 % entfernt sowie {v2} erreicht oder besser: unter 80 %, 80 bis 100 % und \xFCber 100 %, wo h\xF6here Werte g\xFCnstiger sind, \xFCber 120 %, 100 bis 120 % und bis 100 %, wo niedrigere Werte g\xFCnstiger sind. Eine Linie zeigt 100 %. ",
|
|
218
|
-
bulletLowerBandsDesc: ". B\xE4nder zeigen mehr als 20 % vom {v1} entfernt, bis 20 % entfernt sowie {v2} erreicht oder besser, wo niedrigere Werte g\xFCnstiger sind: \xFCber 120 %, 100 bis 120 % und bis 100 %. Eine Linie zeigt 100 %. ",
|
|
219
|
-
bulletNeutralBandsDesc: "Neutrale Zeilen haben keine bessere Seite: bis 20 % vom {v1} entfernt reicht von 80 bis 120 %, mehr als 20 % entfernt liegt au\xDFerhalb, und nur die Linie zeigt {v1} erreicht. ",
|
|
220
|
-
bulletNeutralOnlyBandsDesc: ". Keine Seite ist g\xFCnstiger: B\xE4nder zeigen bis 20 % vom {v1} entfernt, von 80 bis 120 %, und mehr als 20 % entfernt au\xDFerhalb davon. Eine Linie zeigt 100 %. ",
|
|
221
|
-
bulletBelowLower: "Unter {v1}, niedriger ist besser",
|
|
222
|
-
aboveTarget: "\xDCber {v1}",
|
|
223
|
-
belowTarget: "Unter {v1}",
|
|
224
|
-
bulletDescStart: "Bullet-Diagramm mit {v1} {v1|KPI-Zeile|KPI-Zeilen}: Ein dunkler Balken zeigt den Istwert",
|
|
225
|
-
bulletTargetTick: " und ein senkrechter Strich zeigt {v1}.",
|
|
226
|
-
bulletShadingDesc: " Hintergrundb\xE4nder reichen von dunklerem Grau (schlecht) bis hellerem Grau (gut). Zeilen mit g\xFCnstigeren niedrigen Werten kehren die Schattierung um.",
|
|
227
|
-
bulletSeparateScale: " Jede Zeile nutzt ihre eigene Skala. Balkenl\xE4ngen sind innerhalb einer Zeile vergleichbar, aber nicht zwischen Zeilen.",
|
|
228
|
-
bulletTitle: "Bullet-Diagramm: {v1} {v1|KPI|KPIs} vs {v2}",
|
|
229
|
-
none: "keine",
|
|
230
|
-
horizontal: "horizontal",
|
|
231
|
-
top: "oben",
|
|
232
|
-
left: "links",
|
|
233
|
-
lowerBetterHint: " \xB7 niedriger ist besser",
|
|
234
|
-
middle3: "Mittel",
|
|
235
|
-
middle5: "Mitte",
|
|
236
|
-
lowerMiddle: "Untere Mitte",
|
|
237
|
-
upperMiddle: "Obere Mitte",
|
|
238
|
-
belowTarget80: "unter 80 % von {v1}",
|
|
239
|
-
atOrAboveTarget: "{v1} oder h\xF6her",
|
|
240
|
-
offTargetOver20: "mehr als 20 % vom {v1} entfernt",
|
|
241
|
-
offTargetUpTo20: "bis 20 % vom {v1} entfernt",
|
|
242
|
-
onTargetOrBetter: "{v1} erreicht oder besser",
|
|
243
|
-
ofTarget: "von {v1}",
|
|
244
|
-
toneGood: "gut",
|
|
245
|
-
toneBad: "schlecht",
|
|
246
|
-
toneWarn: "Warnung",
|
|
247
|
-
toneNeutral: "neutral",
|
|
248
|
-
// column heads and the first key band of the percent-of-target rows.
|
|
249
|
-
actualColumn: "Ist",
|
|
250
|
-
shareColumn: "% von {v1}",
|
|
251
|
-
deltaColumn: "vs {v1}",
|
|
252
|
-
below80: "unter 80 %",
|
|
253
|
-
// target and gap column heads beside KPI rows, and the line under each gap.
|
|
254
|
-
targetColumn: "Ziel",
|
|
255
|
-
gapColumn: "Abweichung vom {v1}",
|
|
256
|
-
gapBelow: "unter {v1}",
|
|
257
|
-
gapAbove: "\xFCber {v1}",
|
|
258
|
-
gapOn: "{v1} erreicht"
|
|
259
|
-
}, { chartString } = chartStrings(EN, DE);
|
|
156
|
+
} from "./chunk-UIHGGWES.js";
|
|
260
157
|
|
|
261
158
|
// src/core/charts/bullet/targetScale.ts
|
|
262
159
|
function targetWord(options) {
|
|
@@ -299,18 +196,25 @@ function percentOfTarget(row) {
|
|
|
299
196
|
return 100 * row.value / row.target;
|
|
300
197
|
}
|
|
301
198
|
function layoutTargetScale(input) {
|
|
302
|
-
let { rows, options, theme, size, measure, frame: frameResult, occupied, warnings, highlights, labelOn: labelOn2 } = input, plot0 = frameResult.plot, locale = options.locale?.language, target = targetWord(options), renderTarget = options.target ?? DEFAULT_TARGET, textScale = textScaleOf(options), family = theme.type.family, noteSize = Math.max(theme.type.footnote.size, readerFloorPx(renderTarget, "label", textScale)), nameFont = { family, ...theme.type.label, weight: 600 }, valueFont = { family, ...theme.type.label }, shareFont = { family, ...theme.type.label, weight: emphasisWeight(theme) }, noteFont = { family, ...theme.type.footnote, size: noteSize }, deltaFont = { ...noteFont }, headerFont = { family, ...theme.type.footnote, size: Math.max(theme.type.footnote.size, tableHeadFloorPx(renderTarget, textScale), readerFloorPx(renderTarget, "label", textScale)) }, tickFont = { family, ...theme.type.axis, size: Math.min(secondaryType(theme).size, Math.max(theme.type.footnote.size, readerFloorPx(renderTarget, "secondary", textScale))) }, nameLineH = nameFont.size * 1.2, noteLineH = noteFont.size * 1.2, line1H = Math.max(measure("0", nameFont).height, measure("0", valueFont).height), line2H = Math.max(measure("0", noteFont).height, measure("0", deltaFont).height), shares = rows.map((row) => percentOfTarget(row)), shareText = (share) => share > 0 && share < 0.5 ? "<1%" : formatAutomaticPercent(share, 0, !1, locale), valueTexts = rows.map((row) => labelOn2("point") ? input.valueText(row) : null), shareTexts = shares.map((share) => share === void 0 || !labelOn2("point") ? null : shareText(share)), deltas = rows.map((row) => labelOn2("annotation") ? input.deltaVsTarget[row.id] : void 0), deltaTexts = rows.map((row, index) => deltas[index] === void 0 ? null : input.deltaText(row, deltas[index])), deltaBodies = rows.map((row, index) => deltas[index] === void 0 ? null : input.deltaBody(row, deltas[index])), widest = (texts, font) => Math.max(0, maxOf(texts.map((text) => text ? measure(text, font).width : 0))), valueW = widest(valueTexts, valueFont), shareW = widest(shareTexts, shareFont), deltaBodyW = widest(deltaBodies, deltaFont), deltaW = widest(deltaTexts, deltaFont), headEnv = { target: renderTarget, textScale },
|
|
199
|
+
let { rows, options, theme, size, measure, frame: frameResult, occupied, warnings, highlights, labelOn: labelOn2 } = input, plot0 = frameResult.plot, locale = options.locale?.language, target = targetWord(options), renderTarget = options.target ?? DEFAULT_TARGET, textScale = textScaleOf(options), family = theme.type.family, noteSize = Math.max(theme.type.footnote.size, readerFloorPx(renderTarget, "label", textScale)), nameFont = { family, ...theme.type.label, weight: 600 }, valueFont = { family, ...theme.type.label }, shareFont = { family, ...theme.type.label, weight: emphasisWeight(theme) }, noteFont = { family, ...theme.type.footnote, size: noteSize }, deltaFont = { ...noteFont }, headerFont = { family, ...theme.type.footnote, size: Math.max(theme.type.footnote.size, tableHeadFloorPx(renderTarget, textScale), readerFloorPx(renderTarget, "label", textScale)) }, tickFont = { family, ...theme.type.axis, size: Math.min(secondaryType(theme).size, Math.max(theme.type.footnote.size, readerFloorPx(renderTarget, "secondary", textScale))) }, nameLineH = nameFont.size * 1.2, noteLineH = noteFont.size * 1.2, line1H = Math.max(measure("0", nameFont).height, measure("0", valueFont).height), line2H = Math.max(measure("0", noteFont).height, measure("0", deltaFont).height), shares = rows.map((row) => percentOfTarget(row)), shareText = (share) => share > 0 && share < 0.5 ? "<1%" : formatAutomaticPercent(share, 0, !1, locale), hidden = (id) => options.columnVisibility?.[id] === !1, overrides = options.columnOverrides, valueTexts = rows.map((row) => labelOn2("point") && !hidden("actual") ? input.valueText(row) : null), shareTexts = shares.map((share) => share === void 0 || !labelOn2("point") || hidden("share") ? null : shareText(share)), deltas = rows.map((row) => labelOn2("annotation") && !hidden("delta") ? input.deltaVsTarget[row.id] : void 0), deltaTexts = rows.map((row, index) => deltas[index] === void 0 ? null : input.deltaText(row, deltas[index])), deltaBodies = rows.map((row, index) => deltas[index] === void 0 ? null : input.deltaBody(row, deltas[index])), widest = (texts, font) => Math.max(0, maxOf(texts.map((text) => text ? measure(text, font).width : 0))), valueW = widest(valueTexts, valueFont), shareW = widest(shareTexts, shareFont), deltaBodyW = widest(deltaBodies, deltaFont), deltaW = widest(deltaTexts, deltaFont), headEnv = { target: renderTarget, textScale }, naturalColumns = [
|
|
303
200
|
{ key: "actual", head: chartString(options, "actualColumn"), w: valueW },
|
|
304
201
|
{ key: "share", head: chartString(options, "shareColumn", { v1: target }), w: shareW },
|
|
305
202
|
{ key: "delta", head: chartString(options, "deltaColumn", { v1: target }), w: deltaBodyW }
|
|
306
203
|
].filter((column) => column.w > 0).map((column) => {
|
|
307
|
-
let fitted = fitHead(column.head, headerFont, column.w, measure, headEnv);
|
|
308
|
-
return { ...column, fitted, w: Math.max(column.w, fitted.w) };
|
|
309
|
-
}),
|
|
204
|
+
let stackFitted = fitHead(column.head, headerFont, column.w, measure, headEnv), fitted = fitHead(overrides?.[column.key]?.label ?? column.head, headerFont, column.w, measure, headEnv);
|
|
205
|
+
return { ...column, fitted, stackFitted, w: Math.max(column.w, fitted.w) };
|
|
206
|
+
}), blocks = orderedBlocks(["plot", ...naturalColumns.map((column) => column.key)], options.columnOrder), plotAt = blocks.indexOf("plot"), inOrder = (ids) => ids.map((id) => naturalColumns.find((column) => column.key === id)), naturalWidth = (list) => list.reduce((sum, column) => sum + column.w, 0) + COLUMN_GAP * Math.max(0, list.length - 1), trackWarnings = [], wider = { wider: gutterBudget(plot0.w * 0.3, plot0.w) }, parts = rows.map((row) => input.targetParts(row)), notesAt = (cap) => rows.map((row, index) => {
|
|
310
207
|
let text = input.targetText(row), w = measure(text, noteFont).width, split = parts[index].map((part, at) => at === 0 ? part : part.replace(/^\s*·\s*/, "")), lines = w <= cap || split.length < 2 || split.some((part) => measure(part, noteFont).width > cap) ? [text] : split;
|
|
311
208
|
return { ...lines.length === 1 && w > cap ? rowLabelBand([{ label: text }], noteFont, cap, 2, noteLineH, measure, { target: renderTarget, typeRole: "label", wider: cap }).labels[0] : { lines, w: Math.max(...lines.map((line) => measure(line, noteFont).width)), h: lines.length * noteLineH, font: noteFont }, text };
|
|
312
|
-
}), sideNamesAt = (cap, maxLines) => rowLabelBand(rows, nameFont, cap, maxLines, nameLineH, measure, { target: renderTarget, typeRole: "axis", ...maxLines === 1 ? wider : { wider: cap } }), leftOf = (names, notes) => labelOn2("category") ? Math.max(names.width, maxOf(notes.map((note) => note.w))) : 0, sidePlotW = (leftW2) => plot0.w - (leftW2 ? leftW2 + LEFT_GAP : 0) - (rightW ? rightW + RIGHT_GAP : 0), sideNames = sideNamesAt(plot0.w * 0.3, 1), sideNotes = notesAt(gutterBudget(plot0.w * 0.3, plot0.w)), sideLeft = leftOf(sideNames, sideNotes);
|
|
313
|
-
|
|
209
|
+
}), sideNamesAt = (cap, maxLines) => rowLabelBand(rows, nameFont, cap, maxLines, nameLineH, measure, { target: renderTarget, typeRole: "axis", ...maxLines === 1 ? wider : { wider: cap } }), leftOf = (names, notes) => labelOn2("category") ? Math.max(names.width, maxOf(notes.map((note) => note.w))) : 0, sidePlotW = (leftW2) => plot0.w - (leftW2 ? leftW2 + LEFT_GAP : 0) - (beforeW ? beforeW + RIGHT_GAP : 0) - (rightW ? rightW + RIGHT_GAP : 0), sideNames = sideNamesAt(plot0.w * 0.3, 1), sideNotes = notesAt(gutterBudget(plot0.w * 0.3, plot0.w)), sideLeft = leftOf(sideNames, sideNotes), plotKeeps = Math.max(80, SIDE_PLOT_FLOOR * size.width), authoredLabel = overrides?.label?.width, gapsOf = (list, outer) => list.length > 0 ? outer : 0, namedLeft = authoredLabel === void 0 || !labelOn2("category") ? void 0 : authoredTrackWidth("label", authoredLabel, 24, plot0.w - LEFT_GAP - naturalWidth(naturalColumns) - gapsOf(naturalColumns, RIGHT_GAP) - plotKeeps, trackWarnings);
|
|
210
|
+
namedLeft !== void 0 && (sideNames = sideNamesAt(namedLeft, Math.max(2, maxOf(rows.map((row) => row.label.split(/\s+/).length)))), sideNotes = notesAt(namedLeft), sideLeft = namedLeft);
|
|
211
|
+
let columnRoom = plot0.w - (sideLeft ? sideLeft + LEFT_GAP : 0) - naturalWidth(naturalColumns) - gapsOf(naturalColumns, RIGHT_GAP) - plotKeeps, columns = naturalColumns.map((column) => {
|
|
212
|
+
let authored = overrides?.[column.key]?.width;
|
|
213
|
+
if (authored === void 0) return column;
|
|
214
|
+
let w = authoredTrackWidth(column.key, authored, column.w, column.w + Math.max(0, columnRoom), trackWarnings);
|
|
215
|
+
return columnRoom -= w - column.w, { ...column, w };
|
|
216
|
+
}), placedColumns = inOrder(blocks.filter((id) => id !== "plot")).map((column) => columns.find((sized) => sized.key === column.key)), beforePlot = placedColumns.slice(0, plotAt), afterPlot = placedColumns.slice(plotAt), beforeW = naturalWidth(beforePlot), rightW = naturalWidth(afterPlot);
|
|
217
|
+
if (namedLeft === void 0 && labelOn2("category") && sidePlotW(sideLeft) < SIDE_PLOT_SHARE * size.width) {
|
|
314
218
|
let longestWord = Math.max(
|
|
315
219
|
0,
|
|
316
220
|
maxOf(rows.flatMap((row) => row.label.split(/\s+/).map((word) => measure(word, nameFont).width))),
|
|
@@ -330,10 +234,10 @@ function layoutTargetScale(input) {
|
|
|
330
234
|
let stackNotes = notesAt(plot0.w), stackNameH = labelOn2("category") ? Math.max(0, maxOf(stackNames.labels.map((name) => name.h))) : 0, stackValueOffset = namesAboveValues ? stackNameH + LINE_GAP : 0, stackHeaderH = Math.max(stackValuesW > 0 ? stackValueOffset + line1H : 0, stackNameH, line1H), stackNoteH = Math.max(line2H, maxOf(labelOn2("category") ? stackNotes.map((note) => note.h) : [])), stackLeftW = labelOn2("category") ? Math.max(0, maxOf(stackNotes.map((note) => note.w))) : 0, deltaSeparate = stackLeftW + RIGHT_GAP + deltaW > plot0.w, stackBandTop = stackHeaderH + STACK_BAND_GAP, stackNoteTop = stackBandTop + STACK_BAND_H + STACK_BAND_GAP, stackBlockH = stackNoteTop + (labelOn2("category") || deltaW ? stackNoteH + (deltaSeparate ? line2H + 2 : 0) : 0), sideBandCenter = labelOn2("category") ? (nameLineH + LINE_GAP + noteLineH) / 2 : SIDE_BAND_H / 2 + TARGET_REACH, sideBlockH = Math.max(
|
|
331
235
|
sideBandCenter + SIDE_BAND_H / 2 + TARGET_REACH,
|
|
332
236
|
maxOf(labelOn2("category") ? rows.map((_, index) => sideNames.labels[index].h + LINE_GAP + sideNotes[index].h) : [])
|
|
333
|
-
), sideRowH = (index) => labelOn2("category") ? Math.max(sideBandCenter + SIDE_BAND_H / 2 + TARGET_REACH, sideNames.labels[index].h + LINE_GAP + sideNotes[index].h) : sideBlockH, sideRowsH = () => rows.reduce((sum, _, index) => sum + sideRowH(index), 0), tickH = measure("0%", tickFont).height, headerH = measure("0", headerFont).height, legendRect = frameResult.legend?.rect, legendRight = Math.max(-1 / 0, maxOf(frameResult.nodes.filter((node) => node.t === "text" && node.part === "legendLabel").map((node) => node.t === "text" ? node.x + Math.max(...node.lines.map((line) => measure(line, node.font).width)) : -1 / 0))), legendLast = frameResult.nodes.filter((node) => node.t === "text" && node.part === "legendLabel").at(-1), headsFor = (stacked2) => stacked2 ? columns.filter((column) => column.key === "share") :
|
|
237
|
+
), sideRowH = (index) => labelOn2("category") ? Math.max(sideBandCenter + SIDE_BAND_H / 2 + TARGET_REACH, sideNames.labels[index].h + LINE_GAP + sideNotes[index].h) : sideBlockH, sideRowsH = () => rows.reduce((sum, _, index) => sum + sideRowH(index), 0), tickH = measure("0%", tickFont).height, headerH = measure("0", headerFont).height, legendRect = frameResult.legend?.rect, legendRight = Math.max(-1 / 0, maxOf(frameResult.nodes.filter((node) => node.t === "text" && node.part === "legendLabel").map((node) => node.t === "text" ? node.x + Math.max(...node.lines.map((line) => measure(line, node.font).width)) : -1 / 0))), legendLast = frameResult.nodes.filter((node) => node.t === "text" && node.part === "legendLabel").at(-1), headsFor = (stacked2) => stacked2 ? columns.filter((column) => column.key === "share").map((column) => ({ ...column, fitted: column.stackFitted })) : placedColumns, headsW = (stacked2) => {
|
|
334
238
|
let heads2 = headsFor(stacked2);
|
|
335
239
|
return stacked2 ? Math.max(0, maxOf(heads2.map((column) => column.fitted.w))) : rightW;
|
|
336
|
-
}, headsOnKey = (stacked2) => legendRect !== void 0 && legendLast !== void 0 && legendRight + 2 * COLUMN_GAP <= plot0.x + plot0.w - headsW(stacked2), headLineH = (stacked2) => headsFor(stacked2).length > 0 && !headsOnKey(stacked2) ? headerH + BAND_GAP : 0, chromeFor = (stacked2) => headLineH(stacked2) + TARGET_REACH + AXIS_GAP + tickH, availFor = (stacked2) => plotHeightAfter(frameResult, size.height, plot0.h - chromeFor(stacked2)), fixedHeight = options[TARGET_SIZE]?.fixed.height ?? !heightOmitted(options.size), stacked = !sideFits && !(fixedHeight && sideWhole && sidePlotW(sideLeft) >= 80 && rows.length * stackBlockH > availFor(!0) && sideRowsH() < rows.length * stackBlockH), blockH = stacked ? stackBlockH : sideBlockH, availH = availFor(stacked), naturalPitch = Math.max(TARGET_ROW_PITCH, blockH + (stacked ? STACK_ROW_GAP : ROW_GAP)), span = (pitch) => (rows.length - 1) * pitch + blockH, rowHeights = rows.map((_, index) => stacked ? blockH : sideRowH(index)), minimumRowsH = rowHeights.reduce((sum, h) => sum + h, 0), uniform = Math.min(naturalPitch, (availH - blockH) / Math.max(1, rows.length - 1)), rowTops = [];
|
|
240
|
+
}, headsOnKey = (stacked2) => (stacked2 || beforeW === 0) && legendRect !== void 0 && legendLast !== void 0 && legendRight + 2 * COLUMN_GAP <= plot0.x + plot0.w - headsW(stacked2), headLineH = (stacked2) => headsFor(stacked2).length > 0 && !headsOnKey(stacked2) ? headerH + BAND_GAP : 0, chromeFor = (stacked2) => headLineH(stacked2) + TARGET_REACH + AXIS_GAP + tickH, availFor = (stacked2) => plotHeightAfter(frameResult, size.height, plot0.h - chromeFor(stacked2)), fixedHeight = options[TARGET_SIZE]?.fixed.height ?? !heightOmitted(options.size), stacked = !sideFits && !(fixedHeight && sideWhole && sidePlotW(sideLeft) >= 80 && rows.length * stackBlockH > availFor(!0) && sideRowsH() < rows.length * stackBlockH), blockH = stacked ? stackBlockH : sideBlockH, availH = availFor(stacked), naturalPitch = Math.max(TARGET_ROW_PITCH, blockH + (stacked ? STACK_ROW_GAP : ROW_GAP)), span = (pitch) => (rows.length - 1) * pitch + blockH, rowHeights = rows.map((_, index) => stacked ? blockH : sideRowH(index)), minimumRowsH = rowHeights.reduce((sum, h) => sum + h, 0), uniform = Math.min(naturalPitch, (availH - blockH) / Math.max(1, rows.length - 1)), rowTops = [];
|
|
337
241
|
if (uniform >= blockH || rows.length === 1) rows.forEach((_, index) => rowTops.push(index * Math.max(blockH, uniform)));
|
|
338
242
|
else {
|
|
339
243
|
let gap = Math.max(0, (availH - minimumRowsH) / Math.max(1, rows.length - 1));
|
|
@@ -341,8 +245,21 @@ function layoutTargetScale(input) {
|
|
|
341
245
|
}
|
|
342
246
|
let rowsH = rowTops.at(-1) + rowHeights.at(-1), grown = input.grow(size.height - availH, span(naturalPitch));
|
|
343
247
|
if (grown) return grown;
|
|
344
|
-
|
|
345
|
-
|
|
248
|
+
columnOverrideWarnings("bullet", overrides, stacked ? [] : ["label", ...placedColumns.map((column) => column.key)], stacked ? [] : placedColumns.map((column) => column.key), warnings), stacked || pushAll(warnings, trackWarnings), pushAll(warnings, generatedIdWarnings("bullet", "columnOrder", options.columnOrder, stacked ? ["plot"] : blocks));
|
|
249
|
+
let leftW = stacked ? stackLeftW : sideLeft, columnRight = /* @__PURE__ */ new Map();
|
|
250
|
+
if (!stacked) {
|
|
251
|
+
let before = plot0.x + (leftW ? leftW + LEFT_GAP : 0);
|
|
252
|
+
for (let column of beforePlot)
|
|
253
|
+
columnRight.set(column.key, before + column.w), before += column.w + COLUMN_GAP;
|
|
254
|
+
let after = plot0.x + plot0.w;
|
|
255
|
+
for (let column of [...afterPlot].reverse())
|
|
256
|
+
columnRight.set(column.key, after), after -= column.w + COLUMN_GAP;
|
|
257
|
+
}
|
|
258
|
+
let columnOf = (key) => columns.find((column) => column.key === key), cellX = (key, w) => {
|
|
259
|
+
let column = columnOf(key);
|
|
260
|
+
return alignedLeft(columnRight.get(key) - column.w, column.w, w, overrides?.[key]?.align ?? "right");
|
|
261
|
+
}, rowsTop = plot0.y + headLineH(stacked) + (stacked ? 0 : TARGET_REACH), plot = {
|
|
262
|
+
x: stacked ? plot0.x : plot0.x + (leftW ? leftW + LEFT_GAP : 0) + (beforeW ? beforeW + RIGHT_GAP : 0),
|
|
346
263
|
y: rowsTop,
|
|
347
264
|
w: stacked ? plot0.w : Math.max(10, sidePlotW(leftW)),
|
|
348
265
|
h: rowsH
|
|
@@ -354,11 +271,12 @@ function layoutTargetScale(input) {
|
|
|
354
271
|
});
|
|
355
272
|
let rowsBottom = rowsTop + rowsH, nodes = [...frameResult.nodes], headRequests = [], heads = headsFor(stacked);
|
|
356
273
|
if (heads.length > 0) {
|
|
357
|
-
let onKey = headsOnKey(stacked), legendFontH = legendLast?.t === "text" ? measure("0", legendLast.font).height : headerH, headY = onKey && legendLast?.t === "text" ? legendLast.y + (legendFontH - headerH) / 2 : plot0.y
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
274
|
+
let onKey = headsOnKey(stacked), legendFontH = legendLast?.t === "text" ? measure("0", legendLast.font).height : headerH, headY = onKey && legendLast?.t === "text" ? legendLast.y + (legendFontH - headerH) / 2 : plot0.y;
|
|
275
|
+
heads.forEach((column, order) => {
|
|
276
|
+
if (!column.fitted.lines[0]) return;
|
|
277
|
+
let override = overrides?.[column.key], end = stacked ? plot0.x + plot0.w : alignedRight(columnRight.get(column.key), column.w, column.fitted.w, override?.headAlign ?? override?.align ?? "right");
|
|
278
|
+
headRequests.push(headRequest(column.key, order, column.fitted, end, headY, headerH, onKey));
|
|
279
|
+
});
|
|
362
280
|
}
|
|
363
281
|
let rowBandIds = new Map(rows.map((row) => [row.id, []])), directions = rows.map((row) => row.direction);
|
|
364
282
|
targetBands(directions, target, options).forEach((band, index) => {
|
|
@@ -414,14 +332,9 @@ function layoutTargetScale(input) {
|
|
|
414
332
|
typeRole: "secondary"
|
|
415
333
|
}), occupied.claim({ x: label.left, y: tickY, w: label.w, h: tickH }, "axis", {}), axisTicks.push({ at: label.tick, pos: x(label.tick), labelId: id });
|
|
416
334
|
});
|
|
417
|
-
let marks = { rows: [] }, requests = [], placedAnnotations = [], inks = /* @__PURE__ */ new Map(), fonts = /* @__PURE__ */ new Map()
|
|
335
|
+
let marks = { rows: [] }, requests = [], placedAnnotations = [], inks = /* @__PURE__ */ new Map(), fonts = /* @__PURE__ */ new Map();
|
|
418
336
|
for (let head of headRequests)
|
|
419
337
|
fonts.set(head.id, headerFont), inks.set(head.id, { token: "inkMuted" }), requests.push(head);
|
|
420
|
-
{
|
|
421
|
-
let right = plot0.x + plot0.w;
|
|
422
|
-
for (let column of [...columns].reverse())
|
|
423
|
-
columnRight.set(column.key, right), right -= column.w + COLUMN_GAP;
|
|
424
|
-
}
|
|
425
338
|
let measurePaint = (row) => row.meta?.fill ? { css: row.meta.fill } : highlights.has(row.id) ? { token: "focus" } : { token: "markInk" }, request = (id, kind, owner, text, font, rect, extra = {}) => {
|
|
426
339
|
fonts.set(id, font), requests.push({
|
|
427
340
|
id,
|
|
@@ -448,10 +361,10 @@ function layoutTargetScale(input) {
|
|
|
448
361
|
let y = barCenter - barH / 2, display = { value: valueTexts[index] ?? input.valueText(row) ?? "" };
|
|
449
362
|
if (barNodeId = `bar:${row.id}`, share <= hi) {
|
|
450
363
|
let rect = { x: x(0), y, w: Math.max(0.5, x(share) - x(0)), h: barH };
|
|
451
|
-
nodes.push({ t: "rect", id: barNodeId, rect, ...barStyle, owner, part: "bar", display }), occupied.claim(rect, "mark", owner);
|
|
364
|
+
nodes.push({ t: "rect", id: barNodeId, rect, ...barStyle, owner, part: "bar", ...hidden("actual") ? {} : { display } }), occupied.claim(rect, "mark", owner);
|
|
452
365
|
} else {
|
|
453
366
|
let end = x(hi), cut2 = end - OVERFLOW_BREAK_INSET, rect = { x: x(0), y, w: Math.max(0.5, cut2 - 2 - x(0)), h: barH }, tail = { x: cut2 + 2, y, w: end - cut2 - 2, h: barH };
|
|
454
|
-
nodes.push({ t: "rect", id: barNodeId, rect, ...barStyle, owner, part: "bar", display }), nodes.push({ t: "rect", id: `${barNodeId}:beyond`, rect: tail, ...barStyle, owner, part: "barBeyondBreak" });
|
|
367
|
+
nodes.push({ t: "rect", id: barNodeId, rect, ...barStyle, owner, part: "bar", ...hidden("actual") ? {} : { display } }), nodes.push({ t: "rect", id: `${barNodeId}:beyond`, rect: tail, ...barStyle, owner, part: "barBeyondBreak" });
|
|
455
368
|
let glyph = straightBreakGlyph(theme, { x: cut2, y: barCenter }, `${barNodeId}:break`, owner, { token: "axis" }, "barBreak");
|
|
456
369
|
nodes.push(...glyph.nodes), occupied.claim(rect, "mark", owner), occupied.claim(tail, "mark", owner), occupied.claim(glyph.rect, "axis", owner, "barBreak");
|
|
457
370
|
}
|
|
@@ -463,14 +376,14 @@ function layoutTargetScale(input) {
|
|
|
463
376
|
});
|
|
464
377
|
let noteTop = stacked ? top + stackNoteTop : top + (labelOn2("category") ? sideNames.labels[index].h : 0) + LINE_GAP;
|
|
465
378
|
if (labelOn2("category")) {
|
|
466
|
-
let name = (stacked ? stackNames : sideNames).labels[index];
|
|
379
|
+
let name = (stacked ? stackNames : sideNames).labels[index], labelAlign = stacked ? "left" : overrides?.label?.align ?? "left";
|
|
467
380
|
request(
|
|
468
381
|
`category:${row.id}`,
|
|
469
382
|
"category",
|
|
470
383
|
owner,
|
|
471
384
|
row.label,
|
|
472
385
|
nameFont,
|
|
473
|
-
{ x: plot0.x, y: top, w: name.w, h: name.h },
|
|
386
|
+
{ x: alignedLeft(plot0.x, leftW, name.w, labelAlign), y: top, w: name.w, h: name.h },
|
|
474
387
|
{ ...fittedLabel(name, nameFont), priority: PRIORITY.endpoint + (highlights.has(row.id) ? PRIORITY.highlightBonus : 0) }
|
|
475
388
|
);
|
|
476
389
|
let note = (stacked ? stackNotes : sideNotes)[index];
|
|
@@ -480,24 +393,24 @@ function layoutTargetScale(input) {
|
|
|
480
393
|
owner,
|
|
481
394
|
note.text,
|
|
482
395
|
noteFont,
|
|
483
|
-
{ x: plot0.x, y: noteTop, w: note.w, h: note.h },
|
|
396
|
+
{ x: alignedLeft(plot0.x, leftW, note.w, labelAlign), y: noteTop, w: note.w, h: note.h },
|
|
484
397
|
{ ...fittedLabel(note, noteFont), role: "note" }
|
|
485
398
|
), inks.set(`target:${row.id}`, { token: "inkMuted" });
|
|
486
399
|
}
|
|
487
|
-
let
|
|
400
|
+
let valueText = valueTexts[index];
|
|
488
401
|
if (valueText) {
|
|
489
|
-
let size1 = measure(valueText, valueFont),
|
|
402
|
+
let size1 = measure(valueText, valueFont), left = stacked ? plot0.x + plot0.w - (shareW ? shareW + VALUE_GAP : 0) - size1.width : cellX("actual", size1.width);
|
|
490
403
|
request(
|
|
491
404
|
`point:${row.id}`,
|
|
492
405
|
"point",
|
|
493
406
|
owner,
|
|
494
407
|
valueText,
|
|
495
408
|
valueFont,
|
|
496
|
-
{ x:
|
|
409
|
+
{ x: left, y: valueCenter - size1.height / 2, w: size1.width, h: size1.height }
|
|
497
410
|
);
|
|
498
411
|
}
|
|
499
412
|
let shareLabel = shareTexts[index];
|
|
500
|
-
if (shareLabel
|
|
413
|
+
if (shareLabel) {
|
|
501
414
|
let size2 = measure(shareLabel, shareFont);
|
|
502
415
|
request(
|
|
503
416
|
`share:${row.id}`,
|
|
@@ -505,20 +418,20 @@ function layoutTargetScale(input) {
|
|
|
505
418
|
owner,
|
|
506
419
|
shareLabel,
|
|
507
420
|
shareFont,
|
|
508
|
-
{ x:
|
|
421
|
+
{ x: stacked ? plot0.x + plot0.w - size2.width : cellX("share", size2.width), y: valueCenter - size2.height / 2, w: size2.width, h: size2.height },
|
|
509
422
|
{ role: "value" }
|
|
510
423
|
), inks.set(`share:${row.id}`, { token: "ink" });
|
|
511
424
|
}
|
|
512
425
|
let delta = deltas[index], deltaLabel = stacked ? deltaTexts[index] : deltaBodies[index];
|
|
513
426
|
if (deltaLabel && delta !== void 0) {
|
|
514
|
-
let size3 = measure(deltaLabel, deltaFont), labelId = `delta:${row.id}`, tone = input.deltaTone(row, delta),
|
|
427
|
+
let size3 = measure(deltaLabel, deltaFont), labelId = `delta:${row.id}`, tone = input.deltaTone(row, delta), left = stacked ? plot0.x + plot0.w - size3.width : cellX("delta", size3.width), y = stacked ? noteTop + (deltaSeparate ? stackNoteH + 2 : 0) : valueCenter - size3.height / 2;
|
|
515
428
|
request(
|
|
516
429
|
labelId,
|
|
517
430
|
"annotation",
|
|
518
431
|
owner,
|
|
519
432
|
deltaLabel,
|
|
520
433
|
deltaFont,
|
|
521
|
-
{ x:
|
|
434
|
+
{ x: left, y, w: size3.width, h: size3.height },
|
|
522
435
|
{ role: composedTextRole(deltaLabel, "note"), priority: PRIORITY.extreme }
|
|
523
436
|
), inks.set(labelId, { token: tone === "neutral" ? "ink" : tone }), placedAnnotations.push({
|
|
524
437
|
id: `delta-target:${row.id}`,
|
|
@@ -565,7 +478,7 @@ function layoutTargetScale(input) {
|
|
|
565
478
|
});
|
|
566
479
|
let describeRow = (row, index) => {
|
|
567
480
|
let share = shares[index], value = input.valueText(row) ?? "n/a", delta = input.deltaVsTarget[row.id];
|
|
568
|
-
return `${row.label} ${value}` + (share === void 0 ? "" :
|
|
481
|
+
return `${row.label}${hidden("actual") ? "" : ` ${value}`}` + (share === void 0 ? "" : `,${hidden("share") ? "" : ` ${shareText(share)} ${chartString(options, "ofTarget", { v1: target })},`} ${input.targetText(row)}`) + (delta === void 0 || hidden("delta") ? "" : ` (${input.deltaText(row, delta)}, ${chartString(options, { good: "toneGood", bad: "toneBad", warn: "toneWarn", neutral: "toneNeutral" }[input.deltaTone(row, delta)])})`);
|
|
569
482
|
};
|
|
570
483
|
return {
|
|
571
484
|
type: "bullet",
|
|
@@ -747,13 +660,13 @@ function bulletAnnotations(options, sharedScale, warnings) {
|
|
|
747
660
|
...annotation.id ? { owner: { annotationId: annotation.id } } : {}
|
|
748
661
|
}), !1));
|
|
749
662
|
}
|
|
750
|
-
var BAND_TRIES = /* @__PURE__ */ Symbol("bandTries"), REGULAR_NAMES = /* @__PURE__ */ Symbol("regularNames"), ROW_KEY_OFF = /* @__PURE__ */ Symbol("rowKeyOff"), HEADS_OFF_KEY = /* @__PURE__ */ Symbol("headsOffKey");
|
|
663
|
+
var BAND_TRIES = /* @__PURE__ */ Symbol("bandTries"), REGULAR_NAMES = /* @__PURE__ */ Symbol("regularNames"), ROW_KEY_OFF = /* @__PURE__ */ Symbol("rowKeyOff"), HEADS_OFF_KEY = /* @__PURE__ */ Symbol("headsOffKey"), NAME_ROOM = /* @__PURE__ */ Symbol("nameRoom");
|
|
751
664
|
function layoutBullet(data, options = {}) {
|
|
752
665
|
let warnings = [];
|
|
753
666
|
breakUnsupported("bullet", options, warnings);
|
|
754
667
|
let theme = resolveSemanticPaletteTheme(resolveTheme(options.theme), options.palette, warnings), compact = options.density === "compact";
|
|
755
668
|
warnings.push(...compactBulletRefusals(options));
|
|
756
|
-
let compactFloor = chartSizing("bullet", options), size = resolveSize(compact ? cardSize(options, { width: compactFloor.minWidth, height: compactFloor.minHeight }) : options.size ?? "dashboard"), target = options.target ?? DEFAULT_TARGET, stepTo = (font, size2, role) => ({ ...font, size: Math.min(font.size, Math.max(size2, readerFloorPx(target, role, textScaleOf(options)))) }), measure = options.measure ?? defaultMeasurer, highlights = new Set(resolveHighlight(options.highlight)), labelOn2 = (kind) => !compact && labelOn(options, kind);
|
|
669
|
+
let compactFloor = chartSizing("bullet", options), size = resolveSize(compact ? cardSize(options, { width: compactFloor.minWidth, height: compactFloor.minHeight }) : options.size ?? "dashboard"), target = options.target ?? DEFAULT_TARGET, stepTo = (font, size2, role) => ({ ...font, size: Math.min(font.size, Math.max(size2, readerFloorPx(target, role, textScaleOf(options)))) }), measure = options.measure ?? defaultMeasurer, highlights = new Set(resolveHighlight(options.highlight)), labelOn2 = (kind) => !compact && labelOn(options, kind), lineOn = (kind) => !(typeof options.labels == "object" && options.labels[kind] === !1);
|
|
757
670
|
if (!data || !Array.isArray(data.rows) || data.rows.length === 0)
|
|
758
671
|
throw new NormalizeError("empty-data", "rows", "bullet requires at least one row");
|
|
759
672
|
let seen = /* @__PURE__ */ new Set(), rows = data.rows.map((r, i) => {
|
|
@@ -847,12 +760,12 @@ function layoutBullet(data, options = {}) {
|
|
|
847
760
|
let base = rowFmt(row)(row.value);
|
|
848
761
|
return typeof row.meta?.label == "string" ? row.meta.label.replace(/\$\{value\}/g, base) : base;
|
|
849
762
|
}, deltaBody = (row, d) => {
|
|
850
|
-
let spec = rowSpecs.get(row),
|
|
851
|
-
return formatWithSpec(
|
|
763
|
+
let spec = rowSpecs.get(row), shown2 = shownDelta(row, d), gapSpec = { ...spec, signed: !0, ...row.isPct ? { prefix: "", suffix: "pp" } : {} }, fixedSpec = { ...gapSpec, automatic: !1, nonzero: void 0 };
|
|
764
|
+
return formatWithSpec(shown2, shown2 !== 0 && roundedNumber(shown2, fixedSpec) === 0 ? gapSpec : fixedSpec);
|
|
852
765
|
}, deltaText = (row, d) => `${deltaBody(row, d)} ${shownDelta(row, d) === 0 ? chartString(options, "gapOn", { v1: targetWord(options) }) : `vs ${targetWord(options)}`}`, deltaTone = (row, d) => row.direction === "neutral" ? "neutral" : row.bands.some((band2) => band2.tone) ? (row.value === null ? row.bands.at(-1) : bandFor(row.value, row.bands)).tone ?? "neutral" : (d = shownDelta(row, d), d === 0 || d > 0 == (row.direction === "higherIsBetter") ? "good" : "bad"), deltaVsTarget = emptyIdRecord();
|
|
853
766
|
for (let row of rows)
|
|
854
767
|
row.value !== null && row.target !== null && (deltaVsTarget[row.id] = cleanDiff(row.value, row.target));
|
|
855
|
-
let tickFont = { family: theme.type.family, ...theme.type.axis }, labelFont = { family: theme.type.family, ...theme.type.label }, capsuleFont = labelFont, valueBaseFont = { ...labelFont, weight: emphasisWeight(theme) }, targetFont = { ...tickFont, size: Math.max(readerFloorPx(target, "label", textScaleOf(options)), tickFont.size) }, minimumRowH = Math.max(28, measure("0", labelFont).height + 6, measure("0", tickFont).height + 4), bandFraction = options.bandFraction ?? 0.7, targetValues = new Set(rows.flatMap((row) => row.target === null ? [] : [row.target])), firstTargetRow = rows.find((row) => row.target !== null)?.id, cols = !1, targetPrints = (row) => !cols && labelOn2("annotation") && row.target !== null && (!(sharedScale && targetValues.size === 1) || row.id === firstTargetRow), targetAir = rows.some((row, ri) => ri > 0 && targetPrints(row)) ? measure("0", targetFont).height + 2 : 0, airRowH = targetAir === 0 ? 0 : bandFraction < 1 ? Math.ceil(targetAir / (1 - bandFraction)) : Math.ceil(2 * targetAir), naturalRowH = compact ? minimumRowH : Math.max(44, minimumRowH, airRowH), minimumPitch = targetAir === 0 ? minimumRowH : Math.max(minimumRowH, Math.ceil(2 * (measure("0", targetFont).height + 1))), occupied = createOccupiedIndex({ x: 0, y: 0, w: size.width, h: size.height }), framed = options.title !== void 0 && options.title !== !1 || options.subtitle !== void 0 || options.source !== void 0 || authoredNotes(options).length > 0, margin = compact && !framed ? { top: 0, right: 1, bottom: 0, left: 1, ...options.margin } : { top: 16, right: 20, bottom: 12, left: 20, ...options.margin };
|
|
768
|
+
let tickFont = { family: theme.type.family, ...theme.type.axis }, labelFont = { family: theme.type.family, ...theme.type.label }, capsuleFont = labelFont, valueBaseFont = { ...labelFont, weight: emphasisWeight(theme) }, targetFont = { ...tickFont, size: Math.max(readerFloorPx(target, "label", textScaleOf(options)), tickFont.size) }, minimumRowH = Math.max(28, measure("0", labelFont).height + 6, measure("0", tickFont).height + 4), bandFraction = options.bandFraction ?? 0.7, targetValues = new Set(rows.flatMap((row) => row.target === null ? [] : [row.target])), firstTargetRow = rows.find((row) => row.target !== null)?.id, cols = !1, targetPrints = (row) => !cols && labelOn2("annotation") && options.columnVisibility?.target !== !1 && row.target !== null && (!(sharedScale && targetValues.size === 1) || row.id === firstTargetRow), targetAir = rows.some((row, ri) => ri > 0 && targetPrints(row)) ? measure("0", targetFont).height + 2 : 0, airRowH = targetAir === 0 ? 0 : bandFraction < 1 ? Math.ceil(targetAir / (1 - bandFraction)) : Math.ceil(2 * targetAir), naturalRowH = compact ? minimumRowH : Math.max(44, minimumRowH, airRowH), minimumPitch = targetAir === 0 ? minimumRowH : Math.max(minimumRowH, Math.ceil(2 * (measure("0", targetFont).height + 1))), occupied = createOccupiedIndex({ x: 0, y: 0, w: size.width, h: size.height }), framed = options.title !== void 0 && options.title !== !1 || options.subtitle !== void 0 || options.source !== void 0 || authoredNotes(options).length > 0, margin = compact && !framed ? { top: 0, right: 1, bottom: 0, left: 1, ...options.margin } : { top: 16, right: 20, bottom: 12, left: 20, ...options.margin };
|
|
856
769
|
if (targetScale)
|
|
857
770
|
return layoutBulletOnTargetScale(data, options, {
|
|
858
771
|
rows,
|
|
@@ -917,18 +830,18 @@ function layoutBullet(data, options = {}) {
|
|
|
917
830
|
measure
|
|
918
831
|
},
|
|
919
832
|
occupied
|
|
920
|
-
), plot0 = frameResult.plot, axisTitle = options.valueAxis?.show && sharedScale && labelOn2("axisTitle") ? planValueAxisTitle(options.axisTitles?.primary, theme, measure, plot0.w) : void 0, axisH = options.valueAxis?.show && sharedScale ? measure("0", tickFont).height + 8 + (axisTitle ? axisTitle.height + 2 : 0) : 0, inset = compact ? 0 : 2, topAir = rows.length > 0 && targetPrints(rows[0]) ? measure("0", targetFont).height + 2 : 0, availH = plotHeightAfter(frameResult, size.height, plot0.h - axisH - 2 * inset - topAir), rowsH = Math.min(availH, rows.length * naturalRowH), stepEst = Math.max(rowsH / rows.length, minimumPitch), regularNames = options[REGULAR_NAMES] === !0, nameFont = regularNames ? tickFont : { ...tickFont, weight: NAME_WEIGHT }, catFont = stepEst >= tickFont.size * 1.2 + 4 ? nameFont : stepTo(nameFont, theme.type.footnote.size, "axis"), lineH = catFont.size * 1.2, card = size.width < 480, catMaxLines = card || stepEst >= 2 * lineH + 4 ? 2 : 1, capW = card ? Math.min(80, Math.max(24, plot0.w * 0.3)) : Math.max(24, plot0.w * 0.26), fitNames = (maxLines2, font = catFont) => rowLabelBand(
|
|
833
|
+
), plot0 = frameResult.plot, axisTitle = options.valueAxis?.show && sharedScale && labelOn2("axisTitle") ? planValueAxisTitle(options.axisTitles?.primary, theme, measure, plot0.w) : void 0, axisH = options.valueAxis?.show && sharedScale ? measure("0", tickFont).height + 8 + (axisTitle ? axisTitle.height + 2 : 0) : 0, inset = compact ? 0 : 2, topAir = rows.length > 0 && targetPrints(rows[0]) ? measure("0", targetFont).height + 2 : 0, availH = plotHeightAfter(frameResult, size.height, plot0.h - axisH - 2 * inset - topAir), rowsH = Math.min(availH, rows.length * naturalRowH), stepEst = Math.max(rowsH / rows.length, minimumPitch), regularNames = options[REGULAR_NAMES] === !0, nameFont = regularNames ? tickFont : { ...tickFont, weight: NAME_WEIGHT }, catFont = stepEst >= tickFont.size * 1.2 + 4 ? nameFont : stepTo(nameFont, theme.type.footnote.size, "axis"), lineH = catFont.size * 1.2, card = size.width < 480, catMaxLines = card || stepEst >= 2 * lineH + 4 ? 2 : 1, overrides = options.columnOverrides, shown = (id) => options.columnVisibility?.[id] !== !1, pointOn = labelOn2("point") && shown("actual"), plotKeeps = Math.max(80, 0.45 * size.width), nameRoom = options[NAME_ROOM], nameTrack = compact || overrides?.label?.width === void 0 || !labelOn2("category") ? void 0 : authoredTrackWidth("label", overrides.label.width, 24, nameRoom ?? plot0.w - CAT_BAND_GAP - plotKeeps, warnings), capW = nameTrack ?? (card ? Math.min(80, Math.max(24, plot0.w * 0.3)) : Math.max(24, plot0.w * 0.26)), fitNames = (maxLines2, font = catFont) => rowLabelBand(
|
|
921
834
|
labelOn2("category") ? rows : [],
|
|
922
835
|
font,
|
|
923
836
|
capW,
|
|
924
837
|
maxLines2,
|
|
925
838
|
lineH,
|
|
926
839
|
measure,
|
|
927
|
-
{ wider: card ? capW : gutterBudget(24, plot0.w), shrink: stepDownFont(theme, font, "axis", target, textScaleOf(options)), target, textScale: textScaleOf(options), typeRole: "axis", footnoteRefs: { count: authoredFootnoteCount(options), warnings } }
|
|
840
|
+
{ wider: nameTrack ?? (card ? capW : gutterBudget(24, plot0.w)), shrink: stepDownFont(theme, font, "axis", target, textScaleOf(options)), target, textScale: textScaleOf(options), typeRole: "axis", footnoteRefs: { count: authoredFootnoteCount(options), warnings } }
|
|
928
841
|
), sideNames = (font = catFont) => {
|
|
929
842
|
let band2 = fitNames(catMaxLines, font);
|
|
930
843
|
return band2.labels.some((label) => label.title !== void 0) ? fitNames(2, font) : band2;
|
|
931
|
-
}, fitted = fitNames(catMaxLines), { labels: catLines, width: catBandW } = fitted.labels.some((label) => label.title !== void 0) ? fitNames(2) : fitted, capsulesOn = labelOn2("annotation"), capsuleTexts = /* @__PURE__ */ new Map(), capsuleColW = 0;
|
|
844
|
+
}, fitted = fitNames(catMaxLines), { labels: catLines, width: catBandW } = fitted.labels.some((label) => label.title !== void 0) ? fitNames(2) : fitted, capsulesOn = labelOn2("annotation") && shown("gap"), capsuleTexts = /* @__PURE__ */ new Map(), capsuleColW = 0;
|
|
932
845
|
if (capsulesOn)
|
|
933
846
|
for (let row of rows) {
|
|
934
847
|
let d = deltaVsTarget[row.id];
|
|
@@ -936,7 +849,7 @@ function layoutBullet(data, options = {}) {
|
|
|
936
849
|
let text = deltaText(row, d);
|
|
937
850
|
capsuleTexts.set(row.id, text), capsuleColW = Math.max(capsuleColW, measure(text, capsuleFont).width);
|
|
938
851
|
}
|
|
939
|
-
let annotations = bulletAnnotations(options, sharedScale, warnings), cagrColW = annotations.some((ann) => ann.kind === "cagr") ? measure("\u2212100.0% p.a.", { ...labelFont, weight: emphasisWeight(theme) }).width + 48 : 0, valueW =
|
|
852
|
+
let annotations = bulletAnnotations(options, sharedScale, warnings), cagrColW = annotations.some((ann) => ann.kind === "cagr") ? measure("\u2212100.0% p.a.", { ...labelFont, weight: emphasisWeight(theme) }).width + 48 : 0, valueW = pointOn ? Math.max(0, maxOf(rows.map((row) => {
|
|
940
853
|
let text = valueTextOf(row);
|
|
941
854
|
return text ? measure(text, valueBaseFont).width : 0;
|
|
942
855
|
}))) : 0, maxLines = Math.max(catMaxLines, ...rows.map((row) => row.label.split(/\s+/).length)), cardBand = (font) => rowLabelBand(
|
|
@@ -947,22 +860,39 @@ function layoutBullet(data, options = {}) {
|
|
|
947
860
|
lineH,
|
|
948
861
|
measure,
|
|
949
862
|
{ target, textScale: textScaleOf(options), typeRole: "axis", footnoteRefs: { count: authoredFootnoteCount(options), warnings } }
|
|
950
|
-
), cardNames = !compact && annotations.length === 0 && (catLines.some((label) => label.title !== void 0) || plot0.w - catBandW - CAT_BAND_GAP - capsuleColW - CAPSULE_GAP < size.width * 0.55) ? cardBand(catFont) : void 0, cardHeaderH = Math.max(measure("0", labelFont).height, maxOf((cardNames?.labels ?? catLines).map((label) => label.h))), cardBandH = Math.max(16, measure("0", labelFont).height), cardFooterH = targetPrints(rows[0]) || capsuleTexts.size > 0 ? Math.max(measure("0", targetFont).height, measure("0", capsuleFont).height) : 0, cardPitch = cardHeaderH + cardBandH + cardFooterH + 12, fixedHeight = options[TARGET_SIZE]?.fixed.height ?? !heightOmitted(options.size), stacked = cardNames !== void 0 && (!fixedHeight || rows.length * cardPitch <= availH);
|
|
863
|
+
), cardNames = !compact && annotations.length === 0 && (nameTrack === void 0 || card) && (catLines.some((label) => label.title !== void 0) || plot0.w - catBandW - CAT_BAND_GAP - capsuleColW - CAPSULE_GAP < size.width * 0.55) ? cardBand(catFont) : void 0, cardHeaderH = Math.max(measure("0", labelFont).height, maxOf((cardNames?.labels ?? catLines).map((label) => label.h))), cardBandH = Math.max(16, measure("0", labelFont).height), cardFooterH = targetPrints(rows[0]) || capsuleTexts.size > 0 ? Math.max(measure("0", targetFont).height, measure("0", capsuleFont).height) : 0, cardPitch = cardHeaderH + cardBandH + cardFooterH + 12, fixedHeight = options[TARGET_SIZE]?.fixed.height ?? !heightOmitted(options.size), stacked = cardNames !== void 0 && (!fixedHeight || rows.length * cardPitch <= availH);
|
|
951
864
|
stacked ? (catLines = cardNames.labels, catBandW = cardNames.width, naturalRowH = Math.max(naturalRowH, cardPitch)) : fixedHeight && cardNames && ({ labels: catLines, width: catBandW } = fitted);
|
|
952
865
|
let tallest = (labels) => maxOf(labels.map((label) => label.lines.length));
|
|
953
866
|
if (!regularNames && (catLines.some((label) => label.title !== void 0) || tallest(catLines) > 1 && tallest(catLines) > tallest((stacked ? cardBand : sideNames)({ ...catFont, weight: tickFont.weight }).labels)))
|
|
954
867
|
return layoutBullet(data, { ...options, [REGULAR_NAMES]: !0 });
|
|
868
|
+
nameTrack !== void 0 && (catBandW = nameTrack);
|
|
955
869
|
let sidePlotW = Math.max(10, plot0.w - (catBandW ? catBandW + CAT_BAND_GAP : 0) - (capsuleColW ? capsuleColW + CAPSULE_GAP : 0) - cagrColW), noteFont = { family: theme.type.family, ...theme.type.axis, size: Math.min(secondaryType(theme).size, Math.max(theme.type.footnote.size, readerFloorPx(target, "secondary", textScaleOf(options)))) }, colPlan = options.targetColumns !== !1 && !compact && !stacked && cardNames === void 0 && labelOn2("annotation") && annotations.every((ann) => ann.kind !== "cagr") && rows.some((row) => row.target !== null) && catLines.every((label) => label.title === void 0) ? (() => {
|
|
956
|
-
let headerFont = columnHeadFont(theme, target, textScaleOf(options)), colTargets = rows.map((row) => row.target === null ? null : rowFmt(row)(row.target)), colGaps = rows.map((row) => deltaVsTarget[row.id] === void 0 ? null : deltaBody(row, deltaVsTarget[row.id])), colPositions = rows.map((row) => {
|
|
870
|
+
let headerFont = columnHeadFont(theme, target, textScaleOf(options)), colTargets = rows.map((row) => row.target === null || !shown("target") ? null : rowFmt(row)(row.target)), colGaps = rows.map((row) => deltaVsTarget[row.id] === void 0 || !shown("gap") ? null : deltaBody(row, deltaVsTarget[row.id])), colPositions = rows.map((row) => {
|
|
871
|
+
if (!lineOn("position") || !shown("gap")) return null;
|
|
957
872
|
let raw = deltaVsTarget[row.id], d = raw === void 0 ? void 0 : shownDelta(row, raw);
|
|
958
873
|
return d === void 0 ? null : chartString(options, d < 0 ? "gapBelow" : d > 0 ? "gapAbove" : "gapOn", { v1: targetWord(options) });
|
|
959
|
-
}), colDirections = rows.map((row) => !labelOn2("category") || row.direction === "neutral" || row.bands.some((band2) => band2.tone) ? null : chartString(options, row.direction === "lowerIsBetter" ? "lowerBetter" : "higherBetter")), widest = (texts, font) => Math.max(0, maxOf(texts.map((text) => text ? measure(text, font).width : 0))), headEnv = { target, textScale: textScaleOf(options) }, targetBodyW = widest(colTargets, labelFont), gapBodyW = Math.max(widest(colGaps, valueBaseFont), widest(colPositions, noteFont)), colHeads = [
|
|
960
|
-
fitHead(targetHead, headerFont, targetBodyW, measure, headEnv),
|
|
961
|
-
fitHead(chartString(options, "gapColumn", { v1: targetWord(options) }), headerFont, gapBodyW, measure, headEnv)
|
|
962
|
-
],
|
|
963
|
-
|
|
874
|
+
}), colDirections = rows.map((row) => !labelOn2("category") || !lineOn("direction") || row.direction === "neutral" || row.bands.some((band2) => band2.tone) ? null : chartString(options, row.direction === "lowerIsBetter" ? "lowerBetter" : "higherBetter")), widest = (texts, font) => Math.max(0, maxOf(texts.map((text) => text ? measure(text, font).width : 0))), headEnv = { target, textScale: textScaleOf(options) }, targetBodyW = widest(colTargets, labelFont), gapBodyW = Math.max(widest(colGaps, valueBaseFont), widest(colPositions, noteFont)), colHeads = [
|
|
875
|
+
fitHead(overrides?.target?.label ?? targetHead, headerFont, targetBodyW, measure, headEnv),
|
|
876
|
+
fitHead(overrides?.gap?.label ?? chartString(options, "gapColumn", { v1: targetWord(options) }), headerFont, gapBodyW, measure, headEnv)
|
|
877
|
+
], colLeftW = catBandW ? Math.max(catBandW, widest(colDirections, noteFont)) : 0, hasTarget = shown("target"), hasGap = shown("gap"), actualFit = valueW > 0 ? fitHead(overrides?.actual?.label ?? chartString(options, "actualColumn"), headerFont, valueW, measure, headEnv) : void 0, blocks = orderedBlocks(["plot", ...actualFit ? ["actual"] : [], ...hasTarget ? ["target"] : [], ...hasGap ? ["gap"] : []], options.columnOrder), actualOwnTrack2 = actualFit !== void 0 && blocks.indexOf("actual") !== blocks.indexOf("plot") + 1, naturalW = { target: Math.max(colHeads[0].w, targetBodyW), gap: Math.max(colHeads[1].w, gapBodyW), actual: actualFit ? Math.max(actualFit.w, valueW) : 0 }, trackIds2 = blocks.filter((id) => id !== "plot" && (id !== "actual" || actualOwnTrack2)), sumOf = (ids, widths2) => ids.reduce((sum, id) => sum + widths2[id], 0) + COLUMN_GAP2 * Math.max(0, ids.length - 1), plotAt = blocks.indexOf("plot"), before = trackIds2.filter((id) => blocks.indexOf(id) < plotAt), after = trackIds2.filter((id) => blocks.indexOf(id) > plotAt), edges = (widths2) => (before.length ? sumOf(before, widths2) + COLUMNS_GAP : 0) + (after.length ? sumOf(after, widths2) + COLUMNS_GAP : 0), planWarnings = [], widths = { ...naturalW }, room = plot0.w - (colLeftW ? colLeftW + CAT_BAND_GAP : 0) - edges(naturalW) - plotKeeps;
|
|
878
|
+
for (let id of trackIds2) {
|
|
879
|
+
let authored = overrides?.[id]?.width;
|
|
880
|
+
authored !== void 0 && (widths[id] = authoredTrackWidth(id, authored, naturalW[id], naturalW[id] + Math.max(0, room), planWarnings), room -= widths[id] - naturalW[id]);
|
|
881
|
+
}
|
|
882
|
+
let targetColW = widths.target, gapColW = widths.gap, colsW = after.length ? sumOf(after, widths) : 0, beforeW = before.length ? sumOf(before, widths) + COLUMNS_GAP : 0, colPlotW = plot0.w - (colLeftW ? colLeftW + CAT_BAND_GAP : 0) - edges(widths), rights = {}, beforeAt = plot0.x + (colLeftW ? colLeftW + CAT_BAND_GAP : 0);
|
|
883
|
+
for (let id of before)
|
|
884
|
+
rights[id] = beforeAt + widths[id], beforeAt += widths[id] + COLUMN_GAP2;
|
|
885
|
+
let afterAt = plot0.x + plot0.w;
|
|
886
|
+
for (let id of [...after].reverse())
|
|
887
|
+
rights[id] = afterAt, afterAt -= widths[id] + COLUMN_GAP2;
|
|
888
|
+
let headerH = measure("0", headerFont).height, noteH2 = measure("0", noteFont).height, colNameH = (ri) => (labelOn2("category") ? catLines[ri].h : 0) + (colDirections[ri] ? LINE_GAP2 + noteH2 : 0), colGapH = (ri) => colGaps[ri] ? measure("0", valueBaseFont).height + (colPositions[ri] ? LINE_GAP2 + noteH2 : 0) : colTargets[ri] ? measure("0", labelFont).height : 0, colBlockH = (ri) => Math.max(colNameH(ri), colGapH(ri)), legendLabels = frameResult.nodes.filter((node) => node.t === "text" && node.part === "legendLabel"), legendLast = legendLabels.at(-1), legendRight = Math.max(-1 / 0, maxOf(legendLabels.map((node) => node.t === "text" ? node.x + Math.max(...node.lines.map((line) => measure(line, node.font).width)) : -1 / 0))), headsOnKey = options[HEADS_OFF_KEY] !== !0 && before.length === 0 && legendLast?.t === "text" && legendLast.y < plot0.y && legendRight + 2 * COLUMN_GAP2 <= plot0.x + plot0.w - colsW, colTopAir = headsOnKey || trackIds2.length === 0 && actualFit === void 0 ? 0 : headerH + 4, colAvailH = plotHeightAfter(frameResult, size.height, plot0.h - axisH - 2 * inset - colTopAir), colPitch = Math.max(44, minimumRowH, Math.ceil(maxOf(rows.map((_, ri) => colBlockH(ri))) + 12));
|
|
889
|
+
return { planWarnings, hasTarget, hasGap, actualOwnTrack: actualOwnTrack2, actualW: widths.actual, rights, beforeW, headerFont, noteFont, colTargets, colGaps, colPositions, colDirections, colHeads, targetColW, gapColW, colsW, colLeftW, colPlotW, headerH, noteH: noteH2, colBlockH, legendLast, legendRight, headsOnKey, colTopAir, colAvailH, colPitch };
|
|
964
890
|
})() : void 0, colBlockMax = colPlan ? maxOf(rows.map((_, ri) => colPlan.colBlockH(ri))) : 0;
|
|
965
|
-
colPlan &&
|
|
891
|
+
if (colPlan && nameTrack !== void 0 && colPlan.colPlotW < plotKeeps) {
|
|
892
|
+
let less = nameTrack - (plotKeeps - colPlan.colPlotW);
|
|
893
|
+
if (less >= Math.max(24, widestWord(rows, catFont, measure))) return layoutBullet(data, { ...options, [NAME_ROOM]: less });
|
|
894
|
+
}
|
|
895
|
+
colPlan && colPlan.colPlotW >= Math.max(80, 0.45 * size.width) && (!fixedHeight || colPlan.colAvailH / rows.length >= colBlockMax + 4) && (cols = !0, targetAir = 0, topAir = colPlan.colTopAir, availH = colPlan.colAvailH, naturalRowH = colPlan.colPitch, pushAll(warnings, colPlan.planWarnings));
|
|
966
896
|
let cp = colPlan, rowMode = rowWanted && !stacked && cardNames === void 0 && (cols || rows.every((row) => !targetPrints(row))), noteH = measure("0", noteFont).height, nameAir = rowMode ? Math.max(noteH, cols ? cp.headerH : 0) + 3 : 0, edgeTicks = rowMode && !sharedScale, tickAir = edgeTicks ? EDGE_TICK + 1 + noteH : 0, bandBase = Math.max(ROW_BAND, cols ? Math.ceil(colBlockMax) : 0), rowBandH = bandBase, rowAir = ROW_AIR;
|
|
967
897
|
if (rowWanted && !rowMode) return layoutBullet(data, { ...options, [ROW_KEY_OFF]: !0 });
|
|
968
898
|
if (rowMode) {
|
|
@@ -975,7 +905,7 @@ function layoutBullet(data, options = {}) {
|
|
|
975
905
|
rowAir = pitch - nameAir - rowBandH - tickAir, targetAir = 0, naturalRowH = pitch;
|
|
976
906
|
}
|
|
977
907
|
let rawBandPad = options[BAND_PAD] ?? 0, bandPad = rawBandPad > 0 ? Math.max(0, Math.min(rawBandPad, Math.floor(availH - 10))) : 0, plot = {
|
|
978
|
-
x: stacked ? plot0.x : plot0.x + (cols ? cp.colLeftW ? cp.colLeftW + CAT_BAND_GAP : 0 : catBandW ? catBandW + CAT_BAND_GAP : 0),
|
|
908
|
+
x: stacked ? plot0.x : plot0.x + (cols ? (cp.colLeftW ? cp.colLeftW + CAT_BAND_GAP : 0) + cp.beforeW : catBandW ? catBandW + CAT_BAND_GAP : 0),
|
|
979
909
|
y: plot0.y + inset + topAir + bandPad,
|
|
980
910
|
w: stacked ? plot0.w : cols ? cp.colPlotW : sidePlotW,
|
|
981
911
|
h: Math.min(availH - bandPad, rows.length * naturalRowH)
|
|
@@ -995,7 +925,7 @@ function layoutBullet(data, options = {}) {
|
|
|
995
925
|
paddingInner: gapShare,
|
|
996
926
|
paddingOuter: gapShare / 2
|
|
997
927
|
}), capsuleLabelH = measure("X", capsuleFont).height, capsuleLabelPad = Math.max(0, Math.min(2, (band.step - capsuleLabelH) / 2)), valueFont = band.step >= labelFont.size * 1.2 + 6 ? valueBaseFont : stepTo(valueBaseFont, theme.type.footnote.size, "label"), maxPosW = 0, maxNegW = 0;
|
|
998
|
-
if (
|
|
928
|
+
if (pointOn)
|
|
999
929
|
for (let row of rows) {
|
|
1000
930
|
let text = valueTextOf(row);
|
|
1001
931
|
if (!text || row.value === null) continue;
|
|
@@ -1005,7 +935,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1005
935
|
let extents = rows.map((row) => {
|
|
1006
936
|
let rowLo = 0, rowHi = 0;
|
|
1007
937
|
return row.value !== null && (rowLo = Math.min(rowLo, row.value), rowHi = Math.max(rowHi, row.value)), row.target !== null && (rowLo = Math.min(rowLo, row.target), rowHi = Math.max(rowHi, row.target)), row.bands.length > 0 && (rowHi = Math.max(rowHi, row.bands[row.bands.length - 1].to)), { lo: rowLo, hi: rowHi };
|
|
1008
|
-
}), seeds = sharedDomainSeeds(sharedScale, options, annotations), lo = Math.min(seeds.lo, minOf(extents.map((extent) => extent.lo))), hi = Math.max(seeds.hi, maxOf(extents.map((extent) => extent.hi))), actualHead = cols &&
|
|
938
|
+
}), seeds = sharedDomainSeeds(sharedScale, options, annotations), lo = Math.min(seeds.lo, minOf(extents.map((extent) => extent.lo))), hi = Math.max(seeds.hi, maxOf(extents.map((extent) => extent.hi))), actualHead = cols && pointOn && Math.max(maxPosW, maxNegW) > 0 ? fitHead(overrides?.actual?.label ?? chartString(options, "actualColumn"), cp.headerFont, Math.max(maxPosW, maxNegW), measure, { target, textScale: textScaleOf(options) }) : void 0, actualOwnTrack = cols && cp.actualOwnTrack, valueNaturalW = Math.max(maxPosW, maxNegW, actualHead?.w ?? 0), valueColW = actualOwnTrack ? cp.actualW : overrides?.actual?.width === void 0 || stacked || compact || valueNaturalW === 0 ? valueNaturalW : authoredTrackWidth("actual", overrides.actual.width, valueNaturalW, plot.w * 0.35 - LABEL_GAP - 8, warnings), fP = compact || stacked || actualOwnTrack ? 0 : Math.min(0.35, (valueColW + LABEL_GAP + 8) / plot.w), fN = lo < 0 && !compact && !stacked && !actualOwnTrack ? Math.min(0.35, (maxNegW + LABEL_GAP + 8) / plot.w) : 0, extend = (extentLo, extentHi) => {
|
|
1009
939
|
let span = extentHi - extentLo || 1, denom = Math.max(0.3, 1 - fP - (extentLo < 0 ? fN : 0));
|
|
1010
940
|
return [
|
|
1011
941
|
extentLo < 0 ? extentLo - span * fN / denom : 0,
|
|
@@ -1028,7 +958,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1028
958
|
});
|
|
1029
959
|
scaleAt = (ri) => rowScales[ri];
|
|
1030
960
|
}
|
|
1031
|
-
let zeroX = rows.map((_, ri) => scaleAt(ri)(0)), valueColLeft = maxOf(extents.map((extent, ri) => scaleAt(ri)(extent.hi))) + VALUE_COL_GAP, valueColRight = Math.min(plot.x + plot.w, valueColLeft + valueColW), valueX = (width) => Math.max(valueColLeft, valueColRight - width);
|
|
961
|
+
let zeroX = rows.map((_, ri) => scaleAt(ri)(0)), valueColLeft = actualOwnTrack ? cp.rights.actual - valueColW : maxOf(extents.map((extent, ri) => scaleAt(ri)(extent.hi))) + VALUE_COL_GAP, valueColRight = actualOwnTrack ? cp.rights.actual : Math.min(plot.x + plot.w, valueColLeft + valueColW), valueAlign = overrides?.actual?.align, valueX = (width) => valueAlign === void 0 ? Math.max(valueColLeft, valueColRight - width) : alignedLeft(valueColLeft, valueColRight - valueColLeft, width, valueAlign);
|
|
1032
962
|
if (actualHead && cp.headsOnKey && cp.legendRight + 2 * COLUMN_GAP2 > valueColRight - actualHead.w)
|
|
1033
963
|
return layoutBullet(data, { ...options, [HEADS_OFF_KEY]: !0 });
|
|
1034
964
|
let uniformZeroX = zeroX.every((value) => value === zeroX[0]);
|
|
@@ -1086,8 +1016,12 @@ function layoutBullet(data, options = {}) {
|
|
|
1086
1016
|
});
|
|
1087
1017
|
let barPaint = (row) => row.meta?.fill ? { css: row.meta.fill } : highlights.has(row.id) ? semanticPalettePaint(theme, options.palette, "focus") : { token: "markInk" }, anchorByRow = /* @__PURE__ */ new Map(), capsuleLabelIds = /* @__PURE__ */ new Map(), columnFonts = /* @__PURE__ */ new Map(), columnInks = /* @__PURE__ */ new Map();
|
|
1088
1018
|
if (cols) {
|
|
1089
|
-
let legendFontH = cp.legendLast?.t === "text" ? measure("0", cp.legendLast.font).height : cp.headerH, headY = rowMode ? band.position(0) - 2 - cp.headerH : cp.headsOnKey && cp.legendLast?.t === "text" ? cp.legendLast.y + (legendFontH - cp.headerH) / 2 : plot0.y + inset,
|
|
1090
|
-
[
|
|
1019
|
+
let legendFontH = cp.legendLast?.t === "text" ? measure("0", cp.legendLast.font).height : cp.headerH, headY = rowMode ? band.position(0) - 2 - cp.headerH : cp.headsOnKey && cp.legendLast?.t === "text" ? cp.legendLast.y + (legendFontH - cp.headerH) / 2 : plot0.y + inset, headAt = (key, head, right, trackW) => alignedRight(right, trackW, head.w, overrides?.[key]?.headAlign ?? overrides?.[key]?.align ?? "right");
|
|
1020
|
+
[
|
|
1021
|
+
...actualHead ? [[actualHead, "actual", headAt("actual", actualHead, valueColRight, valueColW), valueColRight]] : [],
|
|
1022
|
+
...cp.hasTarget ? [[cp.colHeads[0], "target", headAt("target", cp.colHeads[0], cp.rights.target, cp.targetColW), cp.rights.target]] : [],
|
|
1023
|
+
...cp.hasGap ? [[cp.colHeads[1], "gap", headAt("gap", cp.colHeads[1], cp.rights.gap, cp.gapColW), cp.rights.gap]] : []
|
|
1024
|
+
].filter(([head]) => head.lines[0]).sort((a, b) => a[3] - b[3]).forEach(([head, key, right], order) => {
|
|
1091
1025
|
let request = headRequest(key, order, head, right, headY, cp.headerH, cp.headsOnKey && !rowMode);
|
|
1092
1026
|
columnFonts.set(request.id, cp.headerFont), columnInks.set(request.id, { token: "inkMuted" }), labelRequests.push(request);
|
|
1093
1027
|
});
|
|
@@ -1173,8 +1107,8 @@ function layoutBullet(data, options = {}) {
|
|
|
1173
1107
|
...measureStyle(theme, barPaint(row), row.bands.flatMap((bandSpec, bandIndex) => (bandIndex === 0 ? 0 : row.bands[bandIndex - 1].to) < Math.max(0, row.value) && bandSpec.to > Math.min(0, row.value) || row.value === 0 && bandIndex === 0 ? [bandPaint(row, bandIndex)] : [])),
|
|
1174
1108
|
owner,
|
|
1175
1109
|
part: "bar",
|
|
1176
|
-
display: { value: rowFmt(row)(row.value) }
|
|
1177
|
-
}), occupied.claim(rect, "mark", owner), anchorByRow.set(row.id, { x: vx, y: rowCenter, value: row.value, date: row.date, label: row.label, owner }),
|
|
1110
|
+
...shown("actual") ? { display: { value: rowFmt(row)(row.value) } } : {}
|
|
1111
|
+
}), occupied.claim(rect, "mark", owner), anchorByRow.set(row.id, { x: vx, y: rowCenter, value: row.value, date: row.date, label: row.label, owner }), pointOn) {
|
|
1178
1112
|
let text = valueTextOf(row);
|
|
1179
1113
|
if (text) {
|
|
1180
1114
|
let tsize = measure(text, valueFont);
|
|
@@ -1205,45 +1139,47 @@ function layoutBullet(data, options = {}) {
|
|
|
1205
1139
|
width: targetStroke,
|
|
1206
1140
|
owner,
|
|
1207
1141
|
part: "target",
|
|
1208
|
-
display: { value: rowFmt(row)(row.target) }
|
|
1209
|
-
}), occupied.claim({ x: tx - Math.max(1.5, targetStroke / 2 + 0.5), y: rowY + bw * 0.08, w: Math.max(3, targetStroke + 1), h: bw * 0.84 }, "mark", owner), cols) {
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
id,
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
seat("
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1142
|
+
...shown("target") ? { display: { value: rowFmt(row)(row.target) } } : {}
|
|
1143
|
+
}), occupied.claim({ x: tx - Math.max(1.5, targetStroke / 2 + 0.5), y: rowY + bw * 0.08, w: Math.max(3, targetStroke + 1), h: bw * 0.84 }, "mark", owner), !(cols && cp.colTargets[ri] === null)) {
|
|
1144
|
+
if (cols) {
|
|
1145
|
+
let text = cp.colTargets[ri], tsize = measure(text, labelFont), id = `target-value:${row.id}`;
|
|
1146
|
+
columnFonts.set(id, labelFont), columnInks.set(id, { token: "ink" }), labelRequests.push({
|
|
1147
|
+
id,
|
|
1148
|
+
kind: "annotation",
|
|
1149
|
+
owner,
|
|
1150
|
+
text,
|
|
1151
|
+
lines: [text],
|
|
1152
|
+
font: labelFont,
|
|
1153
|
+
role: "value",
|
|
1154
|
+
priority: PRIORITY.interior,
|
|
1155
|
+
pad: 0,
|
|
1156
|
+
candidates: [{ slot: "targetColumn", rect: { x: alignedLeft(cp.rights.target - cp.targetColW, cp.targetColW, tsize.width, overrides?.target?.align ?? "right"), y: rowCenter - cp.colBlockH(ri) / 2, w: tsize.width, h: tsize.height }, penalty: 0 }]
|
|
1157
|
+
});
|
|
1158
|
+
} else if (targetPrints(row)) {
|
|
1159
|
+
let text = `${stacked ? `${targetWord(options)} ` : ""}${rowFmt(row)(row.target)}`, tsize = measure(text, targetFont), seat = (slot, rx, ry, penalty) => ({ slot, rect: { x: rx, y: ry, w: tsize.width, h: tsize.height }, penalty }), above = rowY - tsize.height - 1;
|
|
1160
|
+
labelRequests.push({
|
|
1161
|
+
id: `target-value:${row.id}`,
|
|
1162
|
+
kind: "annotation",
|
|
1163
|
+
owner,
|
|
1164
|
+
text,
|
|
1165
|
+
lines: [text],
|
|
1166
|
+
font: targetFont,
|
|
1167
|
+
role: "value",
|
|
1168
|
+
priority: PRIORITY.interior,
|
|
1169
|
+
pad: 0,
|
|
1170
|
+
// An attainment wash fills the whole row pitch: a seat on it is not taken.
|
|
1171
|
+
candidates: stacked ? [seat("cardTarget", plot.x, rowY + bw + 3, 0)] : [
|
|
1172
|
+
seat("aboveTick", tx - tsize.width / 2, above, 0),
|
|
1173
|
+
seat("aboveTickEnd", tx - tsize.width, above, 1),
|
|
1174
|
+
seat("aboveTickStart", tx, above, 1)
|
|
1175
|
+
].filter((candidate) => !washes.some((wash) => rectsOverlap(wash, candidate.rect)))
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1242
1178
|
}
|
|
1243
1179
|
}
|
|
1244
1180
|
let capsuleText = cols ? cp.colGaps[ri] ?? void 0 : capsuleTexts.get(row.id);
|
|
1245
1181
|
if (capsuleText !== void 0 && cols) {
|
|
1246
|
-
let tsize = measure(capsuleText, valueBaseFont), top = rowCenter - cp.colBlockH(ri) / 2,
|
|
1182
|
+
let tsize = measure(capsuleText, valueBaseFont), top = rowCenter - cp.colBlockH(ri) / 2, gapRight = cp.rights.gap, gapAlign = overrides?.gap?.align ?? "right";
|
|
1247
1183
|
columnFonts.set(`delta:${row.id}`, valueBaseFont), labelRequests.push({
|
|
1248
1184
|
id: `delta:${row.id}`,
|
|
1249
1185
|
kind: "annotation",
|
|
@@ -1253,7 +1189,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1253
1189
|
lines: [capsuleText],
|
|
1254
1190
|
font: valueBaseFont,
|
|
1255
1191
|
priority: PRIORITY.extreme,
|
|
1256
|
-
candidates: [{ slot: "gapColumn", rect: { x:
|
|
1192
|
+
candidates: [{ slot: "gapColumn", rect: { x: alignedLeft(gapRight - cp.gapColW, cp.gapColW, tsize.width, gapAlign), y: top, w: tsize.width, h: tsize.height }, penalty: 0 }]
|
|
1257
1193
|
});
|
|
1258
1194
|
let position = cp.colPositions[ri];
|
|
1259
1195
|
if (position) {
|
|
@@ -1268,7 +1204,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1268
1204
|
font: cp.noteFont,
|
|
1269
1205
|
priority: PRIORITY.interior,
|
|
1270
1206
|
pad: 0,
|
|
1271
|
-
candidates: [{ slot: "gapColumn", rect: { x:
|
|
1207
|
+
candidates: [{ slot: "gapColumn", rect: { x: alignedLeft(gapRight - cp.gapColW, cp.gapColW, psize.width, gapAlign), y: top + tsize.height + LINE_GAP2, w: psize.width, h: psize.height }, penalty: 0 }]
|
|
1272
1208
|
});
|
|
1273
1209
|
}
|
|
1274
1210
|
}
|
|
@@ -1330,7 +1266,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1330
1266
|
{
|
|
1331
1267
|
slot: "left",
|
|
1332
1268
|
rect: {
|
|
1333
|
-
x: stacked ? plot.x : rowLabelX(plot0.x, cols ? cp.colLeftW : catBandW, cl.w, options.rowLabels?.align ?? "left"),
|
|
1269
|
+
x: stacked ? plot.x : rowLabelX(plot0.x, cols ? cp.colLeftW : catBandW, cl.w, overrides?.label?.align ?? options.rowLabels?.align ?? "left"),
|
|
1334
1270
|
y: stacked ? cardTop : cols ? rowCenter - cp.colBlockH(ri) / 2 : rowCenter - cl.h / 2,
|
|
1335
1271
|
w: cl.w,
|
|
1336
1272
|
h: cl.h
|
|
@@ -1352,12 +1288,18 @@ function layoutBullet(data, options = {}) {
|
|
|
1352
1288
|
font: cp.noteFont,
|
|
1353
1289
|
priority: PRIORITY.interior,
|
|
1354
1290
|
pad: 0,
|
|
1355
|
-
candidates: [{ slot: "left", rect: { x: rowLabelX(plot0.x, cp.colLeftW, dsize.width, options.rowLabels?.align ?? "left"), y: rowCenter - cp.colBlockH(ri) / 2 + cl.h + LINE_GAP2, w: dsize.width, h: dsize.height }, penalty: 0 }]
|
|
1291
|
+
candidates: [{ slot: "left", rect: { x: rowLabelX(plot0.x, cp.colLeftW, dsize.width, overrides?.label?.align ?? options.rowLabels?.align ?? "left"), y: rowCenter - cp.colBlockH(ri) / 2 + cl.h + LINE_GAP2, w: dsize.width, h: dsize.height }, penalty: 0 }]
|
|
1356
1292
|
});
|
|
1357
1293
|
}
|
|
1358
1294
|
}
|
|
1359
1295
|
marks.rows.push({ id: row.id, bandNodeIds, barNodeId, targetNodeId, rect: rowRect });
|
|
1360
1296
|
});
|
|
1297
|
+
let hasValues = labelOn2("point") && rows.some((row) => valueTextOf(row) !== null), hasTargets = labelOn2("annotation") && rows.some((row) => row.target !== null);
|
|
1298
|
+
compact || (pushAll(warnings, generatedIdWarnings("bullet", "columnVisibility", options.columnVisibility, [...labelOn2("category") ? ["label"] : [], ...hasValues ? ["actual"] : [], ...hasTargets ? ["target", "gap"] : []])), hasTargets && !shown("target") && warnings.push({ code: "bullet-target-column-hidden", severity: "info", field: ["options", "columnVisibility", "target"], message: "columnVisibility leaves the target out, so no number explains the target tick" }));
|
|
1299
|
+
let trackIds = cols ? [...cp.hasTarget ? ["target"] : [], ...cp.hasGap ? ["gap"] : []] : [], valueTrack = !compact && !stacked && valueColW > 0 ? ["actual"] : [];
|
|
1300
|
+
columnOverrideWarnings("bullet", overrides, stacked || compact ? [] : [...catBandW > 0 ? ["label"] : [], ...valueTrack, ...trackIds], cols ? [...actualHead ? ["actual"] : [], ...trackIds] : [], warnings), pushAll(warnings, generatedIdWarnings("bullet", "columnOrder", options.columnOrder, cols ? ["plot", ...valueColW > 0 ? ["actual"] : [], ...trackIds] : ["plot", ...hasValues ? ["actual"] : [], ...hasTargets ? ["target", "gap"] : []])), !cols && !compact && options.columnOrder?.some((id) => id !== "plot" && (id === "actual" ? hasValues : hasTargets && (id === "target" || id === "gap"))) && warnings.push({ code: "option-ignored", severity: "warn", field: ["options", "columnOrder"], message: "columnOrder moves columns, and this form prints its values on the rows, so nothing moved", suggest: "Give the chart the width the target columns need, or remove columnOrder." });
|
|
1301
|
+
for (let kind of ["position", "direction"])
|
|
1302
|
+
typeof options.labels != "object" || options.labels[kind] !== !1 || cols || warnings.push({ code: "bullet-label-line-not-drawn", severity: "info", field: ["options", "labels", kind], message: `labels.${kind} sets a line of the target columns, which this form does not draw, so nothing changed`, suggest: "Give the chart the width the target columns need, or remove the setting." });
|
|
1361
1303
|
let solveCtx = labelCtx(theme, size, options, {
|
|
1362
1304
|
measure,
|
|
1363
1305
|
plot,
|
|
@@ -1451,8 +1393,8 @@ function layoutBullet(data, options = {}) {
|
|
|
1451
1393
|
);
|
|
1452
1394
|
asColumnHeads(labelNodes), pushAll(nodes, labelNodes);
|
|
1453
1395
|
let a11yRows = rows.map((row) => {
|
|
1454
|
-
let f = rowFmt(row), v = row.value !== null ? f(row.value) : "n/a", t = row.target !== null ? ` vs ${targetWord(options)} ${f(row.target)}` + (deltaVsTarget[row.id] !== void 0 ? ` (${deltaText(row, deltaVsTarget[row.id])}, ${chartString(options, { good: "toneGood", bad: "toneBad", warn: "toneWarn", neutral: "toneNeutral" }[deltaTone(row, deltaVsTarget[row.id])])})` : "") : "";
|
|
1455
|
-
return `${row.label}
|
|
1396
|
+
let f = rowFmt(row), v = shown("actual") ? row.value !== null ? ` ${f(row.value)}` : " n/a" : "", t = row.target !== null ? (shown("target") ? ` vs ${targetWord(options)} ${f(row.target)}` : "") + (deltaVsTarget[row.id] !== void 0 && shown("gap") ? ` (${deltaText(row, deltaVsTarget[row.id])}, ${chartString(options, { good: "toneGood", bad: "toneBad", warn: "toneWarn", neutral: "toneNeutral" }[deltaTone(row, deltaVsTarget[row.id])])})` : "") : "";
|
|
1397
|
+
return `${row.label}${v}${t}`;
|
|
1456
1398
|
}).join("; "), a11yDesc = chartString(options, "bulletDescStart", { v1: rows.length }) + chartString(options, "bulletTargetTick", { v1: targetWord(options) }) + (anyBands ? chartString(options, "bulletShadingDesc") : "") + (sharedScale || rows.length < 2 ? "" : chartString(options, "bulletSeparateScale")) + ` ${a11yRows}.`;
|
|
1457
1399
|
return {
|
|
1458
1400
|
type: "bullet",
|
|
@@ -1471,7 +1413,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1471
1413
|
// The type floor moved to 320 for the percent-of-target rows (core.ts); these layouts keep 480.
|
|
1472
1414
|
// The columns give way below their fit, so the side-by-side rows set the floor.
|
|
1473
1415
|
minWidth: compact ? 0 : Math.max(0, stacked ? size.width - plot.w + Math.max(160, catBandW + Math.max(maxPosW, maxNegW) + CAT_BAND_GAP) : size.width - sidePlotW + Math.max(80, maxOf(rows.map((row) => {
|
|
1474
|
-
let text =
|
|
1416
|
+
let text = pointOn ? valueTextOf(row) : void 0;
|
|
1475
1417
|
return text ? measure(text, valueFont).width + 2 * LABEL_GAP : 0;
|
|
1476
1418
|
}))))
|
|
1477
1419
|
}),
|
|
@@ -1508,6 +1450,9 @@ function layoutBullet(data, options = {}) {
|
|
|
1508
1450
|
}
|
|
1509
1451
|
};
|
|
1510
1452
|
}
|
|
1453
|
+
function widestWord(rows, font, measure) {
|
|
1454
|
+
return maxOf(rows.flatMap((row) => row.label.split(/\s+/).map((word) => measure(word, font).width)));
|
|
1455
|
+
}
|
|
1511
1456
|
function layoutBulletOnTargetScale(data, options, ctx) {
|
|
1512
1457
|
let { rows, theme, size, measure, occupied, warnings, rowFmt } = ctx;
|
|
1513
1458
|
rows.some((row) => row.bands.length > 0) && warnings.push({
|
|
@@ -1532,9 +1477,9 @@ function layoutBulletOnTargetScale(data, options, ctx) {
|
|
|
1532
1477
|
return typeof row.meta?.label == "string" ? row.meta.label.replace(/\$\{value\}/g, base) : base;
|
|
1533
1478
|
}, targetParts = (row) => [
|
|
1534
1479
|
row.target === null ? `no ${targetWord(options)}` : `${targetWord(options)} ${rowFmt(row)(row.target)}`,
|
|
1535
|
-
...row.direction === "lowerIsBetter" ? [chartString(options, "lowerBetterHint")] : []
|
|
1480
|
+
...row.direction === "lowerIsBetter" && !(typeof options.labels == "object" && options.labels.direction === !1) && options.strings?.lowerBetter !== "" ? [chartString(options, "lowerBetterHint")] : []
|
|
1536
1481
|
];
|
|
1537
|
-
return layoutTargetScale({
|
|
1482
|
+
return pushAll(warnings, generatedIdWarnings("bullet", "columnVisibility", options.columnVisibility, [...ctx.labelOn("category") ? ["label"] : [], ...ctx.labelOn("point") ? ["actual", "share"] : [], ...ctx.labelOn("annotation") ? ["delta"] : []])), typeof options.labels == "object" && options.labels.position === !1 && warnings.push({ code: "bullet-label-line-not-drawn", severity: "info", field: ["options", "labels", "position"], message: "labels.position sets a line of the target columns, which the percent-of-target scale does not draw, so nothing changed", suggest: "Remove labels.position." }), layoutTargetScale({
|
|
1538
1483
|
rows,
|
|
1539
1484
|
options,
|
|
1540
1485
|
theme,
|