boardplot 0.0.0-stage → 0.52.5
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 +18 -0
- package/LICENSE +201 -0
- package/NOTICE.md +180 -0
- package/README.md +208 -2
- package/THIRD_PARTY_NOTICES.md +1110 -0
- package/dist/DiagnosticDetails-UNYNYCAH.js +69 -0
- package/dist/ReaderBox-VUNSFKZY.js +137 -0
- package/dist/annotateEngine-H7OW4H3W.js +30 -0
- package/dist/build-identity.json +6 -0
- package/dist/chunk-24WB3HMB.js +621 -0
- package/dist/chunk-263SZKIL.js +8 -0
- package/dist/chunk-27QQEWNV.js +18 -0
- package/dist/chunk-2AKWCMS4.js +24 -0
- package/dist/chunk-2DHJJ2EN.js +24 -0
- package/dist/chunk-2EQE4E3I.js +22 -0
- package/dist/chunk-2GELJH37.js +88 -0
- package/dist/chunk-2JAWQ7VV.js +3874 -0
- package/dist/chunk-2LMCD3ZR.js +6 -0
- package/dist/chunk-2MTWKMEG.js +841 -0
- package/dist/chunk-2SGIHKKU.js +33 -0
- package/dist/chunk-2UVTHU7A.js +1146 -0
- package/dist/chunk-33CBPK5Q.js +2800 -0
- package/dist/chunk-33PLBIMA.js +176 -0
- package/dist/chunk-35DZP2R2.js +22 -0
- package/dist/chunk-3D3D3D23.js +25 -0
- package/dist/chunk-3EZRM4YM.js +92 -0
- package/dist/chunk-3GZECHOK.js +802 -0
- package/dist/chunk-3HHNQPAH.js +68 -0
- package/dist/chunk-3I6RANBJ.js +1058 -0
- package/dist/chunk-3SIRPKMP.js +12 -0
- package/dist/chunk-3W23F7EY.js +185 -0
- package/dist/chunk-3XQ635KD.js +24 -0
- package/dist/chunk-3ZCKEANJ.js +24 -0
- package/dist/chunk-4DNOEV3Q.js +25857 -0
- package/dist/chunk-4GB7TBY7.js +373 -0
- package/dist/chunk-4SM2ONUC.js +18 -0
- package/dist/chunk-5C7TWNYZ.js +79 -0
- package/dist/chunk-5DJXJXDE.js +58 -0
- package/dist/chunk-5ENRZX6I.js +687 -0
- package/dist/chunk-5KWXRYAT.js +294 -0
- package/dist/chunk-5T5YW52S.js +47 -0
- package/dist/chunk-627P6T25.js +936 -0
- package/dist/chunk-62FR4FYJ.js +23 -0
- package/dist/chunk-6JUJ2DU3.js +67 -0
- package/dist/chunk-6KWIQ5KF.js +18 -0
- package/dist/chunk-6UBEGKIQ.js +25 -0
- package/dist/chunk-6XE3GVGU.js +116 -0
- package/dist/chunk-76ANFJOI.js +227 -0
- package/dist/chunk-7IFLQMJL.js +160 -0
- package/dist/chunk-7JVAQX6C.js +28 -0
- package/dist/chunk-7QDAHY5M.js +63 -0
- package/dist/chunk-7VXZDB45.js +149 -0
- package/dist/chunk-7X65ZQN4.js +38 -0
- package/dist/chunk-A2FHZH7E.js +1410 -0
- package/dist/chunk-A372DLQX.js +54 -0
- package/dist/chunk-A3ULWR5N.js +76 -0
- package/dist/chunk-A4QZXLXF.js +7 -0
- package/dist/chunk-A5JWFZVU.js +1467 -0
- package/dist/chunk-A5LZUYK4.js +59 -0
- package/dist/chunk-A6XCAQ52.js +89 -0
- package/dist/chunk-A7A4PDG5.js +24 -0
- package/dist/chunk-A7IEVBYI.js +35 -0
- package/dist/chunk-ACXX2JNL.js +6 -0
- package/dist/chunk-AFK47A6O.js +25 -0
- package/dist/chunk-ALKTNXMR.js +3650 -0
- package/dist/chunk-AOQ6VF5H.js +6 -0
- package/dist/chunk-ASAON7G4.js +648 -0
- package/dist/chunk-ATTE3FYC.js +24 -0
- package/dist/chunk-AZOUSKZD.js +728 -0
- package/dist/chunk-B2EBEXIS.js +113 -0
- package/dist/chunk-B67K5X4M.js +58 -0
- package/dist/chunk-BBL3R5YZ.js +186 -0
- package/dist/chunk-BIDIGDGH.js +6 -0
- package/dist/chunk-BKYMLFUG.js +69 -0
- package/dist/chunk-BLFWUMTD.js +12 -0
- package/dist/chunk-BM6SFFWF.js +6 -0
- package/dist/chunk-BUPLB3EX.js +129 -0
- package/dist/chunk-BVWU6GOB.js +47 -0
- package/dist/chunk-BW5VLBSZ.js +15 -0
- package/dist/chunk-C64FBRJO.js +290 -0
- package/dist/chunk-CAE2HK2G.js +295 -0
- package/dist/chunk-CCQNL33L.js +446 -0
- package/dist/chunk-CDZHNLO6.js +42 -0
- package/dist/chunk-COKHNEJP.js +24 -0
- package/dist/chunk-COYPDRJK.js +21 -0
- package/dist/chunk-CRZKGHZ6.js +1810 -0
- package/dist/chunk-CS4DHFNG.js +128 -0
- package/dist/chunk-CYDZP5W6.js +1589 -0
- package/dist/chunk-D4BIV6WG.js +1072 -0
- package/dist/chunk-D4SOADBD.js +19 -0
- package/dist/chunk-DCCJRLAJ.js +422 -0
- package/dist/chunk-DFKTS6XJ.js +75 -0
- package/dist/chunk-DGDOGOTQ.js +25 -0
- package/dist/chunk-DLC23CKC.js +53 -0
- package/dist/chunk-DRTA6JG5.js +160 -0
- package/dist/chunk-DVKBU23L.js +97 -0
- package/dist/chunk-E2HEVF23.js +692 -0
- package/dist/chunk-EC2NAYPQ.js +24 -0
- package/dist/chunk-EKQK5D6G.js +14 -0
- package/dist/chunk-EKQMYG2B.js +2353 -0
- package/dist/chunk-ELYU6TRQ.js +98 -0
- package/dist/chunk-EQT3EPTB.js +203 -0
- package/dist/chunk-ERAIVAK5.js +1359 -0
- package/dist/chunk-ETHWK2RZ.js +16 -0
- package/dist/chunk-EWVKBRLV.js +72 -0
- package/dist/chunk-F77BNDAT.js +43 -0
- package/dist/chunk-FGAGGPFF.js +566 -0
- package/dist/chunk-FIANWJXX.js +19 -0
- package/dist/chunk-FIWNDOMO.js +6 -0
- package/dist/chunk-FOKEGVPB.js +24 -0
- package/dist/chunk-FT3F72C3.js +30 -0
- package/dist/chunk-FT47HQ5U.js +47 -0
- package/dist/chunk-GDOW2KNP.js +19 -0
- package/dist/chunk-GDQ3NGDZ.js +17 -0
- package/dist/chunk-GH3ZMBFX.js +563 -0
- package/dist/chunk-GQPESFAF.js +3378 -0
- package/dist/chunk-GQS46LC3.js +50 -0
- package/dist/chunk-GULJ6KVT.js +587 -0
- package/dist/chunk-GWQIXU37.js +2774 -0
- package/dist/chunk-GZ2VNM4L.js +24 -0
- package/dist/chunk-GZ4RHGIW.js +836 -0
- package/dist/chunk-H4H4O62O.js +46 -0
- package/dist/chunk-H57TJD3B.js +72 -0
- package/dist/chunk-H7UZZ7KP.js +24 -0
- package/dist/chunk-HAAUJDGB.js +83 -0
- package/dist/chunk-HFG76JTS.js +296 -0
- package/dist/chunk-HJXXFPOL.js +211 -0
- package/dist/chunk-HTYFQHRC.js +24 -0
- package/dist/chunk-HUF6TQ2J.js +24 -0
- package/dist/chunk-HUFCSX2Y.js +89 -0
- package/dist/chunk-HX3MQ3H4.js +26 -0
- package/dist/chunk-HZQEQ34U.js +296 -0
- package/dist/chunk-I322G5UG.js +888 -0
- package/dist/chunk-IDDA5INB.js +60 -0
- package/dist/chunk-IDTLHPTK.js +60 -0
- package/dist/chunk-II7652VA.js +2918 -0
- package/dist/chunk-IN4QT33I.js +38 -0
- package/dist/chunk-IV2UXZXX.js +16 -0
- package/dist/chunk-IXSZ7OKR.js +133 -0
- package/dist/chunk-IYEFEBRN.js +41 -0
- package/dist/chunk-IZ35GMGB.js +2543 -0
- package/dist/chunk-IZCOG3FS.js +28 -0
- package/dist/chunk-JA755JHN.js +379 -0
- package/dist/chunk-JETXFF3M.js +33 -0
- package/dist/chunk-JFBEAUJ6.js +24 -0
- package/dist/chunk-JFG4DHKQ.js +48 -0
- package/dist/chunk-JL5BRMDT.js +179 -0
- package/dist/chunk-JLCAWQ3H.js +195 -0
- package/dist/chunk-JLZM7XMZ.js +525 -0
- package/dist/chunk-JMH5MD5A.js +19 -0
- package/dist/chunk-JRPI64AQ.js +3066 -0
- package/dist/chunk-JSX3C6LL.js +344 -0
- package/dist/chunk-JY4R3GML.js +83 -0
- package/dist/chunk-JYBT2JNY.js +61 -0
- package/dist/chunk-K2HNV4LE.js +2008 -0
- package/dist/chunk-KAXJFL7N.js +43 -0
- package/dist/chunk-KDMKHR5A.js +32 -0
- package/dist/chunk-KFFNCDX6.js +19 -0
- package/dist/chunk-KKWZWP67.js +24 -0
- package/dist/chunk-KOJ5QETJ.js +8 -0
- package/dist/chunk-KPMGGE4W.js +51 -0
- package/dist/chunk-KS7DXCXH.js +27 -0
- package/dist/chunk-KSYVTEKR.js +24 -0
- package/dist/chunk-KU4YS6HN.js +61 -0
- package/dist/chunk-KYELSLDJ.js +40 -0
- package/dist/chunk-LC3PSQJJ.js +383 -0
- package/dist/chunk-LC6DYCTG.js +85 -0
- package/dist/chunk-LNKY5Z2X.js +23 -0
- package/dist/chunk-LO2DANS6.js +302 -0
- package/dist/chunk-M4SPKUZE.js +7 -0
- package/dist/chunk-M4YLED7M.js +17 -0
- package/dist/chunk-M6KTNAND.js +746 -0
- package/dist/chunk-MCOIEWW6.js +54 -0
- package/dist/chunk-MDYLOIS2.js +48 -0
- package/dist/chunk-MEISCROL.js +24 -0
- package/dist/chunk-MFLH5ZDQ.js +69 -0
- package/dist/chunk-MIXKQJ64.js +935 -0
- package/dist/chunk-MJMJEURO.js +359 -0
- package/dist/chunk-MNJ2DHU6.js +526 -0
- package/dist/chunk-NEVSQGOI.js +63 -0
- package/dist/chunk-NG5IGZXC.js +1179 -0
- package/dist/chunk-NLOMCLKI.js +3303 -0
- package/dist/chunk-NMCOUVN5.js +24 -0
- package/dist/chunk-NT3HAZYT.js +51 -0
- package/dist/chunk-NXNQQ3DS.js +382 -0
- package/dist/chunk-NYEY6W5R.js +569 -0
- package/dist/chunk-OAPCJO6W.js +23 -0
- package/dist/chunk-OH7FA4TF.js +251 -0
- package/dist/chunk-OLNORNCT.js +331 -0
- package/dist/chunk-OQEBOVUO.js +30 -0
- package/dist/chunk-ORUJI3VB.js +83 -0
- package/dist/chunk-PEN2DK7T.js +49 -0
- package/dist/chunk-PGIQMQRU.js +1650 -0
- package/dist/chunk-PTVOXB5T.js +39 -0
- package/dist/chunk-PUVGWJQ5.js +24 -0
- package/dist/chunk-PWROWDZS.js +137 -0
- package/dist/chunk-Q6XJOJTY.js +29 -0
- package/dist/chunk-QBR6IKIX.js +50 -0
- package/dist/chunk-QETGGFH2.js +30 -0
- package/dist/chunk-QG6MOQLI.js +2934 -0
- package/dist/chunk-QGCEHR6S.js +13 -0
- package/dist/chunk-QHFQHQDC.js +43 -0
- package/dist/chunk-QHRE2M6V.js +26 -0
- package/dist/chunk-QKL7IY42.js +38 -0
- package/dist/chunk-QN6JHMGU.js +44 -0
- package/dist/chunk-QNHZXFRA.js +347 -0
- package/dist/chunk-QPWRHDLZ.js +17 -0
- package/dist/chunk-QVABTUDS.js +80 -0
- package/dist/chunk-QXILAMAU.js +28 -0
- package/dist/chunk-QZAT46PP.js +95 -0
- package/dist/chunk-R3WI7ZLE.js +545 -0
- package/dist/chunk-R5SWC3EW.js +30 -0
- package/dist/chunk-RJQ5YS3Q.js +40 -0
- package/dist/chunk-RNOD2UWF.js +613 -0
- package/dist/chunk-RNXITK5M.js +24 -0
- package/dist/chunk-ROXO4R3J.js +16 -0
- package/dist/chunk-RQ5DNYLG.js +10 -0
- package/dist/chunk-RSWVH7DB.js +24 -0
- package/dist/chunk-RTJXOIIQ.js +12 -0
- package/dist/chunk-RZNYW7UP.js +133 -0
- package/dist/chunk-S4F27M7N.js +37 -0
- package/dist/chunk-S4ONWRJE.js +28 -0
- package/dist/chunk-S53OGZL6.js +168 -0
- package/dist/chunk-S5ADHIZK.js +2508 -0
- package/dist/chunk-S62M63LU.js +19 -0
- package/dist/chunk-S7VDRUED.js +62 -0
- package/dist/chunk-SGD3ZHID.js +250 -0
- package/dist/chunk-SGSPYHFE.js +40 -0
- package/dist/chunk-SLTMRTXV.js +597 -0
- package/dist/chunk-SXGTRZFN.js +26 -0
- package/dist/chunk-SZPTTNW7.js +16 -0
- package/dist/chunk-T3IGJARD.js +22 -0
- package/dist/chunk-TA3TFKYZ.js +86 -0
- package/dist/chunk-TNEHPP3H.js +18 -0
- package/dist/chunk-TPYV2FTV.js +25 -0
- package/dist/chunk-TPZB2YWR.js +25 -0
- package/dist/chunk-TSR5YDPS.js +1266 -0
- package/dist/chunk-TTR7EWNH.js +170 -0
- package/dist/chunk-TVHLKVUO.js +24 -0
- package/dist/chunk-TXINIAFL.js +198 -0
- package/dist/chunk-TXZBBZOG.js +58 -0
- package/dist/chunk-UEU46Q3D.js +300 -0
- package/dist/chunk-UMDEWWXT.js +33 -0
- package/dist/chunk-UQSVWO7Z.js +334 -0
- package/dist/chunk-UZF3G2FN.js +942 -0
- package/dist/chunk-V422EKLW.js +24 -0
- package/dist/chunk-V4DYVLOO.js +433 -0
- package/dist/chunk-V4VC25UL.js +128 -0
- package/dist/chunk-V667FCIJ.js +12 -0
- package/dist/chunk-VABRPZVC.js +43 -0
- package/dist/chunk-VB2MJLET.js +19 -0
- package/dist/chunk-VDAKTZQP.js +18 -0
- package/dist/chunk-VDAZPGR2.js +79 -0
- package/dist/chunk-VXZFQKBJ.js +21 -0
- package/dist/chunk-VYMGZ27S.js +133 -0
- package/dist/chunk-W2RGSGRR.js +131 -0
- package/dist/chunk-W7UZXD5D.js +1109 -0
- package/dist/chunk-WDUNR2VI.js +2718 -0
- package/dist/chunk-WHSTEAVP.js +229 -0
- package/dist/chunk-WJMUMN3I.js +127 -0
- package/dist/chunk-WLZ54FWG.js +120 -0
- package/dist/chunk-WMJPFLF3.js +2980 -0
- package/dist/chunk-WRHFBCVY.js +24 -0
- package/dist/chunk-WVSNSWBJ.js +47 -0
- package/dist/chunk-WYJEOMNY.js +31 -0
- package/dist/chunk-WYJMV62X.js +24 -0
- package/dist/chunk-WZGJSQKN.js +29 -0
- package/dist/chunk-WZL4EEBS.js +11 -0
- package/dist/chunk-X7TXGKRX.js +272 -0
- package/dist/chunk-XB4KZ6WO.js +81 -0
- package/dist/chunk-XDLQRSSH.js +266 -0
- package/dist/chunk-XDS4UZGR.js +113 -0
- package/dist/chunk-XEGRWWNO.js +30 -0
- package/dist/chunk-XO5ONLVM.js +420 -0
- package/dist/chunk-XPWRD424.js +24 -0
- package/dist/chunk-XTNV2YMB.js +50 -0
- package/dist/chunk-XW5J5JAX.js +42 -0
- package/dist/chunk-XY5O74BH.js +33 -0
- package/dist/chunk-XYONCO5Q.js +984 -0
- package/dist/chunk-Y4PXIJMD.js +829 -0
- package/dist/chunk-YAYRRKC7.js +24 -0
- package/dist/chunk-YEDYBMCW.js +210 -0
- package/dist/chunk-YFG4E3N2.js +1161 -0
- package/dist/chunk-YHTO46W2.js +2670 -0
- package/dist/chunk-YI2ZVTCB.js +38 -0
- package/dist/chunk-YKO3VCTF.js +24 -0
- package/dist/chunk-YP3I6W7T.js +24 -0
- package/dist/chunk-YQ2B3YVF.js +687 -0
- package/dist/chunk-YS6KMYM4.js +91 -0
- package/dist/chunk-YTSSXSZR.js +197 -0
- package/dist/chunk-Z256ACGC.js +27 -0
- package/dist/chunk-Z2MGTKDR.js +20 -0
- package/dist/chunk-Z5VSLLNY.js +23 -0
- package/dist/chunk-Z7X3RGGA.js +22 -0
- package/dist/chunk-ZF43WRG3.js +29 -0
- package/dist/chunk-ZJKOLOVF.js +1754 -0
- package/dist/chunk-ZQ4VFQID.js +76 -0
- package/dist/chunk-ZSLGN6CO.js +89 -0
- package/dist/chunk-ZVTFZF4V.js +542 -0
- package/dist/cli/index.js +9 -0
- package/dist/core-5Z6UW5DS.js +31 -0
- package/dist/core-6ANZ2OWO.js +40 -0
- package/dist/core-6LLJNZ4O.js +37 -0
- package/dist/core-CPN2HF75.js +33 -0
- package/dist/core-CS7AKNME.js +37 -0
- package/dist/core-DBRILYNB.js +38 -0
- package/dist/core-DU77ZYPR.js +34 -0
- package/dist/core-E6YD7VU4.js +32 -0
- package/dist/core-EE55P6XK.js +56 -0
- package/dist/core-FFLPH5XK.js +41 -0
- package/dist/core-IV26EL5C.js +32 -0
- package/dist/core-IZVZ2B7Y.js +34 -0
- package/dist/core-JQV7STNF.js +34 -0
- package/dist/core-KBH3EJZV.js +32 -0
- package/dist/core-KFBW5PRT.js +36 -0
- package/dist/core-KWGXHBJE.js +37 -0
- package/dist/core-MZMR2DF4.js +32 -0
- package/dist/core-OK2ZY5OJ.js +29 -0
- package/dist/core-OV5MPTZP.js +43 -0
- package/dist/core-OW5V74Q4.js +40 -0
- package/dist/core-PL64QPOH.js +57 -0
- package/dist/core-PVINU5JJ.js +33 -0
- package/dist/core-QUYSNTC7.js +34 -0
- package/dist/core-RE3L6YCM.js +29 -0
- package/dist/core-RUA3EWW3.js +39 -0
- package/dist/core-RY6IFRKM.js +35 -0
- package/dist/core-SCWEVNUY.js +34 -0
- package/dist/core-SE67HHFG.js +55 -0
- package/dist/core-T5Q4DSH2.js +32 -0
- package/dist/core-TJX3I7KH.js +37 -0
- package/dist/core-ULUA5ZB2.js +55 -0
- package/dist/core-WLVU2HWX.js +46 -0
- package/dist/core-WQPHNVNY.js +51 -0
- package/dist/core-XXIOJY2X.js +52 -0
- package/dist/core-ZH7XTJTD.js +39 -0
- package/dist/core-ZHE7N4NS.js +50 -0
- package/dist/core-ZJYLJWZQ.js +38 -0
- package/dist/dataTable-IL7HVDHL.js +58 -0
- package/dist/engine-MYLZI5VH.js +961 -0
- package/dist/fixtures.d.ts +1 -0
- package/dist/fixtures.js +40 -0
- package/dist/fontTables-ZYBUCJ5N.js +18 -0
- package/dist/fonts.d.ts +1 -0
- package/dist/fonts.js +19 -0
- package/dist/geo/dach.d.ts +1 -0
- package/dist/geo/dach.js +14 -0
- package/dist/geo/de-states.d.ts +1 -0
- package/dist/geo/de-states.js +14 -0
- package/dist/geo/eu27.d.ts +1 -0
- package/dist/geo/eu27.js +14 -0
- package/dist/geo/europe.d.ts +1 -0
- package/dist/geo/europe.js +14 -0
- package/dist/geo/index.d.ts +1 -0
- package/dist/geo/index.js +41 -0
- package/dist/geo/us-states.d.ts +1 -0
- package/dist/geo/us-states.js +14 -0
- package/dist/geo/world.d.ts +1 -0
- package/dist/geo/world.js +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +363 -0
- package/dist/main-ISJ53IS5.js +568 -0
- package/dist/mcp/server.js +1023 -0
- package/dist/module-SVEW5ZUE.js +137233 -0
- package/dist/react/bar.d.ts +1 -0
- package/dist/react/bar.js +80 -0
- package/dist/react/bartable.d.ts +1 -0
- package/dist/react/bartable.js +70 -0
- package/dist/react/box.d.ts +1 -0
- package/dist/react/box.js +64 -0
- package/dist/react/bullet.d.ts +1 -0
- package/dist/react/bullet.js +71 -0
- package/dist/react/butterfly.d.ts +1 -0
- package/dist/react/butterfly.js +65 -0
- package/dist/react/choropleth.d.ts +1 -0
- package/dist/react/choropleth.js +67 -0
- package/dist/react/cohort.d.ts +1 -0
- package/dist/react/cohort.js +69 -0
- package/dist/react/column.d.ts +1 -0
- package/dist/react/column.js +85 -0
- package/dist/react/combo.d.ts +1 -0
- package/dist/react/combo.js +85 -0
- package/dist/react/creative.d.ts +1 -0
- package/dist/react/creative.js +61 -0
- package/dist/react/diagram.d.ts +1 -0
- package/dist/react/diagram.js +60 -0
- package/dist/react/dimswitch.d.ts +1 -0
- package/dist/react/dimswitch.js +71 -0
- package/dist/react/dot.d.ts +1 -0
- package/dist/react/dot.js +69 -0
- package/dist/react/export.d.ts +1 -0
- package/dist/react/export.js +657 -0
- package/dist/react/funnel.d.ts +1 -0
- package/dist/react/funnel.js +62 -0
- package/dist/react/gantt.d.ts +1 -0
- package/dist/react/gantt.js +62 -0
- package/dist/react/grid.d.ts +1 -0
- package/dist/react/grid.js +66 -0
- package/dist/react/heatmap.d.ts +1 -0
- package/dist/react/heatmap.js +67 -0
- package/dist/react/histogram.d.ts +1 -0
- package/dist/react/histogram.js +85 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +503 -0
- package/dist/react/kpi.d.ts +1 -0
- package/dist/react/kpi.js +67 -0
- package/dist/react/likert.d.ts +1 -0
- package/dist/react/likert.js +82 -0
- package/dist/react/line.d.ts +1 -0
- package/dist/react/line.js +80 -0
- package/dist/react/mekko.d.ts +1 -0
- package/dist/react/mekko.js +70 -0
- package/dist/react/pareto.d.ts +1 -0
- package/dist/react/pareto.js +89 -0
- package/dist/react/pie.d.ts +1 -0
- package/dist/react/pie.js +63 -0
- package/dist/react/prepare.d.ts +1 -0
- package/dist/react/prepare.js +277 -0
- package/dist/react/pvm.d.ts +1 -0
- package/dist/react/pvm.js +67 -0
- package/dist/react/pyramid.d.ts +1 -0
- package/dist/react/pyramid.js +66 -0
- package/dist/react/sankey.d.ts +1 -0
- package/dist/react/sankey.js +59 -0
- package/dist/react/scatter.d.ts +1 -0
- package/dist/react/scatter.js +62 -0
- package/dist/react/slope.d.ts +1 -0
- package/dist/react/slope.js +63 -0
- package/dist/react/sparkline.d.ts +1 -0
- package/dist/react/sparkline.js +59 -0
- package/dist/react/spec.d.ts +1 -0
- package/dist/react/spec.js +370 -0
- package/dist/react/status.d.ts +1 -0
- package/dist/react/status.js +64 -0
- package/dist/react/story.d.ts +1 -0
- package/dist/react/story.js +140 -0
- package/dist/react/table.d.ts +1 -0
- package/dist/react/table.js +68 -0
- package/dist/react/theme.d.ts +1 -0
- package/dist/react/theme.js +53 -0
- package/dist/react/tilemap.d.ts +1 -0
- package/dist/react/tilemap.js +66 -0
- package/dist/react/treemap.d.ts +1 -0
- package/dist/react/treemap.js +61 -0
- package/dist/react/variance.d.ts +1 -0
- package/dist/react/variance.js +64 -0
- package/dist/react/waffle.d.ts +1 -0
- package/dist/react/waffle.js +62 -0
- package/dist/react/waterfall.d.ts +1 -0
- package/dist/react/waterfall.js +67 -0
- package/dist/resvg-ZOVDIZTV.js +23 -0
- package/dist/rows.d.ts +1 -0
- package/dist/rows.js +23 -0
- package/dist/rowsModule-3Y4I3M3E.js +27 -0
- package/dist/schema-2BMZOHXI.js +22 -0
- package/dist/schema-2GUBWOBC.js +26 -0
- package/dist/schema-34ZELWRQ.js +25 -0
- package/dist/schema-3BHL2B76.js +22 -0
- package/dist/schema-4735XAZX.js +29 -0
- package/dist/schema-5YTNQ6JY.js +22 -0
- package/dist/schema-7J3NAIN2.js +27 -0
- package/dist/schema-AOJJ7JZB.js +22 -0
- package/dist/schema-CVMV4LRA.js +22 -0
- package/dist/schema-D3RCMN3T.js +22 -0
- package/dist/schema-E2ISJ65D.js +23 -0
- package/dist/schema-E6YOSOWB.js +28 -0
- package/dist/schema-EQQB43AY.js +22 -0
- package/dist/schema-EVLLL5UF.js +22 -0
- package/dist/schema-EYQ5IBLF.js +23 -0
- package/dist/schema-EYZVD73N.js +22 -0
- package/dist/schema-G4KFMQBL.js +22 -0
- package/dist/schema-GH7IKSOU.js +23 -0
- package/dist/schema-IF5N3J56.js +42 -0
- package/dist/schema-IG7JIR4H.js +23 -0
- package/dist/schema-JJYJOQTT.js +23 -0
- package/dist/schema-KFC4WYH4.js +32 -0
- package/dist/schema-L7263JMT.js +25 -0
- package/dist/schema-MEAFRXVH.js +53 -0
- package/dist/schema-P63S63GE.js +23 -0
- package/dist/schema-P7LJFJAJ.js +22 -0
- package/dist/schema-PA2MXYY4.js +23 -0
- package/dist/schema-PDZ6256H.js +23 -0
- package/dist/schema-PNC3Z7AH.js +25 -0
- package/dist/schema-QEVSIMGO.js +22 -0
- package/dist/schema-QJJPRRE7.js +22 -0
- package/dist/schema-S3EQKVOT.js +23 -0
- package/dist/schema-STGL44TL.js +22 -0
- package/dist/schema-T4NE2EAO.js +22 -0
- package/dist/schema-TQYTESG3.js +22 -0
- package/dist/schema-W376PAJG.js +22 -0
- package/dist/schema-XYYDUUHS.js +26 -0
- package/dist/specValidation-NVBIZMEE.js +48 -0
- package/dist/theme.d.ts +1 -0
- package/dist/theme.js +24 -0
- package/dist/themeShapeRules-5C2463YH.js +11 -0
- package/dist/types/core/a11y/accessibility.d.ts +43 -0
- package/dist/types/core/a11y/recordsShared.d.ts +44 -0
- package/dist/types/core/a11y/structuralRecords.d.ts +6 -0
- package/dist/types/core/a11y/types.d.ts +116 -0
- package/dist/types/core/annotate.d.ts +300 -0
- package/dist/types/core/annotateArms.d.ts +37 -0
- package/dist/types/core/annotateFields.d.ts +30 -0
- package/dist/types/core/annotateGapBracket.d.ts +66 -0
- package/dist/types/core/annotateLinks.d.ts +47 -0
- package/dist/types/core/annotateTargets.d.ts +90 -0
- package/dist/types/core/axis.d.ts +179 -0
- package/dist/types/core/bandSelect.d.ts +10 -0
- package/dist/types/core/bands.d.ts +14 -0
- package/dist/types/core/calendarLabels.d.ts +101 -0
- package/dist/types/core/charts/band/stacks.d.ts +155 -0
- package/dist/types/core/charts/bar/fixtures.d.ts +9 -0
- package/dist/types/core/charts/bar/layout.d.ts +95 -0
- package/dist/types/core/charts/bartable/fixtures.d.ts +4 -0
- package/dist/types/core/charts/bartable/types.d.ts +192 -0
- package/dist/types/core/charts/box/fixtures.d.ts +12 -0
- package/dist/types/core/charts/box/types.d.ts +110 -0
- package/dist/types/core/charts/bullet/fixtures.d.ts +11 -0
- package/dist/types/core/charts/butterfly/fixtures.d.ts +9 -0
- package/dist/types/core/charts/choropleth/fixtures.d.ts +3 -0
- package/dist/types/core/charts/choropleth/overlayTypes.d.ts +68 -0
- package/dist/types/core/charts/choropleth/types.d.ts +117 -0
- package/dist/types/core/charts/cohort/fixtures.d.ts +12 -0
- package/dist/types/core/charts/cohort/types.d.ts +165 -0
- package/dist/types/core/charts/column/anomaly.d.ts +204 -0
- package/dist/types/core/charts/column/fixtures.d.ts +12 -0
- package/dist/types/core/charts/column/layout.d.ts +116 -0
- package/dist/types/core/charts/column/model.d.ts +295 -0
- package/dist/types/core/charts/column/types.d.ts +56 -0
- package/dist/types/core/charts/combo/endpoints.d.ts +165 -0
- package/dist/types/core/charts/combo/fixtures.d.ts +12 -0
- package/dist/types/core/charts/combo/layout.d.ts +48 -0
- package/dist/types/core/charts/creative/fixtures.d.ts +4 -0
- package/dist/types/core/charts/creative/types.d.ts +73 -0
- package/dist/types/core/charts/diagram/fixtures.d.ts +3 -0
- package/dist/types/core/charts/dimswitch/compile.d.ts +20 -0
- package/dist/types/core/charts/dimswitch/fixtures.d.ts +3 -0
- package/dist/types/core/charts/dimswitch/types.d.ts +152 -0
- package/dist/types/core/charts/dot/fixtures.d.ts +11 -0
- package/dist/types/core/charts/funnel/fixtures.d.ts +11 -0
- package/dist/types/core/charts/gantt/fixtures.d.ts +9 -0
- package/dist/types/core/charts/gantt/layout.d.ts +56 -0
- package/dist/types/core/charts/grid/fixtures.d.ts +3 -0
- package/dist/types/core/charts/grid/metricStack.d.ts +108 -0
- package/dist/types/core/charts/grid/metricStackSchema.d.ts +74 -0
- package/dist/types/core/charts/grid/normalize.d.ts +99 -0
- package/dist/types/core/charts/grid/schema.d.ts +168 -0
- package/dist/types/core/charts/heatmap/fixtures.d.ts +11 -0
- package/dist/types/core/charts/histogram/fixtures.d.ts +15 -0
- package/dist/types/core/charts/histogram/types.d.ts +98 -0
- package/dist/types/core/charts/kpi/fixtures.d.ts +9 -0
- package/dist/types/core/charts/likert/fixtures.d.ts +11 -0
- package/dist/types/core/charts/likert/layout.d.ts +111 -0
- package/dist/types/core/charts/line/fixtures.d.ts +16 -0
- package/dist/types/core/charts/line/types.d.ts +6 -0
- package/dist/types/core/charts/mekko/fixtures.d.ts +13 -0
- package/dist/types/core/charts/pareto/fixtures.d.ts +5 -0
- package/dist/types/core/charts/pareto/layout.d.ts +68 -0
- package/dist/types/core/charts/pie/fixtures.d.ts +14 -0
- package/dist/types/core/charts/pvm/fixtures.d.ts +13 -0
- package/dist/types/core/charts/pvm/types.d.ts +118 -0
- package/dist/types/core/charts/pyramid/fixtures.d.ts +4 -0
- package/dist/types/core/charts/pyramid/types.d.ts +92 -0
- package/dist/types/core/charts/sankey/fixtures.d.ts +4 -0
- package/dist/types/core/charts/sankey/types.d.ts +116 -0
- package/dist/types/core/charts/scatter/fixtures.d.ts +12 -0
- package/dist/types/core/charts/scatter/types.d.ts +58 -0
- package/dist/types/core/charts/slope/fixtures.d.ts +13 -0
- package/dist/types/core/charts/sparkline/fixtures.d.ts +9 -0
- package/dist/types/core/charts/status/fixtures.d.ts +8 -0
- package/dist/types/core/charts/status/layout.d.ts +71 -0
- package/dist/types/core/charts/table/fitFormats.d.ts +67 -0
- package/dist/types/core/charts/table/fixtures.d.ts +7 -0
- package/dist/types/core/charts/table/resolve.d.ts +72 -0
- package/dist/types/core/charts/table/view.d.ts +156 -0
- package/dist/types/core/charts/tilemap/fixtures.d.ts +3 -0
- package/dist/types/core/charts/tilemap/types.d.ts +94 -0
- package/dist/types/core/charts/treemap/fixtures.d.ts +4 -0
- package/dist/types/core/charts/treemap/types.d.ts +78 -0
- package/dist/types/core/charts/variance/fixtures.d.ts +12 -0
- package/dist/types/core/charts/waffle/fixtures.d.ts +5 -0
- package/dist/types/core/charts/waffle/types.d.ts +117 -0
- package/dist/types/core/charts/waterfall/fixtures.d.ts +9 -0
- package/dist/types/core/claims/browser.d.ts +49 -0
- package/dist/types/core/claims/manifest.d.ts +22 -0
- package/dist/types/core/dateFormat.d.ts +39 -0
- package/dist/types/core/deferred.d.ts +121 -0
- package/dist/types/core/diagnostics/describe.d.ts +149 -0
- package/dist/types/core/diagnostics/jsonPatch.d.ts +36 -0
- package/dist/types/core/doc/bareChart.d.ts +2 -0
- package/dist/types/core/doc/diagnostics.d.ts +124 -0
- package/dist/types/core/doc/docExpand.d.ts +39 -0
- package/dist/types/core/doc/document.d.ts +43 -0
- package/dist/types/core/doc/ownedDocumentCopy.d.ts +5 -0
- package/dist/types/core/doc/specError.d.ts +6 -0
- package/dist/types/core/emptyData.d.ts +27 -0
- package/dist/types/core/eventLane.d.ts +208 -0
- package/dist/types/core/fontMetrics/index.d.ts +47 -0
- package/dist/types/core/fontMetrics/injected.d.ts +40 -0
- package/dist/types/core/fontMetrics/tableDocument.d.ts +73 -0
- package/dist/types/core/fontMetrics/tables.generated.d.ts +17 -0
- package/dist/types/core/footer.d.ts +59 -0
- package/dist/types/core/format.d.ts +149 -0
- package/dist/types/core/formatPrecision.d.ts +136 -0
- package/dist/types/core/formatSpec.d.ts +302 -0
- package/dist/types/core/frame.d.ts +583 -0
- package/dist/types/core/geo/packs/all.d.ts +7 -0
- package/dist/types/core/geo/packs/dach.d.ts +16 -0
- package/dist/types/core/geo/packs/de-states.d.ts +16 -0
- package/dist/types/core/geo/packs/eu27.d.ts +16 -0
- package/dist/types/core/geo/packs/europe.d.ts +16 -0
- package/dist/types/core/geo/packs/index.d.ts +22 -0
- package/dist/types/core/geo/packs/registry.d.ts +37 -0
- package/dist/types/core/geo/packs/us-states.d.ts +16 -0
- package/dist/types/core/geo/packs/world.d.ts +16 -0
- package/dist/types/core/geo/tiles/eu27.generated.d.ts +412 -0
- package/dist/types/core/geo/tiles/europe.generated.d.ts +842 -0
- package/dist/types/core/geo/tiles/index.d.ts +8 -0
- package/dist/types/core/geo/tiles/types.d.ts +36 -0
- package/dist/types/core/geo/tiles/us-states.generated.d.ts +952 -0
- package/dist/types/core/geo/tiles/world.generated.d.ts +968 -0
- package/dist/types/core/geo/types.d.ts +146 -0
- package/dist/types/core/geometry.d.ts +102 -0
- package/dist/types/core/grid/sharedScale.d.ts +82 -0
- package/dist/types/core/icons.d.ts +227 -0
- package/dist/types/core/inputError.d.ts +14 -0
- package/dist/types/core/isoDate.d.ts +2 -0
- package/dist/types/core/isoTime.d.ts +7 -0
- package/dist/types/core/label/categoryRow.d.ts +332 -0
- package/dist/types/core/label/occupied.d.ts +41 -0
- package/dist/types/core/label/ownership.d.ts +83 -0
- package/dist/types/core/label/solver.d.ts +380 -0
- package/dist/types/core/label/tickRow.d.ts +78 -0
- package/dist/types/core/live/types.d.ts +50 -0
- package/dist/types/core/normalize/shared.d.ts +56 -0
- package/dist/types/core/notes.d.ts +174 -0
- package/dist/types/core/othersShade.d.ts +9 -0
- package/dist/types/core/periodYears.d.ts +9 -0
- package/dist/types/core/polyline.d.ts +11 -0
- package/dist/types/core/rangeRules.d.ts +19 -0
- package/dist/types/core/ratioTier.d.ts +120 -0
- package/dist/types/core/readerStrings.d.ts +13 -0
- package/dist/types/core/reading.d.ts +120 -0
- package/dist/types/core/registry.d.ts +178 -0
- package/dist/types/core/repaintGeometry.d.ts +19 -0
- package/dist/types/core/request.d.ts +124 -0
- package/dist/types/core/rows.d.ts +45 -0
- package/dist/types/core/scale.d.ts +106 -0
- package/dist/types/core/schema/capability.d.ts +229 -0
- package/dist/types/core/schema/namedColumns.d.ts +45 -0
- package/dist/types/core/schema/reference.d.ts +31 -0
- package/dist/types/core/schema/refusals.d.ts +45 -0
- package/dist/types/core/schema/unknownKeys.d.ts +45 -0
- package/dist/types/core/seriesIdentity.d.ts +120 -0
- package/dist/types/core/shareRounding.d.ts +49 -0
- package/dist/types/core/sizing.d.ts +330 -0
- package/dist/types/core/staticFooter.d.ts +6 -0
- package/dist/types/core/story.d.ts +41 -0
- package/dist/types/core/structureCounts.d.ts +10 -0
- package/dist/types/core/svg/renderSvg.d.ts +51 -0
- package/dist/types/core/target.d.ts +89 -0
- package/dist/types/core/text.d.ts +113 -0
- package/dist/types/core/theme.d.ts +478 -0
- package/dist/types/core/themeFields.d.ts +11 -0
- package/dist/types/core/themeRules.d.ts +111 -0
- package/dist/types/core/themeShape.d.ts +87 -0
- package/dist/types/core/themeValidate.d.ts +15 -0
- package/dist/types/core/timeAxis.d.ts +106 -0
- package/dist/types/core/types/annotations.d.ts +223 -0
- package/dist/types/core/types/cell.d.ts +82 -0
- package/dist/types/core/types/data.d.ts +309 -0
- package/dist/types/core/types/diagram.d.ts +234 -0
- package/dist/types/core/types/index.d.ts +8 -0
- package/dist/types/core/types/options.d.ts +1583 -0
- package/dist/types/core/types/scene.d.ts +990 -0
- package/dist/types/core/types/sizing.d.ts +51 -0
- package/dist/types/core/types/table.d.ts +873 -0
- package/dist/types/core/types/theme.d.ts +806 -0
- package/dist/types/core/zoom.d.ts +106 -0
- package/dist/types/fixtures/index.d.ts +40 -0
- package/dist/types/fixtures/registry.d.ts +15 -0
- package/dist/types/fonts.d.ts +10 -0
- package/dist/types/index.d.ts +70 -0
- package/dist/types/react/BoardplotTheme.d.ts +9 -0
- package/dist/types/react/DimSwitchChart.d.ts +36 -0
- package/dist/types/react/ScaleGroup.d.ts +31 -0
- package/dist/types/react/SceneRenderer.d.ts +23 -0
- package/dist/types/react/SizePlaceholder.d.ts +51 -0
- package/dist/types/react/StoryFrame.d.ts +42 -0
- package/dist/types/react/TableChart.d.ts +220 -0
- package/dist/types/react/a11ySurface.d.ts +20 -0
- package/dist/types/react/barrelCharts.d.ts +1023 -0
- package/dist/types/react/charts/bar.d.ts +28 -0
- package/dist/types/react/charts/bartable.d.ts +27 -0
- package/dist/types/react/charts/box.d.ts +27 -0
- package/dist/types/react/charts/bullet.d.ts +28 -0
- package/dist/types/react/charts/butterfly.d.ts +28 -0
- package/dist/types/react/charts/choropleth.d.ts +27 -0
- package/dist/types/react/charts/cohort.d.ts +52 -0
- package/dist/types/react/charts/column.d.ts +27 -0
- package/dist/types/react/charts/combo.d.ts +7 -0
- package/dist/types/react/charts/creative.d.ts +27 -0
- package/dist/types/react/charts/diagram.d.ts +162 -0
- package/dist/types/react/charts/dimswitch.d.ts +6 -0
- package/dist/types/react/charts/dot.d.ts +28 -0
- package/dist/types/react/charts/funnel.d.ts +28 -0
- package/dist/types/react/charts/gantt.d.ts +28 -0
- package/dist/types/react/charts/grid.d.ts +29 -0
- package/dist/types/react/charts/heatmap.d.ts +28 -0
- package/dist/types/react/charts/histogram.d.ts +27 -0
- package/dist/types/react/charts/kpi.d.ts +28 -0
- package/dist/types/react/charts/likert.d.ts +27 -0
- package/dist/types/react/charts/line.d.ts +28 -0
- package/dist/types/react/charts/mekko.d.ts +28 -0
- package/dist/types/react/charts/pareto.d.ts +28 -0
- package/dist/types/react/charts/pie.d.ts +28 -0
- package/dist/types/react/charts/pvm.d.ts +27 -0
- package/dist/types/react/charts/pyramid.d.ts +27 -0
- package/dist/types/react/charts/sankey.d.ts +27 -0
- package/dist/types/react/charts/scatter.d.ts +28 -0
- package/dist/types/react/charts/slope.d.ts +28 -0
- package/dist/types/react/charts/sparkline.d.ts +28 -0
- package/dist/types/react/charts/status.d.ts +27 -0
- package/dist/types/react/charts/table.d.ts +6 -0
- package/dist/types/react/charts/tilemap.d.ts +27 -0
- package/dist/types/react/charts/treemap.d.ts +27 -0
- package/dist/types/react/charts/variance.d.ts +28 -0
- package/dist/types/react/charts/waffle.d.ts +28 -0
- package/dist/types/react/charts/waterfall.d.ts +28 -0
- package/dist/types/react/createChartComponent.d.ts +135 -0
- package/dist/types/react/export/clipboard.d.ts +8 -0
- package/dist/types/react/export/csv.d.ts +2 -0
- package/dist/types/react/export/frame.d.ts +35 -0
- package/dist/types/react/export/index.d.ts +7 -0
- package/dist/types/react/export/png.d.ts +14 -0
- package/dist/types/react/export/svg.d.ts +5 -0
- package/dist/types/react/export/types.d.ts +69 -0
- package/dist/types/react/export/useExport.d.ts +17 -0
- package/dist/types/react/exportLink.d.ts +49 -0
- package/dist/types/react/footerFrame.d.ts +25 -0
- package/dist/types/react/hover/dataTable.d.ts +13 -0
- package/dist/types/react/hover/engine.d.ts +210 -0
- package/dist/types/react/hover/keyboard.d.ts +44 -0
- package/dist/types/react/hover/labelCard.d.ts +170 -0
- package/dist/types/react/hover/placement.d.ts +49 -0
- package/dist/types/react/index.d.ts +16 -0
- package/dist/types/react/parseChartSpec.d.ts +16 -0
- package/dist/types/react/prepare.d.ts +32 -0
- package/dist/types/react/prepared.d.ts +53 -0
- package/dist/types/react/preparedTable.d.ts +15 -0
- package/dist/types/react/rowsInput.d.ts +55 -0
- package/dist/types/react/rowsModule.d.ts +18 -0
- package/dist/types/react/rowsStore.d.ts +50 -0
- package/dist/types/react/scale-group.d.ts +2 -0
- package/dist/types/react/scaleGroupContext.d.ts +22 -0
- package/dist/types/react/scenePaint.d.ts +10 -0
- package/dist/types/react/scrollState.d.ts +26 -0
- package/dist/types/react/spec.d.ts +65 -0
- package/dist/types/react/specValidation.d.ts +45 -0
- package/dist/types/react/story.d.ts +15 -0
- package/dist/types/react/theme.d.ts +9 -0
- package/dist/types/react/themeContext.d.ts +44 -0
- package/dist/types/react/useChartLayout.d.ts +22 -0
- package/dist/types/react/useContainerSize.d.ts +57 -0
- package/dist/types/react/useHover.d.ts +100 -0
- package/dist/types/react/useZoom.d.ts +50 -0
- package/dist/types/rows.d.ts +58 -0
- package/dist/types/tableLooks.d.ts +6 -0
- package/dist/types/theme.d.ts +3 -0
- package/dist/types/validate.d.ts +3 -0
- package/dist/validate.d.ts +1 -0
- package/dist/validate.js +222 -0
- package/docs/FONTS.md +68 -0
- package/docs/TELEMETRY.md +94 -0
- package/docs/manual.md +838 -0
- package/docs/reference/bar.md +222 -0
- package/docs/reference/bartable.md +143 -0
- package/docs/reference/box.md +93 -0
- package/docs/reference/bullet.md +118 -0
- package/docs/reference/butterfly.md +117 -0
- package/docs/reference/choropleth.md +148 -0
- package/docs/reference/cohort.md +149 -0
- package/docs/reference/column.md +275 -0
- package/docs/reference/combo.md +219 -0
- package/docs/reference/creative.md +147 -0
- package/docs/reference/diagram.md +191 -0
- package/docs/reference/dimswitch.md +1395 -0
- package/docs/reference/dot.md +117 -0
- package/docs/reference/fixtures.md +1088 -0
- package/docs/reference/funnel.md +121 -0
- package/docs/reference/gantt.md +132 -0
- package/docs/reference/grid.md +302 -0
- package/docs/reference/heatmap.md +127 -0
- package/docs/reference/histogram.md +77 -0
- package/docs/reference/kpi.md +115 -0
- package/docs/reference/likert.md +113 -0
- package/docs/reference/line.md +436 -0
- package/docs/reference/mekko.md +114 -0
- package/docs/reference/options.md +313 -0
- package/docs/reference/pareto.md +102 -0
- package/docs/reference/pie.md +114 -0
- package/docs/reference/pvm.md +114 -0
- package/docs/reference/pyramid.md +99 -0
- package/docs/reference/react.md +703 -0
- package/docs/reference/reading.md +28 -0
- package/docs/reference/sankey.md +110 -0
- package/docs/reference/scatter.md +211 -0
- package/docs/reference/slope.md +126 -0
- package/docs/reference/sparkline.md +74 -0
- package/docs/reference/status.md +107 -0
- package/docs/reference/table.md +673 -0
- package/docs/reference/theme.md +361 -0
- package/docs/reference/tilemap.md +121 -0
- package/docs/reference/treemap.md +86 -0
- package/docs/reference/variance.md +126 -0
- package/docs/reference/waffle.md +106 -0
- package/docs/reference/waterfall.md +164 -0
- package/llms.txt +57 -0
- package/package.json +437 -4
|
@@ -0,0 +1,1058 @@
|
|
|
1
|
+
import {
|
|
2
|
+
seatsPastBlockers
|
|
3
|
+
} from "./chunk-Q6XJOJTY.js";
|
|
4
|
+
import {
|
|
5
|
+
prepareRangeData,
|
|
6
|
+
resolveCellRange
|
|
7
|
+
} from "./chunk-VDAZPGR2.js";
|
|
8
|
+
import {
|
|
9
|
+
averageMarkerLine,
|
|
10
|
+
averageMarkerScope
|
|
11
|
+
} from "./chunk-TTR7EWNH.js";
|
|
12
|
+
import {
|
|
13
|
+
warnMissingValue
|
|
14
|
+
} from "./chunk-7QDAHY5M.js";
|
|
15
|
+
import {
|
|
16
|
+
labelOn
|
|
17
|
+
} from "./chunk-V667FCIJ.js";
|
|
18
|
+
import {
|
|
19
|
+
percentLevels,
|
|
20
|
+
runAnnotatePass
|
|
21
|
+
} from "./chunk-GQS46LC3.js";
|
|
22
|
+
import {
|
|
23
|
+
rowLabelBand
|
|
24
|
+
} from "./chunk-A372DLQX.js";
|
|
25
|
+
import {
|
|
26
|
+
fittedLabel,
|
|
27
|
+
gutterBudget,
|
|
28
|
+
stepDownFont
|
|
29
|
+
} from "./chunk-EWVKBRLV.js";
|
|
30
|
+
import {
|
|
31
|
+
breakUnsupported,
|
|
32
|
+
chartPalette,
|
|
33
|
+
chartTheme
|
|
34
|
+
} from "./chunk-SXGTRZFN.js";
|
|
35
|
+
import {
|
|
36
|
+
namedLineText
|
|
37
|
+
} from "./chunk-5C7TWNYZ.js";
|
|
38
|
+
import {
|
|
39
|
+
structureCount
|
|
40
|
+
} from "./chunk-B2EBEXIS.js";
|
|
41
|
+
import {
|
|
42
|
+
CONTENT_PLOT_HEIGHT,
|
|
43
|
+
HARD_MINIMUM,
|
|
44
|
+
applyAxisBounds,
|
|
45
|
+
applyValueAxisTitleInk,
|
|
46
|
+
bandScale,
|
|
47
|
+
calendarCategories,
|
|
48
|
+
chartSizing,
|
|
49
|
+
layoutValueAxis,
|
|
50
|
+
linearScale,
|
|
51
|
+
niceDomain,
|
|
52
|
+
planValueAxisTitle,
|
|
53
|
+
valueAxisTitleRequest
|
|
54
|
+
} from "./chunk-GQPESFAF.js";
|
|
55
|
+
import {
|
|
56
|
+
prepareFractionData
|
|
57
|
+
} from "./chunk-3EZRM4YM.js";
|
|
58
|
+
import {
|
|
59
|
+
PRIORITY,
|
|
60
|
+
authoredFootnoteCount,
|
|
61
|
+
authoredNotes,
|
|
62
|
+
clamp,
|
|
63
|
+
composedTextRole,
|
|
64
|
+
createOccupiedIndex,
|
|
65
|
+
distinguishSeries,
|
|
66
|
+
fixedPlotChrome,
|
|
67
|
+
frameTextOptions,
|
|
68
|
+
isOwnMark,
|
|
69
|
+
labelCtx,
|
|
70
|
+
labelsToNodes,
|
|
71
|
+
normalizeLegendOption,
|
|
72
|
+
plotHeightAfter,
|
|
73
|
+
round2,
|
|
74
|
+
rowLabelX,
|
|
75
|
+
solveFrame,
|
|
76
|
+
solveLabels,
|
|
77
|
+
unionRect,
|
|
78
|
+
unitPrinted
|
|
79
|
+
} from "./chunk-2JAWQ7VV.js";
|
|
80
|
+
import {
|
|
81
|
+
disclosureNote
|
|
82
|
+
} from "./chunk-YTSSXSZR.js";
|
|
83
|
+
import {
|
|
84
|
+
formatterFromExample,
|
|
85
|
+
neededDecimals,
|
|
86
|
+
seriesRasterFormatter
|
|
87
|
+
} from "./chunk-ASAON7G4.js";
|
|
88
|
+
import {
|
|
89
|
+
autoDecimals,
|
|
90
|
+
chartStrings,
|
|
91
|
+
formatAutomaticNumber
|
|
92
|
+
} from "./chunk-YQ2B3YVF.js";
|
|
93
|
+
import {
|
|
94
|
+
cellMeta,
|
|
95
|
+
cellValue,
|
|
96
|
+
isPctCell
|
|
97
|
+
} from "./chunk-OAPCJO6W.js";
|
|
98
|
+
import {
|
|
99
|
+
REFERENCE_LABEL_CLEARANCE,
|
|
100
|
+
arrowHeadPath,
|
|
101
|
+
arrowShaftEnd,
|
|
102
|
+
canvasMargin,
|
|
103
|
+
colorRolePaints,
|
|
104
|
+
dashToken,
|
|
105
|
+
emphasisWeight,
|
|
106
|
+
gridDash,
|
|
107
|
+
markRolePaint,
|
|
108
|
+
mutedMarkPaint,
|
|
109
|
+
paintColor,
|
|
110
|
+
recedingSeriesId,
|
|
111
|
+
seriesPaint,
|
|
112
|
+
strokeToken,
|
|
113
|
+
textScaleOf
|
|
114
|
+
} from "./chunk-II7652VA.js";
|
|
115
|
+
import {
|
|
116
|
+
MARK_CONTRAST_FLOOR,
|
|
117
|
+
hueSaturation,
|
|
118
|
+
palettePerceptualDistance
|
|
119
|
+
} from "./chunk-2MTWKMEG.js";
|
|
120
|
+
import {
|
|
121
|
+
NormalizeError,
|
|
122
|
+
TARGET_SIZE,
|
|
123
|
+
accessibleTitle,
|
|
124
|
+
normalizeCategory,
|
|
125
|
+
normalizeScenario,
|
|
126
|
+
normalizeSeriesValues,
|
|
127
|
+
resolveHighlight,
|
|
128
|
+
resolveSize,
|
|
129
|
+
resolveSubtitle
|
|
130
|
+
} from "./chunk-SGD3ZHID.js";
|
|
131
|
+
import {
|
|
132
|
+
maxOf,
|
|
133
|
+
minOf,
|
|
134
|
+
pushAll
|
|
135
|
+
} from "./chunk-WYJEOMNY.js";
|
|
136
|
+
import {
|
|
137
|
+
defaultMeasurer
|
|
138
|
+
} from "./chunk-TXINIAFL.js";
|
|
139
|
+
|
|
140
|
+
// src/core/strings/dot.ts
|
|
141
|
+
var EN = {
|
|
142
|
+
// reader-facing wording linked only by its consumers.
|
|
143
|
+
dumbbellName: "Dumbbell",
|
|
144
|
+
lollipopName: "Lollipop",
|
|
145
|
+
clevelandName: "Cleveland dot",
|
|
146
|
+
dotRangeDesc: "{v1}, range {v2} to {v3}{v4}",
|
|
147
|
+
midpointClause: ", midpoint {v1}",
|
|
148
|
+
dotTitle: "{v1} chart: {v2} categories",
|
|
149
|
+
dotDesc: "{v1} chart with {v2} series. {v3}.",
|
|
150
|
+
rangeName: "Range",
|
|
151
|
+
rose: "Rose",
|
|
152
|
+
fell: "Fell",
|
|
153
|
+
spanText: "{v1} to {v2}",
|
|
154
|
+
unchangedPair: "{v1} unchanged",
|
|
155
|
+
// the key entry of a range mid-point marker and the note that names rows without one.
|
|
156
|
+
midName: "Midpoint",
|
|
157
|
+
midMissing: "{v1} not reported for {v2}.",
|
|
158
|
+
midMissingCount: "{v1} not reported for {v2} rows."
|
|
159
|
+
}, DE = {
|
|
160
|
+
// reader-facing wording linked only by its consumers.
|
|
161
|
+
dumbbellName: "Hanteldiagramm",
|
|
162
|
+
lollipopName: "Stieldiagramm",
|
|
163
|
+
clevelandName: "Cleveland-Punktdiagramm",
|
|
164
|
+
dotRangeDesc: "{v1}, Spanne {v2} bis {v3}{v4}",
|
|
165
|
+
midpointClause: ", Mitte {v1}",
|
|
166
|
+
dotTitle: "{v1}: {v2} {v2|Kategorie|Kategorien}",
|
|
167
|
+
dotDesc: "{v1} mit {v2} {v2|Reihe|Reihen}. {v3}.",
|
|
168
|
+
rangeName: "Spanne",
|
|
169
|
+
rose: "Gestiegen",
|
|
170
|
+
fell: "Gefallen",
|
|
171
|
+
spanText: "{v1} bis {v2}",
|
|
172
|
+
unchangedPair: "{v1} unver\xE4ndert",
|
|
173
|
+
// the key entry of a range mid-point marker and the note that names rows without one.
|
|
174
|
+
midName: "Mittelwert",
|
|
175
|
+
midMissing: "{v1} f\xFCr {v2} nicht angegeben.",
|
|
176
|
+
midMissingCount: "{v1} f\xFCr {v2} {v2|Zeile|Zeilen} nicht angegeben."
|
|
177
|
+
}, { chartString, localeStrings } = chartStrings(EN, DE);
|
|
178
|
+
|
|
179
|
+
// src/core/charts/dot/layout.ts
|
|
180
|
+
var LABEL_GAP = 5, ARROW_HEAD = 7, CAT_BAND_GAP = 10, HEADER_ROWS_MAX_WIDTH = 480, ROW_PITCH_CAP = {
|
|
181
|
+
dot: [44, 40],
|
|
182
|
+
lollipop: [38, 32],
|
|
183
|
+
dumbbell: [48, 40]
|
|
184
|
+
}, headerRowPitch = (width) => width >= HEADER_ROWS_MAX_WIDTH ? 42 : 40, NARROW_PITCH_WIDTH = 600;
|
|
185
|
+
function dotRadiusCap(variant, width) {
|
|
186
|
+
return variant === "lollipop" ? 5.5 : variant === "dumbbell" ? width >= 960 ? 6 : width >= NARROW_PITCH_WIDTH ? 5.5 : 5 : 5;
|
|
187
|
+
}
|
|
188
|
+
var LINE_CLEAR = 7, CONNECTOR_PAINT = mutedMarkPaint(), RAIL_PAINT = CONNECTOR_PAINT, CAP_PAINT = { token: "neutralMark", theme: { kind: "visible-tint", base: { token: "neutralMark" }, amount: 0.3, floor: MARK_CONTRAST_FLOOR + 0.5 } }, MID_NOTE_NAMES = 4, MID_KEY_R = 3.5, GREY_SATURATION = 0.05, pairText = (ta, tb, options) => ta === tb ? chartString(options, "unchangedPair", { v1: ta }) : chartString(options, "spanText", { v1: ta, v2: tb });
|
|
189
|
+
function layoutDot(data, options = {}) {
|
|
190
|
+
let warnings = [];
|
|
191
|
+
breakUnsupported("dot", options, warnings);
|
|
192
|
+
let theme = chartTheme(options), paletteRamp = chartPalette(theme, options.palette, warnings), size = resolveSize(options.size), measure = options.measure ?? defaultMeasurer, variant = options.variant ?? "dot";
|
|
193
|
+
options.arrow && variant !== "dumbbell" && warnings.push({
|
|
194
|
+
code: "arrow-dumbbell-only",
|
|
195
|
+
severity: "warn",
|
|
196
|
+
message: `options.arrow draws the change from the first to the second series of a dumbbell; variant '${variant}' has no pair, so it is ignored`,
|
|
197
|
+
suggest: "set variant: 'dumbbell' with two series, or drop options.arrow",
|
|
198
|
+
field: ["options", "arrow"]
|
|
199
|
+
});
|
|
200
|
+
let highlights = new Set(resolveHighlight(options.highlight)), labelOn2 = (kind) => labelOn(options, kind);
|
|
201
|
+
if (!data || !Array.isArray(data.categories) || data.categories.length === 0)
|
|
202
|
+
throw new NormalizeError("empty-data", "categories", "dot requires at least one category");
|
|
203
|
+
if (!Array.isArray(data.series) || data.series.length === 0)
|
|
204
|
+
throw new NormalizeError("empty-data", "series", "dot requires at least one series");
|
|
205
|
+
let rawCats = data.categories.map((c, i) => normalizeCategory(c, i)), normSeries = data.series.map((s, i) => {
|
|
206
|
+
if (!s?.id) throw new NormalizeError("missing-id", `series[${i}]`, "series requires an id");
|
|
207
|
+
let cells = normalizeSeriesValues(s, rawCats, i).map((c, ci) => ({
|
|
208
|
+
v: cellValue(c),
|
|
209
|
+
...isPctCell(c) ? { isPct: !0 } : {},
|
|
210
|
+
meta: cellMeta(c),
|
|
211
|
+
range: resolveCellRange(
|
|
212
|
+
c,
|
|
213
|
+
`series[${s.id}].values[${ci}]`,
|
|
214
|
+
warnings,
|
|
215
|
+
{ seriesId: s.id, categoryId: rawCats[ci]?.id }
|
|
216
|
+
)
|
|
217
|
+
}));
|
|
218
|
+
return cells.forEach((cell, ci) => {
|
|
219
|
+
cell.v === null && s.role !== "reference" && warnMissingValue(warnings, `series '${s.id}' at '${rawCats[ci].id}'`, { seriesId: s.id, categoryId: rawCats[ci].id });
|
|
220
|
+
}), {
|
|
221
|
+
id: s.id,
|
|
222
|
+
label: s.label ?? s.id,
|
|
223
|
+
scenario: normalizeScenario(s.scenario, `series[${s.id}].scenario`),
|
|
224
|
+
role: s.role ?? "data",
|
|
225
|
+
colorRole: s.colorRole,
|
|
226
|
+
fill: s.fill,
|
|
227
|
+
format: s.format,
|
|
228
|
+
unit: s.unit,
|
|
229
|
+
...s.direction ? { direction: s.direction } : {},
|
|
230
|
+
slot: 0,
|
|
231
|
+
cells
|
|
232
|
+
};
|
|
233
|
+
}), dataSeries = normSeries.filter((s) => s.role === "data"), rolePaints = colorRolePaints(dataSeries, !1);
|
|
234
|
+
if (normSeries.length > dataSeries.length && warnings.push({
|
|
235
|
+
code: "reference-ignored",
|
|
236
|
+
severity: "info",
|
|
237
|
+
message: 'dot charts ignore reference-role series \u2014 use variant "dumbbell" to compare two levels',
|
|
238
|
+
suggest: "variant: 'dumbbell'"
|
|
239
|
+
}), dataSeries.length === 0)
|
|
240
|
+
throw new NormalizeError("no-data-series", "series", "dot requires at least one data-role series");
|
|
241
|
+
let valueSpec = seriesRasterFormatter(options.format, normSeries.flatMap(
|
|
242
|
+
(s) => s.cells.flatMap((cell) => [cell.v, cell.range?.low, cell.range?.high, cell.range?.mid])
|
|
243
|
+
), options.locale?.language, options.unit, options.target), fmt = valueSpec.fmt, referenceFmt = (options.unit === "%" || percentLevels(dataSeries.map((series) => ({ vals: series.cells })))) && !options.format ? (v) => formatAutomaticNumber(v, { locale: options.locale?.language, decimals: Math.max(autoDecimals(v), neededDecimals(v)), suffix: "%" }) : fmt;
|
|
244
|
+
if (variant === "dumbbell" && dataSeries.length !== 2)
|
|
245
|
+
throw new NormalizeError(
|
|
246
|
+
"dumbbell-two-series",
|
|
247
|
+
"series",
|
|
248
|
+
`dumbbell requires exactly 2 data series, got ${dataSeries.length}`
|
|
249
|
+
);
|
|
250
|
+
if (variant === "lollipop" && dataSeries.length !== 1)
|
|
251
|
+
throw new NormalizeError(
|
|
252
|
+
"lollipop-one-series",
|
|
253
|
+
"series",
|
|
254
|
+
`lollipop requires exactly 1 data series, got ${dataSeries.length}`
|
|
255
|
+
);
|
|
256
|
+
dataSeries.forEach((s, i) => s.slot = i);
|
|
257
|
+
let cats = rawCats.map((c) => ({
|
|
258
|
+
id: c.id,
|
|
259
|
+
label: c.label ?? c.id,
|
|
260
|
+
...c.date === void 0 ? {} : { date: c.date },
|
|
261
|
+
...c.footnote === void 0 ? {} : { footnote: c.footnote }
|
|
262
|
+
})), restRecedes = dataSeries.length === 1 && cats.some((cat, ci) => highlights.has(cat.id) && dataSeries[0].cells[ci].v !== null), receding = recedingSeriesId(dataSeries, highlights), applyOrder = (order) => {
|
|
263
|
+
cats = order.map((i) => cats[i]);
|
|
264
|
+
for (let s of normSeries) s.cells = order.map((i) => s.cells[i]);
|
|
265
|
+
}, sortKey = (ci) => variant === "dumbbell" ? (dataSeries[1].cells[ci].v ?? 0) - (dataSeries[0].cells[ci].v ?? 0) : dataSeries[0].cells[ci].v ?? 0, catSort = options.sort?.categories ?? "sheet";
|
|
266
|
+
if (catSort !== "sheet") {
|
|
267
|
+
let idx = cats.map((_, i) => i), key = cats.map((_, i) => sortKey(i));
|
|
268
|
+
catSort === "asc" ? idx.sort((a, b) => key[a] - key[b] || a - b) : catSort === "desc" ? idx.sort((a, b) => key[b] - key[a] || a - b) : idx.reverse(), applyOrder(idx);
|
|
269
|
+
}
|
|
270
|
+
let gaps;
|
|
271
|
+
variant === "dumbbell" && (gaps = {}, cats.forEach((c, ci) => {
|
|
272
|
+
let a = dataSeries[0].cells[ci].v, b = dataSeries[1].cells[ci].v;
|
|
273
|
+
a !== null && b !== null && (gaps[c.id] = round2(b - a));
|
|
274
|
+
}));
|
|
275
|
+
let annotationsAll = (options.annotations ?? []).map((a, n) => ({
|
|
276
|
+
...a,
|
|
277
|
+
id: a.id ?? `${a.kind}-${n + 1}`
|
|
278
|
+
})), markerScope = averageMarkerScope(options.averageMarker), averageWord = options.strings?.average ?? localeStrings(options.locale?.language).average, averageIds = /* @__PURE__ */ new Set(), directionsDrawn = /* @__PURE__ */ new Set();
|
|
279
|
+
variant === "dumbbell" && options.arrow === !0 && dataSeries[1]?.direction && dataSeries[0].cells.forEach((cell, ci) => {
|
|
280
|
+
let b = dataSeries[1].cells[ci]?.v ?? null;
|
|
281
|
+
cell.v !== null && b !== null && b !== cell.v && directionsDrawn.add(b > cell.v ? "rose" : "fell");
|
|
282
|
+
});
|
|
283
|
+
let rangesDrawn = dataSeries.some((s) => s.cells.some((cell) => cell.v !== null && cell.range !== void 0)), midName = options.range?.midLabel ?? chartString(options, "midName"), midsDrawn = dataSeries.some((s) => s.cells.some((cell) => cell.v !== null && cell.range?.mid !== void 0)), rowsWithoutMid = midsDrawn ? cats.filter((_, ci) => dataSeries.some((s) => s.cells[ci].v !== null && s.cells[ci].range !== void 0 && s.cells[ci].range.mid === void 0)) : [], midNote = rowsWithoutMid.length === 0 ? void 0 : rowsWithoutMid.length > MID_NOTE_NAMES ? chartString(options, "midMissingCount", { v1: midName, v2: rowsWithoutMid.length }) : chartString(options, "midMissing", {
|
|
284
|
+
v1: midName,
|
|
285
|
+
v2: rowsWithoutMid.map((c) => c.label).reduce((text, name, i, all) => i === 0 ? name : `${text}${i === all.length - 1 ? ` ${chartString(options, "and")} ` : ", "}${name}`, "")
|
|
286
|
+
});
|
|
287
|
+
if (markerScope !== void 0) {
|
|
288
|
+
let inScope = dataSeries.filter((s) => markerScope === "all" || markerScope.includes(s.id)).flatMap((s) => s.cells.flatMap((cell) => cell.v === null ? [] : [cell.v]));
|
|
289
|
+
if (inScope.length === 0)
|
|
290
|
+
warnings.push({ code: "average-marker-empty", severity: "warn", message: "averageMarker scope has no plotted values; marker omitted" });
|
|
291
|
+
else {
|
|
292
|
+
let mean = inScope.reduce((sum, v) => sum + v, 0) / inScope.length, marker = averageMarkerLine(annotationsAll, mean, referenceFmt, void 0, averageWord);
|
|
293
|
+
averageIds.add(marker.id), annotationsAll.push(marker);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
let localAnns = annotationsAll.filter((a) => a.kind === "valueLine"), passAnns = annotationsAll.filter((a) => a.kind !== "valueLine"), allDotValues = [];
|
|
297
|
+
for (let s of dataSeries) for (let c of s.cells) c.v !== null && allDotValues.push(c.v);
|
|
298
|
+
let allRangeValues = dataSeries.flatMap(
|
|
299
|
+
(series) => series.cells.flatMap((cell) => cell.range ? [cell.range.low, cell.range.high] : [])
|
|
300
|
+
), meanValue = allDotValues.length > 0 ? allDotValues.reduce((a, b) => a + b, 0) / allDotValues.length : void 0, valueLineValue = (a) => a.value === void 0 || a.value === "mean" ? meanValue : a.value, lo = Number.POSITIVE_INFINITY, hi = Number.NEGATIVE_INFINITY;
|
|
301
|
+
for (let v of [...allDotValues, ...allRangeValues])
|
|
302
|
+
lo = Math.min(lo, v), hi = Math.max(hi, v);
|
|
303
|
+
Number.isFinite(lo) || (lo = 0, hi = 1), (variant === "lollipop" || options.valueAxis?.includeZero) && (lo = Math.min(lo, 0), hi = Math.max(hi, 0));
|
|
304
|
+
for (let a of localAnns) {
|
|
305
|
+
if (a.kind !== "valueLine") continue;
|
|
306
|
+
let v = valueLineValue(a);
|
|
307
|
+
v !== void 0 && (lo = Math.min(lo, v), hi = Math.max(hi, v));
|
|
308
|
+
}
|
|
309
|
+
[lo, hi] = applyAxisBounds([lo, hi], [lo, hi], options.valueAxis, warnings);
|
|
310
|
+
let tickFont = { family: theme.type.family, ...theme.type.axis }, labelFont = { family: theme.type.family, ...theme.type.label }, strongFont = { family: theme.type.family, ...theme.type.label, weight: emphasisWeight(theme) }, textFor = (v, meta, s) => {
|
|
311
|
+
if (meta?.label === !1) return null;
|
|
312
|
+
let base = displayFor(v, meta, s);
|
|
313
|
+
return typeof meta?.label == "string" ? meta.label.replace(/\$\{value\}/g, base) : base;
|
|
314
|
+
}, seriesKeys = /* @__PURE__ */ new Map(), seriesKey = (s) => seriesKeys.get(s) ?? seriesKeys.set(s, { format: s.format, unit: s.unit }).get(s), displayFor = (v, meta, s) => meta?.format ? formatterFromExample(meta.format, options.locale?.language)(v) : (s ? valueSpec.forSeries(seriesKey(s)) : fmt)(v), primarySide = (si, ci, v) => {
|
|
315
|
+
if (variant === "dumbbell" || dataSeries.length === 2) {
|
|
316
|
+
let other = dataSeries[1 - si].cells[ci].v;
|
|
317
|
+
return other === null ? "right" : v < other ? "left" : v > other ? "right" : si === 0 ? "left" : "right";
|
|
318
|
+
}
|
|
319
|
+
return variant === "lollipop" && v < 0 ? "left" : "right";
|
|
320
|
+
}, maxRightW = 0, maxLeftW = 0, leadIndex = dataSeries.findIndex((series) => series.scenario === "AC"), referenceIndex = dataSeries.findIndex((series) => series.scenario === "PY" || series.scenario === "PL" || series.scenario === "FC"), leadSi = leadIndex >= 0 ? leadIndex : referenceIndex >= 0 ? 1 - referenceIndex : 1, pointFont = (cell, si) => cell.range || variant === "dumbbell" && si === leadSi ? strongFont : labelFont, boldLabelIds = /* @__PURE__ */ new Set(), mutedLabelIds = /* @__PURE__ */ new Set();
|
|
321
|
+
labelOn2("point") && cats.forEach((_, ci) => {
|
|
322
|
+
dataSeries.forEach((s, si) => {
|
|
323
|
+
let cell = s.cells[ci];
|
|
324
|
+
if (cell.v === null || cell.range && cell.v >= cell.range.low && cell.v <= cell.range.high) return;
|
|
325
|
+
let text = textFor(cell.v, cell.meta, s);
|
|
326
|
+
if (!text) return;
|
|
327
|
+
let w = measure(text, pointFont(cell, si)).width;
|
|
328
|
+
primarySide(si, ci, cell.v) === "right" ? maxRightW = Math.max(maxRightW, w) : maxLeftW = Math.max(maxLeftW, w);
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
let baseIdentities = dataSeries.map((s) => {
|
|
332
|
+
let { paint, hollow } = rawDotPaint(s, "", null);
|
|
333
|
+
return { id: s.id, label: s.label, paint, key: "marker", ...hollow ? { hollow: !0 } : {} };
|
|
334
|
+
}), identities = new Map(distinguishSeries(
|
|
335
|
+
baseIdentities,
|
|
336
|
+
new Set(dataSeries.filter((s) => s.fill || s.colorRole || highlights.has(s.id)).map((s) => s.id)),
|
|
337
|
+
[{ token: "neutralMark" }, ...dataSeries.map((_, i) => seriesPaint(i, paletteRamp ? options.palette : void 0))],
|
|
338
|
+
theme
|
|
339
|
+
).map((item) => [item.id, item])), occupied = createOccupiedIndex({ x: 0, y: 0, w: size.width, h: size.height }), margin = { ...canvasMargin(theme, size.width), ...options.margin }, legendInput = buildLegend(), frameResult = solveFrame(
|
|
340
|
+
{
|
|
341
|
+
size,
|
|
342
|
+
margin,
|
|
343
|
+
...frameTextOptions(options),
|
|
344
|
+
// The mid-point marker's method note prints on request; the note
|
|
345
|
+
// on rows without a mid-point prints whenever some rows have one.
|
|
346
|
+
footnotes: [
|
|
347
|
+
...authoredNotes(options),
|
|
348
|
+
...midNote ? [disclosureNote(midNote)] : [],
|
|
349
|
+
...options.methodNote === !0 && midsDrawn ? [disclosureNote(chartString(options, "rangeMidNote"))] : []
|
|
350
|
+
],
|
|
351
|
+
legend: legendInput,
|
|
352
|
+
theme,
|
|
353
|
+
measure
|
|
354
|
+
},
|
|
355
|
+
occupied
|
|
356
|
+
), plot0 = frameResult.plot, autoAxis = variant === "lollipop" && options.valueAxis?.show === void 0 && labelOn2("point") && dataSeries.every((s) => s.cells.every((cell) => cell.v === null || textFor(cell.v, cell.meta, s) !== null)), axisShown = autoAxis ? !1 : options.valueAxis?.show !== !1, axisTitle = axisShown && labelOn2("axisTitle") ? planValueAxisTitle(options.axisTitles?.primary, theme, measure, plot0.w) : void 0, annPad = localAnns.length > 0 ? 26 : 8, axisH = axisShown ? measure("0", tickFont).height + 8 + (axisTitle ? axisTitle.height + 2 : 0) : 0;
|
|
357
|
+
fixedPlotChrome(frameResult, annPad + axisH);
|
|
358
|
+
let availH = plotHeightAfter(frameResult, size.height, plot0.h - annPad - axisH), lineH = tickFont.size * 1.2, stepEst = availH / cats.length, openHeight = options[TARGET_SIZE]?.fixed.height === !1, rowHeaders = variant === "dumbbell" && labelOn2("category") && options.rowLabels === void 0 && size.width <= HEADER_ROWS_MAX_WIDTH && (openHeight || stepEst >= 2 * lineH + 8), headerH = rowHeaders ? lineH + 3 : 0, catMaxLines = rowHeaders ? 1 : openHeight ? 1 / 0 : stepEst >= 2 * lineH + 4 ? 2 : 1, capW = rowHeaders ? plot0.w : Math.max(24, plot0.w * 0.28), { labels: catLines, width: catColumnW } = rowLabelBand(cats, tickFont, capW, catMaxLines, lineH, measure, {
|
|
359
|
+
wider: gutterBudget(24, plot0.w),
|
|
360
|
+
target: options.target,
|
|
361
|
+
textScale: textScaleOf(options),
|
|
362
|
+
typeRole: "axis",
|
|
363
|
+
shrink: stepDownFont(theme, tickFont, "axis", options.target, textScaleOf(options)),
|
|
364
|
+
footnoteRefs: { count: authoredFootnoteCount(options), warnings }
|
|
365
|
+
}), air = options[HARD_MINIMUM] === !0 ? 1 : 4, rowHeight = rowHeaders ? measure("0", labelFont).height + headerH + air : Math.max(measure("0", labelFont).height, maxOf(catLines.map((label) => label.h))) + air;
|
|
366
|
+
frameResult.frame.plotMinHeight = Math.max(
|
|
367
|
+
frameResult.frame.plotMinHeight ?? 0,
|
|
368
|
+
size.height + (frameResult.deficit ?? 0) + cats.length * rowHeight - (plot0.h - annPad - axisH)
|
|
369
|
+
);
|
|
370
|
+
let catBandW = rowHeaders ? 0 : catColumnW, catGap = rowHeaders ? 0 : CAT_BAND_GAP, valueBody = {
|
|
371
|
+
x: plot0.x + catBandW + catGap,
|
|
372
|
+
y: plot0.y + annPad,
|
|
373
|
+
w: Math.max(10, plot0.w - catBandW - catGap),
|
|
374
|
+
h: availH
|
|
375
|
+
}, bandFraction = options.bandFraction ?? 0.7, band = bandScale(cats.length, [valueBody.y, valueBody.y + valueBody.h], {
|
|
376
|
+
paddingInner: 1 - bandFraction,
|
|
377
|
+
paddingOuter: (1 - bandFraction) / 2
|
|
378
|
+
}), r = clamp(band.step * 0.22, 2.5, dotRadiusCap(variant, size.width)), midR = Math.max(2.5, r * 0.65), boundLeftW = 0, boundRightW = 0;
|
|
379
|
+
if (options.range?.values === !0)
|
|
380
|
+
for (let s of dataSeries) for (let cell of s.cells)
|
|
381
|
+
cell.v === null || !cell.range || cell.range.low === cell.range.high || (boundLeftW = Math.max(boundLeftW, measure(fmt(cell.range.low), labelFont).width), boundRightW = Math.max(boundRightW, measure(fmt(cell.range.high), labelFont).width));
|
|
382
|
+
let leftReserve = Math.max(r + 2, maxLeftW > 0 ? maxLeftW + LABEL_GAP + r + 8 : 0, boundLeftW > 0 ? boundLeftW + LABEL_GAP + 2 : 0), rightReserve = Math.max(r + 2, maxRightW > 0 ? maxRightW + LABEL_GAP + r + 8 : 0, boundRightW > 0 ? boundRightW + LABEL_GAP + 2 : 0), plot = {
|
|
383
|
+
x: valueBody.x + leftReserve,
|
|
384
|
+
y: valueBody.y,
|
|
385
|
+
w: Math.max(10, valueBody.w - leftReserve - rightReserve),
|
|
386
|
+
h: valueBody.h
|
|
387
|
+
}, [dLo, dHi] = lo === hi ? niceDomain(lo, hi, 5, { dataExtent: [lo, hi], maxWasteFraction: 0.15 }) : [lo, hi], extentValues = [
|
|
388
|
+
...allDotValues,
|
|
389
|
+
...allRangeValues,
|
|
390
|
+
...localAnns.flatMap((ann) => {
|
|
391
|
+
let v = valueLineValue(ann);
|
|
392
|
+
return v === void 0 ? [] : [v];
|
|
393
|
+
}),
|
|
394
|
+
...options.valueAxis?.min !== void 0 ? [options.valueAxis.min] : [],
|
|
395
|
+
...options.valueAxis?.max !== void 0 ? [options.valueAxis.max] : []
|
|
396
|
+
];
|
|
397
|
+
extentValues.length > 0 && extentValues.every((value) => value >= 0) && (dLo = Math.max(0, dLo)), extentValues.length > 0 && extentValues.every((value) => value <= 0) && (dHi = Math.min(0, dHi)), dLo > 0 && warnings.push({
|
|
398
|
+
code: "nonzero-baseline",
|
|
399
|
+
severity: "info",
|
|
400
|
+
message: `value scale starts at ${dLo}, not zero \u2014 legitimate for position encoding (dot chart)`
|
|
401
|
+
});
|
|
402
|
+
let x = linearScale([dLo, dHi], [plot.x, plot.x + plot.w]), nodes = [...frameResult.nodes], marks = { rows: [] }, rangeMarks = [], labelRequests = axisTitle ? [valueAxisTitleRequest(axisTitle, { x: Math.max(plot.x + plot.w, plot0.x + axisTitle.width), y: plot.y + plot.h + 6 + measure("0", tickFont).height + 2 }, "end", "axis:x:title")] : [], pointSeats = [], ownSideSeats = /* @__PURE__ */ new Map(), placedAnnotations = [];
|
|
403
|
+
cats.forEach((cat, ci) => {
|
|
404
|
+
if (!highlights.has(cat.id) || restRecedes) return;
|
|
405
|
+
let gapHalf = (band.step - band.bandwidth) / 2;
|
|
406
|
+
nodes.push({
|
|
407
|
+
t: "rect",
|
|
408
|
+
id: `rowTint:${cat.id}`,
|
|
409
|
+
rect: {
|
|
410
|
+
x: valueBody.x,
|
|
411
|
+
y: Math.max(valueBody.y, band.position(ci) - gapHalf),
|
|
412
|
+
w: valueBody.w,
|
|
413
|
+
h: Math.min(band.step, valueBody.y + valueBody.h - (band.position(ci) - gapHalf))
|
|
414
|
+
},
|
|
415
|
+
fill: { token: "others" },
|
|
416
|
+
owner: { categoryId: cat.id },
|
|
417
|
+
part: "rowTint"
|
|
418
|
+
});
|
|
419
|
+
});
|
|
420
|
+
let axes = [], axisAt = nodes.length, valueAxis, gridOn = options.valueAxis?.gridlines ?? variant !== "lollipop";
|
|
421
|
+
if (axisShown) {
|
|
422
|
+
let axisResult = layoutValueAxis(
|
|
423
|
+
{
|
|
424
|
+
scale: x,
|
|
425
|
+
plot,
|
|
426
|
+
orient: "x",
|
|
427
|
+
gridlines: gridOn,
|
|
428
|
+
format: fmt,
|
|
429
|
+
formatSpec: valueSpec.spec,
|
|
430
|
+
theme,
|
|
431
|
+
measure,
|
|
432
|
+
canvasWidth: size.width
|
|
433
|
+
},
|
|
434
|
+
occupied
|
|
435
|
+
);
|
|
436
|
+
nodes.push(...axisResult.nodes), axes.push(axisResult.axis), valueAxis = axisResult.axis;
|
|
437
|
+
}
|
|
438
|
+
let baselineId = dLo <= 0 && dHi >= 0 ? "axis:baseline" : void 0;
|
|
439
|
+
if (baselineId) {
|
|
440
|
+
let baselineX = x(0);
|
|
441
|
+
nodes.push({
|
|
442
|
+
t: "line",
|
|
443
|
+
id: baselineId,
|
|
444
|
+
x1: baselineX,
|
|
445
|
+
y1: plot.y,
|
|
446
|
+
x2: baselineX,
|
|
447
|
+
y2: plot.y + plot.h,
|
|
448
|
+
stroke: { token: "axis" },
|
|
449
|
+
width: strokeToken(theme, "rule"),
|
|
450
|
+
owner: {},
|
|
451
|
+
part: "baseline"
|
|
452
|
+
}), occupied.claim({ x: baselineX - 1, y: plot.y, w: 2, h: plot.h }, "axis", {});
|
|
453
|
+
}
|
|
454
|
+
let anchorByDot = /* @__PURE__ */ new Map(), keyValues = cats.map((_, ci) => sortKey(ci)), maxKey = maxOf(keyValues), minKey = minOf(keyValues), bonus = (catId, seriesId) => highlights.has(catId) || seriesId !== void 0 && highlights.has(seriesId) ? PRIORITY.highlightBonus : 0, rowBasePriority = (ci, v) => ci === 0 || ci === cats.length - 1 ? PRIORITY.endpoint : keyValues[ci] === maxKey || keyValues[ci] === minKey ? PRIORITY.extreme : PRIORITY.interior + Math.min(99, Math.abs(v));
|
|
455
|
+
cats.forEach((cat, ci) => {
|
|
456
|
+
let cy = band.position(ci) + band.bandwidth / 2 + headerH / 2, row = { categoryId: cat.id, dots: [] }, rowSceneStart = nodes.length;
|
|
457
|
+
if (variant === "dumbbell") {
|
|
458
|
+
let a = dataSeries[0].cells[ci].v, b = dataSeries[1].cells[ci].v;
|
|
459
|
+
if (a !== null && b !== null) {
|
|
460
|
+
let xa = x(a), xb = x(b), nodeId = `connector:${cat.id}`, head = options.arrow === !0 && Math.abs(xb - xa) >= 2 * r + 6, toward = Math.sign(xb - xa), declared = dataSeries[1].direction, stroke = options.arrow && declared && b !== a ? { token: b > a == (declared === "higherIsBetter") ? "good" : "bad" } : CONNECTOR_PAINT, tip = xb - toward * (r + 1), arrowWidth = strokeToken(theme, "data");
|
|
461
|
+
nodes.push({
|
|
462
|
+
t: "line",
|
|
463
|
+
id: nodeId,
|
|
464
|
+
x1: xa,
|
|
465
|
+
y1: cy,
|
|
466
|
+
x2: head ? tip - toward * arrowShaftEnd(ARROW_HEAD, arrowWidth) : xb,
|
|
467
|
+
y2: cy,
|
|
468
|
+
stroke,
|
|
469
|
+
// The connector carries the gap: the focus width.
|
|
470
|
+
width: options.arrow ? arrowWidth : strokeToken(theme, "focus"),
|
|
471
|
+
owner: { categoryId: cat.id },
|
|
472
|
+
part: "connector"
|
|
473
|
+
}), head && nodes.push({
|
|
474
|
+
t: "path",
|
|
475
|
+
id: `${nodeId}:head`,
|
|
476
|
+
d: arrowHeadPath({ x: tip, y: cy }, toward > 0 ? 0 : Math.PI, ARROW_HEAD),
|
|
477
|
+
fill: stroke,
|
|
478
|
+
owner: { categoryId: cat.id },
|
|
479
|
+
part: "arrowHead"
|
|
480
|
+
}), occupied.claim(
|
|
481
|
+
{ x: Math.min(xa, xb), y: cy - 1.5, w: Math.max(Math.abs(xb - xa), 0.5), h: 3 },
|
|
482
|
+
"mark",
|
|
483
|
+
{ seriesId: "__connector", categoryId: cat.id }
|
|
484
|
+
), row.connectorNodeId = nodeId;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
let mergedLabel = !1;
|
|
488
|
+
if (variant === "dumbbell" && labelOn2("point")) {
|
|
489
|
+
let sa = dataSeries[0], sb = dataSeries[1], ca = sa.cells[ci], cb = sb.cells[ci];
|
|
490
|
+
if (ca.v !== null && cb.v !== null && Math.abs(x(ca.v) - x(cb.v)) < 2 * r + 2) {
|
|
491
|
+
let ta = textFor(ca.v, ca.meta, sa), tb = textFor(cb.v, cb.meta, sb);
|
|
492
|
+
if (ta && tb && ta === tb) {
|
|
493
|
+
mergedLabel = !0;
|
|
494
|
+
let text = pairText(ta, tb, options), tsize = measure(text, labelFont), leftX = Math.min(x(ca.v), x(cb.v)), rightX = Math.max(x(ca.v), x(cb.v)), midX = (leftX + rightX) / 2, ty = cy - tsize.height / 2;
|
|
495
|
+
labelRequests.push({
|
|
496
|
+
id: `point:${cat.id}`,
|
|
497
|
+
kind: "point",
|
|
498
|
+
role: composedTextRole(text),
|
|
499
|
+
owner: { categoryId: cat.id },
|
|
500
|
+
text,
|
|
501
|
+
lines: [text],
|
|
502
|
+
typeRole: "label",
|
|
503
|
+
font: labelFont,
|
|
504
|
+
priority: Math.max(
|
|
505
|
+
ca.meta?.priority ?? rowBasePriority(ci, ca.v) + bonus(cat.id, sa.id),
|
|
506
|
+
cb.meta?.priority ?? rowBasePriority(ci, cb.v) + bonus(cat.id, sb.id)
|
|
507
|
+
),
|
|
508
|
+
candidates: insidePlotFirst([
|
|
509
|
+
{
|
|
510
|
+
slot: "left",
|
|
511
|
+
rect: { x: leftX - r - LABEL_GAP - tsize.width, y: ty, w: tsize.width, h: tsize.height },
|
|
512
|
+
penalty: 0
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
slot: "right",
|
|
516
|
+
rect: { x: rightX + r + LABEL_GAP, y: ty, w: tsize.width, h: tsize.height },
|
|
517
|
+
penalty: 1
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
slot: "above",
|
|
521
|
+
rect: { x: midX - tsize.width / 2, y: cy - r - 3 - tsize.height, w: tsize.width, h: tsize.height },
|
|
522
|
+
penalty: 2
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
slot: "below",
|
|
526
|
+
rect: { x: midX - tsize.width / 2, y: cy + r + 3, w: tsize.width, h: tsize.height },
|
|
527
|
+
penalty: 3
|
|
528
|
+
}
|
|
529
|
+
])
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
dataSeries.forEach((s, si) => {
|
|
535
|
+
let cell = s.cells[ci], v = cell.v;
|
|
536
|
+
if (v === null) return;
|
|
537
|
+
let cx = x(v), owner = { seriesId: s.id, categoryId: cat.id };
|
|
538
|
+
if (cell.range) {
|
|
539
|
+
let lowX = x(cell.range.low), highX = x(cell.range.high), capHalf = cell.range.low === cell.range.high ? Math.max(r + 3, Math.min(8, band.bandwidth * 0.3)) : Math.max(2.5, Math.min(5, band.bandwidth * 0.22)), railId = `range:${s.id}:${cat.id}:rail`, lowId = `range:${s.id}:${cat.id}:low`, highId = `range:${s.id}:${cat.id}:high`, nodeIds = [railId, lowId, highId];
|
|
540
|
+
if (nodes.push(
|
|
541
|
+
{
|
|
542
|
+
t: "line",
|
|
543
|
+
id: railId,
|
|
544
|
+
x1: lowX,
|
|
545
|
+
y1: cy,
|
|
546
|
+
x2: highX,
|
|
547
|
+
y2: cy,
|
|
548
|
+
stroke: RAIL_PAINT,
|
|
549
|
+
width: strokeToken(theme, "focus"),
|
|
550
|
+
owner,
|
|
551
|
+
part: "rangeRail"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
t: "line",
|
|
555
|
+
id: lowId,
|
|
556
|
+
x1: lowX,
|
|
557
|
+
y1: cy - capHalf,
|
|
558
|
+
x2: lowX,
|
|
559
|
+
y2: cy + capHalf,
|
|
560
|
+
stroke: CAP_PAINT,
|
|
561
|
+
width: strokeToken(theme, "mark"),
|
|
562
|
+
owner,
|
|
563
|
+
part: "rangeCap",
|
|
564
|
+
display: { value: fmt(cell.range.low) }
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
t: "line",
|
|
568
|
+
id: highId,
|
|
569
|
+
x1: highX,
|
|
570
|
+
y1: cy - capHalf,
|
|
571
|
+
x2: highX,
|
|
572
|
+
y2: cy + capHalf,
|
|
573
|
+
stroke: CAP_PAINT,
|
|
574
|
+
width: strokeToken(theme, "mark"),
|
|
575
|
+
owner,
|
|
576
|
+
part: "rangeCap",
|
|
577
|
+
display: { value: fmt(cell.range.high) }
|
|
578
|
+
}
|
|
579
|
+
), cell.range.mid !== void 0) {
|
|
580
|
+
let midId = `range:${s.id}:${cat.id}:mid`;
|
|
581
|
+
nodes.push({
|
|
582
|
+
t: "circle",
|
|
583
|
+
id: midId,
|
|
584
|
+
cx: x(cell.range.mid),
|
|
585
|
+
cy,
|
|
586
|
+
r: midR,
|
|
587
|
+
fill: { token: "background" },
|
|
588
|
+
stroke: { token: "inkMuted" },
|
|
589
|
+
strokeWidth: strokeToken(theme, "mark"),
|
|
590
|
+
owner,
|
|
591
|
+
part: "rangeMid",
|
|
592
|
+
display: { value: fmt(cell.range.mid) }
|
|
593
|
+
}), nodeIds.push(midId);
|
|
594
|
+
}
|
|
595
|
+
if (occupied.claim(
|
|
596
|
+
{
|
|
597
|
+
x: Math.min(lowX, highX) - 1,
|
|
598
|
+
y: cy - capHalf - 1,
|
|
599
|
+
w: Math.max(Math.abs(highX - lowX) + 2, 2),
|
|
600
|
+
h: capHalf * 2 + 2
|
|
601
|
+
},
|
|
602
|
+
"mark",
|
|
603
|
+
{ seriesId: `__range:${s.id}`, categoryId: cat.id },
|
|
604
|
+
"range"
|
|
605
|
+
), options.range?.values === !0 && cell.range.low !== cell.range.high)
|
|
606
|
+
for (let [end, capX, value] of [["low", Math.min(lowX, highX), cell.range.low], ["high", Math.max(lowX, highX), cell.range.high]]) {
|
|
607
|
+
let text = fmt(value), size2 = measure(text, labelFont), side = (dx) => ({ x: dx, y: cy - size2.height / 2, w: size2.width, h: size2.height });
|
|
608
|
+
labelRequests.push({
|
|
609
|
+
id: `rangeValue:${s.id}:${cat.id}:${end}`,
|
|
610
|
+
kind: "point",
|
|
611
|
+
role: composedTextRole(text),
|
|
612
|
+
owner: { categoryId: cat.id, seriesId: `__range:${s.id}` },
|
|
613
|
+
text,
|
|
614
|
+
lines: [text],
|
|
615
|
+
typeRole: "label",
|
|
616
|
+
font: labelFont,
|
|
617
|
+
priority: PRIORITY.interior,
|
|
618
|
+
candidates: [
|
|
619
|
+
{ slot: end === "low" ? "leftOfCap" : "rightOfCap", rect: side(end === "low" ? capX - LABEL_GAP - size2.width : capX + LABEL_GAP), penalty: 0 },
|
|
620
|
+
// Inside the range under or over the rail, where a bound on the plot edge still fits.
|
|
621
|
+
{ slot: "belowCap", rect: { x: end === "low" ? capX + 4 : capX - 4 - size2.width, y: cy + capHalf + 2, w: size2.width, h: size2.height }, penalty: 1 },
|
|
622
|
+
{ slot: "aboveCap", rect: { x: end === "low" ? capX + 4 : capX - 4 - size2.width, y: cy - capHalf - 2 - size2.height, w: size2.width, h: size2.height }, penalty: 2 }
|
|
623
|
+
]
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
rangeMarks.push({
|
|
627
|
+
seriesId: s.id,
|
|
628
|
+
categoryId: cat.id,
|
|
629
|
+
low: cell.range.low,
|
|
630
|
+
high: cell.range.high,
|
|
631
|
+
...cell.range.mid === void 0 ? {} : { mid: cell.range.mid },
|
|
632
|
+
nodeIds
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
if (variant === "lollipop") {
|
|
636
|
+
let x0 = x(0), stemId = `stem:${cat.id}`;
|
|
637
|
+
nodes.push({
|
|
638
|
+
t: "line",
|
|
639
|
+
id: stemId,
|
|
640
|
+
x1: x0,
|
|
641
|
+
y1: cy,
|
|
642
|
+
x2: cx,
|
|
643
|
+
y2: cy,
|
|
644
|
+
stroke: dotPaint(s, cat.id, cell.meta).paint,
|
|
645
|
+
// The stem is the bar of the lollipop: the data width.
|
|
646
|
+
width: strokeToken(theme, "data"),
|
|
647
|
+
owner,
|
|
648
|
+
part: "stem"
|
|
649
|
+
}), occupied.claim(
|
|
650
|
+
{ x: Math.min(x0, cx), y: cy - 1, w: Math.max(Math.abs(cx - x0), 0.5), h: 2 },
|
|
651
|
+
"mark",
|
|
652
|
+
owner
|
|
653
|
+
), row.stemNodeId = stemId;
|
|
654
|
+
}
|
|
655
|
+
let { paint, hollow } = dotPaint(s, cat.id, cell.meta), nodeId = `dot:${s.id}:${cat.id}`;
|
|
656
|
+
if (nodes.push({
|
|
657
|
+
t: "circle",
|
|
658
|
+
id: nodeId,
|
|
659
|
+
cx,
|
|
660
|
+
cy,
|
|
661
|
+
r,
|
|
662
|
+
// PL (plan) etc. render hollow: background fill + series-colored ring
|
|
663
|
+
fill: hollow ? { token: "background" } : paint,
|
|
664
|
+
// A dot on a range keeps a page-coloured ring, apart from a mid-point marker under it.
|
|
665
|
+
stroke: hollow ? paint : cell.range ? { token: "background" } : void 0,
|
|
666
|
+
strokeWidth: hollow ? strokeToken(theme, "mark") : strokeToken(theme, "rule"),
|
|
667
|
+
owner,
|
|
668
|
+
part: "dot",
|
|
669
|
+
display: { value: displayFor(v, cell.meta, s) }
|
|
670
|
+
}), occupied.claim({ x: cx - r, y: cy - r, w: 2 * r, h: 2 * r }, "mark", owner), row.dots.push({ seriesId: s.id, cx, cy, nodeId }), anchorByDot.set(`${cat.id}:${s.id}`, {
|
|
671
|
+
x: cx,
|
|
672
|
+
y: cy,
|
|
673
|
+
value: v,
|
|
674
|
+
format: s.format,
|
|
675
|
+
label: cat.label ?? cat.id,
|
|
676
|
+
...cat.date === void 0 ? {} : { date: cat.date },
|
|
677
|
+
owner
|
|
678
|
+
}), labelOn2("point") && !mergedLabel) {
|
|
679
|
+
let text = textFor(v, cell.meta, s);
|
|
680
|
+
if (text) {
|
|
681
|
+
let font = pointFont(cell, si);
|
|
682
|
+
font === strongFont ? boldLabelIds.add(`point:${s.id}:${cat.id}`) : variant === "dumbbell" && mutedLabelIds.add(`point:${s.id}:${cat.id}`);
|
|
683
|
+
let tsize = measure(text, font), primary = primarySide(si, ci, v), request = {
|
|
684
|
+
id: `point:${s.id}:${cat.id}`,
|
|
685
|
+
kind: "point",
|
|
686
|
+
owner,
|
|
687
|
+
text,
|
|
688
|
+
lines: [text],
|
|
689
|
+
typeRole: "label",
|
|
690
|
+
font,
|
|
691
|
+
priority: cell.meta?.priority ?? rowBasePriority(ci, v) + bonus(cat.id, s.id),
|
|
692
|
+
candidates: []
|
|
693
|
+
};
|
|
694
|
+
labelRequests.push(request), pointSeats.push(() => {
|
|
695
|
+
request.candidates = dotCandidates(cx, cy, tsize, primary, owner), variant === "dumbbell" && ownSideSeats.set(request.id, request.candidates[0]);
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
let rowNodes = nodes.splice(rowSceneStart), rangeNodes = rowNodes.filter(
|
|
701
|
+
(node) => node.part === "rangeRail" || node.part === "rangeCap" || node.part === "rangeMid"
|
|
702
|
+
), foregroundNodes = rowNodes.filter(
|
|
703
|
+
(node) => node.part !== "rangeRail" && node.part !== "rangeCap" && node.part !== "rangeMid"
|
|
704
|
+
);
|
|
705
|
+
if (pushAll(nodes, rangeNodes), pushAll(nodes, foregroundNodes), marks.rows.push(row), labelOn2("category")) {
|
|
706
|
+
let cl = catLines[ci];
|
|
707
|
+
labelRequests.push({
|
|
708
|
+
id: `category:${cat.id}`,
|
|
709
|
+
kind: "category",
|
|
710
|
+
owner: { categoryId: cat.id },
|
|
711
|
+
text: cat.label,
|
|
712
|
+
...fittedLabel(cl, tickFont),
|
|
713
|
+
typeRole: "axis",
|
|
714
|
+
font: tickFont,
|
|
715
|
+
priority: PRIORITY.endpoint + bonus(cat.id),
|
|
716
|
+
candidates: [
|
|
717
|
+
{
|
|
718
|
+
slot: "left",
|
|
719
|
+
// A header clears the value labels beside its pair, solver padding included.
|
|
720
|
+
rect: rowHeaders ? { x: plot0.x, y: cy - Math.max(r, measure("0", labelFont).height / 2) - 3 - cl.h, w: cl.w, h: cl.h } : {
|
|
721
|
+
// Names sit right-aligned against the axis by default.
|
|
722
|
+
x: rowLabelX(plot0.x, catBandW, cl.w, options.rowLabels?.align ?? "right"),
|
|
723
|
+
y: cy - cl.h / 2,
|
|
724
|
+
w: cl.w,
|
|
725
|
+
h: cl.h
|
|
726
|
+
},
|
|
727
|
+
penalty: 0
|
|
728
|
+
}
|
|
729
|
+
]
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
}), rangeMarks.length > 0 && (marks.ranges = rangeMarks);
|
|
733
|
+
let lineXs = [];
|
|
734
|
+
for (let ann of localAnns) {
|
|
735
|
+
if (ann.kind !== "valueLine") continue;
|
|
736
|
+
let id = ann.id, annFmt = ann.format ? formatterFromExample(ann.format, options.locale?.language) : referenceFmt, v = valueLineValue(ann);
|
|
737
|
+
if (v === void 0) {
|
|
738
|
+
warnings.push({
|
|
739
|
+
code: "no-mean",
|
|
740
|
+
severity: "warn",
|
|
741
|
+
message: `valueLine '${id}': no mean available`
|
|
742
|
+
});
|
|
743
|
+
continue;
|
|
744
|
+
}
|
|
745
|
+
let vx = x(v), lineId = `ann:${id}:line`;
|
|
746
|
+
nodes.push({
|
|
747
|
+
t: "line",
|
|
748
|
+
id: lineId,
|
|
749
|
+
x1: vx,
|
|
750
|
+
y1: plot.y,
|
|
751
|
+
x2: vx,
|
|
752
|
+
y2: plot.y + plot.h,
|
|
753
|
+
stroke: { token: "ink" },
|
|
754
|
+
width: strokeToken(theme, "rule"),
|
|
755
|
+
dash: dashToken(theme, "reference"),
|
|
756
|
+
owner: { annotationId: id },
|
|
757
|
+
part: "valueLine"
|
|
758
|
+
}), occupied.claim({ x: vx - 0.5, y: plot.y, w: 1, h: plot.h }, "annotation", { annotationId: id }, "referenceLine");
|
|
759
|
+
let isMean = ann.value === void 0 || ann.value === "mean", valueText = annFmt(v), labelText = ann.label === !1 ? "" : ann.label === void 0 ? isMean ? `${averageWord} ${valueText}` : valueText : averageIds.has(id) ? ann.label : namedLineText(ann.label, valueText, v, id);
|
|
760
|
+
if (lineXs.push(vx), labelText) {
|
|
761
|
+
let lines = labelText.split(`
|
|
762
|
+
`), w = Math.max(...lines.map((l) => measure(l, strongFont).width)), h = lines.length * measure("X", strongFont).height;
|
|
763
|
+
labelRequests.push({
|
|
764
|
+
id: `valueLine:${id}`,
|
|
765
|
+
kind: "valueLine",
|
|
766
|
+
role: composedTextRole(labelText),
|
|
767
|
+
owner: { annotationId: id },
|
|
768
|
+
text: labelText,
|
|
769
|
+
lines,
|
|
770
|
+
typeRole: "label",
|
|
771
|
+
font: strongFont,
|
|
772
|
+
priority: ann.priority ?? PRIORITY.valueLine,
|
|
773
|
+
candidates: [
|
|
774
|
+
{ slot: "aboveLine", rect: { x: vx - w / 2, y: plot.y - h - 6, w, h }, penalty: 0 },
|
|
775
|
+
{ slot: "aboveLineLeft", rect: { x: vx - w - 4, y: plot.y - h - 6, w, h }, penalty: 1 },
|
|
776
|
+
{ slot: "aboveLineRight", rect: { x: vx + 4, y: plot.y - h - 6, w, h }, penalty: 2 }
|
|
777
|
+
]
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
placedAnnotations.push({
|
|
781
|
+
id,
|
|
782
|
+
kind: "valueLine",
|
|
783
|
+
computedText: labelText,
|
|
784
|
+
valueText,
|
|
785
|
+
nodeIds: [lineId],
|
|
786
|
+
labelId: labelText ? `valueLine:${id}` : void 0
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
for (let seat of pointSeats) seat();
|
|
790
|
+
let solveCtx = labelCtx(theme, size, options, {
|
|
791
|
+
measure,
|
|
792
|
+
plot,
|
|
793
|
+
labelPad: 2
|
|
794
|
+
}), solved = solveLabels(labelRequests, occupied, solveCtx);
|
|
795
|
+
if (applyValueAxisTitleInk(solved.placed), autoAxis && solved.placed.some((label) => label.kind === "point" && label.hidden !== void 0 && label.hidden !== "redundant"))
|
|
796
|
+
return layoutDot(data, { ...options, valueAxis: { ...options.valueAxis, show: !0 } });
|
|
797
|
+
if (pushAll(warnings, solved.warnings), valueAxis && !gridOn && options.valueAxis?.gridlines === void 0 && solved.placed.some((label) => label.kind === "point" && label.hidden !== void 0 && label.hidden !== "redundant")) {
|
|
798
|
+
let grid = valueAxis.ticks.flatMap((tick, seq) => tick.at === 0 ? [] : (tick.gridNodeId = `axis:x:grid:${seq}`, [{
|
|
799
|
+
t: "line",
|
|
800
|
+
id: tick.gridNodeId,
|
|
801
|
+
x1: tick.pos,
|
|
802
|
+
y1: plot.y,
|
|
803
|
+
x2: tick.pos,
|
|
804
|
+
y2: plot.y + plot.h,
|
|
805
|
+
stroke: { token: "grid" },
|
|
806
|
+
width: strokeToken(theme, "hair"),
|
|
807
|
+
...gridDash(theme),
|
|
808
|
+
owner: {},
|
|
809
|
+
part: "gridline"
|
|
810
|
+
}]));
|
|
811
|
+
nodes.splice(axisAt, 0, ...grid);
|
|
812
|
+
}
|
|
813
|
+
for (let label of solved.placed)
|
|
814
|
+
label.kind === "point" && ((label.id.startsWith("rangeValue:") || mutedLabelIds.has(label.id)) && (label.ink = { token: "inkMuted" }), gridOn && axisShown && (label.halo = !0));
|
|
815
|
+
if (variant === "dumbbell")
|
|
816
|
+
for (let label of solved.placed) {
|
|
817
|
+
let seat = ownSideSeats.get(label.id);
|
|
818
|
+
!seat || label.hidden || label.slot === seat.slot || label.slot === `${seat.slot}Past` || seat.rect.x < 0 || seat.rect.x + seat.rect.w > size.width || occupied.hitsWhich(seat.rect, solveCtx.labelPad).some((claim) => claim.part !== "referenceLine" && !(claim.kind === "mark" && isOwnMark(claim.owner, label.owner, "point", claim.part)) && !(claim.kind === "label" && claim.owner.seriesId === label.owner.seriesId && claim.owner.categoryId === label.owner.categoryId)) || (label.rect = { ...seat.rect }, label.slot = seat.slot, delete label.leader, label.halo = !0, occupied.claim(seat.rect, "label", label.owner));
|
|
819
|
+
}
|
|
820
|
+
let lineGaps = [];
|
|
821
|
+
for (let label of solved.placed) {
|
|
822
|
+
if (label.hidden || label.kind !== "point") continue;
|
|
823
|
+
if (variant === "dumbbell" && ownSideSeats.has(label.id)) {
|
|
824
|
+
lineXs.some((lineX) => lineX > label.rect.x - LINE_CLEAR && lineX < label.rect.x + label.rect.w + LINE_CLEAR) && (label.halo = !0, lineGaps.push(label.rect));
|
|
825
|
+
continue;
|
|
826
|
+
}
|
|
827
|
+
let lx = lineXs.find((lineX) => lineX > label.rect.x - LINE_CLEAR && lineX < label.rect.x + label.rect.w + LINE_CLEAR);
|
|
828
|
+
if (lx === void 0) continue;
|
|
829
|
+
let dot = anchorByDot.get(`${label.owner.categoryId}:${label.owner.seriesId}`);
|
|
830
|
+
dot && dot.x < lx && label.rect.x > dot.x ? label.rect = { ...label.rect, x: lx + LINE_CLEAR } : dot && dot.x > lx && label.rect.x < dot.x ? label.rect = { ...label.rect, x: lx - LINE_CLEAR - label.rect.w } : (label.halo = !0, lineGaps.push(label.rect));
|
|
831
|
+
}
|
|
832
|
+
breakLinesAtLabels();
|
|
833
|
+
let resolve = (ref) => {
|
|
834
|
+
let norm = typeof ref == "string" ? { categoryId: ref, edge: "total" } : ref;
|
|
835
|
+
if (!("categoryId" in norm)) return null;
|
|
836
|
+
if (norm.seriesId) return anchorByDot.get(`${norm.categoryId}:${norm.seriesId}`) ?? null;
|
|
837
|
+
let order = variant === "dumbbell" ? [...dataSeries].reverse() : dataSeries;
|
|
838
|
+
for (let s of order) {
|
|
839
|
+
let hit = anchorByDot.get(`${norm.categoryId}:${s.id}`);
|
|
840
|
+
if (hit) return hit;
|
|
841
|
+
}
|
|
842
|
+
return null;
|
|
843
|
+
}, withPrinted = (anchor) => {
|
|
844
|
+
if (!anchor) return null;
|
|
845
|
+
let label = solved.placed.find((placed) => placed.id === `point:${anchor.owner.seriesId}:${anchor.owner.categoryId}` && !placed.hidden);
|
|
846
|
+
if (!label) return anchor;
|
|
847
|
+
let dot = { x: anchor.x - r, y: anchor.y - r, w: 2 * r, h: 2 * r };
|
|
848
|
+
return { ...anchor, printed: { text: label.text, box: unionRect(dot, label.rect) } };
|
|
849
|
+
}, annResult = runAnnotatePass({
|
|
850
|
+
target: options.target,
|
|
851
|
+
annotations: passAnns,
|
|
852
|
+
resolve: (ref) => withPrinted(resolve(ref)),
|
|
853
|
+
deltaAcrossRows: !0,
|
|
854
|
+
valueAxis: "horizontal",
|
|
855
|
+
defaultSpan: cats.length >= 2 ? { from: cats[0].id, to: cats[cats.length - 1].id } : void 0,
|
|
856
|
+
occupied,
|
|
857
|
+
plot,
|
|
858
|
+
theme,
|
|
859
|
+
measure,
|
|
860
|
+
format: options.format,
|
|
861
|
+
locale: options.locale?.language,
|
|
862
|
+
strings: options.strings,
|
|
863
|
+
solveCtx,
|
|
864
|
+
meanValue
|
|
865
|
+
});
|
|
866
|
+
pushAll(warnings, annResult.warnings);
|
|
867
|
+
let allLabels = [...solved.placed, ...annResult.labels];
|
|
868
|
+
pushAll(nodes, annResult.nodes), pushAll(
|
|
869
|
+
nodes,
|
|
870
|
+
labelsToNodes(
|
|
871
|
+
theme,
|
|
872
|
+
allLabels,
|
|
873
|
+
(l) => l.kind === "category" ? tickFont : l.kind === "annotation" || l.kind === "valueLine" || boldLabelIds.has(l.id) ? strongFont : labelFont
|
|
874
|
+
)
|
|
875
|
+
);
|
|
876
|
+
let variantWord = variant === "dumbbell" ? chartString(options, "dumbbellName") : variant === "lollipop" ? chartString(options, "lollipopName") : chartString(options, "clevelandName"), a11yDesc = cats.map((c, ci) => {
|
|
877
|
+
let vals = dataSeries.map((s) => {
|
|
878
|
+
let v = s.cells[ci].v;
|
|
879
|
+
if (v === null) return null;
|
|
880
|
+
let range = s.cells[ci].range, cell = s.cells[ci], text = textFor(v, cell.meta, s) ?? displayFor(v, cell.meta, s), value = dataSeries.length > 1 ? `${s.label} ${text}` : text;
|
|
881
|
+
return range ? chartString(options, "dotRangeDesc", { v1: value, v2: fmt(range.low), v3: fmt(range.high), v4: range.mid === void 0 ? "" : chartString(options, "midpointClause", { v1: fmt(range.mid) }) }) : value;
|
|
882
|
+
}).filter((t) => t !== null).join(", ");
|
|
883
|
+
return `${c.label} ${vals}`;
|
|
884
|
+
}).join("; "), geometry = {
|
|
885
|
+
type: "dot",
|
|
886
|
+
size,
|
|
887
|
+
plot,
|
|
888
|
+
scene: nodes,
|
|
889
|
+
labels: allLabels,
|
|
890
|
+
axes: [
|
|
891
|
+
{
|
|
892
|
+
axis: "y",
|
|
893
|
+
...baselineId ? { baselineNodeId: baselineId } : {},
|
|
894
|
+
ticks: cats.map((c, i) => ({ at: c.id, pos: band.center(i) + headerH / 2, labelId: `category:${c.id}` }))
|
|
895
|
+
},
|
|
896
|
+
...axes
|
|
897
|
+
],
|
|
898
|
+
annotations: [...placedAnnotations, ...annResult.placed],
|
|
899
|
+
legend: frameResult.legend,
|
|
900
|
+
frame: frameResult.frame,
|
|
901
|
+
marks,
|
|
902
|
+
derived: gaps ? { gaps } : {},
|
|
903
|
+
a11y: {
|
|
904
|
+
titleCounts: [structureCount("categories", cats.length, void 0, options)],
|
|
905
|
+
title: accessibleTitle(options.title, chartString(options, "dotTitle", { v1: variantWord, v2: cats.length })),
|
|
906
|
+
counts: [structureCount("series", dataSeries.length, void 0, options)],
|
|
907
|
+
desc: chartString(options, "dotDesc", { v1: variantWord, v2: dataSeries.length, v3: a11yDesc })
|
|
908
|
+
},
|
|
909
|
+
warnings,
|
|
910
|
+
debug: {
|
|
911
|
+
occupied: occupied.snapshot(),
|
|
912
|
+
decisions: [...solved.decisions, ...annResult.decisions]
|
|
913
|
+
}
|
|
914
|
+
}, contentPlot = rowPitchPlot();
|
|
915
|
+
return contentPlot && (geometry[CONTENT_PLOT_HEIGHT] = contentPlot), geometry;
|
|
916
|
+
function breakLinesAtLabels() {
|
|
917
|
+
if (lineGaps.length !== 0)
|
|
918
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
919
|
+
let node = nodes[i];
|
|
920
|
+
if (node.t !== "line" || node.part !== "valueLine" || Math.abs(node.x1 - node.x2) > 1e-6) continue;
|
|
921
|
+
let lx = node.x1, from = Math.min(node.y1, node.y2), to = Math.max(node.y1, node.y2), cuts = lineGaps.filter((rect) => lx > rect.x - LINE_CLEAR && lx < rect.x + rect.w + LINE_CLEAR).map((rect) => [rect.y - REFERENCE_LABEL_CLEARANCE, rect.y + rect.h + REFERENCE_LABEL_CLEARANCE]).sort((a, b) => a[0] - b[0]);
|
|
922
|
+
if (cuts.length === 0) continue;
|
|
923
|
+
let runs = [], start = from;
|
|
924
|
+
for (let [c0, c1] of cuts)
|
|
925
|
+
c0 > start && runs.push([start, Math.min(c0, to)]), start = Math.max(start, c1);
|
|
926
|
+
start < to && runs.push([start, to]);
|
|
927
|
+
let drawn = runs.filter(([a, b]) => b - a >= 1);
|
|
928
|
+
if (drawn.length === 0) continue;
|
|
929
|
+
let { x1: _x1, y1: _y1, x2: _x2, y2: _y2, t: _t, ...rest } = node;
|
|
930
|
+
nodes[i] = { ...rest, t: "path", d: drawn.map(([a, b]) => `M${round2(lx)} ${round2(a)}L${round2(lx)} ${round2(b)}`).join("") };
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
function rowPitchPlot() {
|
|
934
|
+
if (!openHeight || (options.mode ?? "full") === "compact" || cats.length === 0) return;
|
|
935
|
+
let pitch = rowHeaders ? headerRowPitch(size.width) : ROW_PITCH_CAP[variant][size.width >= NARROW_PITCH_WIDTH ? 0 : 1];
|
|
936
|
+
return { px: cats.length * pitch, exact: rowHeaders };
|
|
937
|
+
}
|
|
938
|
+
function dotPaint(s, catId, meta) {
|
|
939
|
+
let raw = rawDotPaint(s, catId, meta);
|
|
940
|
+
return { ...raw, paint: meta?.fill || meta?.scenario || highlights.has(catId) ? raw.paint : identities.get(s.id).paint };
|
|
941
|
+
}
|
|
942
|
+
function scenarioEnds() {
|
|
943
|
+
let ramp = paletteRamp ? options.palette : void 0, lead = paintColor(theme, seriesPaint(0, ramp));
|
|
944
|
+
if ((hueSaturation(lead)?.saturation ?? 1) >= GREY_SATURATION) return !1;
|
|
945
|
+
let py = dataSeries.find((d) => d.scenario === "PY"), ac = dataSeries.find((d) => d !== py);
|
|
946
|
+
return !py || !ac ? !1 : palettePerceptualDistance(paintColor(theme, seriesPaint(py.slot, ramp, "PY")), paintColor(theme, seriesPaint(ac.slot, ramp, ac.scenario ?? "AC"))) > palettePerceptualDistance(paintColor(theme, { token: "neutralMark" }), lead);
|
|
947
|
+
}
|
|
948
|
+
function rawDotPaint(s, catId, meta) {
|
|
949
|
+
let scen = meta?.scenario ?? s.scenario, hollow = scen === "PL" || scen === "FC" || variant === "dot" && dataSeries.length === 2 && dataSeries.indexOf(s) === 1;
|
|
950
|
+
return meta?.fill ? { paint: { css: meta.fill }, hollow } : s.fill ? { paint: { css: s.fill }, hollow } : s.colorRole ? { paint: rolePaints.get(s.id) ?? markRolePaint(s.colorRole), hollow } : highlights.has(s.id) ? { paint: { token: "focus" }, hollow } : highlights.has(catId) && dataSeries.length === 1 ? { paint: { token: "focus" }, hollow } : s.id === receding ? { paint: mutedMarkPaint(), hollow } : restRecedes && !scen ? { paint: mutedMarkPaint(), hollow } : variant === "dumbbell" && dataSeries.some((d) => d.scenario === "PY") ? scenarioEnds() ? { paint: seriesPaint(s.slot, paletteRamp ? options.palette : void 0, scen), hollow } : { paint: scen === "PY" ? { token: "neutralMark" } : seriesPaint(0, paletteRamp ? options.palette : void 0), hollow } : scen ? {
|
|
951
|
+
paint: dataSeries.length === 1 ? seriesPaint(s.slot, paletteRamp ? options.palette : void 0, scen) : seriesPaint(s.slot, paletteRamp ? options.palette : void 0),
|
|
952
|
+
hollow
|
|
953
|
+
} : variant === "dumbbell" ? { paint: s.slot === 0 ? { token: "neutralMark" } : seriesPaint(0, paletteRamp ? options.palette : void 0), hollow } : {
|
|
954
|
+
paint: seriesPaint(s.slot, paletteRamp ? options.palette : void 0),
|
|
955
|
+
hollow
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
function insidePlotFirst(candidates) {
|
|
959
|
+
let inside = (c) => c.rect.x >= plot.x && c.rect.x + c.rect.w <= plot.x + plot.w;
|
|
960
|
+
return [...candidates.filter(inside), ...candidates.filter((c) => !inside(c))];
|
|
961
|
+
}
|
|
962
|
+
function dotCandidates(cx, cy, tsize, primary, owner) {
|
|
963
|
+
let right = {
|
|
964
|
+
slot: "right",
|
|
965
|
+
rect: { x: cx + r + LABEL_GAP, y: cy - tsize.height / 2, w: tsize.width, h: tsize.height },
|
|
966
|
+
penalty: primary === "right" ? 0 : 1
|
|
967
|
+
}, left = {
|
|
968
|
+
slot: "left",
|
|
969
|
+
rect: {
|
|
970
|
+
x: cx - r - LABEL_GAP - tsize.width,
|
|
971
|
+
y: cy - tsize.height / 2,
|
|
972
|
+
w: tsize.width,
|
|
973
|
+
h: tsize.height
|
|
974
|
+
},
|
|
975
|
+
penalty: primary === "left" ? 0 : 1
|
|
976
|
+
}, above = {
|
|
977
|
+
slot: "above",
|
|
978
|
+
rect: { x: cx - tsize.width / 2, y: cy - r - 3 - tsize.height, w: tsize.width, h: tsize.height },
|
|
979
|
+
penalty: 2
|
|
980
|
+
}, below = {
|
|
981
|
+
slot: "below",
|
|
982
|
+
rect: { x: cx - tsize.width / 2, y: cy + r + 3, w: tsize.width, h: tsize.height },
|
|
983
|
+
penalty: 3
|
|
984
|
+
}, rowLane = primary === "left" ? {
|
|
985
|
+
slot: "rowLaneLeft",
|
|
986
|
+
rect: {
|
|
987
|
+
x: plot.x - r - LABEL_GAP - tsize.width,
|
|
988
|
+
y: cy - tsize.height / 2,
|
|
989
|
+
w: tsize.width,
|
|
990
|
+
h: tsize.height
|
|
991
|
+
},
|
|
992
|
+
penalty: 4,
|
|
993
|
+
leaderFrom: { x: cx, y: cy }
|
|
994
|
+
} : {
|
|
995
|
+
slot: "rowLaneRight",
|
|
996
|
+
rect: {
|
|
997
|
+
x: plot.x + plot.w + r + LABEL_GAP,
|
|
998
|
+
y: cy - tsize.height / 2,
|
|
999
|
+
w: tsize.width,
|
|
1000
|
+
h: tsize.height
|
|
1001
|
+
},
|
|
1002
|
+
penalty: 4,
|
|
1003
|
+
leaderFrom: { x: cx, y: cy }
|
|
1004
|
+
}, obstacles = occupied.snapshot().filter((o) => !(o.kind === "mark" && isOwnMark(o.owner, owner, "point", o.part))).map((o) => o.rect), reach = 2 * tsize.width + 2 * LABEL_GAP, past = (slot, lo2, hi2, from) => seatsPastBlockers(from, "x", lo2, hi2, obstacles, 3).map((rect) => ({ slot, rect, penalty: 4 })), rightPast = past("rightPast", right.rect.x, Math.min(valueBody.x + valueBody.w, right.rect.x + reach), right.rect), leftPast = past("leftPast", Math.max(valueBody.x, left.rect.x + tsize.width - reach), left.rect.x + tsize.width, left.rect);
|
|
1005
|
+
return primary === "left" ? [left, right, above, below, ...leftPast, ...rightPast, rowLane] : [right, left, above, below, ...rightPast, ...leftPast, rowLane];
|
|
1006
|
+
}
|
|
1007
|
+
function buildLegend() {
|
|
1008
|
+
let l = options.legend, extras = [
|
|
1009
|
+
...rangesDrawn ? [{
|
|
1010
|
+
id: "__range",
|
|
1011
|
+
label: options.range?.label ?? chartString(options, "rangeName"),
|
|
1012
|
+
paint: RAIL_PAINT,
|
|
1013
|
+
width: strokeToken(theme, "focus"),
|
|
1014
|
+
key: "line",
|
|
1015
|
+
// The key draws the rail's end ticks as the plot does (its 5 px cap half at full rows).
|
|
1016
|
+
caps: { paint: CAP_PAINT, width: strokeToken(theme, "mark"), half: 5 }
|
|
1017
|
+
}] : [],
|
|
1018
|
+
...midsDrawn ? [{ id: "__rangeMid", label: midName, key: "marker", paint: { token: "background" }, stroke: { token: "inkMuted" }, width: strokeToken(theme, "mark"), radius: MID_KEY_R }] : [],
|
|
1019
|
+
...["rose", "fell"].filter((d) => directionsDrawn.has(d)).map((d) => ({
|
|
1020
|
+
id: `__${d}`,
|
|
1021
|
+
label: d === "rose" ? chartString(options, "rose") : chartString(options, "fell"),
|
|
1022
|
+
key: "line",
|
|
1023
|
+
paint: { token: d === "rose" == (dataSeries[1]?.direction === "higherIsBetter") ? "good" : "bad" }
|
|
1024
|
+
}))
|
|
1025
|
+
];
|
|
1026
|
+
if (l === "none" || l === "auto" || !l && extras.length === 0) return;
|
|
1027
|
+
let legendOptions = normalizeLegendOption(l ?? "top"), keyUnit = options.mode === "compact" && !unitPrinted({ ...options, subtitle: resolveSubtitle(options.subtitle) }) ? options.unit : void 0, items = [...l || rangesDrawn ? dataSeries.map((s) => {
|
|
1028
|
+
let { paint, hollow } = dotPaint(s, "", null);
|
|
1029
|
+
return { id: s.id, label: keyUnit ? `${s.label} (${keyUnit})` : s.label, key: "marker", radius: dotRadiusCap(variant, size.width), paint: hollow ? { token: "background" } : paint, ...hollow ? { stroke: paint, width: strokeToken(theme, "rule") } : {} };
|
|
1030
|
+
}) : [], ...extras];
|
|
1031
|
+
if (legendOptions.order) {
|
|
1032
|
+
let rank = new Map(legendOptions.order.map((id, i) => [id, i]));
|
|
1033
|
+
items = [...items].sort(
|
|
1034
|
+
(a, b) => (rank.get(a.id) ?? Number.MAX_SAFE_INTEGER) - (rank.get(b.id) ?? Number.MAX_SAFE_INTEGER)
|
|
1035
|
+
);
|
|
1036
|
+
}
|
|
1037
|
+
return { options: legendOptions, items };
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
// src/core/charts/dot/core.ts
|
|
1042
|
+
var dotCore = {
|
|
1043
|
+
type: "dot",
|
|
1044
|
+
sizing: chartSizing("dot"),
|
|
1045
|
+
title: "Dot / dumbbell / lollipop",
|
|
1046
|
+
summary: "Position-encoded item comparison \u2014 Cleveland dots, dumbbell ranges with derived gaps, or lollipops",
|
|
1047
|
+
aliases: ["cleveland", "dumbbell", "lollipop"],
|
|
1048
|
+
aliasDefaults: { dumbbell: { variant: "dumbbell" }, lollipop: { variant: "lollipop" } },
|
|
1049
|
+
layout: (data, options) => layoutDot(prepareFractionData(data), options),
|
|
1050
|
+
categoryLabels: calendarCategories,
|
|
1051
|
+
defaults: { variant: "dot" },
|
|
1052
|
+
annotationKinds: ["valueLine", "callout", "note", "delta", "abs", "diff", "cagr"],
|
|
1053
|
+
prepare: prepareRangeData
|
|
1054
|
+
};
|
|
1055
|
+
|
|
1056
|
+
export {
|
|
1057
|
+
dotCore
|
|
1058
|
+
};
|