@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,27 +1,26 @@
|
|
|
1
|
-
import { detectDatasetTypes, processClickCore, processMouseLeaveCore, processMouseMoveCore, computeThemeDependentFields, computeChartState } from './chunk-
|
|
2
|
-
import { calculateRingLayouts, buildPieVisibilityMap, applyRingLayout, computeSliceRadiusRatios, buildSliceStyleData, buildRingTarget, buildHitTestStates } from './chunk-
|
|
3
|
-
import { computeCartesianLayout } from './chunk-
|
|
4
|
-
import { boxAreaToBounds, computeLabelAwareRadius, buildPieDataLabelLayout } from './chunk-
|
|
5
|
-
import { calculatePieLayout } from './chunk-
|
|
6
|
-
import { findSliceAtPoint, isFullCircle } from './chunk-
|
|
7
|
-
import { AnimatedScene, resolveAnimatedProps, PIE_ANIMATABLE_PROPS } from './chunk-
|
|
8
|
-
import { resolveLegendHoverTarget, resolveLegendClickAction } from './chunk-
|
|
9
|
-
import { reconcileSvgChildren } from './chunk-
|
|
10
|
-
import { parseAnimationConfig } from './chunk-
|
|
11
|
-
import { ResizeDebouncer } from './chunk-
|
|
12
|
-
import { processDimensions } from './chunk-
|
|
13
|
-
import { cancelRaf, raf } from './chunk-
|
|
14
|
-
import { INACTIVE_STATE, getNavigableDatasets, handleKeyNavigation, generateAnnouncement } from './chunk-
|
|
15
|
-
import { hoverConfigToFullEffect } from './chunk-
|
|
16
|
-
import { buildAccessibilityRenderContext, generateSeriesDescription } from './chunk-
|
|
17
|
-
import { collectItems } from './chunk-
|
|
18
|
-
import { normalizeDataLabelConfig, formatDataLabelText } from './chunk-
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { isDrilldownEnabled, getDrilldownRootLabel } from './chunk-
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { shallowEqual, warnChartDevOnce } from './chunk-RQ3CKQOX.mjs';
|
|
1
|
+
import { detectDatasetTypes, processClickCore, processMouseLeaveCore, processMouseMoveCore, computeThemeDependentFields, computeChartState } from './chunk-AYEAEAOV.mjs';
|
|
2
|
+
import { calculateRingLayouts, buildPieVisibilityMap, applyRingLayout, computeSliceRadiusRatios, buildSliceStyleData, buildRingTarget, buildHitTestStates } from './chunk-SWVOBJLG.mjs';
|
|
3
|
+
import { computeCartesianLayout } from './chunk-P2Q4DYOS.mjs';
|
|
4
|
+
import { boxAreaToBounds, computeLabelAwareRadius, buildPieDataLabelLayout } from './chunk-7I2SAKHL.mjs';
|
|
5
|
+
import { calculatePieLayout } from './chunk-UF2TPGQB.mjs';
|
|
6
|
+
import { findSliceAtPoint, isFullCircle } from './chunk-4S3FOFCN.mjs';
|
|
7
|
+
import { AnimatedScene, resolveAnimatedProps, PIE_ANIMATABLE_PROPS } from './chunk-JS47MSB2.mjs';
|
|
8
|
+
import { resolveLegendHoverTarget, resolveLegendClickAction } from './chunk-AC5EAWIP.mjs';
|
|
9
|
+
import { reconcileSvgChildren } from './chunk-FWNWV3H7.mjs';
|
|
10
|
+
import { parseAnimationConfig } from './chunk-LTQH3LQJ.mjs';
|
|
11
|
+
import { ResizeDebouncer } from './chunk-P563L7WL.mjs';
|
|
12
|
+
import { processDimensions } from './chunk-T2UAEMHY.mjs';
|
|
13
|
+
import { cancelRaf, raf } from './chunk-5WFF272M.mjs';
|
|
14
|
+
import { INACTIVE_STATE, getNavigableDatasets, handleKeyNavigation, generateAnnouncement } from './chunk-4N2XIMAB.mjs';
|
|
15
|
+
import { hoverConfigToFullEffect } from './chunk-F6AGZQDA.mjs';
|
|
16
|
+
import { buildAccessibilityRenderContext, generateSeriesDescription } from './chunk-IFJPDARC.mjs';
|
|
17
|
+
import { collectItems } from './chunk-FRVJH7ZG.mjs';
|
|
18
|
+
import { normalizeDataLabelConfig, formatDataLabelText } from './chunk-J2WHJ73Y.mjs';
|
|
19
|
+
import { DEFAULT_HOVER_BRIGHTNESS } from './chunk-6LUIVTNV.mjs';
|
|
20
|
+
import { FIELD_DEFAULTS, resolveAccessor, makeItemContext, getColorValue, resolveSwatchColor, asGradient, getDefaultColor, defaultLightTheme } from './chunk-BDCNBS6W.mjs';
|
|
21
|
+
import { isDrilldownEnabled, getDrilldownRootLabel } from './chunk-4KQZXAHZ.mjs';
|
|
22
|
+
import { createSvgElement } from './chunk-BF7RP4A3.mjs';
|
|
23
|
+
import { shallowEqual, warnChartDevOnce } from './chunk-K7AGQTVK.mjs';
|
|
25
24
|
import { defineComponent } from '@primeui/core';
|
|
26
25
|
|
|
27
26
|
// src/controllers/AxisRegistrationController.ts
|
|
@@ -1047,7 +1046,7 @@ function snapshotAccumulatedPositions(ctx) {
|
|
|
1047
1046
|
if (!ringOrder.has(dsIdx)) ringOrder.set(dsIdx, []);
|
|
1048
1047
|
ringOrder.get(dsIdx).push(id);
|
|
1049
1048
|
}
|
|
1050
|
-
for (const el of ctx._scene.
|
|
1049
|
+
for (const el of ctx._scene.elementValues()) {
|
|
1051
1050
|
if (el.phase !== "exit") continue;
|
|
1052
1051
|
const dsIdx = parseInt(el.id.split("-")[0]);
|
|
1053
1052
|
if (!ringOrder.has(dsIdx)) ringOrder.set(dsIdx, []);
|
|
@@ -1074,7 +1073,7 @@ function buildSlicesFromScene(ctx) {
|
|
|
1074
1073
|
if (!ringOrder.has(dsIdx)) ringOrder.set(dsIdx, []);
|
|
1075
1074
|
ringOrder.get(dsIdx).push(id);
|
|
1076
1075
|
}
|
|
1077
|
-
for (const el of ctx._scene.
|
|
1076
|
+
for (const el of ctx._scene.elementValues()) {
|
|
1078
1077
|
if (el.phase !== "exit") continue;
|
|
1079
1078
|
const dsIdx = parseInt(el.id.split("-")[0]);
|
|
1080
1079
|
if (!ringOrder.has(dsIdx)) ringOrder.set(dsIdx, []);
|
|
@@ -1621,10 +1620,8 @@ var PieRendererController = class {
|
|
|
1621
1620
|
// Renormalized share (0-100) over the visible slices, so the
|
|
1622
1621
|
// tooltip (auto-percentage + ctx.percentage) tracks legend toggles.
|
|
1623
1622
|
percentage: ss.percentage,
|
|
1624
|
-
//
|
|
1625
|
-
//
|
|
1626
|
-
// 61.31423044588703) renders cleanly ("61.3"), matching axes/labels.
|
|
1627
|
-
formattedValue: formatCompactValue(ss.value),
|
|
1623
|
+
// No pre-formatted value: `buildTooltipContent` formats the raw
|
|
1624
|
+
// (mid-animation tween) value once, locale-aware at two decimals.
|
|
1628
1625
|
color: ss.color ?? "#000",
|
|
1629
1626
|
colorGradient: asGradient(colorValue),
|
|
1630
1627
|
swatchColor: resolveSwatchColor(pieEntry.props, ss.originalIndex, item, this._lastInput?.theme, colorExtras)
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { buildPieDataLabelLayout, drawCanvasStraightLeaderLine, drawCanvasLeaderLine, drawCanvasLabelLines } from './chunk-7I2SAKHL.mjs';
|
|
2
|
+
import { computeSliceGeometry } from './chunk-ARVMVGWS.mjs';
|
|
3
|
+
import { drawCanvasArc, CLIP_PIXEL_MARGIN } from './chunk-4S3FOFCN.mjs';
|
|
4
|
+
import { computeLeaderLineHoverEffects, computeSliceHoverEffects } from './chunk-F6AGZQDA.mjs';
|
|
5
|
+
import { createDrawImage } from './chunk-HXDLOOCS.mjs';
|
|
6
|
+
import { safeRenderProp } from './chunk-DIJFKY6H.mjs';
|
|
7
|
+
import { DEFAULT_FALLBACK_COLOR } from './chunk-6LUIVTNV.mjs';
|
|
8
|
+
import { isGradientColor, remapStopsForDonut, createCanvasGradientFromColor, makeItemContext, resolveAccessor, getColor } from './chunk-BDCNBS6W.mjs';
|
|
9
|
+
import { withCanvasState } from './chunk-BF7RP4A3.mjs';
|
|
10
|
+
import { toRad } from './chunk-K7AGQTVK.mjs';
|
|
11
|
+
|
|
12
|
+
// src/series/pie/canvas/index.ts
|
|
13
|
+
function buildSliceRenderContext(slice, renderInfo, position, geo, theme, chartCenter, fontFamily) {
|
|
14
|
+
const item = renderInfo.data[slice.originalIndex];
|
|
15
|
+
const angle = slice.endAngle - slice.rotation;
|
|
16
|
+
const sliceCtx = makeItemContext(item, slice.originalIndex);
|
|
17
|
+
const originalValue = Number(resolveAccessor(renderInfo.props.valueField, sliceCtx)) || slice.value;
|
|
18
|
+
const sliceLabel = String(resolveAccessor(renderInfo.props.categoryField, sliceCtx) ?? "");
|
|
19
|
+
return {
|
|
20
|
+
index: slice.originalIndex,
|
|
21
|
+
data: item,
|
|
22
|
+
value: originalValue,
|
|
23
|
+
percentage: slice.percentage,
|
|
24
|
+
label: sliceLabel,
|
|
25
|
+
color: slice.color ?? getColor(renderInfo.props, slice.originalIndex, item, theme, { value: originalValue, category: sliceLabel }),
|
|
26
|
+
center: position,
|
|
27
|
+
x: position.x,
|
|
28
|
+
y: position.y,
|
|
29
|
+
angle: geo.midAngle,
|
|
30
|
+
isHovered: geo.isHovered,
|
|
31
|
+
isVisible: angle > 0.1,
|
|
32
|
+
fontFamily: fontFamily ?? "sans-serif"
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function renderCanvasDataLabels(ctx, frame, viewportBounds, labelConfig, textColor, datasetPropsMap, hoverConfig, theme, onImageLoad) {
|
|
36
|
+
const { center, hoverState } = frame;
|
|
37
|
+
const built = buildPieDataLabelLayout(frame, labelConfig, { width: viewportBounds.width, height: viewportBounds.height }, datasetPropsMap);
|
|
38
|
+
if (!built) return;
|
|
39
|
+
const { labelLayout, configsByIndex: labelConfigByIndex, labelSlices: sliceMap } = built;
|
|
40
|
+
const hasAnyHover = hoverState.index !== null;
|
|
41
|
+
const drawOptions = {
|
|
42
|
+
fontSize: labelConfig.fontSize,
|
|
43
|
+
fontFamily: labelConfig.fontFamily,
|
|
44
|
+
fontWeight: labelConfig.fontWeight,
|
|
45
|
+
lineHeight: labelConfig.lineHeight,
|
|
46
|
+
textOffset: labelConfig.textOffset,
|
|
47
|
+
centered: labelConfig.lineStyle === "none"
|
|
48
|
+
};
|
|
49
|
+
for (const labelItem of labelLayout.labels) {
|
|
50
|
+
const { index, color: lineColor, side } = labelItem;
|
|
51
|
+
const slice = sliceMap.get(index);
|
|
52
|
+
const isSliceHovered = slice ? hoverState.datasetIndex === slice.datasetIndex && hoverState.index === slice.originalIndex : false;
|
|
53
|
+
const { strokeColor, strokeWidth } = computeLeaderLineHoverEffects(lineColor, isSliceHovered, hasAnyHover, hoverConfig, theme);
|
|
54
|
+
const absLeaderLine = {
|
|
55
|
+
x1: center.x + labelItem.leaderLine.x1,
|
|
56
|
+
y1: center.y + labelItem.leaderLine.y1,
|
|
57
|
+
x2: center.x + labelItem.leaderLine.x2,
|
|
58
|
+
y2: center.y + labelItem.leaderLine.y2,
|
|
59
|
+
x3: center.x + labelItem.leaderLine.x3,
|
|
60
|
+
y3: center.y + labelItem.leaderLine.y3
|
|
61
|
+
};
|
|
62
|
+
if (labelConfig.render) {
|
|
63
|
+
const originalConfig = labelConfigByIndex.get(index);
|
|
64
|
+
const textX = center.x + labelItem.x + (side === "right" ? drawOptions.textOffset : -drawOptions.textOffset);
|
|
65
|
+
const textY = center.y + labelItem.y;
|
|
66
|
+
let handled = false;
|
|
67
|
+
withCanvasState(ctx, () => {
|
|
68
|
+
ctx.translate(textX, textY);
|
|
69
|
+
const renderContext = {
|
|
70
|
+
index,
|
|
71
|
+
value: originalConfig?.value ?? 0,
|
|
72
|
+
percentage: originalConfig?.percentage ?? 0,
|
|
73
|
+
formattedText: originalConfig?.text ?? "",
|
|
74
|
+
label: originalConfig?.label ?? "",
|
|
75
|
+
// Per-label color override wins over the leader-line/slice color in the custom render context.
|
|
76
|
+
color: labelItem.textColor ?? textColor ?? lineColor,
|
|
77
|
+
x: textX,
|
|
78
|
+
y: textY,
|
|
79
|
+
side,
|
|
80
|
+
leaderLine: absLeaderLine,
|
|
81
|
+
center: { x: center.x, y: center.y },
|
|
82
|
+
ctx,
|
|
83
|
+
drawImage: onImageLoad ? createDrawImage(ctx, onImageLoad) : void 0
|
|
84
|
+
};
|
|
85
|
+
safeRenderProp(() => labelConfig.render(renderContext), "data label");
|
|
86
|
+
handled = true;
|
|
87
|
+
});
|
|
88
|
+
if (handled) continue;
|
|
89
|
+
}
|
|
90
|
+
const lineStrokeColor = labelItem.connectorColor ?? strokeColor;
|
|
91
|
+
const lineStrokeWidth = labelItem.connectorWidth ?? strokeWidth;
|
|
92
|
+
if (labelConfig.lineStyle === "straight") {
|
|
93
|
+
drawCanvasStraightLeaderLine(ctx, labelItem, center.x, center.y, lineStrokeColor, lineStrokeWidth);
|
|
94
|
+
} else if (labelConfig.lineStyle !== "none") {
|
|
95
|
+
drawCanvasLeaderLine(ctx, labelItem, center.x, center.y, lineStrokeColor, lineStrokeWidth);
|
|
96
|
+
}
|
|
97
|
+
const perLabelDrawOptions = labelItem.fontSize !== void 0 ? { ...drawOptions, fontSize: labelItem.fontSize } : drawOptions;
|
|
98
|
+
const perLabelTextColor = labelItem.textColor ?? textColor;
|
|
99
|
+
drawCanvasLabelLines(ctx, labelItem, center.x, center.y, perLabelTextColor, perLabelDrawOptions);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function renderCanvasCustomContent(ctx, frame, canvasRenderFns, onImageLoad, theme, fontFamily) {
|
|
103
|
+
const { slices, center } = frame;
|
|
104
|
+
for (const slice of slices) {
|
|
105
|
+
let renderInfo;
|
|
106
|
+
for (const [, info] of canvasRenderFns) {
|
|
107
|
+
if (info.datasetIndex === slice.datasetIndex) {
|
|
108
|
+
renderInfo = info;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (renderInfo && renderInfo.data[slice.originalIndex]) {
|
|
113
|
+
const angle = slice.endAngle - slice.rotation;
|
|
114
|
+
const geo = computeSliceGeometry(slice, slice.rotation, frame);
|
|
115
|
+
const x = center.x + Math.cos(toRad(geo.midAngle)) * geo.midRadius + geo.offsetX;
|
|
116
|
+
const y = center.y + Math.sin(toRad(geo.midAngle)) * geo.midRadius + geo.offsetY;
|
|
117
|
+
const opacity = Math.min(1, angle / 10);
|
|
118
|
+
const renderContext = buildSliceRenderContext(slice, renderInfo, { x, y }, geo, theme, void 0, fontFamily);
|
|
119
|
+
if (renderContext.isVisible) {
|
|
120
|
+
withCanvasState(ctx, () => {
|
|
121
|
+
ctx.globalAlpha = opacity;
|
|
122
|
+
ctx.translate(x, y);
|
|
123
|
+
renderContext.ctx = ctx;
|
|
124
|
+
renderContext.drawImage = createDrawImage(ctx, onImageLoad);
|
|
125
|
+
const result = renderInfo.fn(renderContext);
|
|
126
|
+
if (result && typeof result === "object" && "text" in result) {
|
|
127
|
+
const { text, style } = result;
|
|
128
|
+
const ff = style?.fontFamily ?? fontFamily ?? "sans-serif";
|
|
129
|
+
ctx.font = `${style?.fontWeight ?? "normal"} ${style?.fontSize ?? "12px"} ${ff}`;
|
|
130
|
+
ctx.fillStyle = style?.fill ?? style?.color ?? "#fff";
|
|
131
|
+
ctx.textAlign = "center";
|
|
132
|
+
ctx.textBaseline = "middle";
|
|
133
|
+
ctx.fillText(text, 0, 0);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function renderCanvasSlices(ctx, frame, hoverConfig, theme) {
|
|
141
|
+
const { slices, center, fullCircle, hoverState } = frame;
|
|
142
|
+
const hasAnyHover = hoverState.index !== null;
|
|
143
|
+
for (const slice of slices) {
|
|
144
|
+
const angle = slice.endAngle - slice.rotation;
|
|
145
|
+
if (angle < 1e-3) continue;
|
|
146
|
+
const geo = computeSliceGeometry(slice, slice.rotation, frame);
|
|
147
|
+
withCanvasState(ctx, () => {
|
|
148
|
+
const arcConfig = {
|
|
149
|
+
rotation: geo.renderRotation,
|
|
150
|
+
endAngle: geo.renderRotation + geo.renderAngle,
|
|
151
|
+
outerRadius: geo.sliceOuterRadius,
|
|
152
|
+
innerRadius: geo.sliceInnerRadius,
|
|
153
|
+
borderRadius: slice.borderRadius
|
|
154
|
+
};
|
|
155
|
+
const cx = center.x + geo.offsetX;
|
|
156
|
+
const cy = center.y + geo.offsetY;
|
|
157
|
+
if (geo.scale !== 1) {
|
|
158
|
+
ctx.translate(cx, cy);
|
|
159
|
+
ctx.scale(geo.scale, geo.scale);
|
|
160
|
+
ctx.translate(-cx, -cy);
|
|
161
|
+
}
|
|
162
|
+
const { fillColor, opacity } = computeSliceHoverEffects(slice.color ?? DEFAULT_FALLBACK_COLOR, slice.borderColor ?? "transparent", slice.borderStrokeWidth ?? 0, geo.isHovered, hasAnyHover, hoverConfig, theme);
|
|
163
|
+
if (opacity < 1) {
|
|
164
|
+
ctx.globalAlpha = opacity;
|
|
165
|
+
}
|
|
166
|
+
drawCanvasArc(ctx, cx, cy, arcConfig, fullCircle);
|
|
167
|
+
const cv = slice.colorValue;
|
|
168
|
+
if (cv && isGradientColor(cv)) {
|
|
169
|
+
const gradientColor = geo.sliceInnerRadius > 0 && cv.radialGradient ? { ...cv, stops: remapStopsForDonut(cv.stops, geo.sliceInnerRadius / geo.sliceOuterRadius) } : cv;
|
|
170
|
+
ctx.fillStyle = createCanvasGradientFromColor(ctx, gradientColor, { x: cx, y: cy }, geo.sliceOuterRadius);
|
|
171
|
+
} else {
|
|
172
|
+
ctx.fillStyle = geo.isHovered && slice.hoverColor ? slice.hoverColor : fillColor;
|
|
173
|
+
}
|
|
174
|
+
ctx.fill();
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
const useInnerBorder = frame.borderAlign === "inner";
|
|
178
|
+
for (const slice of slices) {
|
|
179
|
+
const angle = slice.endAngle - slice.rotation;
|
|
180
|
+
if (angle < 1e-3) continue;
|
|
181
|
+
const baseBorderWidth = slice.borderStrokeWidth ?? 0;
|
|
182
|
+
const geo = computeSliceGeometry(slice, slice.rotation, frame);
|
|
183
|
+
const {
|
|
184
|
+
borderStrokeWidth,
|
|
185
|
+
borderColor: computedBorderColor,
|
|
186
|
+
borderDash: hoverBorderDash,
|
|
187
|
+
opacity
|
|
188
|
+
} = computeSliceHoverEffects(slice.color ?? DEFAULT_FALLBACK_COLOR, slice.borderColor ?? "transparent", baseBorderWidth, geo.isHovered, hasAnyHover, hoverConfig, theme);
|
|
189
|
+
const borderColor = geo.isHovered && slice.hoverBorderColor ? slice.hoverBorderColor : computedBorderColor;
|
|
190
|
+
if (borderStrokeWidth <= 0 || borderColor === "transparent") continue;
|
|
191
|
+
withCanvasState(ctx, () => {
|
|
192
|
+
const arcConfig = {
|
|
193
|
+
rotation: geo.renderRotation,
|
|
194
|
+
endAngle: geo.renderRotation + geo.renderAngle,
|
|
195
|
+
outerRadius: geo.sliceOuterRadius,
|
|
196
|
+
innerRadius: geo.sliceInnerRadius,
|
|
197
|
+
borderRadius: slice.borderRadius
|
|
198
|
+
};
|
|
199
|
+
const cx = center.x + geo.offsetX;
|
|
200
|
+
const cy = center.y + geo.offsetY;
|
|
201
|
+
if (opacity < 1) {
|
|
202
|
+
ctx.globalAlpha = opacity;
|
|
203
|
+
}
|
|
204
|
+
if (borderStrokeWidth > 0 && borderColor !== "transparent") {
|
|
205
|
+
ctx.strokeStyle = borderColor;
|
|
206
|
+
ctx.lineJoin = useInnerBorder ? "miter" : "round";
|
|
207
|
+
const activeDash = hoverBorderDash ?? slice.borderDash;
|
|
208
|
+
if (activeDash && activeDash.length > 0) {
|
|
209
|
+
ctx.setLineDash(activeDash);
|
|
210
|
+
ctx.lineDashOffset = slice.borderDashOffset ?? 0;
|
|
211
|
+
}
|
|
212
|
+
if (useInnerBorder) {
|
|
213
|
+
const PIXEL_MARGIN = CLIP_PIXEL_MARGIN;
|
|
214
|
+
const angleDelta = arcConfig.outerRadius > 0 ? PIXEL_MARGIN / arcConfig.outerRadius * (180 / Math.PI) : 0;
|
|
215
|
+
const expandedArc = {
|
|
216
|
+
...arcConfig,
|
|
217
|
+
rotation: arcConfig.rotation - angleDelta,
|
|
218
|
+
endAngle: arcConfig.endAngle + angleDelta
|
|
219
|
+
};
|
|
220
|
+
drawCanvasArc(ctx, cx, cy, expandedArc, fullCircle);
|
|
221
|
+
ctx.clip();
|
|
222
|
+
ctx.lineWidth = borderStrokeWidth * 2;
|
|
223
|
+
} else {
|
|
224
|
+
ctx.lineWidth = borderStrokeWidth;
|
|
225
|
+
}
|
|
226
|
+
drawCanvasArc(ctx, cx, cy, arcConfig, fullCircle);
|
|
227
|
+
ctx.stroke();
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export { renderCanvasCustomContent, renderCanvasDataLabels, renderCanvasSlices };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DEFAULT_LABEL_SPACING } from './chunk-
|
|
2
|
-
import { batchResolveAccessor } from './chunk-
|
|
3
|
-
import { TICK_INTERVALS, intervalSpanMs, toTimestamp, floorToUnit, calculateNiceDomain, generateNiceTicks } from './chunk-
|
|
1
|
+
import { DEFAULT_LABEL_SPACING } from './chunk-6LUIVTNV.mjs';
|
|
2
|
+
import { batchResolveAccessor } from './chunk-BDCNBS6W.mjs';
|
|
3
|
+
import { TICK_INTERVALS, intervalSpanMs, toTimestamp, floorToUnit, calculateNiceDomain, generateNiceTicks } from './chunk-K7AGQTVK.mjs';
|
|
4
4
|
|
|
5
5
|
// src/utils/data/time/grouping.ts
|
|
6
6
|
function buildOrdinalTimeMapping(timestamps) {
|
|
@@ -42,7 +42,7 @@ function groupTimeData(data, categoryAccessor, valueAccessor, interval, method)
|
|
|
42
42
|
bucket = { timestamp: bucketKey, values: [], firstItem: item };
|
|
43
43
|
buckets.set(bucketKey, bucket);
|
|
44
44
|
}
|
|
45
|
-
const val = Number(item[valueAccessor]);
|
|
45
|
+
const val = valueAccessor !== void 0 ? Number(item[valueAccessor]) : NaN;
|
|
46
46
|
if (!isNaN(val)) {
|
|
47
47
|
bucket.values.push(val);
|
|
48
48
|
}
|
|
@@ -53,7 +53,7 @@ function groupTimeData(data, categoryAccessor, valueAccessor, interval, method)
|
|
|
53
53
|
result.push({
|
|
54
54
|
...bucket.firstItem,
|
|
55
55
|
[categoryAccessor]: new Date(bucket.timestamp),
|
|
56
|
-
[valueAccessor]: aggregated
|
|
56
|
+
...valueAccessor !== void 0 ? { [valueAccessor]: aggregated } : {}
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
result.sort((a, b) => toTimestamp(a[categoryAccessor]) - toTimestamp(b[categoryAccessor]));
|
|
@@ -237,7 +237,7 @@ function computeVisibleValues(series, xMin, xMax) {
|
|
|
237
237
|
return result;
|
|
238
238
|
}
|
|
239
239
|
function expandScatterBubblePadding(params) {
|
|
240
|
-
const { scatterDatasets, valueDomains,
|
|
240
|
+
const { scatterDatasets, valueDomains, valueXDomains, firstValueAxisId, firstCategoryAxisId, chartArea, isLogValueAxis, isLogCategoryAxis } = params;
|
|
241
241
|
const expandLog = ([lo, hi], r, axisLen) => {
|
|
242
242
|
if (lo <= 0 || hi <= 0 || axisLen <= 0 || axisLen <= 2 * r) return [lo, hi];
|
|
243
243
|
const logSpan = Math.log10(hi) - Math.log10(lo);
|
|
@@ -261,14 +261,14 @@ function expandScatterBubblePadding(params) {
|
|
|
261
261
|
maxRadiusByYAxis.set(targetYAxisId, Math.max(maxRadiusByYAxis.get(targetYAxisId) ?? 0, maxRadius));
|
|
262
262
|
}
|
|
263
263
|
for (const [axisId, r] of maxRadiusByXAxis) {
|
|
264
|
-
const xDomain =
|
|
264
|
+
const xDomain = valueXDomains.get(axisId);
|
|
265
265
|
if (!xDomain || chartArea.width <= 0) continue;
|
|
266
266
|
if (isLogCategoryAxis?.(axisId)) {
|
|
267
|
-
|
|
267
|
+
valueXDomains.set(axisId, expandLog(xDomain, r, chartArea.width));
|
|
268
268
|
} else if (chartArea.width > 2 * r) {
|
|
269
269
|
const xRange = xDomain[1] - xDomain[0];
|
|
270
270
|
const xPadding = r * xRange / (chartArea.width - 2 * r);
|
|
271
|
-
|
|
271
|
+
valueXDomains.set(axisId, [xDomain[0] - xPadding, xDomain[1] + xPadding]);
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
for (const [axisId, r] of maxRadiusByYAxis) {
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { scatterHitTest } from './chunk-
|
|
2
|
-
import { collectScatterMarkerOverlays } from './chunk-
|
|
3
|
-
import { registerDatasetLayers, triggerCompositorRepaint } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { AnimatedScene, resolveAnimatedProps, SCATTER_ANIMATABLE_PROPS } from './chunk-
|
|
7
|
-
import { calculateScatterLayout } from './chunk-
|
|
8
|
-
import { reconcileSvgChildren } from './chunk-
|
|
9
|
-
import { parseAnimationConfig } from './chunk-
|
|
10
|
-
import { raf, cancelRaf } from './chunk-
|
|
11
|
-
import { buildAccessibilityRenderContext, generateSeriesDescription } from './chunk-
|
|
12
|
-
import { collectItems } from './chunk-
|
|
13
|
-
import { SCATTER_BOOST_AUTO_THRESHOLD, DEFAULT_HOVER_DIM_OPACITY, DEFAULT_HOVER_BRIGHTNESS, SCATTER_SPATIAL_INDEX_THRESHOLD, DEFAULT_FALLBACK_COLOR } from './chunk-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
1
|
+
import { scatterHitTest } from './chunk-XECVYJE2.mjs';
|
|
2
|
+
import { collectScatterMarkerOverlays } from './chunk-UZWWYKL7.mjs';
|
|
3
|
+
import { registerDatasetLayers, triggerCompositorRepaint } from './chunk-MT3OLVZC.mjs';
|
|
4
|
+
import { renderResolvedLabels } from './chunk-G3DYNMWT.mjs';
|
|
5
|
+
import { resolveScatterLabels } from './chunk-7IKKWWRT.mjs';
|
|
6
|
+
import { AnimatedScene, resolveAnimatedProps, SCATTER_ANIMATABLE_PROPS } from './chunk-JS47MSB2.mjs';
|
|
7
|
+
import { calculateScatterLayout } from './chunk-5EQSFUBA.mjs';
|
|
8
|
+
import { reconcileSvgChildren } from './chunk-FWNWV3H7.mjs';
|
|
9
|
+
import { parseAnimationConfig } from './chunk-LTQH3LQJ.mjs';
|
|
10
|
+
import { raf, cancelRaf } from './chunk-5WFF272M.mjs';
|
|
11
|
+
import { buildAccessibilityRenderContext, generateSeriesDescription } from './chunk-IFJPDARC.mjs';
|
|
12
|
+
import { collectItems } from './chunk-FRVJH7ZG.mjs';
|
|
13
|
+
import { SCATTER_BOOST_AUTO_THRESHOLD, DEFAULT_HOVER_DIM_OPACITY, DEFAULT_HOVER_BRIGHTNESS, SCATTER_SPATIAL_INDEX_THRESHOLD, DEFAULT_FALLBACK_COLOR } from './chunk-6LUIVTNV.mjs';
|
|
14
|
+
import { defaultLightTheme, buildColorIndexMap } from './chunk-BDCNBS6W.mjs';
|
|
15
|
+
import { ScatterDecimator } from './chunk-RIAPS5AW.mjs';
|
|
16
|
+
import { buildQuadtree } from './chunk-KMKULH54.mjs';
|
|
17
|
+
import { resolveCartesianAccessors } from './chunk-G3DIMENH.mjs';
|
|
18
|
+
import { materializeSvgNode, setAttr, createSvgGroup } from './chunk-BF7RP4A3.mjs';
|
|
18
19
|
|
|
19
20
|
// src/series/scatter/controller/index.ts
|
|
20
21
|
function scatterHoverInteraction(base, dsId, hover) {
|
|
@@ -119,12 +120,15 @@ var ScatterRendererController = class {
|
|
|
119
120
|
if (decimationConfig && rawDatasets.length > 0) {
|
|
120
121
|
const zoomX = orientation === "vertical" ? zoomState?.x : zoomState?.y;
|
|
121
122
|
const zoomY = orientation === "vertical" ? zoomState?.y : zoomState?.x;
|
|
122
|
-
this.scatterDatasets = this.decimator.apply(rawDatasets, decimationConfig, zoomX, zoomY
|
|
123
|
+
this.scatterDatasets = this.decimator.apply(rawDatasets, decimationConfig, zoomX, zoomY, {
|
|
124
|
+
width: input.chartArea.width,
|
|
125
|
+
height: input.chartArea.height
|
|
126
|
+
});
|
|
123
127
|
} else {
|
|
124
128
|
this.scatterDatasets = rawDatasets;
|
|
125
129
|
}
|
|
126
|
-
const hasScales = !!input.
|
|
127
|
-
if ((this.scatterDatasets.length === 0 || !hasScales) && this._scene.
|
|
130
|
+
const hasScales = (!!input.valueXScales || !!input.categoryScale) && !!input.valueScales && input.valueScales.size > 0;
|
|
131
|
+
if ((this.scatterDatasets.length === 0 || !hasScales) && this._scene.elementCount === 0) {
|
|
128
132
|
this.layoutCache.clear();
|
|
129
133
|
this.renderPropsCache.clear();
|
|
130
134
|
this.renderLayouts.clear();
|
|
@@ -133,6 +137,7 @@ var ScatterRendererController = class {
|
|
|
133
137
|
this._cancelRaf();
|
|
134
138
|
this._scene.reset();
|
|
135
139
|
this._lastFingerprint = "";
|
|
140
|
+
compositor?.removeLayersByPrefix("scatter:");
|
|
136
141
|
if (input.renderer === "svg" && this.svgGroup) {
|
|
137
142
|
while (this.svgGroup.firstChild) this.svgGroup.removeChild(this.svgGroup.firstChild);
|
|
138
143
|
}
|
|
@@ -149,7 +154,7 @@ var ScatterRendererController = class {
|
|
|
149
154
|
if (input.renderer === "canvas" && compositor) {
|
|
150
155
|
compositor.removeLayersByPrefix?.("scatter:");
|
|
151
156
|
const liveIds = /* @__PURE__ */ new Set();
|
|
152
|
-
for (const el of this._scene.
|
|
157
|
+
for (const el of this._scene.elementValues()) liveIds.add(el.current.datasetId);
|
|
153
158
|
for (const sd of visibleDatasets) liveIds.add(sd.id);
|
|
154
159
|
registerDatasetLayers(
|
|
155
160
|
compositor,
|
|
@@ -177,7 +182,7 @@ var ScatterRendererController = class {
|
|
|
177
182
|
const { allIdle } = this._scene.tick(now);
|
|
178
183
|
this._renderSceneFrame();
|
|
179
184
|
if (allIdle && this.lastInput?.renderer === "canvas" && this.lastInput.compositor) {
|
|
180
|
-
const liveIds = new Set(Array.from(this._scene.
|
|
185
|
+
const liveIds = new Set(Array.from(this._scene.elementValues()).map((el) => el.current.datasetId));
|
|
181
186
|
this.lastInput.compositor.removeLayersByPrefix?.("scatter:");
|
|
182
187
|
registerDatasetLayers(
|
|
183
188
|
this.lastInput.compositor,
|
|
@@ -212,7 +217,7 @@ var ScatterRendererController = class {
|
|
|
212
217
|
if (!this.lastInput || this.renderLayouts.size === 0) return;
|
|
213
218
|
if (this.allBoostActive()) return;
|
|
214
219
|
if (valueScales) this.lastInput.valueScales = valueScales;
|
|
215
|
-
if (valueXScales) this.lastInput.
|
|
220
|
+
if (valueXScales) this.lastInput.valueXScales = valueXScales;
|
|
216
221
|
const visibleDatasets = this.scatterDatasets.filter((d) => d.visible);
|
|
217
222
|
this._updateCachesAndLayout(visibleDatasets, this.lastInput);
|
|
218
223
|
if (this._animRafId !== null) return;
|
|
@@ -380,7 +385,7 @@ var ScatterRendererController = class {
|
|
|
380
385
|
* Mirrors Heatmap's scene-derived render path but at dataset granularity.
|
|
381
386
|
*/
|
|
382
387
|
_rebuildRenderLayouts() {
|
|
383
|
-
const elements = Array.from(this._scene.
|
|
388
|
+
const elements = Array.from(this._scene.elementValues()).sort((a, b) => (a.current.stackOrder ?? 0) - (b.current.stackOrder ?? 0));
|
|
384
389
|
const newRenderLayouts = /* @__PURE__ */ new Map();
|
|
385
390
|
const newActiveProps = /* @__PURE__ */ new Map();
|
|
386
391
|
for (const el of elements) {
|
|
@@ -413,21 +418,24 @@ var ScatterRendererController = class {
|
|
|
413
418
|
const newLayoutCache = /* @__PURE__ */ new Map();
|
|
414
419
|
const newRenderPropsCache = /* @__PURE__ */ new Map();
|
|
415
420
|
const sortedVisible = [...visibleDatasets].sort((a, b) => (input.datasets.get(a.id)?.order ?? 0) - (input.datasets.get(b.id)?.order ?? 0));
|
|
421
|
+
const colorIndexById = buildColorIndexMap(input.datasets);
|
|
416
422
|
let dsIdx = 0;
|
|
417
423
|
for (const sd of sortedVisible) {
|
|
418
424
|
const props = sd.props;
|
|
425
|
+
const acc = resolveCartesianAccessors(props);
|
|
419
426
|
const targetXAxisId = props.xAxisId ?? input.firstCategoryAxisId;
|
|
420
427
|
const targetYAxisId = props.yAxisId ?? input.firstValueAxisId;
|
|
421
|
-
const xScale = input.
|
|
428
|
+
const xScale = acc.independentIsCategory ? input.categoryScale : input.valueXScales?.get(targetXAxisId);
|
|
422
429
|
const sharedValueScale = input.valueScales?.values().next().value;
|
|
423
430
|
const yScale = input.valueScales?.get(targetYAxisId) ?? sharedValueScale;
|
|
424
431
|
if (!xScale || !yScale) continue;
|
|
425
432
|
const baseLayout = calculateScatterLayout(props, input.chartArea, {
|
|
426
433
|
xScale,
|
|
427
434
|
yScale,
|
|
428
|
-
stackBases: input.scatterStackBasesMap?.get(sd.id)
|
|
435
|
+
stackBases: input.scatterStackBasesMap?.get(sd.id),
|
|
436
|
+
orientation: input.orientation
|
|
429
437
|
});
|
|
430
|
-
const layout = { ...baseLayout, datasetIndex: dsIdx
|
|
438
|
+
const layout = { ...baseLayout, datasetIndex: dsIdx++, colorIndex: colorIndexById.get(sd.id) ?? 0 };
|
|
431
439
|
newLayoutCache.set(sd.id, layout);
|
|
432
440
|
newRenderPropsCache.set(sd.id, this.buildRenderProps(sd, input));
|
|
433
441
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { getHeatmapLabelInfo, resolveLabelMidToAlpha } from './chunk-
|
|
2
|
-
import { createDrawImage } from './chunk-
|
|
3
|
-
import { resolveFontFamily, 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 { getHeatmapLabelInfo, resolveLabelMidToAlpha } from './chunk-DKWZKYHF.mjs';
|
|
2
|
+
import { createDrawImage } from './chunk-HXDLOOCS.mjs';
|
|
3
|
+
import { resolveFontFamily, 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/heatmap/canvas/index.ts
|
|
9
9
|
function makeCellExtras(props, cell) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { formatTooltipValue } from './chunk-56MASQS2.mjs';
|
|
2
|
+
import { toTimestamp } from './chunk-K7AGQTVK.mjs';
|
|
2
3
|
|
|
3
4
|
// src/cartesian/hittest.ts
|
|
4
5
|
function resolveValueAxisId(barProps, layoutData) {
|
|
@@ -15,7 +16,7 @@ function resolveValueAxisFormat(barProps, orientation, layoutData) {
|
|
|
15
16
|
}
|
|
16
17
|
function formatHitValue(value, barProps, orientation, layoutData) {
|
|
17
18
|
const tickFmt = resolveValueAxisFormat(barProps, orientation, layoutData);
|
|
18
|
-
return tickFmt ? tickFmt(value) :
|
|
19
|
+
return tickFmt ? tickFmt(value) : formatTooltipValue(value);
|
|
19
20
|
}
|
|
20
21
|
function formatCursorValue(cursorX, cursorY, barProps, orientation, layoutData) {
|
|
21
22
|
if (!layoutData) return "";
|
|
@@ -26,7 +27,7 @@ function formatCursorValue(cursorX, cursorY, barProps, orientation, layoutData)
|
|
|
26
27
|
const cursorValue = valueScale.invert(cursorPixel);
|
|
27
28
|
const tickFmt = resolveValueAxisFormat(barProps, orientation, layoutData);
|
|
28
29
|
const rounded = Math.round(cursorValue);
|
|
29
|
-
return tickFmt ? tickFmt(rounded) :
|
|
30
|
+
return tickFmt ? tickFmt(rounded) : formatTooltipValue(rounded);
|
|
30
31
|
}
|
|
31
32
|
var TOOLTIP_DATE_FORMAT = {
|
|
32
33
|
weekday: "long",
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { renderCandlestickSvg } from './chunk-
|
|
2
|
-
import { renderCandlestickCanvas } from './chunk-
|
|
3
|
-
import { DEFAULT_CANDLESTICK_WICK_WIDTH } from './chunk-
|
|
4
|
-
import { FIELD_DEFAULTS, batchResolveAccessor, resolveAccessor, makeItemContext, resolveDash } from './chunk-
|
|
1
|
+
import { renderCandlestickSvg } from './chunk-ISU27QL2.mjs';
|
|
2
|
+
import { renderCandlestickCanvas } from './chunk-SVASYTK5.mjs';
|
|
3
|
+
import { DEFAULT_CANDLESTICK_WICK_WIDTH } from './chunk-6LUIVTNV.mjs';
|
|
4
|
+
import { FIELD_DEFAULTS, batchResolveAccessor, resolveAccessor, makeItemContext, resolveDash } from './chunk-BDCNBS6W.mjs';
|
|
5
|
+
import { resolveCartesianAccessors } from './chunk-G3DIMENH.mjs';
|
|
5
6
|
|
|
6
7
|
// src/series/candlestick/geometry.ts
|
|
7
8
|
var DEFAULT_BAR_WIDTH_RATIO = 0.7;
|
|
8
9
|
function calculateCandlestickLayout(props, chartArea, config, theme) {
|
|
10
|
+
const acc = resolveCartesianAccessors(props);
|
|
11
|
+
const time = acc.independentField;
|
|
12
|
+
const horizontal = acc.orientation === "horizontal";
|
|
9
13
|
const {
|
|
10
14
|
data,
|
|
11
|
-
timeField: time,
|
|
12
15
|
openField: openAcc = FIELD_DEFAULTS.openField,
|
|
13
16
|
highField: highAcc = FIELD_DEFAULTS.highField,
|
|
14
17
|
lowField: lowAcc = FIELD_DEFAULTS.lowField,
|
|
@@ -80,7 +83,7 @@ function calculateCandlestickLayout(props, chartArea, config, theme) {
|
|
|
80
83
|
const useClass = perCandleColor === void 0 && directionUserColor === void 0 && directionUserBorder === void 0 && borderColor === void 0 ? effectiveDirection : null;
|
|
81
84
|
const left = cx - bodyWidth / 2;
|
|
82
85
|
const right = cx + bodyWidth / 2;
|
|
83
|
-
const visible = right >= chartArea.x && left <= chartArea.x + chartArea.width && highY <= chartArea.y + chartArea.height && lowY >= chartArea.y;
|
|
86
|
+
const visible = horizontal ? right >= chartArea.y && left <= chartArea.y + chartArea.height && Math.max(highY, lowY) >= chartArea.x && Math.min(highY, lowY) <= chartArea.x + chartArea.width : right >= chartArea.x && left <= chartArea.x + chartArea.width && highY <= chartArea.y + chartArea.height && lowY >= chartArea.y;
|
|
84
87
|
const candleCtx = makeItemContext(data[i], i, { value: c, category: label, ...seriesExtras });
|
|
85
88
|
const wickStrokeWidth = resolveAccessor(wickStrokeWidthProp, candleCtx, { arrayMode: "clip", fallback: DEFAULT_CANDLESTICK_WICK_WIDTH }) ?? DEFAULT_CANDLESTICK_WICK_WIDTH;
|
|
86
89
|
const candleBorderDash = resolveDash(borderDashProp, candleCtx);
|
|
@@ -109,6 +112,7 @@ function calculateCandlestickLayout(props, chartArea, config, theme) {
|
|
|
109
112
|
borderDash: candleBorderDash,
|
|
110
113
|
borderDashOffset: candleBorderDashOffset,
|
|
111
114
|
useClass,
|
|
115
|
+
orientation: horizontal ? "horizontal" : "vertical",
|
|
112
116
|
visible
|
|
113
117
|
});
|
|
114
118
|
}
|
|
@@ -146,9 +150,8 @@ function calculateCandlestickLayout(props, chartArea, config, theme) {
|
|
|
146
150
|
function hitTestCandlestick(x, y, layout) {
|
|
147
151
|
for (const candle of layout.visibleCandles) {
|
|
148
152
|
const halfBody = candle.bodyWidth / 2;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
153
|
+
const hit = candle.orientation === "horizontal" ? Math.abs(y - candle.x) <= halfBody && x >= Math.min(candle.wickTop, candle.wickBottom) && x <= Math.max(candle.wickTop, candle.wickBottom) : Math.abs(x - candle.x) <= halfBody && y >= candle.wickTop && y <= candle.wickBottom;
|
|
154
|
+
if (hit) return candle.dataIndex;
|
|
152
155
|
}
|
|
153
156
|
return null;
|
|
154
157
|
}
|
|
@@ -177,7 +180,8 @@ var candlestickRenderer = {
|
|
|
177
180
|
return hitTestCandlestick(x, y, layout);
|
|
178
181
|
},
|
|
179
182
|
getAxisHints(props, data) {
|
|
180
|
-
const
|
|
183
|
+
const independentField = resolveCartesianAccessors(props).independentField;
|
|
184
|
+
const categoryLabels = batchResolveAccessor(independentField, data);
|
|
181
185
|
const highVals = batchResolveAccessor(props.highField ?? FIELD_DEFAULTS.highField, data);
|
|
182
186
|
const lowVals = batchResolveAccessor(props.lowField ?? FIELD_DEFAULTS.lowField, data);
|
|
183
187
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { computeBarRenderStates, traceRoundedRect, tracePartialBorder } from './chunk-
|
|
2
|
-
import { isGradientColor, createCanvasGradientFromColor } from './chunk-
|
|
3
|
-
import { readCssNumber, withCanvasState } from './chunk-
|
|
1
|
+
import { computeBarRenderStates, traceRoundedRect, tracePartialBorder } from './chunk-DJOHDKTP.mjs';
|
|
2
|
+
import { isGradientColor, createCanvasGradientFromColor } from './chunk-BDCNBS6W.mjs';
|
|
3
|
+
import { readCssNumber, withCanvasState } from './chunk-BF7RP4A3.mjs';
|
|
4
4
|
|
|
5
5
|
// src/series/bar/canvas/index.ts
|
|
6
6
|
function createCanvasPathBuilder(ctx) {
|