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,613 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WAFFLE_SIZING
|
|
3
|
+
} from "./chunk-3SIRPKMP.js";
|
|
4
|
+
import {
|
|
5
|
+
eyebrowFont,
|
|
6
|
+
figureRole
|
|
7
|
+
} from "./chunk-QXILAMAU.js";
|
|
8
|
+
import {
|
|
9
|
+
chartPalette
|
|
10
|
+
} from "./chunk-SXGTRZFN.js";
|
|
11
|
+
import {
|
|
12
|
+
rowDrivenHeight
|
|
13
|
+
} from "./chunk-COYPDRJK.js";
|
|
14
|
+
import {
|
|
15
|
+
structureCount
|
|
16
|
+
} from "./chunk-B2EBEXIS.js";
|
|
17
|
+
import {
|
|
18
|
+
heightOmitted,
|
|
19
|
+
resolveSizing
|
|
20
|
+
} from "./chunk-GQPESFAF.js";
|
|
21
|
+
import {
|
|
22
|
+
prepareFractionData
|
|
23
|
+
} from "./chunk-3EZRM4YM.js";
|
|
24
|
+
import {
|
|
25
|
+
COMPACT_SOURCE_LINES,
|
|
26
|
+
PRIORITY,
|
|
27
|
+
TEXT_ASCENT,
|
|
28
|
+
authoredNotes,
|
|
29
|
+
createOccupiedIndex,
|
|
30
|
+
frameTextOptions,
|
|
31
|
+
labelCtx,
|
|
32
|
+
labelsToNodes,
|
|
33
|
+
legendRequired,
|
|
34
|
+
normalizeLegendOption,
|
|
35
|
+
round2,
|
|
36
|
+
solveFrame,
|
|
37
|
+
solveLabels,
|
|
38
|
+
textRole
|
|
39
|
+
} from "./chunk-2JAWQ7VV.js";
|
|
40
|
+
import {
|
|
41
|
+
disclosureNote,
|
|
42
|
+
engineNote
|
|
43
|
+
} from "./chunk-YTSSXSZR.js";
|
|
44
|
+
import {
|
|
45
|
+
exampleSpec,
|
|
46
|
+
formatWithSpec,
|
|
47
|
+
roundedNumber
|
|
48
|
+
} from "./chunk-ASAON7G4.js";
|
|
49
|
+
import {
|
|
50
|
+
authoredDecimals,
|
|
51
|
+
autoDecimals,
|
|
52
|
+
chartStrings,
|
|
53
|
+
formatAutomaticPercent,
|
|
54
|
+
localeStrings,
|
|
55
|
+
shareText
|
|
56
|
+
} from "./chunk-YQ2B3YVF.js";
|
|
57
|
+
import {
|
|
58
|
+
cellMeta,
|
|
59
|
+
cellValue
|
|
60
|
+
} from "./chunk-OAPCJO6W.js";
|
|
61
|
+
import {
|
|
62
|
+
KPI_VALUE_SIZE,
|
|
63
|
+
arrowHeadPath,
|
|
64
|
+
arrowShaftEnd,
|
|
65
|
+
canvasMargin,
|
|
66
|
+
contrastInkPaint,
|
|
67
|
+
dashToken,
|
|
68
|
+
markRolePaint,
|
|
69
|
+
mixedPaint,
|
|
70
|
+
panelTypeClass,
|
|
71
|
+
resolveTheme,
|
|
72
|
+
seriesPaint,
|
|
73
|
+
spaceTokens,
|
|
74
|
+
strokeToken,
|
|
75
|
+
surfaceFloorPaint,
|
|
76
|
+
textScaleOf,
|
|
77
|
+
themeForWidth
|
|
78
|
+
} from "./chunk-II7652VA.js";
|
|
79
|
+
import {
|
|
80
|
+
DEFAULT_TARGET,
|
|
81
|
+
NormalizeError,
|
|
82
|
+
TARGET_SIZE,
|
|
83
|
+
accessibleTitle,
|
|
84
|
+
kpiHeroSizesPx,
|
|
85
|
+
normalizeCategory,
|
|
86
|
+
normalizeSeriesValues,
|
|
87
|
+
panelHeroSizesPx,
|
|
88
|
+
resolveSize
|
|
89
|
+
} from "./chunk-SGD3ZHID.js";
|
|
90
|
+
import {
|
|
91
|
+
maxOf,
|
|
92
|
+
minOf,
|
|
93
|
+
pushAll
|
|
94
|
+
} from "./chunk-WYJEOMNY.js";
|
|
95
|
+
import {
|
|
96
|
+
defaultMeasurer,
|
|
97
|
+
wrapText
|
|
98
|
+
} from "./chunk-TXINIAFL.js";
|
|
99
|
+
|
|
100
|
+
// src/core/strings/waffle.ts
|
|
101
|
+
var EN = {
|
|
102
|
+
// reader-facing wording linked only by its consumers.
|
|
103
|
+
waffleTitle: "Waffle chart: {v1}",
|
|
104
|
+
panelsCount: "{v1} {v2}",
|
|
105
|
+
seriesCount: "{v1} series",
|
|
106
|
+
waffleSquareDesc: "Waffle chart of share squares, {v1} {v2} and {v3} series: each panel is a square for 100%, and the area of its solid square is the share. {v4}{v5}",
|
|
107
|
+
waffleReferenceDesc: " A dashed outline in {v1} marks the reference, {v2}.",
|
|
108
|
+
otherPanels: "the other panels",
|
|
109
|
+
eachPanel: "each panel",
|
|
110
|
+
waffleCellsDesc: "Waffle chart, {v1} {v2} and {v3} series, each panel a {v4} \xD7 {v5} grid of {v6} cells; one cell is {v7}. {v8}",
|
|
111
|
+
waffleCellsReading: "{v1} = {v2} of {v3} cells",
|
|
112
|
+
waffleWholeReading: "{v1} of the whole",
|
|
113
|
+
noValue: "no value",
|
|
114
|
+
waffleAllClause: ", {v1} in all",
|
|
115
|
+
emptyCellsClause: ", {v1} of {v2} cells empty",
|
|
116
|
+
// the key line that names the dashed reference outline.
|
|
117
|
+
referenceKey: "Dashed outline = {label}"
|
|
118
|
+
}, DE = {
|
|
119
|
+
// reader-facing wording linked only by its consumers.
|
|
120
|
+
waffleTitle: "Waffeldiagramm: {v1}",
|
|
121
|
+
panelsCount: "{v1} {v1|Feld|Felder}",
|
|
122
|
+
seriesCount: "{v1} {v1|Reihe|Reihen}",
|
|
123
|
+
waffleSquareDesc: "Waffeldiagramm aus Anteilsquadraten, {v1} {v1|Feld|Felder} und {v3} {v3|Reihe|Reihen}. Jedes Feld ist ein Quadrat f\xFCr 100 %. Die Fl\xE4che des gef\xFCllten Quadrats zeigt den Anteil. {v4}{v5}",
|
|
124
|
+
waffleReferenceDesc: " Ein gestrichelter Umriss in {v1} zeigt die Referenz {v2}.",
|
|
125
|
+
otherPanels: "den anderen Feldern",
|
|
126
|
+
eachPanel: "jedem Feld",
|
|
127
|
+
waffleCellsDesc: "Waffeldiagramm mit {v1} {v1|Feld|Feldern} und {v3} {v3|Reihe|Reihen}. Jedes Feld hat {v4} \xD7 {v5} {v6|Zelle|Zellen}, insgesamt {v6}. Eine Zelle entspricht {v7}. {v8}",
|
|
128
|
+
waffleCellsReading: "{v1} = {v2} von {v3} {v3|Zelle|Zellen}",
|
|
129
|
+
waffleWholeReading: "{v1} des Ganzen",
|
|
130
|
+
noValue: "kein Wert",
|
|
131
|
+
waffleAllClause: ", {v1} insgesamt",
|
|
132
|
+
emptyCellsClause: ", {v1} von {v2} {v2|Zelle|Zellen} leer",
|
|
133
|
+
// the key line that names the dashed reference outline.
|
|
134
|
+
referenceKey: "Gestrichelter Umriss = {label}"
|
|
135
|
+
}, { chartString } = chartStrings(EN, DE);
|
|
136
|
+
|
|
137
|
+
// src/core/charts/waffle/cells.ts
|
|
138
|
+
function allocateCells(values, cells) {
|
|
139
|
+
let exact = values.map((value) => value * cells / 100), whole = exact.map((cell) => Math.floor(cell + 1e-9)), left = Math.min(cells, Math.floor(exact.reduce((sum, cell) => sum + cell, 0) + 0.5 + 1e-9)) - whole.reduce((sum, cell) => sum + cell, 0), order = exact.map((cell, index) => ({ index, remainder: cell - Math.floor(cell + 1e-9) })).sort((a, b) => b.remainder - a.remainder || a.index - b.index);
|
|
140
|
+
for (let at = 0; left > 0 && order.length > 0; at = (at + 1) % order.length, left--) whole[order[at].index]++;
|
|
141
|
+
return { exact, whole };
|
|
142
|
+
}
|
|
143
|
+
function cellAt(k, columns, rows, fillFrom) {
|
|
144
|
+
let step = Math.floor(k / columns);
|
|
145
|
+
return { col: k % columns, row: fillFrom === "bottom" ? rows - 1 - step : step };
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// src/core/charts/waffle/layout.ts
|
|
149
|
+
var MIN_PITCH = 8, NATURAL_PITCH = 32, WHOLE_TOLERANCE = 1e-6, DEFAULT_GRID = { rows: 10, columns: 10 }, PALE_SQUARE = 0.16, ARROW_HEAD = 5, ARROW_GUTTER = 28, SQUARE_MIN_SIDE = 40, COMPACT_GUTTER = 10, SQUARE_LABEL_GAP = 6, SQUARE_HEADLINE_GAP = 8, SQUARE_CAPTION_GAP = 11, LABEL_CLEAR = 4, HEADLINE_SHARE = 0.72, SIDE_NATURAL_PITCH = 37, SIDE_MIN_PITCH = 24, READOUT_GAP = 3;
|
|
150
|
+
function layoutWaffle(data, options = {}) {
|
|
151
|
+
let pass = layoutPass(data, options), { size } = pass.geometry;
|
|
152
|
+
if (!heightOmitted(options.size) && options[TARGET_SIZE]?.fixed.height !== !1 && !pass.fits) {
|
|
153
|
+
let lean = layoutPass(data, options, !0);
|
|
154
|
+
return lean.fits ? lean.geometry : leanFloor(data, options, pass.geometry);
|
|
155
|
+
}
|
|
156
|
+
let grow = rowDrivenHeight({ options, width: size.width, height: size.height, chromeH: 0, rowsH: pass.naturalHeight });
|
|
157
|
+
return leanFloor(data, options, grow === void 0 ? pass.geometry : layoutPass(data, { ...options, size: { width: size.width, height: grow } }).geometry);
|
|
158
|
+
}
|
|
159
|
+
function leanFloor(data, options, geometry) {
|
|
160
|
+
if (!geometry.derived.reference || !geometry.legend?.items.some((item) => /^_*__reference$/.test(item.id))) return geometry;
|
|
161
|
+
let lean = layoutPass(data, { ...options, size: geometry.size }, !0).geometry.sizing;
|
|
162
|
+
return !lean || !geometry.sizing || lean.minHeight >= geometry.sizing.minHeight ? geometry : { ...geometry, sizing: { ...geometry.sizing, minHeight: lean.minHeight, measuredMinHeight: lean.measuredMinHeight, comfortableHeight: Math.ceil(lean.minHeight * 1.25) } };
|
|
163
|
+
}
|
|
164
|
+
function layoutPass(data, options, lean = !1) {
|
|
165
|
+
let warnings = [], size = resolveSize(options.size, options.target), theme = themeForWidth(resolveTheme(options.theme), panelTypeClass(options) ?? size.width), palette = chartPalette(theme, options.palette, warnings), measure = options.measure ?? defaultMeasurer, strings = localeStrings(options.locale?.language), target = options.target ?? DEFAULT_TARGET, grid = options.grid ?? DEFAULT_GRID, fillFrom = options.fillFrom ?? "bottom", gridOk = (n2) => Number.isInteger(n2) && n2 >= 1 && n2 <= 50;
|
|
166
|
+
if (!(gridOk(grid.rows) && gridOk(grid.columns)))
|
|
167
|
+
throw new NormalizeError(
|
|
168
|
+
"invalid-grid",
|
|
169
|
+
"grid",
|
|
170
|
+
`grid.rows and grid.columns must be whole numbers from 1 to ${50}`,
|
|
171
|
+
"Set grid to { rows: 10, columns: 10 }.",
|
|
172
|
+
void 0,
|
|
173
|
+
["options", "grid"]
|
|
174
|
+
);
|
|
175
|
+
let cellCount = grid.rows * grid.columns, cellShare = 100 / cellCount;
|
|
176
|
+
if (!data || !Array.isArray(data.categories) || data.categories.length === 0)
|
|
177
|
+
throw new NormalizeError("empty-data", "categories", "waffle requires at least one category");
|
|
178
|
+
if (!Array.isArray(data.series) || data.series.length === 0)
|
|
179
|
+
throw new NormalizeError("empty-data", "series", "waffle requires at least one series");
|
|
180
|
+
let cats = data.categories.map((c, i) => normalizeCategory(c, i)), series = data.series.map((s, si) => {
|
|
181
|
+
if (!s.id) throw new NormalizeError("missing-id", `series[${si}]`, "series requires an id");
|
|
182
|
+
return { ser: s, label: s.label ?? s.id, cells: normalizeSeriesValues(s, cats, si) };
|
|
183
|
+
}), square = (options.variant ?? "cells") === "square", refuse = (code, key, message, suggest) => {
|
|
184
|
+
throw new NormalizeError(code, key, message, suggest, void 0, ["options", key]);
|
|
185
|
+
};
|
|
186
|
+
square ? ((grid.rows !== DEFAULT_GRID.rows || grid.columns !== DEFAULT_GRID.columns) && refuse("waffle-square-grid", "grid", "variant 'square' draws no cells, so it takes no grid", "Remove grid, or set variant: 'cells'."), series.length !== 1 && refuse(
|
|
187
|
+
"waffle-square-one-series",
|
|
188
|
+
"variant",
|
|
189
|
+
`variant 'square' draws one share per panel; this chart has ${series.length} series`,
|
|
190
|
+
"Send one series, or use variant: 'cells' for stacked segments: a nested second square reads as an L-shape, not as its share."
|
|
191
|
+
)) : (options.reference !== void 0 && refuse("waffle-square-only", "reference", "reference is drawn by variant 'square' only", "Set variant: 'square', or remove reference."), options.arrows && refuse("waffle-square-only", "arrows", "arrows are drawn by variant 'square' only", "Set variant: 'square', or remove arrows."));
|
|
192
|
+
let subtotal = options.subtotal;
|
|
193
|
+
if (subtotal) {
|
|
194
|
+
square && refuse("waffle-subtotal-cells-only", "subtotal", "subtotal is drawn by variant 'cells' only", "Set variant: 'cells', or remove subtotal."), cats.length !== 1 && refuse("waffle-subtotal-one-panel", "subtotal", `subtotal sums the segments of one panel; this chart has ${cats.length} panels`, "Send one category, or remove subtotal.");
|
|
195
|
+
let at = subtotal.series.map((id) => series.findIndex((s) => s.ser.id === id)), unknown = subtotal.series.find((_, k) => at[k] < 0);
|
|
196
|
+
unknown !== void 0 && refuse("waffle-subtotal-unknown-series", "subtotal", `subtotal names '${unknown}', which is not a series`, "Name series ids in subtotal.series."), [...at].sort((a, b) => a - b).some((index, k) => index !== k) && refuse("waffle-subtotal-not-first", "subtotal", "subtotal.series must name the first series and the ones right after it, each once", "List the first series in series order.");
|
|
197
|
+
}
|
|
198
|
+
let groups = options.panelGroups ?? [], groupOf = cats.map(() => {
|
|
199
|
+
});
|
|
200
|
+
groups.forEach((group, gi) => {
|
|
201
|
+
groups.findIndex((other) => other.id === group.id) !== gi && refuse("waffle-group-duplicate-id", "panelGroups", `duplicate panel group id '${group.id}'`, "Give each panel group its own id.");
|
|
202
|
+
let at = group.panels.map((id) => cats.findIndex((cat) => cat.id === id)), unknown = group.panels.find((_, k) => at[k] < 0);
|
|
203
|
+
unknown !== void 0 && refuse("waffle-group-unknown-panel", "panelGroups", `panel group '${group.id}' names '${unknown}', which is not a category`, "Name category ids in panels."), at.some((index, k) => index !== at[0] + k) && refuse("waffle-group-not-contiguous", "panelGroups", `the panels of group '${group.id}' are not contiguous in category order`, "List adjacent categories in category order.");
|
|
204
|
+
for (let index of at)
|
|
205
|
+
groupOf[index] !== void 0 && refuse("waffle-group-overlap", "panelGroups", `panel '${cats[index].id}' is in two panel groups`, "Put each panel in one group at most."), groupOf[index] = gi;
|
|
206
|
+
group.colorRole && series.length > 1 && refuse("waffle-group-color-one-series", "panelGroups", `group '${group.id}' sets colorRole on a chart with ${series.length} series`, "Send one series, or colour the series instead.");
|
|
207
|
+
});
|
|
208
|
+
let defaultFormat = (value) => {
|
|
209
|
+
let text = shareText(value, autoDecimals(value), options.locale?.language);
|
|
210
|
+
return /^[<>]/.test(text) ? text : shareText(value, Math.max(autoDecimals(value), authoredDecimals(value)), options.locale?.language);
|
|
211
|
+
}, formatFor = (seriesIndex, panelIndex, exact = !0) => {
|
|
212
|
+
let example = cellMeta(series[seriesIndex].cells[panelIndex])?.format ?? series[seriesIndex].ser.format ?? options.format;
|
|
213
|
+
if (!example) return exact ? defaultFormat : (value) => shareText(value, autoDecimals(value), options.locale?.language);
|
|
214
|
+
let spec = exampleSpec(example, options.locale?.language);
|
|
215
|
+
return (value) => {
|
|
216
|
+
let rounded2 = roundedNumber(value, spec);
|
|
217
|
+
return value > 0 && rounded2 === 0 || value < 100 && rounded2 === 100 ? shareText(value, exact ? 1 : spec.decimals, options.locale?.language) : formatWithSpec(value, { ...spec, decimals: !exact || rounded2 === value ? spec.decimals : Math.max(spec.decimals, authoredDecimals(value)) });
|
|
218
|
+
};
|
|
219
|
+
}, headlineFormat = (panelIndex) => formatFor(0, panelIndex, !1), adjustments = [], missingPanel = [], panels = cats.map((cat, ci) => {
|
|
220
|
+
let values = series.map((s, si) => {
|
|
221
|
+
let value = cellValue(s.cells[ci]);
|
|
222
|
+
if (value !== null && !(value >= 0))
|
|
223
|
+
throw new NormalizeError(
|
|
224
|
+
"negative-value",
|
|
225
|
+
`series[${s.ser.id}].values[${ci}]`,
|
|
226
|
+
`waffle value ${value} for '${cat.id}' is negative; a waffle fills part of one whole`,
|
|
227
|
+
"Send values from 0 to 100, or use a bar chart for signed values.",
|
|
228
|
+
void 0,
|
|
229
|
+
["data", "series", si, "values", ci]
|
|
230
|
+
);
|
|
231
|
+
return value;
|
|
232
|
+
}), total = values.reduce((sum, value) => sum + (value ?? 0), 0);
|
|
233
|
+
if (total > 100 + WHOLE_TOLERANCE)
|
|
234
|
+
throw new NormalizeError(
|
|
235
|
+
"waffle-over-100",
|
|
236
|
+
`categories[${cat.id}]`,
|
|
237
|
+
`the values of '${cat.id}' add up to ${Math.round(total * 1e6) / 1e6}; one waffle holds at most 100`,
|
|
238
|
+
"Lower the values so they add up to 100 or less. If the values are fractions, add valueKind: 'fraction'."
|
|
239
|
+
);
|
|
240
|
+
let noValue = values.every((value) => value === null);
|
|
241
|
+
missingPanel.push(noValue), noValue && warnings.push({ code: "waffle-missing-value", severity: "info", message: `'${cat.id}' has no value, so its ${square ? "square" : "grid"} is empty and it prints no headline`, owner: { categoryId: cat.id } });
|
|
242
|
+
let { exact, whole } = square ? { exact: values.map(() => 0), whole: values.map(() => 0) } : allocateCells(values.map((value) => value ?? 0), cellCount), segments = series.map((s, si) => {
|
|
243
|
+
let value = values[si] ?? 0;
|
|
244
|
+
return !square && value > 0 && whole[si] === 0 && warnings.push({
|
|
245
|
+
code: "waffle-segment-no-cells",
|
|
246
|
+
severity: "warn",
|
|
247
|
+
message: `'${s.label}' in '${cat.id}' is ${formatFor(si, ci)(value)}, under half a cell, so it draws no cells`,
|
|
248
|
+
owner: { categoryId: cat.id, seriesId: s.ser.id },
|
|
249
|
+
suggest: "use a finer grid, or add valueKind: 'fraction' if the values are fractions of 1"
|
|
250
|
+
}), whole[si] !== Math.round(exact[si] + 1e-9) && value > 0 && adjustments.push({
|
|
251
|
+
whole: cat.label ?? cat.id,
|
|
252
|
+
part: s.label,
|
|
253
|
+
share: value,
|
|
254
|
+
nearest: `${Math.round(exact[si] + 1e-9)} of ${cellCount} cells`,
|
|
255
|
+
printed: `${whole[si]} of ${cellCount} cells`
|
|
256
|
+
}), {
|
|
257
|
+
seriesId: s.ser.id,
|
|
258
|
+
value,
|
|
259
|
+
exactCells: exact[si],
|
|
260
|
+
cells: whole[si],
|
|
261
|
+
reading: values[si] === null ? chartString(options, "noValue") : square ? chartString(options, "waffleWholeReading", { v1: formatFor(si, ci)(value) }) : chartString(options, "waffleCellsReading", { v1: formatFor(si, ci)(value), v2: whole[si], v3: cellCount })
|
|
262
|
+
};
|
|
263
|
+
});
|
|
264
|
+
return {
|
|
265
|
+
categoryId: cat.id,
|
|
266
|
+
label: cat.label ?? cat.id,
|
|
267
|
+
total: Math.round(total * 1e9) / 1e9,
|
|
268
|
+
filledCells: segments.reduce((sum, segment) => sum + segment.cells, 0),
|
|
269
|
+
segments
|
|
270
|
+
};
|
|
271
|
+
}), missing = (panel) => missingPanel[panels.indexOf(panel)], reference;
|
|
272
|
+
if (square && options.reference) {
|
|
273
|
+
let ref = options.reference;
|
|
274
|
+
if (ref.categoryId === void 0 == (ref.value === void 0) && refuse("waffle-reference-source", "reference", "reference takes exactly one of categoryId and value", "Name the panel in categoryId, or give the share in value."), ref.categoryId !== void 0) {
|
|
275
|
+
let pi = panels.findIndex((panel) => panel.categoryId === ref.categoryId);
|
|
276
|
+
pi < 0 && refuse("waffle-reference-unknown-panel", "reference", `reference names '${ref.categoryId}', which is not a category`, "Name a category id in reference.categoryId."), missingPanel[pi] && refuse("waffle-reference-no-value", "reference", `the reference panel '${ref.categoryId}' has no value`, "Name a panel with a value, or give reference.value.");
|
|
277
|
+
let value = panels[pi].total;
|
|
278
|
+
value > 0 || refuse("waffle-reference-zero", "reference", `the reference panel '${ref.categoryId}' is 0%, so it has no square to outline`, "Name a panel with a share above 0, or remove reference."), reference = { value, label: ref.label ?? `${panels[pi].label} ${headlineFormat(pi)(value)}`, categoryId: ref.categoryId };
|
|
279
|
+
} else {
|
|
280
|
+
let value = ref.value;
|
|
281
|
+
value === 0 && refuse("waffle-reference-zero", "reference", "reference value 0 has no square to outline", "Give a reference share above 0, or remove reference."), value > 0 && value <= 100 || refuse("waffle-reference-out-of-range", "reference", `reference value ${value} is outside 0 to 100`, "Give the reference share in percent, above 0 and up to 100."), ref.label === void 0 && refuse("waffle-reference-label-required", "reference", "a reference given as a value needs a label that says what it stands for", "Add reference.label, such as 'Headcount 6%', or name the panel in reference.categoryId."), reference = { value, label: ref.label };
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
let paints = series.map(({ ser }, si) => ser.fill ? { css: ser.fill } : ser.colorRole ? markRolePaint(ser.colorRole, !0) : seriesPaint(si, palette ? options.palette : void 0)), restPaint = surfaceFloorPaint({ token: "othersMark" }, []), panelPaint = (pi, si) => {
|
|
285
|
+
let role = groupOf[pi] === void 0 ? void 0 : groups[groupOf[pi]].colorRole;
|
|
286
|
+
return role ? markRolePaint(role, !0) : paints[si];
|
|
287
|
+
}, referenceGround = (pi) => panels[pi].segments[0].value > reference.value ? panelPaint(pi, 0) : mixedPaint(panelPaint(pi, 0), { token: "background" }, PALE_SQUARE), referencePanel = Math.max(0, panels.findIndex((panel) => panel.categoryId !== reference?.categoryId)), valueText = (si, pi) => cellValue(series[si].cells[pi]) === null ? theme.table?.glyphs?.missing ?? "\u2013" : formatFor(si, pi)(panels[pi].segments[si].value), restSpec = options.format ? exampleSpec(options.format, options.locale?.language) : void 0, restFormat = (value) => {
|
|
288
|
+
if (!restSpec) return defaultFormat(value);
|
|
289
|
+
let rounded2 = roundedNumber(value, restSpec);
|
|
290
|
+
return value > 0 && rounded2 === 0 || value < 100 && rounded2 === 100 ? defaultFormat(value) : formatWithSpec(value, { ...restSpec, decimals: rounded2 === value ? restSpec.decimals : Math.max(restSpec.decimals, authoredDecimals(value)) });
|
|
291
|
+
}, restText = (pi) => series.some((series2) => cellValue(series2.cells[pi]) === null) ? theme.table?.glyphs?.missing ?? "\u2013" : restFormat(Math.round((100 - panels[pi].total) * 1e9) / 1e9), subtotalCount = subtotal?.series.length ?? 0, subtotalText = subtotal ? series.slice(0, subtotalCount).some((s) => cellValue(s.cells[0]) === null) ? theme.table?.glyphs?.missing ?? "\u2013" : formatFor(0, 0)(Math.round(panels[0].segments.slice(0, subtotalCount).reduce((sum, segment) => sum + segment.value, 0) * 1e9) / 1e9) : "", occupied = createOccupiedIndex({ x: 0, y: 0, w: size.width, h: size.height }), margin = { ...canvasMargin(theme, size.width), ...options.margin }, items = (series.length > 1 ? series : []).map(({ ser, label }, si) => ({
|
|
292
|
+
id: ser.id,
|
|
293
|
+
label: !lean && panels.length === 1 && series.length > 1 ? `${label} ${valueText(si, 0)}` : label,
|
|
294
|
+
paint: paints[si]
|
|
295
|
+
})), hasRest = !square && panels.some((panel) => panel.filledCells < cellCount), restId = "__rest";
|
|
296
|
+
for (; series.some(({ ser }) => ser.id === restId); ) restId = `_${restId}`;
|
|
297
|
+
let referenceId = "__reference";
|
|
298
|
+
for (; series.some(({ ser }) => ser.id === referenceId); ) referenceId = `_${referenceId}`;
|
|
299
|
+
!lean && hasRest && series.length > 1 && items.push({ id: restId, label: panels.length === 1 ? `${options.strings?.others ?? strings.others} ${restText(0)}` : options.strings?.others ?? strings.others, paint: restPaint });
|
|
300
|
+
let referenceNote = !!reference && (lean || options.legend === "none"), paleOutlined = reference ? panels.findIndex((panel) => panel.categoryId !== reference.categoryId && panel.segments[0].value <= reference.value) : -1, referenceKeyGround = reference ? mixedPaint(panelPaint(paleOutlined >= 0 ? paleOutlined : referencePanel, 0), { token: "background" }, PALE_SQUARE) : void 0;
|
|
301
|
+
reference && !referenceNote && items.push({ id: referenceId, label: chartString(options, "referenceKey", { label: reference.label }), paint: contrastInkPaint(referenceKeyGround), key: "line", width: strokeToken(theme, "rule"), dash: dashToken(theme, "reference") });
|
|
302
|
+
let authoredKey = options.legend !== void 0 && options.legend !== "none" && options.legend !== "auto";
|
|
303
|
+
authoredKey && groups.some((group) => group.colorRole) && refuse("waffle-group-color-legend", "legend", "panelGroups colour the panels by group, but the key shows the series colour", "Remove legend (the group captions name the groups), or remove colorRole from panelGroups.");
|
|
304
|
+
let legend = series.length > 1 ? { options: legendRequired(options.legend, warnings, "waffle", theme, "the segments are named only by their colours"), items } : items.length > 0 ? { options: normalizeLegendOption(options.legend, { position: reference ? "top" : "bottom" }) ?? { position: "bottom" }, items } : void 0;
|
|
305
|
+
groups.some((group) => group.colorRole) && legend && (legend.items = items.filter((item) => hasRest && item.id === restId || reference && item.id === referenceId));
|
|
306
|
+
let rounded = Math.round(cellShare * 100) / 100, shareDecimals = Number.isInteger(rounded) ? 0 : Number.isInteger(rounded * 10) ? 1 : 2, cellNote = (options.cellNote ?? "auto") === "auto" && Math.abs(cellShare - 1) > 1e-9 ? [disclosureNote((options.strings?.cellNote ?? "One cell = {value}").replace("{value}", formatAutomaticPercent(cellShare, shareDecimals, !1, options.locale?.language)))] : [], labelFont = eyebrowFont(theme, textScaleOf(options)), keyFont = { family: theme.type.family, ...theme.type.label }, readout = !lean && !square && panels.length === 1 && series.length > 1 && !authoredKey && !!legend;
|
|
307
|
+
readout && (legend = void 0);
|
|
308
|
+
let subtotalNotes = subtotal && !readout ? [disclosureNote(`${subtotalText} ${subtotal.label}`)] : [], measureInFrame = !lean && panels.length === 1 && !options.subtitle && panels[0].label !== "", referenceNotes = referenceNote ? [lean ? engineNote(reference.label, "note") : disclosureNote(reference.label)] : [], pointerOff = lean && referenceNote && options[COMPACT_SOURCE_LINES] === 0 && authoredNotes(options).length === 0, frame = solveFrame({ size, margin, ...frameTextOptions(options), ...measureInFrame ? { subtitle: { measure: panels[0].label } } : {}, ...referenceNote ? { footnotesOff: !1 } : {}, ...pointerOff ? { notes: { ...options.notes, pointer: !1 } } : {}, footnotes: [...authoredNotes(options), ...cellNote, ...referenceNotes, ...subtotalNotes], legend, theme, measure }, occupied), referenceKey = frame.legend?.items.find((item) => item.id === referenceId), referenceSwatch = frame.nodes.find((node) => node.id === referenceKey?.swatchNodeId);
|
|
309
|
+
if (reference && referenceSwatch?.t === "line") {
|
|
310
|
+
let at = frame.nodes.indexOf(referenceSwatch), x = referenceSwatch.x1, top = referenceSwatch.y1 - 5.5, r = 10, d = fillFrom === "bottom" ? `M${round2(x + 0.5)} ${round2(top + 0.5)}H${round2(x + r + 0.5)}V${round2(top + 11)}` : `M${round2(x + r + 0.5)} ${round2(top)}V${round2(top + r + 0.5)}H${round2(x + 0.5)}`;
|
|
311
|
+
frame.nodes.splice(
|
|
312
|
+
at,
|
|
313
|
+
1,
|
|
314
|
+
{ t: "rect", id: `${referenceSwatch.id}:ground`, rect: { x, y: top, w: 16, h: 11 }, fill: referenceKeyGround, owner: {}, part: "legendGround" },
|
|
315
|
+
{ t: "path", id: referenceSwatch.id, d, stroke: referenceSwatch.stroke, width: referenceSwatch.width, dash: referenceSwatch.dash, owner: referenceSwatch.owner, part: referenceSwatch.part }
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
let plot = frame.plot, space = spaceTokens(theme, size.width), arrows = square && options.arrows === !0, n = panels.length, fullGutter = arrows ? Math.max(space.margin.left, ARROW_GUTTER) : space.margin.left, gutter = square && !arrows && n > 1 && (plot.w - (n - 1) * fullGutter) / n < grid.columns * MIN_PITCH ? COMPACT_GUTTER : fullGutter, figure = figureRole(theme), labelTexts = panels.map((panel) => measureInFrame ? "" : panel.label), longestWord = labelTexts.map((text) => Math.max(0, ...text.split(/\s+/).filter(Boolean).map((word) => measure(word, labelFont).width))), rowsFor = (maxColumns) => {
|
|
319
|
+
let rows = [[]];
|
|
320
|
+
for (let pi = 0; pi < n; pi++) {
|
|
321
|
+
let row = rows[rows.length - 1], gi = groupOf[pi], groupLength = gi === void 0 ? 1 : groups[gi].panels.length, groupStarts = gi !== void 0 && groups[gi].panels[0] === cats[pi].id;
|
|
322
|
+
(row.length === maxColumns || groupStarts && groupLength <= maxColumns && row.length + groupLength > maxColumns) && (row = [], rows.push(row)), row.push(pi);
|
|
323
|
+
}
|
|
324
|
+
return rows;
|
|
325
|
+
}, labelRoom = (rows, pi, w) => square && !rows.some((row) => row[row.length - 1] === pi) ? w + gutter - LABEL_CLEAR : w, minColumns = square ? Math.min(n, Math.max(Math.ceil(n / 2), maxOf(groups.map((group) => group.panels.length)))) : n, panelRows = rowsFor(n);
|
|
326
|
+
for (let c = n; c >= minColumns; c--) {
|
|
327
|
+
panelRows = rowsFor(c);
|
|
328
|
+
let cols = maxOf(panelRows.map((row) => row.length)), w = (plot.w - (cols - 1) * gutter) / cols;
|
|
329
|
+
if (!square || w >= SQUARE_MIN_SIDE && panels.every((_, pi) => longestWord[pi] <= labelRoom(panelRows, pi, w))) break;
|
|
330
|
+
}
|
|
331
|
+
let columns = maxOf(panelRows.map((row) => row.length)), lineH = (font) => font.size * (font.lineHeight ?? 1.2), others = options.strings?.others ?? strings.others, entries = readout ? [
|
|
332
|
+
...series.map((s, si) => ({ id: s.ser.id, value: valueText(si, 0), name: s.label, paint: paints[si], seriesId: s.ser.id })),
|
|
333
|
+
...hasRest ? [{ id: restId, value: restText(0), name: others, paint: restPaint, seriesId: void 0 }] : []
|
|
334
|
+
] : [], valueFont = { ...keyFont, weight: 700 }, subValueFont = { family: figure.family, weight: figure.weight, size: Math.round(theme.type.title.size * 1.1) }, valueCol = Math.max(0, maxOf(entries.map((entry) => measure(entry.value, valueFont).width))) + 8, nameW = Math.max(0, maxOf(entries.map((entry) => measure(entry.name, keyFont).width))), entryW = 16 + valueCol + nameW, entryStep = Math.max(lineH(valueFont), lineH(keyFont)) + 4, subValueW = subtotal ? measure(subtotalText, subValueFont).width : 0, subLabelW = subtotal ? measure(subtotal.label, keyFont).width : 0, subLineH = subtotal ? measure("0", subValueFont).height : 0, readoutSideW = 20 + entryW + (subtotal ? 42 + Math.max(subValueW, subLabelW) : 0), underColumns = 2 * entryW + 16 <= plot.w && entries.length > 1 ? 2 : 1, subRowH = subtotal ? 18 + subLineH : 0, underH = space.gapSubtitlePlot + Math.ceil(entries.length / underColumns) * entryStep + subRowH, sidePitch = (plot.w - readoutSideW) / grid.columns, pinnedH = !heightOmitted(options.size) && options[TARGET_SIZE]?.fixed.height !== !1, readoutSide = readout && sidePitch >= MIN_PITCH && (sidePitch >= SIDE_MIN_PITCH || pinnedH && Math.min(plot.w / grid.columns, (plot.h - underH) / grid.rows) < Math.min(sidePitch, plot.h / grid.rows)), keyColumns = readout && !readoutSide ? underColumns : 0, keyRows = keyColumns > 0 ? Math.ceil(entries.length / keyColumns) : 0, bottomReadoutH = keyColumns > 0 ? underH : 0, hero = n > 1 ? panelHeroSizesPx(target, theme.type.title.size, size.width, textScaleOf(options)) : kpiHeroSizesPx(target, theme.type.title.size, textScaleOf(options)), heroBase = options[KPI_VALUE_SIZE] ?? hero.preferred, columnW = (plot.w - (columns - 1) * gutter) / columns, wrappedW = () => {
|
|
335
|
+
let isLast = (pi) => panelRows.some((row) => row[row.length - 1] === pi), wordNeed = Math.max(0, maxOf(panels.map((_, pi) => longestWord[pi] - (isLast(pi) ? 0 : gutter - LABEL_CLEAR)))), heroFont = { family: figure.family, size: heroBase, weight: figure.weight }, heroNeed = Math.max(0, maxOf(panels.map((panel, pi) => missing(panel) ? 0 : measure(headlineFormat(pi)(panel.total), heroFont).width))) / HEADLINE_SHARE;
|
|
336
|
+
return Math.min(columnW, Math.max(SQUARE_MIN_SIDE, Math.ceil(wordNeed), Math.ceil(heroNeed)));
|
|
337
|
+
}, panelW = Math.max(1, readoutSide ? plot.w - readoutSideW : square && !lean && panelRows.length > 1 && series.length === 1 ? wrappedW() : columnW), positions = panels.map((_, pi) => {
|
|
338
|
+
let row = panelRows.findIndex((row2) => row2.includes(pi));
|
|
339
|
+
return { row, x: plot.x + panelRows[row].indexOf(pi) * (panelW + gutter) };
|
|
340
|
+
}), labelW = panels.map((_, pi) => labelRoom(panelRows, pi, panelW)), wrapped = labelTexts.map((text, pi) => wrapText(text, labelFont, labelW[pi], 6, measure)), labelLines = Math.max(0, maxOf(wrapped.map((w, i) => labelTexts[i] === "" ? 0 : w.lines.length))), labelBlockH = labelLines === 0 ? 0 : measure("0", labelFont).height + (labelLines - 1) * lineH(labelFont), captionFont = { family: theme.type.family, ...theme.type.label }, groupSpans = groups.flatMap((group) => panelRows.flatMap((row, ri) => {
|
|
341
|
+
let members = row.filter((pi) => group.panels.includes(cats[pi].id));
|
|
342
|
+
if (!members.length) return [];
|
|
343
|
+
let x = positions[members[0]].x, w = members.length * panelW + (members.length - 1) * gutter;
|
|
344
|
+
return [{ group, row: ri, x, w, wrap: group.label ? wrapText(group.label, captionFont, w, 20, measure) : void 0 }];
|
|
345
|
+
})), captionLines = Math.max(0, maxOf(groupSpans.map((span) => span.wrap?.lines.length ?? 0))), captionH = captionLines === 0 ? 0 : measure("0", captionFont).height + (captionLines - 1) * lineH(captionFont), captionGap = lean ? space.gapSubtitlePlot : square ? SQUARE_CAPTION_GAP : 15, panelValueLines = panels.map((panel, pi) => [
|
|
346
|
+
...panel.segments.map((_, si) => `${series[si].label} ${valueText(si, pi)}`),
|
|
347
|
+
...hasRest ? [`${options.strings?.others ?? strings.others} ${restText(pi)}`] : []
|
|
348
|
+
]), valueStep = Math.max(lineH(keyFont), maxOf(panelValueLines.flatMap((lines) => lines.map((text) => measure(text, keyFont).height + 4)))), preferredValuesH = series.length > 1 && n > 1 ? (series.length + (hasRest ? 1 : 0)) * valueStep + space.gapSubtitlePlot : 0, valuesFit = heightOmitted(options.size) || plot.h - labelBlockH - (labelBlockH > 0 ? space.gapSubtitlePlot : 0) - (captionH > 0 ? captionGap + captionH : 0) - preferredValuesH >= grid.rows * MIN_PITCH, showHeadline = options.headline === "value" || options.headline !== "none" && (lean || series.length === 1 || !valuesFit), headlineValues = panels.map((panel, pi) => missing(panel) ? void 0 : headlineFormat(pi)(panel.total)), headlineTexts = headlineValues.map((value) => {
|
|
349
|
+
if (value === void 0 || series.length === 1) return value;
|
|
350
|
+
let named = `${options.strings?.total ?? strings.total} ${value}`;
|
|
351
|
+
return measure(named, { family: figure.family, size: hero.minimum, weight: figure.weight }).width <= panelW ? named : value;
|
|
352
|
+
}), widest = (font) => Math.max(0, maxOf(headlineTexts.map((text) => text === void 0 ? 0 : measure(text, font).width))), headlineFont = { family: figure.family, size: heroBase, weight: figure.weight, lineHeight: 1.2 }, headlineRoom = square && n > 1 ? panelW * HEADLINE_SHARE : panelW;
|
|
353
|
+
for (; showHeadline && headlineFont.size > hero.minimum && widest(headlineFont) > headlineRoom; )
|
|
354
|
+
headlineFont = { ...headlineFont, size: Math.max(hero.minimum, headlineFont.size - 0.5) };
|
|
355
|
+
let headlineH = showHeadline && headlineTexts.some((text) => text !== void 0) ? measure("0", headlineFont).height : 0, aboveH = square ? 0 : headlineH, gapLabelHeadline = labelBlockH > 0 && aboveH > 0 ? space.gapTitleSubtitle : 0, gapGrid = labelBlockH + aboveH > 0 ? square && !lean ? SQUARE_LABEL_GAP : space.gapSubtitlePlot : 0, topBlockH = plot.y + labelBlockH + gapLabelHeadline + aboveH + gapGrid - plot.y, rowLabelH = panelRows.map((row) => {
|
|
356
|
+
let lines = Math.max(0, maxOf(row.map((pi) => labelTexts[pi] === "" ? 0 : wrapped[pi].lines.length)));
|
|
357
|
+
return panelRows.length === 1 || lines === 0 ? labelBlockH : measure("0", labelFont).height + (lines - 1) * lineH(labelFont);
|
|
358
|
+
}), rowCaptionH = panelRows.map((_, ri) => {
|
|
359
|
+
let lines = Math.max(0, maxOf(groupSpans.filter((span) => span.row === ri).map((span) => span.wrap?.lines.length ?? 0)));
|
|
360
|
+
return panelRows.length === 1 ? captionH : lines === 0 ? 0 : measure("0", captionFont).height + (lines - 1) * lineH(captionFont);
|
|
361
|
+
}), rowTopH = rowLabelH.map((h) => topBlockH - labelBlockH + h), gapBelow = square && !lean ? SQUARE_HEADLINE_GAP : space.gapSubtitlePlot, belowH = square && headlineH > 0 ? gapBelow + headlineH : 0, requiredBottomH = belowH + (captionH > 0 ? captionGap + captionH : 0) + bottomReadoutH, valuesH = !heightOmitted(options.size) && plot.h - topBlockH - requiredBottomH - preferredValuesH < grid.rows * MIN_PITCH ? 0 : preferredValuesH, rowRequiredBottomH = rowCaptionH.map((h) => requiredBottomH - (captionH > 0 ? captionGap + captionH : 0) + (h > 0 ? captionGap + h : 0)), blocksH = (bottom) => rowTopH.reduce((sum, top, ri) => sum + top + bottom[ri], 0), rowBottomH = rowRequiredBottomH.map((h) => h + valuesH), pitch = Math.max(1, Math.min(panelW / grid.columns, (plot.h - (panelRows.length - 1) * gutter - blocksH(rowBottomH)) / panelRows.length / grid.rows)), gap = square ? 0 : Math.min(readout ? READOUT_GAP : 4, Math.max(1, Math.round(pitch * 0.1))), side = pitch - gap, gridW = round2(grid.columns * pitch - gap), gridH = round2(grid.rows * pitch - gap), frameH = size.height - plot.h, naturalPitch = keyColumns > 0 ? panelW / grid.columns : Math.min(panelW / grid.columns, readoutSide ? SIDE_NATURAL_PITCH : NATURAL_PITCH), keyH = readoutSide ? Math.max(entries.length * entryStep, subLineH + 4 + lineH(keyFont)) : 0, naturalHeight = Math.ceil(frameH + Math.max(blocksH(rowBottomH) + panelRows.length * naturalPitch * grid.rows + (panelRows.length - 1) * gutter, topBlockH + keyH) - 1e-6), rowY = panelRows.map((_, ri) => plot.y + rowTopH.slice(0, ri).reduce((sum, top, rj) => sum + top + gridH + rowBottomH[rj] + gutter, 0)), rowGridTop = (ri) => rowY[ri] + rowTopH[ri];
|
|
362
|
+
(square ? pitch * grid.columns < SQUARE_MIN_SIDE : pitch < MIN_PITCH) && warnings.push({
|
|
363
|
+
code: "waffle-cells-small",
|
|
364
|
+
severity: "warn",
|
|
365
|
+
message: square ? `panels are ${Math.round(pitch * grid.columns)}px wide, under the ${SQUARE_MIN_SIDE}px a square reads at` : `cells are ${Math.round(pitch * 10) / 10}px wide, under the ${MIN_PITCH}px a cell reads at`,
|
|
366
|
+
suggest: "give the chart more width or height, drop a panel, or use a coarser grid"
|
|
367
|
+
});
|
|
368
|
+
let nodes = [...frame.nodes], referenceSide = reference ? gridW * Math.sqrt(reference.value / 100) : 0, marks = { panels: [] }, requests = [], cellSquare = (col, row, x0, y0) => {
|
|
369
|
+
let x = round2(x0 + col * pitch), y = round2(y0 + row * pitch);
|
|
370
|
+
return `M${x} ${y}h${round2(side)}v${round2(side)}h${-round2(side)}z`;
|
|
371
|
+
};
|
|
372
|
+
if (panels.forEach((panel, pi) => {
|
|
373
|
+
let x0 = positions[pi].x, rect = { x: round2(x0), y: round2(rowGridTop(positions[pi].row)), w: gridW, h: gridH }, segmentMarks = [];
|
|
374
|
+
if (square) {
|
|
375
|
+
let squareMarks = drawSquarePanel(pi, x0, rect, segmentMarks);
|
|
376
|
+
pushText(pi, x0, rect), marks.panels.push({ categoryId: panel.categoryId, rect, segments: segmentMarks, ...squareMarks });
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
occupied.claim(rect, "mark", { categoryId: panel.categoryId });
|
|
380
|
+
let next = 0;
|
|
381
|
+
panel.segments.forEach((segment, si) => {
|
|
382
|
+
if (segment.cells === 0) return;
|
|
383
|
+
let d = "";
|
|
384
|
+
for (let k = next; k < next + segment.cells; k++) {
|
|
385
|
+
let { col, row } = cellAt(k, grid.columns, grid.rows, fillFrom);
|
|
386
|
+
d += cellSquare(col, row, x0, rect.y);
|
|
387
|
+
}
|
|
388
|
+
next += segment.cells;
|
|
389
|
+
let nodeId = `mark:${segment.seriesId}:${panel.categoryId}`;
|
|
390
|
+
nodes.push({
|
|
391
|
+
t: "path",
|
|
392
|
+
id: nodeId,
|
|
393
|
+
d,
|
|
394
|
+
fill: panelPaint(pi, si),
|
|
395
|
+
owner: { seriesId: segment.seriesId, categoryId: panel.categoryId },
|
|
396
|
+
part: "waffleSegment",
|
|
397
|
+
display: { value: formatFor(si, pi)(segment.value) }
|
|
398
|
+
}), segmentMarks.push({ seriesId: segment.seriesId, nodeId, cells: segment.cells });
|
|
399
|
+
});
|
|
400
|
+
let restNodeId;
|
|
401
|
+
if (next < cellCount) {
|
|
402
|
+
let d = "";
|
|
403
|
+
for (let k = next; k < cellCount; k++) {
|
|
404
|
+
let { col, row } = cellAt(k, grid.columns, grid.rows, fillFrom);
|
|
405
|
+
d += cellSquare(col, row, x0, rect.y);
|
|
406
|
+
}
|
|
407
|
+
restNodeId = `mark:rest:${panel.categoryId}`, nodes.push({ t: "path", id: restNodeId, d, fill: restPaint, owner: { categoryId: panel.categoryId, segmentId: "rest" }, part: "waffleRest" });
|
|
408
|
+
}
|
|
409
|
+
pushText(pi, x0, rect), marks.panels.push({ categoryId: panel.categoryId, rect, segments: segmentMarks, ...restNodeId ? { restNodeId } : {} });
|
|
410
|
+
}), arrows)
|
|
411
|
+
for (let pi = 0; pi + 1 < n; pi++) {
|
|
412
|
+
let a = marks.panels[pi].rect, b = marks.panels[pi + 1].rect, y = round2(referenceSide > 0 ? fillFrom === "bottom" ? a.y + a.h - referenceSide : a.y + referenceSide : a.y + a.h / 2), owner = { categoryId: panels[pi + 1].categoryId, segmentId: "arrow" }, from = round2(a.x + a.w + 4), tip = round2(b.x - 3), targetY = round2(y + b.y - a.y), shaft = arrowShaftEnd(ARROW_HEAD, strokeToken(theme, "rule")), d = a.y === b.y ? `M${from} ${y}H${round2(tip - shaft)}` : `M${from} ${y}H${round2(plot.x + plot.w + 6)}V${round2(b.y - rowTopH[positions[pi + 1].row] - gutter / 2)}H${round2(plot.x - 8)}V${targetY}H${round2(tip - shaft)}`;
|
|
413
|
+
nodes.push({ t: "path", id: `mark:arrow:${panels[pi].categoryId}`, d, stroke: { token: "ink" }, width: strokeToken(theme, "rule"), owner, part: "waffleArrow" }), nodes.push({ t: "path", id: `mark:arrowHead:${panels[pi].categoryId}`, d: arrowHeadPath({ x: tip, y: targetY }, 0, ARROW_HEAD), fill: { token: "ink" }, owner, part: "arrowHead" });
|
|
414
|
+
}
|
|
415
|
+
if (reference && referenceSide > 0) {
|
|
416
|
+
let font = { family: theme.type.family, ...theme.type.axis };
|
|
417
|
+
requests.push({ id: "reference", kind: "annotation", owner: { segmentId: "reference" }, text: reference.label, lines: [reference.label], font, typeRole: "axis", priority: PRIORITY.reference, candidates: [] });
|
|
418
|
+
}
|
|
419
|
+
let captionTopOf = (ri) => rowGridTop(ri) + gridH + belowH + valuesH + captionGap;
|
|
420
|
+
for (let span of groupSpans) {
|
|
421
|
+
if (!span.wrap) continue;
|
|
422
|
+
let ruleY = captionTopOf(span.row) - 3;
|
|
423
|
+
lean || nodes.push({ t: "path", id: `groupRule:${span.group.id}:${span.row}`, d: `M${round2(span.x)} ${round2(ruleY - 4)}V${round2(ruleY)}H${round2(span.x + span.w)}V${round2(ruleY - 4)}`, stroke: { token: "inkMuted" }, width: strokeToken(theme, "rule"), owner: { segmentId: span.group.id }, part: "waffleGroupRule" });
|
|
424
|
+
let w = Math.min(span.w, Math.max(...span.wrap.lines.map((line) => measure(line, captionFont).width)));
|
|
425
|
+
requests.push({
|
|
426
|
+
id: `group:${span.group.id}:${span.row}`,
|
|
427
|
+
kind: "annotation",
|
|
428
|
+
owner: { segmentId: `group:${span.group.id}` },
|
|
429
|
+
text: span.group.label,
|
|
430
|
+
lines: span.wrap.lines,
|
|
431
|
+
font: captionFont,
|
|
432
|
+
typeRole: "label",
|
|
433
|
+
priority: PRIORITY.total,
|
|
434
|
+
align: "middle",
|
|
435
|
+
...span.wrap.truncated ? { title: span.group.label } : {},
|
|
436
|
+
candidates: [{ slot: "main", rect: { x: span.x + (span.w - w) / 2, y: captionTopOf(span.row), w, h: measure("0", captionFont).height + (span.wrap.lines.length - 1) * lineH(captionFont) }, penalty: 0 }]
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
function drawSquarePanel(pi, x0, rect, segmentMarks) {
|
|
440
|
+
let panel = panels[pi], segment = panel.segments[0], fill = panelPaint(pi, 0), pale = mixedPaint(fill, { token: "background" }, PALE_SQUARE), box = (x, y, side3) => `M${round2(x)} ${round2(y)}h${round2(side3)}v${round2(side3)}h${-round2(side3)}z`, restNodeId = `mark:rest:${panel.categoryId}`;
|
|
441
|
+
nodes.push({ t: "path", id: restNodeId, d: box(x0, rect.y, rect.w), fill: pale, owner: { categoryId: panel.categoryId, segmentId: "rest" }, part: "waffleRest" });
|
|
442
|
+
let side2 = rect.w * Math.sqrt(segment.value / 100), shareRect;
|
|
443
|
+
if (side2 > 0) {
|
|
444
|
+
shareRect = { x: round2(x0), y: round2(fillFrom === "bottom" ? rect.y + rect.h - side2 : rect.y), w: round2(side2), h: round2(side2) };
|
|
445
|
+
let nodeId = `mark:${segment.seriesId}:${panel.categoryId}`;
|
|
446
|
+
nodes.push({
|
|
447
|
+
t: "path",
|
|
448
|
+
id: nodeId,
|
|
449
|
+
d: box(shareRect.x, shareRect.y, side2),
|
|
450
|
+
fill,
|
|
451
|
+
owner: { seriesId: segment.seriesId, categoryId: panel.categoryId },
|
|
452
|
+
part: "waffleSegment",
|
|
453
|
+
display: { value: formatFor(0, pi)(segment.value) }
|
|
454
|
+
}), segmentMarks.push({ seriesId: segment.seriesId, nodeId, cells: 0 });
|
|
455
|
+
}
|
|
456
|
+
let referenceNodeId;
|
|
457
|
+
if (referenceSide > 0 && reference.categoryId !== panel.categoryId) {
|
|
458
|
+
let r = referenceSide, d = fillFrom === "bottom" ? `M${round2(x0)} ${round2(rect.y + rect.h - r)}H${round2(x0 + r)}V${round2(rect.y + rect.h)}` : `M${round2(x0 + r)} ${round2(rect.y)}V${round2(rect.y + r)}H${round2(x0)}`;
|
|
459
|
+
referenceNodeId = `mark:reference:${panel.categoryId}`, nodes.push({ t: "path", id: referenceNodeId, d, stroke: contrastInkPaint(referenceGround(pi)), width: strokeToken(theme, "rule"), dash: dashToken(theme, "reference"), owner: { categoryId: panel.categoryId, segmentId: "reference" }, part: "waffleReference" });
|
|
460
|
+
}
|
|
461
|
+
return { restNodeId, ...shareRect ? { shareRect } : {}, ...referenceNodeId ? { referenceNodeId } : {} };
|
|
462
|
+
}
|
|
463
|
+
function pushText(pi, x0, rect) {
|
|
464
|
+
let panel = panels[pi];
|
|
465
|
+
if (labelBlockH > 0 && labelTexts[pi] !== "") {
|
|
466
|
+
let w = wrapped[pi];
|
|
467
|
+
requests.push({
|
|
468
|
+
id: `category:${panel.categoryId}`,
|
|
469
|
+
kind: "category",
|
|
470
|
+
owner: { categoryId: panel.categoryId },
|
|
471
|
+
text: labelTexts[pi],
|
|
472
|
+
lines: w.lines,
|
|
473
|
+
font: labelFont,
|
|
474
|
+
typeRole: "label",
|
|
475
|
+
priority: PRIORITY.total,
|
|
476
|
+
...w.truncated ? { title: panel.label } : {},
|
|
477
|
+
candidates: [{ slot: "main", rect: { x: x0, y: rowY[positions[pi].row], w: labelW[pi], h: measure("0", labelFont).height + (w.lines.length - 1) * lineH(labelFont) }, penalty: 0 }]
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
let headline = headlineTexts[pi];
|
|
481
|
+
if (headlineH > 0 && headline !== void 0) {
|
|
482
|
+
let w = Math.min(panelW, measure(headline, headlineFont).width);
|
|
483
|
+
requests.push({
|
|
484
|
+
id: `total:${panel.categoryId}`,
|
|
485
|
+
kind: "total",
|
|
486
|
+
owner: { categoryId: panel.categoryId },
|
|
487
|
+
text: headline,
|
|
488
|
+
lines: [headline],
|
|
489
|
+
font: headlineFont,
|
|
490
|
+
typeRole: n > 1 ? "panelValue" : "kpiValue",
|
|
491
|
+
priority: PRIORITY.grandTotal,
|
|
492
|
+
candidates: [{ slot: "main", rect: { x: x0, y: square ? rect.y + rect.h + gapBelow : rowY[positions[pi].row] + rowLabelH[positions[pi].row] + gapLabelHeadline, w, h: headlineH }, penalty: 0 }]
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
!square && valuesH > 0 && panels.forEach((panel, pi) => {
|
|
497
|
+
panelValueLines[pi].forEach((text, i) => {
|
|
498
|
+
let value = series[i] ? valueText(i, pi) : restText(pi), name = series[i]?.label ?? options.strings?.others ?? strings.others, fitted = wrapText(name, keyFont, Math.max(1, panelW - measure(` ${value}`, keyFont).width), 1, measure), line = `${fitted.lines[0]} ${value}`;
|
|
499
|
+
requests.push({ id: `value:${panel.categoryId}:${i}`, kind: "total", owner: { categoryId: panel.categoryId, ...series[i] ? { seriesId: series[i].ser.id } : {} }, text, lines: [line], ...fitted.truncated ? { title: text } : {}, font: keyFont, typeRole: "label", priority: PRIORITY.total, candidates: [{ slot: "main", rect: { x: positions[pi].x, y: marks.panels[pi].rect.y + gridH + space.gapSubtitlePlot + i * valueStep, w: Math.min(panelW, measure(line, keyFont).width), h: measure(text, keyFont).height }, penalty: 0 }] });
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
let readoutLegend = readout ? { rect: { x: 0, y: 0, w: 0, h: 0 }, items: [] } : void 0;
|
|
503
|
+
if (readout) {
|
|
504
|
+
let rect = marks.panels[0].rect, rowMiddle = (row) => rect.y + row * pitch + side / 2, topAt = (baseline, font) => baseline - font.size * TEXT_ASCENT, from = 0, ranges = entries.map((_, i) => {
|
|
505
|
+
let count = i < series.length ? panels[0].segments[i].cells : cellCount - from, range = { from, to: from + count };
|
|
506
|
+
return from += count, range;
|
|
507
|
+
}), rowsOf = (range) => {
|
|
508
|
+
let counts = /* @__PURE__ */ new Map();
|
|
509
|
+
for (let k = range.from; k < range.to; k++) {
|
|
510
|
+
let { row } = cellAt(k, grid.columns, grid.rows, fillFrom);
|
|
511
|
+
counts.set(row, (counts.get(row) ?? 0) + 1);
|
|
512
|
+
}
|
|
513
|
+
let most = Math.max(0, maxOf(counts.values()));
|
|
514
|
+
return [...counts].filter(([, count]) => count === most).map(([row]) => row);
|
|
515
|
+
}, place = (i, x, cy, tick) => {
|
|
516
|
+
let entry = entries[i];
|
|
517
|
+
tick && nodes.push({ t: "line", id: `keyTick:${entry.id}`, x1: round2(x - 16), y1: round2(cy), x2: round2(x - 4), y2: round2(cy), stroke: { token: "leader" }, width: strokeToken(theme, "hair"), owner: {}, part: "leader" }), nodes.push({ t: "rect", id: `key:${entry.id}`, rect: { x: round2(x), y: round2(cy - 5), w: 10, h: 10 }, fill: entry.paint, owner: {}, part: "legendSwatch" });
|
|
518
|
+
let owner = entry.seriesId !== void 0 ? { seriesId: entry.seriesId } : {}, baseline = cy + (measure.capHeight?.(valueFont) ?? valueFont.size * 0.72) / 2;
|
|
519
|
+
requests.push({ id: `keyValue:${entry.id}`, kind: "annotation", owner, text: entry.value, lines: [entry.value], font: valueFont, typeRole: "label", priority: PRIORITY.total, candidates: [{ slot: "main", rect: { x: x + 16, y: topAt(baseline, valueFont), w: measure(entry.value, valueFont).width, h: valueFont.size }, penalty: 0 }] }), requests.push({ id: `key:${entry.id}`, kind: "annotation", owner, text: entry.name, lines: [entry.name], font: keyFont, typeRole: "label", priority: PRIORITY.total, candidates: [{ slot: "main", rect: { x: x + 16 + valueCol, y: topAt(baseline, keyFont), w: measure(entry.name, keyFont).width, h: keyFont.size }, penalty: 0 }] }), readoutLegend.items.push({ id: entry.id, swatchNodeId: `key:${entry.id}`, labelId: `label:key:${entry.id}` });
|
|
520
|
+
}, coveredCells = panels[0].segments.slice(0, subtotalCount).reduce((sum, segment) => sum + segment.cells, 0);
|
|
521
|
+
if (readoutSide) {
|
|
522
|
+
let order = entries.map((_, i) => {
|
|
523
|
+
let rows = rowsOf(ranges[i]);
|
|
524
|
+
return { i, y: rows.length ? rows.reduce((sum, row) => sum + rowMiddle(row), 0) / rows.length : rect.y + rect.h / 2 };
|
|
525
|
+
}).sort((a, b) => a.y - b.y || b.i - a.i);
|
|
526
|
+
for (let k = 1; k < order.length; k++) order[k].y = Math.max(order[k].y, order[k - 1].y + entryStep);
|
|
527
|
+
let lowest = rect.y + rect.h - entryStep / 2;
|
|
528
|
+
order.length && (order[order.length - 1].y = Math.min(order[order.length - 1].y, lowest));
|
|
529
|
+
for (let k = order.length - 2; k >= 0; k--) order[k].y = Math.min(order[k].y, order[k + 1].y - entryStep);
|
|
530
|
+
let x = rect.x + rect.w + 20;
|
|
531
|
+
for (let { i, y } of order) place(i, x, y, !0);
|
|
532
|
+
if (readoutLegend.rect = { x: rect.x + rect.w + 4, y: rect.y, w: entryW + 16, h: rect.h }, subtotal && coveredCells > 0) {
|
|
533
|
+
let rows = Array.from({ length: coveredCells }, (_, k) => cellAt(k, grid.columns, grid.rows, fillFrom).row), top = rect.y + minOf(rows) * pitch, bottom = rect.y + (maxOf(rows) + 1) * pitch - gap, bx = x + entryW + 24;
|
|
534
|
+
nodes.push({ t: "path", id: "subtotal:bracket", d: `M${round2(bx)} ${round2(top)}H${round2(bx + 6)}V${round2(bottom)}H${round2(bx)}`, stroke: { token: "ink" }, width: strokeToken(theme, "rule"), owner: { segmentId: "subtotal" }, part: "waffleSubtotal" });
|
|
535
|
+
let valueBase = (top + bottom) / 2 + 2, labelBase = valueBase + lineH(keyFont) + 2;
|
|
536
|
+
requests.push({ id: "subtotal:value", kind: "total", owner: { segmentId: "subtotal" }, text: subtotalText, lines: [subtotalText], font: subValueFont, typeRole: "label", priority: PRIORITY.grandTotal, candidates: [{ slot: "main", rect: { x: bx + 18, y: topAt(valueBase, subValueFont), w: subValueW, h: subValueFont.size }, penalty: 0 }] }), requests.push({ id: "subtotal:label", kind: "annotation", owner: { segmentId: "subtotal" }, text: subtotal.label, lines: [subtotal.label], font: keyFont, typeRole: "label", priority: PRIORITY.grandTotal, candidates: [{ slot: "main", rect: { x: bx + 18, y: topAt(labelBase, keyFont), w: subLabelW, h: keyFont.size }, penalty: 0 }] });
|
|
537
|
+
}
|
|
538
|
+
} else {
|
|
539
|
+
let top = rect.y + rect.h + space.gapSubtitlePlot, colW = plot.w / keyColumns;
|
|
540
|
+
if (entries.forEach((_, i) => place(i, plot.x + i % keyColumns * colW, top + Math.floor(i / keyColumns) * entryStep + entryStep / 2, !1)), readoutLegend.rect = { x: plot.x, y: top, w: plot.w, h: keyRows * entryStep }, subtotal) {
|
|
541
|
+
let ruleY = round2(top + keyRows * entryStep + 8);
|
|
542
|
+
nodes.push({ t: "line", id: "subtotal:rule", x1: plot.x, y1: ruleY, x2: round2(plot.x + plot.w), y2: ruleY, stroke: { token: "leader" }, width: strokeToken(theme, "hair"), owner: { segmentId: "subtotal" }, part: "waffleSubtotal" });
|
|
543
|
+
let baseline = ruleY + 10 + subLineH;
|
|
544
|
+
requests.push({ id: "subtotal:value", kind: "total", owner: { segmentId: "subtotal" }, text: subtotalText, lines: [subtotalText], font: subValueFont, typeRole: "label", priority: PRIORITY.grandTotal, candidates: [{ slot: "main", rect: { x: plot.x, y: topAt(baseline, subValueFont), w: subValueW, h: subValueFont.size }, penalty: 0 }] }), requests.push({ id: "subtotal:label", kind: "annotation", owner: { segmentId: "subtotal" }, text: subtotal.label, lines: [subtotal.label], font: keyFont, typeRole: "label", priority: PRIORITY.grandTotal, candidates: [{ slot: "main", rect: { x: plot.x + subValueW + 6, y: topAt(baseline, keyFont), w: subLabelW, h: keyFont.size }, penalty: 0 }] });
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
let solveCtx = labelCtx(theme, size, options, {
|
|
549
|
+
measure,
|
|
550
|
+
plot,
|
|
551
|
+
labelPad: 2
|
|
552
|
+
}), fontOf = new Map(requests.map((request) => [request.id, request.font])), solved = solveLabels(requests, occupied, solveCtx), hiddenReference = solved.placed.find((label) => label.id === "reference" && label.hidden);
|
|
553
|
+
hiddenReference && (hiddenReference.hidden = "redundant", hiddenReference.noteLocation = referenceNote ? frame.frame.footnoteNodeIds?.[0] : `legend:${referenceId}`, referenceNote && (hiddenReference.noted = !0), solved.warnings = solved.warnings.filter((warning) => warning.code !== "label-hidden" || !warning.message.includes("label 'reference'"))), pushAll(warnings, solved.warnings);
|
|
554
|
+
for (let label of solved.placed)
|
|
555
|
+
!label.hidden && label.id.startsWith("category:") && (label.ink = { token: theme.type.eyebrow?.ink ?? "inkMuted" }), !label.hidden && label.id === "subtotal:label" && (label.ink = { token: "inkMuted" });
|
|
556
|
+
let allLabels = solved.placed;
|
|
557
|
+
pushAll(nodes, labelsToNodes(theme, allLabels, (label) => fontOf.get(label.id) ?? labelFont).map((node) => node.t === "text" && node.owner.seriesId !== void 0 && (node.id.startsWith("label:key:") || node.id.startsWith("label:value:")) ? { ...node, part: "legendLabel", role: textRole(node) } : node.t === "text" && (node.id.startsWith("label:keyValue:") || node.id === "label:subtotal:value") ? { ...node, role: "value" } : (node.id.startsWith("label:total:") ? panels.find((panel) => `label:total:${panel.categoryId}` === node.id) : void 0) && node.t === "text" ? { ...node, display: { value: node.lines.join(" ") } } : node)), marks.panels.forEach((mark) => {
|
|
558
|
+
mark.labelNodeId = allLabels.find((label) => label.id === `category:${mark.categoryId}`)?.nodeId, mark.headlineNodeId = allLabels.find((label) => label.id === `total:${mark.categoryId}`)?.nodeId;
|
|
559
|
+
});
|
|
560
|
+
let headlineMin = showHeadline ? Math.max(0, maxOf(headlineValues.map((text) => text === void 0 ? 0 : measure(text, { ...headlineFont, size: hero.minimum }).width))) : 0, minPanelW = square ? Math.max(SQUARE_MIN_SIDE, Math.ceil(headlineMin), Math.ceil(Math.max(0, maxOf(longestWord)))) : Math.max(grid.columns * MIN_PITCH, Math.ceil(headlineMin)), floorColumns = square ? minColumns : Math.min(n, columns), floorGutter = square && !arrows && floorColumns > 1 ? COMPACT_GUTTER : gutter, minWidth = size.width - plot.w + Math.max(
|
|
561
|
+
floorColumns * minPanelW + (floorColumns - 1) * floorGutter,
|
|
562
|
+
readout ? Math.ceil(Math.max(entryW, subtotal ? subValueW + 6 + subLabelW : 0)) : 0
|
|
563
|
+
), floorGridH = square ? Math.min(grid.rows * MIN_PITCH, panelW) : grid.rows * MIN_PITCH, minHeight = frameH + Math.max(blocksH(rowRequiredBottomH) + panelRows.length * floorGridH + (panelRows.length - 1) * gutter, topBlockH + keyH), reading = panels.map((panel, pi) => describePanel(panel, series.map((s) => s.label), headlineFormat(pi), cellCount, options)), geometry = {
|
|
564
|
+
type: "waffle",
|
|
565
|
+
size,
|
|
566
|
+
sizing: resolveSizing({ ...WAFFLE_SIZING, minWidth: 0 }, size, { minWidth, minHeight, naturalHeight }),
|
|
567
|
+
plot,
|
|
568
|
+
scene: nodes,
|
|
569
|
+
labels: allLabels,
|
|
570
|
+
axes: [],
|
|
571
|
+
annotations: [],
|
|
572
|
+
legend: readoutLegend ?? frame.legend,
|
|
573
|
+
frame: frame.frame,
|
|
574
|
+
marks,
|
|
575
|
+
derived: {
|
|
576
|
+
grid: { ...grid, cells: cellCount },
|
|
577
|
+
fillFrom,
|
|
578
|
+
variant: square ? "square" : "cells",
|
|
579
|
+
...reference ? { reference } : {},
|
|
580
|
+
cellShare: Math.round(cellShare * 1e9) / 1e9,
|
|
581
|
+
panels,
|
|
582
|
+
...adjustments.length > 0 ? { roundingAdjustments: adjustments } : {}
|
|
583
|
+
},
|
|
584
|
+
a11y: {
|
|
585
|
+
title: accessibleTitle(options.title, chartString(options, "waffleTitle", { v1: panels.map((panel) => panel.label).join(", ") })),
|
|
586
|
+
counts: [structureCount("panels", n, chartString(options, "panelsCount", { v1: n, v2: n === 1 ? "panel" : "panels" })), structureCount("series", series.length, chartString(options, "seriesCount", { v1: series.length })), ...square ? [] : [structureCount("cells", cellCount, void 0, options)]],
|
|
587
|
+
desc: square ? chartString(options, "waffleSquareDesc", { v1: n, v2: n === 1 ? "panel" : "panels", v3: series.length, v4: reading.join(" "), v5: reference && !(reference.categoryId !== void 0 && n === 1) ? chartString(options, "waffleReferenceDesc", { v1: reference.categoryId !== void 0 ? chartString(options, "otherPanels") : chartString(options, "eachPanel"), v2: reference.label }) : "" }) : chartString(options, "waffleCellsDesc", { v1: n, v2: n === 1 ? "panel" : "panels", v3: series.length, v4: grid.rows, v5: grid.columns, v6: cellCount, v7: formatAutomaticPercent(cellShare, autoDecimals(cellShare), !1, options.locale?.language), v8: reading.join(" ") })
|
|
588
|
+
},
|
|
589
|
+
warnings,
|
|
590
|
+
debug: { occupied: occupied.snapshot(), decisions: solved.decisions }
|
|
591
|
+
}, fits = Math.max(minHeight, frame.frame.minHeight ?? 0) <= size.height + 1e-6 && minWidth <= size.width + 1e-6;
|
|
592
|
+
return { geometry, naturalHeight, fits };
|
|
593
|
+
}
|
|
594
|
+
function describePanel(panel, names, headline, cellCount, options) {
|
|
595
|
+
let many = panel.segments.length > 1, parts = panel.segments.map((segment, si) => `${many ? `${names[si]} ` : ""}${segment.reading}`), rest = cellCount - panel.filledCells;
|
|
596
|
+
return `${panel.label}: ${parts.join(", ")}${many ? chartString(options, "waffleAllClause", { v1: headline(panel.total) }) : ""}${rest > 0 && many ? chartString(options, "emptyCellsClause", { v1: rest, v2: cellCount }) : ""}.`;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
// src/core/charts/waffle/core.ts
|
|
600
|
+
var waffleCore = {
|
|
601
|
+
type: "waffle",
|
|
602
|
+
sizing: WAFFLE_SIZING,
|
|
603
|
+
title: "Waffle",
|
|
604
|
+
summary: "Share of a whole as a grid of square cells, one panel per category: label, headline total and whole-cell segments (largest-remainder rounding), filled from the bottom left",
|
|
605
|
+
layout: (data, options) => layoutWaffle(prepareFractionData(data), options),
|
|
606
|
+
prepare: prepareFractionData,
|
|
607
|
+
defaults: { grid: { rows: 10, columns: 10 }, fillFrom: "bottom" },
|
|
608
|
+
annotationKinds: []
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
export {
|
|
612
|
+
waffleCore
|
|
613
|
+
};
|