boardplot 0.56.0 → 0.58.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 +408 -0
- package/README.md +49 -15
- package/dist/{DiagnosticDetails-JFBBXOT2.js → DiagnosticDetails-VGSL4NJK.js} +1 -1
- package/dist/{ReaderBox-GLCKYXBU.js → ReaderBox-MHMXIDAJ.js} +8 -7
- package/dist/{annotateEngine-QVNAE3EH.js → annotateEngine-753KQBNN.js} +2 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-HZUAEMN5.js → chunk-2CQBBN7M.js} +4 -4
- package/dist/{chunk-K3VZ5QJK.js → chunk-2ETK5TSA.js} +4 -4
- package/dist/{chunk-HHXIVFAU.js → chunk-2ETSI2EL.js} +11 -9
- package/dist/{chunk-ECBUFKCP.js → chunk-2GRXHWRH.js} +3 -3
- package/dist/{chunk-ZVM5TFGR.js → chunk-2HII2B6S.js} +6 -2
- package/dist/{chunk-WBETBGSC.js → chunk-2LC2H3ZM.js} +1003 -907
- package/dist/chunk-2NX7EO7H.js +23 -0
- package/dist/{chunk-52WNCUIN.js → chunk-2QI2PK2O.js} +1 -1
- package/dist/{chunk-QWCLWFKC.js → chunk-2VKQQLP7.js} +180 -58
- package/dist/chunk-3DOVXJ6K.js +602 -0
- package/dist/{chunk-CAJ54IEP.js → chunk-3E6NLODZ.js} +1 -1
- package/dist/{chunk-MOS6WFWM.js → chunk-3HA4IJTO.js} +9 -9
- package/dist/{chunk-JCIXYOND.js → chunk-3HPPTQEW.js} +4 -4
- package/dist/{chunk-7VVHTOE7.js → chunk-3KT2647F.js} +4 -2
- package/dist/{chunk-O6ZTIDWB.js → chunk-3MFVJMP6.js} +3 -2
- package/dist/{chunk-KQCKK3LD.js → chunk-3P3FKPFN.js} +170 -73
- package/dist/{chunk-WI5VOSQX.js → chunk-3XAJSMYD.js} +2 -2
- package/dist/{chunk-CPGASWNN.js → chunk-42QKUSHJ.js} +13 -3
- package/dist/{chunk-QB5HV4IY.js → chunk-44JU3VOT.js} +7 -8
- package/dist/{chunk-BYCJ6TKI.js → chunk-44K75CYE.js} +3 -3
- package/dist/{chunk-MS7O3KDJ.js → chunk-4FNM4D57.js} +6 -6
- package/dist/{chunk-BVYIKLQ5.js → chunk-4ROZ4TFL.js} +1 -1
- package/dist/{chunk-3V62N3Z7.js → chunk-4VV3KUFT.js} +7 -8
- package/dist/{chunk-MAFPVR4G.js → chunk-54YO56IK.js} +10 -5
- package/dist/{chunk-JMGB444D.js → chunk-5ACFYNA4.js} +8 -4
- package/dist/{chunk-6AMN7IKJ.js → chunk-5JEU6MWC.js} +49 -28
- package/dist/{chunk-NCLRZQR6.js → chunk-5JIB4VJA.js} +18 -10
- package/dist/{chunk-SXD3OYAR.js → chunk-5OP3E2ZD.js} +205 -96
- package/dist/{chunk-SS4YGK3E.js → chunk-5SLBD4BT.js} +72 -304
- package/dist/{chunk-XMP2DNLI.js → chunk-5SVGTQTW.js} +4 -4
- package/dist/chunk-5U567TYU.js +23 -0
- package/dist/chunk-5ZLF4S7X.js +40 -0
- package/dist/{chunk-T2YDWT54.js → chunk-5ZMTQATF.js} +261 -147
- package/dist/{chunk-WXJ5MHLH.js → chunk-62BDQTO6.js} +2 -2
- package/dist/chunk-64K3V4VN.js +25 -0
- package/dist/{chunk-BK6P6KMW.js → chunk-67YJJJIB.js} +1 -1
- package/dist/{chunk-32LLDRPI.js → chunk-6DJNFT2K.js} +42 -32
- package/dist/{chunk-JYAZPMSA.js → chunk-6IUK6PAH.js} +7 -6
- package/dist/{chunk-7STMIK2X.js → chunk-6JFQCVNN.js} +4 -4
- package/dist/chunk-6JXBLQJ2.js +32 -0
- package/dist/{chunk-5TWY3ZIC.js → chunk-6XPV6M3Q.js} +5 -5
- package/dist/{chunk-MPO5TVGF.js → chunk-6ZDSEITW.js} +3 -3
- package/dist/{chunk-75WIUG2W.js → chunk-72HVDLMT.js} +172 -78
- package/dist/chunk-75NU5RLX.js +24 -0
- package/dist/chunk-76GPN6AT.js +72 -0
- package/dist/chunk-7BQK2UDV.js +13 -0
- package/dist/{chunk-CF4NMRN7.js → chunk-7CAYRPJV.js} +45 -25
- package/dist/{chunk-U3A6FMSI.js → chunk-7GWWBHVQ.js} +7 -7
- package/dist/{chunk-CHAS5A5B.js → chunk-7NYUFMLJ.js} +149 -86
- package/dist/{chunk-D2B3KP35.js → chunk-7VWXXBTC.js} +4 -0
- package/dist/chunk-A65B23JK.js +113 -0
- package/dist/{chunk-4KMZAK6J.js → chunk-A7R6FUS6.js} +4 -4
- package/dist/{chunk-E2ZUBP4Q.js → chunk-AEVGUOPB.js} +7 -8
- package/dist/chunk-AHIK2N72.js +53 -0
- package/dist/{chunk-KLB2QC24.js → chunk-AICO24HJ.js} +5 -2
- package/dist/{chunk-7KSUMFBK.js → chunk-AJGSCVVW.js} +5 -1
- package/dist/{chunk-RSCRIWAH.js → chunk-AL62JJTB.js} +10 -3
- package/dist/{chunk-E7V3OHQQ.js → chunk-AN2V2LC4.js} +37 -22
- package/dist/{chunk-JIEVDGAF.js → chunk-AOFUA5XP.js} +1 -1
- package/dist/chunk-B5A7X2BA.js +44 -0
- package/dist/{chunk-2HTYGMMG.js → chunk-BCMEGJRX.js} +2 -2
- package/dist/{chunk-KD5GOR2K.js → chunk-BDIKWR45.js} +124 -69
- package/dist/{chunk-FNRPQIQE.js → chunk-BG6AIWAK.js} +4 -6
- package/dist/{chunk-ZMPH2OC4.js → chunk-BOT6W3VB.js} +7 -8
- package/dist/{chunk-DRHQG44U.js → chunk-BQBD6Q5J.js} +6 -2
- package/dist/{chunk-2DOEZ5QY.js → chunk-BZ67BJBH.js} +11 -10
- package/dist/{chunk-UBCVBBJJ.js → chunk-C47POAC5.js} +4 -3
- package/dist/{chunk-O7REHICC.js → chunk-C5OBPO4Z.js} +36 -28
- package/dist/{chunk-IGNBQT23.js → chunk-CCAAI56H.js} +121 -10
- package/dist/{chunk-RPIKNMZA.js → chunk-CDUR3KWV.js} +7 -2
- package/dist/{chunk-MZACASZY.js → chunk-CMPHT2LS.js} +14 -2
- package/dist/{chunk-FHA3KMFC.js → chunk-CQBPNE7Z.js} +5 -1
- package/dist/{chunk-IVRYF7QA.js → chunk-CR5FP5SF.js} +1 -1
- package/dist/{chunk-DD6RVD3S.js → chunk-D2TQX7UJ.js} +5 -1
- package/dist/{chunk-VVXKFU72.js → chunk-DEANHDXU.js} +62 -41
- package/dist/{chunk-GM3EGUYW.js → chunk-DHGE46UK.js} +1 -1
- package/dist/{chunk-UZTQUPTB.js → chunk-DIHX6NUB.js} +5 -5
- package/dist/{chunk-MD6DCQMA.js → chunk-DILQ34NW.js} +37 -37
- package/dist/{chunk-YMTXTQCN.js → chunk-DJKRYJP7.js} +6 -6
- package/dist/{chunk-JCAGVAB3.js → chunk-DKLC6QLF.js} +1200 -21
- package/dist/{chunk-SRAV6FPB.js → chunk-DNHTMCUP.js} +3 -3
- package/dist/{chunk-CKGSGRP7.js → chunk-DORE2RHL.js} +21 -5
- package/dist/{chunk-SMHZXHHD.js → chunk-DZYTXZNS.js} +15 -5
- package/dist/chunk-E262NRFP.js +39 -0
- package/dist/{chunk-V5JQQMFQ.js → chunk-E5YF236N.js} +4 -1
- package/dist/{chunk-IGJ2G5C6.js → chunk-EBUK7HJP.js} +6 -6
- package/dist/{chunk-ZL6IHMOW.js → chunk-ECBHC272.js} +198 -119
- package/dist/{chunk-SA46CNMS.js → chunk-ED7GLWTF.js} +4 -1
- package/dist/chunk-EFW43JQJ.js +24 -0
- package/dist/{chunk-5P2TTHBZ.js → chunk-EHRRHSPV.js} +2 -2
- package/dist/{chunk-JXBZIJCG.js → chunk-EILNJQMN.js} +32 -12
- package/dist/{chunk-GELSK76Y.js → chunk-ERDKMZ7O.js} +3 -3
- package/dist/{chunk-T2CYNDYU.js → chunk-ETRAPN5G.js} +366 -130
- package/dist/{chunk-JEUL777U.js → chunk-ETUKDEGL.js} +21 -12
- package/dist/chunk-F2ET5ZTT.js +49 -0
- package/dist/{chunk-2YO4WRJN.js → chunk-F3XOBFS4.js} +40 -29
- package/dist/{chunk-SPSGUFTI.js → chunk-FB6X7QHA.js} +1 -1
- package/dist/{chunk-5PPQIF4D.js → chunk-FGW54I23.js} +7 -8
- package/dist/{chunk-JTC5SEAQ.js → chunk-FP5B5XIL.js} +7 -3
- package/dist/{chunk-RJGCYGC3.js → chunk-FRHQGA5Q.js} +86 -250
- package/dist/{chunk-YZZLIYPA.js → chunk-FRR7BJ3B.js} +5 -1
- package/dist/{chunk-4DZFR52I.js → chunk-FVWHEM2N.js} +7 -5
- package/dist/{chunk-YPYD6OJ3.js → chunk-FWSMENKH.js} +2 -2
- package/dist/{chunk-YYJORENB.js → chunk-FWTUGNSF.js} +8 -8
- package/dist/{chunk-GIHH6VC2.js → chunk-FZKDZQ6U.js} +10 -6
- package/dist/{chunk-S7NRL66K.js → chunk-G4FF6G3I.js} +26 -17
- package/dist/{chunk-PQLAZEQV.js → chunk-GB6BZSTL.js} +248 -92
- package/dist/chunk-GCIHRRDJ.js +24 -0
- package/dist/{chunk-X3KCQEYZ.js → chunk-GHCU6OSE.js} +9 -1
- package/dist/chunk-GKDUIDU6.js +138 -0
- package/dist/chunk-GO66OCN7.js +24 -0
- package/dist/chunk-GOFS336W.js +24 -0
- package/dist/{chunk-AGDDH6XY.js → chunk-GQYT7G4F.js} +5 -1
- package/dist/{chunk-WN3HEU3P.js → chunk-GUTLXO7Q.js} +140 -89
- package/dist/chunk-H3VICNTN.js +47 -0
- package/dist/{chunk-GC4WOLV3.js → chunk-HAG3K6PQ.js} +14 -2
- package/dist/{chunk-CB4CERXZ.js → chunk-HBQHSZ6S.js} +11 -2
- package/dist/chunk-HTQGJQZN.js +124 -0
- package/dist/{chunk-F77TMAUY.js → chunk-HUQRO6VF.js} +39 -36
- package/dist/{chunk-4KQHKPB3.js → chunk-I5VDW2XZ.js} +543 -509
- package/dist/{chunk-43GGVT7W.js → chunk-I5VNHDPR.js} +11 -4
- package/dist/{chunk-4LTN7SND.js → chunk-IDXYHDQY.js} +1 -1
- package/dist/{chunk-Y54LU4CU.js → chunk-IIWZJ5ZM.js} +1 -1
- package/dist/{chunk-FMDNJ6PC.js → chunk-IPBOREIY.js} +2 -2
- package/dist/chunk-IU335UO7.js +27 -0
- package/dist/{chunk-JVZTKQFS.js → chunk-IVDTP6SV.js} +9 -5
- package/dist/{chunk-BDGLMWPO.js → chunk-IXOBDDMW.js} +11 -2
- package/dist/{chunk-EIL3KHAL.js → chunk-J4QRB6DQ.js} +5 -5
- package/dist/{chunk-3465633G.js → chunk-JCMGKQVS.js} +3 -3
- package/dist/{chunk-YK2KWNTU.js → chunk-JM7UTLF3.js} +28 -14
- package/dist/{chunk-CXETOLPX.js → chunk-JNDWRV34.js} +4 -4
- package/dist/{chunk-DLUNQHFO.js → chunk-JSRQTDZZ.js} +26 -24
- package/dist/{chunk-WTQAG2OT.js → chunk-JT3UTEWZ.js} +8 -3
- package/dist/{chunk-GQT2SY2S.js → chunk-JUYRDZSV.js} +291 -151
- package/dist/{chunk-LKMFMNQX.js → chunk-JVGL2SCN.js} +1 -1
- package/dist/{chunk-4JC3SE4G.js → chunk-JY4LTPOV.js} +1 -1
- package/dist/chunk-K7XPTQBJ.js +267 -0
- package/dist/{chunk-P4SMC4BY.js → chunk-KGBUXMFP.js} +120 -86
- package/dist/{chunk-XC5IRUEL.js → chunk-KIE5V3DA.js} +2 -2
- package/dist/{chunk-RT66UTLJ.js → chunk-KU4PCG4W.js} +2 -2
- package/dist/{chunk-VPL3JYC6.js → chunk-KVBLTAO7.js} +52 -10
- package/dist/{chunk-XCROSJ2Z.js → chunk-KW4JXWHO.js} +1 -1
- package/dist/{chunk-PJBEJR2U.js → chunk-KWIP5YRA.js} +24 -7
- package/dist/{chunk-JYBT2JNY.js → chunk-LE3LSEUL.js} +27 -2
- package/dist/{chunk-R2IKOLBK.js → chunk-LG6M2JTH.js} +3 -3
- package/dist/{chunk-DF3XEFQ7.js → chunk-LIE2WSB4.js} +21 -18
- package/dist/{chunk-Z55DXFWS.js → chunk-LJDATBPB.js} +26 -16
- package/dist/{chunk-KLIZXSBK.js → chunk-LMMS675D.js} +10 -9
- package/dist/{chunk-MRAP2UVV.js → chunk-LPKGZ664.js} +286 -35
- package/dist/{chunk-JFFREZGT.js → chunk-LPMSGO7L.js} +6 -2
- package/dist/chunk-LQWINE7K.js +211 -0
- package/dist/{chunk-6MJUW5R5.js → chunk-MKMMQDIY.js} +139 -71
- package/dist/{chunk-F5BYLT3M.js → chunk-MQ4IEDM5.js} +462 -138
- package/dist/{chunk-QGFKSDQO.js → chunk-MRM4KJ2O.js} +2 -2
- package/dist/{chunk-ETMHDCEH.js → chunk-MX2OZHIT.js} +102 -42
- package/dist/{chunk-6EYTD777.js → chunk-MXUPMGRY.js} +2 -2
- package/dist/{chunk-2FKEF2AC.js → chunk-NHU26HQ7.js} +58 -35
- package/dist/{chunk-KBJMLXNW.js → chunk-NQVJ4FPY.js} +161 -78
- package/dist/chunk-NZ7FX3AE.js +65 -0
- package/dist/chunk-OALBVELJ.js +23 -0
- package/dist/{chunk-5S3JQ5AT.js → chunk-OGZ4UPYK.js} +183 -137
- package/dist/{chunk-6WHWXCHJ.js → chunk-OMNB27GM.js} +7 -3
- package/dist/{chunk-EGGDPDYJ.js → chunk-OO63YP35.js} +1 -1
- package/dist/{chunk-ZYQYX66L.js → chunk-OPYDTW5Q.js} +6 -6
- package/dist/{chunk-A2GAWGVJ.js → chunk-OSJN7KDS.js} +68 -39
- package/dist/{chunk-RMC4OONA.js → chunk-OSJXIW6I.js} +1030 -1123
- package/dist/{chunk-X23SZHV5.js → chunk-OVVE42P4.js} +6 -6
- package/dist/{chunk-CCJP6QZO.js → chunk-OZA7HA6L.js} +1 -1
- package/dist/chunk-OZLKEBCD.js +54 -0
- package/dist/{chunk-TE4M52AA.js → chunk-P6DEFCMQ.js} +18 -2
- package/dist/{chunk-AMR4SUAN.js → chunk-PDTIQL3B.js} +6 -6
- package/dist/{chunk-BIVL764T.js → chunk-PJ5BYZPN.js} +2 -2
- package/dist/{chunk-BISJK67O.js → chunk-PK7Z7WRJ.js} +98 -46
- package/dist/{chunk-7VMEM3LN.js → chunk-PL6NWB5U.js} +178 -113
- package/dist/chunk-PMT75APP.js +94 -0
- package/dist/chunk-PP6A4X55.js +11 -0
- package/dist/{chunk-I7H5DU34.js → chunk-PPCH3PLO.js} +25 -13
- package/dist/{chunk-BIGQKCU7.js → chunk-PPE6S7WU.js} +42 -24
- package/dist/{chunk-2NSQIPAA.js → chunk-PT7KSIEO.js} +23 -36
- package/dist/{chunk-KZJ5VM6E.js → chunk-PZ3TQFSY.js} +15 -1
- package/dist/{chunk-ZJFJ2IKQ.js → chunk-QAUGRVRU.js} +122 -23
- package/dist/{chunk-BTDGWHGJ.js → chunk-QMFWZG2P.js} +39 -19
- package/dist/{chunk-L6YVK6VC.js → chunk-QZGGCE45.js} +2 -2
- package/dist/{chunk-67QSW5RW.js → chunk-R2RJQ3BM.js} +4 -4
- package/dist/{chunk-ZY72LSQK.js → chunk-R7HBIQ63.js} +102 -61
- package/dist/{chunk-4JHMCXOB.js → chunk-RBNDZLYS.js} +77 -36
- package/dist/chunk-RCSY4CT4.js +2170 -0
- package/dist/{chunk-NGA7ICG4.js → chunk-RDJ3ZU6O.js} +16 -13
- package/dist/{chunk-2NN676RI.js → chunk-RHQRPJHS.js} +7 -8
- package/dist/chunk-RI6XQKWJ.js +26 -0
- package/dist/{chunk-YOOHNQ3L.js → chunk-RJICOOB3.js} +18 -8
- package/dist/{chunk-5DTCOOLU.js → chunk-RLAVNCQJ.js} +2 -2
- package/dist/{chunk-CYKXROFG.js → chunk-ROPPWJQB.js} +23 -12
- package/dist/{chunk-54ROMBU7.js → chunk-SELOV32X.js} +105 -50
- package/dist/{chunk-TUW5IYGA.js → chunk-SQI4NWTQ.js} +9 -9
- package/dist/{chunk-ZEYBI47P.js → chunk-SRJ74CMG.js} +11 -3
- package/dist/{chunk-NHC2ADGI.js → chunk-STWOURLG.js} +253 -144
- package/dist/chunk-SWMFXSVW.js +23 -0
- package/dist/chunk-SXAZDIGM.js +84 -0
- package/dist/{chunk-EMFUZKYK.js → chunk-SZ5VGWDY.js} +3 -3
- package/dist/{chunk-R5MEBBAA.js → chunk-T26G23RS.js} +442 -119
- package/dist/{chunk-QHRE2M6V.js → chunk-T2L5H2WW.js} +4 -3
- package/dist/chunk-T7GPIJ4L.js +89 -0
- package/dist/{chunk-MJPXHCBW.js → chunk-TAEB3RU6.js} +5 -5
- package/dist/{chunk-V7F4F6JA.js → chunk-TBDIMTRD.js} +37 -16
- package/dist/{chunk-63Y3ROZ7.js → chunk-TFFPEWNP.js} +102 -64
- package/dist/{chunk-EZZ533MH.js → chunk-TMEUK2WS.js} +6 -2
- package/dist/{chunk-37PKNVLS.js → chunk-TVOMGNFQ.js} +1 -1
- package/dist/{chunk-HJRNBKIT.js → chunk-TX5FSNAU.js} +436 -30
- package/dist/{chunk-V634AXDM.js → chunk-U52PNFPX.js} +1 -1
- package/dist/{chunk-QLANK3VN.js → chunk-U74AWJ3X.js} +6 -6
- package/dist/chunk-UC7LBW7N.js +26 -0
- package/dist/{chunk-PZ46S2SY.js → chunk-UCKUAKYQ.js} +2 -2
- package/dist/{chunk-KF7HD3EH.js → chunk-UCYL3YA7.js} +77 -55
- package/dist/{chunk-HOU2MZHC.js → chunk-UD2GI3CS.js} +11 -4
- package/dist/{chunk-SNQ7D5R7.js → chunk-UIHGGWES.js} +51 -11
- package/dist/{chunk-LGNJCPFP.js → chunk-ULQIC76A.js} +10 -13
- package/dist/{chunk-KTHFHD6C.js → chunk-UY34DDUM.js} +11 -6
- package/dist/{chunk-6QDMRPXI.js → chunk-UYMFLWM6.js} +215 -258
- package/dist/{chunk-KDSYZLF6.js → chunk-V5IFI3FV.js} +8 -1
- package/dist/{chunk-JTFKRDDA.js → chunk-V7FV66KL.js} +1 -1
- package/dist/{chunk-27OIGDRK.js → chunk-V7NUJEJE.js} +1 -1
- package/dist/{chunk-CCDXK5NA.js → chunk-VESSIKBG.js} +8 -3
- package/dist/{chunk-QSMGZOT5.js → chunk-VRFJAF3R.js} +7 -8
- package/dist/chunk-VS2R3OGN.js +34 -0
- package/dist/{chunk-RLMC5CUP.js → chunk-VS5B4J2D.js} +7 -8
- package/dist/{chunk-7M2GK7XQ.js → chunk-W4R6SGU3.js} +252 -121
- package/dist/{chunk-JKOEHRGV.js → chunk-WDLWWEHZ.js} +1 -1
- package/dist/{chunk-7DAH2E4T.js → chunk-WFBN2HXR.js} +2 -2
- package/dist/{chunk-DLDDRXAI.js → chunk-WJS6SAWA.js} +296 -145
- package/dist/{chunk-WWGPTEQB.js → chunk-WQYNKF33.js} +73 -22
- package/dist/{chunk-64LJDGJH.js → chunk-WUP6C4ZD.js} +4 -2
- package/dist/{chunk-F2EVCJ4U.js → chunk-X24WAHHV.js} +87 -43
- package/dist/{chunk-OJ5CQV7H.js → chunk-X3UCQPVV.js} +209 -96
- package/dist/{chunk-7FKY6YWU.js → chunk-X46PSAJ7.js} +6 -6
- package/dist/{chunk-H3IBJQ5A.js → chunk-XD5XB22R.js} +2 -2
- package/dist/chunk-XDIAQEYK.js +28 -0
- package/dist/{chunk-7PPMT5EJ.js → chunk-XFPNYHX3.js} +372 -105
- package/dist/{chunk-FCECYJVA.js → chunk-XIBVAKCO.js} +1 -1
- package/dist/{chunk-OG2YUVBW.js → chunk-XMX4PCFL.js} +8 -3
- package/dist/{chunk-2NRHD2G7.js → chunk-XRRG4MBM.js} +12 -4
- package/dist/{chunk-FNMH5WEY.js → chunk-XTFO6D4L.js} +1 -1
- package/dist/chunk-XWRI3N5O.js +70 -0
- package/dist/{chunk-ZKJ5L35C.js → chunk-XXPLPSOE.js} +36 -25
- package/dist/{chunk-XQMYQ4TN.js → chunk-XZXZNI7A.js} +1 -1
- package/dist/{chunk-E555EDOQ.js → chunk-YEJZ2OYS.js} +490 -182
- package/dist/chunk-YGZEG3JV.js +123 -0
- package/dist/{chunk-F6OLHND5.js → chunk-Z3WQXVFV.js} +2 -2
- package/dist/{chunk-FFJGC2DX.js → chunk-Z6DUNKFU.js} +173 -40
- package/dist/{chunk-N5HN5QGH.js → chunk-Z6H5ED2I.js} +1 -1
- package/dist/{chunk-7Q37C6GZ.js → chunk-ZBOOMLHD.js} +1 -1
- package/dist/{chunk-MOK3ZS6P.js → chunk-ZDJ7C64T.js} +1 -1
- package/dist/{chunk-GLQ3KCTY.js → chunk-ZGZLEUKM.js} +7 -8
- package/dist/{chunk-YHD2FZFP.js → chunk-ZHRGX225.js} +6 -6
- package/dist/{chunk-76Q7E3TM.js → chunk-ZIVCPXXL.js} +510 -646
- package/dist/{chunk-BSATR6ZO.js → chunk-ZNRSYS76.js} +21 -3
- package/dist/{chunk-DMAMWUYY.js → chunk-ZSLTSCTI.js} +5 -5
- package/dist/{chunk-IGVAWAOK.js → chunk-ZSYFQSPF.js} +43 -9
- package/dist/cli/index.js +8 -3
- package/dist/{core-7Y5BZZON.js → core-43GLGBOY.js} +8 -1
- package/dist/{core-7S3XMW5O.js → core-5GI3ERXO.js} +4 -1
- package/dist/{core-K3JX5WPM.js → core-5L7TMK7I.js} +6 -1
- package/dist/{core-LB5M7XL4.js → core-7TO4OVY5.js} +6 -1
- package/dist/{core-ILPXXC2Z.js → core-BJVENHFQ.js} +7 -1
- package/dist/{core-JDFUZFRH.js → core-BX4MFWKC.js} +6 -1
- package/dist/{core-XW7UJFJZ.js → core-C3KXTOIZ.js} +7 -1
- package/dist/{core-WJNK7F2J.js → core-C5Y6BFLL.js} +7 -1
- package/dist/{core-WZ4CHVYL.js → core-CLUSJ2SK.js} +5 -1
- package/dist/{core-TCSW24N6.js → core-E3IN2VVH.js} +5 -1
- package/dist/{core-MU4ALRR7.js → core-FD67NQOV.js} +6 -1
- package/dist/{core-YMXYUGF5.js → core-FDKMLRAK.js} +5 -1
- package/dist/{core-VKZSQFRG.js → core-FL6Z3VVX.js} +5 -1
- package/dist/{core-5UF44NDI.js → core-JC7JUFPY.js} +8 -1
- package/dist/{core-RR2CAZC5.js → core-JF33TADA.js} +8 -1
- package/dist/{core-4RR6VSXM.js → core-JH32ZAKM.js} +4 -1
- package/dist/{core-G3LXHW73.js → core-JYYZPPQV.js} +7 -1
- package/dist/{core-4HFVG4CP.js → core-KJTKCV4U.js} +4 -1
- package/dist/{core-GSILPKUR.js → core-LCQPE5Y6.js} +8 -1
- package/dist/{core-GLOZY6Z7.js → core-LHVGWE54.js} +6 -1
- package/dist/{core-J2JD5ODO.js → core-OVSNBOCE.js} +9 -1
- package/dist/{core-BLHEJ5OK.js → core-PPEC236B.js} +5 -1
- package/dist/{core-ZLSQHZ3I.js → core-QTJZDK5H.js} +5 -1
- package/dist/{core-TKZZZ6UW.js → core-R3YZCOUZ.js} +7 -1
- package/dist/{core-HTD5RHE7.js → core-RIBW5XU4.js} +7 -1
- package/dist/{core-AR2T32Y3.js → core-RJFILBWL.js} +8 -1
- package/dist/{core-A5AKUB7H.js → core-RWSXEKTE.js} +4 -1
- package/dist/{core-DD62MWEW.js → core-SOPPZLEH.js} +5 -1
- package/dist/{core-HDNWVLJW.js → core-TBUZCXLX.js} +5 -1
- package/dist/{core-BOG33BFD.js → core-TZ5QLTAX.js} +5 -1
- package/dist/{core-H5HO2CED.js → core-U7E5W4MY.js} +3 -1
- package/dist/{core-QPSAYRFT.js → core-UBNVSL44.js} +7 -1
- package/dist/{core-E2XOSHPR.js → core-UDRD4WIU.js} +6 -1
- package/dist/{core-DFZMOO7E.js → core-UVJZ4HY2.js} +7 -1
- package/dist/{core-LGJZUP6H.js → core-X7WWYQH4.js} +8 -1
- package/dist/{core-BBNY2BX4.js → core-XP56X47I.js} +5 -1
- package/dist/{core-3KLQSYWB.js → core-XQG54CYG.js} +6 -1
- package/dist/{dataTable-CNDRVGA5.js → dataTable-U7W4I6IF.js} +15 -2
- package/dist/{engine-FVEIM3WV.js → engine-O5V26MGR.js} +32 -19
- package/dist/fixtures.js +4 -1
- package/dist/flags-BVLSAXT3.js +10 -0
- package/dist/{fontTables-ZPZQ6IR3.js → fontTables-JUW7ZTQY.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 +41 -22
- package/dist/{main-THU6VIVU.js → main-35GS47XC.js} +68 -123
- package/dist/mcp/server.js +131 -118
- package/dist/react/bar.js +10 -1
- package/dist/react/bartable.js +10 -1
- package/dist/react/box.js +8 -1
- package/dist/react/bullet.js +10 -1
- package/dist/react/butterfly.js +10 -1
- package/dist/react/choropleth.js +10 -1
- package/dist/react/cohort.js +11 -1
- package/dist/react/column.js +10 -1
- package/dist/react/combo.js +10 -1
- package/dist/react/creative.js +11 -1
- package/dist/react/diagram.js +10 -1
- package/dist/react/dimswitch.js +11 -1
- package/dist/react/dot.js +9 -1
- package/dist/react/export.js +36 -18
- package/dist/react/funnel.js +9 -1
- package/dist/react/gantt.js +9 -1
- package/dist/react/grid.js +10 -1
- package/dist/react/heatmap.js +9 -1
- package/dist/react/histogram.js +11 -1
- package/dist/react/index.js +101 -85
- package/dist/react/kpi.js +10 -1
- package/dist/react/likert.js +11 -1
- package/dist/react/line.js +9 -1
- package/dist/react/mekko.js +10 -1
- package/dist/react/pareto.js +11 -1
- package/dist/react/pie.js +9 -1
- package/dist/react/prepare.js +49 -21
- package/dist/react/pvm.js +12 -1
- package/dist/react/pyramid.js +10 -1
- package/dist/react/sankey.js +10 -1
- package/dist/react/scatter.js +8 -1
- package/dist/react/slope.js +10 -1
- package/dist/react/sparkline.js +10 -1
- package/dist/react/spec.js +24 -14
- package/dist/react/status.js +9 -1
- package/dist/react/story.js +5 -2
- package/dist/react/table.js +9 -1
- package/dist/react/theme.js +10 -3
- package/dist/react/tilemap.js +9 -1
- package/dist/react/treemap.js +9 -1
- package/dist/react/variance.js +10 -1
- package/dist/react/waffle.js +9 -1
- package/dist/react/waterfall.js +11 -1
- package/dist/{resvg-VB7S5HRF.js → resvg-ZYEZTSUO.js} +3 -1
- package/dist/rows.js +3 -2
- package/dist/{rowsModule-LI6KOS46.js → rowsModule-H2S6WW4D.js} +2 -1
- package/dist/{schema-CGQID64D.js → schema-2R32F6AW.js} +1 -1
- package/dist/{schema-H2EC4GAQ.js → schema-2TPGJGVR.js} +1 -1
- package/dist/{schema-THXXFY6I.js → schema-47BG2TZA.js} +1 -3
- package/dist/{schema-AMT7P7KB.js → schema-56MOEOVR.js} +1 -1
- package/dist/{schema-GNTKL5DN.js → schema-5MSR4LNN.js} +1 -1
- package/dist/{schema-5ZTGVQAJ.js → schema-5RIYEWE6.js} +1 -1
- package/dist/{schema-LOQ3AFC7.js → schema-A26ZNGTZ.js} +1 -3
- package/dist/{schema-MMVPMJEF.js → schema-ALBF6V7Y.js} +1 -3
- package/dist/{schema-BKUFZLLI.js → schema-BA6WP5YZ.js} +1 -1
- package/dist/{schema-PQZWO3BP.js → schema-CBL2SMVR.js} +1 -3
- package/dist/{schema-BBTXTWYI.js → schema-CWKGLDSR.js} +1 -3
- package/dist/{schema-5KDEQBBT.js → schema-DBIQFL56.js} +1 -1
- package/dist/{schema-KPEPBGAX.js → schema-DL7V6NN2.js} +1 -1
- package/dist/{schema-PL3EU6EQ.js → schema-DUVJMFKQ.js} +4 -2
- package/dist/{schema-L5U4OROI.js → schema-ECJERHKF.js} +2 -1
- package/dist/{schema-YLE4XXQQ.js → schema-EDSEKZDJ.js} +1 -1
- package/dist/{schema-HH5HOORE.js → schema-ESR6ZIK4.js} +1 -3
- package/dist/{schema-5DUTAVO7.js → schema-F7TWGLRZ.js} +1 -3
- package/dist/{schema-B2GCEYXD.js → schema-FGB6IGZM.js} +1 -3
- package/dist/{schema-7NSV542V.js → schema-FKGGTM4Z.js} +2 -1
- package/dist/{schema-72EEMYS3.js → schema-FU2AFIEE.js} +1 -1
- package/dist/{schema-QORUB6EK.js → schema-JNJFCYBM.js} +18 -1
- package/dist/{schema-JH57NFXJ.js → schema-JYZ4RF6S.js} +2 -1
- package/dist/{schema-25INXAMY.js → schema-K7F6TEDK.js} +1 -2
- package/dist/{schema-OU35XA3Z.js → schema-KAK6DZX4.js} +1 -1
- package/dist/{schema-R5Y6NVBH.js → schema-MOKWIGF7.js} +1 -1
- package/dist/{schema-ZQSIR5UC.js → schema-MQT6BMNK.js} +1 -3
- package/dist/{schema-FDFQKIO5.js → schema-MR3BPPQR.js} +1 -1
- package/dist/{schema-VYECMPON.js → schema-OPXZYIW7.js} +1 -3
- package/dist/{schema-ZEVJMFLV.js → schema-PV7JGX5H.js} +1 -1
- package/dist/{schema-QPOBZUAR.js → schema-PWPQF5RC.js} +1 -1
- package/dist/{schema-GN6GAIU5.js → schema-PYQEUC5P.js} +1 -3
- package/dist/{schema-M5JBHQIV.js → schema-QPIC5MAG.js} +9 -2
- package/dist/{schema-QCIE6M2P.js → schema-R42VXFIS.js} +1 -1
- package/dist/{schema-J7TNCZIP.js → schema-TVUJNEX7.js} +1 -1
- package/dist/{schema-AXRDF6ND.js → schema-Y4TI2T3T.js} +1 -1
- package/dist/{schema-ZG6ZKFRZ.js → schema-ZU2EU2VP.js} +1 -1
- package/dist/{specValidation-VHLGDEME.js → specValidation-2NHJT7TQ.js} +4 -1
- package/dist/theme.js +7 -2
- package/dist/{themeShapeRules-PW4BQHKL.js → themeShapeRules-G7UZX6GJ.js} +1 -1
- package/dist/types/core/annotate.d.ts +27 -2
- package/dist/types/core/annotateArms.d.ts +3 -1
- package/dist/types/core/annotateTargets.d.ts +4 -0
- package/dist/types/core/annotationOrigin.d.ts +13 -0
- package/dist/types/core/axis.d.ts +2 -2
- package/dist/types/core/charts/band/stacks.d.ts +7 -1
- package/dist/types/core/charts/bartable/types.d.ts +14 -1
- package/dist/types/core/charts/box/types.d.ts +3 -1
- package/dist/types/core/charts/choropleth/layout.d.ts +1 -5
- package/dist/types/core/charts/choropleth/types.d.ts +19 -0
- package/dist/types/core/charts/cohort/types.d.ts +16 -3
- package/dist/types/core/charts/column/model.d.ts +13 -0
- package/dist/types/core/charts/combo/layout.d.ts +7 -0
- 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 +24 -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/grid/normalize.d.ts +5 -0
- package/dist/types/core/charts/grid/schema.d.ts +2 -2
- 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/pareto/layout.d.ts +2 -0
- package/dist/types/core/charts/pvm/types.d.ts +10 -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/scatter/clamp.d.ts +2 -1
- package/dist/types/core/charts/scatter/model.d.ts +5 -0
- package/dist/types/core/charts/scatter/valueLines.d.ts +3 -1
- package/dist/types/core/charts/status/layout.d.ts +3 -0
- package/dist/types/core/charts/table/resolve.d.ts +22 -3
- package/dist/types/core/charts/table/view.d.ts +24 -1
- package/dist/types/core/claims/browser.d.ts +2 -0
- package/dist/types/core/claims/ids.d.ts +38 -0
- package/dist/types/core/deferred.d.ts +1 -0
- package/dist/types/core/doc/diagnostics.d.ts +3 -2
- package/dist/types/core/footer.d.ts +2 -0
- package/dist/types/core/formatSpec.d.ts +43 -14
- package/dist/types/core/frame.d.ts +26 -59
- package/dist/types/core/frameText.d.ts +203 -0
- package/dist/types/core/geo/types.d.ts +2 -0
- package/dist/types/core/geometry.d.ts +3 -1
- package/dist/types/core/label/categoryRow.d.ts +19 -2
- package/dist/types/core/label/solver.d.ts +23 -2
- package/dist/types/core/normalize/shared.d.ts +14 -2
- package/dist/types/core/notes.d.ts +15 -2
- package/dist/types/core/reading.d.ts +12 -1
- package/dist/types/core/registry.d.ts +4 -5
- package/dist/types/core/request.d.ts +7 -1
- package/dist/types/core/schema/capability.d.ts +32 -7
- package/dist/types/core/schema/generatedColumns.d.ts +168 -0
- package/dist/types/core/seriesIdentity.d.ts +4 -1
- package/dist/types/core/sizing.d.ts +32 -1
- package/dist/types/core/structureCounts.d.ts +3 -1
- package/dist/types/core/text.d.ts +16 -0
- package/dist/types/core/theme.d.ts +33 -4
- package/dist/types/core/themeGeometry.d.ts +9 -0
- package/dist/types/core/themeRules.d.ts +2 -0
- package/dist/types/core/timeAxis.d.ts +6 -1
- package/dist/types/core/types/annotations.d.ts +74 -4
- package/dist/types/core/types/diagram.d.ts +7 -0
- package/dist/types/core/types/options.d.ts +118 -15
- package/dist/types/core/types/scene.d.ts +30 -2
- package/dist/types/core/types/table.d.ts +27 -3
- package/dist/types/core/types/theme.d.ts +23 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/react/TableChart.d.ts +5 -0
- package/dist/types/react/barrelCharts.d.ts +16 -5
- package/dist/types/react/charts/butterfly.d.ts +2 -2
- package/dist/types/react/charts/dot.d.ts +7 -1
- package/dist/types/react/charts/pareto.d.ts +4 -1
- package/dist/types/react/charts/variance.d.ts +3 -1
- package/dist/types/react/hover/labelCard.d.ts +11 -2
- package/dist/types/react/prepare.d.ts +7 -1
- package/dist/types/theme.d.ts +2 -0
- package/dist/validate.js +23 -6
- package/docs/TELEMETRY.md +2 -2
- package/docs/manual.md +283 -65
- package/docs/reference/bar.md +15 -4
- package/docs/reference/bartable.md +17 -2
- package/docs/reference/box.md +15 -4
- package/docs/reference/bullet.md +21 -6
- package/docs/reference/butterfly.md +17 -6
- package/docs/reference/choropleth.md +16 -5
- package/docs/reference/cohort.md +25 -5
- package/docs/reference/column.md +19 -4
- package/docs/reference/combo.md +11 -5
- package/docs/reference/creative.md +17 -8
- package/docs/reference/diagram.md +6 -1
- package/docs/reference/dimswitch.md +71 -118
- package/docs/reference/dot.md +16 -7
- package/docs/reference/fixtures.md +94 -1
- package/docs/reference/funnel.md +14 -5
- package/docs/reference/gantt.md +17 -16
- package/docs/reference/grid.md +13 -3
- package/docs/reference/heatmap.md +16 -6
- package/docs/reference/histogram.md +2 -2
- package/docs/reference/kpi.md +5 -1
- package/docs/reference/likert.md +17 -4
- package/docs/reference/line.md +18 -5
- package/docs/reference/mekko.md +10 -5
- package/docs/reference/options.md +20 -15
- package/docs/reference/pareto.md +9 -5
- package/docs/reference/pie.md +9 -5
- package/docs/reference/pvm.md +16 -6
- package/docs/reference/pyramid.md +14 -4
- package/docs/reference/react.md +6 -7
- package/docs/reference/sankey.md +7 -3
- package/docs/reference/scatter.md +8 -4
- package/docs/reference/slope.md +15 -5
- package/docs/reference/sparkline.md +1 -1
- package/docs/reference/status.md +7 -1
- package/docs/reference/table.md +41 -110
- package/docs/reference/theme.md +12 -4
- package/docs/reference/tilemap.md +2 -4
- package/docs/reference/treemap.md +1 -1
- package/docs/reference/variance.md +12 -6
- package/docs/reference/waffle.md +1 -1
- package/docs/reference/warnings.md +1077 -0
- package/docs/reference/waterfall.md +20 -5
- package/docs/use-cases.md +25 -13
- package/llms.txt +19 -6
- package/package.json +18 -3
- package/dist/chunk-6364WO5D.js +0 -47
- package/dist/chunk-DQ7YMQVX.js +0 -26
- package/dist/chunk-EBB4PYBN.js +0 -24
- package/dist/chunk-FG5L2LUK.js +0 -89
- package/dist/chunk-IFQN4GKK.js +0 -1852
- package/dist/chunk-IRXVV65V.js +0 -24
- package/dist/chunk-JGFHNAHS.js +0 -22
- package/dist/chunk-JHWYG7V5.js +0 -24
- package/dist/chunk-M4SPKUZE.js +0 -7
- package/dist/chunk-O36WX56O.js +0 -13
- package/dist/chunk-QJWLNP64.js +0 -24
- package/dist/chunk-QZIHKQRH.js +0 -26
- package/dist/chunk-SE7MJ2LQ.js +0 -24
- package/dist/chunk-TXBO2LWM.js +0 -25
- package/dist/chunk-UPTXFTKH.js +0 -25
- package/dist/chunk-UREXN6WG.js +0 -25
- package/dist/chunk-UZLR25BW.js +0 -24
- package/dist/chunk-WIVFIVFZ.js +0 -27
- package/dist/chunk-WZL4EEBS.js +0 -11
- package/dist/chunk-XHRUXZD7.js +0 -28
- package/dist/chunk-ZWNRLIFT.js +0 -24
|
@@ -1,57 +1,68 @@
|
|
|
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-AICO24HJ.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-KIE5V3DA.js";
|
|
19
16
|
import {
|
|
20
17
|
runAnnotatePass
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FP5B5XIL.js";
|
|
22
19
|
import {
|
|
23
20
|
rowLabelBand
|
|
24
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-J4QRB6DQ.js";
|
|
25
22
|
import {
|
|
26
23
|
fittedLabel,
|
|
27
24
|
gutterBudget,
|
|
28
25
|
stepDownFont
|
|
29
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6ZDSEITW.js";
|
|
30
27
|
import {
|
|
31
28
|
breakUnsupported
|
|
32
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-WFBN2HXR.js";
|
|
30
|
+
import {
|
|
31
|
+
chartString
|
|
32
|
+
} from "./chunk-HTQGJQZN.js";
|
|
33
33
|
import {
|
|
34
34
|
cardFrameTheme,
|
|
35
35
|
cardSize
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-PT7KSIEO.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-E5YF236N.js";
|
|
44
|
+
import {
|
|
45
|
+
labelOn
|
|
46
|
+
} from "./chunk-TMEUK2WS.js";
|
|
44
47
|
import {
|
|
45
48
|
structureCount
|
|
46
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-KW4JXWHO.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,
|
|
65
|
+
NARROW_FORM,
|
|
55
66
|
applyAxisBounds,
|
|
56
67
|
applyTickStep,
|
|
57
68
|
applyValueAxisTitleInk,
|
|
@@ -67,35 +78,33 @@ import {
|
|
|
67
78
|
shownTickStep,
|
|
68
79
|
straightBreakGlyph,
|
|
69
80
|
valueAxisTitleRequest
|
|
70
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-ETRAPN5G.js";
|
|
71
82
|
import {
|
|
72
83
|
PRIORITY,
|
|
73
84
|
authoredFootnoteCount,
|
|
74
85
|
authoredNotes,
|
|
75
|
-
cleanDiff,
|
|
76
86
|
composedTextRole,
|
|
77
|
-
createOccupiedIndex,
|
|
78
87
|
frameTextOptions,
|
|
79
88
|
labelCtx,
|
|
80
89
|
labelsToNodes,
|
|
81
90
|
normalizeLegendOption,
|
|
82
91
|
plotHeightAfter,
|
|
83
|
-
rectContains,
|
|
84
|
-
rectsOverlap,
|
|
85
|
-
rowLabelX,
|
|
86
92
|
solveFrame,
|
|
87
93
|
solveLabels
|
|
88
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-I5VDW2XZ.js";
|
|
95
|
+
import {
|
|
96
|
+
emptyIdRecord
|
|
97
|
+
} from "./chunk-LINZPU5D.js";
|
|
89
98
|
import {
|
|
90
99
|
defaultFormatSpec,
|
|
91
100
|
exampleSpec,
|
|
92
101
|
formatWithSpec,
|
|
93
102
|
parseFormatExample,
|
|
94
103
|
roundedNumber
|
|
95
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-Z6DUNKFU.js";
|
|
96
105
|
import {
|
|
106
|
+
AUTO_MAX_DECIMALS,
|
|
97
107
|
autoDecimals,
|
|
98
|
-
chartStrings,
|
|
99
108
|
formatAutomaticNumber,
|
|
100
109
|
formatAutomaticPercent
|
|
101
110
|
} from "./chunk-MSYTF3DZ.js";
|
|
@@ -107,23 +116,28 @@ import {
|
|
|
107
116
|
import {
|
|
108
117
|
REFERENCE_LABEL_CLEARANCE,
|
|
109
118
|
bulletBandPaints,
|
|
119
|
+
cleanDiff,
|
|
110
120
|
contrastInkPaint,
|
|
121
|
+
createOccupiedIndex,
|
|
111
122
|
emphasisWeight,
|
|
112
123
|
mixedPaint,
|
|
113
124
|
paintColor,
|
|
114
125
|
readerFloorPx,
|
|
126
|
+
rectContains,
|
|
127
|
+
rectsOverlap,
|
|
115
128
|
resolveSemanticPaletteTheme,
|
|
116
129
|
resolveTheme,
|
|
130
|
+
rowLabelX,
|
|
117
131
|
secondaryType,
|
|
118
132
|
semanticPalettePaint,
|
|
119
133
|
separationStroke,
|
|
120
134
|
strokeToken,
|
|
121
135
|
tableHeadFloorPx,
|
|
122
136
|
textScaleOf
|
|
123
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-TX5FSNAU.js";
|
|
124
138
|
import {
|
|
125
139
|
contrastRatio
|
|
126
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-BQBD6Q5J.js";
|
|
127
141
|
import {
|
|
128
142
|
DEFAULT_TARGET,
|
|
129
143
|
MAGNITUDE_CEILING,
|
|
@@ -133,130 +147,15 @@ import {
|
|
|
133
147
|
resolveHighlight,
|
|
134
148
|
resolveSize,
|
|
135
149
|
resolveSubtitle
|
|
136
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-RJICOOB3.js";
|
|
151
|
+
import {
|
|
152
|
+
defaultMeasurer
|
|
153
|
+
} from "./chunk-UIHGGWES.js";
|
|
137
154
|
import {
|
|
138
155
|
maxOf,
|
|
139
156
|
minOf,
|
|
140
157
|
pushAll
|
|
141
158
|
} from "./chunk-WYJEOMNY.js";
|
|
142
|
-
import {
|
|
143
|
-
defaultMeasurer
|
|
144
|
-
} from "./chunk-SNQ7D5R7.js";
|
|
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);
|
|
260
159
|
|
|
261
160
|
// src/core/charts/bullet/targetScale.ts
|
|
262
161
|
function targetWord(options) {
|
|
@@ -299,18 +198,25 @@ function percentOfTarget(row) {
|
|
|
299
198
|
return 100 * row.value / row.target;
|
|
300
199
|
}
|
|
301
200
|
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 },
|
|
201
|
+
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
202
|
{ key: "actual", head: chartString(options, "actualColumn"), w: valueW },
|
|
304
203
|
{ key: "share", head: chartString(options, "shareColumn", { v1: target }), w: shareW },
|
|
305
204
|
{ key: "delta", head: chartString(options, "deltaColumn", { v1: target }), w: deltaBodyW }
|
|
306
205
|
].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
|
-
}),
|
|
206
|
+
let stackFitted = fitHead(column.head, headerFont, column.w, measure, headEnv), fitted = fitHead(overrides?.[column.key]?.label ?? column.head, headerFont, column.w, measure, headEnv);
|
|
207
|
+
return { ...column, fitted, stackFitted, w: Math.max(column.w, fitted.w) };
|
|
208
|
+
}), 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
209
|
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
210
|
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
|
-
|
|
211
|
+
}), 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);
|
|
212
|
+
namedLeft !== void 0 && (sideNames = sideNamesAt(namedLeft, Math.max(2, maxOf(rows.map((row) => row.label.split(/\s+/).length)))), sideNotes = notesAt(namedLeft), sideLeft = namedLeft);
|
|
213
|
+
let columnRoom = plot0.w - (sideLeft ? sideLeft + LEFT_GAP : 0) - naturalWidth(naturalColumns) - gapsOf(naturalColumns, RIGHT_GAP) - plotKeeps, columns = naturalColumns.map((column) => {
|
|
214
|
+
let authored = overrides?.[column.key]?.width;
|
|
215
|
+
if (authored === void 0) return column;
|
|
216
|
+
let w = authoredTrackWidth(column.key, authored, column.w, column.w + Math.max(0, columnRoom), trackWarnings);
|
|
217
|
+
return columnRoom -= w - column.w, { ...column, w };
|
|
218
|
+
}), 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);
|
|
219
|
+
if (namedLeft === void 0 && labelOn2("category") && sidePlotW(sideLeft) < SIDE_PLOT_SHARE * size.width) {
|
|
314
220
|
let longestWord = Math.max(
|
|
315
221
|
0,
|
|
316
222
|
maxOf(rows.flatMap((row) => row.label.split(/\s+/).map((word) => measure(word, nameFont).width))),
|
|
@@ -330,10 +236,10 @@ function layoutTargetScale(input) {
|
|
|
330
236
|
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
237
|
sideBandCenter + SIDE_BAND_H / 2 + TARGET_REACH,
|
|
332
238
|
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") :
|
|
239
|
+
), 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
240
|
let heads2 = headsFor(stacked2);
|
|
335
241
|
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 = [];
|
|
242
|
+
}, 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
243
|
if (uniform >= blockH || rows.length === 1) rows.forEach((_, index) => rowTops.push(index * Math.max(blockH, uniform)));
|
|
338
244
|
else {
|
|
339
245
|
let gap = Math.max(0, (availH - minimumRowsH) / Math.max(1, rows.length - 1));
|
|
@@ -341,8 +247,21 @@ function layoutTargetScale(input) {
|
|
|
341
247
|
}
|
|
342
248
|
let rowsH = rowTops.at(-1) + rowHeights.at(-1), grown = input.grow(size.height - availH, span(naturalPitch));
|
|
343
249
|
if (grown) return grown;
|
|
344
|
-
|
|
345
|
-
|
|
250
|
+
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));
|
|
251
|
+
let leftW = stacked ? stackLeftW : sideLeft, columnRight = /* @__PURE__ */ new Map();
|
|
252
|
+
if (!stacked) {
|
|
253
|
+
let before = plot0.x + (leftW ? leftW + LEFT_GAP : 0);
|
|
254
|
+
for (let column of beforePlot)
|
|
255
|
+
columnRight.set(column.key, before + column.w), before += column.w + COLUMN_GAP;
|
|
256
|
+
let after = plot0.x + plot0.w;
|
|
257
|
+
for (let column of [...afterPlot].reverse())
|
|
258
|
+
columnRight.set(column.key, after), after -= column.w + COLUMN_GAP;
|
|
259
|
+
}
|
|
260
|
+
let columnOf = (key) => columns.find((column) => column.key === key), cellX = (key, w) => {
|
|
261
|
+
let column = columnOf(key);
|
|
262
|
+
return alignedLeft(columnRight.get(key) - column.w, column.w, w, overrides?.[key]?.align ?? "right");
|
|
263
|
+
}, rowsTop = plot0.y + headLineH(stacked) + (stacked ? 0 : TARGET_REACH), plot = {
|
|
264
|
+
x: stacked ? plot0.x : plot0.x + (leftW ? leftW + LEFT_GAP : 0) + (beforeW ? beforeW + RIGHT_GAP : 0),
|
|
346
265
|
y: rowsTop,
|
|
347
266
|
w: stacked ? plot0.w : Math.max(10, sidePlotW(leftW)),
|
|
348
267
|
h: rowsH
|
|
@@ -354,11 +273,12 @@ function layoutTargetScale(input) {
|
|
|
354
273
|
});
|
|
355
274
|
let rowsBottom = rowsTop + rowsH, nodes = [...frameResult.nodes], headRequests = [], heads = headsFor(stacked);
|
|
356
275
|
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
|
-
|
|
276
|
+
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;
|
|
277
|
+
heads.forEach((column, order) => {
|
|
278
|
+
if (!column.fitted.lines[0]) return;
|
|
279
|
+
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");
|
|
280
|
+
headRequests.push(headRequest(column.key, order, column.fitted, end, headY, headerH, onKey));
|
|
281
|
+
});
|
|
362
282
|
}
|
|
363
283
|
let rowBandIds = new Map(rows.map((row) => [row.id, []])), directions = rows.map((row) => row.direction);
|
|
364
284
|
targetBands(directions, target, options).forEach((band, index) => {
|
|
@@ -414,14 +334,9 @@ function layoutTargetScale(input) {
|
|
|
414
334
|
typeRole: "secondary"
|
|
415
335
|
}), 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
336
|
});
|
|
417
|
-
let marks = { rows: [] }, requests = [], placedAnnotations = [], inks = /* @__PURE__ */ new Map(), fonts = /* @__PURE__ */ new Map()
|
|
337
|
+
let marks = { rows: [] }, requests = [], placedAnnotations = [], inks = /* @__PURE__ */ new Map(), fonts = /* @__PURE__ */ new Map();
|
|
418
338
|
for (let head of headRequests)
|
|
419
339
|
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
340
|
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
341
|
fonts.set(id, font), requests.push({
|
|
427
342
|
id,
|
|
@@ -448,10 +363,10 @@ function layoutTargetScale(input) {
|
|
|
448
363
|
let y = barCenter - barH / 2, display = { value: valueTexts[index] ?? input.valueText(row) ?? "" };
|
|
449
364
|
if (barNodeId = `bar:${row.id}`, share <= hi) {
|
|
450
365
|
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);
|
|
366
|
+
nodes.push({ t: "rect", id: barNodeId, rect, ...barStyle, owner, part: "bar", ...hidden("actual") ? {} : { display } }), occupied.claim(rect, "mark", owner);
|
|
452
367
|
} else {
|
|
453
368
|
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" });
|
|
369
|
+
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
370
|
let glyph = straightBreakGlyph(theme, { x: cut2, y: barCenter }, `${barNodeId}:break`, owner, { token: "axis" }, "barBreak");
|
|
456
371
|
nodes.push(...glyph.nodes), occupied.claim(rect, "mark", owner), occupied.claim(tail, "mark", owner), occupied.claim(glyph.rect, "axis", owner, "barBreak");
|
|
457
372
|
}
|
|
@@ -463,14 +378,14 @@ function layoutTargetScale(input) {
|
|
|
463
378
|
});
|
|
464
379
|
let noteTop = stacked ? top + stackNoteTop : top + (labelOn2("category") ? sideNames.labels[index].h : 0) + LINE_GAP;
|
|
465
380
|
if (labelOn2("category")) {
|
|
466
|
-
let name = (stacked ? stackNames : sideNames).labels[index];
|
|
381
|
+
let name = (stacked ? stackNames : sideNames).labels[index], labelAlign = stacked ? "left" : overrides?.label?.align ?? "left";
|
|
467
382
|
request(
|
|
468
383
|
`category:${row.id}`,
|
|
469
384
|
"category",
|
|
470
385
|
owner,
|
|
471
386
|
row.label,
|
|
472
387
|
nameFont,
|
|
473
|
-
{ x: plot0.x, y: top, w: name.w, h: name.h },
|
|
388
|
+
{ x: alignedLeft(plot0.x, leftW, name.w, labelAlign), y: top, w: name.w, h: name.h },
|
|
474
389
|
{ ...fittedLabel(name, nameFont), priority: PRIORITY.endpoint + (highlights.has(row.id) ? PRIORITY.highlightBonus : 0) }
|
|
475
390
|
);
|
|
476
391
|
let note = (stacked ? stackNotes : sideNotes)[index];
|
|
@@ -480,24 +395,24 @@ function layoutTargetScale(input) {
|
|
|
480
395
|
owner,
|
|
481
396
|
note.text,
|
|
482
397
|
noteFont,
|
|
483
|
-
{ x: plot0.x, y: noteTop, w: note.w, h: note.h },
|
|
398
|
+
{ x: alignedLeft(plot0.x, leftW, note.w, labelAlign), y: noteTop, w: note.w, h: note.h },
|
|
484
399
|
{ ...fittedLabel(note, noteFont), role: "note" }
|
|
485
400
|
), inks.set(`target:${row.id}`, { token: "inkMuted" });
|
|
486
401
|
}
|
|
487
|
-
let
|
|
402
|
+
let valueText = valueTexts[index];
|
|
488
403
|
if (valueText) {
|
|
489
|
-
let size1 = measure(valueText, valueFont),
|
|
404
|
+
let size1 = measure(valueText, valueFont), left = stacked ? plot0.x + plot0.w - (shareW ? shareW + VALUE_GAP : 0) - size1.width : cellX("actual", size1.width);
|
|
490
405
|
request(
|
|
491
406
|
`point:${row.id}`,
|
|
492
407
|
"point",
|
|
493
408
|
owner,
|
|
494
409
|
valueText,
|
|
495
410
|
valueFont,
|
|
496
|
-
{ x:
|
|
411
|
+
{ x: left, y: valueCenter - size1.height / 2, w: size1.width, h: size1.height }
|
|
497
412
|
);
|
|
498
413
|
}
|
|
499
414
|
let shareLabel = shareTexts[index];
|
|
500
|
-
if (shareLabel
|
|
415
|
+
if (shareLabel) {
|
|
501
416
|
let size2 = measure(shareLabel, shareFont);
|
|
502
417
|
request(
|
|
503
418
|
`share:${row.id}`,
|
|
@@ -505,20 +420,20 @@ function layoutTargetScale(input) {
|
|
|
505
420
|
owner,
|
|
506
421
|
shareLabel,
|
|
507
422
|
shareFont,
|
|
508
|
-
{ x:
|
|
423
|
+
{ x: stacked ? plot0.x + plot0.w - size2.width : cellX("share", size2.width), y: valueCenter - size2.height / 2, w: size2.width, h: size2.height },
|
|
509
424
|
{ role: "value" }
|
|
510
425
|
), inks.set(`share:${row.id}`, { token: "ink" });
|
|
511
426
|
}
|
|
512
427
|
let delta = deltas[index], deltaLabel = stacked ? deltaTexts[index] : deltaBodies[index];
|
|
513
428
|
if (deltaLabel && delta !== void 0) {
|
|
514
|
-
let size3 = measure(deltaLabel, deltaFont), labelId = `delta:${row.id}`, tone = input.deltaTone(row, delta),
|
|
429
|
+
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
430
|
request(
|
|
516
431
|
labelId,
|
|
517
432
|
"annotation",
|
|
518
433
|
owner,
|
|
519
434
|
deltaLabel,
|
|
520
435
|
deltaFont,
|
|
521
|
-
{ x:
|
|
436
|
+
{ x: left, y, w: size3.width, h: size3.height },
|
|
522
437
|
{ role: composedTextRole(deltaLabel, "note"), priority: PRIORITY.extreme }
|
|
523
438
|
), inks.set(labelId, { token: tone === "neutral" ? "ink" : tone }), placedAnnotations.push({
|
|
524
439
|
id: `delta-target:${row.id}`,
|
|
@@ -565,7 +480,7 @@ function layoutTargetScale(input) {
|
|
|
565
480
|
});
|
|
566
481
|
let describeRow = (row, index) => {
|
|
567
482
|
let share = shares[index], value = input.valueText(row) ?? "n/a", delta = input.deltaVsTarget[row.id];
|
|
568
|
-
return `${row.label} ${value}` + (share === void 0 ? "" :
|
|
483
|
+
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
484
|
};
|
|
570
485
|
return {
|
|
571
486
|
type: "bullet",
|
|
@@ -747,19 +662,19 @@ function bulletAnnotations(options, sharedScale, warnings) {
|
|
|
747
662
|
...annotation.id ? { owner: { annotationId: annotation.id } } : {}
|
|
748
663
|
}), !1));
|
|
749
664
|
}
|
|
750
|
-
var BAND_TRIES = /* @__PURE__ */ Symbol("bandTries"), REGULAR_NAMES = /* @__PURE__ */ Symbol("regularNames"), ROW_KEY_OFF = /* @__PURE__ */ Symbol("rowKeyOff"), HEADS_OFF_KEY = /* @__PURE__ */ Symbol("headsOffKey");
|
|
665
|
+
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
666
|
function layoutBullet(data, options = {}) {
|
|
752
667
|
let warnings = [];
|
|
753
668
|
breakUnsupported("bullet", options, warnings);
|
|
754
669
|
let theme = resolveSemanticPaletteTheme(resolveTheme(options.theme), options.palette, warnings), compact = options.density === "compact";
|
|
755
670
|
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);
|
|
671
|
+
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
672
|
if (!data || !Array.isArray(data.rows) || data.rows.length === 0)
|
|
758
|
-
throw new NormalizeError("empty-data", "rows", "bullet requires at least one row");
|
|
673
|
+
throw new NormalizeError("empty-data", "rows", "bullet requires at least one row", void 0, void 0, ["data", "rows"]);
|
|
759
674
|
let seen = /* @__PURE__ */ new Set(), rows = data.rows.map((r, i) => {
|
|
760
|
-
if (!r?.id) throw new NormalizeError("missing-id", `rows[${i}]`, "bullet row requires an id");
|
|
675
|
+
if (!r?.id) throw new NormalizeError("missing-id", `rows[${i}]`, "bullet row requires an id", void 0, void 0, ["data", "rows", i, "id"]);
|
|
761
676
|
if (seen.has(r.id))
|
|
762
|
-
throw new NormalizeError("duplicate-id", `rows[${i}]`, `duplicate row id '${r.id}'
|
|
677
|
+
throw new NormalizeError("duplicate-id", `rows[${i}]`, `duplicate row id '${r.id}'`, void 0, void 0, ["data", "rows", i, "id"]);
|
|
763
678
|
seen.add(r.id);
|
|
764
679
|
let targetFormat = cellMeta(r.target ?? null)?.format, valueFormat = cellMeta(r.value)?.format ?? options.format;
|
|
765
680
|
targetFormat && (!valueFormat || JSON.stringify(parseFormatExample(targetFormat)) !== JSON.stringify(parseFormatExample(valueFormat))) && warnings.push({
|
|
@@ -838,21 +753,31 @@ function layoutBullet(data, options = {}) {
|
|
|
838
753
|
message: "valueAxis is ignored while bullet rows are normalized to their own scales \u2014 one absolute axis cannot describe differently scaled rows",
|
|
839
754
|
suggest: "set sharedScale: true to keep one absolute axis across rows"
|
|
840
755
|
});
|
|
841
|
-
let chartSpec = options.format ? exampleSpec(options.format, options.locale?.language, void 0, rows.flatMap((row) => row.isPct ? [] : [row.value, row.target])) : void 0,
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
756
|
+
let chartSpec = options.format ? exampleSpec(options.format, options.locale?.language, void 0, rows.flatMap((row) => row.isPct ? [] : [row.value, row.target])) : void 0, automaticSpec = (row) => {
|
|
757
|
+
let spec = {
|
|
758
|
+
...defaultFormatSpec(options.locale?.language),
|
|
759
|
+
decimals: Math.max(autoDecimals(row.value ?? 0), autoDecimals(row.target ?? 0)),
|
|
760
|
+
suffix: row.isPct ? "%" : ""
|
|
761
|
+
};
|
|
762
|
+
if (row.value === null || row.target === null) return spec;
|
|
763
|
+
let gap = cleanDiff(row.value, row.target);
|
|
764
|
+
for (let extra = 0; extra < 2 && spec.decimals < AUTO_MAX_DECIMALS; extra++) {
|
|
765
|
+
let shown2 = cleanDiff(roundedNumber(row.value, spec), roundedNumber(row.target, spec));
|
|
766
|
+
if ((shown2 !== 0 || gap === 0) && Math.abs(shown2 - gap) <= 0.5 * 10 ** -spec.decimals * (1 + 1e-9)) break;
|
|
767
|
+
spec.decimals++;
|
|
768
|
+
}
|
|
769
|
+
return spec;
|
|
770
|
+
}, rowSpecs = new Map(rows.map((row) => [row, row.meta?.format ? exampleSpec(row.meta.format, options.locale?.language, void 0, [row.value, row.target]) : !row.isPct && chartSpec ? chartSpec : automaticSpec(row)])), rowFmt = (row) => (v) => formatWithSpec(v, rowSpecs.get(row)), shownDelta = (row, d) => row.value === null || row.target === null ? d : cleanDiff(roundedNumber(row.value, rowSpecs.get(row)), roundedNumber(row.target, rowSpecs.get(row))), valueTextOf = (row) => {
|
|
846
771
|
if (row.value === null || row.meta?.label === !1) return null;
|
|
847
772
|
let base = rowFmt(row)(row.value);
|
|
848
773
|
return typeof row.meta?.label == "string" ? row.meta.label.replace(/\$\{value\}/g, base) : base;
|
|
849
774
|
}, deltaBody = (row, d) => {
|
|
850
|
-
let spec = rowSpecs.get(row),
|
|
851
|
-
return formatWithSpec(
|
|
775
|
+
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 };
|
|
776
|
+
return formatWithSpec(shown2, shown2 !== 0 && roundedNumber(shown2, fixedSpec) === 0 ? gapSpec : fixedSpec);
|
|
852
777
|
}, 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
778
|
for (let row of rows)
|
|
854
779
|
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 };
|
|
780
|
+
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
781
|
if (targetScale)
|
|
857
782
|
return layoutBulletOnTargetScale(data, options, {
|
|
858
783
|
rows,
|
|
@@ -917,18 +842,18 @@ function layoutBullet(data, options = {}) {
|
|
|
917
842
|
measure
|
|
918
843
|
},
|
|
919
844
|
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(
|
|
845
|
+
), 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 || options[NARROW_FORM] === !0, 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
846
|
labelOn2("category") ? rows : [],
|
|
922
847
|
font,
|
|
923
848
|
capW,
|
|
924
849
|
maxLines2,
|
|
925
850
|
lineH,
|
|
926
851
|
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 } }
|
|
852
|
+
{ 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
853
|
), sideNames = (font = catFont) => {
|
|
929
854
|
let band2 = fitNames(catMaxLines, font);
|
|
930
855
|
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;
|
|
856
|
+
}, 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
857
|
if (capsulesOn)
|
|
933
858
|
for (let row of rows) {
|
|
934
859
|
let d = deltaVsTarget[row.id];
|
|
@@ -936,7 +861,7 @@ function layoutBullet(data, options = {}) {
|
|
|
936
861
|
let text = deltaText(row, d);
|
|
937
862
|
capsuleTexts.set(row.id, text), capsuleColW = Math.max(capsuleColW, measure(text, capsuleFont).width);
|
|
938
863
|
}
|
|
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 =
|
|
864
|
+
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
865
|
let text = valueTextOf(row);
|
|
941
866
|
return text ? measure(text, valueBaseFont).width : 0;
|
|
942
867
|
}))) : 0, maxLines = Math.max(catMaxLines, ...rows.map((row) => row.label.split(/\s+/).length)), cardBand = (font) => rowLabelBand(
|
|
@@ -947,22 +872,39 @@ function layoutBullet(data, options = {}) {
|
|
|
947
872
|
lineH,
|
|
948
873
|
measure,
|
|
949
874
|
{ 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);
|
|
875
|
+
), 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
876
|
stacked ? (catLines = cardNames.labels, catBandW = cardNames.width, naturalRowH = Math.max(naturalRowH, cardPitch)) : fixedHeight && cardNames && ({ labels: catLines, width: catBandW } = fitted);
|
|
952
877
|
let tallest = (labels) => maxOf(labels.map((label) => label.lines.length));
|
|
953
878
|
if (!regularNames && (catLines.some((label) => label.title !== void 0) || tallest(catLines) > 1 && tallest(catLines) > tallest((stacked ? cardBand : sideNames)({ ...catFont, weight: tickFont.weight }).labels)))
|
|
954
879
|
return layoutBullet(data, { ...options, [REGULAR_NAMES]: !0 });
|
|
880
|
+
nameTrack !== void 0 && (catBandW = nameTrack);
|
|
955
881
|
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) => {
|
|
882
|
+
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) => {
|
|
883
|
+
if (!lineOn("position") || !shown("gap")) return null;
|
|
957
884
|
let raw = deltaVsTarget[row.id], d = raw === void 0 ? void 0 : shownDelta(row, raw);
|
|
958
885
|
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
|
-
|
|
886
|
+
}), 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 = [
|
|
887
|
+
fitHead(overrides?.target?.label ?? targetHead, headerFont, targetBodyW, measure, headEnv),
|
|
888
|
+
fitHead(overrides?.gap?.label ?? chartString(options, "gapColumn", { v1: targetWord(options) }), headerFont, gapBodyW, measure, headEnv)
|
|
889
|
+
], 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;
|
|
890
|
+
for (let id of trackIds2) {
|
|
891
|
+
let authored = overrides?.[id]?.width;
|
|
892
|
+
authored !== void 0 && (widths[id] = authoredTrackWidth(id, authored, naturalW[id], naturalW[id] + Math.max(0, room), planWarnings), room -= widths[id] - naturalW[id]);
|
|
893
|
+
}
|
|
894
|
+
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);
|
|
895
|
+
for (let id of before)
|
|
896
|
+
rights[id] = beforeAt + widths[id], beforeAt += widths[id] + COLUMN_GAP2;
|
|
897
|
+
let afterAt = plot0.x + plot0.w;
|
|
898
|
+
for (let id of [...after].reverse())
|
|
899
|
+
rights[id] = afterAt, afterAt -= widths[id] + COLUMN_GAP2;
|
|
900
|
+
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));
|
|
901
|
+
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
902
|
})() : void 0, colBlockMax = colPlan ? maxOf(rows.map((_, ri) => colPlan.colBlockH(ri))) : 0;
|
|
965
|
-
colPlan &&
|
|
903
|
+
if (colPlan && nameTrack !== void 0 && colPlan.colPlotW < plotKeeps) {
|
|
904
|
+
let less = nameTrack - (plotKeeps - colPlan.colPlotW);
|
|
905
|
+
if (less >= Math.max(24, widestWord(rows, catFont, measure))) return layoutBullet(data, { ...options, [NAME_ROOM]: less });
|
|
906
|
+
}
|
|
907
|
+
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
908
|
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
909
|
if (rowWanted && !rowMode) return layoutBullet(data, { ...options, [ROW_KEY_OFF]: !0 });
|
|
968
910
|
if (rowMode) {
|
|
@@ -975,7 +917,7 @@ function layoutBullet(data, options = {}) {
|
|
|
975
917
|
rowAir = pitch - nameAir - rowBandH - tickAir, targetAir = 0, naturalRowH = pitch;
|
|
976
918
|
}
|
|
977
919
|
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),
|
|
920
|
+
x: stacked ? plot0.x : plot0.x + (cols ? (cp.colLeftW ? cp.colLeftW + CAT_BAND_GAP : 0) + cp.beforeW : catBandW ? catBandW + CAT_BAND_GAP : 0),
|
|
979
921
|
y: plot0.y + inset + topAir + bandPad,
|
|
980
922
|
w: stacked ? plot0.w : cols ? cp.colPlotW : sidePlotW,
|
|
981
923
|
h: Math.min(availH - bandPad, rows.length * naturalRowH)
|
|
@@ -995,7 +937,7 @@ function layoutBullet(data, options = {}) {
|
|
|
995
937
|
paddingInner: gapShare,
|
|
996
938
|
paddingOuter: gapShare / 2
|
|
997
939
|
}), 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 (
|
|
940
|
+
if (pointOn)
|
|
999
941
|
for (let row of rows) {
|
|
1000
942
|
let text = valueTextOf(row);
|
|
1001
943
|
if (!text || row.value === null) continue;
|
|
@@ -1005,7 +947,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1005
947
|
let extents = rows.map((row) => {
|
|
1006
948
|
let rowLo = 0, rowHi = 0;
|
|
1007
949
|
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 &&
|
|
950
|
+
}), 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
951
|
let span = extentHi - extentLo || 1, denom = Math.max(0.3, 1 - fP - (extentLo < 0 ? fN : 0));
|
|
1010
952
|
return [
|
|
1011
953
|
extentLo < 0 ? extentLo - span * fN / denom : 0,
|
|
@@ -1028,7 +970,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1028
970
|
});
|
|
1029
971
|
scaleAt = (ri) => rowScales[ri];
|
|
1030
972
|
}
|
|
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);
|
|
973
|
+
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
974
|
if (actualHead && cp.headsOnKey && cp.legendRight + 2 * COLUMN_GAP2 > valueColRight - actualHead.w)
|
|
1033
975
|
return layoutBullet(data, { ...options, [HEADS_OFF_KEY]: !0 });
|
|
1034
976
|
let uniformZeroX = zeroX.every((value) => value === zeroX[0]);
|
|
@@ -1086,8 +1028,12 @@ function layoutBullet(data, options = {}) {
|
|
|
1086
1028
|
});
|
|
1087
1029
|
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
1030
|
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
|
-
[
|
|
1031
|
+
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");
|
|
1032
|
+
[
|
|
1033
|
+
...actualHead ? [[actualHead, "actual", headAt("actual", actualHead, valueColRight, valueColW), valueColRight]] : [],
|
|
1034
|
+
...cp.hasTarget ? [[cp.colHeads[0], "target", headAt("target", cp.colHeads[0], cp.rights.target, cp.targetColW), cp.rights.target]] : [],
|
|
1035
|
+
...cp.hasGap ? [[cp.colHeads[1], "gap", headAt("gap", cp.colHeads[1], cp.rights.gap, cp.gapColW), cp.rights.gap]] : []
|
|
1036
|
+
].filter(([head]) => head.lines[0]).sort((a, b) => a[3] - b[3]).forEach(([head, key, right], order) => {
|
|
1091
1037
|
let request = headRequest(key, order, head, right, headY, cp.headerH, cp.headsOnKey && !rowMode);
|
|
1092
1038
|
columnFonts.set(request.id, cp.headerFont), columnInks.set(request.id, { token: "inkMuted" }), labelRequests.push(request);
|
|
1093
1039
|
});
|
|
@@ -1173,8 +1119,8 @@ function layoutBullet(data, options = {}) {
|
|
|
1173
1119
|
...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
1120
|
owner,
|
|
1175
1121
|
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 }),
|
|
1122
|
+
...shown("actual") ? { display: { value: rowFmt(row)(row.value) } } : {}
|
|
1123
|
+
}), 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
1124
|
let text = valueTextOf(row);
|
|
1179
1125
|
if (text) {
|
|
1180
1126
|
let tsize = measure(text, valueFont);
|
|
@@ -1205,45 +1151,47 @@ function layoutBullet(data, options = {}) {
|
|
|
1205
1151
|
width: targetStroke,
|
|
1206
1152
|
owner,
|
|
1207
1153
|
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
|
-
|
|
1154
|
+
...shown("target") ? { display: { value: rowFmt(row)(row.target) } } : {}
|
|
1155
|
+
}), 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)) {
|
|
1156
|
+
if (cols) {
|
|
1157
|
+
let text = cp.colTargets[ri], tsize = measure(text, labelFont), id = `target-value:${row.id}`;
|
|
1158
|
+
columnFonts.set(id, labelFont), columnInks.set(id, { token: "ink" }), labelRequests.push({
|
|
1159
|
+
id,
|
|
1160
|
+
kind: "annotation",
|
|
1161
|
+
owner,
|
|
1162
|
+
text,
|
|
1163
|
+
lines: [text],
|
|
1164
|
+
font: labelFont,
|
|
1165
|
+
role: "value",
|
|
1166
|
+
priority: PRIORITY.interior,
|
|
1167
|
+
pad: 0,
|
|
1168
|
+
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 }]
|
|
1169
|
+
});
|
|
1170
|
+
} else if (targetPrints(row)) {
|
|
1171
|
+
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;
|
|
1172
|
+
labelRequests.push({
|
|
1173
|
+
id: `target-value:${row.id}`,
|
|
1174
|
+
kind: "annotation",
|
|
1175
|
+
owner,
|
|
1176
|
+
text,
|
|
1177
|
+
lines: [text],
|
|
1178
|
+
font: targetFont,
|
|
1179
|
+
role: "value",
|
|
1180
|
+
priority: PRIORITY.interior,
|
|
1181
|
+
pad: 0,
|
|
1182
|
+
// An attainment wash fills the whole row pitch: a seat on it is not taken.
|
|
1183
|
+
candidates: stacked ? [seat("cardTarget", plot.x, rowY + bw + 3, 0)] : [
|
|
1184
|
+
seat("aboveTick", tx - tsize.width / 2, above, 0),
|
|
1185
|
+
seat("aboveTickEnd", tx - tsize.width, above, 1),
|
|
1186
|
+
seat("aboveTickStart", tx, above, 1)
|
|
1187
|
+
].filter((candidate) => !washes.some((wash) => rectsOverlap(wash, candidate.rect)))
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1242
1190
|
}
|
|
1243
1191
|
}
|
|
1244
1192
|
let capsuleText = cols ? cp.colGaps[ri] ?? void 0 : capsuleTexts.get(row.id);
|
|
1245
1193
|
if (capsuleText !== void 0 && cols) {
|
|
1246
|
-
let tsize = measure(capsuleText, valueBaseFont), top = rowCenter - cp.colBlockH(ri) / 2,
|
|
1194
|
+
let tsize = measure(capsuleText, valueBaseFont), top = rowCenter - cp.colBlockH(ri) / 2, gapRight = cp.rights.gap, gapAlign = overrides?.gap?.align ?? "right";
|
|
1247
1195
|
columnFonts.set(`delta:${row.id}`, valueBaseFont), labelRequests.push({
|
|
1248
1196
|
id: `delta:${row.id}`,
|
|
1249
1197
|
kind: "annotation",
|
|
@@ -1253,7 +1201,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1253
1201
|
lines: [capsuleText],
|
|
1254
1202
|
font: valueBaseFont,
|
|
1255
1203
|
priority: PRIORITY.extreme,
|
|
1256
|
-
candidates: [{ slot: "gapColumn", rect: { x:
|
|
1204
|
+
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
1205
|
});
|
|
1258
1206
|
let position = cp.colPositions[ri];
|
|
1259
1207
|
if (position) {
|
|
@@ -1268,7 +1216,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1268
1216
|
font: cp.noteFont,
|
|
1269
1217
|
priority: PRIORITY.interior,
|
|
1270
1218
|
pad: 0,
|
|
1271
|
-
candidates: [{ slot: "gapColumn", rect: { x:
|
|
1219
|
+
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
1220
|
});
|
|
1273
1221
|
}
|
|
1274
1222
|
}
|
|
@@ -1330,7 +1278,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1330
1278
|
{
|
|
1331
1279
|
slot: "left",
|
|
1332
1280
|
rect: {
|
|
1333
|
-
x: stacked ? plot.x : rowLabelX(plot0.x, cols ? cp.colLeftW : catBandW, cl.w, options.rowLabels?.align ?? "left"),
|
|
1281
|
+
x: stacked ? plot.x : rowLabelX(plot0.x, cols ? cp.colLeftW : catBandW, cl.w, overrides?.label?.align ?? options.rowLabels?.align ?? "left"),
|
|
1334
1282
|
y: stacked ? cardTop : cols ? rowCenter - cp.colBlockH(ri) / 2 : rowCenter - cl.h / 2,
|
|
1335
1283
|
w: cl.w,
|
|
1336
1284
|
h: cl.h
|
|
@@ -1352,12 +1300,18 @@ function layoutBullet(data, options = {}) {
|
|
|
1352
1300
|
font: cp.noteFont,
|
|
1353
1301
|
priority: PRIORITY.interior,
|
|
1354
1302
|
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 }]
|
|
1303
|
+
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
1304
|
});
|
|
1357
1305
|
}
|
|
1358
1306
|
}
|
|
1359
1307
|
marks.rows.push({ id: row.id, bandNodeIds, barNodeId, targetNodeId, rect: rowRect });
|
|
1360
1308
|
});
|
|
1309
|
+
let hasValues = labelOn2("point") && rows.some((row) => valueTextOf(row) !== null), hasTargets = labelOn2("annotation") && rows.some((row) => row.target !== null);
|
|
1310
|
+
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" }));
|
|
1311
|
+
let trackIds = cols ? [...cp.hasTarget ? ["target"] : [], ...cp.hasGap ? ["gap"] : []] : [], valueTrack = !compact && !stacked && valueColW > 0 ? ["actual"] : [];
|
|
1312
|
+
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." });
|
|
1313
|
+
for (let kind of ["position", "direction"])
|
|
1314
|
+
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
1315
|
let solveCtx = labelCtx(theme, size, options, {
|
|
1362
1316
|
measure,
|
|
1363
1317
|
plot,
|
|
@@ -1451,8 +1405,8 @@ function layoutBullet(data, options = {}) {
|
|
|
1451
1405
|
);
|
|
1452
1406
|
asColumnHeads(labelNodes), pushAll(nodes, labelNodes);
|
|
1453
1407
|
let a11yRows = rows.map((row) => {
|
|
1454
|
-
let f = rowFmt(row), v = row.value !== null ? f(row.value) : "
|
|
1455
|
-
return `${row.label}
|
|
1408
|
+
let f = rowFmt(row), v = shown("actual") ? row.value !== null ? ` ${f(row.value)}` : ` ${chartString(options, "notApplicable")}` : "", 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])])})` : "") : "";
|
|
1409
|
+
return `${row.label}${v}${t}`;
|
|
1456
1410
|
}).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
1411
|
return {
|
|
1458
1412
|
type: "bullet",
|
|
@@ -1471,7 +1425,7 @@ function layoutBullet(data, options = {}) {
|
|
|
1471
1425
|
// The type floor moved to 320 for the percent-of-target rows (core.ts); these layouts keep 480.
|
|
1472
1426
|
// The columns give way below their fit, so the side-by-side rows set the floor.
|
|
1473
1427
|
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 =
|
|
1428
|
+
let text = pointOn ? valueTextOf(row) : void 0;
|
|
1475
1429
|
return text ? measure(text, valueFont).width + 2 * LABEL_GAP : 0;
|
|
1476
1430
|
}))))
|
|
1477
1431
|
}),
|
|
@@ -1508,6 +1462,9 @@ function layoutBullet(data, options = {}) {
|
|
|
1508
1462
|
}
|
|
1509
1463
|
};
|
|
1510
1464
|
}
|
|
1465
|
+
function widestWord(rows, font, measure) {
|
|
1466
|
+
return maxOf(rows.flatMap((row) => row.label.split(/\s+/).map((word) => measure(word, font).width)));
|
|
1467
|
+
}
|
|
1511
1468
|
function layoutBulletOnTargetScale(data, options, ctx) {
|
|
1512
1469
|
let { rows, theme, size, measure, occupied, warnings, rowFmt } = ctx;
|
|
1513
1470
|
rows.some((row) => row.bands.length > 0) && warnings.push({
|
|
@@ -1531,10 +1488,10 @@ function layoutBulletOnTargetScale(data, options, ctx) {
|
|
|
1531
1488
|
let base = rowFmt(row)(row.value);
|
|
1532
1489
|
return typeof row.meta?.label == "string" ? row.meta.label.replace(/\$\{value\}/g, base) : base;
|
|
1533
1490
|
}, targetParts = (row) => [
|
|
1534
|
-
row.target === null ?
|
|
1535
|
-
...row.direction === "lowerIsBetter" ? [chartString(options, "lowerBetterHint")] : []
|
|
1491
|
+
row.target === null ? chartString(options, "noTarget", { v1: targetWord(options) }) : `${targetWord(options)} ${rowFmt(row)(row.target)}`,
|
|
1492
|
+
...row.direction === "lowerIsBetter" && !(typeof options.labels == "object" && options.labels.direction === !1) && options.strings?.lowerBetter !== "" ? [chartString(options, "lowerBetterHint")] : []
|
|
1536
1493
|
];
|
|
1537
|
-
return layoutTargetScale({
|
|
1494
|
+
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
1495
|
rows,
|
|
1539
1496
|
options,
|
|
1540
1497
|
theme,
|
|
@@ -1569,7 +1526,7 @@ var bulletCore = {
|
|
|
1569
1526
|
summary: "Bullet-graph KPI rows \u2014 qualitative bands, dark measure bar, target tick, delta vs target",
|
|
1570
1527
|
layout: layoutBullet,
|
|
1571
1528
|
defaults: {},
|
|
1572
|
-
annotationKinds: ["callout", "note", "delta", "abs", "diff", "cagr", "valueLine", "band"]
|
|
1529
|
+
annotationKinds: ["callout", "note", "delta", "abs", "diff", "cagr", "valueLine", "band", "text", "line", "arrow", "box"]
|
|
1573
1530
|
};
|
|
1574
1531
|
|
|
1575
1532
|
export {
|