@primeui/chart-core 0.0.1-alpha.1 → 1.0.0-beta.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/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-A6ZQZFL2.mjs → chunks/chunk-3CUSPV47.mjs} +12 -9
- 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-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-DN6AXQYZ.mjs → chunks/chunk-BYAAMQBN.mjs} +46 -41
- 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-PLSDU3C2.mjs → chunks/chunk-DOC4YOCD.mjs} +63 -37
- 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/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-WCG35U6M.mjs → chunks/chunk-LJ6BXF3H.mjs} +31 -23
- package/dist/{chunk-3WEMHXZI.mjs → chunks/chunk-LTQH3LQJ.mjs} +2 -8
- 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-FHTC2YDB.mjs → chunks/chunk-SVASYTK5.mjs} +70 -5
- package/dist/{chunk-ARB5T6MP.mjs → chunks/chunk-SWVOBJLG.mjs} +3 -100
- package/dist/{chunk-OHGCZZPZ.mjs → chunks/chunk-SY7LVXIW.mjs} +53 -27
- 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.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 +2 -2
- 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-DZfza6xV.d.mts} +3 -3
- 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 +3 -3
- 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,19 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { calculateRadarLayout, hitTestRadar } from './chunk-
|
|
4
|
-
import { renderResolvedLabels } from './chunk-
|
|
5
|
-
import { AnimatedScene, resolveAnimatedProps, RADAR_ANIMATABLE_PROPS } from './chunk-
|
|
6
|
-
import { renderCustomMarkersCanvas } from './chunk-
|
|
7
|
-
import { reconcileSvgChildren } from './chunk-
|
|
8
|
-
import { parseAnimationConfig } from './chunk-
|
|
9
|
-
import { cancelRaf, raf } from './chunk-
|
|
10
|
-
import { buildAccessibilityRenderContext, generateSeriesDescription } from './chunk-
|
|
11
|
-
import { collectItems } from './chunk-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { makeItemContext, defaultLightTheme, resolveSwatchColor, getPrimaryColor, getDefaultColor, FIELD_DEFAULTS } from './chunk-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
1
|
+
import { resolveSharedRadialGrid } from './chunk-CFA2SUBF.mjs';
|
|
2
|
+
import { resolveRadarLabels } from './chunk-RH3OQ2VX.mjs';
|
|
3
|
+
import { calculateRadarLayout, hitTestRadar } from './chunk-3CUSPV47.mjs';
|
|
4
|
+
import { renderResolvedLabels } from './chunk-G3DYNMWT.mjs';
|
|
5
|
+
import { AnimatedScene, resolveAnimatedProps, RADAR_ANIMATABLE_PROPS } from './chunk-JS47MSB2.mjs';
|
|
6
|
+
import { renderCustomMarkersCanvas } from './chunk-AC5EAWIP.mjs';
|
|
7
|
+
import { reconcileSvgChildren } from './chunk-FWNWV3H7.mjs';
|
|
8
|
+
import { parseAnimationConfig } from './chunk-LTQH3LQJ.mjs';
|
|
9
|
+
import { cancelRaf, raf } from './chunk-5WFF272M.mjs';
|
|
10
|
+
import { buildAccessibilityRenderContext, generateSeriesDescription } from './chunk-IFJPDARC.mjs';
|
|
11
|
+
import { collectItems } from './chunk-FRVJH7ZG.mjs';
|
|
12
|
+
import { resolveRadialAccessors } from './chunk-6MAO6I3E.mjs';
|
|
13
|
+
import { DEFAULT_HOVER_DIM_OPACITY, DEFAULT_HOVER_BRIGHTNESS } from './chunk-6LUIVTNV.mjs';
|
|
14
|
+
import { makeItemContext, defaultLightTheme, resolveSwatchColor, getPrimaryColor, getDefaultColor, FIELD_DEFAULTS } from './chunk-BDCNBS6W.mjs';
|
|
15
|
+
import { interpolateRadialGrid } from './chunk-CKQ4DNNJ.mjs';
|
|
16
|
+
import { setAttr, createSvgGroup, materializeSvgNode } from './chunk-BF7RP4A3.mjs';
|
|
17
|
+
import { calculateNiceDomain } from './chunk-K7AGQTVK.mjs';
|
|
17
18
|
|
|
18
19
|
// src/series/radar/controller/helpers.ts
|
|
19
20
|
function buildRadarFingerprint(layout, entries) {
|
|
@@ -82,7 +83,7 @@ function buildRadarSvgChildren(ctx, layout, entries, input) {
|
|
|
82
83
|
const ds = entries[si];
|
|
83
84
|
if (!sd.visible || !ds) continue;
|
|
84
85
|
const dsTotal = sd.points.reduce((sum, pt) => sum + Math.abs(pt.value), 0);
|
|
85
|
-
const labels = resolveRadarLabels(sd.points, layout.categories, sd.color ?? getDefaultColor(sd.
|
|
86
|
+
const labels = resolveRadarLabels(sd.points, layout.categories, sd.color ?? getDefaultColor(sd.colorIndex, input.theme), dsTotal, layout.center, lc, ds.props.data);
|
|
86
87
|
const labelNode = createSvgGroup();
|
|
87
88
|
renderResolvedLabels(labels, lc, { renderer: "svg", svgGroup: labelNode, theme: input.theme });
|
|
88
89
|
setAttr(labelNode, "data-layer", `labels-${sd.id}`);
|
|
@@ -115,7 +116,7 @@ function renderCanvasContent(ctx, c2d) {
|
|
|
115
116
|
renderMarker: renderMarkerFn,
|
|
116
117
|
visiblePoints: sd.points.map((pt, pi) => ({ x: pt.x, y: pt.y, dataIndex: pi, value: pt.value, category: layout.categories[pt.categoryIndex] })),
|
|
117
118
|
data: ds.props.data,
|
|
118
|
-
color: sd.color ?? getDefaultColor(sd.
|
|
119
|
+
color: sd.color ?? getDefaultColor(sd.colorIndex, ctx.lastInput?.theme ?? defaultLightTheme),
|
|
119
120
|
markerSize: typeof mergedProps.markerSize === "number" ? mergedProps.markerSize : 4,
|
|
120
121
|
effects: { dimOpacity: ctx.effectConfig.dimOpacity }
|
|
121
122
|
});
|
|
@@ -130,7 +131,7 @@ function renderCanvasContent(ctx, c2d) {
|
|
|
130
131
|
const ds = ctx._entries[si];
|
|
131
132
|
if (!sd.visible || !ds) continue;
|
|
132
133
|
const dsTotal = sd.points.reduce((sum, pt) => sum + Math.abs(pt.value), 0);
|
|
133
|
-
const labels = resolveRadarLabels(sd.points, layout.categories, sd.color ?? getDefaultColor(sd.
|
|
134
|
+
const labels = resolveRadarLabels(sd.points, layout.categories, sd.color ?? getDefaultColor(sd.colorIndex, ctx.lastInput?.theme ?? defaultLightTheme), dsTotal, layout.center, lc, ds.props.data);
|
|
134
135
|
renderResolvedLabels(labels, lc, { renderer: "canvas", ctx: c2d, theme: ctx.lastInput?.theme ?? defaultLightTheme });
|
|
135
136
|
}
|
|
136
137
|
}
|
|
@@ -155,7 +156,7 @@ function fullReset(ctx) {
|
|
|
155
156
|
ctx._propertyOverrides.clear();
|
|
156
157
|
}
|
|
157
158
|
function runAllHidden(ctx, features) {
|
|
158
|
-
const liveCount = ctx._scene.
|
|
159
|
+
const liveCount = ctx._scene.elementCount;
|
|
159
160
|
const hasFades = ctx._seriesFades.size > 0;
|
|
160
161
|
if (liveCount === 0 && !hasFades) {
|
|
161
162
|
ctx._layout = null;
|
|
@@ -211,7 +212,7 @@ function runAllHidden(ctx, features) {
|
|
|
211
212
|
startAnimLoop(ctx);
|
|
212
213
|
} else {
|
|
213
214
|
ctx._scene.tick(performance.now());
|
|
214
|
-
if (ctx._scene.
|
|
215
|
+
if (ctx._scene.elementCount === 0) {
|
|
215
216
|
ctx._layout = null;
|
|
216
217
|
setMarkerData(ctx, null);
|
|
217
218
|
}
|
|
@@ -261,7 +262,7 @@ function currentGridDomain(ctx) {
|
|
|
261
262
|
function buildLayoutFromScene(ctx, now) {
|
|
262
263
|
if (!ctx._layout) return null;
|
|
263
264
|
const elementsBySeries = /* @__PURE__ */ new Map();
|
|
264
|
-
for (const el of ctx._scene.
|
|
265
|
+
for (const el of ctx._scene.elementValues()) {
|
|
265
266
|
const s = el.current;
|
|
266
267
|
const list = elementsBySeries.get(s.seriesId);
|
|
267
268
|
if (list) list.push(s);
|
|
@@ -392,7 +393,7 @@ function buildPerAxisDomains(entries, yAxes) {
|
|
|
392
393
|
if (!ds.visible) continue;
|
|
393
394
|
if (ds.props.yAxisId !== axisId) continue;
|
|
394
395
|
const data = ds.props.data;
|
|
395
|
-
const valueField = ds.props.
|
|
396
|
+
const valueField = resolveRadialAccessors(ds.props).radialField ?? FIELD_DEFAULTS.valueField;
|
|
396
397
|
if (!data || !valueField) continue;
|
|
397
398
|
for (let i = 0; i < data.length; i++) {
|
|
398
399
|
const item = data[i];
|
|
@@ -428,8 +429,8 @@ function buildPerSpokeDomains(entries, yAxes, categories, isStacked) {
|
|
|
428
429
|
for (const ds of entries) {
|
|
429
430
|
if (!ds.visible) continue;
|
|
430
431
|
const data = ds.props.data;
|
|
431
|
-
const valueField = ds.props.
|
|
432
|
-
const categoryField = ds.props.
|
|
432
|
+
const valueField = resolveRadialAccessors(ds.props).radialField ?? FIELD_DEFAULTS.valueField;
|
|
433
|
+
const categoryField = resolveRadialAccessors(ds.props).angularField ?? FIELD_DEFAULTS.categoryField;
|
|
433
434
|
if (!data || !valueField || !categoryField) continue;
|
|
434
435
|
for (let i = 0; i < data.length; i++) {
|
|
435
436
|
const item = data[i];
|
|
@@ -446,8 +447,8 @@ function buildPerSpokeDomains(entries, yAxes, categories, isStacked) {
|
|
|
446
447
|
for (const ds of entries) {
|
|
447
448
|
if (!ds.visible) continue;
|
|
448
449
|
const data = ds.props.data;
|
|
449
|
-
const valueField = ds.props.
|
|
450
|
-
const categoryField = ds.props.
|
|
450
|
+
const valueField = resolveRadialAccessors(ds.props).radialField ?? FIELD_DEFAULTS.valueField;
|
|
451
|
+
const categoryField = resolveRadialAccessors(ds.props).angularField ?? FIELD_DEFAULTS.categoryField;
|
|
451
452
|
if (!data || !valueField || !categoryField) continue;
|
|
452
453
|
for (let i = 0; i < data.length; i++) {
|
|
453
454
|
const item = data[i];
|
|
@@ -568,12 +569,18 @@ var RadarRendererController = class {
|
|
|
568
569
|
this._hasRadarDatasets = Array.from(datasets.values()).some((ds) => ds.type === "radar");
|
|
569
570
|
if (!this._hasRadarDatasets) {
|
|
570
571
|
this._fullReset();
|
|
572
|
+
if (input.renderer === "svg" && this.svgGroup) {
|
|
573
|
+
while (this.svgGroup.firstChild) this.svgGroup.removeChild(this.svgGroup.firstChild);
|
|
574
|
+
}
|
|
571
575
|
return;
|
|
572
576
|
}
|
|
573
577
|
const sortedDatasets = Array.from(datasets.entries()).sort(([, a], [, b]) => a.order - b.order);
|
|
574
578
|
const radarEntries = collectItems(sortedDatasets, datasetVisibility).radar;
|
|
575
579
|
if (radarEntries.length === 0) {
|
|
576
580
|
this._fullReset();
|
|
581
|
+
if (input.renderer === "svg" && this.svgGroup) {
|
|
582
|
+
while (this.svgGroup.firstChild) this.svgGroup.removeChild(this.svgGroup.firstChild);
|
|
583
|
+
}
|
|
577
584
|
return;
|
|
578
585
|
}
|
|
579
586
|
this._entries = radarEntries;
|
|
@@ -587,7 +594,7 @@ var RadarRendererController = class {
|
|
|
587
594
|
new Set(
|
|
588
595
|
radarEntries.flatMap((ds) => {
|
|
589
596
|
const data = ds.props.data;
|
|
590
|
-
const cf = ds.props.
|
|
597
|
+
const cf = resolveRadialAccessors(ds.props).angularField;
|
|
591
598
|
if (!data || !cf) return [];
|
|
592
599
|
return data.map((item, i) => typeof cf === "function" ? cf(makeItemContext(item, i)) : item[cf]);
|
|
593
600
|
})
|
|
@@ -628,7 +635,10 @@ var RadarRendererController = class {
|
|
|
628
635
|
const fingerprint = buildRadarFingerprint(targetLayout, radarEntries);
|
|
629
636
|
const dataChanged = fingerprint !== this._lastFingerprint;
|
|
630
637
|
const shouldAnimate = animEnabled && duration > 0 && dataChanged;
|
|
631
|
-
if (!dataChanged)
|
|
638
|
+
if (!dataChanged) {
|
|
639
|
+
if (input.renderer === "canvas") input.requestRedraw?.();
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
632
642
|
if (this._animRafId !== null) {
|
|
633
643
|
cancelRaf(this._animRafId);
|
|
634
644
|
this._animRafId = null;
|
|
@@ -727,9 +737,24 @@ var RadarRendererController = class {
|
|
|
727
737
|
this.lastInput.requestRedraw?.();
|
|
728
738
|
}
|
|
729
739
|
}
|
|
740
|
+
/**
|
|
741
|
+
* Authoritative per-series visibility for hit-testing. The layout's
|
|
742
|
+
* `sd.visible` is unreliable here: it is forced `true` during a series'
|
|
743
|
+
* exit fade (so the renderer keeps drawing the fading polygon), and
|
|
744
|
+
* `_layout` goes stale on the all-hidden path (`_runAllHidden` keeps the
|
|
745
|
+
* previous layout shell). A toggled-off series can therefore linger with
|
|
746
|
+
* `visible: true`. The registered entry's `visible` is the real legend
|
|
747
|
+
* state — fall back to the layout flag only when no entry matches.
|
|
748
|
+
* Mirrors `buildRadarFingerprint`'s `dsEntry?.visible ?? sd.visible`.
|
|
749
|
+
*/
|
|
750
|
+
_isEntryVisible(sd) {
|
|
751
|
+
const entry = this._entries.find((e) => e.id === sd.id);
|
|
752
|
+
return entry ? entry.visible : sd.visible;
|
|
753
|
+
}
|
|
730
754
|
hitTest(x, y) {
|
|
731
755
|
if (!this._layout) return null;
|
|
732
|
-
|
|
756
|
+
const gated = { ...this._layout, series: this._layout.series.filter((sd) => this._isEntryVisible(sd)) };
|
|
757
|
+
return hitTestRadar(x, y, gated, this.lastInput?.theme ?? defaultLightTheme);
|
|
733
758
|
}
|
|
734
759
|
/**
|
|
735
760
|
* Shared-mode lookup: snap to the nearest spoke (categoryIndex) by angle and
|
|
@@ -752,19 +777,20 @@ var RadarRendererController = class {
|
|
|
752
777
|
let primary = null;
|
|
753
778
|
let bestDist = Infinity;
|
|
754
779
|
for (const sd of layout.series) {
|
|
755
|
-
if (!sd
|
|
780
|
+
if (!this._isEntryVisible(sd)) continue;
|
|
756
781
|
const pt = sd.points.find((p) => p.categoryIndex === categoryIndex);
|
|
757
782
|
if (!pt) continue;
|
|
758
783
|
allSeries.push({
|
|
759
784
|
datasetId: sd.id,
|
|
760
785
|
name: sd.name,
|
|
761
786
|
label,
|
|
762
|
-
color: sd.color ?? (sd.gradientColor ? getPrimaryColor(sd.gradientColor) : getDefaultColor(sd.
|
|
787
|
+
color: sd.color ?? (sd.gradientColor ? getPrimaryColor(sd.gradientColor) : getDefaultColor(sd.colorIndex, this.lastInput?.theme ?? defaultLightTheme)),
|
|
763
788
|
colorGradient: sd.gradientColor,
|
|
764
|
-
swatchColor: resolveSwatchColor({ color: sd.color ?? sd.gradientColor }, sd.
|
|
789
|
+
swatchColor: resolveSwatchColor({ color: sd.color ?? sd.gradientColor }, sd.colorIndex, void 0, this.lastInput?.theme),
|
|
765
790
|
value: pt.value,
|
|
766
|
-
|
|
767
|
-
|
|
791
|
+
// No pre-formatted value: the HTML tooltip formats the raw value via
|
|
792
|
+
// `buildTooltipContent` (locale-aware, 2dp). Radar has no crosshair, so
|
|
793
|
+
// `cursorFormattedValue` is unused.
|
|
768
794
|
snapPixel: Math.sqrt((pt.x - layout.center.x) ** 2 + (pt.y - layout.center.y) ** 2)
|
|
769
795
|
});
|
|
770
796
|
const d = Math.sqrt((pt.x - x) ** 2 + (pt.y - y) ** 2);
|
|
@@ -775,9 +801,9 @@ var RadarRendererController = class {
|
|
|
775
801
|
index: categoryIndex,
|
|
776
802
|
label,
|
|
777
803
|
value: pt.value,
|
|
778
|
-
color: sd.color ?? (sd.gradientColor ? getPrimaryColor(sd.gradientColor) : getDefaultColor(sd.
|
|
804
|
+
color: sd.color ?? (sd.gradientColor ? getPrimaryColor(sd.gradientColor) : getDefaultColor(sd.colorIndex, this.lastInput?.theme ?? defaultLightTheme)),
|
|
779
805
|
colorGradient: sd.gradientColor,
|
|
780
|
-
swatchColor: resolveSwatchColor({ color: sd.color ?? sd.gradientColor }, sd.
|
|
806
|
+
swatchColor: resolveSwatchColor({ color: sd.color ?? sd.gradientColor }, sd.colorIndex, void 0, this.lastInput?.theme)
|
|
781
807
|
};
|
|
782
808
|
}
|
|
783
809
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { barHitTest, barFindNearest, barFindAllNearest } from './chunk-
|
|
2
|
-
import { animatableBarToComputedBar } from './chunk-
|
|
3
|
-
import { registerDatasetLayers, triggerCompositorRepaint } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { computeBarVisualLayout } from './chunk-
|
|
7
|
-
import { AnimatedScene, resolveAnimatedProps, BAR_ANIMATABLE_PROPS } from './chunk-
|
|
8
|
-
import { reconcileSvgChildren } from './chunk-
|
|
9
|
-
import { parseAnimationConfig } from './chunk-
|
|
10
|
-
import { cancelRaf, raf } from './chunk-
|
|
11
|
-
import { hoverConfigToFullEffect } from './chunk-
|
|
12
|
-
import { generateSeriesDescription } from './chunk-
|
|
13
|
-
import { collectItems } from './chunk-
|
|
14
|
-
import { defaultLightTheme } from './chunk-
|
|
15
|
-
import { setAttr, createSvgGroup, svgNode, appendChild, createSvgRect, materializeSvgNode } from './chunk-
|
|
1
|
+
import { barHitTest, barFindNearest, barFindAllNearest } from './chunk-TW3KLJVO.mjs';
|
|
2
|
+
import { animatableBarToComputedBar } from './chunk-ZZCVDIU5.mjs';
|
|
3
|
+
import { registerDatasetLayers, triggerCompositorRepaint } from './chunk-MT3OLVZC.mjs';
|
|
4
|
+
import { renderResolvedLabels } from './chunk-G3DYNMWT.mjs';
|
|
5
|
+
import { resolveBarLabels } from './chunk-7IKKWWRT.mjs';
|
|
6
|
+
import { computeBarVisualLayout } from './chunk-LBNP5PJA.mjs';
|
|
7
|
+
import { AnimatedScene, resolveAnimatedProps, BAR_ANIMATABLE_PROPS } from './chunk-JS47MSB2.mjs';
|
|
8
|
+
import { reconcileSvgChildren } from './chunk-FWNWV3H7.mjs';
|
|
9
|
+
import { parseAnimationConfig } from './chunk-LTQH3LQJ.mjs';
|
|
10
|
+
import { cancelRaf, raf } from './chunk-5WFF272M.mjs';
|
|
11
|
+
import { hoverConfigToFullEffect } from './chunk-F6AGZQDA.mjs';
|
|
12
|
+
import { generateSeriesDescription } from './chunk-IFJPDARC.mjs';
|
|
13
|
+
import { collectItems } from './chunk-FRVJH7ZG.mjs';
|
|
14
|
+
import { buildColorIndexMap, defaultLightTheme } from './chunk-BDCNBS6W.mjs';
|
|
15
|
+
import { setAttr, createSvgGroup, svgNode, appendChild, createSvgRect, materializeSvgNode } from './chunk-BF7RP4A3.mjs';
|
|
16
16
|
|
|
17
17
|
// src/series/bar/controller/types.ts
|
|
18
18
|
var BAR_SCENE_REGISTRY = {
|
|
@@ -33,14 +33,28 @@ function groupAnimatedBarsByDataset(animatedBars) {
|
|
|
33
33
|
}
|
|
34
34
|
return grouped;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function findNearestBarIndexByX(visibleBars, axisX, orientation) {
|
|
37
|
+
let bestIdx = null;
|
|
38
|
+
let bestDist = Infinity;
|
|
39
|
+
for (const bar of visibleBars) {
|
|
40
|
+
const center = orientation === "vertical" ? bar.x + bar.width / 2 : bar.y + bar.height / 2;
|
|
41
|
+
const dist = Math.abs(center - axisX);
|
|
42
|
+
if (dist < bestDist) {
|
|
43
|
+
bestDist = dist;
|
|
44
|
+
bestIdx = bar.dataIndex;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return bestIdx;
|
|
48
|
+
}
|
|
49
|
+
function barHoverInteraction(base, dsId, hover, flags, visibleBars, orientation) {
|
|
37
50
|
const isAnyHover = hover.datasetId !== null;
|
|
38
|
-
const isAxisHover = hover.axisIndex != null;
|
|
39
51
|
const isThisSeriesHovered = hover.datasetId === dsId;
|
|
40
52
|
const { isWaterfall, isStacked, isGrouped } = flags;
|
|
53
|
+
const resolvedAxisIndex = hover.axisX != null && visibleBars ? findNearestBarIndexByX(visibleBars, hover.axisX, orientation ?? "vertical") : hover.axisIndex ?? null;
|
|
54
|
+
const isAxisHover = resolvedAxisIndex != null;
|
|
41
55
|
return {
|
|
42
56
|
...base,
|
|
43
|
-
hoveredIndex: isAxisHover ?
|
|
57
|
+
hoveredIndex: isAxisHover ? resolvedAxisIndex : isThisSeriesHovered ? hover.index : null,
|
|
44
58
|
isSeriesHovered: isAxisHover || isWaterfall ? false : (isStacked || isGrouped) && isAnyHover && isThisSeriesHovered,
|
|
45
59
|
isSeriesDimmed: isAxisHover || isWaterfall ? false : isAnyHover && !isThisSeriesHovered
|
|
46
60
|
};
|
|
@@ -54,7 +68,7 @@ function buildBarSvgChildren(params) {
|
|
|
54
68
|
if (!props) continue;
|
|
55
69
|
const propsWithHover = {
|
|
56
70
|
...props,
|
|
57
|
-
interaction: barHoverInteraction(props.interaction, dsId, hover, flags)
|
|
71
|
+
interaction: barHoverInteraction(props.interaction, dsId, hover, flags, layout.visibleBars, orientation)
|
|
58
72
|
};
|
|
59
73
|
const barNode = paint.renderSvg(propsWithHover, layout, context);
|
|
60
74
|
setAttr(barNode, "data-dataset", dsId);
|
|
@@ -156,7 +170,7 @@ function renderBarsFrame(params) {
|
|
|
156
170
|
if (!props) continue;
|
|
157
171
|
const propsWithHover = {
|
|
158
172
|
...props,
|
|
159
|
-
interaction: barHoverInteraction(props.interaction, dsId, hover, { isWaterfall, isStacked, isGrouped })
|
|
173
|
+
interaction: barHoverInteraction(props.interaction, dsId, hover, { isWaterfall, isStacked, isGrouped }, layout.visibleBars, orientation)
|
|
160
174
|
};
|
|
161
175
|
paint.renderCanvas(propsWithHover, layout, ctx, context);
|
|
162
176
|
}
|
|
@@ -242,7 +256,7 @@ function applyHover(ctx, hover) {
|
|
|
242
256
|
// src/series/bar/controller/scene.ts
|
|
243
257
|
function buildBarsFromScene(ctx) {
|
|
244
258
|
const result = [];
|
|
245
|
-
for (const el of ctx._scene.
|
|
259
|
+
for (const el of ctx._scene.elementValues()) {
|
|
246
260
|
const s = el.current;
|
|
247
261
|
result.push({
|
|
248
262
|
dataIndex: s.dataIndex,
|
|
@@ -411,7 +425,8 @@ var BarRendererController = class {
|
|
|
411
425
|
axisLayouts: layoutData.axisLayouts,
|
|
412
426
|
hover: this.hover,
|
|
413
427
|
hoverConfig: input.hoverConfig ? hoverConfigToFullEffect(input.hoverConfig) : void 0,
|
|
414
|
-
theme: input.theme
|
|
428
|
+
theme: input.theme,
|
|
429
|
+
colorIndexById: buildColorIndexMap(datasets)
|
|
415
430
|
}) : null;
|
|
416
431
|
const prevLayoutCache = this.layoutCache;
|
|
417
432
|
const prevRenderPropsCache = this.renderPropsCache;
|
|
@@ -430,6 +445,7 @@ var BarRendererController = class {
|
|
|
430
445
|
}
|
|
431
446
|
this._scene.reset();
|
|
432
447
|
this._lastFingerprint = "";
|
|
448
|
+
compositor?.removeLayersByPrefix("bar:");
|
|
433
449
|
if (input.renderer === "svg" && this.svgGroup) {
|
|
434
450
|
while (this.svgGroup.firstChild) this.svgGroup.removeChild(this.svgGroup.firstChild);
|
|
435
451
|
}
|
|
@@ -455,17 +471,9 @@ var BarRendererController = class {
|
|
|
455
471
|
ctx.rect(layoutData.cartesianArea.x, layoutData.cartesianArea.y, layoutData.cartesianArea.width, layoutData.cartesianArea.height);
|
|
456
472
|
ctx.clip();
|
|
457
473
|
}
|
|
458
|
-
const isAnyHoverCompositor = this.hover.datasetId !== null;
|
|
459
|
-
const isAxisHoverCompositor = this.hover.axisIndex != null;
|
|
460
|
-
const isThisSeriesHoveredCompositor = this.hover.datasetId === dsId;
|
|
461
474
|
const propsWithHover = {
|
|
462
475
|
...props,
|
|
463
|
-
interaction: {
|
|
464
|
-
...props.interaction,
|
|
465
|
-
hoveredIndex: isAxisHoverCompositor ? this.hover.axisIndex ?? null : isThisSeriesHoveredCompositor ? this.hover.index : null,
|
|
466
|
-
isSeriesHovered: isAxisHoverCompositor ? false : (layoutData.isStacked || layoutData.isGrouped) && isAnyHoverCompositor && isThisSeriesHoveredCompositor,
|
|
467
|
-
isSeriesDimmed: isAxisHoverCompositor ? false : isAnyHoverCompositor && !isThisSeriesHoveredCompositor
|
|
468
|
-
}
|
|
476
|
+
interaction: barHoverInteraction(props.interaction, dsId, this.hover, { isWaterfall: layoutData.isWaterfall, isStacked: layoutData.isStacked, isGrouped: layoutData.isGrouped }, layout.visibleBars, orientation)
|
|
469
477
|
};
|
|
470
478
|
this._paint.renderCanvas(propsWithHover, layout, ctx, context);
|
|
471
479
|
if (this.labelConfig && this.lastInput?.datasetVisibility?.get(dsId) !== false) {
|
|
@@ -550,26 +558,44 @@ var BarRendererController = class {
|
|
|
550
558
|
applyHover(hover) {
|
|
551
559
|
applyHover(this, hover);
|
|
552
560
|
}
|
|
561
|
+
/**
|
|
562
|
+
* Hit-test layouts excluding toggled-off datasets. `computeBarVisualLayout`
|
|
563
|
+
* writes a full-size layout into `layoutCache` for EVERY dataset (the
|
|
564
|
+
* `layouts.set` runs before its `if (ds.visible)` gate) so an exiting bar
|
|
565
|
+
* can animate out, which means a hidden dataset lingers in the cache at full
|
|
566
|
+
* size. Gating on the authoritative `datasetVisibility` keeps a toggled-off
|
|
567
|
+
* series from producing a tooltip without disturbing the cache the exit
|
|
568
|
+
* animation relies on.
|
|
569
|
+
*/
|
|
570
|
+
get _hitTestLayouts() {
|
|
571
|
+
const vis = this.lastInput?.datasetVisibility;
|
|
572
|
+
if (!vis) return this.layoutCache;
|
|
573
|
+
const visible = /* @__PURE__ */ new Map();
|
|
574
|
+
for (const [id, layout] of this.layoutCache) {
|
|
575
|
+
if (vis.get(id) !== false) visible.set(id, layout);
|
|
576
|
+
}
|
|
577
|
+
return visible;
|
|
578
|
+
}
|
|
553
579
|
/**
|
|
554
580
|
* Hit test at pixel coordinates.
|
|
555
581
|
*/
|
|
556
582
|
hitTest(x, y) {
|
|
557
583
|
if (!this.lastInput?.layoutData) return null;
|
|
558
|
-
return barHitTest(x, y, { layouts: this.
|
|
584
|
+
return barHitTest(x, y, { layouts: this._hitTestLayouts, renderPropsCache: this.renderPropsCache, datasets: this.lastInput.datasets, layoutData: this.lastInput.layoutData, theme: this.lastInput.theme });
|
|
559
585
|
}
|
|
560
586
|
/**
|
|
561
587
|
* Find the nearest data point by category axis proximity (for crosshair mode).
|
|
562
588
|
*/
|
|
563
589
|
findNearest(x, y) {
|
|
564
590
|
if (!this.lastInput?.layoutData) return null;
|
|
565
|
-
return barFindNearest(x, y, { layouts: this.
|
|
591
|
+
return barFindNearest(x, y, { layouts: this._hitTestLayouts, renderPropsCache: this.renderPropsCache, datasets: this.lastInput.datasets, layoutData: this.lastInput.layoutData, theme: this.lastInput.theme });
|
|
566
592
|
}
|
|
567
593
|
/**
|
|
568
594
|
* Find ALL dataset hits at the nearest category (for multi-series crosshair badges).
|
|
569
595
|
*/
|
|
570
596
|
findAllNearest(x, y) {
|
|
571
597
|
if (!this.lastInput?.layoutData) return null;
|
|
572
|
-
return barFindAllNearest(x, y, { layouts: this.
|
|
598
|
+
return barFindAllNearest(x, y, { layouts: this._hitTestLayouts, renderPropsCache: this.renderPropsCache, datasets: this.lastInput.datasets, layoutData: this.lastInput.layoutData, theme: this.lastInput.theme });
|
|
573
599
|
}
|
|
574
600
|
/**
|
|
575
601
|
* Not used for bar (renders directly to DOM). Provided for interface compliance.
|
|
@@ -585,6 +611,15 @@ var BarRendererController = class {
|
|
|
585
611
|
get layouts() {
|
|
586
612
|
return this.layoutCache;
|
|
587
613
|
}
|
|
614
|
+
/**
|
|
615
|
+
* Live animated bar layouts — the geometry of the current rAF frame, falling back to
|
|
616
|
+
* the settled target layout when no frame has rendered yet. Per-frame consumers (e.g.
|
|
617
|
+
* custom SVG data-label VNodes) read this so their positions track the entrance/transition
|
|
618
|
+
* animation instead of snapping to the final layout, matching the canvas label path.
|
|
619
|
+
*/
|
|
620
|
+
get renderedLayouts() {
|
|
621
|
+
return this.lastRenderedLayouts ?? this.layoutCache;
|
|
622
|
+
}
|
|
588
623
|
/** Current bar render props (for external consumers) */
|
|
589
624
|
get renderProps() {
|
|
590
625
|
return this.renderPropsCache;
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { computeSliceGeometry } from './chunk-ARVMVGWS.mjs';
|
|
2
|
+
import { buildSvgArcPath, CLIP_PIXEL_MARGIN } from './chunk-4S3FOFCN.mjs';
|
|
3
|
+
import { computeSliceHoverEffects } from './chunk-F6AGZQDA.mjs';
|
|
4
|
+
import { DEFAULT_FALLBACK_COLOR, DEFAULT_HOVER_BRIGHTNESS, DEFAULT_HOVER_DIM_OPACITY } from './chunk-6LUIVTNV.mjs';
|
|
5
|
+
import { getDefaultColor, makeItemContext, resolveAccessor, getColor, isGradientColor, remapStopsForDonut, createSvgGradientFromColor } from './chunk-BDCNBS6W.mjs';
|
|
6
|
+
import { svgNode, svgClass, brightenGradientStops, adjustBrightness } from './chunk-BF7RP4A3.mjs';
|
|
7
|
+
import { pointOnCircle, toRad } from './chunk-K7AGQTVK.mjs';
|
|
8
|
+
|
|
9
|
+
// src/series/pie/svg/index.ts
|
|
10
|
+
function buildSliceRenderContext(slice, renderInfo, position, geo, theme, chartCenter, fontFamily) {
|
|
11
|
+
const item = renderInfo.data[slice.originalIndex];
|
|
12
|
+
const angle = slice.endAngle - slice.rotation;
|
|
13
|
+
const sliceCtx = makeItemContext(item, slice.originalIndex);
|
|
14
|
+
const originalValue = Number(resolveAccessor(renderInfo.props.valueField, sliceCtx)) || slice.value;
|
|
15
|
+
const sliceLabel = String(resolveAccessor(renderInfo.props.categoryField, sliceCtx) ?? "");
|
|
16
|
+
return {
|
|
17
|
+
index: slice.originalIndex,
|
|
18
|
+
data: item,
|
|
19
|
+
value: originalValue,
|
|
20
|
+
percentage: slice.percentage,
|
|
21
|
+
label: sliceLabel,
|
|
22
|
+
color: slice.color ?? getColor(renderInfo.props, slice.originalIndex, item, theme, { value: originalValue, category: sliceLabel }),
|
|
23
|
+
center: chartCenter ?? position,
|
|
24
|
+
x: position.x,
|
|
25
|
+
y: position.y,
|
|
26
|
+
angle: geo.midAngle,
|
|
27
|
+
isHovered: geo.isHovered,
|
|
28
|
+
isVisible: angle > 0.1,
|
|
29
|
+
fontFamily: fontFamily ?? "sans-serif"
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function updatePieCustomContent(frame, refs, theme, fontFamily) {
|
|
33
|
+
const { slices, center } = frame;
|
|
34
|
+
const activeCustomKeys = /* @__PURE__ */ new Set();
|
|
35
|
+
for (const slice of slices) {
|
|
36
|
+
const key = `${slice.datasetIndex}-${slice.originalIndex}`;
|
|
37
|
+
const angle = slice.endAngle - slice.rotation;
|
|
38
|
+
const geo = computeSliceGeometry(slice, slice.rotation, frame);
|
|
39
|
+
const customEl = refs.customContent.get(key);
|
|
40
|
+
if (!customEl) continue;
|
|
41
|
+
const pt = pointOnCircle(center.x + geo.offsetX, center.y + geo.offsetY, geo.midAngle, geo.midRadius);
|
|
42
|
+
customEl.setAttribute("transform", `translate(${pt.x}, ${pt.y})`);
|
|
43
|
+
customEl.style.opacity = String(Math.min(1, angle / 10));
|
|
44
|
+
activeCustomKeys.add(key);
|
|
45
|
+
let renderInfo;
|
|
46
|
+
for (const [, info] of refs.renderFns) {
|
|
47
|
+
if (info.datasetIndex === slice.datasetIndex) {
|
|
48
|
+
renderInfo = info;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (renderInfo && renderInfo.data[slice.originalIndex]) {
|
|
53
|
+
const result = renderInfo.fn(buildSliceRenderContext(slice, renderInfo, pt, geo, theme, void 0, fontFamily));
|
|
54
|
+
if (result && typeof result === "object" && "text" in result) {
|
|
55
|
+
const textEl = customEl.querySelector("text");
|
|
56
|
+
if (textEl) {
|
|
57
|
+
textEl.textContent = result.text;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (activeCustomKeys.size > 0) {
|
|
63
|
+
for (const [key, el] of refs.customContent) {
|
|
64
|
+
if (!activeCustomKeys.has(key)) {
|
|
65
|
+
el.style.opacity = "0";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function resolveSliceFillDescriptor(slice, isHovered, hasAnyHover, hoverConfig, theme, gradientId, innerRadius, outerRadius) {
|
|
71
|
+
const colorValue = slice.colorValue;
|
|
72
|
+
const isGradient = colorValue !== void 0 && isGradientColor(colorValue);
|
|
73
|
+
let baseFill;
|
|
74
|
+
if (isGradient) {
|
|
75
|
+
baseFill = `url(#${gradientId})`;
|
|
76
|
+
} else if (typeof colorValue === "string") {
|
|
77
|
+
baseFill = colorValue;
|
|
78
|
+
} else if (typeof slice.color === "string") {
|
|
79
|
+
baseFill = slice.color;
|
|
80
|
+
} else {
|
|
81
|
+
baseFill = theme.series[slice.originalIndex % theme.series.length];
|
|
82
|
+
}
|
|
83
|
+
const originalFill = baseFill;
|
|
84
|
+
const fillHoverConfig = isHovered && slice.hoverColor ? { ...hoverConfig, backgroundColor: slice.hoverColor } : hoverConfig;
|
|
85
|
+
let fill = baseFill;
|
|
86
|
+
let opacityAttr;
|
|
87
|
+
let hoverClass = false;
|
|
88
|
+
let inactiveClass = false;
|
|
89
|
+
let gradStops = isGradient ? colorValue.stops : void 0;
|
|
90
|
+
if (fillHoverConfig) {
|
|
91
|
+
const brightness = fillHoverConfig.brightness ?? theme.hoverBrightness ?? DEFAULT_HOVER_BRIGHTNESS;
|
|
92
|
+
if (isHovered) {
|
|
93
|
+
if (fillHoverConfig.backgroundColor) {
|
|
94
|
+
fill = fillHoverConfig.backgroundColor;
|
|
95
|
+
} else if (isGradient) {
|
|
96
|
+
gradStops = brightenGradientStops(colorValue, brightness).stops;
|
|
97
|
+
fill = baseFill;
|
|
98
|
+
} else if (fillHoverConfig.brightness === void 0) {
|
|
99
|
+
hoverClass = true;
|
|
100
|
+
fill = baseFill;
|
|
101
|
+
} else {
|
|
102
|
+
fill = adjustBrightness(baseFill, fillHoverConfig.brightness);
|
|
103
|
+
}
|
|
104
|
+
} else if (hasAnyHover) {
|
|
105
|
+
if (fillHoverConfig.dimOpacity !== void 0) {
|
|
106
|
+
if (fillHoverConfig.dimOpacity < 1) opacityAttr = String(fillHoverConfig.dimOpacity);
|
|
107
|
+
} else if ((theme.dimOpacity ?? DEFAULT_HOVER_DIM_OPACITY) < 1) {
|
|
108
|
+
inactiveClass = true;
|
|
109
|
+
}
|
|
110
|
+
fill = baseFill;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
let gradientDef;
|
|
114
|
+
if (isGradient) {
|
|
115
|
+
const cv = colorValue;
|
|
116
|
+
const remapped = innerRadius > 0 && cv.radialGradient ? remapStopsForDonut(gradStops ?? cv.stops, innerRadius / outerRadius) : gradStops ?? cv.stops;
|
|
117
|
+
const gradientColor = { ...cv, stops: remapped };
|
|
118
|
+
gradientDef = createSvgGradientFromColor(gradientColor, gradientId, { x: 0, y: 0 }, outerRadius);
|
|
119
|
+
}
|
|
120
|
+
return { fill, opacityAttr, originalFill, gradientDef, hoverClass, inactiveClass };
|
|
121
|
+
}
|
|
122
|
+
function buildPieSvgChildren(frame, hoverConfig, theme, chartId, datasetIndex) {
|
|
123
|
+
const { fullCircle, hoverState } = frame;
|
|
124
|
+
const hasAnyHover = hoverState.index !== null;
|
|
125
|
+
const defsChildren = [];
|
|
126
|
+
const sliceGroups = [];
|
|
127
|
+
for (const slice of frame.slices) {
|
|
128
|
+
if (slice.datasetIndex !== datasetIndex) continue;
|
|
129
|
+
const dataIndex = slice.originalIndex;
|
|
130
|
+
const angle = slice.endAngle - slice.rotation;
|
|
131
|
+
const geo = computeSliceGeometry(slice, slice.rotation, frame);
|
|
132
|
+
const isHovered = geo.isHovered;
|
|
133
|
+
const gradientId = `${chartId}-pie-${datasetIndex}-grad-${dataIndex}`;
|
|
134
|
+
const clipId = `${chartId}-pie-${datasetIndex}-clip-${dataIndex}`;
|
|
135
|
+
const pathD = buildSvgArcPath(
|
|
136
|
+
{
|
|
137
|
+
rotation: geo.renderRotation,
|
|
138
|
+
endAngle: geo.renderRotation + geo.renderAngle,
|
|
139
|
+
outerRadius: geo.sliceOuterRadius,
|
|
140
|
+
innerRadius: geo.sliceInnerRadius,
|
|
141
|
+
borderRadius: slice.borderRadius
|
|
142
|
+
},
|
|
143
|
+
fullCircle
|
|
144
|
+
);
|
|
145
|
+
const PIXEL_MARGIN = CLIP_PIXEL_MARGIN;
|
|
146
|
+
const angleDelta = geo.sliceOuterRadius > 0 ? PIXEL_MARGIN / geo.sliceOuterRadius * (180 / Math.PI) : 0;
|
|
147
|
+
const expandedClipPath = buildSvgArcPath(
|
|
148
|
+
{
|
|
149
|
+
rotation: geo.renderRotation - angleDelta,
|
|
150
|
+
endAngle: geo.renderRotation + geo.renderAngle + angleDelta,
|
|
151
|
+
outerRadius: geo.sliceOuterRadius,
|
|
152
|
+
innerRadius: geo.sliceInnerRadius,
|
|
153
|
+
borderRadius: slice.borderRadius
|
|
154
|
+
},
|
|
155
|
+
fullCircle
|
|
156
|
+
);
|
|
157
|
+
defsChildren.push(svgNode("clipPath", { id: clipId }, [svgNode("path", { d: expandedClipPath })]));
|
|
158
|
+
const { fill, opacityAttr, originalFill, gradientDef, hoverClass, inactiveClass } = resolveSliceFillDescriptor(slice, isHovered, hasAnyHover, hoverConfig, theme, gradientId, frame.innerRadius, frame.outerRadius);
|
|
159
|
+
if (gradientDef) defsChildren.push(gradientDef);
|
|
160
|
+
const {
|
|
161
|
+
borderStrokeWidth: bw,
|
|
162
|
+
borderColor: computedBorderColor,
|
|
163
|
+
borderDash: hoverBorderDash
|
|
164
|
+
} = computeSliceHoverEffects(slice.color ?? DEFAULT_FALLBACK_COLOR, slice.borderColor ?? "transparent", slice.borderStrokeWidth ?? 0, isHovered, hasAnyHover, hoverConfig, theme);
|
|
165
|
+
const bc = isHovered && slice.hoverBorderColor ? slice.hoverBorderColor : computedBorderColor;
|
|
166
|
+
const isInner = (frame.borderAlign ?? "inner") === "inner";
|
|
167
|
+
const joinStyle = frame.borderJoinStyle ?? "miter";
|
|
168
|
+
const strokeAttrs = {
|
|
169
|
+
d: pathD,
|
|
170
|
+
fill: "none",
|
|
171
|
+
"stroke-linejoin": joinStyle,
|
|
172
|
+
"data-stroke-path": "true",
|
|
173
|
+
"data-clip-id": clipId,
|
|
174
|
+
...isInner ? { "clip-path": `url(#${clipId})` } : {}
|
|
175
|
+
};
|
|
176
|
+
if (bw > 0 && bc !== "transparent") {
|
|
177
|
+
strokeAttrs.stroke = bc;
|
|
178
|
+
strokeAttrs["stroke-width"] = String(isInner ? bw * 2 : bw);
|
|
179
|
+
const bd = hoverBorderDash ?? slice.borderDash;
|
|
180
|
+
if (bd && bd.length > 0) {
|
|
181
|
+
strokeAttrs["stroke-dasharray"] = bd.join(" ");
|
|
182
|
+
strokeAttrs["stroke-dashoffset"] = String(slice.borderDashOffset ?? 0);
|
|
183
|
+
}
|
|
184
|
+
} else {
|
|
185
|
+
strokeAttrs.stroke = "transparent";
|
|
186
|
+
strokeAttrs["stroke-width"] = "0";
|
|
187
|
+
}
|
|
188
|
+
const colorClassN = `p-chart-color-${dataIndex % 14}`;
|
|
189
|
+
const usesColorClass = slice.colorValue === getDefaultColor(slice.originalIndex, theme);
|
|
190
|
+
const fillCls = svgClass("p-chart-arc", `p-chart-series-${dataIndex}`, usesColorClass && colorClassN, hoverClass && "p-chart-point-hover", inactiveClass && "p-chart-point-inactive");
|
|
191
|
+
const fillAttrs = {
|
|
192
|
+
d: pathD,
|
|
193
|
+
fill,
|
|
194
|
+
"data-index": dataIndex,
|
|
195
|
+
class: fillCls,
|
|
196
|
+
"data-fill-path": "true",
|
|
197
|
+
// applySvgHoverFill / applySvgHoverStroke bookkeeping (only written when a hoverConfig is
|
|
198
|
+
// present). applySvgHoverStroke runs on the FILL path (updateSvgSlices:286); on its first
|
|
199
|
+
// call it seeds `data-original-stroke` / `data-original-stroke-width` from the fill path's
|
|
200
|
+
// (absent) stroke attrs → empty strings. `data-original-stroke-dasharray` is only seeded
|
|
201
|
+
// when a base dasharray exists (the fill path never has one), so it stays absent here.
|
|
202
|
+
...hoverConfig ? { "data-original-fill": originalFill, "data-original-stroke": "", "data-original-stroke-width": "" } : {},
|
|
203
|
+
...opacityAttr !== void 0 ? { opacity: opacityAttr } : {}
|
|
204
|
+
};
|
|
205
|
+
if (isHovered && hoverConfig && (hoverConfig.borderColor || hoverConfig.borderStrokeWidth !== void 0)) {
|
|
206
|
+
if (hoverConfig.borderColor) fillAttrs.stroke = hoverConfig.borderColor;
|
|
207
|
+
if (hoverConfig.borderStrokeWidth !== void 0) fillAttrs["stroke-width"] = String(hoverConfig.borderStrokeWidth * 2);
|
|
208
|
+
if (hoverConfig.borderDash) fillAttrs["stroke-dasharray"] = hoverConfig.borderDash.join(" ");
|
|
209
|
+
fillAttrs["paint-order"] = "stroke fill";
|
|
210
|
+
}
|
|
211
|
+
const fillPath = svgNode("path", fillAttrs);
|
|
212
|
+
const strokePath = svgNode("path", strokeAttrs);
|
|
213
|
+
const slotX = Math.cos(toRad(geo.midAngle)) * geo.midRadius;
|
|
214
|
+
const slotY = Math.sin(toRad(geo.midAngle)) * geo.midRadius;
|
|
215
|
+
const contentSlot = svgNode("g", {
|
|
216
|
+
class: "slice-content",
|
|
217
|
+
"data-content-index": dataIndex,
|
|
218
|
+
transform: `translate(${slotX}, ${slotY})`,
|
|
219
|
+
opacity: angle < 0.1 ? "0" : "1"
|
|
220
|
+
});
|
|
221
|
+
const hasOffset = geo.offsetX !== 0 || geo.offsetY !== 0;
|
|
222
|
+
const hasScale = geo.scale !== 1;
|
|
223
|
+
const transformParts = [];
|
|
224
|
+
if (hasOffset) transformParts.push(`translate(${geo.offsetX}, ${geo.offsetY})`);
|
|
225
|
+
if (hasScale) transformParts.push(`scale(${geo.scale})`);
|
|
226
|
+
const groupAttrs = {
|
|
227
|
+
"data-slice-index": dataIndex,
|
|
228
|
+
"data-index": dataIndex,
|
|
229
|
+
// userOpacity + span<0.1 hide, as an ATTRIBUTE (normalized vs style in the parity test).
|
|
230
|
+
opacity: angle < 0.1 ? "0" : String(slice.userOpacity ?? 1),
|
|
231
|
+
...transformParts.length > 0 ? { transform: transformParts.join(" ") } : {}
|
|
232
|
+
};
|
|
233
|
+
sliceGroups.push(svgNode("g", groupAttrs, [fillPath, strokePath, contentSlot]));
|
|
234
|
+
}
|
|
235
|
+
return defsChildren.length > 0 ? [svgNode("defs", void 0, defsChildren), ...sliceGroups] : sliceGroups;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export { buildPieSvgChildren, updatePieCustomContent };
|