@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,7 +1,9 @@
|
|
|
1
|
-
import { normalizePadding } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { normalizePadding } from './chunk-AJ24XDEK.mjs';
|
|
2
|
+
import { safeFormat } from './chunk-DIJFKY6H.mjs';
|
|
3
|
+
import { DEFAULT_NAV_GRIP_LINE_GAP, DEFAULT_NAV_HANDLE_WIDTH, DEFAULT_NAV_MIN_SELECTION_WIDTH, DEFAULT_NAV_STYLE, DEFAULT_NAV_PADDING_X, DEFAULT_NAV_PADDING_Y } from './chunk-6LUIVTNV.mjs';
|
|
4
|
+
import { defaultLightTheme, batchResolveAccessor } from './chunk-BDCNBS6W.mjs';
|
|
5
|
+
import { resolveCartesianAccessors } from './chunk-G3DIMENH.mjs';
|
|
6
|
+
import { toTimestamp, createLinearScale, generateNiceTicks, generateTimeTicks, formatTimeTick } from './chunk-K7AGQTVK.mjs';
|
|
5
7
|
|
|
6
8
|
// src/renderers/navigator/geometry.ts
|
|
7
9
|
var NAV_PADDING_Y = DEFAULT_NAV_PADDING_Y;
|
|
@@ -62,9 +64,12 @@ function extractNavigatorData(datasets, targetSeriesId, isTimeAxis) {
|
|
|
62
64
|
let isCategoryAxis = false;
|
|
63
65
|
let isNumericAxis = false;
|
|
64
66
|
let catLabels;
|
|
67
|
+
let orientation = "vertical";
|
|
65
68
|
if (targetDs.type === "candlestick") {
|
|
66
69
|
const cp = props;
|
|
67
|
-
const
|
|
70
|
+
const cacc = resolveCartesianAccessors(cp);
|
|
71
|
+
orientation = cacc.orientation;
|
|
72
|
+
const rawTimeValues = batchResolveAccessor(cacc.independentField, data);
|
|
68
73
|
if (isTimeAxis) {
|
|
69
74
|
xValues = rawTimeValues.map((v) => toTimestamp(v));
|
|
70
75
|
} else {
|
|
@@ -73,25 +78,21 @@ function extractNavigatorData(datasets, targetSeriesId, isTimeAxis) {
|
|
|
73
78
|
xValues = rawTimeValues.map((_, i) => i);
|
|
74
79
|
}
|
|
75
80
|
yValues = batchResolveAccessor(cp.closeField, data);
|
|
76
|
-
} else if (targetDs.type === "scatter") {
|
|
77
|
-
const xField = props.xField ?? props.x ?? FIELD_DEFAULTS.xField;
|
|
78
|
-
const yField = props.yField ?? props.y ?? FIELD_DEFAULTS.yField;
|
|
79
|
-
xValues = batchResolveAccessor(xField, data);
|
|
80
|
-
yValues = batchResolveAccessor(yField, data);
|
|
81
|
-
isCategoryAxis = false;
|
|
82
|
-
isNumericAxis = true;
|
|
83
81
|
} else {
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
const acc = resolveCartesianAccessors(props);
|
|
83
|
+
const rawIndep = batchResolveAccessor(acc.independentField, data);
|
|
84
|
+
orientation = acc.orientation;
|
|
85
|
+
yValues = batchResolveAccessor(acc.measureField, data);
|
|
86
|
+
if (!acc.independentIsCategory) {
|
|
87
|
+
isNumericAxis = true;
|
|
88
|
+
xValues = rawIndep.map((v) => Number(v));
|
|
89
|
+
} else if (isTimeAxis) {
|
|
90
|
+
xValues = rawIndep.map((v) => toTimestamp(v));
|
|
89
91
|
} else {
|
|
90
92
|
isCategoryAxis = true;
|
|
91
|
-
catLabels =
|
|
92
|
-
xValues =
|
|
93
|
+
catLabels = rawIndep.map((v) => String(v ?? ""));
|
|
94
|
+
xValues = rawIndep.map((_, i) => i);
|
|
93
95
|
}
|
|
94
|
-
yValues = batchResolveAccessor(valField, data);
|
|
95
96
|
}
|
|
96
97
|
const points = [];
|
|
97
98
|
for (let i = 0; i < xValues.length; i++) {
|
|
@@ -114,7 +115,7 @@ function extractNavigatorData(datasets, targetSeriesId, isTimeAxis) {
|
|
|
114
115
|
yMin -= 1;
|
|
115
116
|
yMax += 1;
|
|
116
117
|
}
|
|
117
|
-
return { points, xDomain, yDomain: [yMin, yMax], isCategory: isCategoryAxis, categoryLabels: catLabels, isNumericAxis, sourceType: targetDs.type };
|
|
118
|
+
return { points, xDomain, yDomain: [yMin, yMax], isCategory: isCategoryAxis, categoryLabels: catLabels, isNumericAxis, sourceType: targetDs.type, orientation };
|
|
118
119
|
}
|
|
119
120
|
function createNavigatorScales(data, width, height, padding) {
|
|
120
121
|
const px = padding?.left ?? NAV_PADDING_X;
|
|
@@ -170,7 +171,14 @@ function computeNavigatorTicks(xDomain, xScale, width, locale, categoryLabels, i
|
|
|
170
171
|
const ticks2 = [];
|
|
171
172
|
for (let i = 0; i < totalCats; i += step) {
|
|
172
173
|
const raw = categoryLabels[i];
|
|
173
|
-
ticks2.push({
|
|
174
|
+
ticks2.push({
|
|
175
|
+
px: xScale(i),
|
|
176
|
+
label: formatter ? safeFormat(
|
|
177
|
+
() => formatter(raw, i),
|
|
178
|
+
() => raw,
|
|
179
|
+
"navigator tick"
|
|
180
|
+
) : raw
|
|
181
|
+
});
|
|
174
182
|
}
|
|
175
183
|
return ticks2;
|
|
176
184
|
}
|
|
@@ -190,7 +198,18 @@ function computeNavigatorTicks(xDomain, xScale, width, locale, categoryLabels, i
|
|
|
190
198
|
label: formatTimeTick(ts, interval.unit, void 0, void 0, locale)
|
|
191
199
|
}));
|
|
192
200
|
}
|
|
193
|
-
function computeNavigatorSelection(zoomState, xScale, width, yScale, height) {
|
|
201
|
+
function computeNavigatorSelection(zoomState, xScale, width, yScale, height, orientation = "vertical") {
|
|
202
|
+
if (orientation === "horizontal") {
|
|
203
|
+
if (!xScale || !zoomState.y) {
|
|
204
|
+
return { x: 0, width, isZoomed: false };
|
|
205
|
+
}
|
|
206
|
+
const minW2 = Math.min(MIN_SELECTION_WIDTH, width);
|
|
207
|
+
const rawLeft2 = Math.max(0, xScale(zoomState.y.min));
|
|
208
|
+
const rawRight2 = Math.min(width, xScale(zoomState.y.max));
|
|
209
|
+
const selW2 = Math.max(rawRight2 - rawLeft2, minW2);
|
|
210
|
+
const selX2 = Math.min(rawLeft2, Math.max(0, width - selW2));
|
|
211
|
+
return { x: selX2, width: selW2, isZoomed: true };
|
|
212
|
+
}
|
|
194
213
|
if (!xScale || !zoomState.x) {
|
|
195
214
|
return { x: 0, width, isZoomed: false };
|
|
196
215
|
}
|
|
@@ -273,7 +292,7 @@ function calculateNavigatorLayout(chartArea, config, datasets, zoomState, isTime
|
|
|
273
292
|
const scales = createNavigatorScales(animatedData, area.width, area.height, resolved.padding);
|
|
274
293
|
const paths = buildNavigatorPaths(data.points, scales, area.height, data.sourceType);
|
|
275
294
|
const ticks = computeNavigatorTicks(effectiveXDomain, scales.x, area.width, locale, data.categoryLabels, data.isNumericAxis, tickFormat);
|
|
276
|
-
const selection = computeNavigatorSelection(zoomState, scales.x, area.width, data.isNumericAxis ? scales.y : null, data.isNumericAxis ? area.height : void 0);
|
|
295
|
+
const selection = computeNavigatorSelection(zoomState, scales.x, area.width, data.isNumericAxis ? scales.y : null, data.isNumericAxis ? area.height : void 0, data.orientation);
|
|
277
296
|
const primaryColor = resolveSeriesColor(primaryConfig, primarySeriesId ? datasets.get(primarySeriesId) : void 0);
|
|
278
297
|
const allSeries = [
|
|
279
298
|
{ points: data.points, paths, color: primaryColor, sourceType: data.sourceType },
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { computeDrillOutOrigin, computeZoomTransform } from './chunk-
|
|
2
|
-
import { AnimatedScene, resolveAnimatedProps, TREEMAP_ANIMATABLE_PROPS } from './chunk-
|
|
3
|
-
import { getCellLabelInfo } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { buildAncestorChain } from './chunk-
|
|
11
|
-
import { configureCanvasHiDPI, materializeSvgNode, setAttr } from './chunk-
|
|
1
|
+
import { computeDrillOutOrigin, computeZoomTransform } from './chunk-AWMO5TS3.mjs';
|
|
2
|
+
import { AnimatedScene, resolveAnimatedProps, TREEMAP_ANIMATABLE_PROPS } from './chunk-JS47MSB2.mjs';
|
|
3
|
+
import { calculateTreemapLayout, getCellLabelInfo } from './chunk-KCSMOAZO.mjs';
|
|
4
|
+
import { reconcileSvgChildren } from './chunk-FWNWV3H7.mjs';
|
|
5
|
+
import { parseAnimationConfig, getEasing } from './chunk-LTQH3LQJ.mjs';
|
|
6
|
+
import { raf, cancelRaf } from './chunk-5WFF272M.mjs';
|
|
7
|
+
import { buildAccessibilityRenderContext, generateSeriesDescription } from './chunk-IFJPDARC.mjs';
|
|
8
|
+
import { CHAR_WIDTH_RATIO } from './chunk-56MASQS2.mjs';
|
|
9
|
+
import { DEFAULT_HOVER_DIM_OPACITY, DEFAULT_HOVER_BRIGHTNESS } from './chunk-6LUIVTNV.mjs';
|
|
10
|
+
import { buildAncestorChain } from './chunk-4KQZXAHZ.mjs';
|
|
11
|
+
import { configureCanvasHiDPI, materializeSvgNode, setAttr } from './chunk-BF7RP4A3.mjs';
|
|
12
12
|
|
|
13
13
|
// src/series/treemap/controller/helpers.ts
|
|
14
14
|
function buildTreemapDataFingerprint(layouts) {
|
|
@@ -89,7 +89,7 @@ function projectTreemapSceneFrame(cellScene, groupBgScene, targetLayouts) {
|
|
|
89
89
|
targetBgByDataset.set(datasetId, bgMap);
|
|
90
90
|
}
|
|
91
91
|
const cellsByDataset = /* @__PURE__ */ new Map();
|
|
92
|
-
for (const el of cellScene.
|
|
92
|
+
for (const el of cellScene.elementValues()) {
|
|
93
93
|
const s = el.current;
|
|
94
94
|
const sep = el.id.indexOf("::");
|
|
95
95
|
if (sep < 0) continue;
|
|
@@ -119,7 +119,7 @@ function projectTreemapSceneFrame(cellScene, groupBgScene, targetLayouts) {
|
|
|
119
119
|
arr.push(cell);
|
|
120
120
|
}
|
|
121
121
|
const bgsByDataset = /* @__PURE__ */ new Map();
|
|
122
|
-
for (const el of groupBgScene.
|
|
122
|
+
for (const el of groupBgScene.elementValues()) {
|
|
123
123
|
const s = el.current;
|
|
124
124
|
const sep = el.id.indexOf("::");
|
|
125
125
|
if (sep < 0) continue;
|
|
@@ -205,7 +205,7 @@ function resolveId(ctx, item, categoryField, nodeIdField, itemIndex) {
|
|
|
205
205
|
function buildTreemapSvgChildren(params) {
|
|
206
206
|
const children = [];
|
|
207
207
|
for (const [dsId, { props, layout }] of params.layoutMap) {
|
|
208
|
-
const node = params.paint.renderSvg(props, layout, { ...params.fontContext, interaction: params.interaction });
|
|
208
|
+
const node = params.paint.renderSvg(props, layout, { ...params.fontContext, interaction: params.interaction, effects: params.effects });
|
|
209
209
|
setAttr(node, "data-dataset", dsId);
|
|
210
210
|
if (params.accessibility?.enabled && params.accessibility.landmarkVerbosity === "all") {
|
|
211
211
|
setAttr(node, "role", "region");
|
|
@@ -215,13 +215,21 @@ function buildTreemapSvgChildren(params) {
|
|
|
215
215
|
}
|
|
216
216
|
return children;
|
|
217
217
|
}
|
|
218
|
+
function resolveTreemapHoverEffects(input) {
|
|
219
|
+
if (!input?.hoverConfig) return void 0;
|
|
220
|
+
return {
|
|
221
|
+
hoverBrightness: input.hoverConfig.brightness ?? input.theme.hoverBrightness ?? DEFAULT_HOVER_BRIGHTNESS,
|
|
222
|
+
dimOpacity: input.hoverConfig.dimOpacity ?? input.theme.dimOpacity ?? DEFAULT_HOVER_DIM_OPACITY
|
|
223
|
+
};
|
|
224
|
+
}
|
|
218
225
|
function renderSvgGroup(ctx, group, layoutMap, fontContext, interaction, accessibility) {
|
|
219
|
-
const children = buildTreemapSvgChildren({ paint: ctx._paint, layoutMap, fontContext, interaction, accessibility });
|
|
226
|
+
const children = buildTreemapSvgChildren({ paint: ctx._paint, layoutMap, fontContext, interaction, effects: resolveTreemapHoverEffects(ctx.lastInput), accessibility });
|
|
220
227
|
group.replaceChildren(...children.map(materializeSvgNode));
|
|
221
228
|
}
|
|
222
229
|
function renderAllCanvas(ctx, c2d, layoutMap, fontContext, interaction) {
|
|
230
|
+
const effects = resolveTreemapHoverEffects(ctx.lastInput);
|
|
223
231
|
for (const [, { props, layout }] of layoutMap) {
|
|
224
|
-
ctx._paint.renderCanvas(props, layout, c2d, { ...fontContext, interaction });
|
|
232
|
+
ctx._paint.renderCanvas(props, layout, c2d, { ...fontContext, interaction, effects });
|
|
225
233
|
}
|
|
226
234
|
renderCanvasCustomContent(ctx, c2d);
|
|
227
235
|
}
|
|
@@ -275,7 +283,7 @@ function applyHover(ctx, hover) {
|
|
|
275
283
|
liveLayoutMap.set(id, { props: mergedProps, layout: liveLayout });
|
|
276
284
|
}
|
|
277
285
|
if (input.renderer === "svg" && ctx.svgGroup) {
|
|
278
|
-
const children = buildTreemapSvgChildren({ paint: ctx._paint, layoutMap: liveLayoutMap, fontContext, interaction });
|
|
286
|
+
const children = buildTreemapSvgChildren({ paint: ctx._paint, layoutMap: liveLayoutMap, fontContext, interaction, effects: resolveTreemapHoverEffects(input) });
|
|
279
287
|
reconcileSvgChildren(ctx.svgGroup, children);
|
|
280
288
|
return;
|
|
281
289
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { createDrawImage } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { createDrawImage } from './chunk-HXDLOOCS.mjs';
|
|
2
|
+
import { safeRenderProp } from './chunk-DIJFKY6H.mjs';
|
|
3
|
+
import { measureFontMetrics, measureTextWidth } from './chunk-56MASQS2.mjs';
|
|
4
|
+
import { DEFAULT_HOVER_DIM_OPACITY, DEFAULT_HOVER_POINT_RADIUS_MULTIPLIER, DEFAULT_REFERENCE_LINE_STROKE, DEFAULT_REFERENCE_LINE_WIDTH, DEFAULT_REFERENCE_LABEL_OFFSET, DEFAULT_REFERENCE_BAND_FILL, DEFAULT_REFERENCE_BAND_OPACITY, resolveFontFamily, resolveFontSize, DEFAULT_REFERENCE_LABEL_FONT_SIZE, DEFAULT_REFERENCE_LABEL_FONT_WEIGHT } from './chunk-6LUIVTNV.mjs';
|
|
5
|
+
import { buildColorIndexMap, resolveAccessor, makeItemContext, resolveSwatchColor, isGradientColor } from './chunk-BDCNBS6W.mjs';
|
|
6
|
+
import { createSvgGroup, appendChild, createSvgRect, createSvgText, createSvgLine, withCanvasState } from './chunk-BF7RP4A3.mjs';
|
|
7
|
+
import { shallowEqual } from './chunk-K7AGQTVK.mjs';
|
|
7
8
|
|
|
8
9
|
// src/utils/customRender.utils.ts
|
|
9
10
|
function renderCustomMarkersCanvas(ctx, entries, hover, options) {
|
|
@@ -35,7 +36,7 @@ function renderCustomMarkersCanvas(ctx, entries, hover, options) {
|
|
|
35
36
|
ctx.save();
|
|
36
37
|
ctx.translate(pt.x, pt.y);
|
|
37
38
|
ctx.globalAlpha = opacity;
|
|
38
|
-
entry.renderMarker(context);
|
|
39
|
+
safeRenderProp(() => entry.renderMarker(context), "marker");
|
|
39
40
|
ctx.restore();
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -106,19 +107,21 @@ function resolveLegendGradient(props, index, item, extras) {
|
|
|
106
107
|
function buildLegendItems(options) {
|
|
107
108
|
const { datasets, datasetVisibility, hiddenItems, isCartesian, hasRadarDatasets, hasPolarDatasets, hasStackedPies, theme } = options;
|
|
108
109
|
const sortedDatasets = Array.from(datasets.entries()).sort(([, a], [, b]) => a.order - b.order);
|
|
110
|
+
const colorIndexById = buildColorIndexMap(datasets);
|
|
109
111
|
if (isCartesian || hasRadarDatasets || hasPolarDatasets) {
|
|
110
112
|
const items2 = [];
|
|
111
113
|
for (const [datasetId, dataset] of sortedDatasets) {
|
|
112
114
|
const visible = datasetVisibility.get(datasetId) ?? true;
|
|
113
115
|
const props = dataset.props;
|
|
114
116
|
const firstItem = props.data?.[0];
|
|
115
|
-
const
|
|
117
|
+
const colorIndex = colorIndexById.get(datasetId) ?? dataset.order;
|
|
118
|
+
const color = resolveLegendColor(props, colorIndex, firstItem, theme);
|
|
116
119
|
items2.push({
|
|
117
120
|
type: "dataset",
|
|
118
121
|
datasetId,
|
|
119
122
|
label: props.name ?? datasetId,
|
|
120
123
|
color,
|
|
121
|
-
colorGradient: resolveLegendGradient(props,
|
|
124
|
+
colorGradient: resolveLegendGradient(props, colorIndex, firstItem),
|
|
122
125
|
visible
|
|
123
126
|
});
|
|
124
127
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { hasCollisions } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { hasCollisions } from './chunk-GOOBVFFH.mjs';
|
|
2
|
+
import { safeFormat } from './chunk-DIJFKY6H.mjs';
|
|
3
|
+
import { measureTextWidth, measureFontMetrics, svgAnchorToCanvasAlign } from './chunk-56MASQS2.mjs';
|
|
4
|
+
import { DEFAULT_TITLE_LABEL_GAP, resolveFontSize, DEFAULT_TITLE_FONT_SIZE, resolveFontFamily, resolveAxisColor, DEFAULT_TICK_LENGTH, DEFAULT_LABEL_PADDING, DEFAULT_TICK_FONT_SIZE } from './chunk-6LUIVTNV.mjs';
|
|
5
|
+
import { defaultLightTheme } from './chunk-BDCNBS6W.mjs';
|
|
6
|
+
import { createSvgGroup, appendChild, createSvgRect, createSvgLine, setAttr, createSvgText, withCanvasState } from './chunk-BF7RP4A3.mjs';
|
|
7
|
+
import { crisp, detectTickUnit, isPeriodBoundary, formatTimeTick, generateIntervalTicks } from './chunk-K7AGQTVK.mjs';
|
|
7
8
|
|
|
8
9
|
// src/renderers/axis/geometry.ticks.ts
|
|
9
10
|
function resolveTickStyle(style, axisColor, globalFont) {
|
|
@@ -140,7 +141,11 @@ function calculateTicks(scale, position, chartArea, props, style, locale) {
|
|
|
140
141
|
const maxTicks = Math.max(1, Math.floor(axisLength / userMinGridDistance));
|
|
141
142
|
step = Math.max(1, Math.ceil(filtered.length / maxTicks));
|
|
142
143
|
} else if (isHorizontal) {
|
|
143
|
-
const sampleLabel = formatter ? typeof formatter === "function" ?
|
|
144
|
+
const sampleLabel = formatter ? typeof formatter === "function" ? safeFormat(
|
|
145
|
+
() => formatter(filtered[0].value, 0),
|
|
146
|
+
() => formatValue(filtered[0].value, locale),
|
|
147
|
+
"tick"
|
|
148
|
+
) : String(filtered[0].value) : formatValue(filtered[0].value, locale);
|
|
144
149
|
const sampleWidth = measureTextWidth(sampleLabel, style.fontSize, style.fontWeight, style.fontFamily);
|
|
145
150
|
const textHeight = style.fontSize * 1.2;
|
|
146
151
|
const footprint0 = sampleWidth;
|
|
@@ -149,7 +154,13 @@ function calculateTicks(scale, position, chartArea, props, style, locale) {
|
|
|
149
154
|
const step0 = Math.max(1, Math.ceil(filtered.length / maxTicks0));
|
|
150
155
|
if (step0 === 1) {
|
|
151
156
|
if (manualRotation === 0 && (baseProps.autoRotate ?? true)) {
|
|
152
|
-
const preLabels = filtered.map(
|
|
157
|
+
const preLabels = filtered.map(
|
|
158
|
+
(v, idx) => formatter ? typeof formatter === "function" ? safeFormat(
|
|
159
|
+
() => formatter(v.value, idx),
|
|
160
|
+
() => formatValue(v.value, locale),
|
|
161
|
+
"tick"
|
|
162
|
+
) : String(v.value) : formatValue(v.value, locale)
|
|
163
|
+
);
|
|
153
164
|
if (hasCollisions(
|
|
154
165
|
preLabels,
|
|
155
166
|
filtered.map((v) => v.pos),
|
|
@@ -203,7 +214,11 @@ function calculateTicks(scale, position, chartArea, props, style, locale) {
|
|
|
203
214
|
const isFirst = i === 0;
|
|
204
215
|
const isLast = i >= filtered.length - step;
|
|
205
216
|
const isHidden = isFirst && !showFirst || isLast && !showLast;
|
|
206
|
-
const label = isHidden ? "" : formatter ? typeof formatter === "function" ?
|
|
217
|
+
const label = isHidden ? "" : formatter ? typeof formatter === "function" ? safeFormat(
|
|
218
|
+
() => formatter(value, i),
|
|
219
|
+
() => formatValue(value, locale),
|
|
220
|
+
"tick"
|
|
221
|
+
) : String(value) : formatValue(value, locale);
|
|
207
222
|
const perTickStyle = tickStyleFn ? tickStyleFn(value, i) : void 0;
|
|
208
223
|
let baseAnchor;
|
|
209
224
|
let baseBaseline;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DEFAULT_CHART_PADDING, resolveFontSize, DEFAULT_CHART_TITLE_FONT_SIZE, DEFAULT_CHART_TITLE_PADDING, DEFAULT_CHART_CAPTION_FONT_SIZE, DEFAULT_CHART_CAPTION_PADDING, DEFAULT_LEGEND_PADDING, DEFAULT_LEGEND_WIDTH, DEFAULT_LEGEND_HEIGHT } from './chunk-
|
|
2
|
-
import { calculateArcBoundingBox } from './chunk-
|
|
1
|
+
import { DEFAULT_CHART_PADDING, resolveFontSize, DEFAULT_CHART_TITLE_FONT_SIZE, DEFAULT_CHART_TITLE_PADDING, DEFAULT_CHART_CAPTION_FONT_SIZE, DEFAULT_CHART_CAPTION_PADDING, DEFAULT_LEGEND_PADDING, DEFAULT_LEGEND_WIDTH, DEFAULT_LEGEND_HEIGHT } from './chunk-6LUIVTNV.mjs';
|
|
2
|
+
import { calculateArcBoundingBox } from './chunk-K7AGQTVK.mjs';
|
|
3
3
|
|
|
4
4
|
// src/utils/layout/layout.utils.ts
|
|
5
5
|
function normalizePadding(padding) {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { toRad } from './chunk-K7AGQTVK.mjs';
|
|
2
|
+
|
|
3
|
+
// src/circular/radial.helpers.ts
|
|
4
|
+
function computeSliceGeometry(slice, currentAngle, frame) {
|
|
5
|
+
const { outerRadius, innerRadius, willBeSingleSlice, currentRingRadii, hoverState, hoverOffset, hoverScale } = frame;
|
|
6
|
+
const ringRadii = currentRingRadii.get(String(slice.datasetIndex));
|
|
7
|
+
const baseOuterRadius = ringRadii?.outer ?? outerRadius;
|
|
8
|
+
const sliceInnerRadius = ringRadii?.inner ?? innerRadius;
|
|
9
|
+
const sliceOuterRadius = sliceInnerRadius + (baseOuterRadius - sliceInnerRadius) * slice.radiusRatio;
|
|
10
|
+
const spacing = slice.spacing ?? 0;
|
|
11
|
+
const spacingAngle = spacing > 0 && sliceOuterRadius > 0 ? spacing / sliceOuterRadius * (180 / Math.PI) : 0;
|
|
12
|
+
const halfSpacing = spacingAngle / 2;
|
|
13
|
+
const angle = slice.endAngle - slice.rotation;
|
|
14
|
+
const isFullCircleSlice = willBeSingleSlice || slice.targetAngle >= 355 || angle >= 355;
|
|
15
|
+
const midAngle = currentAngle + angle / 2;
|
|
16
|
+
const midRadius = (sliceOuterRadius + sliceInnerRadius) / 2;
|
|
17
|
+
const isHovered = hoverState.datasetIndex === slice.datasetIndex && hoverState.index === slice.originalIndex;
|
|
18
|
+
const sliceHoverOffset = isHovered && !isFullCircleSlice ? hoverOffset : 0;
|
|
19
|
+
const hoverOffsetX = sliceHoverOffset > 0 ? Math.cos(toRad(midAngle)) * sliceHoverOffset : 0;
|
|
20
|
+
const hoverOffsetY = sliceHoverOffset > 0 ? Math.sin(toRad(midAngle)) * sliceHoverOffset : 0;
|
|
21
|
+
const baseOffset = slice.baseOffset ?? 0;
|
|
22
|
+
const baseOffsetX = baseOffset !== 0 ? Math.cos(toRad(midAngle)) * baseOffset : 0;
|
|
23
|
+
const baseOffsetY = baseOffset !== 0 ? Math.sin(toRad(midAngle)) * baseOffset : 0;
|
|
24
|
+
const scale = isHovered && !isFullCircleSlice && hoverScale > 1 ? hoverScale : 1;
|
|
25
|
+
return {
|
|
26
|
+
sliceOuterRadius,
|
|
27
|
+
sliceInnerRadius,
|
|
28
|
+
isFullCircleSlice,
|
|
29
|
+
midAngle,
|
|
30
|
+
midRadius,
|
|
31
|
+
isHovered,
|
|
32
|
+
offsetX: hoverOffsetX + baseOffsetX,
|
|
33
|
+
offsetY: hoverOffsetY + baseOffsetY,
|
|
34
|
+
scale,
|
|
35
|
+
renderRotation: isFullCircleSlice ? currentAngle : currentAngle + halfSpacing,
|
|
36
|
+
renderAngle: isFullCircleSlice ? angle : Math.max(0, angle - spacingAngle)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { computeSliceGeometry };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { normalizeCrosshairConfig } from './chunk-
|
|
2
|
-
import { resolveNavigatorConfig } from './chunk-
|
|
3
|
-
import { buildLegendItems, resolveLegendClickAction } from './chunk-
|
|
4
|
-
import { normalizePadding, calculateTitleLayout, calculateLegendArea, calculateChartArea } from './chunk-
|
|
5
|
-
import { generateChartTypeDescription, generateChartSummary } from './chunk-
|
|
6
|
-
import { DEFAULT_CHART_TITLE_PADDING, DEFAULT_LEGEND_PADDING, DEFAULT_CHART_CAPTION_PADDING } from './chunk-
|
|
7
|
-
import { EXPORT_MENU_CONSTANTS } from './chunk-
|
|
1
|
+
import { normalizeCrosshairConfig } from './chunk-O4BTKF5R.mjs';
|
|
2
|
+
import { resolveNavigatorConfig } from './chunk-7LZWQVTL.mjs';
|
|
3
|
+
import { buildLegendItems, resolveLegendClickAction } from './chunk-AC5EAWIP.mjs';
|
|
4
|
+
import { normalizePadding, calculateTitleLayout, calculateLegendArea, calculateChartArea } from './chunk-AJ24XDEK.mjs';
|
|
5
|
+
import { generateChartTypeDescription, generateChartSummary } from './chunk-IFJPDARC.mjs';
|
|
6
|
+
import { DEFAULT_CHART_TITLE_PADDING, DEFAULT_LEGEND_PADDING, DEFAULT_CHART_CAPTION_PADDING } from './chunk-6LUIVTNV.mjs';
|
|
7
|
+
import { EXPORT_MENU_CONSTANTS } from './chunk-RIAPS5AW.mjs';
|
|
8
8
|
|
|
9
9
|
// src/orchestrator/computeLayout.ts
|
|
10
10
|
function buildLayoutInputs(p) {
|
|
@@ -467,6 +467,9 @@ function processMouseMoveCore(x, y, ctx, lastHover, tooltipConfig) {
|
|
|
467
467
|
cursorFormattedValue: typeof extHit["cursorFormattedValue"] === "string" ? extHit["cursorFormattedValue"] : void 0,
|
|
468
468
|
xValue: extHit["xValue"],
|
|
469
469
|
yValue: extHit["yValue"],
|
|
470
|
+
independentIsCategory: typeof extHit["independentIsCategory"] === "boolean" ? extHit["independentIsCategory"] : void 0,
|
|
471
|
+
xAxisTitle: typeof extHit["xAxisTitle"] === "string" ? extHit["xAxisTitle"] : void 0,
|
|
472
|
+
yAxisTitle: typeof extHit["yAxisTitle"] === "string" ? extHit["yAxisTitle"] : void 0,
|
|
470
473
|
ohlc: extHit["ohlc"],
|
|
471
474
|
bubbleValue: typeof extHit["bubbleValue"] === "number" ? extHit["bubbleValue"] : void 0,
|
|
472
475
|
snapX: ctx.hasCrosshair ? cartHit?.snapX : void 0,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { hitTestCandlestick } from './chunk-
|
|
2
|
-
import { formatTimeLabel, formatHitValue, formatCursorValue } from './chunk-
|
|
1
|
+
import { hitTestCandlestick } from './chunk-HWT6UEYE.mjs';
|
|
2
|
+
import { formatTimeLabel, formatHitValue, formatCursorValue } from './chunk-HHBFQ6AI.mjs';
|
|
3
|
+
import { formatTooltipValue } from './chunk-56MASQS2.mjs';
|
|
3
4
|
|
|
4
5
|
// src/cartesian/hittest-wrappers/candlestick.ts
|
|
5
6
|
function candlestickHitTest(x, y, ctx) {
|
|
@@ -53,7 +54,7 @@ function candlestickFindAllNearest(x, y, ctx) {
|
|
|
53
54
|
const color = candle.bodyStroke;
|
|
54
55
|
const ohlc = { open: candle.open, high: candle.high, low: candle.low, close: candle.close };
|
|
55
56
|
const label = formatTimeLabel(candle.label, layoutData);
|
|
56
|
-
const formattedValue = props ? formatHitValue(candle.close, props, "vertical", layoutData) :
|
|
57
|
+
const formattedValue = props ? formatHitValue(candle.close, props, "vertical", layoutData) : formatTooltipValue(candle.close);
|
|
57
58
|
const cursorFormattedValue = props ? formatCursorValue(x, y, props, "vertical", layoutData) : formattedValue;
|
|
58
59
|
allSeries.push({
|
|
59
60
|
datasetId,
|