@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,9 +1,9 @@
|
|
|
1
|
-
import { MARKER_SHAPE_NAMES, renderMarkerShapeSvg } from './chunk-
|
|
2
|
-
import { formatPointDescription } from './chunk-
|
|
3
|
-
import { DEFAULT_HOVER_POINT_RADIUS_MULTIPLIER, DEFAULT_LINE_MARKER_SIZE } from './chunk-
|
|
4
|
-
import { createSvgGradientFromColor, makeItemContext, resolveDash, resolveAccessor, getPrimaryColor } from './chunk-
|
|
5
|
-
import { createSvgPathBuilder, traceClosedSpline } from './chunk-
|
|
6
|
-
import { createSvgGroup, setAttr, adjustBrightness, createSvgDefs, appendChild, prependChild, svgClass, createSvgPath, svgNode } from './chunk-
|
|
1
|
+
import { MARKER_SHAPE_NAMES, renderMarkerShapeSvg } from './chunk-QIYJUZ7I.mjs';
|
|
2
|
+
import { formatPointDescription } from './chunk-IFJPDARC.mjs';
|
|
3
|
+
import { DEFAULT_HOVER_POINT_RADIUS_MULTIPLIER, DEFAULT_LINE_MARKER_SIZE } from './chunk-6LUIVTNV.mjs';
|
|
4
|
+
import { createSvgGradientFromColor, makeItemContext, resolveDash, resolveAccessor, getPrimaryColor } from './chunk-BDCNBS6W.mjs';
|
|
5
|
+
import { createSvgPathBuilder, traceClosedSpline } from './chunk-PXUXZADY.mjs';
|
|
6
|
+
import { createSvgGroup, setAttr, adjustBrightness, createSvgDefs, appendChild, prependChild, svgClass, createSvgPath, svgNode } from './chunk-BF7RP4A3.mjs';
|
|
7
7
|
|
|
8
8
|
// src/series/radar/shared.ts
|
|
9
9
|
function buildSmoothPath(points) {
|
|
@@ -53,7 +53,7 @@ function renderRadarSeriesSvg(layout, seriesIndex, hoverState, theme, effectConf
|
|
|
53
53
|
const isStacked = sd.basePoints && sd.basePoints.length > 0;
|
|
54
54
|
const innerPathD = isStacked ? isSmooth ? buildSmoothPath([...sd.basePoints].reverse()) : buildPointsPathReversed(sd.basePoints) : "";
|
|
55
55
|
const fillPathD = isStacked ? `${outerPathD} ${innerPathD}` : outerPathD;
|
|
56
|
-
const colorClassN = `p-chart-color-${sd.
|
|
56
|
+
const colorClassN = `p-chart-color-${sd.colorIndex % 14}`;
|
|
57
57
|
const seriesIsHoveredJs = !isSharedHover && isSeriesHovered;
|
|
58
58
|
let fillColor = sd.color;
|
|
59
59
|
let strokeColor = sd.color;
|
|
@@ -81,7 +81,7 @@ function renderRadarSeriesSvg(layout, seriesIndex, hoverState, theme, effectConf
|
|
|
81
81
|
const dashPattern = sd.lineDash ?? (sd.lineStyle === "dashed" ? [6, 4] : sd.lineStyle === "dotted" ? [2, 3] : null);
|
|
82
82
|
if (dashPattern?.length) dashAttrs["stroke-dasharray"] = dashPattern.join(" ");
|
|
83
83
|
const fillAreaCls = svgClass("p-chart-area", `p-chart-series-${sd.seriesIdx}`, fillValue === void 0 && colorClassN, seriesIsHoveredJs && "p-chart-point-hover", anyHover && !isSeriesHovered && "p-chart-series-inactive");
|
|
84
|
-
const themedSeriesColor = theme.series[sd.
|
|
84
|
+
const themedSeriesColor = theme.series[sd.colorIndex % theme.series.length];
|
|
85
85
|
const areaEl = createSvgPath(fillPathD, {
|
|
86
86
|
fill: fillValue ?? themedSeriesColor,
|
|
87
87
|
"fill-opacity": sd.fillOpacity * seriesOpacity,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { buildSvgArcPath } from './chunk-
|
|
2
|
-
import { formatPointDescription } from './chunk-
|
|
3
|
-
import { createSvgGradientFromColor } from './chunk-
|
|
4
|
-
import { createSvgGroup, createSvgDefs, appendChild, prependChild, setAttr, adjustBrightness, svgClass, createSvgPath } from './chunk-
|
|
1
|
+
import { buildSvgArcPath } from './chunk-4S3FOFCN.mjs';
|
|
2
|
+
import { formatPointDescription } from './chunk-IFJPDARC.mjs';
|
|
3
|
+
import { createSvgGradientFromColor } from './chunk-BDCNBS6W.mjs';
|
|
4
|
+
import { createSvgGroup, createSvgDefs, appendChild, prependChild, setAttr, adjustBrightness, svgClass, createSvgPath } from './chunk-BF7RP4A3.mjs';
|
|
5
5
|
|
|
6
6
|
// src/series/polar/svg/index.ts
|
|
7
7
|
function renderPolarBarsSvg(layout, hoverState, effectConfig, theme, a11y) {
|
|
@@ -49,9 +49,9 @@ function renderPolarBarsSvg(layout, hoverState, effectConfig, theme, a11y) {
|
|
|
49
49
|
},
|
|
50
50
|
false
|
|
51
51
|
);
|
|
52
|
-
const barCls = svgClass("p-chart-arc", `p-chart-series-${bar.seriesIdx}`, fillColor === void 0 && `p-chart-color-${bar.
|
|
52
|
+
const barCls = svgClass("p-chart-arc", `p-chart-series-${bar.seriesIdx}`, fillColor === void 0 && `p-chart-color-${bar.colorIndex % 14}`, isHovered && "p-chart-point-hover", isInactive && "p-chart-point-inactive");
|
|
53
53
|
const attrs = {
|
|
54
|
-
fill: fillColor ?? theme.series[bar.
|
|
54
|
+
fill: fillColor ?? theme.series[bar.colorIndex % theme.series.length],
|
|
55
55
|
stroke: (isHovered ? bar.hoverBorderColor : void 0) ?? bar.borderColor ?? "none",
|
|
56
56
|
"stroke-width": bar.borderStrokeWidth ?? 0,
|
|
57
57
|
class: barCls
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { lineHitTest, lineFindAllNearest, computeStackBases } from './chunk-
|
|
2
|
-
import { buildLinePath, buildStackedFillPath, buildFillPath, hitTestLine, calculateLineLayout, applyTipExtension, restoreTipExtension, buildRangeFillPath, buildDualRangeFillPaths } from './chunk-
|
|
3
|
-
import { collectLineMarkerOverlays } from './chunk-
|
|
4
|
-
import { registerDatasetLayers, triggerCompositorRepaint } from './chunk-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { AnimatedScene, resolveAnimatedProps, LINE_ANIMATABLE_PROPS } from './chunk-
|
|
8
|
-
import { reconcileSvgChildren } from './chunk-
|
|
9
|
-
import { parseAnimationConfig } from './chunk-
|
|
10
|
-
import { cancelRaf, raf } from './chunk-
|
|
11
|
-
import { buildAccessibilityRenderContext, generateSeriesDescription } from './chunk-
|
|
12
|
-
import { collectItems } from './chunk-
|
|
13
|
-
import { DEFAULT_HOVER_DIM_OPACITY, DEFAULT_HOVER_BRIGHTNESS, DEFAULT_FALLBACK_COLOR } from './chunk-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { createSvgDefs, appendChild, createSvgPath, setAttr, createSvgGroup, materializeSvgNode } from './chunk-
|
|
1
|
+
import { lineHitTest, lineFindAllNearest, computeStackBases } from './chunk-RKNL7UWZ.mjs';
|
|
2
|
+
import { buildLinePath, buildStackedFillPath, buildFillPath, hitTestLine, calculateLineLayout, applyTipExtension, restoreTipExtension, buildRangeFillPath, buildDualRangeFillPaths } from './chunk-7I2SNJ2X.mjs';
|
|
3
|
+
import { collectLineMarkerOverlays } from './chunk-UZWWYKL7.mjs';
|
|
4
|
+
import { registerDatasetLayers, triggerCompositorRepaint } from './chunk-MT3OLVZC.mjs';
|
|
5
|
+
import { renderResolvedLabels } from './chunk-G3DYNMWT.mjs';
|
|
6
|
+
import { resolvePointLabels } from './chunk-7IKKWWRT.mjs';
|
|
7
|
+
import { AnimatedScene, resolveAnimatedProps, LINE_ANIMATABLE_PROPS } from './chunk-JS47MSB2.mjs';
|
|
8
|
+
import { reconcileSvgChildren } from './chunk-FWNWV3H7.mjs';
|
|
9
|
+
import { parseAnimationConfig } from './chunk-LTQH3LQJ.mjs';
|
|
10
|
+
import { cancelRaf, raf } from './chunk-5WFF272M.mjs';
|
|
11
|
+
import { buildAccessibilityRenderContext, generateSeriesDescription } from './chunk-IFJPDARC.mjs';
|
|
12
|
+
import { collectItems } from './chunk-FRVJH7ZG.mjs';
|
|
13
|
+
import { DEFAULT_HOVER_DIM_OPACITY, DEFAULT_HOVER_BRIGHTNESS, DEFAULT_FALLBACK_COLOR } from './chunk-6LUIVTNV.mjs';
|
|
14
|
+
import { buildColorIndexMap, getDefaultColor, isGradientColor, createCanvasGradientFromColor, createSvgGradientFromColor } from './chunk-BDCNBS6W.mjs';
|
|
15
|
+
import { streamingPointsInterpolator, buildLineFingerprint, detectStreamingUpdateKind } from './chunk-EQLCJTM4.mjs';
|
|
16
|
+
import { createSvgDefs, appendChild, createSvgPath, setAttr, createSvgGroup, materializeSvgNode } from './chunk-BF7RP4A3.mjs';
|
|
17
17
|
|
|
18
18
|
// src/series/line/controller/helpers.ts
|
|
19
19
|
function resolveLineAnimationPlan(layouts, animConfig, isInitial, lastFingerprint, sceneElementCount) {
|
|
@@ -21,7 +21,7 @@ function resolveLineAnimationPlan(layouts, animConfig, isInitial, lastFingerprin
|
|
|
21
21
|
const { enabled: animEnabled, duration, easing } = parseAnimationConfig(animConfig);
|
|
22
22
|
const limit = animConfig?.limit ?? 5e3;
|
|
23
23
|
const fingerprint = buildLineFingerprint(layouts);
|
|
24
|
-
const phase = isInitial ? "entrance" :
|
|
24
|
+
const phase = isInitial ? "entrance" : fingerprint !== lastFingerprint ? "update" : "static";
|
|
25
25
|
let totalPoints = 0;
|
|
26
26
|
for (const [, layout] of layouts) {
|
|
27
27
|
totalPoints += layout.points.length;
|
|
@@ -211,7 +211,7 @@ function renderLinesFrame(params) {
|
|
|
211
211
|
if (datasetVisibility?.get(lineLayout.datasetId) === false) continue;
|
|
212
212
|
const props = renderPropsMap.get(lineLayout.datasetId);
|
|
213
213
|
if (!props) continue;
|
|
214
|
-
const seriesColor = typeof lineLayout.lineColor === "string" ? lineLayout.lineColor : getDefaultColor(lineLayout.
|
|
214
|
+
const seriesColor = typeof lineLayout.lineColor === "string" ? lineLayout.lineColor : getDefaultColor(lineLayout.colorIndex, context.theme);
|
|
215
215
|
const total = lineLayout.visiblePoints.reduce((sum, pt) => sum + (pt.value ?? 0), 0);
|
|
216
216
|
const labels = resolvePointLabels(lineLayout.visiblePoints, seriesColor, total, labelConfig, props.name, props.data);
|
|
217
217
|
renderResolvedLabels(labels, labelConfig, { renderer: "canvas", ctx, theme: context.theme });
|
|
@@ -254,8 +254,8 @@ function buildLineSvgChildren(params) {
|
|
|
254
254
|
} else {
|
|
255
255
|
const result = buildDualRangeFillPaths(layoutA.visiblePoints, layoutB.visiblePoints, curve, tension);
|
|
256
256
|
if (result) {
|
|
257
|
-
const colorA = typeof layoutA.lineColor === "string" ? layoutA.lineColor : getDefaultColor(layoutA.
|
|
258
|
-
const colorB = typeof layoutB.lineColor === "string" ? layoutB.lineColor : getDefaultColor(layoutB.
|
|
257
|
+
const colorA = typeof layoutA.lineColor === "string" ? layoutA.lineColor : getDefaultColor(layoutA.colorIndex, theme);
|
|
258
|
+
const colorB = typeof layoutB.lineColor === "string" ? layoutB.lineColor : getDefaultColor(layoutB.colorIndex, theme);
|
|
259
259
|
const opacity = rg.fillOpacity * dimOpacity;
|
|
260
260
|
for (const d of result.abovePaths) children.push(createSvgPath(d, { fill: colorA, opacity }));
|
|
261
261
|
for (const d of result.belowPaths) children.push(createSvgPath(d, { fill: colorB, opacity }));
|
|
@@ -291,7 +291,7 @@ function buildLineSvgChildren(params) {
|
|
|
291
291
|
const labelGroup = createSvgGroup();
|
|
292
292
|
for (const [, lineLayout] of layouts) {
|
|
293
293
|
if (datasetVisibility?.get(lineLayout.datasetId) === false) continue;
|
|
294
|
-
const seriesColor = typeof lineLayout.lineColor === "string" ? lineLayout.lineColor : getDefaultColor(lineLayout.
|
|
294
|
+
const seriesColor = typeof lineLayout.lineColor === "string" ? lineLayout.lineColor : getDefaultColor(lineLayout.colorIndex, context.theme);
|
|
295
295
|
const total = lineLayout.visiblePoints.reduce((sum, pt) => sum + (pt.value ?? 0), 0);
|
|
296
296
|
const labels = resolvePointLabels(lineLayout.visiblePoints, seriesColor, total, labelConfig, renderPropsMap.get(lineLayout.datasetId)?.name, renderPropsMap.get(lineLayout.datasetId)?.data);
|
|
297
297
|
renderResolvedLabels(labels, labelConfig, { renderer: "svg", svgGroup: labelGroup, theme: context.theme });
|
|
@@ -334,8 +334,8 @@ function renderRangeFillsCanvas(ctx, rangeGroups, layouts, renderPropsMap, chart
|
|
|
334
334
|
} else {
|
|
335
335
|
const result = buildDualRangeFillPaths(layoutA.visiblePoints, layoutB.visiblePoints, curve, tension);
|
|
336
336
|
if (!result) continue;
|
|
337
|
-
const colorA = typeof layoutA.lineColor === "string" ? layoutA.lineColor : getDefaultColor(layoutA.
|
|
338
|
-
const colorB = typeof layoutB.lineColor === "string" ? layoutB.lineColor : getDefaultColor(layoutB.
|
|
337
|
+
const colorA = typeof layoutA.lineColor === "string" ? layoutA.lineColor : getDefaultColor(layoutA.colorIndex, theme);
|
|
338
|
+
const colorB = typeof layoutB.lineColor === "string" ? layoutB.lineColor : getDefaultColor(layoutB.colorIndex, theme);
|
|
339
339
|
const opacity = rg.fillOpacity * dimOpacity;
|
|
340
340
|
for (const d of result.abovePaths) fillPathCanvas(ctx, d, colorA, opacity);
|
|
341
341
|
for (const d of result.belowPaths) fillPathCanvas(ctx, d, colorB, opacity);
|
|
@@ -419,7 +419,7 @@ function paintCanvasLayer(ctx, canvasCtx, dsId, rangeFirstDs, context) {
|
|
|
419
419
|
const renderProps = props.renderMarker ? { ...props, showMarkers: false, interaction: { ...props.interaction, hoveredIndex: null } } : props;
|
|
420
420
|
ctx._paint.renderCanvas(renderProps, layout, canvasCtx, context);
|
|
421
421
|
if (input.labelConfig && input.datasetVisibility?.get(dsId) !== false) {
|
|
422
|
-
const seriesColor = typeof layout.lineColor === "string" ? layout.lineColor : getDefaultColor(layout.
|
|
422
|
+
const seriesColor = typeof layout.lineColor === "string" ? layout.lineColor : getDefaultColor(layout.colorIndex, input.theme);
|
|
423
423
|
const total = layout.visiblePoints.reduce((sum, pt) => sum + (pt.value ?? 0), 0);
|
|
424
424
|
const labels = resolvePointLabels(layout.visiblePoints, seriesColor, total, input.labelConfig, props.name, props.data);
|
|
425
425
|
renderResolvedLabels(labels, input.labelConfig, { renderer: "canvas", ctx: canvasCtx, theme: input.theme });
|
|
@@ -492,11 +492,15 @@ function startSceneUpdateLoop(ctx, easing) {
|
|
|
492
492
|
}
|
|
493
493
|
function buildSceneTargets(ctx, visibleDatasets, renderPropsMap, input, explicitMode) {
|
|
494
494
|
const targets = /* @__PURE__ */ new Map();
|
|
495
|
+
const colorIndexById = buildColorIndexMap(input.datasets);
|
|
495
496
|
let anyTip = false;
|
|
496
497
|
for (const ds of visibleDatasets) {
|
|
497
498
|
const newValues = input.lineTransformedValues?.get(ds.id) ?? [];
|
|
498
499
|
const axisId = ds.props[input.axisIdProp] ?? input.firstValueAxisId;
|
|
500
|
+
const valueScale = input.valueScales?.get(axisId) ?? input.valueXScales?.get(axisId);
|
|
501
|
+
const enterBaseline = valueScale ? valueScale.domain()[0] : 0;
|
|
499
502
|
const stackOrder = input.datasets.get(ds.id)?.order ?? 0;
|
|
503
|
+
const colorIndex = colorIndexById.get(ds.id) ?? 0;
|
|
500
504
|
const props = ds.props;
|
|
501
505
|
const renderProps = renderPropsMap.get(ds.id) ?? props;
|
|
502
506
|
let hint;
|
|
@@ -511,7 +515,9 @@ function buildSceneTargets(ctx, visibleDatasets, renderPropsMap, input, explicit
|
|
|
511
515
|
geometry: { values: newValues, streamingHint: hint },
|
|
512
516
|
datasetId: ds.id,
|
|
513
517
|
axisId,
|
|
518
|
+
enterBaseline,
|
|
514
519
|
stackOrder,
|
|
520
|
+
colorIndex,
|
|
515
521
|
props,
|
|
516
522
|
renderProps,
|
|
517
523
|
isExiting: false
|
|
@@ -523,11 +529,10 @@ function renderSceneFrame(ctx) {
|
|
|
523
529
|
const layouts = /* @__PURE__ */ new Map();
|
|
524
530
|
if (!ctx.lastInput) return layouts;
|
|
525
531
|
const input = ctx.lastInput;
|
|
526
|
-
if (!input.categoryScale || !input.valueScales || input.valueScales.size === 0) return layouts;
|
|
527
|
-
|
|
528
|
-
if (elements.length === 0) return layouts;
|
|
532
|
+
if (!input.categoryScale && (!input.valueXScales || input.valueXScales.size === 0) || !input.valueScales || input.valueScales.size === 0) return layouts;
|
|
533
|
+
if (ctx._scene.elementCount === 0) return layouts;
|
|
529
534
|
const sharedValueScale = input.valueScales.values().next().value;
|
|
530
|
-
const orderedElements =
|
|
535
|
+
const orderedElements = Array.from(ctx._scene.elementValues()).sort((a, b) => a.current.stackOrder - b.current.stackOrder);
|
|
531
536
|
let categoryCount = 0;
|
|
532
537
|
for (const el of orderedElements) {
|
|
533
538
|
categoryCount = Math.max(categoryCount, el.current.geometry.values.length);
|
|
@@ -546,21 +551,24 @@ function renderSceneFrame(ctx) {
|
|
|
546
551
|
const groupedData = input.groupedDataOverride?.get(state.datasetId);
|
|
547
552
|
const propsForLayout = groupedData ? { ...state.props, data: groupedData } : state.props;
|
|
548
553
|
const isStacked = state.props.stackId !== void 0;
|
|
554
|
+
const valueXScale = input.valueXScales?.get(state.props.xAxisId ?? "") ?? (input.valueXScales?.size === 1 ? input.valueXScales.values().next().value : void 0);
|
|
549
555
|
const baseLayout = calculateLineLayout(propsForLayout, input.chartArea, {
|
|
550
556
|
categoryScale: input.categoryScale,
|
|
557
|
+
valueXScale,
|
|
551
558
|
valueScale: targetValueScale,
|
|
552
559
|
stackBases: isStacked ? stackBasesMap.get(state.datasetId) : void 0,
|
|
553
560
|
transformedValues: state.geometry.values,
|
|
554
|
-
seriesId: state.datasetId
|
|
561
|
+
seriesId: state.datasetId,
|
|
562
|
+
orientation: input.orientation
|
|
555
563
|
});
|
|
556
|
-
layouts.set(state.datasetId, { ...baseLayout, datasetIndex: datasetIndex
|
|
564
|
+
layouts.set(state.datasetId, { ...baseLayout, datasetIndex: datasetIndex++, colorIndex: state.colorIndex });
|
|
557
565
|
}
|
|
558
566
|
return layouts;
|
|
559
567
|
}
|
|
560
568
|
function updateRenderState(ctx) {
|
|
561
569
|
const layouts = renderSceneFrame(ctx);
|
|
562
570
|
const activeRenderProps = /* @__PURE__ */ new Map();
|
|
563
|
-
for (const el of ctx._scene.
|
|
571
|
+
for (const el of ctx._scene.elementValues()) {
|
|
564
572
|
const baseProps = el.current.renderProps;
|
|
565
573
|
const overrides = ctx._propertyOverrides.get(el.current.datasetId);
|
|
566
574
|
const merged = overrides ? { ...baseProps, ...overrides } : baseProps;
|
|
@@ -689,18 +697,19 @@ var LineRendererController = class {
|
|
|
689
697
|
this.onFrame = null;
|
|
690
698
|
this._paint = paint;
|
|
691
699
|
this._scene = new AnimatedScene({
|
|
692
|
-
// ENTER: lines enter from
|
|
693
|
-
//
|
|
694
|
-
//
|
|
700
|
+
// ENTER: lines enter from the value-axis floor (`enterBaseline` = domain min)
|
|
701
|
+
// at the same x positions, so they slide up off the axis edge rather than
|
|
702
|
+
// emanating from the data-value-0 gridline (which sits mid-plot when the
|
|
703
|
+
// domain dips below zero).
|
|
695
704
|
emptyState: (target) => ({
|
|
696
705
|
...target,
|
|
697
|
-
geometry: { values: target.geometry.values.map(() =>
|
|
706
|
+
geometry: { values: target.geometry.values.map(() => target.enterBaseline), streamingHint: "update" },
|
|
698
707
|
isExiting: false
|
|
699
708
|
}),
|
|
700
|
-
// EXIT: shrink to
|
|
709
|
+
// EXIT: shrink to the same value-axis floor at current x positions.
|
|
701
710
|
exitEmptyState: (target) => ({
|
|
702
711
|
...target,
|
|
703
|
-
geometry: { values: target.geometry.values.map(() =>
|
|
712
|
+
geometry: { values: target.geometry.values.map(() => target.enterBaseline), streamingHint: "update" },
|
|
704
713
|
isExiting: true
|
|
705
714
|
}),
|
|
706
715
|
registry: LINE_REGISTRY
|
|
@@ -718,7 +727,7 @@ var LineRendererController = class {
|
|
|
718
727
|
const sortedDatasets = Array.from(datasets.entries()).sort(([, a], [, b]) => a.order - b.order);
|
|
719
728
|
this.lineDatasets = collectItems(sortedDatasets, datasetVisibility).line;
|
|
720
729
|
let layoutResult = input.layoutResult ?? this.computeLayout(input);
|
|
721
|
-
if (!layoutResult && this._scene.
|
|
730
|
+
if (!layoutResult && this._scene.elementCount > 0 && input.categoryScale && input.valueScales && input.valueScales.size > 0) {
|
|
722
731
|
layoutResult = { layouts: /* @__PURE__ */ new Map(), renderPropsMap: /* @__PURE__ */ new Map(), visibleDatasets: [] };
|
|
723
732
|
}
|
|
724
733
|
if (!layoutResult) {
|
|
@@ -732,6 +741,7 @@ var LineRendererController = class {
|
|
|
732
741
|
this._lastFingerprint = "";
|
|
733
742
|
this.tipProgress = 1;
|
|
734
743
|
this.tipDuration = 0;
|
|
744
|
+
compositor?.removeLayersByPrefix("line:");
|
|
735
745
|
if (input.renderer === "svg" && this.svgGroup) {
|
|
736
746
|
while (this.svgGroup.firstChild) this.svgGroup.removeChild(this.svgGroup.firstChild);
|
|
737
747
|
}
|
|
@@ -751,7 +761,7 @@ var LineRendererController = class {
|
|
|
751
761
|
accessibility: buildAccessibilityRenderContext(features)
|
|
752
762
|
};
|
|
753
763
|
const animConfig = features.get("animation")?.props;
|
|
754
|
-
const { fingerprint, updateMode, phase, shouldAnimate, duration, easing } = resolveLineAnimationPlan(layouts, animConfig, this._isInitial, this._lastFingerprint, this._scene.
|
|
764
|
+
const { fingerprint, updateMode, phase, shouldAnimate, duration, easing } = resolveLineAnimationPlan(layouts, animConfig, this._isInitial, this._lastFingerprint, this._scene.elementCount);
|
|
755
765
|
const { targets: sceneTargets, anyTip } = buildSceneTargets(this, visibleDatasets, renderPropsMap, input, updateMode);
|
|
756
766
|
if (input.renderer === "canvas" && compositor) {
|
|
757
767
|
compositor.removeLayersByPrefix?.("line:");
|
|
@@ -888,6 +898,15 @@ var LineRendererController = class {
|
|
|
888
898
|
get layouts() {
|
|
889
899
|
return this.layoutCache;
|
|
890
900
|
}
|
|
901
|
+
/**
|
|
902
|
+
* Live animated point layouts — the geometry of the current rAF frame, falling back to
|
|
903
|
+
* the settled target layout when no frame has rendered yet. Per-frame consumers (e.g.
|
|
904
|
+
* custom SVG data-label VNodes) read this so their positions track the entrance/transition
|
|
905
|
+
* animation instead of snapping to the final layout, matching the canvas label path.
|
|
906
|
+
*/
|
|
907
|
+
get renderedLayouts() {
|
|
908
|
+
return this.lastRenderedLayouts ?? this.layoutCache;
|
|
909
|
+
}
|
|
891
910
|
get renderProps() {
|
|
892
911
|
return this.renderPropsCache;
|
|
893
912
|
}
|
|
@@ -977,27 +996,31 @@ var LineRendererController = class {
|
|
|
977
996
|
startSceneUpdateLoop(this, easing);
|
|
978
997
|
}
|
|
979
998
|
computeLayout(input) {
|
|
980
|
-
const { categoryScale, valueScales, chartArea, axisIdProp, firstValueAxisId, lineStackBasesMap, lineTransformedValues, groupedDataOverride, hoverConfig } = input;
|
|
981
|
-
if (this.lineDatasets.length === 0 || !categoryScale || !valueScales || valueScales.size === 0) return null;
|
|
999
|
+
const { categoryScale, valueXScales, valueScales, chartArea, axisIdProp, firstValueAxisId, lineStackBasesMap, lineTransformedValues, groupedDataOverride, hoverConfig } = input;
|
|
1000
|
+
if (this.lineDatasets.length === 0 || !categoryScale && (!valueXScales || valueXScales.size === 0) || !valueScales || valueScales.size === 0) return null;
|
|
982
1001
|
const visibleDatasets = this.lineDatasets.filter((d) => d.visible);
|
|
983
1002
|
if (visibleDatasets.length === 0) return null;
|
|
984
1003
|
const layouts = /* @__PURE__ */ new Map();
|
|
985
1004
|
const renderPropsMap = /* @__PURE__ */ new Map();
|
|
986
1005
|
const sharedValueScale = valueScales.values().next().value;
|
|
1006
|
+
const colorIndexById = buildColorIndexMap(input.datasets);
|
|
987
1007
|
let datasetIndex = 0;
|
|
988
1008
|
for (const ld of visibleDatasets) {
|
|
989
1009
|
const targetAxisId = ld.props[axisIdProp] ?? firstValueAxisId;
|
|
990
1010
|
const targetValueScale = valueScales.get(targetAxisId) ?? sharedValueScale;
|
|
991
1011
|
const groupedData = groupedDataOverride?.get(ld.id);
|
|
992
1012
|
const propsForLayout = groupedData ? { ...ld.props, data: groupedData } : ld.props;
|
|
1013
|
+
const valueXScale = valueXScales?.get(ld.props.xAxisId ?? "") ?? (valueXScales?.size === 1 ? valueXScales.values().next().value : void 0);
|
|
993
1014
|
const baseLayout = calculateLineLayout(propsForLayout, chartArea, {
|
|
994
1015
|
categoryScale,
|
|
1016
|
+
valueXScale,
|
|
995
1017
|
valueScale: targetValueScale,
|
|
996
1018
|
stackBases: lineStackBasesMap?.get(ld.id),
|
|
997
1019
|
transformedValues: lineTransformedValues?.get(ld.id),
|
|
998
|
-
seriesId: ld.id
|
|
1020
|
+
seriesId: ld.id,
|
|
1021
|
+
orientation: input.orientation
|
|
999
1022
|
});
|
|
1000
|
-
layouts.set(ld.id, { ...baseLayout, datasetIndex: datasetIndex
|
|
1023
|
+
layouts.set(ld.id, { ...baseLayout, datasetIndex: datasetIndex++, colorIndex: colorIndexById.get(ld.id) ?? 0 });
|
|
1001
1024
|
const seriesHoverProps = ld.props;
|
|
1002
1025
|
renderPropsMap.set(ld.id, {
|
|
1003
1026
|
...ld.props,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { calculateAxisLayout } from './chunk-
|
|
2
|
-
import { getEasing, easeOutQuart } from './chunk-
|
|
3
|
-
import { raf, cancelRaf } from './chunk-
|
|
4
|
-
import { interpolateCartesianAxisLayout } from './chunk-
|
|
5
|
-
import { createLinearScale, createOrdinalTimeScale, createOrdinalTimeBandAdapter, createTimeScale, createTimeBandAdapter } from './chunk-
|
|
1
|
+
import { calculateAxisLayout } from './chunk-AETETRB4.mjs';
|
|
2
|
+
import { getEasing, easeOutQuart } from './chunk-LTQH3LQJ.mjs';
|
|
3
|
+
import { raf, cancelRaf } from './chunk-5WFF272M.mjs';
|
|
4
|
+
import { interpolateCartesianAxisLayout } from './chunk-CKQ4DNNJ.mjs';
|
|
5
|
+
import { createLinearScale, createOrdinalTimeScale, createOrdinalTimeBandAdapter, createTimeScale, createTimeBandAdapter } from './chunk-K7AGQTVK.mjs';
|
|
6
6
|
|
|
7
7
|
// src/animations/axis-transition.ts
|
|
8
8
|
var AXIS_SMOOTHING = 0.225;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { isPointInSlice } from './chunk-
|
|
2
|
-
import { MARKER_SHAPE_NAMES, renderMarkerShapeSvg, drawMarkerCanvas } from './chunk-
|
|
3
|
-
import { calculateRadiusAndCenter } from './chunk-
|
|
4
|
-
import { formatPointDescription } from './chunk-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { isPointInSlice } from './chunk-4S3FOFCN.mjs';
|
|
2
|
+
import { MARKER_SHAPE_NAMES, renderMarkerShapeSvg, drawMarkerCanvas } from './chunk-QIYJUZ7I.mjs';
|
|
3
|
+
import { calculateRadiusAndCenter } from './chunk-AJ24XDEK.mjs';
|
|
4
|
+
import { formatPointDescription } from './chunk-IFJPDARC.mjs';
|
|
5
|
+
import { resolveRadialAccessors } from './chunk-6MAO6I3E.mjs';
|
|
6
|
+
import { measureText } from './chunk-56MASQS2.mjs';
|
|
7
|
+
import { DEFAULT_RADIAL_LABEL_FONT_SIZE, DEFAULT_GRID_LEVELS, resolveFontSize, resolveFontFamily, DEFAULT_RADAR_FILL_OPACITY, DEFAULT_LINE_WIDTH, DEFAULT_HOVER_POINT_RADIUS_MULTIPLIER, DEFAULT_POLAR_GAP_PX, DEFAULT_RADAR_HIT_RADIUS, DEFAULT_LINE_MARKER_SIZE } from './chunk-6LUIVTNV.mjs';
|
|
8
|
+
import { buildColorIndexMap, isGradientColor, batchResolveAccessor, FIELD_DEFAULTS, createSvgGradientFromColor, makeItemContext, resolveDash, resolveAccessor, getDefaultColor, createCanvasGradientFromColor, sampleGradientAt, resolveSwatchColor, getPrimaryColor, batchResolveRequired } from './chunk-BDCNBS6W.mjs';
|
|
9
|
+
import { createCanvasPathBuilder, traceClosedSpline, createSvgPathBuilder } from './chunk-PXUXZADY.mjs';
|
|
10
|
+
import { createSvgGroup, setAttr, adjustBrightness, createSvgDefs, appendChild, prependChild, svgClass, createSvgPath, svgNode, withCanvasState } from './chunk-BF7RP4A3.mjs';
|
|
11
|
+
import { calculateNiceDomain, generateNiceTicks, toRad } from './chunk-K7AGQTVK.mjs';
|
|
11
12
|
|
|
12
13
|
// src/renderers/radar.layout.ts
|
|
13
|
-
function calculateRadarLayout(datasets, chartArea, globalFont, sharedCategories, sharedDomain, perAxisDomains, referenceBoundaryValues, perSpokeDomains, tickCount) {
|
|
14
|
+
function calculateRadarLayout(datasets, chartArea, globalFont, sharedCategories, sharedDomain, perAxisDomains, referenceBoundaryValues, perSpokeDomains, tickCount, showCategoryLabels = true) {
|
|
14
15
|
const categories = sharedCategories ?? extractCategories(datasets);
|
|
15
16
|
const categoryCount = categories.length;
|
|
16
17
|
const angleStep = categoryCount > 0 ? 360 / categoryCount : 0;
|
|
@@ -55,7 +56,7 @@ function calculateRadarLayout(datasets, chartArea, globalFont, sharedCategories,
|
|
|
55
56
|
const resolvedLabelFontSize = resolveFontSize(DEFAULT_RADIAL_LABEL_FONT_SIZE, globalFont);
|
|
56
57
|
const resolvedFontFamily = resolveFontFamily(void 0, globalFont);
|
|
57
58
|
const labelPadding = measureText("Xg", resolvedLabelFontSize).height;
|
|
58
|
-
const labelMargins = calculateLabelMargins(categories, angleStep, labelPadding, resolvedLabelFontSize);
|
|
59
|
+
const labelMargins = showCategoryLabels ? calculateLabelMargins(categories, angleStep, labelPadding, resolvedLabelFontSize) : { top: 0, right: 0, bottom: 0, left: 0 };
|
|
59
60
|
const adjustedArea = {
|
|
60
61
|
x: chartArea.x + labelMargins.left,
|
|
61
62
|
y: chartArea.y + labelMargins.top,
|
|
@@ -84,6 +85,7 @@ function calculateRadarLayout(datasets, chartArea, globalFont, sharedCategories,
|
|
|
84
85
|
}
|
|
85
86
|
const series = [];
|
|
86
87
|
const stackRunning = /* @__PURE__ */ new Map();
|
|
88
|
+
const colorIndexById = buildColorIndexMap(new Map(datasets.map((d) => [d.id, d])));
|
|
87
89
|
for (let si = 0; si < datasets.length; si++) {
|
|
88
90
|
const ds = datasets[si];
|
|
89
91
|
const gradientColor = ds.props.color && isGradientColor(ds.props.color) ? ds.props.color : void 0;
|
|
@@ -144,6 +146,7 @@ function calculateRadarLayout(datasets, chartArea, globalFont, sharedCategories,
|
|
|
144
146
|
basePoints: isStacked ? basePoints : void 0,
|
|
145
147
|
color,
|
|
146
148
|
seriesIdx: si,
|
|
149
|
+
colorIndex: colorIndexById.get(ds.id) ?? si,
|
|
147
150
|
gradientColor,
|
|
148
151
|
fillOpacity,
|
|
149
152
|
lineStrokeWidth: lineWidth,
|
|
@@ -176,7 +179,7 @@ function extractCategories(datasets) {
|
|
|
176
179
|
for (const ds of datasets) {
|
|
177
180
|
const props = ds.props;
|
|
178
181
|
if (!props.data) continue;
|
|
179
|
-
const cats = batchResolveAccessor(props.
|
|
182
|
+
const cats = batchResolveAccessor(resolveRadialAccessors(props).angularField ?? FIELD_DEFAULTS.categoryField, props.data);
|
|
180
183
|
for (const cat of cats) {
|
|
181
184
|
const str = String(cat);
|
|
182
185
|
if (!seen.has(str)) {
|
|
@@ -189,7 +192,7 @@ function extractCategories(datasets) {
|
|
|
189
192
|
}
|
|
190
193
|
function resolveValues(props) {
|
|
191
194
|
if (!props.data) return [];
|
|
192
|
-
return batchResolveAccessor(props.
|
|
195
|
+
return batchResolveAccessor(resolveRadialAccessors(props).radialField ?? FIELD_DEFAULTS.valueField, props.data).map((v) => Number(v) || 0);
|
|
193
196
|
}
|
|
194
197
|
function computeRadialComboContext(radarDatasets, polarDatasets) {
|
|
195
198
|
const allEntries = [...radarDatasets, ...polarDatasets];
|
|
@@ -294,7 +297,7 @@ function renderRadarSeriesSvg(layout, seriesIndex, hoverState, theme, effectConf
|
|
|
294
297
|
const isStacked = sd.basePoints && sd.basePoints.length > 0;
|
|
295
298
|
const innerPathD = isStacked ? isSmooth ? buildSmoothPath([...sd.basePoints].reverse()) : buildPointsPathReversed(sd.basePoints) : "";
|
|
296
299
|
const fillPathD = isStacked ? `${outerPathD} ${innerPathD}` : outerPathD;
|
|
297
|
-
const colorClassN = `p-chart-color-${sd.
|
|
300
|
+
const colorClassN = `p-chart-color-${sd.colorIndex % 14}`;
|
|
298
301
|
const seriesIsHoveredJs = !isSharedHover && isSeriesHovered;
|
|
299
302
|
let fillColor = sd.color;
|
|
300
303
|
let strokeColor = sd.color;
|
|
@@ -322,7 +325,7 @@ function renderRadarSeriesSvg(layout, seriesIndex, hoverState, theme, effectConf
|
|
|
322
325
|
const dashPattern = sd.lineDash ?? (sd.lineStyle === "dashed" ? [6, 4] : sd.lineStyle === "dotted" ? [2, 3] : null);
|
|
323
326
|
if (dashPattern?.length) dashAttrs["stroke-dasharray"] = dashPattern.join(" ");
|
|
324
327
|
const fillAreaCls = svgClass("p-chart-area", `p-chart-series-${sd.seriesIdx}`, fillValue === void 0 && colorClassN, seriesIsHoveredJs && "p-chart-point-hover", anyHover && !isSeriesHovered && "p-chart-series-inactive");
|
|
325
|
-
const themedSeriesColor = theme.series[sd.
|
|
328
|
+
const themedSeriesColor = theme.series[sd.colorIndex % theme.series.length];
|
|
326
329
|
appendChild(
|
|
327
330
|
group,
|
|
328
331
|
createSvgPath(fillPathD, {
|
|
@@ -473,7 +476,7 @@ function renderRadarSeriesCanvas(ctx, layout, seriesIndex, hoverState, effectCon
|
|
|
473
476
|
if (anyHover && !isSharedHover && !isSeriesHovered && effectConfig?.dimOpacity !== void 0) {
|
|
474
477
|
seriesOpacity = effectConfig.dimOpacity;
|
|
475
478
|
}
|
|
476
|
-
const baseColor = sd.color ?? getDefaultColor(sd.
|
|
479
|
+
const baseColor = sd.color ?? getDefaultColor(sd.colorIndex, theme);
|
|
477
480
|
let fillColor = baseColor;
|
|
478
481
|
let strokeColor = baseColor;
|
|
479
482
|
if (!isSharedHover && isSeriesHovered && effectConfig?.hoverBrightness) {
|
|
@@ -644,9 +647,9 @@ function hitTestRadar(x, y, layout, theme) {
|
|
|
644
647
|
index: pi,
|
|
645
648
|
label: layout.categories[pi] ?? "",
|
|
646
649
|
value: pt.value,
|
|
647
|
-
color: sd.color ?? (sd.gradientColor ? getPrimaryColor(sd.gradientColor) : getDefaultColor(sd.
|
|
650
|
+
color: sd.color ?? (sd.gradientColor ? getPrimaryColor(sd.gradientColor) : getDefaultColor(sd.colorIndex, theme)),
|
|
648
651
|
colorGradient: sd.gradientColor,
|
|
649
|
-
swatchColor: resolveSwatchColor({ color: sd.color ?? sd.gradientColor }, sd.
|
|
652
|
+
swatchColor: resolveSwatchColor({ color: sd.color ?? sd.gradientColor }, sd.colorIndex, void 0, theme)
|
|
650
653
|
};
|
|
651
654
|
}
|
|
652
655
|
}
|
|
@@ -670,7 +673,7 @@ function resolveBorderProps(props, item, index, value, category, seriesIndex, se
|
|
|
670
673
|
if (!borderColor && !borderStrokeWidth && !borderRadius && !borderDash && borderDashOffset === void 0 && !hoverColor && !hoverBorderColor && opacity === void 0) return {};
|
|
671
674
|
return { borderColor, borderStrokeWidth, borderRadius, borderDash, borderDashOffset, hoverColor, hoverBorderColor, opacity };
|
|
672
675
|
}
|
|
673
|
-
function calculatePolarLayout(datasets, chartArea, stackConfig, globalFont, sharedCategories, sharedDomain) {
|
|
676
|
+
function calculatePolarLayout(datasets, chartArea, stackConfig, globalFont, sharedCategories, sharedDomain, showCategoryLabels = true) {
|
|
674
677
|
const categories = sharedCategories ?? extractCategories(datasets);
|
|
675
678
|
const categoryCount = categories.length;
|
|
676
679
|
const angleStep = categoryCount > 0 ? 360 / categoryCount : 0;
|
|
@@ -679,6 +682,7 @@ function calculatePolarLayout(datasets, chartArea, stackConfig, globalFont, shar
|
|
|
679
682
|
const allValues = [];
|
|
680
683
|
const visibleDatasets = datasets.filter((ds) => ds.visible);
|
|
681
684
|
const globalDatasetIndex = new Map(visibleDatasets.map((ds) => [ds.id, datasets.indexOf(ds)]));
|
|
685
|
+
const colorIndexById = buildColorIndexMap(new Map(datasets.map((d) => [d.id, d])));
|
|
682
686
|
const isStacked = visibleDatasets.some((ds) => ds.props.stackId !== void 0);
|
|
683
687
|
const categoryValuesByDataset = [];
|
|
684
688
|
const keysByDataset = [];
|
|
@@ -744,7 +748,7 @@ function calculatePolarLayout(datasets, chartArea, stackConfig, globalFont, shar
|
|
|
744
748
|
const resolvedLabelFontSize = resolveFontSize(DEFAULT_RADIAL_LABEL_FONT_SIZE, globalFont);
|
|
745
749
|
const resolvedFontFamily = resolveFontFamily(void 0, globalFont);
|
|
746
750
|
const labelPadding = measureText("Xg", resolvedLabelFontSize).height;
|
|
747
|
-
const labelMargins = calculateLabelMargins(categories, angleStep, labelPadding, resolvedLabelFontSize);
|
|
751
|
+
const labelMargins = showCategoryLabels ? calculateLabelMargins(categories, angleStep, labelPadding, resolvedLabelFontSize) : { top: 0, right: 0, bottom: 0, left: 0 };
|
|
748
752
|
const adjustedArea = {
|
|
749
753
|
x: chartArea.x + labelMargins.left,
|
|
750
754
|
y: chartArea.y + labelMargins.top,
|
|
@@ -756,9 +760,11 @@ function calculatePolarLayout(datasets, chartArea, stackConfig, globalFont, shar
|
|
|
756
760
|
const firstTick = levelValues[0] ?? domain[0];
|
|
757
761
|
const lastTick = levelValues[levelValues.length - 1] ?? domain[1];
|
|
758
762
|
domain = [Math.min(domain[0], firstTick), Math.max(domain[1], lastTick)];
|
|
763
|
+
const baseInnerRadius = innerRadiusRatio * maxRadius;
|
|
764
|
+
const availableRadius = maxRadius - baseInnerRadius;
|
|
759
765
|
const levelRadii = levelValues.map((v) => {
|
|
760
|
-
if (domain[1] === domain[0]) return
|
|
761
|
-
return (v - domain[0]) / (domain[1] - domain[0]) *
|
|
766
|
+
if (domain[1] === domain[0]) return baseInnerRadius;
|
|
767
|
+
return baseInnerRadius + (v - domain[0]) / (domain[1] - domain[0]) * availableRadius;
|
|
762
768
|
});
|
|
763
769
|
const grid = {
|
|
764
770
|
shape: "circle",
|
|
@@ -776,8 +782,6 @@ function calculatePolarLayout(datasets, chartArea, stackConfig, globalFont, shar
|
|
|
776
782
|
});
|
|
777
783
|
}
|
|
778
784
|
const bars = [];
|
|
779
|
-
const baseInnerRadius = innerRadiusRatio * maxRadius;
|
|
780
|
-
const availableRadius = maxRadius - baseInnerRadius;
|
|
781
785
|
const gapPx = firstProps?.spacing ?? DEFAULT_POLAR_GAP_PX;
|
|
782
786
|
const gapDeg = maxRadius > 0 ? gapPx / maxRadius * (180 / Math.PI) : 0;
|
|
783
787
|
if (isStacked) {
|
|
@@ -812,6 +816,7 @@ function calculatePolarLayout(datasets, chartArea, stackConfig, globalFont, shar
|
|
|
812
816
|
value: 0,
|
|
813
817
|
color: color2,
|
|
814
818
|
seriesIdx: dsSeriesIdx,
|
|
819
|
+
colorIndex: colorIndexById.get(ds.id) ?? dsSeriesIdx,
|
|
815
820
|
hidden: true,
|
|
816
821
|
...border2
|
|
817
822
|
});
|
|
@@ -842,6 +847,7 @@ function calculatePolarLayout(datasets, chartArea, stackConfig, globalFont, shar
|
|
|
842
847
|
value: rawValue,
|
|
843
848
|
color,
|
|
844
849
|
seriesIdx: dsSeriesIdx,
|
|
850
|
+
colorIndex: colorIndexById.get(ds.id) ?? dsSeriesIdx,
|
|
845
851
|
...border
|
|
846
852
|
});
|
|
847
853
|
currentInner = outerRadius;
|
|
@@ -874,6 +880,7 @@ function calculatePolarLayout(datasets, chartArea, stackConfig, globalFont, shar
|
|
|
874
880
|
value: rawValue,
|
|
875
881
|
color,
|
|
876
882
|
seriesIdx: dsSeriesIdx,
|
|
883
|
+
colorIndex: colorIndexById.get(ds.id) ?? dsSeriesIdx,
|
|
877
884
|
...border
|
|
878
885
|
});
|
|
879
886
|
}
|
|
@@ -903,6 +910,7 @@ function calculatePolarLayout(datasets, chartArea, stackConfig, globalFont, shar
|
|
|
903
910
|
value: rawValue,
|
|
904
911
|
color,
|
|
905
912
|
seriesIdx: dsSeriesIdx,
|
|
913
|
+
colorIndex: colorIndexById.get(ds.id) ?? dsSeriesIdx,
|
|
906
914
|
...border
|
|
907
915
|
});
|
|
908
916
|
}
|
|
@@ -947,9 +955,9 @@ function hitTestPolar(x, y, layout, theme) {
|
|
|
947
955
|
index: bar.categoryIndex,
|
|
948
956
|
label: layout.categories[bar.categoryIndex] ?? "",
|
|
949
957
|
value: bar.value,
|
|
950
|
-
color: bar.color ?? getDefaultColor(bar.
|
|
958
|
+
color: bar.color ?? getDefaultColor(bar.colorIndex, theme),
|
|
951
959
|
colorGradient: gradColor,
|
|
952
|
-
swatchColor: resolveSwatchColor({ color: bar.color ?? gradColor }, bar.
|
|
960
|
+
swatchColor: resolveSwatchColor({ color: bar.color ?? gradColor }, bar.colorIndex, void 0, theme)
|
|
953
961
|
};
|
|
954
962
|
}
|
|
955
963
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { isChartDevWarningsEnabled, warnChartDevOnce } from './chunk-K7AGQTVK.mjs';
|
|
2
|
+
|
|
3
|
+
// src/cartesian/series-accessors.ts
|
|
4
|
+
function resolveCartesianAccessors(props) {
|
|
5
|
+
if (props.categoryXField != null) {
|
|
6
|
+
return { independentField: props.categoryXField, measureField: props.valueYField, independentIsCategory: true, orientation: "vertical" };
|
|
7
|
+
}
|
|
8
|
+
if (props.categoryYField != null) {
|
|
9
|
+
return { independentField: props.categoryYField, measureField: props.valueXField, independentIsCategory: true, orientation: "horizontal" };
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
independentField: props.valueXField,
|
|
13
|
+
measureField: props.valueYField,
|
|
14
|
+
independentIsCategory: false,
|
|
15
|
+
orientation: "vertical"
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function boundAxisType(map, axisId) {
|
|
19
|
+
if (map.size === 0) return void 0;
|
|
20
|
+
const entry = axisId != null ? map.get(axisId) : map.values().next().value;
|
|
21
|
+
return entry?.props?.type;
|
|
22
|
+
}
|
|
23
|
+
function validateCartesianAccessors(seriesList, axes) {
|
|
24
|
+
if (!isChartDevWarningsEnabled()) return;
|
|
25
|
+
let sawVertical = false;
|
|
26
|
+
let sawHorizontal = false;
|
|
27
|
+
for (const { id, props } of seriesList) {
|
|
28
|
+
const cx = props.categoryXField != null;
|
|
29
|
+
const cy = props.categoryYField != null;
|
|
30
|
+
const vx = props.valueXField != null;
|
|
31
|
+
const vy = props.valueYField != null;
|
|
32
|
+
if (cx) sawVertical = true;
|
|
33
|
+
if (cy) sawHorizontal = true;
|
|
34
|
+
if (cx && cy) {
|
|
35
|
+
warnChartDevOnce(`cartesian-accessor:${id}:dual-category`, `series "${id}" sets both categoryXField and categoryYField; categoryXField wins and categoryYField is ignored.`);
|
|
36
|
+
}
|
|
37
|
+
const acc = resolveCartesianAccessors(props);
|
|
38
|
+
if (!cx && !cy && !vx && !vy) {
|
|
39
|
+
warnChartDevOnce(`cartesian-accessor:${id}:no-accessors`, `series "${id}" has no cartesian field accessors (categoryXField/categoryYField/valueXField/valueYField); nothing will render.`);
|
|
40
|
+
} else if (acc.independentField != null && acc.measureField == null) {
|
|
41
|
+
warnChartDevOnce(`cartesian-accessor:${id}:missing-measure`, `series "${id}" has an independent field but no value (measure) field \u2014 points will render at zero. Pair categoryXField with valueYField, or categoryYField with valueXField.`);
|
|
42
|
+
}
|
|
43
|
+
const xType = boundAxisType(axes.x, props.xAxisId);
|
|
44
|
+
const yType = boundAxisType(axes.y, props.yAxisId);
|
|
45
|
+
if (cx && (xType === "linear" || xType === "logarithmic")) {
|
|
46
|
+
warnChartDevOnce(`cartesian-accessor:${id}:catx-on-numeric`, `series "${id}" uses categoryXField but its X axis is type "${xType}"; category fields require a category (or time) axis.`);
|
|
47
|
+
}
|
|
48
|
+
if (cy && (yType === "linear" || yType === "logarithmic")) {
|
|
49
|
+
warnChartDevOnce(`cartesian-accessor:${id}:caty-on-numeric`, `series "${id}" uses categoryYField but its Y axis is type "${yType}"; category fields require a category (or time) axis.`);
|
|
50
|
+
}
|
|
51
|
+
if (vx && xType === "category") {
|
|
52
|
+
warnChartDevOnce(`cartesian-accessor:${id}:valx-on-category`, `series "${id}" uses valueXField but its X axis is type "category"; value fields require a linear/logarithmic/time axis.`);
|
|
53
|
+
}
|
|
54
|
+
if (vy && yType === "category") {
|
|
55
|
+
warnChartDevOnce(`cartesian-accessor:${id}:valy-on-category`, `series "${id}" uses valueYField but its Y axis is type "category"; value fields require a linear/logarithmic/time axis.`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (sawVertical && sawHorizontal) {
|
|
59
|
+
warnChartDevOnce("cartesian-accessor:mixed-orientation", "chart has mixed series orientations (categoryXField \u2192 vertical and categoryYField \u2192 horizontal); the chart will collapse to a single orientation.");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { resolveCartesianAccessors, validateCartesianAccessors };
|