@primeui/chart-core 0.0.1-alpha.1 → 1.0.0-rc.1
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/LICENSE.md +35 -0
- package/README.md +12 -0
- package/dist/animations/index.d.mts +1 -1
- package/dist/animations/index.mjs +19 -18
- package/dist/{annotation.utils-Bm0lOO1o.d.mts → annotation.utils-D-7ijAWO.d.mts} +22 -1
- package/dist/cartesian/index.d.mts +3 -2
- package/dist/cartesian/index.mjs +96 -93
- package/dist/{chunk-WPFUV7K3.mjs → chunks/chunk-2LLTN7T4.mjs} +23 -14
- package/dist/{chunk-RO4N6YFS.mjs → chunks/chunk-2T226WJI.mjs} +31 -14
- package/dist/{chunk-3FFJEX4A.mjs → chunks/chunk-3QQLETCJ.mjs} +13 -12
- package/dist/{chunk-JWFBOPM6.mjs → chunks/chunk-4N2XIMAB.mjs} +2 -2
- package/dist/{chunk-LVMDQ4OJ.mjs → chunks/chunk-4S3FOFCN.mjs} +2 -2
- package/dist/{chunk-XTVE4P3L.mjs → chunks/chunk-56MASQS2.mjs} +6 -2
- package/dist/{chunk-DTWTCFRG.mjs → chunks/chunk-5EQSFUBA.mjs} +41 -13
- package/dist/{chunk-KQIFO5I3.mjs → chunks/chunk-5QSTMSPW.mjs} +15 -10
- package/dist/{chunk-NKUYIWAP.mjs → chunks/chunk-6LUIVTNV.mjs} +6 -6
- package/dist/chunks/chunk-6MAO6I3E.mjs +6 -0
- package/dist/{chunk-DN6AXQYZ.mjs → chunks/chunk-72M66Y2U.mjs} +46 -41
- package/dist/{chunk-WFVOQ2QZ.mjs → chunks/chunk-77K3DEKL.mjs} +2 -2
- package/dist/{chunk-4C6EVJ54.mjs → chunks/chunk-7I2SAKHL.mjs} +7 -44
- package/dist/{chunk-6HSEJLSR.mjs → chunks/chunk-7I2SNJ2X.mjs} +35 -18
- package/dist/{chunk-66T4MRC5.mjs → chunks/chunk-7IKKWWRT.mjs} +4 -6
- package/dist/{chunk-BKP26M4K.mjs → chunks/chunk-7LZWQVTL.mjs} +43 -24
- package/dist/{chunk-NHRK5KU2.mjs → chunks/chunk-A5YBHYIS.mjs} +25 -17
- package/dist/{chunk-ZT2Z7ERM.mjs → chunks/chunk-AC5EAWIP.mjs} +12 -9
- package/dist/{chunk-ZTL2FQEW.mjs → chunks/chunk-AETETRB4.mjs} +24 -9
- package/dist/{chunk-NPDZLYIF.mjs → chunks/chunk-AJ24XDEK.mjs} +2 -2
- package/dist/chunks/chunk-ARVMVGWS.mjs +40 -0
- package/dist/{chunk-3IYSJ2U7.mjs → chunks/chunk-AYEAEAOV.mjs} +10 -7
- package/dist/{chunk-M7B3JF43.mjs → chunks/chunk-AZPJMIZE.mjs} +4 -3
- package/dist/{chunk-O2X6FF45.mjs → chunks/chunk-BDCNBS6W.mjs} +194 -168
- package/dist/{chunk-55Y3WI6S.mjs → chunks/chunk-BR4PSSPU.mjs} +6 -6
- package/dist/{chunk-TA4MVAEX.mjs → chunks/chunk-CFA2SUBF.mjs} +32 -24
- package/dist/{chunk-WH3C3Y7P.mjs → chunks/chunk-CKQ4DNNJ.mjs} +7 -18
- package/dist/chunks/chunk-DIJFKY6H.mjs +21 -0
- package/dist/{chunk-AUF4CHDP.mjs → chunks/chunk-DJOHDKTP.mjs} +18 -11
- package/dist/{chunk-3Z62EUJN.mjs → chunks/chunk-DKWZKYHF.mjs} +5 -5
- package/dist/{chunk-Y3L3D4GQ.mjs → chunks/chunk-DORUY7GR.mjs} +69 -34
- package/dist/chunks/chunk-DWBJKYLH.mjs +238 -0
- package/dist/{chunk-XQQCGFYB.mjs → chunks/chunk-EQLCJTM4.mjs} +1 -1
- package/dist/{chunk-VGLSBZDN.mjs → chunks/chunk-F2E2QCZM.mjs} +1 -1
- package/dist/{chunk-BZN2QHGP.mjs → chunks/chunk-F6AGZQDA.mjs} +4 -72
- package/dist/{chunk-ILUWFYGY.mjs → chunks/chunk-FNMLVZOA.mjs} +8 -8
- package/dist/{chunk-SXHVDJGF.mjs → chunks/chunk-FQAFGPW6.mjs} +6 -6
- package/dist/{chunk-N3TIT3OH.mjs → chunks/chunk-FSPE3M5E.mjs} +66 -43
- package/dist/{chunk-KNDZP446.mjs → chunks/chunk-FSWYYRPX.mjs} +5 -5
- package/dist/{chunk-KP2TWD4Z.mjs → chunks/chunk-FWNWV3H7.mjs} +1 -1
- package/dist/{chunk-WCG35U6M.mjs → chunks/chunk-FYVMRQFF.mjs} +35 -27
- package/dist/chunks/chunk-G3DIMENH.mjs +63 -0
- package/dist/{chunk-QQBXUDM4.mjs → chunks/chunk-G3DYNMWT.mjs} +20 -16
- package/dist/{chunk-J65DBT4R.mjs → chunks/chunk-GA6YZQYT.mjs} +3 -3
- package/dist/chunks/chunk-GAQLLQUM.mjs +20 -0
- package/dist/{chunk-TAHCOZHF.mjs → chunks/chunk-GN7VQCCH.mjs} +27 -30
- package/dist/{chunk-R6Y3R7EW.mjs → chunks/chunk-GOOBVFFH.mjs} +1 -1
- package/dist/chunks/chunk-GSW5OBEG.mjs +233 -0
- package/dist/{chunk-22ST6YPP.mjs → chunks/chunk-GTX6MLTG.mjs} +9 -9
- package/dist/{chunk-XUAASRXW.mjs → chunks/chunk-GWHRTGGC.mjs} +35 -27
- package/dist/{chunk-TQ6S34QZ.mjs → chunks/chunk-GXCLRRE5.mjs} +6 -6
- package/dist/{chunk-DP2IZNN3.mjs → chunks/chunk-HHBFQ6AI.mjs} +4 -3
- package/dist/{chunk-3OZLP4I4.mjs → chunks/chunk-HWT6UEYE.mjs} +14 -10
- package/dist/{chunk-X7T34OLW.mjs → chunks/chunk-I25SSZE3.mjs} +3 -3
- package/dist/{chunk-OGJ6IIBW.mjs → chunks/chunk-IFJPDARC.mjs} +21 -9
- package/dist/{chunk-CINXJIRR.mjs → chunks/chunk-ISU27QL2.mjs} +66 -6
- package/dist/{chunk-OXTFAWSK.mjs → chunks/chunk-J2WHJ73Y.mjs} +7 -2
- package/dist/{chunk-VN7CKCSE.mjs → chunks/chunk-JS47MSB2.mjs} +9 -1
- package/dist/{chunk-WYLILAOO.mjs → chunks/chunk-K44SD67H.mjs} +16 -7
- package/dist/{chunk-RQ3CKQOX.mjs → chunks/chunk-K7AGQTVK.mjs} +63 -3
- package/dist/{chunk-VVI3OBPJ.mjs → chunks/chunk-KCSMOAZO.mjs} +7 -9
- package/dist/{chunk-ARRGOEFX.mjs → chunks/chunk-L6GXEQOO.mjs} +7 -7
- package/dist/{chunk-7QQ6ETB4.mjs → chunks/chunk-LBNP5PJA.mjs} +14 -12
- package/dist/{chunk-AHYIS6EB.mjs → chunks/chunk-LC2ZEZWP.mjs} +7 -7
- package/dist/{chunk-3WEMHXZI.mjs → chunks/chunk-LTQH3LQJ.mjs} +2 -8
- package/dist/{chunk-OHGCZZPZ.mjs → chunks/chunk-M5PZVFY5.mjs} +57 -29
- package/dist/{chunk-A6ZQZFL2.mjs → chunks/chunk-NUHW3U7G.mjs} +14 -11
- package/dist/{chunk-QWQ6HY4I.mjs → chunks/chunk-O4BTKF5R.mjs} +9 -8
- package/dist/{chunk-WY4AURRE.mjs → chunks/chunk-P2Q4DYOS.mjs} +240 -83
- package/dist/{chunk-KVDEROP6.mjs → chunks/chunk-P563L7WL.mjs} +1 -1
- package/dist/{chunk-SDBPQ5CF.mjs → chunks/chunk-PJLFNUOW.mjs} +45 -30
- package/dist/{chunk-MTGMXRNF.mjs → chunks/chunk-PSDRVQSK.mjs} +7 -7
- package/dist/{chunk-6STOLMCA.mjs → chunks/chunk-QCBESCLG.mjs} +13 -12
- package/dist/{chunk-PRDVPOZX.mjs → chunks/chunk-QIYJUZ7I.mjs} +7 -2
- package/dist/{chunk-UPRXABX5.mjs → chunks/chunk-RH3OQ2VX.mjs} +6 -6
- package/dist/{chunk-QS76E3TD.mjs → chunks/chunk-RI32WIDX.mjs} +2 -2
- package/dist/{chunk-OWW3K55O.mjs → chunks/chunk-RIAPS5AW.mjs} +49 -7
- package/dist/{chunk-ERVQB2VZ.mjs → chunks/chunk-RJ3ZOZTS.mjs} +4 -4
- package/dist/{chunk-WFTX4AQJ.mjs → chunks/chunk-RKNL7UWZ.mjs} +19 -7
- package/dist/chunks/chunk-RLS3GMJ6.mjs +8 -0
- package/dist/{chunk-WRULPWHD.mjs → chunks/chunk-RVTEIKW5.mjs} +5 -5
- package/dist/{chunk-PLSDU3C2.mjs → chunks/chunk-RXQ22JQS.mjs} +67 -39
- package/dist/{chunk-FHTC2YDB.mjs → chunks/chunk-SVASYTK5.mjs} +70 -5
- package/dist/{chunk-ARB5T6MP.mjs → chunks/chunk-SWVOBJLG.mjs} +3 -100
- package/dist/{chunk-JGOVWSKH.mjs → chunks/chunk-TW3KLJVO.mjs} +37 -12
- package/dist/{chunk-RBLZRT5K.mjs → chunks/chunk-UF2TPGQB.mjs} +103 -15
- package/dist/{chunk-X4D7FKUS.mjs → chunks/chunk-UZWWYKL7.mjs} +2 -2
- package/dist/{chunk-LKC7MZKK.mjs → chunks/chunk-XECVYJE2.mjs} +16 -8
- package/dist/chunks/chunk-XMSAUIVL.mjs +1 -0
- package/dist/{chunk-J4RI2C2G.mjs → chunks/chunk-XPZTRMU2.mjs} +6 -6
- package/dist/{chunk-BABQKA6K.mjs → chunks/chunk-XXJRGDKE.mjs} +3 -3
- package/dist/{chunk-SALTGZFR.mjs → chunks/chunk-YVDVKLPR.mjs} +10 -9
- package/dist/circular/arc/index.mjs +3 -3
- package/dist/circular/index.d.mts +1 -1
- package/dist/circular/index.mjs +14 -13
- package/dist/controllers/index.mjs +113 -110
- package/dist/{datalabel.utils-CkjGeB8S.d.mts → datalabel.utils-CNRKHy7j.d.mts} +10 -1
- package/dist/{decimation.utils-CcvJVhI4.d.mts → decimation.utils-C0xpslz_.d.mts} +33 -2
- package/dist/geometry-BVWJedvw.d.mts +53 -0
- package/dist/index.d.mts +16 -17
- package/dist/index.mjs +113 -110
- package/dist/luminance-TvUgaQ91.d.mts +57 -0
- package/dist/orchestrator/index.d.mts +2 -2
- package/dist/orchestrator/index.mjs +36 -33
- package/dist/plugins/index.mjs +1 -1
- package/dist/{property-animations-D433wXzz.d.mts → property-animations-CI0zyp6V.d.mts} +6 -20
- package/dist/radial/index.mjs +40 -37
- package/dist/renderers/axis/index.mjs +9 -8
- package/dist/renderers/index.d.mts +8 -9
- package/dist/renderers/index.mjs +78 -75
- package/dist/renderers/navigator/index.d.mts +1 -1
- package/dist/renderers/navigator/index.mjs +10 -8
- package/dist/{ring.utils-DXvrxMkU.d.mts → ring.utils-aHt9Nqum.d.mts} +2 -7
- package/dist/{scale-KFv30jqZ.d.mts → scale-CFkPlyUe.d.mts} +2 -2
- package/dist/{scales-Drf8AIhL.d.mts → scales-BZzjlR4U.d.mts} +15 -1
- package/dist/series/bar/canvas/index.mjs +11 -10
- package/dist/series/bar/controller/index.d.mts +17 -0
- package/dist/series/bar/controller/index.mjs +47 -44
- package/dist/series/bar/controller-canvas/index.mjs +47 -44
- package/dist/series/bar/controller-svg/index.mjs +47 -44
- package/dist/series/bar/index.d.mts +2 -2
- package/dist/series/bar/index.mjs +16 -13
- package/dist/series/bar/svg/index.mjs +14 -11
- package/dist/series/candlestick/canvas/index.mjs +8 -8
- package/dist/series/candlestick/controller/index.d.mts +2 -0
- package/dist/series/candlestick/controller/index.mjs +43 -40
- package/dist/series/candlestick/controller-canvas/index.mjs +43 -40
- package/dist/series/candlestick/controller-svg/index.mjs +43 -40
- package/dist/series/candlestick/index.mjs +11 -10
- package/dist/series/candlestick/svg/index.mjs +8 -8
- package/dist/series/heatmap/canvas/index.mjs +9 -9
- package/dist/series/heatmap/controller/index.d.mts +9 -0
- package/dist/series/heatmap/controller/index.mjs +26 -23
- package/dist/series/heatmap/controller-canvas/index.mjs +26 -23
- package/dist/series/heatmap/controller-svg/index.mjs +26 -23
- package/dist/series/heatmap/index.mjs +14 -13
- package/dist/series/heatmap/svg/index.mjs +11 -10
- package/dist/series/line/canvas/index.mjs +9 -9
- package/dist/series/line/controller/index.d.mts +7 -0
- package/dist/series/line/controller/index.mjs +51 -47
- package/dist/series/line/controller-canvas/index.mjs +53 -49
- package/dist/series/line/controller-svg/index.mjs +53 -49
- package/dist/series/line/index.d.mts +1 -1
- package/dist/series/line/index.mjs +17 -13
- package/dist/series/line/svg/index.mjs +12 -9
- package/dist/series/pie/canvas/index.d.mts +12 -4
- package/dist/series/pie/canvas/index.mjs +15 -10
- package/dist/series/pie/controller/index.mjs +113 -110
- package/dist/series/pie/controller-canvas/index.mjs +113 -110
- package/dist/series/pie/controller-svg/index.mjs +113 -110
- package/dist/series/pie/index.d.mts +3 -56
- package/dist/series/pie/index.mjs +11 -15
- package/dist/series/pie/svg/index.d.mts +18 -4
- package/dist/series/pie/svg/index.mjs +10 -11
- package/dist/series/polar/canvas/index.mjs +7 -7
- package/dist/series/polar/controller/index.d.mts +9 -0
- package/dist/series/polar/controller/index.mjs +49 -46
- package/dist/series/polar/controller-canvas/index.mjs +50 -47
- package/dist/series/polar/controller-svg/index.mjs +50 -47
- package/dist/series/polar/index.d.mts +1 -1
- package/dist/series/polar/index.mjs +19 -16
- package/dist/series/polar/svg/index.mjs +11 -8
- package/dist/series/radar/canvas/index.mjs +8 -8
- package/dist/series/radar/controller/index.d.mts +11 -0
- package/dist/series/radar/controller/index.mjs +46 -43
- package/dist/series/radar/controller-canvas/index.mjs +49 -46
- package/dist/series/radar/controller-svg/index.mjs +49 -46
- package/dist/series/radar/index.d.mts +3 -3
- package/dist/series/radar/index.mjs +16 -13
- package/dist/series/radar/svg/index.mjs +12 -9
- package/dist/series/scatter/canvas/index.mjs +13 -11
- package/dist/series/scatter/controller/index.mjs +48 -44
- package/dist/series/scatter/controller-canvas/index.mjs +50 -46
- package/dist/series/scatter/controller-svg/index.mjs +50 -46
- package/dist/series/scatter/index.d.mts +1 -1
- package/dist/series/scatter/index.mjs +18 -14
- package/dist/series/scatter/svg/index.mjs +16 -12
- package/dist/series/treemap/canvas/index.mjs +10 -10
- package/dist/series/treemap/controller/index.mjs +23 -20
- package/dist/series/treemap/controller-canvas/index.mjs +23 -20
- package/dist/series/treemap/controller-svg/index.mjs +23 -20
- package/dist/series/treemap/index.d.mts +17 -9
- package/dist/series/treemap/index.mjs +12 -12
- package/dist/series/treemap/svg/index.mjs +9 -9
- package/dist/{stacking-CChuAcLN.d.mts → stacking-Dz1OBhzm.d.mts} +1 -1
- package/dist/sync/index.mjs +6 -5
- package/dist/{tooltip.renderer-D5wpSlBa.d.mts → tooltip.renderer-C3z-UKm4.d.mts} +4 -4
- package/dist/utils/color/index.d.mts +11 -53
- package/dist/utils/color/index.mjs +4 -4
- package/dist/utils/data/index.d.mts +2 -2
- package/dist/utils/data/index.mjs +7 -7
- package/dist/utils/export/index.mjs +6 -6
- package/dist/utils/index.d.mts +7 -7
- package/dist/utils/index.mjs +32 -29
- package/dist/utils/interaction/index.d.mts +1 -31
- package/dist/utils/interaction/index.mjs +12 -9
- package/dist/utils/layout/index.mjs +10 -10
- package/dist/utils/math/index.d.mts +1 -1
- package/dist/utils/math/index.mjs +1 -1
- package/dist/utils/render/index.mjs +3 -3
- package/dist/utils/specialized/index.d.mts +1 -1
- package/dist/utils/specialized/index.mjs +13 -15
- package/dist/utils/text/index.d.mts +1 -1
- package/dist/utils/text/index.mjs +9 -8
- package/dist/utils/theme/index.d.mts +6 -6
- package/dist/utils/theme/index.mjs +5 -5
- package/dist/utils/zoom/index.mjs +3 -3
- package/package.json +5 -10
- package/LICENSE +0 -23
- package/dist/canvas-D4vigq47.d.mts +0 -34
- package/dist/chunk-2QRS4YQ5.mjs +0 -18
- package/dist/chunk-53HW45JB.mjs +0 -102
- package/dist/chunk-B4FTADAZ.mjs +0 -561
- package/dist/chunk-IXOWSEHO.mjs +0 -114
- package/dist/chunk-VWF57TS3.mjs +0 -62
- package/dist/chunk-XIHBK5D3.mjs +0 -68
- package/dist/renderers/circular/index.d.mts +0 -13
- package/dist/renderers/circular/index.mjs +0 -13
- package/dist/{chunk-WA3OVISZ.mjs → chunks/chunk-4KQZXAHZ.mjs} +0 -0
- package/dist/{chunk-CHW4RKY3.mjs → chunks/chunk-576P5DBH.mjs} +0 -0
- package/dist/{chunk-EDAKJLNA.mjs → chunks/chunk-5WFF272M.mjs} +0 -0
- package/dist/{chunk-ADKLH73T.mjs → chunks/chunk-6XZ6U7GL.mjs} +0 -0
- package/dist/{chunk-2QK2KOBN.mjs → chunks/chunk-AOTUNMVD.mjs} +0 -0
- package/dist/{chunk-AGU3NG6D.mjs → chunks/chunk-AWMO5TS3.mjs} +0 -0
- package/dist/{chunk-SSLTFJ3U.mjs → chunks/chunk-BF7RP4A3.mjs} +132 -132
- /package/dist/{chunk-BETFQBM2.mjs → chunks/chunk-FML3QEEI.mjs} +0 -0
- /package/dist/{chunk-FFMT6OCO.mjs → chunks/chunk-FRVJH7ZG.mjs} +0 -0
- /package/dist/{chunk-HDFGCN2F.mjs → chunks/chunk-HBTCRORW.mjs} +0 -0
- /package/dist/{chunk-7CMVDIOU.mjs → chunks/chunk-HXDLOOCS.mjs} +0 -0
- /package/dist/{chunk-5JCI2DEB.mjs → chunks/chunk-JQVX6XFW.mjs} +0 -0
- /package/dist/{chunk-C36VWQ7A.mjs → chunks/chunk-KMKULH54.mjs} +0 -0
- /package/dist/{chunk-Q6PPVIHU.mjs → chunks/chunk-MT3OLVZC.mjs} +0 -0
- /package/dist/{chunk-WS64BZXT.mjs → chunks/chunk-OWVSSQZ4.mjs} +0 -0
- /package/dist/{chunk-EAMUNLRU.mjs → chunks/chunk-P2LG7GDM.mjs} +0 -0
- /package/dist/{chunk-IEGLX7VL.mjs → chunks/chunk-PXUXZADY.mjs} +0 -0
- /package/dist/{chunk-SANZPAJ4.mjs → chunks/chunk-SFUDXJKO.mjs} +0 -0
- /package/dist/{chunk-ZQFK6CAE.mjs → chunks/chunk-SJNUJM54.mjs} +0 -0
- /package/dist/{chunk-AP3UYWYT.mjs → chunks/chunk-SPU6BO3B.mjs} +0 -0
- /package/dist/{chunk-YBJ56XJS.mjs → chunks/chunk-T2UAEMHY.mjs} +0 -0
- /package/dist/{chunk-JO7VACY2.mjs → chunks/chunk-VADXCPQ4.mjs} +0 -0
- /package/dist/{chunk-FRST55HY.mjs → chunks/chunk-ZZCVDIU5.mjs} +0 -0
|
@@ -1,4 +1,195 @@
|
|
|
1
|
-
import { hexToRgba, createSvgRadialGradient, createSvgLinearGradient, createCanvasRadialGradient, createCanvasLinearGradient, parseColorToRGB } from './chunk-
|
|
1
|
+
import { hexToRgba, createSvgRadialGradient, createSvgLinearGradient, createCanvasRadialGradient, createCanvasLinearGradient, parseColorToRGB } from './chunk-BF7RP4A3.mjs';
|
|
2
|
+
|
|
3
|
+
// src/themes/default.ts
|
|
4
|
+
var defaultLightTheme = {
|
|
5
|
+
// Series — 14-color premium pastel palette, rotated for adjacent categorical contrast.
|
|
6
|
+
// Lively enough for default demos, softer than utility-palette primaries.
|
|
7
|
+
series: [
|
|
8
|
+
"#5daeea",
|
|
9
|
+
// Azure
|
|
10
|
+
"#ffad5a",
|
|
11
|
+
// Apricot
|
|
12
|
+
"#ffd166",
|
|
13
|
+
// Gold
|
|
14
|
+
"#4ecdc4",
|
|
15
|
+
// Aqua
|
|
16
|
+
"#7c8cff",
|
|
17
|
+
// Periwinkle
|
|
18
|
+
"#c084fc",
|
|
19
|
+
// Lavender
|
|
20
|
+
"#ff6fae",
|
|
21
|
+
// Rose
|
|
22
|
+
"#9ccc3c",
|
|
23
|
+
// Lime
|
|
24
|
+
"#ff7a66",
|
|
25
|
+
// Coral
|
|
26
|
+
"#36b7d6",
|
|
27
|
+
// Cyan
|
|
28
|
+
"#a78bfa",
|
|
29
|
+
// Lilac
|
|
30
|
+
"#5ccf9f",
|
|
31
|
+
// Mint
|
|
32
|
+
"#fda4af",
|
|
33
|
+
// Salmon
|
|
34
|
+
"#94a3b8"
|
|
35
|
+
// Slate
|
|
36
|
+
],
|
|
37
|
+
// Chrome — drives axes, grid, labels, title, caption.
|
|
38
|
+
// All 4 axis slots default to the same neutral; override individual entries for multi-axis charts.
|
|
39
|
+
axes: ["#666666", "#666666", "#666666", "#666666"],
|
|
40
|
+
grid: "#e2e8f0",
|
|
41
|
+
gridMinor: "#cbd5e1",
|
|
42
|
+
tickLabel: "#666666",
|
|
43
|
+
dataLabel: "#334155",
|
|
44
|
+
dataLabelBackground: "#00000000",
|
|
45
|
+
// transparent by default
|
|
46
|
+
dataLabelBorder: "#00000000",
|
|
47
|
+
annotation: "#334155",
|
|
48
|
+
annotationBackground: "#00000000",
|
|
49
|
+
// transparent by default
|
|
50
|
+
annotationBorder: "#00000000",
|
|
51
|
+
titleColor: "#0f172a",
|
|
52
|
+
captionColor: "#64748b",
|
|
53
|
+
bandFill: "#f1f5f9",
|
|
54
|
+
// Direction signals — independent of series ramp so candlestick charts
|
|
55
|
+
// don't collide with series-colored overlays.
|
|
56
|
+
positive: "#1eb854",
|
|
57
|
+
negative: "#dc2828",
|
|
58
|
+
candleNeutral: "#6b7280",
|
|
59
|
+
// Effect coefficients — mirror state class CSS defaults.
|
|
60
|
+
hoverBrightness: 1.1,
|
|
61
|
+
dimOpacity: 1,
|
|
62
|
+
barStrokeWidth: 0,
|
|
63
|
+
// Tick halo — opposite-luma from text fill so labels pop against
|
|
64
|
+
// series-colored backgrounds. `#ffffffd9` = rgba(255,255,255,0.85).
|
|
65
|
+
tickHalo: "#ffffffd9",
|
|
66
|
+
// Heatmap defaults — mirror `--p-chart-heat-min/max/empty/null`.
|
|
67
|
+
heatColorMin: "#fde68a",
|
|
68
|
+
heatColorMax: "#ee1c1c",
|
|
69
|
+
heatEmpty: "#e5e7eb",
|
|
70
|
+
heatNull: "#f3f4f6",
|
|
71
|
+
// Tooltip — semi-transparent surface with subtle border. `f2` ≈ 0.95 alpha,
|
|
72
|
+
// `1a` ≈ 0.10 alpha. Hex w/ alpha keeps parity-test regex simple.
|
|
73
|
+
tooltipBackground: "#ffffffd9",
|
|
74
|
+
tooltipBorder: "#0000001a",
|
|
75
|
+
tooltipColor: "#374151",
|
|
76
|
+
tooltipRadius: "8px",
|
|
77
|
+
tooltipBlur: "12px",
|
|
78
|
+
tooltipShadow: "0 8px 24px #0000001f",
|
|
79
|
+
tooltipPadding: "10px 14px",
|
|
80
|
+
legendColor: "#374151",
|
|
81
|
+
legendBackground: "#00000000",
|
|
82
|
+
// transparent by default
|
|
83
|
+
legendBorder: "#00000000",
|
|
84
|
+
// Reference lines/bands — neutral-40 stroke, 10% opacity fill.
|
|
85
|
+
referenceLineColor: "#94a3b8",
|
|
86
|
+
referenceBandFill: "#0000001a",
|
|
87
|
+
// rgba(0,0,0,0.10)
|
|
88
|
+
// Navigator chrome — series line/area, dim mask outside the selection window,
|
|
89
|
+
// and the selection border + interior. Hex-with-alpha keeps the parity-test regex
|
|
90
|
+
// happy: `#3b82f6b3` ≈ rgba(59,130,246,0.70), `#3b82f614` ≈ rgba(59,130,246,0.08),
|
|
91
|
+
// `#0000001f` ≈ rgba(0,0,0,0.12).
|
|
92
|
+
navigatorSeries: "#94a3b8",
|
|
93
|
+
navigatorMask: "#0000001f",
|
|
94
|
+
navigatorSelectionColor: "#3b82f6b3",
|
|
95
|
+
navigatorSelectionFill: "#3b82f614",
|
|
96
|
+
// Treemap defaults — mirror existing `--p-chart-treemap-*` vars.
|
|
97
|
+
treemapCell: "#5daeea",
|
|
98
|
+
treemapCellBorder: "#00000026",
|
|
99
|
+
// rgba(0,0,0,0.15)
|
|
100
|
+
treemapHeaderBg: "#ffffffe6",
|
|
101
|
+
// near-white header band in light mode
|
|
102
|
+
treemapHeaderText: "#1f2937",
|
|
103
|
+
// dark slate text on the light band
|
|
104
|
+
// Content background — the surface the chart sits on (white in light mode).
|
|
105
|
+
// Used by canvas custom markers that need a fill matching the page background.
|
|
106
|
+
background: "#ffffff",
|
|
107
|
+
// Generic fallback border (final fallback in pie/bar canvas paths).
|
|
108
|
+
borderColor: "#000000",
|
|
109
|
+
// Crosshair line color — falls back to axes[0] by default.
|
|
110
|
+
crosshairColor: "#666666",
|
|
111
|
+
// Base typography — chart-level `fontFamily`/`fontSize` props still win.
|
|
112
|
+
fontFamily: 'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
|
|
113
|
+
fontSize: 12
|
|
114
|
+
};
|
|
115
|
+
var defaultDarkTheme = {
|
|
116
|
+
// Dark keeps the same hue story with a modest lift for small marks on dark surfaces.
|
|
117
|
+
series: ["#6bbbed", "#ffb76d", "#ffdc7a", "#61d8cf", "#909dff", "#cc99fd", "#ff82ba", "#aad64c", "#ff8b76", "#4fc7df", "#b79dfb", "#6fdaad", "#fdb1bb", "#a8b5c6"],
|
|
118
|
+
axes: ["#a1a1aa", "#a1a1aa", "#a1a1aa", "#a1a1aa"],
|
|
119
|
+
grid: "#3f3f46",
|
|
120
|
+
gridMinor: "#52525b",
|
|
121
|
+
tickLabel: "#a1a1aa",
|
|
122
|
+
dataLabel: "#e4e4e7",
|
|
123
|
+
dataLabelBackground: "#00000000",
|
|
124
|
+
dataLabelBorder: "#00000000",
|
|
125
|
+
annotation: "#e4e4e7",
|
|
126
|
+
annotationBackground: "#00000000",
|
|
127
|
+
annotationBorder: "#00000000",
|
|
128
|
+
titleColor: "#fafafa",
|
|
129
|
+
captionColor: "#a1a1aa",
|
|
130
|
+
bandFill: "#27272a",
|
|
131
|
+
positive: "#22d96a",
|
|
132
|
+
negative: "#ff4d4d",
|
|
133
|
+
candleNeutral: "#a1a1a1",
|
|
134
|
+
hoverBrightness: 1.1,
|
|
135
|
+
dimOpacity: 1,
|
|
136
|
+
barStrokeWidth: 0,
|
|
137
|
+
// `#000000d9` = rgba(0,0,0,0.85) — dark halo for light text in dark mode.
|
|
138
|
+
tickHalo: "#000000d9",
|
|
139
|
+
heatColorMin: "#fde68a",
|
|
140
|
+
heatColorMax: "#ee1c1c",
|
|
141
|
+
heatEmpty: "#3f3f46",
|
|
142
|
+
heatNull: "#27272a",
|
|
143
|
+
// Tooltip — dark surface, subtle light border for separation against dark page bg.
|
|
144
|
+
tooltipBackground: "#0a0a0acc",
|
|
145
|
+
// near-black + 0.80 (frosted glass)
|
|
146
|
+
tooltipBorder: "#ffffff1a",
|
|
147
|
+
// 0.10 alpha
|
|
148
|
+
tooltipColor: "#e4e4e7",
|
|
149
|
+
tooltipRadius: "8px",
|
|
150
|
+
tooltipBlur: "12px",
|
|
151
|
+
tooltipShadow: "0 8px 24px #00000066",
|
|
152
|
+
tooltipPadding: "10px 14px",
|
|
153
|
+
legendColor: "#e4e4e7",
|
|
154
|
+
legendBackground: "#00000000",
|
|
155
|
+
legendBorder: "#00000000",
|
|
156
|
+
referenceLineColor: "#71717a",
|
|
157
|
+
referenceBandFill: "#ffffff14",
|
|
158
|
+
// rgba(255,255,255,0.08)
|
|
159
|
+
// Navigator chrome — Highcharts-style: light overlay dims dark bg so selection stands out;
|
|
160
|
+
// brighter blue (blue-400) for selection so it pops on dark surfaces.
|
|
161
|
+
// `#ffffff14` ≈ rgba(255,255,255,0.08), `#60a5fab3` ≈ rgba(96,165,250,0.70),
|
|
162
|
+
// `#60a5fa1f` ≈ rgba(96,165,250,0.12).
|
|
163
|
+
navigatorSeries: "#a1a1aa",
|
|
164
|
+
navigatorMask: "#ffffff14",
|
|
165
|
+
navigatorSelectionColor: "#60a5fab3",
|
|
166
|
+
navigatorSelectionFill: "#60a5fa1f",
|
|
167
|
+
// Treemap defaults — same Azure family for cell, mirrored borders/headers.
|
|
168
|
+
treemapCell: "#6bbbed",
|
|
169
|
+
// theme.series[0] dark
|
|
170
|
+
treemapCellBorder: "#ffffff26",
|
|
171
|
+
// rgba(255,255,255,0.15)
|
|
172
|
+
treemapHeaderBg: "#00000099",
|
|
173
|
+
// rgba(0,0,0,0.6) — dark header band in dark mode
|
|
174
|
+
treemapHeaderText: "#ffffff",
|
|
175
|
+
background: "#0a0a0a",
|
|
176
|
+
borderColor: "#ffffff",
|
|
177
|
+
crosshairColor: "#a1a1aa",
|
|
178
|
+
fontFamily: 'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
|
|
179
|
+
fontSize: 12
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
// src/utils/color/colorIndex.ts
|
|
183
|
+
var _cache = /* @__PURE__ */ new WeakMap();
|
|
184
|
+
function buildColorIndexMap(datasets) {
|
|
185
|
+
const cached = _cache.get(datasets);
|
|
186
|
+
if (cached) return cached;
|
|
187
|
+
const sorted = Array.from(datasets.entries()).sort(([, a], [, b]) => a.order - b.order);
|
|
188
|
+
const map = /* @__PURE__ */ new Map();
|
|
189
|
+
sorted.forEach(([id], i) => map.set(id, i));
|
|
190
|
+
_cache.set(datasets, map);
|
|
191
|
+
return map;
|
|
192
|
+
}
|
|
2
193
|
|
|
3
194
|
// src/utils/color/gradient.ts
|
|
4
195
|
function isGradientColor(color) {
|
|
@@ -147,171 +338,6 @@ function sampleGradientAt(color, point, center, radius, chartArea, defaultDirect
|
|
|
147
338
|
return sorted[sorted.length - 1].color;
|
|
148
339
|
}
|
|
149
340
|
|
|
150
|
-
// src/themes/default.ts
|
|
151
|
-
var defaultLightTheme = {
|
|
152
|
-
// Series — 10-hue Studio palette, hand-tuned for white backgrounds.
|
|
153
|
-
series: [
|
|
154
|
-
"#3563e9",
|
|
155
|
-
// cobalt
|
|
156
|
-
"#e8722d",
|
|
157
|
-
// persimmon
|
|
158
|
-
"#1fbe8b",
|
|
159
|
-
// jade
|
|
160
|
-
"#dc2f4f",
|
|
161
|
-
// crimson
|
|
162
|
-
"#6852d9",
|
|
163
|
-
// lavender
|
|
164
|
-
"#1dafd9",
|
|
165
|
-
// cerulean
|
|
166
|
-
"#d63384",
|
|
167
|
-
// magenta
|
|
168
|
-
"#88b83f",
|
|
169
|
-
// olive
|
|
170
|
-
"#a855cc",
|
|
171
|
-
// plum
|
|
172
|
-
"#d9a422"
|
|
173
|
-
// saffron
|
|
174
|
-
],
|
|
175
|
-
// Chrome — drives axes, grid, labels, title, caption.
|
|
176
|
-
// All 4 axis slots default to the same neutral; override individual entries for multi-axis charts.
|
|
177
|
-
axes: ["#666666", "#666666", "#666666", "#666666"],
|
|
178
|
-
grid: "#e2e8f0",
|
|
179
|
-
gridMinor: "#cbd5e1",
|
|
180
|
-
tickLabel: "#666666",
|
|
181
|
-
dataLabel: "#334155",
|
|
182
|
-
dataLabelBackground: "#00000000",
|
|
183
|
-
// transparent by default
|
|
184
|
-
dataLabelBorder: "#00000000",
|
|
185
|
-
annotation: "#334155",
|
|
186
|
-
annotationBackground: "#00000000",
|
|
187
|
-
// transparent by default
|
|
188
|
-
annotationBorder: "#00000000",
|
|
189
|
-
titleColor: "#0f172a",
|
|
190
|
-
captionColor: "#64748b",
|
|
191
|
-
bandFill: "#f1f5f9",
|
|
192
|
-
// Direction signals — independent of series ramp so candlestick charts
|
|
193
|
-
// don't collide with series-colored overlays.
|
|
194
|
-
positive: "#1eb854",
|
|
195
|
-
negative: "#dc2828",
|
|
196
|
-
candleNeutral: "#6b7280",
|
|
197
|
-
// Effect coefficients — mirror state class CSS defaults.
|
|
198
|
-
hoverBrightness: 1.1,
|
|
199
|
-
dimOpacity: 0.6,
|
|
200
|
-
barStrokeWidth: 0,
|
|
201
|
-
// Tick halo — opposite-luma from text fill so labels pop against
|
|
202
|
-
// series-colored backgrounds. `#ffffffd9` = rgba(255,255,255,0.85).
|
|
203
|
-
tickHalo: "#ffffffd9",
|
|
204
|
-
// Heatmap defaults — mirror `--p-chart-heat-min/max/empty/null`.
|
|
205
|
-
heatColorMin: "#fde68a",
|
|
206
|
-
heatColorMax: "#ee1c1c",
|
|
207
|
-
heatEmpty: "#e5e7eb",
|
|
208
|
-
heatNull: "#f3f4f6",
|
|
209
|
-
// Tooltip — semi-transparent surface with subtle border. `f2` ≈ 0.95 alpha,
|
|
210
|
-
// `1a` ≈ 0.10 alpha. Hex w/ alpha keeps parity-test regex simple.
|
|
211
|
-
tooltipBackground: "#ffffffd9",
|
|
212
|
-
tooltipBorder: "#0000001a",
|
|
213
|
-
tooltipColor: "#374151",
|
|
214
|
-
tooltipRadius: "8px",
|
|
215
|
-
tooltipBlur: "12px",
|
|
216
|
-
tooltipShadow: "0 8px 24px #0000001f",
|
|
217
|
-
tooltipPadding: "10px 14px",
|
|
218
|
-
legendColor: "#374151",
|
|
219
|
-
legendBackground: "#00000000",
|
|
220
|
-
// transparent by default
|
|
221
|
-
legendBorder: "#00000000",
|
|
222
|
-
// Reference lines/bands — neutral-40 stroke, 10% opacity fill.
|
|
223
|
-
referenceLineColor: "#94a3b8",
|
|
224
|
-
referenceBandFill: "#0000001a",
|
|
225
|
-
// rgba(0,0,0,0.10)
|
|
226
|
-
// Navigator chrome — series line/area, dim mask outside the selection window,
|
|
227
|
-
// and the selection border + interior. Hex-with-alpha keeps the parity-test regex
|
|
228
|
-
// happy: `#3b82f6b3` ≈ rgba(59,130,246,0.70), `#3b82f614` ≈ rgba(59,130,246,0.08),
|
|
229
|
-
// `#0000001f` ≈ rgba(0,0,0,0.12).
|
|
230
|
-
navigatorSeries: "#94a3b8",
|
|
231
|
-
navigatorMask: "#0000001f",
|
|
232
|
-
navigatorSelectionColor: "#3b82f6b3",
|
|
233
|
-
navigatorSelectionFill: "#3b82f614",
|
|
234
|
-
// Treemap defaults — mirror existing `--p-chart-treemap-*` vars.
|
|
235
|
-
treemapCell: "#3563e9",
|
|
236
|
-
treemapCellBorder: "#00000026",
|
|
237
|
-
// rgba(0,0,0,0.15)
|
|
238
|
-
treemapHeaderBg: "#ffffffe6",
|
|
239
|
-
// near-white header band in light mode
|
|
240
|
-
treemapHeaderText: "#1f2937",
|
|
241
|
-
// dark slate text on the light band
|
|
242
|
-
// Generic fallback border (final fallback in pie/bar canvas paths).
|
|
243
|
-
borderColor: "#000000",
|
|
244
|
-
// Crosshair line color — falls back to axes[0] by default.
|
|
245
|
-
crosshairColor: "#666666",
|
|
246
|
-
// Base typography — chart-level `fontFamily`/`fontSize` props still win.
|
|
247
|
-
fontFamily: 'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
|
|
248
|
-
fontSize: 12
|
|
249
|
-
};
|
|
250
|
-
var defaultDarkTheme = {
|
|
251
|
-
series: ["#5790ff", "#ff8838", "#14e5a4", "#ff4d6d", "#8270ff", "#33cdff", "#ff4da0", "#b8e92f", "#c766ff", "#ffc633"],
|
|
252
|
-
axes: ["#a1a1aa", "#a1a1aa", "#a1a1aa", "#a1a1aa"],
|
|
253
|
-
grid: "#3f3f46",
|
|
254
|
-
gridMinor: "#52525b",
|
|
255
|
-
tickLabel: "#a1a1aa",
|
|
256
|
-
dataLabel: "#e4e4e7",
|
|
257
|
-
dataLabelBackground: "#00000000",
|
|
258
|
-
dataLabelBorder: "#00000000",
|
|
259
|
-
annotation: "#e4e4e7",
|
|
260
|
-
annotationBackground: "#00000000",
|
|
261
|
-
annotationBorder: "#00000000",
|
|
262
|
-
titleColor: "#fafafa",
|
|
263
|
-
captionColor: "#a1a1aa",
|
|
264
|
-
bandFill: "#27272a",
|
|
265
|
-
positive: "#22d96a",
|
|
266
|
-
negative: "#ff4d4d",
|
|
267
|
-
candleNeutral: "#a1a1a1",
|
|
268
|
-
hoverBrightness: 1.1,
|
|
269
|
-
dimOpacity: 0.6,
|
|
270
|
-
barStrokeWidth: 0,
|
|
271
|
-
// `#000000d9` = rgba(0,0,0,0.85) — dark halo for light text in dark mode.
|
|
272
|
-
tickHalo: "#000000d9",
|
|
273
|
-
heatColorMin: "#fde68a",
|
|
274
|
-
heatColorMax: "#ee1c1c",
|
|
275
|
-
heatEmpty: "#3f3f46",
|
|
276
|
-
heatNull: "#27272a",
|
|
277
|
-
// Tooltip — dark surface, subtle light border for separation against dark page bg.
|
|
278
|
-
tooltipBackground: "#0a0a0acc",
|
|
279
|
-
// near-black + 0.80 (frosted glass)
|
|
280
|
-
tooltipBorder: "#ffffff1a",
|
|
281
|
-
// 0.10 alpha
|
|
282
|
-
tooltipColor: "#e4e4e7",
|
|
283
|
-
tooltipRadius: "8px",
|
|
284
|
-
tooltipBlur: "12px",
|
|
285
|
-
tooltipShadow: "0 8px 24px #00000066",
|
|
286
|
-
tooltipPadding: "10px 14px",
|
|
287
|
-
legendColor: "#e4e4e7",
|
|
288
|
-
legendBackground: "#00000000",
|
|
289
|
-
legendBorder: "#00000000",
|
|
290
|
-
referenceLineColor: "#71717a",
|
|
291
|
-
referenceBandFill: "#ffffff14",
|
|
292
|
-
// rgba(255,255,255,0.08)
|
|
293
|
-
// Navigator chrome — Highcharts-style: light overlay dims dark bg so selection stands out;
|
|
294
|
-
// brighter blue (blue-400) for selection so it pops on dark surfaces.
|
|
295
|
-
// `#ffffff14` ≈ rgba(255,255,255,0.08), `#60a5fab3` ≈ rgba(96,165,250,0.70),
|
|
296
|
-
// `#60a5fa1f` ≈ rgba(96,165,250,0.12).
|
|
297
|
-
navigatorSeries: "#a1a1aa",
|
|
298
|
-
navigatorMask: "#ffffff14",
|
|
299
|
-
navigatorSelectionColor: "#60a5fab3",
|
|
300
|
-
navigatorSelectionFill: "#60a5fa1f",
|
|
301
|
-
// Treemap defaults — same Studio cobalt for cell, mirrored borders/headers.
|
|
302
|
-
treemapCell: "#5790ff",
|
|
303
|
-
// theme.series[0] dark
|
|
304
|
-
treemapCellBorder: "#ffffff26",
|
|
305
|
-
// rgba(255,255,255,0.15)
|
|
306
|
-
treemapHeaderBg: "#00000099",
|
|
307
|
-
// rgba(0,0,0,0.6) — dark header band in dark mode
|
|
308
|
-
treemapHeaderText: "#ffffff",
|
|
309
|
-
borderColor: "#ffffff",
|
|
310
|
-
crosshairColor: "#a1a1aa",
|
|
311
|
-
fontFamily: 'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',
|
|
312
|
-
fontSize: 12
|
|
313
|
-
};
|
|
314
|
-
|
|
315
341
|
// src/utils/accessor.utils.ts
|
|
316
342
|
function isAccessorFunction(accessor) {
|
|
317
343
|
return typeof accessor === "function";
|
|
@@ -493,7 +519,7 @@ function resolveSwatchColor(props, index, item, theme, extras) {
|
|
|
493
519
|
if (props.color != null) {
|
|
494
520
|
return getColor(props, index, item, theme, extras);
|
|
495
521
|
}
|
|
496
|
-
return `var(--p-chart-color-${index %
|
|
522
|
+
return `var(--p-chart-color-${index % 14}, ${getDefaultColor(index, theme)})`;
|
|
497
523
|
}
|
|
498
524
|
|
|
499
|
-
export { FIELD_DEFAULTS, asGradient, batchResolveAccessor, batchResolveRequired, createCanvasGradientFromColor, createSvgGradientFromColor, defaultDarkTheme, defaultLightTheme, getColor, getColorValue, getDefaultColor, getPrimaryColor, gradientToCssBackground, isAccessorArray, isAccessorFunction, isAccessorString, isGradientColor, isNestedPath, makeItemContext, normalizeGradient, remapStopsForDonut, resolveAccessor, resolveColor, resolveDash, resolveNestedPath, resolveRequired, resolveSwatchColor, resolveSwatchGradientStops, sampleGradientAt };
|
|
525
|
+
export { FIELD_DEFAULTS, asGradient, batchResolveAccessor, batchResolveRequired, buildColorIndexMap, createCanvasGradientFromColor, createSvgGradientFromColor, defaultDarkTheme, defaultLightTheme, getColor, getColorValue, getDefaultColor, getPrimaryColor, gradientToCssBackground, isAccessorArray, isAccessorFunction, isAccessorString, isGradientColor, isNestedPath, makeItemContext, normalizeGradient, remapStopsForDonut, resolveAccessor, resolveColor, resolveDash, resolveNestedPath, resolveRequired, resolveSwatchColor, resolveSwatchGradientStops, sampleGradientAt };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { getCellLabelInfo, buildCellExtras } from './chunk-
|
|
2
|
-
import { createDrawImage } from './chunk-
|
|
3
|
-
import { resolveFontFamily, DEFAULT_TREEMAP_CELL_BORDER_COLOR, DEFAULT_TREEMAP_HEADER_TEXT_COLOR, DEFAULT_HOVER_DIM_OPACITY, DEFAULT_HOVER_BRIGHTNESS } from './chunk-
|
|
4
|
-
import { getContrastColor } from './chunk-
|
|
5
|
-
import { resolveAccessor, makeItemContext, resolveDash } from './chunk-
|
|
6
|
-
import { withCanvasState, adjustBrightness } from './chunk-
|
|
1
|
+
import { getCellLabelInfo, buildCellExtras } from './chunk-KCSMOAZO.mjs';
|
|
2
|
+
import { createDrawImage } from './chunk-HXDLOOCS.mjs';
|
|
3
|
+
import { resolveFontFamily, DEFAULT_TREEMAP_CELL_BORDER_COLOR, DEFAULT_TREEMAP_HEADER_TEXT_COLOR, DEFAULT_HOVER_DIM_OPACITY, DEFAULT_HOVER_BRIGHTNESS } from './chunk-6LUIVTNV.mjs';
|
|
4
|
+
import { getContrastColor } from './chunk-RI32WIDX.mjs';
|
|
5
|
+
import { resolveAccessor, makeItemContext, resolveDash } from './chunk-BDCNBS6W.mjs';
|
|
6
|
+
import { withCanvasState, adjustBrightness } from './chunk-BF7RP4A3.mjs';
|
|
7
7
|
|
|
8
8
|
// src/series/treemap/canvas/index.ts
|
|
9
9
|
function renderTreemapCanvas(props, layout, ctx, context) {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { toRad, generateNiceTicks } from './chunk-
|
|
1
|
+
import { toRad, generateNiceTicks } from './chunk-K7AGQTVK.mjs';
|
|
2
2
|
|
|
3
3
|
// src/renderers/radial-grid.geometry.ts
|
|
4
|
-
function valueToRadius(value, domain, outerRadius) {
|
|
4
|
+
function valueToRadius(value, domain, outerRadius, innerRadius = 0) {
|
|
5
5
|
const [min, max] = domain;
|
|
6
|
-
if (max === min) return
|
|
7
|
-
|
|
6
|
+
if (max === min) return innerRadius;
|
|
7
|
+
const available = outerRadius - innerRadius;
|
|
8
|
+
return Math.max(innerRadius, Math.min(outerRadius, innerRadius + (value - min) / (max - min) * available));
|
|
8
9
|
}
|
|
9
10
|
function buildCircleSvgPath(cx, cy, r) {
|
|
10
11
|
return `M ${cx},${cy - r} A ${r},${r} 0 1 1 ${cx},${cy + r} A ${r},${r} 0 1 1 ${cx},${cy - r} Z`;
|
|
@@ -40,12 +41,14 @@ function buildWedgePath(center, rInner, rOuter, angleStartDeg, angleEndDeg) {
|
|
|
40
41
|
}
|
|
41
42
|
function resolveBandGeometry(band, layout, yAxis) {
|
|
42
43
|
const outer = layout.radius;
|
|
44
|
+
const inner = layout.innerRadius ?? 0;
|
|
45
|
+
const frac = (f) => Math.max(inner, Math.min(outer, inner + f * (outer - inner)));
|
|
43
46
|
if (band.r1 != null || band.r2 != null) {
|
|
44
47
|
const f1 = band.r1 ?? 0;
|
|
45
48
|
const f2 = band.r2 ?? 1;
|
|
46
|
-
const rInner =
|
|
47
|
-
const rOuter =
|
|
48
|
-
return rOuter >
|
|
49
|
+
const rInner = frac(Math.min(f1, f2));
|
|
50
|
+
const rOuter = frac(Math.max(f1, f2));
|
|
51
|
+
return rOuter > inner ? { rInner, rOuter, mode: "annulus" } : null;
|
|
49
52
|
}
|
|
50
53
|
if (band.category != null) {
|
|
51
54
|
if (!yAxis || yAxis.mode !== "perSpoke") return null;
|
|
@@ -53,11 +56,11 @@ function resolveBandGeometry(band, layout, yAxis) {
|
|
|
53
56
|
if (ci < 0) return null;
|
|
54
57
|
const spokeDomain = yAxis.spokes[ci]?.domain;
|
|
55
58
|
if (!spokeDomain) return null;
|
|
56
|
-
const r1 = band.y1 != null ? valueToRadius(band.y1, spokeDomain, outer) :
|
|
57
|
-
const r2 = band.y2 != null ? valueToRadius(band.y2, spokeDomain, outer) : outer;
|
|
59
|
+
const r1 = band.y1 != null ? valueToRadius(band.y1, spokeDomain, outer, inner) : inner;
|
|
60
|
+
const r2 = band.y2 != null ? valueToRadius(band.y2, spokeDomain, outer, inner) : outer;
|
|
58
61
|
const rInner = Math.min(r1, r2);
|
|
59
62
|
const rOuter = Math.max(r1, r2);
|
|
60
|
-
if (rOuter <=
|
|
63
|
+
if (rOuter <= inner) return null;
|
|
61
64
|
const halfStep = layout.angleStep / 2;
|
|
62
65
|
const centerAngle = -90 + ci * layout.angleStep;
|
|
63
66
|
return {
|
|
@@ -69,19 +72,20 @@ function resolveBandGeometry(band, layout, yAxis) {
|
|
|
69
72
|
};
|
|
70
73
|
}
|
|
71
74
|
if ((band.y1 != null || band.y2 != null) && layout.domain && yAxis?.mode === "shared") {
|
|
72
|
-
const r1 = band.y1 != null ? valueToRadius(band.y1, layout.domain, outer) :
|
|
73
|
-
const r2 = band.y2 != null ? valueToRadius(band.y2, layout.domain, outer) : outer;
|
|
75
|
+
const r1 = band.y1 != null ? valueToRadius(band.y1, layout.domain, outer, inner) : inner;
|
|
76
|
+
const r2 = band.y2 != null ? valueToRadius(band.y2, layout.domain, outer, inner) : outer;
|
|
74
77
|
const rInner = Math.min(r1, r2);
|
|
75
78
|
const rOuter = Math.max(r1, r2);
|
|
76
|
-
return rOuter >
|
|
79
|
+
return rOuter > inner ? { rInner, rOuter, mode: "annulus" } : null;
|
|
77
80
|
}
|
|
78
81
|
return null;
|
|
79
82
|
}
|
|
80
83
|
function resolveLineGeometry(line, layout, yAxis) {
|
|
81
84
|
const outer = layout.radius;
|
|
85
|
+
const inner = layout.innerRadius ?? 0;
|
|
82
86
|
if (line.r != null) {
|
|
83
|
-
const r = Math.max(
|
|
84
|
-
return r >
|
|
87
|
+
const r = Math.max(inner, Math.min(outer, inner + line.r * (outer - inner)));
|
|
88
|
+
return r > inner ? { mode: "ring", r } : null;
|
|
85
89
|
}
|
|
86
90
|
if (line.category != null) {
|
|
87
91
|
if (line.y == null) return null;
|
|
@@ -90,8 +94,8 @@ function resolveLineGeometry(line, layout, yAxis) {
|
|
|
90
94
|
if (ci < 0) return null;
|
|
91
95
|
const spokeDomain = yAxis.spokes[ci]?.domain;
|
|
92
96
|
if (!spokeDomain) return null;
|
|
93
|
-
const r = valueToRadius(line.y, spokeDomain, outer);
|
|
94
|
-
if (r <=
|
|
97
|
+
const r = valueToRadius(line.y, spokeDomain, outer, inner);
|
|
98
|
+
if (r <= inner) return null;
|
|
95
99
|
const angleDeg = -90 + ci * layout.angleStep;
|
|
96
100
|
const angleRad = toRad(angleDeg);
|
|
97
101
|
const dx = Math.cos(angleRad);
|
|
@@ -110,16 +114,17 @@ function resolveLineGeometry(line, layout, yAxis) {
|
|
|
110
114
|
};
|
|
111
115
|
}
|
|
112
116
|
if (line.y != null && layout.domain && yAxis?.mode === "shared") {
|
|
113
|
-
const r = valueToRadius(line.y, layout.domain, outer);
|
|
114
|
-
return r >
|
|
117
|
+
const r = valueToRadius(line.y, layout.domain, outer, inner);
|
|
118
|
+
return r > inner ? { mode: "ring", r } : null;
|
|
115
119
|
}
|
|
116
120
|
return null;
|
|
117
121
|
}
|
|
118
|
-
function resolveSharedRadialGrid(grid, domain, rawDataMax, radius, tickCount) {
|
|
122
|
+
function resolveSharedRadialGrid(grid, domain, rawDataMax, radius, tickCount, innerRadius = 0) {
|
|
119
123
|
let levelValues = grid.levelValues.slice();
|
|
120
124
|
let levelRadii = grid.levelRadii.slice();
|
|
121
125
|
let outDomain = [domain[0], domain[1]];
|
|
122
|
-
const
|
|
126
|
+
const available = radius - innerRadius;
|
|
127
|
+
const place = (vals, d) => vals.map((v) => d[1] === d[0] ? innerRadius : innerRadius + (v - d[0]) / (d[1] - d[0]) * available);
|
|
123
128
|
if (tickCount != null && tickCount >= 2) {
|
|
124
129
|
const rawMax = rawDataMax ?? domain[1];
|
|
125
130
|
levelValues = generateNiceTicks(domain[0], rawMax, tickCount, true);
|
|
@@ -152,6 +157,8 @@ function buildRadialGridLayout(base, xAxisProps, yAxisProps, yAxesByCategory, ch
|
|
|
152
157
|
let domain = base.domain;
|
|
153
158
|
let yAxis = null;
|
|
154
159
|
const isPerSpokeMode = !!base.perSpokeDomains && base.perSpokeDomains.size > 0;
|
|
160
|
+
const innerRadius = base.innerRadius ?? 0;
|
|
161
|
+
const available = base.radius - innerRadius;
|
|
155
162
|
if (isPerSpokeMode && (yAxisProps || yAxesByCategory && yAxesByCategory.size > 0)) {
|
|
156
163
|
const spokes = [];
|
|
157
164
|
for (let ci = 0; ci < base.categories.length; ci++) {
|
|
@@ -165,7 +172,7 @@ function buildRadialGridLayout(base, xAxisProps, yAxisProps, yAxesByCategory, ch
|
|
|
165
172
|
const hi = ticks[ticks.length - 1] ?? spokeDomain[1];
|
|
166
173
|
const aligned = [Math.min(spokeDomain[0], lo), Math.max(spokeDomain[1], hi)];
|
|
167
174
|
const span = aligned[1] - aligned[0];
|
|
168
|
-
const radii = ticks.map((v) => span === 0 ?
|
|
175
|
+
const radii = ticks.map((v) => span === 0 ? innerRadius : innerRadius + (v - aligned[0]) / span * available);
|
|
169
176
|
const uniformTickStyle = declared?.tickStyle && typeof declared.tickStyle !== "function" ? declared.tickStyle : void 0;
|
|
170
177
|
const rawTickFormat = declared?.tickFormat;
|
|
171
178
|
spokes.push({
|
|
@@ -179,7 +186,7 @@ function buildRadialGridLayout(base, xAxisProps, yAxisProps, yAxesByCategory, ch
|
|
|
179
186
|
showLabels: propsForSpoke?.showLabels ?? true
|
|
180
187
|
});
|
|
181
188
|
}
|
|
182
|
-
const referenceRingRadii = [0.2, 0.4, 0.6, 0.8].map((f) => f *
|
|
189
|
+
const referenceRingRadii = [0.2, 0.4, 0.6, 0.8].map((f) => innerRadius + f * available);
|
|
183
190
|
const defaultUniformTickStyle = yAxisProps?.tickStyle && typeof yAxisProps.tickStyle !== "function" ? yAxisProps.tickStyle : void 0;
|
|
184
191
|
yAxis = {
|
|
185
192
|
mode: "perSpoke",
|
|
@@ -202,7 +209,7 @@ function buildRadialGridLayout(base, xAxisProps, yAxisProps, yAxesByCategory, ch
|
|
|
202
209
|
levelValues = base.grid.levelValues.slice();
|
|
203
210
|
levelRadii = base.grid.levelRadii.slice();
|
|
204
211
|
} else {
|
|
205
|
-
const resolved = resolveSharedRadialGrid(base.grid, domain, base.rawDataMax, base.radius, yAxisProps.tickCount);
|
|
212
|
+
const resolved = resolveSharedRadialGrid(base.grid, domain, base.rawDataMax, base.radius, yAxisProps.tickCount, innerRadius);
|
|
206
213
|
levelValues = resolved.levelValues;
|
|
207
214
|
levelRadii = resolved.levelRadii;
|
|
208
215
|
domain = resolved.domain;
|
|
@@ -230,6 +237,7 @@ function buildRadialGridLayout(base, xAxisProps, yAxisProps, yAxesByCategory, ch
|
|
|
230
237
|
return {
|
|
231
238
|
center: base.center,
|
|
232
239
|
radius: base.radius,
|
|
240
|
+
innerRadius,
|
|
233
241
|
categories: base.categories,
|
|
234
242
|
angleStep: base.angleStep,
|
|
235
243
|
spokeEndpoints: base.spokeEndpoints,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { clamp } from './chunk-RQ3CKQOX.mjs';
|
|
1
|
+
import { clamp } from './chunk-K7AGQTVK.mjs';
|
|
3
2
|
|
|
4
3
|
// src/animations/interpolation.ts
|
|
5
4
|
function lerp(start, end, t) {
|
|
@@ -15,24 +14,14 @@ function lerpValues(start, target, progress) {
|
|
|
15
14
|
}
|
|
16
15
|
return result;
|
|
17
16
|
}
|
|
18
|
-
function
|
|
19
|
-
const start = parseColorToRGB(startColor);
|
|
20
|
-
const end = parseColorToRGB(endColor);
|
|
21
|
-
if (!start || !end) {
|
|
22
|
-
return t < 0.5 ? startColor : endColor;
|
|
23
|
-
}
|
|
24
|
-
const r = Math.round(clamp(lerp(start.r, end.r, t), 0, 255));
|
|
25
|
-
const g = Math.round(clamp(lerp(start.g, end.g, t), 0, 255));
|
|
26
|
-
const b = Math.round(clamp(lerp(start.b, end.b, t), 0, 255));
|
|
27
|
-
return `#${r.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${b.toString(16).padStart(2, "0")}`;
|
|
28
|
-
}
|
|
29
|
-
function interpolateRadialGrid(prevDomain, targetDomain, target, radius, progress) {
|
|
17
|
+
function interpolateRadialGrid(prevDomain, targetDomain, target, radius, progress, innerRadius = 0) {
|
|
30
18
|
const interpMin = prevDomain[0] + (targetDomain[0] - prevDomain[0]) * progress;
|
|
31
19
|
const interpMax = prevDomain[1] + (targetDomain[1] - prevDomain[1]) * progress;
|
|
32
20
|
const domainSpan = interpMax - interpMin;
|
|
21
|
+
const available = radius - innerRadius;
|
|
33
22
|
const levelRadii = target.levelValues.map((v) => {
|
|
34
|
-
if (domainSpan === 0) return
|
|
35
|
-
return clamp((v - interpMin) / domainSpan *
|
|
23
|
+
if (domainSpan === 0) return innerRadius;
|
|
24
|
+
return clamp(innerRadius + (v - interpMin) / domainSpan * available, innerRadius, radius);
|
|
36
25
|
});
|
|
37
26
|
return { ...target, levelRadii };
|
|
38
27
|
}
|
|
@@ -133,7 +122,7 @@ function interpolatePolarLayout(prev, target, progress) {
|
|
|
133
122
|
}
|
|
134
123
|
return {
|
|
135
124
|
...target,
|
|
136
|
-
grid: interpolateRadialGrid(prev.domain, target.domain, target.grid, target.maxRadius, progress),
|
|
125
|
+
grid: interpolateRadialGrid(prev.domain, target.domain, target.grid, target.maxRadius, progress, target.innerRadiusRatio * target.maxRadius),
|
|
137
126
|
bars
|
|
138
127
|
};
|
|
139
128
|
}
|
|
@@ -146,4 +135,4 @@ function createPolarEntranceLayout(target) {
|
|
|
146
135
|
return { ...target, bars };
|
|
147
136
|
}
|
|
148
137
|
|
|
149
|
-
export { createPolarEntranceLayout, createRadarEntranceLayout, interpolateCartesianAxisLayout, interpolatePolarLayout, interpolateRadialGrid, lerp,
|
|
138
|
+
export { createPolarEntranceLayout, createRadarEntranceLayout, interpolateCartesianAxisLayout, interpolatePolarLayout, interpolateRadialGrid, lerp, lerpValues };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { warnChartDevOnce } from './chunk-K7AGQTVK.mjs';
|
|
2
|
+
|
|
3
|
+
// src/utils/safeRender.utils.ts
|
|
4
|
+
function safeRenderProp(render, label) {
|
|
5
|
+
try {
|
|
6
|
+
return render();
|
|
7
|
+
} catch (err) {
|
|
8
|
+
warnChartDevOnce(`render:${label}`, `A custom "${label}" render function threw and was skipped. ${err instanceof Error ? err.message : String(err)}`);
|
|
9
|
+
return void 0;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function safeFormat(format, fallback, label) {
|
|
13
|
+
try {
|
|
14
|
+
return format();
|
|
15
|
+
} catch (err) {
|
|
16
|
+
warnChartDevOnce(`format:${label}`, `A custom "${label}" format function threw; falling back to the default. ${err instanceof Error ? err.message : String(err)}`);
|
|
17
|
+
return fallback();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { safeFormat, safeRenderProp };
|