@primeui/chart-core 0.0.1-alpha.1 → 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +35 -0
- package/README.md +12 -0
- package/dist/animations/index.d.mts +1 -1
- package/dist/animations/index.mjs +19 -18
- package/dist/{annotation.utils-Bm0lOO1o.d.mts → annotation.utils-D-7ijAWO.d.mts} +22 -1
- package/dist/cartesian/index.d.mts +3 -2
- package/dist/cartesian/index.mjs +96 -93
- package/dist/{chunk-WPFUV7K3.mjs → chunks/chunk-2LLTN7T4.mjs} +23 -14
- package/dist/{chunk-RO4N6YFS.mjs → chunks/chunk-2T226WJI.mjs} +31 -14
- package/dist/{chunk-3FFJEX4A.mjs → chunks/chunk-3QQLETCJ.mjs} +13 -12
- package/dist/{chunk-JWFBOPM6.mjs → chunks/chunk-4N2XIMAB.mjs} +2 -2
- package/dist/{chunk-LVMDQ4OJ.mjs → chunks/chunk-4S3FOFCN.mjs} +2 -2
- package/dist/{chunk-XTVE4P3L.mjs → chunks/chunk-56MASQS2.mjs} +6 -2
- package/dist/{chunk-DTWTCFRG.mjs → chunks/chunk-5EQSFUBA.mjs} +41 -13
- package/dist/{chunk-KQIFO5I3.mjs → chunks/chunk-5QSTMSPW.mjs} +15 -10
- package/dist/{chunk-NKUYIWAP.mjs → chunks/chunk-6LUIVTNV.mjs} +6 -6
- package/dist/chunks/chunk-6MAO6I3E.mjs +6 -0
- package/dist/{chunk-DN6AXQYZ.mjs → chunks/chunk-72M66Y2U.mjs} +46 -41
- package/dist/{chunk-WFVOQ2QZ.mjs → chunks/chunk-77K3DEKL.mjs} +2 -2
- package/dist/{chunk-4C6EVJ54.mjs → chunks/chunk-7I2SAKHL.mjs} +7 -44
- package/dist/{chunk-6HSEJLSR.mjs → chunks/chunk-7I2SNJ2X.mjs} +35 -18
- package/dist/{chunk-66T4MRC5.mjs → chunks/chunk-7IKKWWRT.mjs} +4 -6
- package/dist/{chunk-BKP26M4K.mjs → chunks/chunk-7LZWQVTL.mjs} +43 -24
- package/dist/{chunk-NHRK5KU2.mjs → chunks/chunk-A5YBHYIS.mjs} +25 -17
- package/dist/{chunk-ZT2Z7ERM.mjs → chunks/chunk-AC5EAWIP.mjs} +12 -9
- package/dist/{chunk-ZTL2FQEW.mjs → chunks/chunk-AETETRB4.mjs} +24 -9
- package/dist/{chunk-NPDZLYIF.mjs → chunks/chunk-AJ24XDEK.mjs} +2 -2
- package/dist/chunks/chunk-ARVMVGWS.mjs +40 -0
- package/dist/{chunk-3IYSJ2U7.mjs → chunks/chunk-AYEAEAOV.mjs} +10 -7
- package/dist/{chunk-M7B3JF43.mjs → chunks/chunk-AZPJMIZE.mjs} +4 -3
- package/dist/{chunk-O2X6FF45.mjs → chunks/chunk-BDCNBS6W.mjs} +194 -168
- package/dist/{chunk-55Y3WI6S.mjs → chunks/chunk-BR4PSSPU.mjs} +6 -6
- package/dist/{chunk-TA4MVAEX.mjs → chunks/chunk-CFA2SUBF.mjs} +32 -24
- package/dist/{chunk-WH3C3Y7P.mjs → chunks/chunk-CKQ4DNNJ.mjs} +7 -18
- package/dist/chunks/chunk-DIJFKY6H.mjs +21 -0
- package/dist/{chunk-AUF4CHDP.mjs → chunks/chunk-DJOHDKTP.mjs} +18 -11
- package/dist/{chunk-3Z62EUJN.mjs → chunks/chunk-DKWZKYHF.mjs} +5 -5
- package/dist/{chunk-Y3L3D4GQ.mjs → chunks/chunk-DORUY7GR.mjs} +69 -34
- package/dist/chunks/chunk-DWBJKYLH.mjs +238 -0
- package/dist/{chunk-XQQCGFYB.mjs → chunks/chunk-EQLCJTM4.mjs} +1 -1
- package/dist/{chunk-VGLSBZDN.mjs → chunks/chunk-F2E2QCZM.mjs} +1 -1
- package/dist/{chunk-BZN2QHGP.mjs → chunks/chunk-F6AGZQDA.mjs} +4 -72
- package/dist/{chunk-ILUWFYGY.mjs → chunks/chunk-FNMLVZOA.mjs} +8 -8
- package/dist/{chunk-SXHVDJGF.mjs → chunks/chunk-FQAFGPW6.mjs} +6 -6
- package/dist/{chunk-N3TIT3OH.mjs → chunks/chunk-FSPE3M5E.mjs} +66 -43
- package/dist/{chunk-KNDZP446.mjs → chunks/chunk-FSWYYRPX.mjs} +5 -5
- package/dist/{chunk-KP2TWD4Z.mjs → chunks/chunk-FWNWV3H7.mjs} +1 -1
- package/dist/{chunk-WCG35U6M.mjs → chunks/chunk-FYVMRQFF.mjs} +35 -27
- package/dist/chunks/chunk-G3DIMENH.mjs +63 -0
- package/dist/{chunk-QQBXUDM4.mjs → chunks/chunk-G3DYNMWT.mjs} +20 -16
- package/dist/{chunk-J65DBT4R.mjs → chunks/chunk-GA6YZQYT.mjs} +3 -3
- package/dist/chunks/chunk-GAQLLQUM.mjs +20 -0
- package/dist/{chunk-TAHCOZHF.mjs → chunks/chunk-GN7VQCCH.mjs} +27 -30
- package/dist/{chunk-R6Y3R7EW.mjs → chunks/chunk-GOOBVFFH.mjs} +1 -1
- package/dist/chunks/chunk-GSW5OBEG.mjs +233 -0
- package/dist/{chunk-22ST6YPP.mjs → chunks/chunk-GTX6MLTG.mjs} +9 -9
- package/dist/{chunk-XUAASRXW.mjs → chunks/chunk-GWHRTGGC.mjs} +35 -27
- package/dist/{chunk-TQ6S34QZ.mjs → chunks/chunk-GXCLRRE5.mjs} +6 -6
- package/dist/{chunk-DP2IZNN3.mjs → chunks/chunk-HHBFQ6AI.mjs} +4 -3
- package/dist/{chunk-3OZLP4I4.mjs → chunks/chunk-HWT6UEYE.mjs} +14 -10
- package/dist/{chunk-X7T34OLW.mjs → chunks/chunk-I25SSZE3.mjs} +3 -3
- package/dist/{chunk-OGJ6IIBW.mjs → chunks/chunk-IFJPDARC.mjs} +21 -9
- package/dist/{chunk-CINXJIRR.mjs → chunks/chunk-ISU27QL2.mjs} +66 -6
- package/dist/{chunk-OXTFAWSK.mjs → chunks/chunk-J2WHJ73Y.mjs} +7 -2
- package/dist/{chunk-VN7CKCSE.mjs → chunks/chunk-JS47MSB2.mjs} +9 -1
- package/dist/{chunk-WYLILAOO.mjs → chunks/chunk-K44SD67H.mjs} +16 -7
- package/dist/{chunk-RQ3CKQOX.mjs → chunks/chunk-K7AGQTVK.mjs} +63 -3
- package/dist/{chunk-VVI3OBPJ.mjs → chunks/chunk-KCSMOAZO.mjs} +7 -9
- package/dist/{chunk-ARRGOEFX.mjs → chunks/chunk-L6GXEQOO.mjs} +7 -7
- package/dist/{chunk-7QQ6ETB4.mjs → chunks/chunk-LBNP5PJA.mjs} +14 -12
- package/dist/{chunk-AHYIS6EB.mjs → chunks/chunk-LC2ZEZWP.mjs} +7 -7
- package/dist/{chunk-3WEMHXZI.mjs → chunks/chunk-LTQH3LQJ.mjs} +2 -8
- package/dist/{chunk-OHGCZZPZ.mjs → chunks/chunk-M5PZVFY5.mjs} +57 -29
- package/dist/{chunk-A6ZQZFL2.mjs → chunks/chunk-NUHW3U7G.mjs} +14 -11
- package/dist/{chunk-QWQ6HY4I.mjs → chunks/chunk-O4BTKF5R.mjs} +9 -8
- package/dist/{chunk-WY4AURRE.mjs → chunks/chunk-P2Q4DYOS.mjs} +240 -83
- package/dist/{chunk-KVDEROP6.mjs → chunks/chunk-P563L7WL.mjs} +1 -1
- package/dist/{chunk-SDBPQ5CF.mjs → chunks/chunk-PJLFNUOW.mjs} +45 -30
- package/dist/{chunk-MTGMXRNF.mjs → chunks/chunk-PSDRVQSK.mjs} +7 -7
- package/dist/{chunk-6STOLMCA.mjs → chunks/chunk-QCBESCLG.mjs} +13 -12
- package/dist/{chunk-PRDVPOZX.mjs → chunks/chunk-QIYJUZ7I.mjs} +7 -2
- package/dist/{chunk-UPRXABX5.mjs → chunks/chunk-RH3OQ2VX.mjs} +6 -6
- package/dist/{chunk-QS76E3TD.mjs → chunks/chunk-RI32WIDX.mjs} +2 -2
- package/dist/{chunk-OWW3K55O.mjs → chunks/chunk-RIAPS5AW.mjs} +49 -7
- package/dist/{chunk-ERVQB2VZ.mjs → chunks/chunk-RJ3ZOZTS.mjs} +4 -4
- package/dist/{chunk-WFTX4AQJ.mjs → chunks/chunk-RKNL7UWZ.mjs} +19 -7
- package/dist/chunks/chunk-RLS3GMJ6.mjs +8 -0
- package/dist/{chunk-WRULPWHD.mjs → chunks/chunk-RVTEIKW5.mjs} +5 -5
- package/dist/{chunk-PLSDU3C2.mjs → chunks/chunk-RXQ22JQS.mjs} +67 -39
- package/dist/{chunk-FHTC2YDB.mjs → chunks/chunk-SVASYTK5.mjs} +70 -5
- package/dist/{chunk-ARB5T6MP.mjs → chunks/chunk-SWVOBJLG.mjs} +3 -100
- package/dist/{chunk-JGOVWSKH.mjs → chunks/chunk-TW3KLJVO.mjs} +37 -12
- package/dist/{chunk-RBLZRT5K.mjs → chunks/chunk-UF2TPGQB.mjs} +103 -15
- package/dist/{chunk-X4D7FKUS.mjs → chunks/chunk-UZWWYKL7.mjs} +2 -2
- package/dist/{chunk-LKC7MZKK.mjs → chunks/chunk-XECVYJE2.mjs} +16 -8
- package/dist/chunks/chunk-XMSAUIVL.mjs +1 -0
- package/dist/{chunk-J4RI2C2G.mjs → chunks/chunk-XPZTRMU2.mjs} +6 -6
- package/dist/{chunk-BABQKA6K.mjs → chunks/chunk-XXJRGDKE.mjs} +3 -3
- package/dist/{chunk-SALTGZFR.mjs → chunks/chunk-YVDVKLPR.mjs} +10 -9
- package/dist/circular/arc/index.mjs +3 -3
- package/dist/circular/index.d.mts +1 -1
- package/dist/circular/index.mjs +14 -13
- package/dist/controllers/index.mjs +113 -110
- package/dist/{datalabel.utils-CkjGeB8S.d.mts → datalabel.utils-CNRKHy7j.d.mts} +10 -1
- package/dist/{decimation.utils-CcvJVhI4.d.mts → decimation.utils-C0xpslz_.d.mts} +33 -2
- package/dist/geometry-BVWJedvw.d.mts +53 -0
- package/dist/index.d.mts +16 -17
- package/dist/index.mjs +113 -110
- package/dist/luminance-TvUgaQ91.d.mts +57 -0
- package/dist/orchestrator/index.d.mts +2 -2
- package/dist/orchestrator/index.mjs +36 -33
- package/dist/plugins/index.mjs +1 -1
- package/dist/{property-animations-D433wXzz.d.mts → property-animations-CI0zyp6V.d.mts} +6 -20
- package/dist/radial/index.mjs +40 -37
- package/dist/renderers/axis/index.mjs +9 -8
- package/dist/renderers/index.d.mts +8 -9
- package/dist/renderers/index.mjs +78 -75
- package/dist/renderers/navigator/index.d.mts +1 -1
- package/dist/renderers/navigator/index.mjs +10 -8
- package/dist/{ring.utils-DXvrxMkU.d.mts → ring.utils-aHt9Nqum.d.mts} +2 -7
- package/dist/{scale-KFv30jqZ.d.mts → scale-CFkPlyUe.d.mts} +2 -2
- package/dist/{scales-Drf8AIhL.d.mts → scales-BZzjlR4U.d.mts} +15 -1
- package/dist/series/bar/canvas/index.mjs +11 -10
- package/dist/series/bar/controller/index.d.mts +17 -0
- package/dist/series/bar/controller/index.mjs +47 -44
- package/dist/series/bar/controller-canvas/index.mjs +47 -44
- package/dist/series/bar/controller-svg/index.mjs +47 -44
- package/dist/series/bar/index.d.mts +2 -2
- package/dist/series/bar/index.mjs +16 -13
- package/dist/series/bar/svg/index.mjs +14 -11
- package/dist/series/candlestick/canvas/index.mjs +8 -8
- package/dist/series/candlestick/controller/index.d.mts +2 -0
- package/dist/series/candlestick/controller/index.mjs +43 -40
- package/dist/series/candlestick/controller-canvas/index.mjs +43 -40
- package/dist/series/candlestick/controller-svg/index.mjs +43 -40
- package/dist/series/candlestick/index.mjs +11 -10
- package/dist/series/candlestick/svg/index.mjs +8 -8
- package/dist/series/heatmap/canvas/index.mjs +9 -9
- package/dist/series/heatmap/controller/index.d.mts +9 -0
- package/dist/series/heatmap/controller/index.mjs +26 -23
- package/dist/series/heatmap/controller-canvas/index.mjs +26 -23
- package/dist/series/heatmap/controller-svg/index.mjs +26 -23
- package/dist/series/heatmap/index.mjs +14 -13
- package/dist/series/heatmap/svg/index.mjs +11 -10
- package/dist/series/line/canvas/index.mjs +9 -9
- package/dist/series/line/controller/index.d.mts +7 -0
- package/dist/series/line/controller/index.mjs +51 -47
- package/dist/series/line/controller-canvas/index.mjs +53 -49
- package/dist/series/line/controller-svg/index.mjs +53 -49
- package/dist/series/line/index.d.mts +1 -1
- package/dist/series/line/index.mjs +17 -13
- package/dist/series/line/svg/index.mjs +12 -9
- package/dist/series/pie/canvas/index.d.mts +12 -4
- package/dist/series/pie/canvas/index.mjs +15 -10
- package/dist/series/pie/controller/index.mjs +113 -110
- package/dist/series/pie/controller-canvas/index.mjs +113 -110
- package/dist/series/pie/controller-svg/index.mjs +113 -110
- package/dist/series/pie/index.d.mts +3 -56
- package/dist/series/pie/index.mjs +11 -15
- package/dist/series/pie/svg/index.d.mts +18 -4
- package/dist/series/pie/svg/index.mjs +10 -11
- package/dist/series/polar/canvas/index.mjs +7 -7
- package/dist/series/polar/controller/index.d.mts +9 -0
- package/dist/series/polar/controller/index.mjs +49 -46
- package/dist/series/polar/controller-canvas/index.mjs +50 -47
- package/dist/series/polar/controller-svg/index.mjs +50 -47
- package/dist/series/polar/index.d.mts +1 -1
- package/dist/series/polar/index.mjs +19 -16
- package/dist/series/polar/svg/index.mjs +11 -8
- package/dist/series/radar/canvas/index.mjs +8 -8
- package/dist/series/radar/controller/index.d.mts +11 -0
- package/dist/series/radar/controller/index.mjs +46 -43
- package/dist/series/radar/controller-canvas/index.mjs +49 -46
- package/dist/series/radar/controller-svg/index.mjs +49 -46
- package/dist/series/radar/index.d.mts +3 -3
- package/dist/series/radar/index.mjs +16 -13
- package/dist/series/radar/svg/index.mjs +12 -9
- package/dist/series/scatter/canvas/index.mjs +13 -11
- package/dist/series/scatter/controller/index.mjs +48 -44
- package/dist/series/scatter/controller-canvas/index.mjs +50 -46
- package/dist/series/scatter/controller-svg/index.mjs +50 -46
- package/dist/series/scatter/index.d.mts +1 -1
- package/dist/series/scatter/index.mjs +18 -14
- package/dist/series/scatter/svg/index.mjs +16 -12
- package/dist/series/treemap/canvas/index.mjs +10 -10
- package/dist/series/treemap/controller/index.mjs +23 -20
- package/dist/series/treemap/controller-canvas/index.mjs +23 -20
- package/dist/series/treemap/controller-svg/index.mjs +23 -20
- package/dist/series/treemap/index.d.mts +17 -9
- package/dist/series/treemap/index.mjs +12 -12
- package/dist/series/treemap/svg/index.mjs +9 -9
- package/dist/{stacking-CChuAcLN.d.mts → stacking-Dz1OBhzm.d.mts} +1 -1
- package/dist/sync/index.mjs +6 -5
- package/dist/{tooltip.renderer-D5wpSlBa.d.mts → tooltip.renderer-C3z-UKm4.d.mts} +4 -4
- package/dist/utils/color/index.d.mts +11 -53
- package/dist/utils/color/index.mjs +4 -4
- package/dist/utils/data/index.d.mts +2 -2
- package/dist/utils/data/index.mjs +7 -7
- package/dist/utils/export/index.mjs +6 -6
- package/dist/utils/index.d.mts +7 -7
- package/dist/utils/index.mjs +32 -29
- package/dist/utils/interaction/index.d.mts +1 -31
- package/dist/utils/interaction/index.mjs +12 -9
- package/dist/utils/layout/index.mjs +10 -10
- package/dist/utils/math/index.d.mts +1 -1
- package/dist/utils/math/index.mjs +1 -1
- package/dist/utils/render/index.mjs +3 -3
- package/dist/utils/specialized/index.d.mts +1 -1
- package/dist/utils/specialized/index.mjs +13 -15
- package/dist/utils/text/index.d.mts +1 -1
- package/dist/utils/text/index.mjs +9 -8
- package/dist/utils/theme/index.d.mts +6 -6
- package/dist/utils/theme/index.mjs +5 -5
- package/dist/utils/zoom/index.mjs +3 -3
- package/package.json +5 -10
- package/LICENSE +0 -23
- package/dist/canvas-D4vigq47.d.mts +0 -34
- package/dist/chunk-2QRS4YQ5.mjs +0 -18
- package/dist/chunk-53HW45JB.mjs +0 -102
- package/dist/chunk-B4FTADAZ.mjs +0 -561
- package/dist/chunk-IXOWSEHO.mjs +0 -114
- package/dist/chunk-VWF57TS3.mjs +0 -62
- package/dist/chunk-XIHBK5D3.mjs +0 -68
- package/dist/renderers/circular/index.d.mts +0 -13
- package/dist/renderers/circular/index.mjs +0 -13
- package/dist/{chunk-WA3OVISZ.mjs → chunks/chunk-4KQZXAHZ.mjs} +0 -0
- package/dist/{chunk-CHW4RKY3.mjs → chunks/chunk-576P5DBH.mjs} +0 -0
- package/dist/{chunk-EDAKJLNA.mjs → chunks/chunk-5WFF272M.mjs} +0 -0
- package/dist/{chunk-ADKLH73T.mjs → chunks/chunk-6XZ6U7GL.mjs} +0 -0
- package/dist/{chunk-2QK2KOBN.mjs → chunks/chunk-AOTUNMVD.mjs} +0 -0
- package/dist/{chunk-AGU3NG6D.mjs → chunks/chunk-AWMO5TS3.mjs} +0 -0
- package/dist/{chunk-SSLTFJ3U.mjs → chunks/chunk-BF7RP4A3.mjs} +132 -132
- /package/dist/{chunk-BETFQBM2.mjs → chunks/chunk-FML3QEEI.mjs} +0 -0
- /package/dist/{chunk-FFMT6OCO.mjs → chunks/chunk-FRVJH7ZG.mjs} +0 -0
- /package/dist/{chunk-HDFGCN2F.mjs → chunks/chunk-HBTCRORW.mjs} +0 -0
- /package/dist/{chunk-7CMVDIOU.mjs → chunks/chunk-HXDLOOCS.mjs} +0 -0
- /package/dist/{chunk-5JCI2DEB.mjs → chunks/chunk-JQVX6XFW.mjs} +0 -0
- /package/dist/{chunk-C36VWQ7A.mjs → chunks/chunk-KMKULH54.mjs} +0 -0
- /package/dist/{chunk-Q6PPVIHU.mjs → chunks/chunk-MT3OLVZC.mjs} +0 -0
- /package/dist/{chunk-WS64BZXT.mjs → chunks/chunk-OWVSSQZ4.mjs} +0 -0
- /package/dist/{chunk-EAMUNLRU.mjs → chunks/chunk-P2LG7GDM.mjs} +0 -0
- /package/dist/{chunk-IEGLX7VL.mjs → chunks/chunk-PXUXZADY.mjs} +0 -0
- /package/dist/{chunk-SANZPAJ4.mjs → chunks/chunk-SFUDXJKO.mjs} +0 -0
- /package/dist/{chunk-ZQFK6CAE.mjs → chunks/chunk-SJNUJM54.mjs} +0 -0
- /package/dist/{chunk-AP3UYWYT.mjs → chunks/chunk-SPU6BO3B.mjs} +0 -0
- /package/dist/{chunk-YBJ56XJS.mjs → chunks/chunk-T2UAEMHY.mjs} +0 -0
- /package/dist/{chunk-JO7VACY2.mjs → chunks/chunk-VADXCPQ4.mjs} +0 -0
- /package/dist/{chunk-FRST55HY.mjs → chunks/chunk-ZZCVDIU5.mjs} +0 -0
|
@@ -1,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-NUHW3U7G.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];
|
|
@@ -564,16 +565,22 @@ var RadarRendererController = class {
|
|
|
564
565
|
update(input) {
|
|
565
566
|
this.lastInput = input;
|
|
566
567
|
this.svgGroup = input.svgGroup ?? null;
|
|
567
|
-
const { datasets, datasetVisibility, chartArea, features, globalFont, sharedContext, yAxes } = input;
|
|
568
|
+
const { datasets, datasetVisibility, chartArea, features, globalFont, sharedContext, xAxes, yAxes } = input;
|
|
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
|
})
|
|
@@ -606,9 +613,11 @@ var RadarRendererController = class {
|
|
|
606
613
|
if (lp.y != null) referenceBoundaryValues.push(lp.y);
|
|
607
614
|
}
|
|
608
615
|
}
|
|
616
|
+
const defaultXAxis = xAxes ? Array.from(xAxes.values())[0] : void 0;
|
|
617
|
+
const xAxisProps = defaultXAxis?.props;
|
|
609
618
|
const defaultYAxis = yAxes ? Array.from(yAxes.values()).find((a) => !a.props.category) : void 0;
|
|
610
619
|
const yAxisProps = defaultYAxis?.props;
|
|
611
|
-
const baseLayout = calculateRadarLayout(radarEntries, chartArea, globalFont, sharedContext?.categories, sharedContext?.domain, perAxisDomains, referenceBoundaryValues, perSpokeDomains, yAxisProps?.tickCount);
|
|
620
|
+
const baseLayout = calculateRadarLayout(radarEntries, chartArea, globalFont, sharedContext?.categories, sharedContext?.domain, perAxisDomains, referenceBoundaryValues, perSpokeDomains, yAxisProps?.tickCount, xAxisProps?.showLabels !== false);
|
|
612
621
|
if (yAxisProps) {
|
|
613
622
|
const g = baseLayout.grid;
|
|
614
623
|
if (yAxisProps.gridShape) g.shape = yAxisProps.gridShape;
|
|
@@ -628,7 +637,10 @@ var RadarRendererController = class {
|
|
|
628
637
|
const fingerprint = buildRadarFingerprint(targetLayout, radarEntries);
|
|
629
638
|
const dataChanged = fingerprint !== this._lastFingerprint;
|
|
630
639
|
const shouldAnimate = animEnabled && duration > 0 && dataChanged;
|
|
631
|
-
if (!dataChanged)
|
|
640
|
+
if (!dataChanged) {
|
|
641
|
+
if (input.renderer === "canvas") input.requestRedraw?.();
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
632
644
|
if (this._animRafId !== null) {
|
|
633
645
|
cancelRaf(this._animRafId);
|
|
634
646
|
this._animRafId = null;
|
|
@@ -727,9 +739,24 @@ var RadarRendererController = class {
|
|
|
727
739
|
this.lastInput.requestRedraw?.();
|
|
728
740
|
}
|
|
729
741
|
}
|
|
742
|
+
/**
|
|
743
|
+
* Authoritative per-series visibility for hit-testing. The layout's
|
|
744
|
+
* `sd.visible` is unreliable here: it is forced `true` during a series'
|
|
745
|
+
* exit fade (so the renderer keeps drawing the fading polygon), and
|
|
746
|
+
* `_layout` goes stale on the all-hidden path (`_runAllHidden` keeps the
|
|
747
|
+
* previous layout shell). A toggled-off series can therefore linger with
|
|
748
|
+
* `visible: true`. The registered entry's `visible` is the real legend
|
|
749
|
+
* state — fall back to the layout flag only when no entry matches.
|
|
750
|
+
* Mirrors `buildRadarFingerprint`'s `dsEntry?.visible ?? sd.visible`.
|
|
751
|
+
*/
|
|
752
|
+
_isEntryVisible(sd) {
|
|
753
|
+
const entry = this._entries.find((e) => e.id === sd.id);
|
|
754
|
+
return entry ? entry.visible : sd.visible;
|
|
755
|
+
}
|
|
730
756
|
hitTest(x, y) {
|
|
731
757
|
if (!this._layout) return null;
|
|
732
|
-
|
|
758
|
+
const gated = { ...this._layout, series: this._layout.series.filter((sd) => this._isEntryVisible(sd)) };
|
|
759
|
+
return hitTestRadar(x, y, gated, this.lastInput?.theme ?? defaultLightTheme);
|
|
733
760
|
}
|
|
734
761
|
/**
|
|
735
762
|
* Shared-mode lookup: snap to the nearest spoke (categoryIndex) by angle and
|
|
@@ -752,19 +779,20 @@ var RadarRendererController = class {
|
|
|
752
779
|
let primary = null;
|
|
753
780
|
let bestDist = Infinity;
|
|
754
781
|
for (const sd of layout.series) {
|
|
755
|
-
if (!sd
|
|
782
|
+
if (!this._isEntryVisible(sd)) continue;
|
|
756
783
|
const pt = sd.points.find((p) => p.categoryIndex === categoryIndex);
|
|
757
784
|
if (!pt) continue;
|
|
758
785
|
allSeries.push({
|
|
759
786
|
datasetId: sd.id,
|
|
760
787
|
name: sd.name,
|
|
761
788
|
label,
|
|
762
|
-
color: sd.color ?? (sd.gradientColor ? getPrimaryColor(sd.gradientColor) : getDefaultColor(sd.
|
|
789
|
+
color: sd.color ?? (sd.gradientColor ? getPrimaryColor(sd.gradientColor) : getDefaultColor(sd.colorIndex, this.lastInput?.theme ?? defaultLightTheme)),
|
|
763
790
|
colorGradient: sd.gradientColor,
|
|
764
|
-
swatchColor: resolveSwatchColor({ color: sd.color ?? sd.gradientColor }, sd.
|
|
791
|
+
swatchColor: resolveSwatchColor({ color: sd.color ?? sd.gradientColor }, sd.colorIndex, void 0, this.lastInput?.theme),
|
|
765
792
|
value: pt.value,
|
|
766
|
-
|
|
767
|
-
|
|
793
|
+
// No pre-formatted value: the HTML tooltip formats the raw value via
|
|
794
|
+
// `buildTooltipContent` (locale-aware, 2dp). Radar has no crosshair, so
|
|
795
|
+
// `cursorFormattedValue` is unused.
|
|
768
796
|
snapPixel: Math.sqrt((pt.x - layout.center.x) ** 2 + (pt.y - layout.center.y) ** 2)
|
|
769
797
|
});
|
|
770
798
|
const d = Math.sqrt((pt.x - x) ** 2 + (pt.y - y) ** 2);
|
|
@@ -775,9 +803,9 @@ var RadarRendererController = class {
|
|
|
775
803
|
index: categoryIndex,
|
|
776
804
|
label,
|
|
777
805
|
value: pt.value,
|
|
778
|
-
color: sd.color ?? (sd.gradientColor ? getPrimaryColor(sd.gradientColor) : getDefaultColor(sd.
|
|
806
|
+
color: sd.color ?? (sd.gradientColor ? getPrimaryColor(sd.gradientColor) : getDefaultColor(sd.colorIndex, this.lastInput?.theme ?? defaultLightTheme)),
|
|
779
807
|
colorGradient: sd.gradientColor,
|
|
780
|
-
swatchColor: resolveSwatchColor({ color: sd.color ?? sd.gradientColor }, sd.
|
|
808
|
+
swatchColor: resolveSwatchColor({ color: sd.color ?? sd.gradientColor }, sd.colorIndex, void 0, this.lastInput?.theme)
|
|
781
809
|
};
|
|
782
810
|
}
|
|
783
811
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { traceRoundedRect } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import { DEFAULT_HOVER_DIM_OPACITY } from './chunk-
|
|
4
|
-
import { resolveAccessor, makeItemContext } from './chunk-
|
|
1
|
+
import { traceRoundedRect } from './chunk-576P5DBH.mjs';
|
|
2
|
+
import { clampRectBorderRadius, resolveBorderRadius, hasBorderRadius } from './chunk-F2E2QCZM.mjs';
|
|
3
|
+
import { DEFAULT_HOVER_DIM_OPACITY } from './chunk-6LUIVTNV.mjs';
|
|
4
|
+
import { resolveAccessor, makeItemContext } from './chunk-BDCNBS6W.mjs';
|
|
5
|
+
import { adjustBrightness } from './chunk-BF7RP4A3.mjs';
|
|
5
6
|
|
|
6
7
|
// src/series/candlestick/canvas/index.ts
|
|
7
8
|
var DEFAULT_BAR_WIDTH_RATIO = 0.7;
|
|
@@ -20,6 +21,51 @@ function drawCandleBodyAndWicksCanvas(ctx, candle, wickWidth, borderStyle) {
|
|
|
20
21
|
const borderDash = candle.borderDash ?? borderStyle.borderDash;
|
|
21
22
|
const borderDashOffset = candle.borderDashOffset ?? borderStyle.borderDashOffset;
|
|
22
23
|
const inset = borderAlign === "inner" ? borderWidth / 2 : 0;
|
|
24
|
+
if (candle.orientation === "horizontal") {
|
|
25
|
+
const cy = candle.x;
|
|
26
|
+
const halfThick = candle.bodyWidth / 2;
|
|
27
|
+
const bLeft = candle.bodyTop;
|
|
28
|
+
const bRight = candle.bodyBottom;
|
|
29
|
+
const wLow = Math.min(candle.wickTop, candle.wickBottom);
|
|
30
|
+
const wHigh = Math.max(candle.wickTop, candle.wickBottom);
|
|
31
|
+
ctx.strokeStyle = candle.wickColor;
|
|
32
|
+
ctx.lineWidth = wickWidth;
|
|
33
|
+
ctx.setLineDash([]);
|
|
34
|
+
ctx.beginPath();
|
|
35
|
+
if (bLeft > wLow) {
|
|
36
|
+
ctx.moveTo(wLow, cy);
|
|
37
|
+
ctx.lineTo(bLeft, cy);
|
|
38
|
+
}
|
|
39
|
+
if (wHigh > bRight) {
|
|
40
|
+
ctx.moveTo(bRight, cy);
|
|
41
|
+
ctx.lineTo(wHigh, cy);
|
|
42
|
+
}
|
|
43
|
+
ctx.stroke();
|
|
44
|
+
ctx.strokeStyle = candle.bodyStroke;
|
|
45
|
+
ctx.lineWidth = borderWidth;
|
|
46
|
+
ctx.lineJoin = borderJoinStyle;
|
|
47
|
+
ctx.setLineDash(borderDash);
|
|
48
|
+
ctx.lineDashOffset = borderDashOffset;
|
|
49
|
+
const bx = bLeft + inset;
|
|
50
|
+
const by = cy - halfThick + inset;
|
|
51
|
+
const bw = Math.max(1, bRight - bLeft - inset * 2);
|
|
52
|
+
const bh = Math.max(0, candle.bodyWidth - inset * 2);
|
|
53
|
+
const clampedH = clampRectBorderRadius(resolveBorderRadius(borderStyle.borderRadius), bw, bh);
|
|
54
|
+
ctx.beginPath();
|
|
55
|
+
if (hasBorderRadius(clampedH)) {
|
|
56
|
+
traceRoundedRect(createCanvasArcPathBuilder(ctx), bx, by, bw, bh, clampedH);
|
|
57
|
+
} else {
|
|
58
|
+
ctx.rect(bx, by, bw, bh);
|
|
59
|
+
}
|
|
60
|
+
if (candle.bodyFill !== null) {
|
|
61
|
+
ctx.fillStyle = candle.bodyFill;
|
|
62
|
+
ctx.fill();
|
|
63
|
+
}
|
|
64
|
+
ctx.stroke();
|
|
65
|
+
ctx.setLineDash([]);
|
|
66
|
+
ctx.lineDashOffset = 0;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
23
69
|
const halfBody = candle.bodyWidth / 2;
|
|
24
70
|
const bodyLeft = candle.x - halfBody + inset;
|
|
25
71
|
const bodyTop = candle.bodyTop + inset;
|
|
@@ -64,6 +110,17 @@ function drawOhlcTicksCanvas(ctx, candle, tickWidth, wickWidth) {
|
|
|
64
110
|
ctx.lineWidth = wickWidth;
|
|
65
111
|
ctx.setLineDash([]);
|
|
66
112
|
ctx.beginPath();
|
|
113
|
+
if (candle.orientation === "horizontal") {
|
|
114
|
+
const cy = candle.x;
|
|
115
|
+
ctx.moveTo(Math.min(candle.wickTop, candle.wickBottom), cy);
|
|
116
|
+
ctx.lineTo(Math.max(candle.wickTop, candle.wickBottom), cy);
|
|
117
|
+
ctx.moveTo(candle.openY, cy);
|
|
118
|
+
ctx.lineTo(candle.openY, cy + tickWidth);
|
|
119
|
+
ctx.moveTo(candle.closeY, cy - tickWidth);
|
|
120
|
+
ctx.lineTo(candle.closeY, cy);
|
|
121
|
+
ctx.stroke();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
67
124
|
ctx.moveTo(candle.x, candle.wickTop);
|
|
68
125
|
ctx.lineTo(candle.x, candle.wickBottom);
|
|
69
126
|
ctx.moveTo(candle.x - tickWidth, candle.openY);
|
|
@@ -89,7 +146,15 @@ function renderCandlestickCanvas(props, layout, ctx, context) {
|
|
|
89
146
|
const hoverBorder = isHovered ? resolveAccessor(props.hoverBorderColor, makeItemContext(dataArr?.[candle.dataIndex], candle.dataIndex, { value: candle.close, category: candle.label, ...seriesExtras }), { arrayMode: "cycle" }) : void 0;
|
|
90
147
|
const hoverFillStr = hoverFill !== void 0 ? typeof hoverFill === "string" ? hoverFill : String(hoverFill) : void 0;
|
|
91
148
|
const hoverBorderStr = hoverBorder !== void 0 ? typeof hoverBorder === "string" ? hoverBorder : String(hoverBorder) : void 0;
|
|
92
|
-
const
|
|
149
|
+
const hoverBrightness = isHovered && props.effects ? props.effects.hoverBrightness ?? context.theme.hoverBrightness ?? 1 : 1;
|
|
150
|
+
const shouldBrighten = hoverBrightness !== 1;
|
|
151
|
+
const brightenFill = (value) => shouldBrighten && value !== null ? adjustBrightness(value, hoverBrightness) : value;
|
|
152
|
+
const brightenStroke = (value) => shouldBrighten ? adjustBrightness(value, hoverBrightness) : value;
|
|
153
|
+
const renderCandle = hoverFillStr !== void 0 || hoverBorderStr !== void 0 || shouldBrighten ? {
|
|
154
|
+
...candle,
|
|
155
|
+
bodyFill: hoverFillStr ?? brightenFill(candle.bodyFill),
|
|
156
|
+
bodyStroke: hoverBorderStr ?? brightenStroke(candle.bodyStroke),
|
|
157
|
+
wickColor: hoverFillStr ?? brightenStroke(candle.wickColor)} : candle;
|
|
93
158
|
if (variant === "ohlc") {
|
|
94
159
|
drawOhlcTicksCanvas(ctx, renderCandle, tickWidth, renderCandle.wickStrokeWidth);
|
|
95
160
|
} else {
|
|
@@ -1,104 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { calculateRadiusAndCenter } from './chunk-NPDZLYIF.mjs';
|
|
4
|
-
import { computeSliceHoverEffects } from './chunk-BZN2QHGP.mjs';
|
|
5
|
-
import { DEFAULT_FALLBACK_COLOR } from './chunk-NKUYIWAP.mjs';
|
|
6
|
-
import { defaultLightTheme, isGradientColor, remapStopsForDonut, createCanvasGradientFromColor, resolveAccessor, makeItemContext, resolveDash, getColorValue, getColor } from './chunk-O2X6FF45.mjs';
|
|
7
|
-
import { withCanvasState } from './chunk-SSLTFJ3U.mjs';
|
|
1
|
+
import { calculateRadiusAndCenter } from './chunk-AJ24XDEK.mjs';
|
|
2
|
+
import { defaultLightTheme, resolveAccessor, makeItemContext, resolveDash, getColorValue, getColor } from './chunk-BDCNBS6W.mjs';
|
|
8
3
|
|
|
9
4
|
// src/circular/canvas.utils.ts
|
|
10
|
-
function renderCanvasSlices(ctx, frame, hoverConfig, theme) {
|
|
11
|
-
const { slices, center, fullCircle, hoverState } = frame;
|
|
12
|
-
const hasAnyHover = hoverState.index !== null;
|
|
13
|
-
for (const slice of slices) {
|
|
14
|
-
const angle = slice.endAngle - slice.rotation;
|
|
15
|
-
if (angle < 1e-3) continue;
|
|
16
|
-
const geo = computeSliceGeometry(slice, slice.rotation, frame);
|
|
17
|
-
withCanvasState(ctx, () => {
|
|
18
|
-
const arcConfig = {
|
|
19
|
-
rotation: geo.renderRotation,
|
|
20
|
-
endAngle: geo.renderRotation + geo.renderAngle,
|
|
21
|
-
outerRadius: geo.sliceOuterRadius,
|
|
22
|
-
innerRadius: geo.sliceInnerRadius,
|
|
23
|
-
borderRadius: slice.borderRadius
|
|
24
|
-
};
|
|
25
|
-
const cx = center.x + geo.offsetX;
|
|
26
|
-
const cy = center.y + geo.offsetY;
|
|
27
|
-
if (geo.scale !== 1) {
|
|
28
|
-
ctx.translate(cx, cy);
|
|
29
|
-
ctx.scale(geo.scale, geo.scale);
|
|
30
|
-
ctx.translate(-cx, -cy);
|
|
31
|
-
}
|
|
32
|
-
const { fillColor, opacity } = computeSliceHoverEffects(slice.color ?? DEFAULT_FALLBACK_COLOR, slice.borderColor ?? "transparent", slice.borderStrokeWidth ?? 0, geo.isHovered, hasAnyHover, hoverConfig, theme);
|
|
33
|
-
if (opacity < 1) {
|
|
34
|
-
ctx.globalAlpha = opacity;
|
|
35
|
-
}
|
|
36
|
-
drawCanvasArc(ctx, cx, cy, arcConfig, fullCircle);
|
|
37
|
-
const cv = slice.colorValue;
|
|
38
|
-
if (cv && isGradientColor(cv)) {
|
|
39
|
-
const gradientColor = geo.sliceInnerRadius > 0 && cv.radialGradient ? { ...cv, stops: remapStopsForDonut(cv.stops, geo.sliceInnerRadius / geo.sliceOuterRadius) } : cv;
|
|
40
|
-
ctx.fillStyle = createCanvasGradientFromColor(ctx, gradientColor, { x: cx, y: cy }, geo.sliceOuterRadius);
|
|
41
|
-
} else {
|
|
42
|
-
ctx.fillStyle = geo.isHovered && slice.hoverColor ? slice.hoverColor : fillColor;
|
|
43
|
-
}
|
|
44
|
-
ctx.fill();
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
const useInnerBorder = frame.borderAlign === "inner";
|
|
48
|
-
for (const slice of slices) {
|
|
49
|
-
const angle = slice.endAngle - slice.rotation;
|
|
50
|
-
if (angle < 1e-3) continue;
|
|
51
|
-
const baseBorderWidth = slice.borderStrokeWidth ?? 0;
|
|
52
|
-
const geo = computeSliceGeometry(slice, slice.rotation, frame);
|
|
53
|
-
const {
|
|
54
|
-
borderStrokeWidth,
|
|
55
|
-
borderColor: computedBorderColor,
|
|
56
|
-
borderDash: hoverBorderDash,
|
|
57
|
-
opacity
|
|
58
|
-
} = computeSliceHoverEffects(slice.color ?? DEFAULT_FALLBACK_COLOR, slice.borderColor ?? "transparent", baseBorderWidth, geo.isHovered, hasAnyHover, hoverConfig, theme);
|
|
59
|
-
const borderColor = geo.isHovered && slice.hoverBorderColor ? slice.hoverBorderColor : computedBorderColor;
|
|
60
|
-
if (borderStrokeWidth <= 0 || borderColor === "transparent") continue;
|
|
61
|
-
withCanvasState(ctx, () => {
|
|
62
|
-
const arcConfig = {
|
|
63
|
-
rotation: geo.renderRotation,
|
|
64
|
-
endAngle: geo.renderRotation + geo.renderAngle,
|
|
65
|
-
outerRadius: geo.sliceOuterRadius,
|
|
66
|
-
innerRadius: geo.sliceInnerRadius,
|
|
67
|
-
borderRadius: slice.borderRadius
|
|
68
|
-
};
|
|
69
|
-
const cx = center.x + geo.offsetX;
|
|
70
|
-
const cy = center.y + geo.offsetY;
|
|
71
|
-
if (opacity < 1) {
|
|
72
|
-
ctx.globalAlpha = opacity;
|
|
73
|
-
}
|
|
74
|
-
if (borderStrokeWidth > 0 && borderColor !== "transparent") {
|
|
75
|
-
ctx.strokeStyle = borderColor;
|
|
76
|
-
ctx.lineJoin = useInnerBorder ? "miter" : "round";
|
|
77
|
-
const activeDash = hoverBorderDash ?? slice.borderDash;
|
|
78
|
-
if (activeDash && activeDash.length > 0) {
|
|
79
|
-
ctx.setLineDash(activeDash);
|
|
80
|
-
ctx.lineDashOffset = slice.borderDashOffset ?? 0;
|
|
81
|
-
}
|
|
82
|
-
if (useInnerBorder) {
|
|
83
|
-
const PIXEL_MARGIN = CLIP_PIXEL_MARGIN;
|
|
84
|
-
const angleDelta = arcConfig.outerRadius > 0 ? PIXEL_MARGIN / arcConfig.outerRadius * (180 / Math.PI) : 0;
|
|
85
|
-
const expandedArc = {
|
|
86
|
-
...arcConfig,
|
|
87
|
-
rotation: arcConfig.rotation - angleDelta,
|
|
88
|
-
endAngle: arcConfig.endAngle + angleDelta
|
|
89
|
-
};
|
|
90
|
-
drawCanvasArc(ctx, cx, cy, expandedArc, fullCircle);
|
|
91
|
-
ctx.clip();
|
|
92
|
-
ctx.lineWidth = borderStrokeWidth * 2;
|
|
93
|
-
} else {
|
|
94
|
-
ctx.lineWidth = borderStrokeWidth;
|
|
95
|
-
}
|
|
96
|
-
drawCanvasArc(ctx, cx, cy, arcConfig, fullCircle);
|
|
97
|
-
ctx.stroke();
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
5
|
function buildHitTestStates(slices) {
|
|
103
6
|
const statesByDataset = /* @__PURE__ */ new Map();
|
|
104
7
|
for (const slice of slices) {
|
|
@@ -323,4 +226,4 @@ function calculateRingLayouts(datasets, isDatasetVisible, isItemVisible, baseInn
|
|
|
323
226
|
});
|
|
324
227
|
}
|
|
325
228
|
|
|
326
|
-
export { applyRingLayout, buildHitTestStates, buildPieSliceContentItems, buildPieVisibilityMap, buildRingTarget, buildSliceStyleData, calculateRingLayouts, computeSliceRadiusRatios
|
|
229
|
+
export { applyRingLayout, buildHitTestStates, buildPieSliceContentItems, buildPieVisibilityMap, buildRingTarget, buildSliceStyleData, calculateRingLayouts, computeSliceRadiusRatios };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { formatTimeLabel, formatHitValue, formatCursorValue } from './chunk-
|
|
2
|
-
import { hitTestBar } from './chunk-
|
|
3
|
-
import { makeItemContext, resolveAccessor, getColor, resolveSwatchColor, asGradient } from './chunk-
|
|
1
|
+
import { formatTimeLabel, formatHitValue, formatCursorValue } from './chunk-HHBFQ6AI.mjs';
|
|
2
|
+
import { hitTestBar } from './chunk-DJOHDKTP.mjs';
|
|
3
|
+
import { makeItemContext, resolveAccessor, getColor, resolveSwatchColor, asGradient } from './chunk-BDCNBS6W.mjs';
|
|
4
|
+
import { resolveCartesianAccessors } from './chunk-G3DIMENH.mjs';
|
|
4
5
|
|
|
5
6
|
// src/cartesian/hittest-wrappers/bar.ts
|
|
6
7
|
function barHitTest(x, y, ctx) {
|
|
@@ -11,15 +12,16 @@ function barHitTest(x, y, ctx) {
|
|
|
11
12
|
const dataset = datasets.get(datasetId);
|
|
12
13
|
if (!dataset) continue;
|
|
13
14
|
const barProps = renderPropsCache.get(datasetId) ?? dataset.props;
|
|
15
|
+
const acc = resolveCartesianAccessors(barProps);
|
|
14
16
|
const hitIndex = hitTestBar(x, y, {}, layout);
|
|
15
17
|
if (hitIndex !== null) {
|
|
16
18
|
const item = barProps.data?.[hitIndex];
|
|
17
19
|
const hitCtx = makeItemContext(item, hitIndex);
|
|
18
|
-
const rawLabel = item ? String(resolveAccessor(
|
|
20
|
+
const rawLabel = item ? String(resolveAccessor(acc.independentField, hitCtx) ?? `Item ${hitIndex}`) : `Item ${hitIndex}`;
|
|
19
21
|
const label = formatTimeLabel(rawLabel, layoutData);
|
|
20
|
-
const value = item ? Number(resolveAccessor(
|
|
21
|
-
const color = typeof layout.colors[hitIndex] === "string" ? layout.colors[hitIndex] : getColor({ color: layout.colors[hitIndex] }, layout.
|
|
22
|
-
const swatchColor = resolveSwatchColor({ color: layout.colors[hitIndex] }, layout.
|
|
22
|
+
const value = item ? Number(resolveAccessor(acc.measureField, hitCtx) ?? 0) : 0;
|
|
23
|
+
const color = typeof layout.colors[hitIndex] === "string" ? layout.colors[hitIndex] : getColor({ color: layout.colors[hitIndex] }, layout.colorIndex, void 0, ctx.theme);
|
|
24
|
+
const swatchColor = resolveSwatchColor({ color: layout.colors[hitIndex] }, layout.colorIndex, void 0, ctx.theme);
|
|
23
25
|
let percentage;
|
|
24
26
|
if (layoutData.isPercentStacked && layoutData.categoryTotals) {
|
|
25
27
|
const catTotal = layoutData.categoryTotals[hitIndex];
|
|
@@ -43,7 +45,28 @@ function barHitTest(x, y, ctx) {
|
|
|
43
45
|
const displayValue = layoutData.isPercentStacked ? Math.round(value * 10) / 10 : value;
|
|
44
46
|
const formattedValue = formatHitValue(displayValue, barProps, orientation, layoutData);
|
|
45
47
|
const cursorFormattedValue = formatCursorValue(x, y, barProps, orientation, layoutData);
|
|
46
|
-
|
|
48
|
+
const xyExtra = acc.independentIsCategory ? {} : {
|
|
49
|
+
xValue: item ? Number(resolveAccessor(acc.independentField, hitCtx)) : hitIndex,
|
|
50
|
+
yValue: value,
|
|
51
|
+
xAxisTitle: layoutData.xAxisLayout?.title?.text,
|
|
52
|
+
yAxisTitle: layoutData.yAxisLayout?.title?.text
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
datasetId,
|
|
56
|
+
index: hitIndex,
|
|
57
|
+
label,
|
|
58
|
+
value,
|
|
59
|
+
color,
|
|
60
|
+
colorGradient: asGradient(layout.colors[hitIndex]),
|
|
61
|
+
swatchColor,
|
|
62
|
+
percentage,
|
|
63
|
+
snapX,
|
|
64
|
+
snapY,
|
|
65
|
+
formattedValue,
|
|
66
|
+
cursorFormattedValue,
|
|
67
|
+
independentIsCategory: acc.independentIsCategory,
|
|
68
|
+
...xyExtra
|
|
69
|
+
};
|
|
47
70
|
}
|
|
48
71
|
}
|
|
49
72
|
return null;
|
|
@@ -80,11 +103,12 @@ function barFindNearest(x, y, ctx) {
|
|
|
80
103
|
if (dist < bestDist) {
|
|
81
104
|
bestDist = dist;
|
|
82
105
|
const barProps = renderPropsCache.get(datasetId) ?? dataset.props;
|
|
106
|
+
const acc = resolveCartesianAccessors(barProps);
|
|
83
107
|
const item = barProps.data?.[nearestCatIdx];
|
|
84
108
|
const nearCtx = makeItemContext(item, nearestCatIdx);
|
|
85
|
-
const rawLabel = item ? String(resolveAccessor(
|
|
109
|
+
const rawLabel = item ? String(resolveAccessor(acc.independentField, nearCtx) ?? `Item ${nearestCatIdx}`) : `Item ${nearestCatIdx}`;
|
|
86
110
|
const label = formatTimeLabel(rawLabel, layoutData);
|
|
87
|
-
const value = item ? Number(resolveAccessor(
|
|
111
|
+
const value = item ? Number(resolveAccessor(acc.measureField, nearCtx) ?? 0) : 0;
|
|
88
112
|
const color = typeof layout.colors[nearestCatIdx] === "string" ? layout.colors[nearestCatIdx] : getColor({ color: layout.colors[nearestCatIdx] }, layout.datasetIndex, void 0, ctx.theme);
|
|
89
113
|
const swatchColor = resolveSwatchColor({ color: layout.colors[nearestCatIdx] }, layout.datasetIndex, void 0, ctx.theme);
|
|
90
114
|
let snapX;
|
|
@@ -137,11 +161,12 @@ function barFindAllNearest(x, y, ctx) {
|
|
|
137
161
|
const dataset = datasets.get(datasetId);
|
|
138
162
|
if (!dataset) continue;
|
|
139
163
|
const barProps = renderPropsCache.get(datasetId) ?? dataset.props;
|
|
164
|
+
const acc = resolveCartesianAccessors(barProps);
|
|
140
165
|
const item = barProps.data?.[nearestCatIdx];
|
|
141
166
|
const nearCtx2 = makeItemContext(item, nearestCatIdx);
|
|
142
|
-
const rawLabel = item ? String(resolveAccessor(
|
|
167
|
+
const rawLabel = item ? String(resolveAccessor(acc.independentField, nearCtx2) ?? `Item ${nearestCatIdx}`) : `Item ${nearestCatIdx}`;
|
|
143
168
|
const label = formatTimeLabel(rawLabel, layoutData);
|
|
144
|
-
const value = item ? Number(resolveAccessor(
|
|
169
|
+
const value = item ? Number(resolveAccessor(acc.measureField, nearCtx2) ?? 0) : 0;
|
|
145
170
|
const color = typeof layout.colors[nearestCatIdx] === "string" ? layout.colors[nearestCatIdx] : getColor({ color: layout.colors[nearestCatIdx] }, layout.datasetIndex, void 0, ctx.theme);
|
|
146
171
|
const colorGradient = asGradient(layout.colors[nearestCatIdx]);
|
|
147
172
|
const swatchColor = resolveSwatchColor({ color: layout.colors[nearestCatIdx] }, layout.datasetIndex, void 0, ctx.theme);
|