vue-data-ui 2.4.84 → 2.4.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-DCfmf5dA.cjs → Arrow-Ajt3NMEa.cjs} +1 -1
- package/dist/{Arrow-CExa0Dz7.js → Arrow-Qayb_B0s.js} +1 -1
- package/dist/{BaseIcon-I6DfuN0D.js → BaseIcon-B8U62FEj.js} +1 -1
- package/dist/{BaseIcon-64qWZUaJ.cjs → BaseIcon-BVrsMbvi.cjs} +1 -1
- package/dist/{DataTable-C_6KWwfC.cjs → DataTable-1PQD-SFb.cjs} +1 -1
- package/dist/{DataTable-DYhXzoFM.js → DataTable-C0tCPQ9i.js} +2 -2
- package/dist/{Legend-BkolTSZc.cjs → Legend-BJ2Wbqut.cjs} +1 -1
- package/dist/{Legend-D8VMKZ6f.js → Legend-BTpe6qQB.js} +2 -2
- package/dist/{PackageVersion-BV362f3w.cjs → PackageVersion-BjfedMsH.cjs} +1 -1
- package/dist/{PackageVersion-CO2IMTO9.js → PackageVersion-CENy3Lm2.js} +1 -1
- package/dist/{PenAndPaper-CnW2eqXw.js → PenAndPaper-Dr7ndoP_.js} +3 -3
- package/dist/{PenAndPaper-DvN8ocWC.cjs → PenAndPaper-nqRtAh6J.cjs} +1 -1
- package/dist/{Shape-VkiqMBJb.cjs → Shape-Boa32JEn.cjs} +1 -1
- package/dist/{Shape-Bit--n_P.js → Shape-zFv85Gc2.js} +1 -1
- package/dist/{Slicer-BIRZ38gw.js → Slicer-BUYuk07t.js} +2 -2
- package/dist/{Slicer-D8EYKe1g.cjs → Slicer-D6QLMg5N.cjs} +1 -1
- package/dist/{Title-C_gOJvlv.js → Title-CaET2xuF.js} +1 -1
- package/dist/{Title-BVwrrnjn.cjs → Title-DJUxOiaO.cjs} +1 -1
- package/dist/{Tooltip-Czv48jTt.js → Tooltip-Bkc4233T.js} +1 -1
- package/dist/{Tooltip-CfsfUzgu.cjs → Tooltip-C5QuW94e.cjs} +1 -1
- package/dist/{index-CFW17vb1.js → index-B7nCQFK0.js} +1 -1
- package/dist/{index-DtU3BvTq.cjs → index-COIn1phv.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-HPB1YHuD.js → useNestedProp-C9rlBRTT.js} +1 -1
- package/dist/{useNestedProp-Bwqm-3kz.cjs → useNestedProp-CbMuGGl3.cjs} +1 -1
- package/dist/{usePrinter-19frcFuH.js → usePrinter-CQMn1b4E.js} +1 -1
- package/dist/{usePrinter-CdEwyYTo.cjs → usePrinter-CXXfgFFN.cjs} +1 -1
- package/dist/{vue-data-ui-Cwa_3CUx.js → vue-data-ui-BnsKGbqb.js} +60 -60
- package/dist/{vue-data-ui-Do7J2TPn.cjs → vue-data-ui-Bu_VIHgr.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BHQnk6JC.cjs → vue-ui-3d-bar-D39F2dKF.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-DFyAJ8Js.js → vue-ui-3d-bar-V5FBS9MA.js} +9 -9
- package/dist/{vue-ui-accordion-B8vShfXi.js → vue-ui-accordion-B8ptB5BQ.js} +3 -3
- package/dist/{vue-ui-accordion-DP9u_TW0.cjs → vue-ui-accordion-CGlnNTr8.cjs} +1 -1
- package/dist/vue-ui-age-pyramid-BdseHKUc.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-Dmve7QfH.js → vue-ui-age-pyramid-Bjp1R8Ku.js} +14 -12
- package/dist/{vue-ui-annotator-D9EQpzhs.cjs → vue-ui-annotator-BoWZZRPg.cjs} +1 -1
- package/dist/{vue-ui-annotator-BlXk3QBH.js → vue-ui-annotator-V9m5fTGG.js} +1 -1
- package/dist/{vue-ui-bullet-C_689DzY.js → vue-ui-bullet-Bqvb5PV-.js} +8 -8
- package/dist/{vue-ui-bullet-HVCVCTLU.cjs → vue-ui-bullet-DLIxlhFF.cjs} +1 -1
- package/dist/{vue-ui-candlestick-jaQCvTyL.cjs → vue-ui-candlestick-D4BD8LyJ.cjs} +2 -2
- package/dist/{vue-ui-candlestick-BeoPugFC.js → vue-ui-candlestick-DHCtmsh3.js} +72 -70
- package/dist/{vue-ui-carousel-table-DSJth2mn.js → vue-ui-carousel-table-Cn2RJkSb.js} +4 -4
- package/dist/{vue-ui-carousel-table-C6TjkSgb.cjs → vue-ui-carousel-table-VIuoh2QI.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DYFaL9sS.js → vue-ui-chestnut-C5qUO1uK.js} +8 -8
- package/dist/{vue-ui-chestnut-B2ufyy3m.cjs → vue-ui-chestnut-ClG9HZoC.cjs} +1 -1
- package/dist/{vue-ui-cursor-B8ne66iS.cjs → vue-ui-cursor-Bo8et-dD.cjs} +1 -1
- package/dist/{vue-ui-cursor-0SZiJ6tf.js → vue-ui-cursor-eJau3iyr.js} +2 -2
- package/dist/{vue-ui-dashboard-9JNDS8H_.js → vue-ui-dashboard-DnaH9bCw.js} +2 -2
- package/dist/{vue-ui-dashboard-Cc6YeOue.cjs → vue-ui-dashboard-WJqGQ8iR.cjs} +1 -1
- package/dist/{vue-ui-digits-DNyhJL4P.js → vue-ui-digits-Cqjts2eq.js} +2 -2
- package/dist/{vue-ui-digits-lJ7p7zK0.cjs → vue-ui-digits-qIckO4-r.cjs} +1 -1
- package/dist/vue-ui-donut-BP7yj2DU.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-CNUN-Ibl.cjs → vue-ui-donut-evolution-Cz8uFJp8.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BZgaPkPQ.js → vue-ui-donut-evolution-EzYvP11F.js} +11 -11
- package/dist/{vue-ui-donut-rUTpcnu6.js → vue-ui-donut-pprcnbIw.js} +17 -15
- package/dist/vue-ui-dumbbell-CYqHCr2S.cjs +9 -0
- package/dist/{vue-ui-dumbbell-Dt0y6iAc.js → vue-ui-dumbbell-DaxcxmnU.js} +48 -46
- package/dist/{vue-ui-flow-CNJvuCPl.js → vue-ui-flow-DbRgaKBu.js} +9 -9
- package/dist/{vue-ui-flow-DoDnRTz2.cjs → vue-ui-flow-HeRCplGL.cjs} +1 -1
- package/dist/{vue-ui-funnel-CzxjqsPW.js → vue-ui-funnel-B2del8KB.js} +37 -35
- package/dist/vue-ui-funnel-DxniWNkD.cjs +1 -0
- package/dist/{vue-ui-galaxy-Bd3A40CM.cjs → vue-ui-galaxy-BDA64dud.cjs} +1 -1
- package/dist/{vue-ui-galaxy-4lQvAV3d.js → vue-ui-galaxy-pUYeASJf.js} +11 -11
- package/dist/vue-ui-gauge-BOXoAgWk.cjs +1 -0
- package/dist/{vue-ui-gauge-C-VzxGad.js → vue-ui-gauge-DpsXpEaW.js} +28 -26
- package/dist/{vue-ui-gizmo-CE_RL3QC.js → vue-ui-gizmo-BpYrhkon.js} +3 -3
- package/dist/{vue-ui-gizmo-C_H8YGW3.cjs → vue-ui-gizmo-Bq9uAmqd.cjs} +1 -1
- package/dist/{vue-ui-heatmap-9F3jF9Ph.cjs → vue-ui-heatmap-CbKgGLtN.cjs} +1 -1
- package/dist/{vue-ui-heatmap-GRSinjd8.js → vue-ui-heatmap-Cz6_9Veh.js} +10 -10
- package/dist/vue-ui-history-plot-BoMdvItE.cjs +1 -0
- package/dist/{vue-ui-history-plot-DmGaPsqO.js → vue-ui-history-plot-DAotUjSF.js} +56 -54
- package/dist/{vue-ui-kpi-BeGj6WIY.js → vue-ui-kpi-Ch2p7m-i.js} +3 -3
- package/dist/{vue-ui-kpi-Ce45VFCW.cjs → vue-ui-kpi-D6mp6EQ2.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-D3edtEz_.cjs → vue-ui-mini-loader-CO-KGVlC.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DE8S92Sq.js → vue-ui-mini-loader-E13lmwfO.js} +2 -2
- package/dist/{vue-ui-molecule-B3DvbGKk.js → vue-ui-molecule-C69K6EPO.js} +11 -11
- package/dist/{vue-ui-molecule-CBXx1n83.cjs → vue-ui-molecule-CeoDnPXB.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-LiiA0Dc-.cjs → vue-ui-mood-radar-BwOqQUuT.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-D86fg_ce.js → vue-ui-mood-radar-DDtky572.js} +11 -11
- package/dist/{vue-ui-nested-donuts-jk4b-l4R.js → vue-ui-nested-donuts-AYPYIRrE.js} +16 -14
- package/dist/{vue-ui-nested-donuts-BXKM6dJG.cjs → vue-ui-nested-donuts-DMCd6DqT.cjs} +2 -2
- package/dist/{vue-ui-onion-DMDU5CNx.cjs → vue-ui-onion-BedLvfFe.cjs} +2 -2
- package/dist/{vue-ui-onion-0OpNltFd.js → vue-ui-onion-Bsa88sKK.js} +31 -29
- package/dist/{vue-ui-parallel-coordinate-plot-C6z7ZrZv.cjs → vue-ui-parallel-coordinate-plot-CSOMIABF.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-CK1Npqa-.js → vue-ui-parallel-coordinate-plot-KCEb4iRs.js} +62 -60
- package/dist/vue-ui-quadrant-BXQVOvpY.cjs +1 -0
- package/dist/{vue-ui-quadrant-BTXxbgGe.js → vue-ui-quadrant-Bd_88Eht.js} +16 -14
- package/dist/{vue-ui-quick-chart-DxTYh43Q.js → vue-ui-quick-chart-CXAYKYHa.js} +55 -53
- package/dist/{vue-ui-quick-chart-C648x_Ta.cjs → vue-ui-quick-chart-dLItYwM_.cjs} +2 -2
- package/dist/vue-ui-radar-BuNtocmn.cjs +1 -0
- package/dist/{vue-ui-radar-ogrYz2LM.js → vue-ui-radar-De397oTB.js} +100 -98
- package/dist/{vue-ui-rating-BA3qzlLU.cjs → vue-ui-rating-BjiMVoyX.cjs} +1 -1
- package/dist/{vue-ui-rating-BDOw91i1.js → vue-ui-rating-wK3_ZWE5.js} +2 -2
- package/dist/vue-ui-relation-circle-BEGyr1h-.cjs +1 -0
- package/dist/{vue-ui-relation-circle-DzIUtPsI.js → vue-ui-relation-circle-BxlK8MVs.js} +56 -54
- package/dist/{vue-ui-rings-ZT5FspBJ.js → vue-ui-rings-BXrtMSML.js} +39 -37
- package/dist/{vue-ui-rings-CC2lRhXV.cjs → vue-ui-rings-BcNMBXxq.cjs} +2 -2
- package/dist/{vue-ui-scatter-DWrEQi8R.js → vue-ui-scatter-BWZfLJ9P.js} +52 -50
- package/dist/vue-ui-scatter-DTy3yPVu.cjs +1 -0
- package/dist/{vue-ui-screenshot-C5qnoqpN.cjs → vue-ui-screenshot-BJgOwFMW.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Cu9IDDlN.js → vue-ui-screenshot-hw4PC9Uu.js} +1 -1
- package/dist/{vue-ui-skeleton-BJjc2poJ.cjs → vue-ui-skeleton-BIqMxXV7.cjs} +1 -1
- package/dist/{vue-ui-skeleton-RRyod9qq.js → vue-ui-skeleton-D66ZIUln.js} +3 -3
- package/dist/{vue-ui-smiley-Ph-v2-Ai.js → vue-ui-smiley-DWPYdcDB.js} +2 -2
- package/dist/{vue-ui-smiley-y9nTUBhA.cjs → vue-ui-smiley-Duy5Xo-j.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Bny5SJnu.js → vue-ui-spark-trend-Ce4IaqPz.js} +5 -5
- package/dist/{vue-ui-spark-trend-CLToG1xM.cjs → vue-ui-spark-trend-DP5foaNi.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-XuIl0I-2.cjs → vue-ui-sparkbar-Bbns4V16.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Cte6J2j-.js → vue-ui-sparkbar-Fa-Kc9Fr.js} +4 -4
- package/dist/{vue-ui-sparkgauge-85UuRRgo.cjs → vue-ui-sparkgauge-BrLrvNLH.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-NGpDEiOA.js → vue-ui-sparkgauge-DUWcJ7cM.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-g9PwZ66_.cjs → vue-ui-sparkhistogram-B0rhs_UN.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DC6GQfGG.js → vue-ui-sparkhistogram-PgC-c-5a.js} +5 -5
- package/dist/{vue-ui-sparkline-Cv0OStNn.js → vue-ui-sparkline-BqNlrKjb.js} +37 -35
- package/dist/vue-ui-sparkline-c5Awoj8J.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-Dvi0gC4_.cjs → vue-ui-sparkstackbar-BmYIcpVZ.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-lUSVcaQd.js → vue-ui-sparkstackbar-DyJIUulr.js} +5 -5
- package/dist/{vue-ui-stackbar-CqbbJfYt.js → vue-ui-stackbar-BebRtOYL.js} +55 -53
- package/dist/{vue-ui-stackbar-DjJtIsdz.cjs → vue-ui-stackbar-DJ9NH_l1.cjs} +2 -2
- package/dist/{vue-ui-strip-plot-BCg5ReEr.js → vue-ui-strip-plot-BGHj1BHd.js} +77 -75
- package/dist/vue-ui-strip-plot-f7vejZht.cjs +1 -0
- package/dist/{vue-ui-table-BLtxfmhY.cjs → vue-ui-table-BFdGppRF.cjs} +1 -1
- package/dist/{vue-ui-table-C0gtq240.js → vue-ui-table-ClPMKcMn.js} +1 -1
- package/dist/{vue-ui-table-heatmap-Df4MQoU-.cjs → vue-ui-table-heatmap-B7wTjM-H.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-QuqCtJWs.js → vue-ui-table-heatmap-DVQtPt-M.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CUD-P2XB.cjs → vue-ui-table-sparkline-DaKODjfM.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Cgt7aEwb.js → vue-ui-table-sparkline-DjxKXWQm.js} +5 -5
- package/dist/{vue-ui-thermometer-Dmba_BQM.js → vue-ui-thermometer-CV_9k37V.js} +7 -7
- package/dist/{vue-ui-thermometer-DwFIhO9V.cjs → vue-ui-thermometer-DE9r0emf.cjs} +1 -1
- package/dist/{vue-ui-timer-C7B7kC_T.js → vue-ui-timer-2w5Ayq7G.js} +35 -33
- package/dist/vue-ui-timer-Ct-KYWSX.cjs +64 -0
- package/dist/{vue-ui-tiremarks-D5xKuhfo.js → vue-ui-tiremarks-BJnh0GBj.js} +7 -7
- package/dist/{vue-ui-tiremarks-Cbu6E711.cjs → vue-ui-tiremarks-Cf04zARl.cjs} +1 -1
- package/dist/{vue-ui-treemap-4MV0XnQk.js → vue-ui-treemap-BD546LBi.js} +37 -35
- package/dist/vue-ui-treemap-D0vi4bv4.cjs +1 -0
- package/dist/{vue-ui-vertical-bar-CoReGxcB.cjs → vue-ui-vertical-bar-D3QKHHnS.cjs} +2 -2
- package/dist/{vue-ui-vertical-bar-CXyj54xk.js → vue-ui-vertical-bar-E5CTb1Bd.js} +53 -51
- package/dist/{vue-ui-waffle-DEs7x_2T.js → vue-ui-waffle-BAJIMbZK.js} +50 -48
- package/dist/vue-ui-waffle-BL0e3Yeq.cjs +1 -0
- package/dist/{vue-ui-wheel-g8X99gKX.js → vue-ui-wheel-CPPLUSFq.js} +22 -20
- package/dist/vue-ui-wheel-Dy_B7BTG.cjs +1 -0
- package/dist/vue-ui-word-cloud-BPoAoeWZ.cjs +1 -0
- package/dist/{vue-ui-word-cloud-CVa0GWD2.js → vue-ui-word-cloud-BVZcDY7m.js} +47 -45
- package/dist/vue-ui-xy-D4hRtHAi.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-B8lWHhig.cjs → vue-ui-xy-canvas-BSZTrqci.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-C5WvLq7x.js → vue-ui-xy-canvas-DFUfTZwz.js} +36 -34
- package/dist/{vue-ui-xy-BGlQK1KX.js → vue-ui-xy-tB-6IP2y.js} +18 -16
- package/package.json +1 -1
- package/dist/vue-ui-age-pyramid-DZM35V2u.cjs +0 -1
- package/dist/vue-ui-donut-B1pUA9f9.cjs +0 -1
- package/dist/vue-ui-dumbbell-Cvsoh0T7.cjs +0 -9
- package/dist/vue-ui-funnel-BuMkpJAC.cjs +0 -1
- package/dist/vue-ui-gauge-BE_j4sWG.cjs +0 -1
- package/dist/vue-ui-history-plot-CCRPcG-q.cjs +0 -1
- package/dist/vue-ui-quadrant-BseIxY55.cjs +0 -1
- package/dist/vue-ui-radar-BRL3W3Na.cjs +0 -1
- package/dist/vue-ui-relation-circle-lh7NE0h5.cjs +0 -1
- package/dist/vue-ui-scatter-ebuihNvY.cjs +0 -1
- package/dist/vue-ui-sparkline-BiqTIIb1.cjs +0 -1
- package/dist/vue-ui-strip-plot-y7iID0n4.cjs +0 -1
- package/dist/vue-ui-timer-mYvuMMWA.cjs +0 -64
- package/dist/vue-ui-treemap-CE67vTLK.cjs +0 -1
- package/dist/vue-ui-waffle-8nA0-Wb6.cjs +0 -1
- package/dist/vue-ui-wheel-CJr7fA0P.cjs +0 -1
- package/dist/vue-ui-word-cloud-B6swJJCN.cjs +0 -1
- package/dist/vue-ui-xy-lkMHpHRs.cjs +0 -3
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-Bwqm-3kz.cjs"),g=require("./index-DtU3BvTq.cjs"),R=require("./useResponsive-BJ7DTGpm.cjs"),B=require("./BaseIcon-64qWZUaJ.cjs"),j=require("./Title-BVwrrnjn.cjs"),O=require("./PackageVersion-BV362f3w.cjs"),q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class U{constructor(P,p,y,T=!0,b=!0){this.interval=p,this.elapsed=0,this.isPaused=!1;const S=`
|
|
2
|
-
let interval;
|
|
3
|
-
let elapsed = 0;
|
|
4
|
-
let paused = false;
|
|
5
|
-
let startTime;
|
|
6
|
-
let tickInterval;
|
|
7
|
-
|
|
8
|
-
onmessage = function(e) {
|
|
9
|
-
const { action, data } = e.data;
|
|
10
|
-
|
|
11
|
-
switch(action) {
|
|
12
|
-
case 'start':
|
|
13
|
-
startTime = Date.now();
|
|
14
|
-
tickInterval = data.interval;
|
|
15
|
-
elapsed = 0;
|
|
16
|
-
paused = false;
|
|
17
|
-
interval = setInterval(() => {
|
|
18
|
-
elapsed += tickInterval;
|
|
19
|
-
postMessage({ elapsed, timestamp: Date.now() });
|
|
20
|
-
}, tickInterval);
|
|
21
|
-
break;
|
|
22
|
-
|
|
23
|
-
case 'pause':
|
|
24
|
-
paused = true;
|
|
25
|
-
clearInterval(interval);
|
|
26
|
-
elapsed = Date.now() - startTime;
|
|
27
|
-
break;
|
|
28
|
-
|
|
29
|
-
case 'resume':
|
|
30
|
-
if (paused) {
|
|
31
|
-
startTime = Date.now() - elapsed;
|
|
32
|
-
interval = setInterval(() => {
|
|
33
|
-
elapsed += tickInterval;
|
|
34
|
-
postMessage({ elapsed, timestamp: Date.now() });
|
|
35
|
-
}, tickInterval);
|
|
36
|
-
}
|
|
37
|
-
paused = false;
|
|
38
|
-
break;
|
|
39
|
-
|
|
40
|
-
case 'stop':
|
|
41
|
-
clearInterval(interval);
|
|
42
|
-
elapsed = 0;
|
|
43
|
-
postMessage({ elapsed });
|
|
44
|
-
break;
|
|
45
|
-
|
|
46
|
-
case 'reset':
|
|
47
|
-
elapsed = 0;
|
|
48
|
-
clearInterval(interval);
|
|
49
|
-
postMessage({ elapsed });
|
|
50
|
-
break;
|
|
51
|
-
|
|
52
|
-
case 'lap':
|
|
53
|
-
postMessage({
|
|
54
|
-
elapsed,
|
|
55
|
-
timestamp: Date.now(),
|
|
56
|
-
action: 'lap'
|
|
57
|
-
});
|
|
58
|
-
break;
|
|
59
|
-
|
|
60
|
-
default:
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
`,M=new Blob([S],{type:"application/javascript"}),k=URL.createObjectURL(M),n=new Worker(k);function _(u){let t=Math.floor(u/1e3),h=Math.floor(u%1e3/10),f=Math.floor(t/3600),a=Math.floor(t%3600/60),i=t%60,r="";return b&&(r+=String(f).padStart(2,"0")+":"),r+=String(a).padStart(2,"0")+":",r+=String(i).padStart(2,"0"),T&&(r+="."+String(h).padStart(2,"0")),r}this.start=()=>{this.isPaused=!1,n.postMessage({action:"start",data:{interval:this.interval}})},this.pause=()=>{this.isPaused?this.resume():(this.isPaused=!0,n.postMessage({action:"pause"}))},this.resume=()=>{this.isPaused&&(n.postMessage({action:"resume"}),this.isPaused=!1)},this.stop=()=>{n.postMessage({action:"stop"}),this.isPaused=!1},this.reset=()=>{n.postMessage({action:"reset"}),this.elapsed=0,this.isPaused=!1},this.restart=()=>{this.stop(),this.start()},this.lap=()=>new Promise(u=>{n.postMessage({action:"lap"});const t=h=>{const{elapsed:f,timestamp:a,action:i}=h.data;if(i==="lap"){const r=_(f);u({timestamp:a||0,elapsed:f,formatted:r})}};n.addEventListener("message",t,{once:!0})}),n.onmessage=u=>{const{elapsed:t,timestamp:h}=u.data;this.elapsed=t,P({timestamp:h||0,elapsed:this.elapsed,formatted:_(this.elapsed)})},n.onerror=u=>{y&&y(u)}}}const W=["xmlns","viewBox"],G=["width","height"],X={key:1},J=["id"],K=["stop-color"],Q=["stop-color"],Y=["cx","cy","r","fill","stroke","stroke-width"],Z=["d","stroke","stroke-width"],ee=["r","fill","stroke","stroke-width"],te=["r","fill","stroke","stroke-width"],ae=["x","y"],le=["x","y","font-size","fill","font-weight"],se={key:0,class:"vue-ui-timer-controls"},oe=["title"],re=["title"],ne=["title"],ue=["title"],ie=["title"],ce={__name:"vue-ui-timer",props:{config:{type:Object,default(){return{}}}},emits:["start","pause","reset","restart","lap"],setup($,{expose:P,emit:p}){const y=$,{vue_ui_timer:T}=g.useConfig(),b=e.ref(null),S=e.ref(null),M=e.ref(null),k=e.ref(null),n=e.ref(g.createUid()),_=e.ref(0);e.onMounted(()=>{u()});function u(){if(t.value.responsive){const l=R.throttle(()=>{const{width:o,height:c}=R.useResponsive({chart:b.value,title:t.value.style.title.text?S.value:null,legend:M.value});a.value.width=o,a.value.height=c,a.value.tracker.core=g.translateSize({relator:Math.min(o,c),adjuster:t.value.style.width,source:6*t.value.stopwatch.tracker.radiusRatio,threshold:1,fallback:1}),a.value.tracker.aura=g.translateSize({relator:Math.min(o,c),adjuster:t.value.style.width,source:12*t.value.stopwatch.tracker.aura.radiusRatio,threshold:1,fallback:1}),a.value.label=g.translateSize({relator:Math.min(o,c),adjuster:t.value.style.width,source:t.value.stopwatch.label.fontSize,threshold:10,fallback:10})});k.value=new ResizeObserver(l),k.value.observe(b.value.parentNode)}}e.onBeforeUnmount(()=>{k.value&&k.value.disconnect()});const t=e.computed({get:()=>h(),set:l=>l});function h(){return L.useNestedProp({userConfig:y.config,defaultConfig:T})}e.watch(()=>y.config,l=>{t.value=h(),u(),_.value+=1},{deep:!0});const f=e.computed(()=>{if(t.value.stopwatch.showHours&&t.value.stopwatch.showHundredth)return"00:00:00.00";if(t.value.stopwatch.showHours&&!t.value.stopwatch.showHundredth)return"00:00:00";if(!t.value.stopwatch.showHours&&t.value.stopwatch.showHundredth)return"00:00.00";if(!t.value.stopwatch.showHours&&!t.value.stopwatch.showHundredth)return"00:00"}),a=e.ref({height:t.value.style.height,width:t.value.style.width,tracker:{core:6*t.value.stopwatch.tracker.radiusRatio,aura:12*t.value.stopwatch.tracker.aura.radiusRatio},label:t.value.stopwatch.label.fontSize}),i=e.ref(0),r=new U(l=>D(l),10,"",t.value.stopwatch.showHundredth,t.value.stopwatch.showHours),N=e.ref(!0),s=e.ref(!1),d=e.ref(!1);function V(){p("start"),N.value&&r.start(),N.value=!1,s.value=!0}function x(){s.value&&(p("reset"),r.stop(),m.value=[],N.value=!0,s.value=!1)}function z(){d.value=!d.value,p("pause",i.value),r.pause()}function I(){s.value&&(d.value=!1,p("restart"),m.value=[],r.restart())}const m=e.ref([]);async function E(){if(!s.value||d.value)return;const l=await r.lap();l&&(m.value.push(l),p("lap",m.value))}function D({timestamp:l,elapsed:o,formatted:c}){i.value={timestamp:l,elapsed:o,formatted:c}}const v=e.computed(()=>Math.min(a.value.width,a.value.height)/2.5*t.value.stopwatch.track.radiusRatio);function F(l,o){const C=360/(o*1e3);return l*C%360}function H(l){let o=l*(Math.PI/180),c=a.value.width/2+v.value*Math.cos(o),C=a.value.height/2+v.value*Math.sin(o);return{cx:c,cy:C}}const w=e.computed(()=>{const l=F(i.value.elapsed,t.value.stopwatch.cycleSeconds),{cx:o,cy:c}=H(l-90),C=l>180?1:0;return{cx:o||a.value.width/2,cy:c||a.value.height/2-v.value,largeArcFlag:C,sweepFlag:1}});return P({start:V,pause:z,reset:x,restart:I,lap:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"timerChart",ref:b,class:"vue-ui-timer",style:e.normalizeStyle({fontFamily:t.value.style.fontFamily,width:"100%",height:t.value.responsive?"100%":"auto",textAlign:"center"})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:S,style:e.normalizeStyle({width:"100%",background:t.value.style.backgroundColor})},[(e.openBlock(),e.createBlock(j._sfc_main,{key:`title_${_.value}`,config:{title:{cy:"title",...t.value.style.title},subtitle:{cy:"subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(g.XMLNS),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,style:e.normalizeStyle({maxWidth:"100%",overflow:"visible",background:t.value.style.backgroundColor})},[e.createVNode(O._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,G)):e.createCommentVNode("",!0),t.value.stopwatch.tracker.gradient.show?(e.openBlock(),e.createElementBlock("defs",X,[e.createElementVNode("radialGradient",{id:`tracker_gradient_${n.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.stopwatch.tracker.gradient.color},null,8,K),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.stopwatch.tracker.fill},null,8,Q)],8,J)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:a.value.width/2,cy:a.value.height/2,r:v.value,fill:t.value.stopwatch.track.fill,stroke:t.value.stopwatch.track.stroke,"stroke-width":t.value.stopwatch.track.strokeWidth},null,8,Y),t.value.stopwatch.cycleTrack.show?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${a.value.width/2},${a.value.height/2-v.value} A ${v.value},${v.value} 0 ${w.value.largeArcFlag},${w.value.sweepFlag} ${w.value.cx},${w.value.cy}`,stroke:t.value.stopwatch.cycleTrack.stroke,"stroke-width":t.value.stopwatch.cycleTrack.strokeWidth,"stroke-linecap":"round",fill:"none"},null,8,Z)):e.createCommentVNode("",!0),e.createElementVNode("circle",e.mergeProps(w.value,{r:a.value.tracker.core,fill:t.value.stopwatch.tracker.gradient.show?`url(#tracker_gradient_${n.value})`:t.value.stopwatch.tracker.fill,stroke:t.value.stopwatch.tracker.stroke,"stroke-width":t.value.stopwatch.tracker.strokeWidth}),null,16,ee),t.value.stopwatch.tracker.aura.show?(e.openBlock(),e.createElementBlock("circle",e.mergeProps({key:3},w.value,{r:a.value.tracker.aura,fill:`${t.value.stopwatch.tracker.aura.fill}20`,stroke:t.value.stopwatch.tracker.aura.stroke,"stroke-width":t.value.stopwatch.tracker.aura.strokeWidth}),null,16,te)):e.createCommentVNode("",!0),l.$slots.time?(e.openBlock(),e.createElementBlock("foreignObject",{key:4,x:a.value.width/2,y:a.value.height/2,height:"0.1",width:"0.1",style:{overflow:"visible"}},[e.renderSlot(l.$slots,"time",e.normalizeProps(e.guardReactiveProps({...i.value})),void 0,!0)],8,ae)):(e.openBlock(),e.createElementBlock("text",{key:5,x:a.value.width/2,y:a.value.height/2+a.value.label/4,"font-size":a.value.label,"text-anchor":"middle",fill:t.value.stopwatch.label.color,"font-weight":t.value.stopwatch.label.bold?"bold":"normal",style:{"font-variant-numeric":"tabular-nums !important"}},e.toDisplayString(i.value.formatted||f.value),9,le))],12,W)),e.createElementVNode("div",{ref_key:"chartLegend",ref:M,style:e.normalizeStyle({width:"100%",backgroundColor:t.value.stopwatch.legend.backgroundColor})},[l.$slots.controls?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",se,[t.value.stopwatch.legend.buttons.start?(e.openBlock(),e.createElementBlock("button",{key:0,title:t.value.stopwatch.legend.buttonTitles.start,onClick:V,class:"vue-ui-timer-button",style:e.normalizeStyle({opacity:s.value?.2:1,cursor:s.value?"default":"pointer"})},[e.createVNode(B.default,{name:"play",stroke:t.value.stopwatch.legend.buttons.iconColor},null,8,["stroke"])],12,oe)):e.createCommentVNode("",!0),t.value.stopwatch.legend.buttons.pause?(e.openBlock(),e.createElementBlock("button",{key:1,title:d.value?t.value.stopwatch.legend.buttonTitles.resume:t.value.stopwatch.legend.buttonTitles.pause,onClick:z,class:"vue-ui-timer-button",style:e.normalizeStyle({opacity:s.value?1:.2,cursor:s.value?"pointer":"default"})},[e.createVNode(B.default,{name:"pause",stroke:t.value.stopwatch.legend.buttons.iconColor},null,8,["stroke"])],12,re)):e.createCommentVNode("",!0),t.value.stopwatch.legend.buttons.reset?(e.openBlock(),e.createElementBlock("button",{key:2,title:t.value.stopwatch.legend.buttonTitles.reset,onClick:x,class:"vue-ui-timer-button",style:e.normalizeStyle({opacity:s.value?1:.2,cursor:s.value?"pointer":"default"})},[e.createVNode(B.default,{name:"stop",stroke:t.value.stopwatch.legend.buttons.iconColor},null,8,["stroke"])],12,ne)):e.createCommentVNode("",!0),t.value.stopwatch.legend.buttons.restart?(e.openBlock(),e.createElementBlock("button",{key:3,title:t.value.stopwatch.legend.buttonTitles.restart,onClick:I,class:"vue-ui-timer-button",style:e.normalizeStyle({opacity:s.value?1:.2,cursor:s.value?"pointer":"default"})},[e.createVNode(B.default,{name:"restart",stroke:t.value.stopwatch.legend.buttons.iconColor},null,8,["stroke"])],12,ue)):e.createCommentVNode("",!0),t.value.stopwatch.legend.buttons.lap?(e.openBlock(),e.createElementBlock("button",{key:4,title:t.value.stopwatch.legend.buttonTitles.lap,onClick:E,class:"vue-ui-timer-button",style:e.normalizeStyle({opacity:s.value&&!d.value?1:.2,cursor:s.value&&!d.value?"pointer":"default"})},[e.createVNode(B.default,{name:"lap",stroke:t.value.stopwatch.legend.buttons.iconColor},null,8,["stroke"])],12,ie)):e.createCommentVNode("",!0)])),e.renderSlot(l.$slots,"controls",e.normalizeProps(e.guardReactiveProps({start:V,pause:z,reset:x,restart:I,lap:E,laps:m.value,isRunning:s.value,isPaused:d.value,...i.value})),void 0,!0),e.renderSlot(l.$slots,"laps",e.normalizeProps(e.guardReactiveProps({laps:m.value,lap:E,isRunning:s.value,isPaused:d.value,...i.value})),void 0,!0)],4)],4))}},de=q._export_sfc(ce,[["__scopeId","data-v-b9d21393"]]);exports.default=de;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DtU3BvTq.cjs"),Ee=require("./Title-BVwrrnjn.cjs"),ye=require("./usePrinter-CdEwyYTo.cjs"),Le=require("./Tooltip-CfsfUzgu.cjs"),Re=require("./Legend-BkolTSZc.cjs"),Ae=require("./vue-ui-skeleton-BJjc2poJ.cjs"),Fe=require("./DataTable-C_6KWwfC.cjs"),Ie=require("./vue-ui-accordion-DP9u_TW0.cjs"),be=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./useNestedProp-Bwqm-3kz.cjs"),De=require("./PackageVersion-BV362f3w.cjs"),qe=require("./PenAndPaper-DvN8ocWC.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function Ce(n,v){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,d=-1/0,p=0;for(let g=0;g<s;g+=1){const h=n[g].normalizedValue;h<u&&(u=h),h>d&&(d=h),p+=h}return Math.max(v**2*d/p**2,p**2/(v**2*u))}}function we(n){const{xOffset:v,yOffset:s,width:u,height:d}=n;return{x0:v,y0:s,x1:v+u,y1:s+d}}function Ue(n,v,s){if(n.length===0)return!0;{const u=n.concat(v),d=Ce(n,s),p=Ce(u,s);return d>=p}}function We(n){const v=[],s=n.length;for(let u=0;u<s;u+=1){const d=n[u],p=d.length;for(let c=0;c<p;c+=1)v.push(d[c])}return v}function Ge(n,v){const s={...v,children:n};return Te(s)}function je(n){return(n.x1-n.x0)*(n.y1-n.y0)}function xe(n,v){const{width:s,height:u,xOffset:d,yOffset:p}=Y(v),c=n.length,g=n.map(f=>f.normalizedValue||0).reduce((f,y)=>f+y,0),h=g/u,w=g/s;let C=d,b=p;const k=[];if(s>=u){for(let f=0;f<c;f+=1){const y=n[f],x=b+y.normalizedValue/h,B={x0:C,y0:b,x1:C+h,y1:x},T=Object.assign({},y,B);b=x,k.push(T)}return k}else{for(let f=0;f<c;f+=1){const y=n[f],x=C+y.normalizedValue/w,B={x0:C,y0:b,x1:x,y1:b+w},T=Object.assign({},y,B);C=x,k.push(T)}return k}}function Xe(n){const v=Y(n),s=v.width,u=v.height;return Math.min(s,u)}function Ye(n,v){const s=n.length,u=n.map(h=>h.value??0).reduce((h,w)=>h+w,0),d=v/u,p=[];let c,g;for(let h=0;h<s;h+=1)g=n[h],c=Object.assign({},g,{normalizedValue:g.value*(d||0)}),p.push(c);return p}function Y(n){const{x0:v,y0:s,x1:u,y1:d}=n;return{xOffset:v,yOffset:s,width:u-v,height:d-s}}function Ze(n,v,s,u){let d=n,p=v,c=s,g=u;for(;;){const h=d.length;if(h===0){const k=xe(p,c);return g.concat(k)}const w=Xe(c),C=d[0],b=d.slice(1,h);if(Ue(p,C,w)){const k=p.concat(C);d=b,p=k,c=c,g=g}else{const k=p.length;let f=0;for(let T=0;T<k;T+=1)f+=p[T].normalizedValue;const y=Je(c,f),x=xe(p,c),B=g.concat(x);d=d,p=[],c=y,g=B}}}function Te(n){if(typeof n.children>"u"||!n.children.length)return[n];{const v=Ye(n.children,je(n)),s=Ze(v,[],n,[]),u=s.length,d=[];for(let c=0;c<u;c+=1)d.push(Te(s[c]));return We(d)}}function Je(n,v){const{width:s,height:u,xOffset:d,yOffset:p}=Y(n);if(s>=u){const c=v/u,g=s-c,h={xOffset:d+c,yOffset:p,width:g,height:u};return we(h)}else{const c=v/s,g=u-c,h={xOffset:d,yOffset:p+c,width:s,height:g};return we(h)}}const Ke=n=>(e.pushScopeId("data-v-d58b1737"),n=n(),e.popScopeId(),n),Qe=["id"],et=["xmlns","viewBox"],tt={key:0},ot=["id"],lt=["stop-color"],at=["stop-color"],nt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],rt=["x","y","height","width"],ut={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},st=Ke(()=>e.createElementVNode("br",null,null,-1)),it={key:5,class:"vue-data-ui-watermark"},ct=["onClick"],dt={key:0},vt={key:1},ht=["innerHTML"],pt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:v,emit:s}){const u=n,{vue_ui_treemap:d}=r.useConfig(),p=e.useSlots();e.onMounted(()=>{p["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const c=e.computed(()=>!!u.dataset&&u.dataset.length),g=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),h=e.ref(r.createUid()),w=e.ref(!1),C=e.ref(""),b=e.ref(!1),k=e.ref(0),f=e.ref([]),y=e.ref(null),x=e.ref(null),B=e.ref(null),T=e.ref(null),Z=e.ref(null),J=e.ref(0),K=e.ref(0),Q=e.ref(0),t=e.computed({get:()=>oe(),set:o=>o}),{userOptionsVisible:U,setUserOptionsVisibility:ee,keepUserOptionState:te}=Me.useUserOptionState({config:t.value});function oe(){const o=ke.useNestedProp({userConfig:u.config,defaultConfig:d});return o.theme?{...ke.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>u.config,o=>{t.value=oe(),U.value=!t.value.showOnChartHover,J.value+=1,K.value+=1,Q.value+=1},{deep:!0});const{isPrinting:le,isImaging:ae,generatePdf:ne,generateImage:re}=ye.usePrinter({elementId:`treemap_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),Se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),O=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function ue(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(i=>{i.parentId=a.id,i.color=a.color}),ue(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{$e()});function $e(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),ue(V.value),t.value.responsive){const o=be.throttle(()=>{const{width:a,height:l}=be.useResponsive({chart:y.value,title:t.value.style.chart.title.text?x.value:null,legend:t.value.style.chart.legend.show?B.value:null,source:T.value,noTitle:Z.value});P.value.width=a,P.value.height=l});D.value=new ResizeObserver(o),D.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(V.value),A=e.computed(()=>W.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!f.value.includes(o.id))),L=e.computed(()=>V.value.filter(o=>!f.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),se=e.computed({get(){let o=[...A.value];return t.value.style.chart.layout.sorted&&(o=[...A.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function ie(o,a){return o.value/a}function Ne(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-ie(a,l);return r.lightenHexColor(o,i<0?0:i)}function ce(o,a,l,i){return o.map((m,_)=>{const H=Ne(r.convertColorToHex(a)||I.value[_]||r.palette[_]||r.palette[_%r.palette.length],m,i),Ve=ie(m,i);return{...m,color:H,proportion:Ve,parentName:l,children:m.children?ce(m.children,H,m.name,i):void 0}})}const F=e.computed(()=>Ge(se.value.map((o,a)=>{const l=o.children?o.children.reduce((i,m)=>i+m.value,0):o.value;return{value:o.value,id:o.id,children:o.children?ce(o.children.sort((i,m)=>m.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function de({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function ve({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function Be(o){b.value=o,k.value+=1}const R=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight})),S=e.ref(!1);function G(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=G(o,l.children);if(i)return i}}return null}function Oe(o){if(S.value)s("selectDatapoint",void 0),W.value=V.value;else{if(s("selectDatapoint",o),!G(o.parentId))return;W.value=[G(o.parentId)]}S.value=!S.value}const $=e.ref(null),he=e.computed(()=>V.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/V.value.map(l=>l.value).reduce((l,i)=>l+i,0),opacity:f.value.includes(o.id)?.5:1}))),Pe=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function pe(o){S.value=!1,$.value=null,f.value.includes(o.id)?f.value=f.value.filter(a=>a!==o.id):f.value.length<u.dataset.length-1&&f.value.push(o.id),s("selectLegend",se.value)}const j=e.ref(null);function _e({datapoint:o,seriesIndex:a}){$.value=o,j.value={datapoint:o,seriesIndex:a,config:t.value,series:A.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:A.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:A.value,config:t.value});else{let i="";i+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,i+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,i+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,C.value=`<div>${i}</div>`}w.value=!0}const N=e.computed(()=>{const o=F.value.map(l=>({name:l.name,color:l.color})),a=F.value.map(l=>l.value);return{head:o,body:a}});function fe(){e.nextTick(()=>{const o=N.value.head.map((i,m)=>[[i.name],[N.value.body[m]],[isNaN(N.value.body[m]/L.value)?"-":N.value.body[m]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((m,_)=>{const H=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[_],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[_],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:m.color,name:m.name,shape:"square"},H,isNaN(N.value.body[_]/L.value)?"-":r.dataLabel({v:N.value.body[_]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function ze(){return F.value}function ge(){O.value.showTable=!O.value.showTable}function me(){O.value.showTooltip=!O.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return v({getData:ze,generateCsv:fe,generateImage:re,generatePdf:ne,toggleTable:ge,toggleTooltip:me,toggleAnnotator:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:y,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`treemap_${h.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ee)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ee)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(qe.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:x,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Ee._sfc_main,{key:`title_${J.value}`,config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&c.value&&(e.unref(te)||e.unref(U))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref:"details",key:`user_option_${k.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:O.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(ne),onGenerateCsv:fe,onGenerateImage:e.unref(re),onToggleTable:ge,onToggleTooltip:me,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(te)?e.unref(U)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!S.value,"vue-data-ui-zoom-minus":S.value}),viewBox:`${R.value.startX} ${R.value.startY} ${R.value.width<=0?10:R.value.width} ${R.value.height<=0?10:R.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(De._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",tt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,at)],8,ot)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:de(l),width:ve(l),fill:g.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:m=>Oe(l),onMouseenter:()=>_e({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=m=>{$.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${$.value?$.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,nt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:de(l),width:ve(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",ut,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||S.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),st,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||S.value,fontSize:E(l),isZoom:S.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,rt))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:S.value,rect:$.value,config:t.value})),void 0,!0)],14,et)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ae.default,{key:6,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:B},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Re.Legend,{key:`legend_${Q.value}`,legendSet:he.value,config:Pe.value,id:`treemap_legend_${h.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>pe(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:m=>pe(l),style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),f.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",vt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",dt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ct)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:he.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:T,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Le._sfc_main,{show:O.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:C.value,isFullscreen:b.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ie.default,{key:8,hideDetails:"",config:{open:O.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Fe.DataTable,{key:`table_${K.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>O.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ht)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Qe))}},ft=He._export_sfc(pt,[["__scopeId","data-v-d58b1737"]]);exports.default=ft;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DtU3BvTq.cjs"),ye=require("./useResponsive-BJ7DTGpm.cjs"),Ie=require("./Title-BVwrrnjn.cjs"),ge=require("./usePrinter-CdEwyYTo.cjs"),ze=require("./Tooltip-CfsfUzgu.cjs"),Fe=require("./DataTable-C_6KWwfC.cjs"),Oe=require("./Legend-BkolTSZc.cjs"),Ae=require("./vue-ui-skeleton-BJjc2poJ.cjs"),De=require("./vue-ui-accordion-DP9u_TW0.cjs"),me=require("./useNestedProp-Bwqm-3kz.cjs"),qe=require("./PackageVersion-BV362f3w.cjs"),Me=require("./PenAndPaper-DvN8ocWC.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./Shape-VkiqMBJb.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=L=>(e.pushScopeId("data-v-8a0b99ad"),L=L(),e.popScopeId(),L),Ge=["id"],We=["xmlns","viewBox"],He=["id"],Ye=["stop-color"],Xe=["stop-color"],Je=["id"],Ke=be(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Qe=be(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Ze=[Ke,Qe],et=["x","y","height","width"],tt=["height","width"],lt={key:0},at=["rx","x","y","height","width","stroke","stroke-width","filter"],ot=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],rt={key:1},nt=["rx","x","y","height","width","fill","filter"],ut=["x","y","height","width","filter"],st={key:0},it={key:1},ct={key:2},dt={key:3},vt=["onMouseover","x","y","height","width"],pt={key:5,class:"vue-data-ui-watermark"},ht=["onClick"],ft={key:0},yt={key:1},gt=["innerHTML"],mt={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(L,{expose:ke,emit:we}){const p=L,{vue_ui_waffle:Ce}=u.useConfig(),xe=e.useSlots(),T=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(u.createUid()),Be=e.ref(null),A=e.ref(!1),D=e.ref(""),B=e.ref(null),G=e.ref(0),_=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(null),X=e.ref(null),J=e.ref(0),K=e.ref(0),Q=e.ref(0),t=e.computed({get:()=>te(),set:l=>l}),{userOptionsVisible:q,setUserOptionsVisibility:Z,keepUserOptionState:ee}=Re.useUserOptionState({config:t.value});function te(){const l=me.useNestedProp({userConfig:p.config,defaultConfig:Ce});return l.theme?{...me.useNestedProp({userConfig:u.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>p.config,l=>{t.value=te(),q.value=!t.value.showOnChartHover,le(),J.value+=1,K.value+=1,Q.value+=1},{deep:!0});const E=e.ref(null);function le(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ye.throttle(()=>{const{width:o,height:a}=ye.useResponsive({chart:_.value,title:t.value.style.chart.title.text?W.value:null,legend:t.value.style.chart.legend.show?H.value:null,source:Y.value,noTitle:X.value});C.value.width=o,C.value.height=a,y.value.width=o,y.value.height=a});E.value=new ResizeObserver(l),E.value.observe(_.value.parentNode)}}e.onMounted(()=>{le()}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});const{isPrinting:ae,isImaging:oe,generatePdf:re,generateImage:ne}=ge.usePrinter({elementId:`vue-ui-waffle_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),_e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),w=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),C=e.ref({height:512,width:512}),y=e.ref({top:0,left:0,height:512,width:512}),g=e.computed(()=>(y.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),m=e.computed(()=>(y.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),P=e.computed(()=>y.value.width/t.value.style.chart.layout.grid.size),I=e.computed(()=>y.value.height/t.value.style.chart.layout.grid.size);function se(l){const o=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,j)=>h+j,0),r=l.map(h=>h/a*o),n=r.map(Math.floor),i=r.map(h=>h%1);let v=o-n.reduce((h,j)=>h+j,0);for(;v>0;){let h=i.indexOf(Math.max(...i));n[h]+=1,i[h]=0,v-=1}return n}function ie(){return p.dataset.map((l,o)=>({...l,color:u.convertColorToHex(l.color)||ue.value[o]||u.palette[o]||u.palette[o%u.palette.length],uid:`serie_${o}`,absoluteIndex:o}))}const M=e.computed(()=>ie()),c=e.ref(M.value);e.watch(()=>p.dataset,l=>{c.value=ie()},{deep:!0});const Se=e.computed(()=>{const l=c.value.filter((o,a)=>!d.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,n)=>r+n,0));return se(l)}),$e=e.computed(()=>{const l=c.value.map((o,a)=>(o.values||[]).reduce((r,n)=>r+n));return se(l)}),V=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&u.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),c.value.filter((l,o)=>!d.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:Se.value[o]})))),Ne=e.computed(()=>c.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:$e.value[o]})));function Le(){return Ne.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Pe=e.computed(()=>{let l=0;return V.value.map((o,a)=>{const r=l,n=r+o.proportion,i=[];for(let v=Math.floor(r);v<Math.floor(n);v+=1)i.push(v);return l=n,{...o,start:r,rects:i}})}),s=e.computed(()=>Pe.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),S=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(g.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(m.value+t.value.style.chart.layout.grid.spaceBetween)+y.value.top});return l}),d=e.ref([]),x=e.ref(!1),ce=e.ref(null),de=e.ref(null);function ve(l){if(!t.value.useAnimation){d.value.includes(l)?d.value=d.value.filter(n=>n!==l):d.value.length<$.value.length-1&&$.value.length>1&&d.value.push(l);return}const o=M.value.find(n=>n.uid===l).values.reduce((n,i)=>n+i,0),a=c.value.find(n=>n.uid===l).values.reduce((n,i)=>n+i,0);let r=a;if(d.value.includes(l)){let i=function(){r>n?(cancelAnimationFrame(ce.value),c.value=c.value.map((v,h)=>v.uid===l?{...v,values:[n]}:v),x.value=!1):(x.value=!0,r+=n*.025,c.value=c.value.map((v,h)=>v.uid===l?{...v,values:[r]}:v),ce.value=requestAnimationFrame(i))};d.value=d.value.filter(v=>v!==l);const n=o;i()}else if(d.value.length<$.value.length-1&&$.value.length>1){let n=function(){r<a/100?(cancelAnimationFrame(de.value),d.value.push(l),c.value=c.value.map((i,v)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,r/=1.15,c.value=c.value.map(i=>i.uid===l?{...i,values:[r]}:i),de.value=requestAnimationFrame(n))};n()}we("selectLegend",V.value.map(n=>({name:n.name,color:n.color,value:n.value,proportion:n.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const $=e.computed(()=>c.value.map((l,o)=>({name:l.name,color:l.color||ue[o]||u.palette[o]||u.palette[o%u.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map(l=>({...l,proportion:l.value/c.value.map(o=>(o.values||[]).reduce((a,r)=>a+r,0)).reduce((o,a)=>o+a,0),opacity:d.value.includes(l.uid)?.5:1,segregate:()=>ve(l.uid),isSegregated:d.value.includes(l.uid)}))),Ve=e.computed(()=>({cy:"waffle-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),b=e.computed(()=>V.value.map(l=>l.value).reduce((l,o)=>l+o,0)),R=e.ref(null);function Te(l){if(d.value.length===p.dataset.length)return;const o=s.value[l];R.value={datapoint:o,seriesIndex:o.absoluteIndex,series:c.value,config:t.value},A.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(u.isFunction(a)&&u.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value})))D.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value});else{let r="";if(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${o.color}" />${xe.pattern?`<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${f.value}_${o.absoluteIndex})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const n=u.dataLabel({v:o.value/b.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?r+=`<span>(${n})</span></div>`:r+=`<b>${n}%</b></div>`}D.value=r}}const k=e.computed(()=>{const l=V.value.map(a=>({name:a.name,color:a.color})),o=V.value.map(a=>a.value);return{head:l,body:o}});function z(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${f.value})`:""}function pe(){e.nextTick(()=>{const l=k.value.head.map((r,n)=>[[r.name],[k.value.body[n]],[isNaN(k.value.body[n]/b.value)?"-":k.value.body[n]/b.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=u.createCsvContent(o);u.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const F=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,b.value,u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:b.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],o=k.value.head.map((n,i)=>[{color:n.color,name:n.name},u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,k.value.body[i],u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(k.value.body[i]/b.value)?"-":u.dataLabel({v:k.value.body[i]/b.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),N=e.ref(!1);function Ee(l){N.value=l,G.value+=1}function he(){w.value.showTable=!w.value.showTable}function fe(){w.value.showTooltip=!w.value.showTooltip}const O=e.ref(!1);function U(){O.value=!O.value}return ke({getData:Le,generatePdf:re,generateCsv:pe,generateImage:ne,toggleTable:he,toggleTooltip:fe,toggleAnnotator:U}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:_,id:`vue-ui-waffle_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Z)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Me.PenAndPaper,{key:0,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:O.value,onClose:U},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:W,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Ie._sfc_main,{key:`title_${J.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&T.value&&(e.unref(ee)||e.unref(q))?(e.openBlock(),e.createBlock(ge.UserOptions,{ref_key:"details",ref:Be,key:`user_options_${G.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ae),isImaging:e.unref(oe),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:w.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:O.value,onToggleFullscreen:Ee,onGeneratePdf:e.unref(re),onGenerateCsv:pe,onGenerateImage:e.unref(ne),onToggleTable:he,onToggleTooltip:fe,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(ee)?e.unref(q)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${C.value.width<=0?10:C.value.width} ${C.value.height<=0?10:C.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(qe._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(u.setOpacity)(e.unref(u.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Xe)],8,He))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Ze,8,Je)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:m.value<=0?1e-4:m.value,width:g.value<=0?1e-4:g.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:s.value[r].color,...s.value[r]},isSelected:[null,void 0].includes(B.value)?!0:s.value[r].serieIndex===B.value})),void 0,!0)],8,et))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:y.value.height-24,width:y.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,tt)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,a=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.normalizeProps(e.guardReactiveProps({seriesIndex:a.absoluteIndex,patternId:`pattern_${f.value}_${a.absoluteIndex}`})),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:m.value<=0?1e-4:m.value,width:g.value<=0?1e-4:g.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:z(s.value[r].serieIndex)},null,8,at))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:m.value<=0?1e-4:m.value,width:g.value<=0?1e-4:g.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${f.value}_${r})`:s.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:z(s.value[r].serieIndex)},null,8,ot))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:m.value<=0?1e-4:m.value,width:g.value<=0?1e-4:g.value,fill:`url(#pattern_${f.value}_${s.value[r].absoluteIndex})`,stroke:"none",filter:z(s.value[r].serieIndex)},null,8,nt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&s.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:I.value<=0?1e-4:I.value,width:P.value*t.value.style.chart.layout.grid.size<=0?1e-4:P.value*t.value.style.chart.layout.grid.size,filter:z(s.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${P.value/12}px;color:${e.unref(u.adaptColorToBackground)(s.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(u.abbreviate)({source:s.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",it,e.toDisplayString(e.unref(u.dataLabel)({v:s.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",ct," ("+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",dt,e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a})),1)):e.createCommentVNode("",!0)],4)],8,ut)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:n=>Te(r),onMouseleave:o[0]||(o[0]=n=>{A.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:I.value<=0?1e-4:I.value,width:P.value<=0?1e-4:P.value,fill:"transparent",stroke:"none"},null,40,vt))),256)),e.renderSlot(l.$slots,"svg",{svg:C.value},void 0,!0)],14,We)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",pt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ae.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:H},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Oe.Legend,{key:`legend_${Q.value}`,legendSet:$.value,config:Ve.value,onClickMarker:o[1]||(o[1]=({legend:a})=>ve(a.uid))},e.createSlots({item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${d.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:x.value}),{datapoint:a}))+" ",1),d.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",yt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ft," ("+e.toDisplayString(isNaN(a.value/b.value)?"-":e.unref(u.dataLabel)({v:a.value/b.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,ht)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:a,index:r})=>[e.createVNode(Ue._sfc_main,{shape:a.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:Y,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:w.value.showTooltip&&A.value&&d.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:_.value,content:D.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),T.value?(e.openBlock(),e.createBlock(De.default,{key:8,hideDetails:"",config:{open:w.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Fe.DataTable,{key:`table_${K.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>w.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,gt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ge))}},bt=je._export_sfc(mt,[["__scopeId","data-v-8a0b99ad"]]);exports.default=bt;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DtU3BvTq.cjs"),W=require("./Title-BVwrrnjn.cjs"),E=require("./usePrinter-CdEwyYTo.cjs"),M=require("./useResponsive-BJ7DTGpm.cjs"),J=require("./vue-ui-skeleton-BJjc2poJ.cjs"),T=require("./useNestedProp-Bwqm-3kz.cjs"),K=require("./PackageVersion-BV362f3w.cjs"),Q=require("./PenAndPaper-DvN8ocWC.cjs"),Z=require("./useUserOptionState-BgepsfED.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],ne=["xmlns","viewBox"],oe=["width","height"],le=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ae=["cx","cy","r","stroke","stroke-width"],re=["x","y","font-size","fill","font-weight"],se={key:5,class:"vue-data-ui-watermark"},ue={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(V,{expose:q}){const c=V,{vue_ui_wheel:U}=s.useConfig(),p=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),y=e.ref(s.createUid()),R=e.ref(null),w=e.ref(0),v=e.ref(null),C=e.ref(null),b=e.ref(null),B=e.ref(null),P=e.ref(0),t=e.computed({get:()=>_(),set:n=>n}),{userOptionsVisible:m,setUserOptionsVisibility:S,keepUserOptionState:N}=Z.useUserOptionState({config:t.value});function _(){const n=T.useNestedProp({userConfig:c.config,defaultConfig:U});return n.theme?{...T.useNestedProp({userConfig:s.themes.vue_ui_wheel[n.theme]||c.config,defaultConfig:n})}:n}e.watch(()=>c.config,n=>{t.value=_(),m.value=!t.value.showOnChartHover,z(),P.value+=1},{deep:!0});const{isPrinting:O,isImaging:x,generatePdf:$,generateImage:A}=E.usePrinter({elementId:y.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),L=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),l=e.ref({size:360,height:360,width:360}),g=e.ref(t.value.style.chart.layout.percentage.fontSize),i=e.computed(()=>({radius:Math.min(l.value.width,l.value.height)*.9/2,centerX:l.value.width/2,centerY:l.value.height/2}));function I(n,r=1){return{x:i.value.centerX+i.value.radius*Math.cos(29.85+n*Math.PI/180)*r,y:i.value.centerY+i.value.radius*Math.sin(29.85+n*Math.PI/180)*r}}const a=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,n=>{t.value.style.chart.animation.use?F(n.percentage):a.value=n.percentage||0},{deep:!0});const d=e.ref(null);e.onMounted(()=>{z()});function z(){if(s.objectIsEmpty(c.dataset)&&s.error({componentName:"VueUiWheel",type:"dataset"}),F(c.dataset.percentage||0),t.value.responsive){const n=M.throttle(()=>{const{width:r,height:o}=M.useResponsive({chart:v.value,title:t.value.style.chart.title.text?C.value:null,source:b.value,noTitle:B.value});l.value.width=r,l.value.height=o,g.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(r,o)});d.value=new ResizeObserver(n),d.value.observe(v.value.parentNode)}}e.onBeforeUnmount(()=>{d.value&&d.value.disconnect()});function F(n){let r=t.value.style.chart.animation.speed;const o=Math.abs(n-a.value)/(r*120);function u(){a.value<n?a.value=Math.min(a.value+o,n):a.value>n&&(a.value=Math.max(a.value-o,n)),a.value!==n&&requestAnimationFrame(u)}u()}const j=e.computed(()=>{const n=[];for(let o=0;o<100;o+=1){const u=a.value>o?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:H,y:X}=I(l.value.size/100*o),{x:D,y:Y}=I(l.value.size/100*o,t.value.style.chart.layout.wheel.ticks.sizeRatio);n.push({x1:H,y1:X,x2:D,y2:Y,color:t.value.style.chart.layout.wheel.ticks.gradient.show?s.shiftHue(u,o/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):u})}return n}),h=e.ref(!1);function G(n){h.value=n,w.value+=1}const f=e.ref(!1);function k(){f.value=!f.value}return q({generatePdf:$,generateImage:A,toggleAnnotator:k}),(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:v,id:y.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:r[0]||(r[0]=()=>e.unref(S)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(S)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Q.PenAndPaper,{key:0,parent:v.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:k},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),L.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:B,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:C,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(W._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value&&(e.unref(N)||e.unref(m))?(e.openBlock(),e.createBlock(E.UserOptions,{ref_key:"details",ref:R,key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(x),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,chartElement:v.value,onToggleFullscreen:G,onGeneratePdf:e.unref($),onGenerateImage:e.unref(A),onToggleAnnotator:k,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(m)?"visible":"hidden":"visible"})},e.createSlots({_:2},[n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,n.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(n.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),viewBox:`0 0 ${l.value.width<=0?10:l.value.width} ${l.value.height<=0?10:l.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(K._sfc_main),n.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width<=0?10:l.value.width,height:l.value.height<=0?10:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(n.$slots,"chart-background",{},void 0,!0)],8,oe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(o,u)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2,stroke:o.color,"stroke-width":5/360*Math.min(l.value.width,l.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u<=a.value})},null,10,le))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:i.value.centerX,cy:i.value.centerY,r:i.value.radius*.8<=0?1e-4:i.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ae)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:i.value.centerX,y:i.value.centerY+g.value/3,"font-size":g.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(s.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,a.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(s.checkNaN)(a.value),e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(a.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,re)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"svg",{svg:l.value},void 0,!0)],14,ne)):e.createCommentVNode("",!0),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(x)})),void 0,!0)])):e.createCommentVNode("",!0),n.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:b,dir:"auto"},[e.renderSlot(n.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,te))}},ie=ee._export_sfc(ue,[["__scopeId","data-v-9a761d10"]]);exports.default=ie;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DtU3BvTq.cjs"),xe=require("./Title-BVwrrnjn.cjs"),ue=require("./usePrinter-CdEwyYTo.cjs"),j=require("./useResponsive-BJ7DTGpm.cjs"),$e=require("./vue-ui-accordion-DP9u_TW0.cjs"),Ne=require("./DataTable-C_6KWwfC.cjs"),Te=require("./BaseIcon-64qWZUaJ.cjs"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=require("./useNestedProp-Bwqm-3kz.cjs"),Pe=require("./PackageVersion-BV362f3w.cjs"),Be=require("./Tooltip-CfsfUzgu.cjs"),Fe=require("./PenAndPaper-DvN8ocWC.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Oe=c=>(e.pushScopeId("data-v-b4e6aee9"),c=c(),e.popScopeId(),c),Ve={"data-html2canvas-ignore":""},Ae={key:0,class:"reset-wrapper"},Ee={key:1,class:"reset-wrapper"},_e={class:"mono-slicer"},Me=Oe(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),Ie=["min","max","value"],Re={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(c,{emit:P}){const s=c;e.useCssVars(y=>({"782b8172":E.value,"102109e6":x.value,"642212d7":g.value,"1f5369d4":c.selectColor,"22b98ab8":b.value}));const E=e.computed(()=>s.inputColor),b=e.computed(()=>s.background),g=e.computed(()=>`${s.selectColor}33`),x=e.computed(()=>s.borderColor);function $(){P("reset")}const p=e.computed(()=>{const y=s.max-s.min,m=0,k=(s.value-s.min)/y*100;return{left:`${m}%`,width:`${k-m}%`,background:s.selectColor}});return(y,m)=>(e.openBlock(),e.createElementBlock("div",Ve,[c.value!==c.source?(e.openBlock(),e.createElementBlock("div",Ae,[c.useResetSlot?e.renderSlot(y.$slots,"reset-action",{key:1,reset:$},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:$},[e.createVNode(Te.default,{name:"refresh",stroke:c.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Ee)),e.createElementVNode("div",_e,[Me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(p.value)},null,4),e.createElementVNode("input",{type:"range",min:c.min,max:c.max,value:Number(c.value),onInput:m[0]||(m[0]=k=>P("update:value",Number(k.target.value)))},null,40,Ie)])]))}},qe=ce._export_sfc(Re,[["__scopeId","data-v-b4e6aee9"]]),Ue=["id"],We=["xmlns","viewBox"],De=["width","height"],Ge=["transform"],Le=["fill","font-weight","x","y","font-size","transform","onMouseover"],je={key:4,class:"vue-data-ui-watermark"},He=["innerHTML"],Xe={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(c,{expose:P}){const s=c,{vue_ui_word_cloud:E}=u.useConfig(),b=e.computed({get(){return!!s.dataset&&s.dataset.length},set(o){return o}}),g=e.ref(typeof s.dataset=="string"?u.createWordCloudDatasetFromPlainText(s.dataset):s.dataset.map((o,a)=>({...o,value:u.checkNaN(o.value)}))),x=e.ref(u.createUid()),$=e.ref(0),p=e.ref(null),y=e.ref(null),m=e.ref(null),k=e.ref(0),H=e.ref(0),_=e.ref(!1),t=e.computed({get:()=>J(),set:o=>o}),{userOptionsVisible:M,setUserOptionsVisibility:X,keepUserOptionState:Y}=ze.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:s.config,defaultConfig:E});return o.theme?{...ie.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||s.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}e.watch(()=>s.config,o=>{t.value=J(),M.value=!t.value.showOnChartHover,Q(),k.value+=1,H.value+=1,I()},{deep:!0});const K=e.ref(null),C=e.ref(0),r=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),de=j.throttle(()=>{const{width:o,height:a}=j.useResponsive({chart:p.value,title:t.value.style.chart.title.text?y.value:null,slicer:t.value.style.chart.zoom.show&&K.value,source:m.value});r.value.width=o,r.value.height=a,e.nextTick(q)});e.watch(()=>C.value,()=>{ve()});const ve=j.debounce(()=>{q()},10);function I(){C.value=R.value}const B=e.ref(null);e.onMounted(()=>{Q(),I()});function Q(){u.objectIsEmpty(s.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):g.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{b.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(B.value=new ResizeObserver(de),B.value.observe(p.value.parentNode))}e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Z,isImaging:ee,generatePdf:te,generateImage:oe}=ue.usePrinter({elementId:`wordCloud_${x.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),d=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function he(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function pe(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function me(o,a,l){const i=[],n={x:-a/2,y:-l/2,width:a,height:l},v=0,h=0;return o.forEach(S=>{let G=!1;for(let A=0;A<Math.max(a,l)/2&&!G;A+=t.value.style.chart.words.packingWeight)for(let L=0;L<360&&!G;L+=t.value.style.chart.words.packingWeight){const se=L*Math.PI/180,be=v+A*Math.cos(se)-S.width/2,ke=h+A*Math.sin(se)-S.height/2,f={...S,x:be,y:ke},Ce=f.x>=n.x&&f.y>=n.y&&f.x+f.width<=n.x+n.width&&f.y+f.height<=n.y+n.height,we=i.some(Se=>pe(f,Se));Ce&&!we&&(i.push(f),G=!0)}}),i}const N=e.ref([]);e.watch(()=>s.dataset,q,{immediate:!0});const R=e.computed(()=>Math.round(Math.min(...g.value.map(o=>o.value)))),le=e.computed(()=>Math.round(Math.max(...g.value.map(o=>o.value))));function q(){const o=[...g.value].filter(n=>n.value>=C.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),i=[...g.value].filter(n=>n.value>=C.value).map((n,v)=>{let h=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;h=isNaN(h)?r.value.minFontSize:h;const S=he(n.name,h);return{...n,id:u.createUid(),fontSize:h,width:S.width,height:S.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[v]||t.value.customPalette[v%t.value.customPalette.length]||u.palette[v]||u.palette[v%u.palette.length]:t.value.style.chart.words.color}});N.value=me(i,r.value.width,r.value.height).sort((n,v)=>v.fontSize-n.fontSize)}const F=e.computed(()=>{const o=N.value.map(l=>({name:l.name,color:l.color})),a=N.value.map(l=>l.value);return{head:o,body:a}});function ae(){e.nextTick(()=>{const o=F.value.head.map((i,n)=>[[i.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const z=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,v)=>{const h=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[v],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},h]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),O=e.ref(!1);function fe(o){O.value=o,$.value+=1}function ge(){return N.value}function ne(){d.value.showTable=!d.value.showTable}function re(){d.value.showTooltip=!d.value.showTooltip}const V=e.ref(!1);function U(){V.value=!V.value}P({getData:ge,generateCsv:ae,generatePdf:te,generateImage:oe,toggleTable:ne,toggleTooltip:re,toggleAnnotator:U});const w=e.ref(null),T=e.ref(!1),W=e.ref(""),D=e.ref(null);function ye(o){if(!d.value.showTooltip)return;w.value=o.id,D.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(T.value=!1,u.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(W.value=l,T.value=!0)}catch{console.warn("Custom format cannot be applied."),T.value=!1}if(!T.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;W.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}_.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:p,id:`wordCloud_${x.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Fe.PenAndPaper,{key:0,parent:p.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:V.value,onClose:U},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:y,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(xe._sfc_main,{key:`title_${k.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(Y)||e.unref(M))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(ee),uid:x.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:O.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:d.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:V.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(te),onGenerateCsv:ae,onGenerateImage:e.unref(oe),onToggleTable:ne,onToggleTooltip:re,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(M)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":O.value,"vue-data-ui-fulscreen--off":!O.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Pe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,De)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:i,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":w.value&&w.value===l.id&&d.value.showTooltip,"word-not-selected":w.value&&w.value!==l.id&&d.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>ye(l),onMouseleave:a[0]||(a[0]=n=>{w.value=null,_.value=!1}),style:e.normalizeStyle(`animation-delay:${i*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Le))]))),256))],8,Ge),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,We)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Z)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:d.value.showTooltip&&_.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:p.value,content:W.value,isCustom:T.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:K,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&R.value<le.value?(e.openBlock(),e.createBlock(qe,{key:0,value:C.value,"onUpdate:value":a[1]||(a[1]=l=>C.value=l),min:R.value,max:le.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:I},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:m,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock($e.default,{key:6,hideDetails:"",config:{open:d.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${H.value}`,colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>d.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,He)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Ue))}},Ye=ce._export_sfc(Xe,[["__scopeId","data-v-5e126e12"]]);exports.default=Ye;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-DtU3BvTq.cjs"),V=require("./DataTable-C_6KWwfC.cjs"),z=require("./Title-BVwrrnjn.cjs"),v=require("./Tooltip-CfsfUzgu.cjs"),E=require("./usePrinter-CdEwyYTo.cjs"),P=require("./Shape-VkiqMBJb.cjs"),M=require("./BaseIcon-64qWZUaJ.cjs"),T=require("./vue-ui-table-sparkline-CUD-P2XB.cjs"),D=require("./vue-ui-skeleton-BJjc2poJ.cjs"),R=require("./Slicer-D8EYKe1g.cjs"),H=require("./vue-ui-accordion-DP9u_TW0.cjs"),p=require("./useNestedProp-Bwqm-3kz.cjs"),W=require("./PackageVersion-BV362f3w.cjs"),q=require("./PenAndPaper-DvN8ocWC.cjs"),t=require("vue"),Y=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X=h.createUid(),U={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},components:{DataTable:V.DataTable,Shape:P._sfc_main,Title:z._sfc_main,Tooltip:v._sfc_main,UserOptions:E.UserOptions,BaseIcon:M.default,TableSparkline:T.default,Skeleton:D.default,Slicer:R.Slicer,Accordion:H.default,PackageVersion:W._sfc_main,PenAndPaper:q.PenAndPaper},data(){this.dataset.forEach((c,l)=>{[null,void 0].includes(c.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:l})});const r=this.config.downsample&&this.config.downsample.threshold?this.config.downsample.threshold:500,i=Math.max(...this.dataset.map(c=>this.largestTriangleThreeBucketsArray({data:c.series,threshold:r}).length)),o={start:0,end:i};return{themePalettes:h.themePalettes,themes:h.themes,slicerStep:0,selectedScale:null,CTX:null,CANVAS:null,opacity:h.opacity,useSafeValues:!0,palette:h.palette,height:600,width:1e3,viewBox:"0 0 1000 600",clientPosition:{x:0,y:0},canvasClientPosition:{x:0,y:0},icons:{line:"line",bar:"bar",plot:"plot"},isAnnotator:!1,isFullscreen:!1,isPrinting:!1,isImaging:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},showTooltip:!0,showTable:!1,isStacked:!1,useIndividualScale:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:h.createUid(),step:0,tableStep:0,titleStep:0,slicer:o,__to__:null,maxX:i,showSparklineTable:!0,segregateStep:0,sliderId:X,fontSizes:{xAxis:18,yAxis:12,dataLabels:20,plotLabels:10},plotRadii:{plot:3,line:3},selectedMinimapIndex:null,showUserOptionsOnChartHover:!1,keepUserOptionState:!0,userOptionsVisible:!0}},watch:{dataset:{handler(r,i){this.maxX=Math.max(...this.dataset.map(o=>this.largestTriangleThreeBucketsArray({data:o.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length)),this.slicer={start:0,end:this.maxX},this.slicerStep+=1,this.segregateStep+=1},deep:!0},config:{handler(r,i){this.FINAL_CONFIG=this.prepareConfig(),this.prepareChart(),this.titleStep+=1,this.tableStep+=1},deep:!0}},computed:{optimize(){return{linePlot:this.maxSeries>this.FINAL_CONFIG.line.dot.hideAboveMaxSerieLength}},hasOptionsNoTitle(){return this.FINAL_CONFIG.chart.userOptions.show&&(!this.FINAL_CONFIG.chart.title.show||!this.FINAL_CONFIG.chart.title.text)},minimap(){if(!this.FINAL_CONFIG.chart.zoom.minimap.show)return[];const r=this.datasetWithIds.filter(l=>!this.segregatedSeries.includes(l.id)),i=Math.max(...r.map(l=>l.series.length)),o=[];for(let l=0;l<i;l+=1)o.push(r.map(e=>e.series[l]||0).reduce((e,m)=>(e||0)+(m||0),0));const c=Math.min(...o);return o.map(l=>l+(c<0?Math.abs(c):0))},customPalette(){return this.convertCustomPalette(this.FINAL_CONFIG.customPalette)},backgroundColor(){return this.FINAL_CONFIG.chart.backgroundColor},slicerColor(){return this.FINAL_CONFIG.chart.zoom.color},allScales(){const r=this.lineSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height,autoScaleYLabels:l.autoScaleYLabels})),i=this.barSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height})),o=this.plotSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height})),c=[...r,...i,...o].flatMap(l=>l).length;return[...r,...i,...o].flatMap((l,e)=>({id:l.id,scaleLabel:l.scaleLabel,name:l.name,color:l.color,scale:l.scale,yOffset:l.yOffset,individualHeight:l.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/c*(e+1),yLabels:l.scaleYLabels||l.scale.ticks.map(m=>({y:m>=0?l.zero-l.individualHeight*(m/l.max):l.zero+l.individualHeight*Math.abs(m)/l.max,value:m}))}))},isDataset(){return!!this.dataset&&this.dataset.length},chartFont(){const r=document.getElementById(`vue-ui-xy_${this.uniqueId}`);return window.getComputedStyle(r,null).getPropertyValue("font-family")},FINAL_CONFIG:{get:function(){return this.prepareConfig()},set:function(r){return r}},hasHighlightArea(){return Array.isArray(this.FINAL_CONFIG.chart.highlightArea)?this.FINAL_CONFIG.chart.highlightArea.some(r=>r.show):this.FINAL_CONFIG.chart.highlightArea&&this.FINAL_CONFIG.chart.highlightArea.show},highlightAreas(){if(Array.isArray(this.FINAL_CONFIG.chart.highlightArea))return this.FINAL_CONFIG.chart.highlightArea.map(i=>({...i,span:i.from===i.to?1:i.to<i.from?0:i.to-i.from+1}));const r=this.FINAL_CONFIG.chart.highlightArea;return[{...r,span:r.from===r.to?1:r.to<r.from?0:r.to-r.from+1}]},xPadding(){return this.FINAL_CONFIG.chart.grid.position==="middle"?0:this.drawingArea.width/this.maxSeries/2},relativeZero(){return[null,void 0].includes(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin)?this.niceScale.min>=0?0:Math.abs(this.niceScale.min):-this.niceScale.min},absoluteMax(){return this.niceScale.max+this.relativeZero},datasetWithIds(){return this.useSafeValues?this.dataset.map((r,i)=>({...r,series:this.largestTriangleThreeBucketsArray({data:r.series,threshold:this.FINAL_CONFIG.downsample.threshold}),id:`uniqueId_${i}`})):this.dataset},safeDataset(){return this.useSafeValues?this.dataset.map((r,i)=>{const o=this.largestTriangleThreeBucketsArray({data:r.series,threshold:this.FINAL_CONFIG.downsample.threshold});return{...r,slotAbsoluteIndex:i,series:o.map(c=>this.isSafeValue(c)?c:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(r.color?r.color:this.customPalette[i]?this.customPalette[i]:this.palette[i]),id:`uniqueId_${i}`}}):this.dataset},relativeDataset(){return this.safeDataset.map((r,i)=>({...r,series:r.series.map(o=>o+this.relativeZero),absoluteValues:r.series})).filter(r=>!this.segregatedSeries.includes(r.id))},tableSparklineDataset(){return this.relativeDataset.map(r=>{const i=r.absoluteValues.map(o=>[void 0,null].includes(o)?0:o);return{id:r.id,name:r.name,color:r.color,values:this.fillArray(this.maxSeries,i)}})},tableSparklineConfig(){return{responsiveBreakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint,roundingValues:this.FINAL_CONFIG.table.rounding,showAverage:!1,showMedian:!1,showTotal:!1,fontFamily:this.FINAL_CONFIG.chart.fontFamily,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix,colNames:JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),thead:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},tbody:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},userOptions:{show:!1}}},absoluteDataset(){return this.safeDataset.map((r,i)=>({absoluteIndex:i,...r,series:r.series.map(o=>o+this.relativeZero),absoluteValues:r.series,segregate:()=>this.segregate(r),isSegregated:this.segregatedSeries.includes(r.id)}))},barSet(){return this.activeSeriesWithStackRatios.filter(r=>r.type==="bar").map((r,i)=>{this.checkAutoScaleError(r);const o=Math.min(...r.absoluteValues.filter(g=>![null,void 0].includes(g))),c=Math.max(...r.absoluteValues.filter(g=>![null,void 0].includes(g))),e={ratios:r.absoluteValues.filter(g=>![null,void 0].includes(g)).map(g=>(g-o)/(c-o)),valueMin:o,valueMax:c<0?0:c},m={max:r.scaleMax||Math.max(...r.absoluteValues)||1,min:r.scaleMin||Math.min(...r.absoluteValues.filter(g=>![void 0,null].includes(g)))>0?0:Math.min(...r.absoluteValues.filter(g=>![null,void 0].includes(g)))},I=r.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,_=1.0000001,u=this.calculateNiceScaleWithExactExtremes(m.min,m.max===m.min?m.max*_:m.max,I),f=this.calculateNiceScaleWithExactExtremes(e.valueMin,e.valueMax===e.valueMin?e.valueMax*_:e.valueMax,I),O=u.min>=0?0:Math.abs(u.min),C=0,A=u.max+O,y=f.max+Math.abs(C),N=this.mutableConfig.isStacked?this.drawingArea.height*(1-r.cumulatedStackRatio):0,b=this.mutableConfig.isStacked?this.drawingArea.height*r.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,w=this.drawingArea.bottom-N-b*O/A,a=this.drawingArea.bottom-N-b*C/y,n=this.absoluteDataset.filter(g=>g.type==="bar").filter(g=>!this.segregatedSeries.includes(g.id)).length,s=r.series.map((g,S)=>{const F=this.mutableConfig.useIndividualScale?(r.absoluteValues[S]+O)/A:this.ratioToMax(g),k=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*S:this.drawingArea.left+this.slot.bar*i+this.slot.bar*S*n-this.barSlot/2-i*this.barPeriodGap;return{yOffset:this.checkNaN(N),individualHeight:this.checkNaN(b),x:this.checkNaN(k),y:this.drawingArea.bottom-N-b*F,value:r.absoluteValues[S],zeroPosition:this.checkNaN(w),individualMax:this.checkNaN(A),comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[S]||""}}),d=r.absoluteValues.map(g=>f.min>=0?(g-Math.abs(f.min))/(f.max-Math.abs(f.min)):(g+Math.abs(f.min))/(f.max+Math.abs(f.min))),G=r.series.map((g,S)=>{const F=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*S:this.drawingArea.left-this.slot.bar/2+this.slot.bar*i+this.slot.bar*S*this.absoluteDataset.filter(k=>k.type==="bar").filter(k=>!this.segregatedSeries.includes(k.id)).length;return{yOffset:this.checkNaN(N),individualHeight:this.checkNaN(b),x:this.checkNaN(F),y:this.checkNaN(this.drawingArea.bottom-this.checkNaN(N)-(this.checkNaN(b)*d[S]||0)),value:r.absoluteValues[S],zeroPosition:this.checkNaN(w),individualMax:this.checkNaN(A),comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[S]||""}}),x=u.ticks.map(g=>({y:g>=0?w-b*(g/A):w+b*Math.abs(g)/A,value:g,prefix:r.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:r.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:r})),L=f.ticks.map(g=>{const S=(g-f.min)/(f.max-f.min);return{y:g>=0?a-b*S:a+b*S,value:g,prefix:r.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:r.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:r}});return{...r,yOffset:N,autoScaleYLabels:L,individualHeight:b,scaleYLabels:r.autoScaling?L:x,individualScale:r.autoScaling?f:u,individualMax:r.autoScaling?y:A,zeroPosition:r.autoScaling?a:w,plots:r.autoScaling?G:s}})},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(r=>!this.segregatedSeries.includes(r.id)))},lineSet(){return this.activeSeriesWithStackRatios.filter(r=>r.type==="line").map(r=>{this.checkAutoScaleError(r);const i=Math.min(...r.absoluteValues.filter(F=>![void 0,null].includes(F))),o=Math.max(...r.absoluteValues.filter(F=>![void 0,null].includes(F)))||1,l={ratios:r.absoluteValues.filter(F=>![null,void 0].includes(F)).map(F=>(F-i)/(o-i)),valueMin:i,valueMax:o},e={max:r.scaleMax||Math.max(...r.absoluteValues)||1,min:r.scaleMin||(Math.min(...r.absoluteValues)>0?0:Math.min(...r.absoluteValues))},m=r.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=1.0000001,_=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*I:e.max,m),u=this.calculateNiceScaleWithExactExtremes(l.valueMin,l.valueMax===l.valueMin?l.valueMax*I:l.valueMax,m),f=_.min>=0?0:Math.abs(_.min),O=0,C=_.max+Math.abs(f),A=u.max+Math.abs(O),y=this.mutableConfig.isStacked?this.drawingArea.height*(1-r.cumulatedStackRatio):0,N=this.mutableConfig.isStacked?this.drawingArea.height*r.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-y-N*f/C,w=this.drawingArea.bottom-y-N*O/A,a=r.series.map((F,k)=>{const B=this.mutableConfig.useIndividualScale?(r.absoluteValues[k]+Math.abs(f))/C:this.ratioToMax(F);return{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*k),y:this.checkNaN(this.drawingArea.bottom-y-N*B),value:r.absoluteValues[k],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),n=r.absoluteValues.map(F=>u.min>=0?(F-Math.abs(u.min))/(u.max-Math.abs(u.min)):(F+Math.abs(u.min))/(u.max+Math.abs(u.min))),s=r.series.map((F,k)=>[void 0,null].includes(r.absoluteValues[k])?{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*k),y:b,value:r.absoluteValues[k],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[k]||""}:{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*k),y:this.checkNaN(this.drawingArea.bottom-y-(N*n[k]||0)),value:r.absoluteValues[k],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[k]||""}),d=this.createSmoothPath(a),G=this.createSmoothPath(s),x=this.createStraightPath(a),L=this.createStraightPath(s),g=_.ticks.map(F=>({y:F>=0?b-N*(F/C):b+N*Math.abs(F)/C,value:F,prefix:r.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:r.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:r})),S=u.ticks.map(F=>{const k=(F-u.min)/(u.max-u.min);return{y:F>=0?w-N*k:w+N*k,value:F,prefix:r.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:r.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:r}});return{...r,yOffset:y,autoScaleYLabels:S,individualHeight:N,scaleYLabels:r.autoScaling?S:g,individualScale:r.autoScaling?u:_,individualMax:r.autoScaling?A:C,zeroPosition:r.autoScaling?w:b,curve:r.autoScaling?G:d,plots:r.autoScaling?s:a,area:r.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(r.autoScaling?s:a,r.autoScaling?w:b):this.createArea(a):"",straight:r.autoScaling?L:x}})},plotSet(){return this.activeSeriesWithStackRatios.filter(r=>r.type==="plot").map(r=>{this.checkAutoScaleError(r);const i=Math.min(...r.absoluteValues.filter(x=>![null,void 0].includes(x))),o=Math.max(...r.absoluteValues.filter(x=>![null,void 0].includes(x)))||1,l={ratios:r.absoluteValues.filter(x=>![null,void 0].includes(x)).map(x=>(x-i)/(o-i)),valueMin:i,valueMax:o},e={max:r.scaleMax||Math.max(...r.absoluteValues)||1,min:r.scaleMin||Math.min(...r.absoluteValues)>0?0:Math.min(...r.absoluteValues)},m=r.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=1.0000001,_=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*I:e.max,m),u=this.calculateNiceScaleWithExactExtremes(l.valueMin,l.valueMax===l.valueMin?l.valueMax*I:l.valueMax,m),f=_.min>=0?0:Math.abs(_.min),O=0,C=_.max+f,A=u.max+Math.abs(O),y=this.mutableConfig.isStacked?this.drawingArea.height*(1-r.cumulatedStackRatio):0,N=this.mutableConfig.isStacked?this.drawingArea.height*r.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-y-N*f/C,w=this.drawingArea.bottom-y-N*O/A,a=r.series.map((x,L)=>{const g=this.mutableConfig.useIndividualScale?(r.absoluteValues[L]+Math.abs(f))/C:this.ratioToMax(x);return{x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*L),y:this.checkNaN(this.drawingArea.bottom-y-N*g),value:r.absoluteValues[L],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[L]||""}}),n=r.absoluteValues.map(x=>u.min>=0?(x-Math.abs(u.min))/(u.max-Math.abs(u.min)):(x+Math.abs(u.min))/(u.max+Math.abs(u.min))),s=r.series.map((x,L)=>({x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*L),y:this.checkNaN(this.drawingArea.bottom-y-(N*n[L]||0)),value:r.absoluteValues[L],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[L]||""})),d=_.ticks.map(x=>({y:x>=0?b-N*(x/C):b+N*Math.abs(x)/C,value:x,prefix:r.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:r.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:r})),G=u.ticks.map(x=>{const L=(x-u.min)/(u.max-u.min);return{y:x>=0?w-N*L:w+N*L,value:x,prefix:r.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:r.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:r}});return{...r,yOffset:y,autoScaleYLabels:G,individualHeight:N,scaleYLabels:r.autoScaling?G:d,individualScale:r.autoScaling?u:_,individualMax:r.autoScaling?A:C,zeroPosition:r.autoScaling?w:b,plots:r.autoScaling?s:a}})},drawingArea(){const r=this.mutableConfig.useIndividualScale&&this.FINAL_CONFIG.chart.grid.labels.show?this.absoluteDataset.filter(i=>!this.segregatedSeries.includes(i.id)).length*(this.mutableConfig.isStacked?0:this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth):0;return{top:this.FINAL_CONFIG.chart.padding.top,right:this.width-this.FINAL_CONFIG.chart.padding.right,bottom:this.height-this.FINAL_CONFIG.chart.padding.bottom,left:this.FINAL_CONFIG.chart.padding.left+r,height:this.height-(this.FINAL_CONFIG.chart.padding.top+this.FINAL_CONFIG.chart.padding.bottom),width:this.width-(this.FINAL_CONFIG.chart.padding.right+this.FINAL_CONFIG.chart.padding.left+r)}},max(){return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax?this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax:Math.max(...this.safeDataset.filter(r=>!this.segregatedSeries.includes(r.id)).map(r=>Math.max(...r.series)))},min(){if(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin!==null)return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin;const r=Math.min(...this.safeDataset.filter(i=>!this.segregatedSeries.includes(i.id)).map(i=>Math.min(...i.series)));return r>0?0:r},niceScale(){return this.calculateNiceScaleWithExactExtremes(this.min,this.max<0?0:this.max,this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps)},maxSeries(){return this.slicer.end-this.slicer.start},timeLabels(){const r=Math.max(...this.dataset.map(o=>this.largestTriangleThreeBucketsArray({data:o.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length)),i=[];for(let o=0;o<r;o+=1)i.push({text:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[o]||String(o),absoluteIndex:o});return i.slice(this.slicer.start,this.slicer.end)},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(r=>r.type==="bar").filter(r=>!this.segregatedSeries.includes(r.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},barSlot(){const r=this.safeDataset.filter(i=>i.type==="bar").filter(i=>!this.segregatedSeries.includes(i.id)).length;return this.drawingArea.width/this.maxSeries/r-this.barPeriodGap*r},barPeriodGap(){return this.slot.line*this.FINAL_CONFIG.bar.periodGap},maxSlot(){return Math.max(...Object.values(this.slot).filter(r=>r!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[],config:{},columnNames:[]};const r=this.relativeDataset.map(o=>({label:o.name,color:o.color,type:o.type})),i=[];return this.timeLabels.forEach((o,c)=>{const l=[o.text];this.relativeDataset.forEach(e=>{l.push(this.canShowValue(e.absoluteValues[c])?Number(e.absoluteValues[c].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),i.push(l)}),{head:r,body:i}},dataTable(){const r=this.FINAL_CONFIG.table.showSum;let i=[""].concat(this.relativeDataset.map(e=>e.name));r&&(i=i.concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>'));let o=[];for(let e=0;e<this.maxSeries;e+=1){const m=this.relativeDataset.map(I=>I.absoluteValues[e]??0).reduce((I,_)=>I+_,0);o.push([this.timeLabels[e].text??"-"].concat(this.relativeDataset.map(I=>this.applyDataLabel(I.type==="line"?this.FINAL_CONFIG.line.labels.formatter:I.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,I.absoluteValues[e]??0,this.dataLabel({p:I.prefix||this.FINAL_CONFIG.chart.labels.prefix,v:I.absoluteValues[e]??0,s:I.suffix||this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.table.rounding})))).concat(r?(m??0).toFixed(this.FINAL_CONFIG.table.rounding):[]))}const c={th:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},td:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},breakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint},l=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(e=>e.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:i,body:o,config:c,colNames:l}},dataTooltipSlot(){return{datapoint:this.selectedSeries,seriesIndex:this.selectedSerieIndex,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}},selectedSeries(){return this.relativeDataset.map(r=>({slotAbsoluteIndex:r.slotAbsoluteIndex,shape:r.shape||null,name:r.name,color:r.color,type:r.type,value:r.absoluteValues.find((i,o)=>o===this.selectedSerieIndex),comments:r.comments||[],prefix:r.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:r.suffix||this.FINAL_CONFIG.chart.labels.suffix}))},tooltipContent(){let r="",i=this.selectedSeries.map(l=>l.value).filter(l=>this.isSafeValue(l)&&l!==null).reduce((l,e)=>Math.abs(l)+Math.abs(e),0);const o=this.timeLabels[this.selectedSerieIndex],c=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(c)&&this.functionReturnsString(()=>c({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?c({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(o&&o.text&&this.FINAL_CONFIG.chart.tooltip.showTimeLabel&&(r+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${o.text}</div>`),this.selectedSeries.forEach(l=>{if(this.isSafeValue(l.value)){let e="",m="";switch(this.icons[l.type]){case"bar":e=`<svg viewBox="0 0 40 40" height="14" width="14">${this.$slots.pattern?`<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${l.color}" />`:""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${this.$slots.pattern?`url(#pattern_${this.uniqueId}_${l.slotAbsoluteIndex}`:l.color}" /></svg>`;break;case"line":!l.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(l.shape)?m=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${l.color}" />`:l.shape==="triangle"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:l.shape==="square"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:l.shape==="diamond"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:l.shape==="pentagon"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:l.shape==="hexagon"?m=`<path d="${h.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:l.shape==="star"&&(m=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${l.color}" points="${h.createStar({plot:{x:10,y:8},radius:4})}" />`),e=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${l.color}" />${m}</svg>`;break;case"plot":if(!l.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(l.shape)){e=`<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" /></svg>`;break}if(l.shape==="star"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" points="${h.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(l.shape==="triangle"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="square"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="diamond"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="pentagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="hexagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${h.createPolygonPath({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}}r+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${e}</div> ${l.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.applyDataLabel(l.type==="line"?this.FINAL_CONFIG.line.labels.formatter:l.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,l.value,this.dataLabel({p:l.prefix,v:l.value,s:l.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}),{datapoint:l}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${h.dataLabel({v:this.checkNaN(Math.abs(l.value)/i*100),s:"%",r:this.FINAL_CONFIG.chart.tooltip.roundingPercentage})})`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&l.comments.length&&l.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(r+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${l.color}">${l.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]}</div>`)}}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${this.FINAL_CONFIG.chart.tooltip.color}">${r}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(r=>({y:r>=0?this.zero-this.drawingArea.height*this.ratioToMax(r):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(r)),value:r,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix}))},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){this.prepareChart(),this.setupSlicer(),document.addEventListener("mousemove",r=>{this.clientPosition={x:r.clientX,y:r.clientY}})},methods:{abbreviate:h.abbreviate,adaptColorToBackground:h.adaptColorToBackground,applyDataLabel:h.applyDataLabel,assignStackRatios:h.assignStackRatios,calcLinearProgression:h.calcLinearProgression,calculateNiceScaleWithExactExtremes:h.calculateNiceScaleWithExactExtremes,checkNaN:h.checkNaN,closestDecimal:h.closestDecimal,convertColorToHex:h.convertColorToHex,convertConfigColors:h.convertConfigColors,convertCustomPalette:h.convertCustomPalette,createCsvContent:h.createCsvContent,createSmoothPath:h.createSmoothPath,createStraightPath:h.createStraightPath,createTSpans:h.createTSpans,dataLabel:h.dataLabel,downloadCsv:h.downloadCsv,error:h.error,forceValidValue:h.forceValidValue,functionReturnsString:h.functionReturnsString,hasDeepProperty:h.hasDeepProperty,isFunction:h.isFunction,isSafeValue:h.isSafeValue,largestTriangleThreeBucketsArray:h.largestTriangleThreeBucketsArray,objectIsEmpty:h.objectIsEmpty,setOpacity:h.setOpacity,shiftHue:h.shiftHue,translateSize:h.translateSize,treeShake:h.treeShake,useMouse:v.useMouse,useNestedProp:p.useNestedProp,setUserOptionsVisibility(r=!1){this.showUserOptionsOnChartHover&&(this.userOptionsVisible=r)},toggleAnnotator(){this.isAnnotator=!this.isAnnotator},selectTimeLabel(r,i){const o=this.relativeDataset.map(c=>({shape:c.shape||null,name:c.name,color:c.color,type:c.type,value:c.absoluteValues.find((l,e)=>e===i),comments:c.comments||[],prefix:c.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:c.suffix||this.FINAL_CONFIG.chart.labels.suffix}));this.$emit("selectTimeLabel",{datapoint:o,absoluteIndex:r.absoluteIndex,label:r.text})},getHighlightAreaPosition(r){const i=this.drawingArea.left+this.drawingArea.width/this.maxSeries*(r.from-this.slicer.start),o=this.drawingArea.width/(this.slicer.end-this.slicer.start)*r.span<0?1e-5:this.drawingArea.width/(this.slicer.end-this.slicer.start)*r.span;return{x:i<this.drawingArea.left?this.drawingArea.left:i,width:o}},prepareConfig(){const r=h.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return r;const i=this.useNestedProp({userConfig:this.config,defaultConfig:r});return this.config&&this.hasDeepProperty(this.config,"chart.highlightArea")&&(Array.isArray(this.config.chart.highlightArea)?i.chart.highlightArea=this.config.chart.highlightArea:i.chart.highlightArea=[this.config.chart.highlightArea]),this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMin")?i.chart.grid.labels.yAxis.scaleMin=this.config.chart.grid.labels.yAxis.scaleMin:i.chart.grid.labels.yAxis.scaleMin=null,this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMax")?i.chart.grid.labels.yAxis.scaleMax=this.config.chart.grid.labels.yAxis.scaleMax:i.chart.grid.labels.yAxis.scaleMax=null,this.config&&this.hasDeepProperty(this.config,"chart.zoom.startIndex")?i.chart.zoom.startIndex=this.config.chart.zoom.startIndex:i.chart.zoom.startIndex=null,this.config&&this.hasDeepProperty(this.config,"chart.zoom.endIndex")?i.chart.zoom.endIndex=this.config.chart.zoom.endIndex:i.chart.zoom.endIndex=null,i.theme?{...p.useNestedProp({userConfig:this.themes.vue_ui_xy[i.theme]||this.config,defaultConfig:i}),customPalette:this.themePalettes[i.theme]||this.palette}:i},prepareChart(){if(this.objectIsEmpty(this.dataset)?this.error({componentName:"VueUiXy",type:"dataset"}):this.dataset.forEach((r,i)=>{[null,void 0].includes(r.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:i})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(r=>{r.series.forEach((i,o)=>{this.isSafeValue(i)||console.warn(`VueUiXy has detected an unsafe value in your dataset:
|
|
2
|
-
-----> The serie '${r.name}' contains the value '${i}' at index ${o}.
|
|
3
|
-
'${i}' was converted to null to allow the chart to display.`)})}),this.showUserOptionsOnChartHover=this.FINAL_CONFIG.chart.userOptions.showOnChartHover,this.keepUserOptionState=this.FINAL_CONFIG.chart.userOptions.keepStateOnChartLeave,this.userOptionsVisible=!this.FINAL_CONFIG.chart.userOptions.showOnChartHover,this.mutableConfig={dataLabels:{show:!0},showTooltip:this.FINAL_CONFIG.chart.tooltip.show===!0,showTable:this.FINAL_CONFIG.showTable===!0,isStacked:this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked,useIndividualScale:this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale},this.FINAL_CONFIG.responsive){const i=this.$refs.chart.parentNode,{height:o,width:c}=i.getBoundingClientRect();let l=null,e=0;this.FINAL_CONFIG.chart.title.show&&(l=this.$refs.chartTitle,e=l.getBoundingClientRect().height);let m=null,I=0;this.FINAL_CONFIG.chart.zoom.show&&this.maxX>6&&this.isDataset&&(m=this.$refs.chartSlicer.$el,I=m.getBoundingClientRect().height);let _=null,u=0;this.FINAL_CONFIG.chart.legend.show&&(_=this.$refs.chartLegend,u=_.getBoundingClientRect().height);let f=0;this.$refs.source&&(f=this.$refs.source.getBoundingClientRect().height);let O=0;this.$refs.noTitle&&(O=this.$refs.noTitle.getBoundingClientRect().height),this.height=o-e-u-I-f-O,this.width=c,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes(),new ResizeObserver(A=>{for(const y of A)this.$refs.chartTitle&&(e=this.$refs.chartTitle.getBoundingClientRect().height),this.$refs.chartSlicer&&this.$refs.chartSlicer.$el&&(I=this.$refs.chartSlicer.$el.getBoundingClientRect().height),this.$refs.chartLegend&&(u=this.$refs.chartLegend.getBoundingClientRect().height),this.$refs.source&&(f=this.$refs.source.getBoundingClientRect().height),this.height=y.contentBoxSize[0].blockSize-e-u-I-f-24,this.width=y.contentBoxSize[0].inlineSize,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes()}).observe(i)}else this.height=this.FINAL_CONFIG.chart.height,this.width=this.FINAL_CONFIG.chart.width,this.viewBox=`0 0 ${this.width} ${this.height}`,this.fontSizes.dataLabels=this.FINAL_CONFIG.chart.grid.labels.fontSize,this.fontSizes.yAxis=this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,this.fontSizes.xAxis=this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,this.fontSizes.plotLabels=this.FINAL_CONFIG.chart.labels.fontSize,this.plotRadii.plot=this.FINAL_CONFIG.plot.radius,this.plotRadii.line=this.FINAL_CONFIG.line.radius},selectMinimapIndex(r){this.selectedMinimapIndex=r},convertSizes(){this.fontSizes.dataLabels=this.translateSize({relator:this.height,adjuster:400,source:this.FINAL_CONFIG.chart.grid.labels.fontSize,threshold:10,fallback:10}),this.fontSizes.yAxis=this.translateSize({relator:this.width,adjuster:1e3,source:this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,threshold:10,fallback:10}),this.fontSizes.xAxis=this.translateSize({relator:this.width,adjuster:1e3,source:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,threshold:10,fallback:10}),this.fontSizes.plotLabels=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.chart.labels.fontSize,threshold:10,fallback:10}),this.plotRadii.plot=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.plot.radius,threshold:1,fallback:1}),this.plotRadii.line=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.line.radius,threshold:1,fallback:1})},toggleStack(){this.mutableConfig.isStacked=!this.mutableConfig.isStacked,this.mutableConfig.isStacked?this.mutableConfig.useIndividualScale=!0:this.mutableConfig.useIndividualScale=this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale},toggleTable(){this.mutableConfig.showTable=!this.mutableConfig.showTable},toggleLabels(){this.mutableConfig.dataLabels.show=!this.mutableConfig.dataLabels.show},toggleTooltip(){this.mutableConfig.showTooltip=!this.mutableConfig.showTooltip},checkAutoScaleError(r){r.autoScaling&&(this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale||console.warn(`VueUiXy (datapoint: ${r.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`),this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked||console.warn(`VueUiXy (datapoint: ${r.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`))},createArea(r){if(!r[0])return[-10,-10,"",-10,-10];const i={x:r[0].x,y:this.zero},o={x:r.at(-1).x,y:this.zero},c=[];return r.forEach(l=>{c.push(`${l.x},${l.y} `)}),[i.x,i.y,...c,o.x,o.y].toString()},createIndividualArea(r,i){if(!r[0])return[-10,-10,"",-10,-10];const o={x:r[0]?r[0].x:Math.min(...r.filter(e=>!!e).map(e=>e.x)),y:i},c={x:r.at(-1)?r.at(-1).x:Math.min(...r.filter(e=>!!e).map(e=>e.x)),y:i},l=[];return r.filter(e=>!!e).forEach(e=>{l.push(`${e.x},${e.y} `)}),[o.x,o.y,...l,c.x,c.y].toString()},createStar:h.createStar,createPolygonPath:h.createPolygonPath,fillArray(r,i){let o=Array(r).fill(0);for(let c=0;c<i.length&&c<r;c+=1)o[c]=i[c];return o},async setupSlicer(){(this.FINAL_CONFIG.chart.zoom.startIndex!==null||this.FINAL_CONFIG.chart.zoom.endIndex!==null)&&this.$refs.chartSlicer?(this.FINAL_CONFIG.chart.zoom.startIndex!==null&&(await this.$nextTick(),await this.$nextTick(),this.$refs.chartSlicer.setStartValue(this.FINAL_CONFIG.chart.zoom.startIndex)),this.FINAL_CONFIG.chart.zoom.endIndex!==null&&(await this.$nextTick(),await this.$nextTick(),this.$refs.chartSlicer.setEndValue(this.validSlicerEnd(this.FINAL_CONFIG.chart.zoom.endIndex+1)))):(this.slicer={start:0,end:Math.max(...this.dataset.map(r=>this.largestTriangleThreeBucketsArray({data:r.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length))},this.slicerStep+=1)},refreshSlicer(){this.setupSlicer()},validSlicerEnd(r){const i=Math.max(...this.dataset.map(o=>this.largestTriangleThreeBucketsArray({data:o.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length));return r>i?i:r<0||this.FINAL_CONFIG.chart.zoom.startIndex!==null&&r<this.FINAL_CONFIG.chart.zoom.startIndex?this.FINAL_CONFIG.chart.zoom.startIndex!==null?this.FINAL_CONFIG.chart.zoom.startIndex+1:1:r},calcRectHeight(r){const i=![null,void 0].includes(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin)&&this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin>0&&this.min>=0?this.drawingArea.bottom:this.zero;return r.value>=0?this.checkNaN(i-r.y<=0?1e-5:i-r.y):this.checkNaN(r.y-this.zero<=0?1e-5:r.y-this.zero)},calcIndividualHeight(r){return r.value>=0?this.checkNaN(r.zeroPosition-r.y<=0?1e-5:r.zeroPosition-r.y):this.checkNaN(r.y-r.zeroPosition<=0?1e-5:r.zeroPosition-r.y)},calcRectWidth(){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.slot.line-this.drawingArea.width/this.maxSeries*.1:this.slot.bar},calcRectX(r){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?r.x+this.drawingArea.width/this.maxSeries*.05:r.x+this.slot.bar/2},calcRectY(r){return r.value>=0?r.y:this.zero},calcIndividualRectY(r){return r.value>=0?r.y:[null,void 0,NaN,1/0,-1/0].includes(r.zeroPosition)?0:r.zeroPosition},canShowValue(r){return![null,void 0,NaN,1/0,-1/0].includes(r)},findClosestValue(r,i){let o=i[0],c=Math.abs(r-i[0]);for(let l=1;l<i.length;l+=1){const e=Math.abs(r-i[l]);e<c&&i[l]<r&&(o=i[l],c=e)}return o},ratioToMax(r){return r/(this.canShowValue(this.absoluteMax)?this.absoluteMax:1)},selectX(r){this.$emit("selectX",{dataset:this.relativeDataset.map(i=>({name:i.name,value:[null,void 0,NaN].includes(i.absoluteValues[r])?null:i.absoluteValues[r],color:i.color,type:i.type})),index:r,indexLabel:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[r]})},getData(){return this.absoluteDataset.map(r=>({values:r.absoluteValues,color:r.color,name:r.name,type:r.type}))},segregate(r){if(this.segregatedSeries.includes(r.id))this.segregatedSeries=this.segregatedSeries.filter(i=>i!==r.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(r.id)}this.$emit("selectLegend",this.relativeDataset.map(i=>({name:i.name,values:i.absoluteValues,color:i.color,type:i.type}))),this.segregateStep+=1},toggleTooltipVisibility(r,i=null){this.isTooltip=r,r?this.selectedSerieIndex=i:this.selectedSerieIndex=null},toggleFullscreen(r){this.isFullscreen=r,this.step+=1},showSpinnerPdf(){this.isPrinting=!0},async generatePdf(){this.showSpinnerPdf(),clearTimeout(this.__to__),this.isPrinting=!0,this.__to__=setTimeout(async()=>{try{const{default:r}=await Promise.resolve().then(()=>require("./pdf-9cRTLjY8.cjs"));await r({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"})}catch(r){console.error("Error generating PDF:",r)}finally{this.isPrinting=!1}},100)},generateCsv(){const r=[[this.FINAL_CONFIG.chart.title.text],[this.FINAL_CONFIG.chart.title.subtitle.text],[""]],i=["",...this.table.head.map(e=>e.label)],o=this.table.body,c=r.concat([i]).concat(o),l=this.createCsvContent(c);this.downloadCsv({csvContent:l,title:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"})},showSpinnerImage(){this.isImaging=!0},async generateImage(){this.showSpinnerImage(),clearTimeout(this.__to__),this.isImaging=!0,this.__to__=setTimeout(async()=>{try{const{default:r}=await Promise.resolve().then(()=>require("./img-BFCs759q.cjs"));await r({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy",format:"png"})}catch(r){console.error("Error generating image:",r)}finally{this.isImaging=!1}},100)}}},Z=["id"],J={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%; background:transparent"},K=["viewBox"],Q=["x","y","width","height"],j={key:1},$={class:"vue-ui-xy-grid"},ee=["stroke","x1","x2","y1","y2"],te=["stroke","x1","x2","y1","y2"],le={key:1},re=["x1","x2","y1","y2","stroke"],ae=["x1","x2","y1","y2","stroke"],ie=["x1","x2","y1","y2","stroke"],se={key:3},ne=["x1","x2","y1","y2","stroke"],oe=["id"],ce=["stop-color"],he=["stop-color"],de=["stop-color"],ue=["id"],me=["stop-color"],ge=["stop-color"],fe=["stop-color"],Ne=["id"],Ie=["stop-color"],xe=["stop-color"],Fe=["id"],be=["stop-color"],ke=["stop-color"],_e=["id"],ye=["stop-color"],Ce=["stop-color"],Ae=["x","y","height","width","fill"],Le=["x","y","width"],Se=["x","y","height","width","fill"],we=["x","y","height","width","rx","fill","stroke","stroke-width"],Oe=["x","y","height","width","rx","fill","stroke","stroke-width"],Ge=["width","x","y"],ve={key:0},pe=["id"],Be=["fill"],Ve=["x1","x2","y1","y2","stroke","marker-end"],ze=["x","y","font-size","fill"],Ee=["stroke","x1","x2","y1","y2"],Pe={key:2},Me=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Te=["x","y","width","height","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray"],De={key:4},Re=["x1","x2","y1","y2","stroke","stroke-width"],He=["fill","font-size","transform"],We=["x1","x2","y1","y2","stroke"],qe=["x","y","font-size","fill"],Ye=["x1","x2","y1","y2","stroke"],Xe=["x","y","font-size","fill"],Ue=["width","x","y"],Ze={style:{width:"100%"}},Je={key:0},Ke=["id"],Qe=["fill"],je=["x1","x2","y1","y2","stroke","marker-end"],$e=["x","y","font-size","fill"],et=["d","stroke","stroke-width","stroke-dasharray"],tt=["d","stroke","stroke-width","stroke-dasharray"],lt={key:5},rt={key:0},at=["d","fill"],it=["d","fill"],st=["d","fill"],nt=["d","fill"],ot=["d","stroke","stroke-width","stroke-dasharray"],ct=["d","stroke","stroke-width","stroke-dasharray"],ht=["width","x","y"],dt={style:{width:"100%"}},ut={key:3},mt=["id"],gt=["fill"],ft=["x1","x2","y1","y2","stroke","marker-end"],Nt=["x","y","font-size","fill"],It={key:6},xt=["x","y","font-size","fill"],Ft=["x","y","font-size","fill","font-weight"],bt={key:7},kt=["x","y","font-size","fill"],_t=["x","y"],yt=["x","y"],Ct={key:8},At=["x","y","font-size","fill"],Lt=["x","y"],St=["x","y"],wt=["x","y","font-size","fill","innerHTML"],Ot=["x","y","font-size","fill","innerHTML"],Gt=["x","y","font-size","fill","innerHTML"],vt=["x","y","font-size","fill","innerHTML"],pt=["x","y","width","height","fill","onMouseenter"],Bt=["font-size","fill","transform"],Vt=["x","y","font-size","fill"],zt={key:10},Et=["text-anchor","font-size","fill","transform","onClick"],Pt=["x","y","height","width","onMouseenter","onClick"],Mt={key:11},Tt=["x","y"],Dt=["cx","cy","r","fill"],Rt={key:5,class:"vue-data-ui-watermark"},Ht=["onClick"],Wt={key:0,viewBox:"0 0 20 12",height:"14",width:"20"},qt=["stroke","fill"],Yt={key:1,viewBox:"0 0 40 40",height:"14",width:"14"},Xt=["fill"],Ut=["fill"],Zt={key:2,viewBox:"0 0 12 12",height:"14",width:"14"},Jt={key:9,ref:"chartLegend"},Kt={key:10,ref:"source",dir:"auto"},Qt={style:{display:"flex","flex-direction":"row",gap:"6px","align-items":"center","padding-left":"6px"},"data-html2canvas-ignore":""},jt=["innerHTML"];function $t(r,i,o,c,l,e){const m=t.resolveComponent("PenAndPaper"),I=t.resolveComponent("Title"),_=t.resolveComponent("UserOptions"),u=t.resolveComponent("PackageVersion"),f=t.resolveComponent("Shape"),O=t.resolveComponent("Skeleton"),C=t.resolveComponent("Slicer"),A=t.resolveComponent("Tooltip"),y=t.resolveComponent("BaseIcon"),N=t.resolveComponent("TableSparkline"),b=t.resolveComponent("DataTable"),w=t.resolveComponent("Accordion");return t.openBlock(),t.createElementBlock("div",{id:`vue-ui-xy_${l.uniqueId}`,class:t.normalizeClass(`vue-ui-xy ${l.isFullscreen?"vue-data-ui-wrapper-fullscreen":""} ${e.FINAL_CONFIG.useCssAnimation?"":"vue-ui-dna"}`),ref:"chart",style:t.normalizeStyle(`background:${e.FINAL_CONFIG.chart.backgroundColor}; color:${e.FINAL_CONFIG.chart.color};width:100%;font-family:${e.FINAL_CONFIG.chart.fontFamily};${e.FINAL_CONFIG.responsive?"height: 100%":""}`),onMouseenter:i[7]||(i[7]=()=>e.setUserOptionsVisibility(!0)),onMouseleave:i[8]||(i[8]=()=>e.setUserOptionsVisibility(!1))},[e.FINAL_CONFIG.chart.userOptions.buttons.annotator?(t.openBlock(),t.createBlock(m,{key:0,parent:r.$refs.chart,backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color,active:l.isAnnotator,onClose:e.toggleAnnotator},null,8,["parent","backgroundColor","color","active","onClose"])):t.createCommentVNode("",!0),e.hasOptionsNoTitle?(t.openBlock(),t.createElementBlock("div",J,null,512)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.title.show?(t.openBlock(),t.createElementBlock("div",{key:2,ref:"chartTitle",class:"vue-ui-xy-title",style:t.normalizeStyle(`font-family:${e.FINAL_CONFIG.chart.fontFamily}`)},[(t.openBlock(),t.createBlock(I,{key:`title_${l.titleStep}`,config:{title:{cy:"xy-div-title",...e.FINAL_CONFIG.chart.title},subtitle:{cy:"xy-div-subtitle",...e.FINAL_CONFIG.chart.title.subtitle}}},null,8,["config"]))],4)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.userOptions.show&&e.isDataset&&(l.keepUserOptionState||l.userOptionsVisible)?(t.openBlock(),t.createBlock(_,{ref:"defails",key:`user_options_${l.step}`,backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color,isPrinting:l.isPrinting,isImaging:l.isImaging,uid:l.uniqueId,hasTooltip:e.FINAL_CONFIG.chart.userOptions.buttons.tooltip&&e.FINAL_CONFIG.chart.tooltip.show,hasPdf:e.FINAL_CONFIG.chart.userOptions.buttons.pdf,hasXls:e.FINAL_CONFIG.chart.userOptions.buttons.csv,hasImg:e.FINAL_CONFIG.chart.userOptions.buttons.img,hasLabel:e.FINAL_CONFIG.chart.userOptions.buttons.labels,hasTable:e.FINAL_CONFIG.chart.userOptions.buttons.table,hasStack:o.dataset.length>1&&e.FINAL_CONFIG.chart.userOptions.buttons.stack,hasFullscreen:e.FINAL_CONFIG.chart.userOptions.buttons.fullscreen,isStacked:l.mutableConfig.isStacked,isFullscreen:l.isFullscreen,chartElement:r.$refs.chart,position:e.FINAL_CONFIG.chart.userOptions.position,isTooltip:l.mutableConfig.showTooltip,titles:{...e.FINAL_CONFIG.chart.userOptions.buttonTitles},hasAnnotator:e.FINAL_CONFIG.chart.userOptions.buttons.annotator,isAnnotation:l.isAnnotator,onToggleFullscreen:e.toggleFullscreen,onGeneratePdf:e.generatePdf,onGenerateCsv:e.generateCsv,onGenerateImage:e.generateImage,onToggleTable:e.toggleTable,onToggleLabels:e.toggleLabels,onToggleStack:e.toggleStack,onToggleTooltip:e.toggleTooltip,onToggleAnnotator:e.toggleAnnotator,style:t.normalizeStyle({visibility:l.keepUserOptionState?l.userOptionsVisible?"visible":"hidden":"visible"})},t.createSlots({_:2},[r.$slots.optionTooltip?{name:"optionTooltip",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionCsv?{name:"optionCsv",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,r.$slots.optionTable?{name:"optionTable",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,r.$slots.optionLabels?{name:"optionLabels",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,r.$slots.optionStack?{name:"optionStack",fn:t.withCtx(()=>[t.renderSlot(r.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:t.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[t.renderSlot(r.$slots,"optionFullscreen",t.normalizeProps(t.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"7"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:t.withCtx(({toggleAnnotator:a,isAnnotator:n})=>[t.renderSlot(r.$slots,"optionAnnotator",t.normalizeProps(t.guardReactiveProps({toggleAnnotator:a,isAnnotator:n})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasLabel","hasTable","hasStack","hasFullscreen","isStacked","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onToggleFullscreen","onGeneratePdf","onGenerateCsv","onGenerateImage","onToggleTable","onToggleLabels","onToggleStack","onToggleTooltip","onToggleAnnotator","style"])):t.createCommentVNode("",!0),e.isDataset?(t.openBlock(),t.createElementBlock("svg",{key:4,xmlns:"http://www.w3.org/2000/svg",class:t.normalizeClass([{"vue-data-ui-fullscreen--on":l.isFullscreen,"vue-data-ui-fulscreen--off":!l.isFullscreen},"vue-ui-xy-svg"]),width:"100%",viewBox:l.viewBox,style:t.normalizeStyle(`background: transparent; color:${e.FINAL_CONFIG.chart.color}; font-family:${e.FINAL_CONFIG.chart.fontFamily}`)},[t.createVNode(u),r.$slots["chart-background"]?(t.openBlock(),t.createElementBlock("foreignObject",{key:0,x:e.drawingArea.left+e.xPadding<0?0:e.drawingArea.left+e.xPadding,y:e.drawingArea.top,width:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries)<0?0:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries),height:e.drawingArea.height<0?0:e.drawingArea.height,style:{pointerEvents:"none"}},[t.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,Q)):t.createCommentVNode("",!0),e.maxSeries>0?(t.openBlock(),t.createElementBlock("g",j,[t.createElementVNode("g",$,[e.FINAL_CONFIG.chart.grid.labels.xAxis.showBaseline?(t.openBlock(),t.createElementBlock("line",{key:0,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(e.drawingArea.bottom),y2:e.forceValidValue(e.drawingArea.bottom),"stroke-linecap":"round"},null,8,ee)):t.createCommentVNode("",!0),l.mutableConfig.useIndividualScale?e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",null,[a.id===l.selectedScale&&a.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(a.yLabels,n=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(n.y),y2:e.forceValidValue(n.y),stroke:a.color,"stroke-width":.5,"stroke-linecap":"round"},null,8,ae))),256)):a.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(a.yLabels,n=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(n.y),y2:e.forceValidValue(n.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,ie))),256)):t.createCommentVNode("",!0)]))),256)):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.FINAL_CONFIG.chart.grid.labels.yAxis.showBaseline?(t.openBlock(),t.createElementBlock("line",{key:0,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.left+e.xPadding,y1:e.forceValidValue(e.drawingArea.top),y2:e.forceValidValue(e.drawingArea.bottom),"stroke-linecap":"round"},null,8,te)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(),t.createElementBlock("g",le,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.yLabels,a=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(a.y),y2:e.forceValidValue(a.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,re))),256))])):t.createCommentVNode("",!0)],64)),e.FINAL_CONFIG.chart.grid.showVerticalLines?(t.openBlock(),t.createElementBlock("g",se,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries+(e.FINAL_CONFIG.chart.grid.position==="middle"?1:0),(a,n)=>(t.openBlock(),t.createElementBlock("line",{key:`grid_vertical_line_${n}`,x1:e.drawingArea.width/e.maxSeries*n+e.drawingArea.left+e.xPadding,x2:e.drawingArea.width/e.maxSeries*n+e.drawingArea.left+e.xPadding,y1:e.forceValidValue(e.drawingArea.top),y2:e.forceValidValue(e.drawingArea.bottom),"stroke-width":"0.5",stroke:e.FINAL_CONFIG.chart.grid.stroke},null,8,ne))),128))])):t.createCommentVNode("",!0)]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(a,n)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_rect_${n}`},[t.createElementVNode("linearGradient",{id:`rectGradient_pos_${n}_${l.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,ce),t.createElementVNode("stop",{offset:"62%","stop-color":`${e.shiftHue(a.color,.02)}`},null,8,he),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,de)],8,oe),t.createElementVNode("linearGradient",{id:`rectGradient_neg_${n}_${l.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,me),t.createElementVNode("stop",{offset:"38%","stop-color":`${e.shiftHue(a.color,.02)}`},null,8,ge),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,fe)],8,ue)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,n)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_plot_${n}`},[t.createElementVNode("radialGradient",{id:`plotGradient_${n}_${l.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,Ie),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,xe)],8,Ne)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,n)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_line_${n}`},[t.createElementVNode("radialGradient",{id:`lineGradient_${n}_${l.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,be),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,ke)],8,Fe),t.createElementVNode("linearGradient",{id:`areaGradient_${n}_${l.uniqueId}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.setOpacity(e.shiftHue(a.color,.03),e.FINAL_CONFIG.line.area.opacity)}`},null,8,ye),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)}`},null,8,Ce)],8,_e)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.highlightAreas,a=>(t.openBlock(),t.createElementBlock("g",null,[a.show?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(a.span,(n,s)=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("rect",{style:t.normalizeStyle({transition:"none",opacity:a.from+s>=l.slicer.start&&a.from+s<=l.slicer.end-1?1:0}),x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.from+s-l.slicer.start),y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:e.setOpacity(a.color,a.opacity)},null,12,Ae),a.caption.text&&s===0?(t.openBlock(),t.createElementBlock("foreignObject",{key:0,x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.from+s-l.slicer.start)-(a.caption.width==="auto"?0:a.caption.width/2-e.drawingArea.width/e.maxSeries*a.span/2),y:e.drawingArea.top+a.caption.offsetY,style:t.normalizeStyle({overflow:"visible",opacity:a.to>=l.slicer.start&&a.from<l.slicer.end?1:0}),height:"1",width:a.caption.width==="auto"?e.drawingArea.width/e.maxSeries*a.span:a.caption.width},[t.createElementVNode("div",{style:t.normalizeStyle(`padding:${a.caption.padding}px;text-align:${a.caption.textAlign};font-size:${a.caption.fontSize}px;color:${a.caption.color};font-weight:${a.caption.bold?"bold":"normal"}`)},t.toDisplayString(a.caption.text),5)],12,Le)):t.createCommentVNode("",!0)]))),256)):t.createCommentVNode("",!0)]))),256)),t.createElementVNode("g",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`tooltip_trap_highlighter_${n}`},[t.createElementVNode("rect",{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*n,y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:[l.selectedMinimapIndex,l.selectedSerieIndex,l.selectedRowIndex].includes(n)?e.setOpacity(e.FINAL_CONFIG.chart.highlighter.color,e.FINAL_CONFIG.chart.highlighter.opacity):"transparent"},null,8,Se)]))),128))]),e.barSet.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.barSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_bar_${n}`,class:t.normalizeClass(`serie_bar_${n}`),style:t.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock("g",{key:`bar_plot_${n}_${d}`},[e.canShowValue(s.value)?(t.openBlock(),t.createElementBlock("rect",{key:0,x:e.calcRectX(s),y:l.mutableConfig.useIndividualScale?e.calcIndividualRectY(s):e.calcRectY(s),height:l.mutableConfig.useIndividualScale?Math.abs(e.calcIndividualHeight(s)):Math.abs(e.calcRectHeight(s)),width:e.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:e.barPeriodGap),rx:e.FINAL_CONFIG.bar.borderRadius,fill:e.FINAL_CONFIG.bar.useGradient?s.value>=0?`url(#rectGradient_pos_${n}_${l.uniqueId})`:`url(#rectGradient_neg_${n}_${l.uniqueId})`:a.color,stroke:e.FINAL_CONFIG.bar.border.useSerieColor?a.color:e.FINAL_CONFIG.bar.border.stroke,"stroke-width":e.FINAL_CONFIG.bar.border.strokeWidth},null,8,we)):t.createCommentVNode("",!0),e.canShowValue(s.value)&&r.$slots.pattern?(t.openBlock(),t.createElementBlock("rect",{key:1,x:e.calcRectX(s),y:l.mutableConfig.useIndividualScale?e.calcIndividualRectY(s):e.calcRectY(s),height:l.mutableConfig.useIndividualScale?Math.abs(e.calcIndividualHeight(s)):Math.abs(e.calcRectHeight(s)),width:e.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:e.barPeriodGap),rx:e.FINAL_CONFIG.bar.borderRadius,fill:`url(#pattern_${l.uniqueId}_${a.slotAbsoluteIndex})`,stroke:e.FINAL_CONFIG.bar.border.useSerieColor?a.color:e.FINAL_CONFIG.bar.border.stroke,"stroke-width":e.FINAL_CONFIG.bar.border.strokeWidth},null,8,Oe)):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,style:{overflow:"visible"},height:"12",width:(e.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:e.barPeriodGap)/2)+e.FINAL_CONFIG.chart.comments.width,x:e.calcRectX(s)-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:e.checkNaN(s.y)+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.renderSlot(r.$slots,"plot-comment",{plot:{...s,color:a.color,seriesIndex:n,datapointIndex:d}},void 0,!0)],8,Ge)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",ve,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`bar_arrow_${n}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,Be)],8,pe)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1,x2:e.calcLinearProgression(a.plots).x2,y1:e.forceValidValue(e.calcLinearProgression(a.plots).y1),y2:e.forceValidValue(e.calcLinearProgression(a.plots).y2),"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#bar_arrow_${n})`},null,8,Ve)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2,y:e.calcLinearProgression(a.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,ze)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)):t.createCommentVNode("",!0),!l.mutableConfig.useIndividualScale&&e.FINAL_CONFIG.chart.grid.labels.zeroLine.show?(t.openBlock(),t.createElementBlock("line",{key:1,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(e.zero),y2:e.forceValidValue(e.zero),"stroke-linecap":"round"},null,8,Ee)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.highlighter.useLine&&(![null,void 0].includes(l.selectedSerieIndex)||![null,void 0].includes(l.selectedMinimapIndex))?(t.openBlock(),t.createElementBlock("g",Pe,[t.createElementVNode("line",{x1:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((l.selectedSerieIndex!==null?l.selectedSerieIndex:0)||(l.selectedMinimapIndex!==null?l.selectedMinimapIndex:0))+e.drawingArea.width/e.maxSeries/2,x2:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((l.selectedSerieIndex!==null?l.selectedSerieIndex:0)||(l.selectedMinimapIndex!==null?l.selectedMinimapIndex:0))+e.drawingArea.width/e.maxSeries/2,y1:e.forceValidValue(e.drawingArea.top),y2:e.forceValidValue(e.drawingArea.bottom),stroke:e.FINAL_CONFIG.chart.highlighter.color,"stroke-width":e.FINAL_CONFIG.chart.highlighter.lineWidth,"stroke-dasharray":e.FINAL_CONFIG.chart.highlighter.lineDasharray,"stroke-linecap":"round",style:{transition:"none !important",animation:"none !important","pointer-events":"none"}},null,8,Me)])):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.frame.show?(t.openBlock(),t.createElementBlock("rect",{key:3,style:{pointerEvents:"none",transition:"none"},x:e.drawingArea.left+e.xPadding<0?0:e.drawingArea.left+e.xPadding,y:e.drawingArea.top,width:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries)<0?0:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries),height:e.drawingArea.height<0?0:e.drawingArea.height,fill:"transparent",stroke:e.FINAL_CONFIG.chart.grid.frame.stroke,"stroke-width":e.FINAL_CONFIG.chart.grid.frame.strokeWidth,"stroke-linecap":e.FINAL_CONFIG.chart.grid.frame.strokeLinecap,"stroke-linejoin":e.FINAL_CONFIG.chart.grid.frame.strokeLinejoin,"stroke-dasharray":e.FINAL_CONFIG.chart.grid.frame.strokeDasharray},null,8,Te)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.show?(t.openBlock(),t.createElementBlock("g",De,[l.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("line",{x1:a.x+e.xPadding,x2:a.x+e.xPadding,y1:l.mutableConfig.isStacked?e.forceValidValue(e.drawingArea.bottom-a.yOffset-a.individualHeight):e.forceValidValue(e.drawingArea.top),y2:l.mutableConfig.isStacked?e.forceValidValue(e.drawingArea.bottom-a.yOffset):e.forceValidValue(e.drawingArea.bottom),stroke:a.color,"stroke-width":e.FINAL_CONFIG.chart.grid.stroke,"stroke-linecap":"round",style:t.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},null,12,Re)]))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",{style:t.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},[t.createElementVNode("text",{fill:a.color,"font-size":l.fontSizes.dataLabels,"text-anchor":"middle",transform:`translate(${a.x-e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+5+e.xPadding}, ${l.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset-a.individualHeight/2:e.drawingArea.top+e.drawingArea.height/2}) rotate(-90)`},t.toDisplayString(a.name)+" "+t.toDisplayString(a.scaleLabel?`- ${a.scaleLabel}`:""),9,He),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.yLabels,(n,s)=>(t.openBlock(),t.createElementBlock("line",{x1:a.x-3+e.xPadding,x2:a.x+e.xPadding,y1:e.forceValidValue(n.y),y2:e.forceValidValue(n.y),stroke:a.color,"stroke-width":1,"stroke-linecap":"round"},null,8,We))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.yLabels,(n,s)=>(t.openBlock(),t.createElementBlock("text",{x:a.x-5+e.xPadding,y:e.forceValidValue(n.y)+l.fontSizes.dataLabels/3,"font-size":l.fontSizes.dataLabels,"text-anchor":"end",fill:a.color},t.toDisplayString(e.applyDataLabel(e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,n.value,e.dataLabel({p:n.prefix,v:n.value,s:n.suffix,r:1}),{datapoint:n.datapoint,seriesIndex:s})),9,qe))),256))],4))),256))],64)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.yLabels,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`yLabel_${n}`},[e.canShowValue(a)&&a.value>=e.niceScale.min&&a.value<=e.niceScale.max?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.left-5+e.xPadding,y1:e.forceValidValue(a.y),y2:e.forceValidValue(a.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1","stroke-linecap":"round"},null,8,Ye)):t.createCommentVNode("",!0),a.value>=e.niceScale.min&&a.value<=e.niceScale.max?(t.openBlock(),t.createElementBlock("text",{key:1,x:e.drawingArea.left-7+e.xPadding,y:e.checkNaN(a.y+l.fontSizes.dataLabels/3),"font-size":l.fontSizes.dataLabels,"text-anchor":"end",fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.canShowValue(a.value)?e.applyDataLabel(e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,a.value,e.dataLabel({p:a.prefix,v:a.value,s:a.suffix,r:1})):""),9,Xe)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_plot_${n}`,class:t.normalizeClass(`serie_plot_${n}`),style:t.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock("g",{key:`circle_plot_${n}_${d}`},[s&&e.canShowValue(s.value)?(t.openBlock(),t.createBlock(f,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",color:e.FINAL_CONFIG.plot.useGradient?`url(#plotGradient_${n}_${l.uniqueId})`:e.FINAL_CONFIG.plot.dot.useSerieColor?a.color:e.FINAL_CONFIG.plot.dot.fill,plot:{x:e.checkNaN(s.x),y:e.checkNaN(s.y)},radius:l.selectedSerieIndex!==null&&l.selectedSerieIndex===d||l.selectedMinimapIndex!==null&&l.selectedMinimapIndex===d?(l.plotRadii.plot||6)*1.5:l.plotRadii.plot||6,stroke:e.FINAL_CONFIG.plot.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:a.color,strokeWidth:e.FINAL_CONFIG.plot.dot.strokeWidth},null,8,["shape","color","plot","radius","stroke","strokeWidth"])):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:e.FINAL_CONFIG.chart.comments.width,x:s.x-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:s.y+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.createElementVNode("div",Ze,[t.renderSlot(r.$slots,"plot-comment",{plot:{...s,color:a.color,seriesIndex:n,datapointIndex:d}},void 0,!0)])],8,Ue)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",Je,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`plot_arrow_${n}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,Qe)],8,Ke)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1,x2:e.calcLinearProgression(a.plots).x2,y1:e.forceValidValue(e.calcLinearProgression(a.plots).y1),y2:e.forceValidValue(e.calcLinearProgression(a.plots).y2),"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#plot_arrow_${n})`},null,8,je)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2,y:e.calcLinearProgression(a.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,$e)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${n}`,class:t.normalizeClass(`serie_line_${n}`),style:t.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[a.smooth&&a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${a.curve}`,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,et)):a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${a.straight}`,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,tt)):t.createCommentVNode("",!0)],6))),128)),r.$slots.pattern?(t.openBlock(),t.createElementBlock("defs",lt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.safeDataset,(a,n)=>t.renderSlot(r.$slots,"pattern",t.mergeProps({key:`serie_pattern_slot_${n}`},{...a,seriesIndex:a.slotAbsoluteIndex,patternId:`pattern_${l.uniqueId}_${n}`}),void 0,!0)),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${n}`,class:t.normalizeClass(`serie_line_${n}`),style:t.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[a.useArea&&a.plots.length>1?(t.openBlock(),t.createElementBlock("g",rt,[a.smooth?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("path",{d:`M ${a.plots[0]?a.plots[0].x:Math.min(...a.plots.filter(s=>!!s).map(s=>s.x))},${l.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset:e.drawingArea.bottom} ${a.curve} L ${a.plots.at(-1)?a.plots.at(-1).x:e.drawingArea.left+e.slot.line*n+e.slot.line/2},${l.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset:e.drawingArea.bottom} Z`,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${n}_${l.uniqueId})`:e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)},null,8,at),r.$slots.pattern?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M ${a.plots[0]?a.plots[0].x:Math.min(...a.plots.filter(s=>!!s).map(s=>s.x))},${l.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset:e.drawingArea.bottom} ${a.curve} L ${a.plots.at(-1)?a.plots.at(-1).x:e.drawingArea.left+e.slot.line*n+e.slot.line/2},${l.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset:e.drawingArea.bottom} Z`,fill:`url(#pattern_${l.uniqueId}_${a.slotAbsoluteIndex})`},null,8,it)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("path",{d:`M${a.area}Z`,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${n}_${l.uniqueId})`:e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)},null,8,st),r.$slots.pattern?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${a.area}Z`,fill:`url(#pattern_${l.uniqueId}_${a.slotAbsoluteIndex})`},null,8,nt)):t.createCommentVNode("",!0)],64))])):t.createCommentVNode("",!0),a.smooth&&a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${a.curve}`,stroke:a.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none","stroke-linecap":"round"},null,8,ot)):a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:2,d:`M${a.straight}`,stroke:a.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,ct)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock("g",{key:`circle_line_${n}_${d}`},[!e.optimize.linePlot&&s&&e.canShowValue(s.value)||e.optimize.linePlot&&s&&e.canShowValue(s.value)&&(l.selectedSerieIndex!==null&&l.selectedSerieIndex===d||l.selectedMinimapIndex!==null&&l.selectedMinimapIndex===d)?(t.openBlock(),t.createBlock(f,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",color:e.FINAL_CONFIG.line.useGradient?`url(#lineGradient_${n}_${l.uniqueId})`:e.FINAL_CONFIG.line.dot.useSerieColor?a.color:e.FINAL_CONFIG.line.dot.fill,plot:{x:e.checkNaN(s.x),y:e.checkNaN(s.y)},radius:l.selectedSerieIndex!==null&&l.selectedSerieIndex===d||l.selectedMinimapIndex!==null&&l.selectedMinimapIndex===d?(l.plotRadii.line||6)*1.5:l.plotRadii.line||6,stroke:e.FINAL_CONFIG.line.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:a.color,strokeWidth:e.FINAL_CONFIG.line.dot.strokeWidth},null,8,["shape","color","plot","radius","stroke","strokeWidth"])):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:e.FINAL_CONFIG.chart.comments.width,x:s.x-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:s.y+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.createElementVNode("div",dt,[t.renderSlot(r.$slots,"plot-comment",{plot:{...s,color:a.color,seriesIndex:n,datapointIndex:d}},void 0,!0)])],8,ht)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",ut,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`line_arrow_${n}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,gt)],8,mt)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1,x2:e.calcLinearProgression(a.plots).x2,y1:e.forceValidValue(e.calcLinearProgression(a.plots).y1),y2:e.forceValidValue(e.calcLinearProgression(a.plots).y2),"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#line_arrow_${n})`},null,8,ft)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2,y:e.calcLinearProgression(a.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,Nt)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(e.FINAL_CONFIG.bar.labels.show||e.FINAL_CONFIG.bar.serieName.show)&&l.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",It,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_bar_${n}`,class:t.normalizeClass(`xLabel_bar_${n}`),style:t.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_bar_${n}_${d}`},[s&&(!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0||l.selectedSerieIndex!==null&&l.selectedSerieIndex===d||l.selectedMinimapIndex!==null&&l.selectedMinimapIndex===d)&&e.FINAL_CONFIG.bar.labels.show?(t.openBlock(),t.createElementBlock("text",{key:0,x:l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?s.x+e.slot.line/2:e.calcRectX(s)+e.calcRectWidth()/2-e.barPeriodGap/2,y:e.checkNaN(s.y)+(s.value>=0?e.FINAL_CONFIG.bar.labels.offsetY:-e.FINAL_CONFIG.bar.labels.offsetY*3),"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:e.FINAL_CONFIG.bar.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.bar.labels.formatter,s.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.bar.labels.rounding}),{datapoint:s,serie:a}):""),9,xt)):t.createCommentVNode("",!0),s&&e.FINAL_CONFIG.bar.serieName.show?(t.openBlock(),t.createElementBlock("text",{key:1,x:l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?s.x+e.slot.line/2:s.x+e.calcRectWidth()*1.1,y:s.y+(s.value>0?e.FINAL_CONFIG.bar.serieName.offsetY:-e.FINAL_CONFIG.bar.serieName.offsetY*3),"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:e.FINAL_CONFIG.bar.serieName.useSerieColor?a.color:e.FINAL_CONFIG.bar.serieName.color,"font-weight":e.FINAL_CONFIG.bar.serieName.bold?"bold":"normal"},t.toDisplayString(e.FINAL_CONFIG.bar.serieName.useAbbreviation?e.abbreviate({source:a.name,length:e.FINAL_CONFIG.bar.serieName.abbreviationSize}):a.name),9,Ft)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),e.FINAL_CONFIG.plot.labels.show&&l.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",bt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${n}`,class:t.normalizeClass(`xLabel_plot_${n}`),style:t.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${n}_${d}`},[s&&!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0||l.selectedSerieIndex!==null&&l.selectedSerieIndex===d||l.selectedMinimapIndex!==null&&l.selectedMinimapIndex===d?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x,y:s.y+e.FINAL_CONFIG.plot.labels.offsetY,"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:e.FINAL_CONFIG.plot.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.plot.labels.formatter,s.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.plot.labels.rounding}),{datapoint:s,serie:a}):""),9,kt)):t.createCommentVNode("",!0),s&&d===0&&a.useTag&&a.useTag==="start"?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,x:s.x,y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,_t)):t.createCommentVNode("",!0),s&&d===a.plots.length-1&&a.useTag&&a.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,x:s.x-a.name.length*(l.fontSizes.plotLabels/2),y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,yt)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),e.FINAL_CONFIG.line.labels.show&&l.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",Ct,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${n}`,class:t.normalizeClass(`xLabel_line_${n}`),style:t.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${n}_${d}`},[s&&!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0||l.selectedSerieIndex!==null&&l.selectedSerieIndex===d||l.selectedMinimapIndex!==null&&l.selectedMinimapIndex===d?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x,y:s.y+(s.value>=0?e.FINAL_CONFIG.line.labels.offsetY:-e.FINAL_CONFIG.line.labels.offsetY*3),"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:e.FINAL_CONFIG.line.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.line.labels.formatter,s.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.line.labels.rounding}),{datapoint:s,serie:a}):""),9,At)):t.createCommentVNode("",!0),s&&d===0&&a.useTag&&a.useTag==="start"?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,x:s.x,y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,Lt)):t.createCommentVNode("",!0),s&&d===a.plots.length-1&&a.useTag&&a.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,x:s.x-a.name.length*(l.fontSizes.plotLabels/2),y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,St)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${n}`,class:t.normalizeClass(`xLabel_line_${n}`),style:t.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${n}_${d}`},[s&&d===0&&a.showSerieName&&a.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x-l.fontSizes.plotLabels,y:s.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"end",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:l.fontSizes.plotLabels,fill:a.color,x:s.x-l.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,wt)):t.createCommentVNode("",!0),s&&d===a.plots.length-1&&a.showSerieName&&a.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:s.x+l.fontSizes.plotLabels,y:s.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"start",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:l.fontSizes.plotLabels,fill:a.color,x:s.x+l.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,Ot)):t.createCommentVNode("",!0)]))),128))],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${n}`,class:t.normalizeClass(`xLabel_plot_${n}`),style:t.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,d)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${n}_${d}`},[s&&d===0&&a.showSerieName&&a.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x-l.fontSizes.plotLabels,y:s.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"end",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:l.fontSizes.plotLabels,fill:a.color,x:s.x-l.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,Gt)):t.createCommentVNode("",!0),s&&d===a.plots.length-1&&a.showSerieName&&a.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:s.x+l.fontSizes.plotLabels,y:s.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"start",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:l.fontSizes.plotLabels,fill:a.color,x:s.x+l.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,vt)):t.createCommentVNode("",!0)]))),128))],6))),128)),l.mutableConfig.useIndividualScale&&!l.mutableConfig.isStacked?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:9},t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("rect",{x:a.x-e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+e.xPadding,y:e.drawingArea.top,width:e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,height:e.drawingArea.height<0?10:e.drawingArea.height,fill:l.selectedScale===a.id?e.setOpacity(a.color,20):"transparent",onMouseenter:n=>l.selectedScale=a.id,onMouseleave:i[0]||(i[0]=n=>l.selectedScale=null)},null,40,pt))),256)):t.createCommentVNode("",!0),t.createElementVNode("g",null,[e.FINAL_CONFIG.chart.grid.labels.axis.yLabel&&!l.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock("text",{key:0,"font-size":l.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color,transform:`translate(${l.fontSizes.yAxis+e.FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${e.drawingArea.top+e.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle",style:{transition:"none"}},t.toDisplayString(e.FINAL_CONFIG.chart.grid.labels.axis.yLabel),9,Bt)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.axis.xLabel?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:l.width/2,y:e.drawingArea.bottom+l.fontSizes.yAxis+l.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,"font-size":l.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.FINAL_CONFIG.chart.grid.labels.axis.xLabel),9,Vt)):t.createCommentVNode("",!0)]),e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show?(t.openBlock(),t.createElementBlock("g",zt,[r.$slots["time-label"]?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.timeLabels,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`time_label_${n}`},[t.renderSlot(r.$slots,"time-label",t.normalizeProps(t.guardReactiveProps({x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*n+e.drawingArea.width/e.maxSeries/2,y:e.drawingArea.bottom+l.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset,fontSize:l.fontSizes.xAxis,fill:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,transform:`translate(${e.drawingArea.left+e.drawingArea.width/e.maxSeries*n+e.drawingArea.width/e.maxSeries/2}, ${e.drawingArea.bottom+l.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`,absoluteIndex:a.absoluteIndex,content:a.text,textAnchor:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation>0?"start":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation<0?"end":"middle",show:a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(n===0||n===e.timeLabels.length-1)&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&l.selectedSerieIndex===n&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo&&n%Math.floor((this.slicer.end-this.slicer.start)/e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo)===0})),void 0,!0)]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.timeLabels,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`time_label_${n}`},[a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(n===0||n===e.timeLabels.length-1)&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&l.selectedSerieIndex===n&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo&&n%Math.floor((this.slicer.end-this.slicer.start)/e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo)===0?(t.openBlock(),t.createElementBlock("text",{key:0,"text-anchor":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation>0?"start":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation<0?"end":"middle","font-size":l.fontSizes.xAxis,fill:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,transform:`translate(${e.drawingArea.left+e.drawingArea.width/e.maxSeries*n+e.drawingArea.width/e.maxSeries/2}, ${e.drawingArea.bottom+l.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`,style:{cursor:"pointer"},onClick:()=>e.selectTimeLabel(a,n)},t.toDisplayString(a.text||""),9,Et)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),t.createElementVNode("g",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries,(a,n)=>(t.openBlock(),t.createElementBlock("g",{key:`tooltip_trap_${n}`},[t.createElementVNode("rect",{"data-cy-trap":"",x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*n,y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:"transparent",onMouseenter:s=>e.toggleTooltipVisibility(!0,n),onMouseleave:i[1]||(i[1]=s=>e.toggleTooltipVisibility(!1)),onClick:s=>e.selectX(n)},null,40,Pt)]))),128))]),e.FINAL_CONFIG.chart.timeTag.show&&(![null,void 0].includes(l.selectedSerieIndex)||![null,void 0].includes(l.selectedMinimapIndex))?(t.openBlock(),t.createElementBlock("g",Mt,[(t.openBlock(),t.createElementBlock("foreignObject",{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((l.selectedSerieIndex!==null?l.selectedSerieIndex:0)||(l.selectedMinimapIndex!==null?l.selectedMinimapIndex:0))-100+e.drawingArea.width/e.maxSeries/2,y:e.drawingArea.bottom,width:"200",height:"40",style:{overflow:"visible !important"}},[t.createElementVNode("div",{class:"vue-ui-xy-time-tag",style:t.normalizeStyle(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${e.FINAL_CONFIG.chart.timeTag.backgroundColor};color:${e.FINAL_CONFIG.chart.timeTag.color};font-size:${e.FINAL_CONFIG.chart.timeTag.fontSize}px`)},t.toDisplayString(e.timeLabels[(l.selectedSerieIndex!==null?l.selectedSerieIndex:0)||(l.selectedMinimapIndex!==null?l.selectedMinimapIndex:0)].text||(l.selectedSerieIndex!==null?l.selectedSerieIndex:0)||(l.selectedMinimapIndex!==null?l.selectedMinimapIndex:0)),5)],8,Tt)),t.createElementVNode("circle",{cx:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((l.selectedSerieIndex!==null?l.selectedSerieIndex:0)||(l.selectedMinimapIndex!==null?l.selectedMinimapIndex:0))+e.drawingArea.width/e.maxSeries/2,cy:e.drawingArea.bottom,r:e.FINAL_CONFIG.chart.timeTag.circleMarker.radius,fill:e.FINAL_CONFIG.chart.timeTag.circleMarker.color},null,8,Dt)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.renderSlot(r.$slots,"svg",{svg:e.svg},void 0,!0)],14,K)):t.createCommentVNode("",!0),r.$slots.watermark?(t.openBlock(),t.createElementBlock("div",Rt,[t.renderSlot(r.$slots,"watermark",t.normalizeProps(t.guardReactiveProps({isPrinting:l.isPrinting||l.isImaging})),void 0,!0)])):t.createCommentVNode("",!0),e.isDataset?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(O,{key:6,config:{type:"line",style:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,line:{axis:{color:e.FINAL_CONFIG.chart.grid.stroke},path:{color:e.FINAL_CONFIG.chart.grid.stroke,strokeWidth:.5}}}}},null,8,["config"])),e.FINAL_CONFIG.chart.zoom.show&&l.maxX>6&&e.isDataset?(t.openBlock(),t.createBlock(C,{ref:"chartSlicer",key:`slicer_${l.slicerStep}`,background:e.FINAL_CONFIG.chart.zoom.color,fontSize:e.FINAL_CONFIG.chart.zoom.fontSize,useResetSlot:e.FINAL_CONFIG.chart.zoom.useResetSlot,labelLeft:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l.slicer.start],labelRight:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l.slicer.end-1],textColor:e.FINAL_CONFIG.chart.color,inputColor:e.FINAL_CONFIG.chart.zoom.color,selectColor:e.FINAL_CONFIG.chart.zoom.highlightColor,borderColor:e.FINAL_CONFIG.chart.backgroundColor,minimap:e.minimap,smoothMinimap:e.FINAL_CONFIG.chart.zoom.minimap.smooth,minimapSelectedColor:e.FINAL_CONFIG.chart.zoom.minimap.selectedColor,minimapSelectionRadius:e.FINAL_CONFIG.chart.zoom.minimap.selectionRadius,minimapLineColor:e.FINAL_CONFIG.chart.zoom.minimap.lineColor,minimapSelectedColorOpacity:e.FINAL_CONFIG.chart.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:l.selectedSerieIndex,minimapIndicatorColor:e.FINAL_CONFIG.chart.zoom.minimap.indicatorColor,verticalHandles:e.FINAL_CONFIG.chart.zoom.minimap.verticalHandles,max:l.maxX,min:0,valueStart:l.slicer.start,valueEnd:l.slicer.end,start:l.slicer.start,"onUpdate:start":i[2]||(i[2]=a=>l.slicer.start=a),end:l.slicer.end,"onUpdate:end":i[3]||(i[3]=a=>l.slicer.end=a),refreshStartPoint:e.FINAL_CONFIG.chart.zoom.startIndex!==null?e.FINAL_CONFIG.chart.zoom.startIndex:0,refreshEndPoint:e.FINAL_CONFIG.chart.zoom.endIndex!==null?e.FINAL_CONFIG.chart.zoom.endIndex+1:Math.max(...o.dataset.map(a=>e.largestTriangleThreeBucketsArray({data:a.series,threshold:e.FINAL_CONFIG.downsample.threshold}).length)),enableRangeHandles:e.FINAL_CONFIG.chart.zoom.enableRangeHandles,enableSelectionDrag:e.FINAL_CONFIG.chart.zoom.enableSelectionDrag,onReset:e.refreshSlicer,onTrapMouse:e.selectMinimapIndex},{"reset-action":t.withCtx(({reset:a})=>[t.renderSlot(r.$slots,"reset-action",t.normalizeProps(t.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","borderColor","minimap","smoothMinimap","minimapSelectedColor","minimapSelectionRadius","minimapLineColor","minimapSelectedColorOpacity","minimapSelectedIndex","minimapIndicatorColor","verticalHandles","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag","onReset","onTrapMouse"])):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.legend.show?(t.openBlock(),t.createElementBlock("div",{key:8,ref:"chartLegend",class:"vue-ui-xy-legend",style:t.normalizeStyle(`font-size:${e.FINAL_CONFIG.chart.legend.fontSize}px`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.absoluteDataset,(a,n)=>(t.openBlock(),t.createElementBlock("div",{key:`div_legend_item_${n}`,onClick:s=>e.segregate(a),class:t.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":l.segregatedSeries.includes(a.id)})},[l.icons[a.type]==="line"?(t.openBlock(),t.createElementBlock("svg",Wt,[t.createElementVNode("rect",{x:"0",y:"7.5",rx:"1.5",stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":.5,height:"3",width:"20",fill:a.color},null,8,qt),t.createVNode(f,{plot:{x:10,y:9},radius:4,color:a.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",stroke:e.FINAL_CONFIG.chart.backgroundColor,strokeWidth:.5},null,8,["color","shape","stroke"])])):l.icons[a.type]==="bar"?(t.openBlock(),t.createElementBlock("svg",Yt,[l.icons[a.type]==="bar"&&r.$slots.pattern?(t.openBlock(),t.createElementBlock("rect",{key:0,x:"0",y:"0",rx:"1",height:"40",width:"40",stroke:"none",fill:a.color},null,8,Xt)):t.createCommentVNode("",!0),l.icons[a.type]==="bar"?(t.openBlock(),t.createElementBlock("rect",{key:1,x:"0",y:"0",rx:"1",height:"40",width:"40",stroke:"none",fill:r.$slots.pattern?`url(#pattern_${l.uniqueId}_${a.slotAbsoluteIndex})`:a.color},null,8,Ut)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("svg",Zt,[t.createVNode(f,{plot:{x:6,y:6},radius:5,color:a.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle"},null,8,["color","shape"])])),t.createElementVNode("span",{style:t.normalizeStyle(`color:${e.FINAL_CONFIG.chart.legend.color}`)},t.toDisplayString(a.name),5)],10,Ht))),128))],4)):(t.openBlock(),t.createElementBlock("div",Jt,[t.renderSlot(r.$slots,"legend",{legend:e.absoluteDataset},void 0,!0)],512)),r.$slots.source?(t.openBlock(),t.createElementBlock("div",Kt,[t.renderSlot(r.$slots,"source",{},void 0,!0)],512)):t.createCommentVNode("",!0),t.createVNode(A,{show:l.mutableConfig.showTooltip&&l.isTooltip,backgroundColor:e.FINAL_CONFIG.chart.tooltip.backgroundColor,color:e.FINAL_CONFIG.chart.tooltip.color,fontSize:e.FINAL_CONFIG.chart.tooltip.fontSize,borderRadius:e.FINAL_CONFIG.chart.tooltip.borderRadius,borderColor:e.FINAL_CONFIG.chart.tooltip.borderColor,borderWidth:e.FINAL_CONFIG.chart.tooltip.borderWidth,backgroundOpacity:e.FINAL_CONFIG.chart.tooltip.backgroundOpacity,position:e.FINAL_CONFIG.chart.tooltip.position,offsetY:e.FINAL_CONFIG.chart.tooltip.offsetY,parent:r.$refs.chart,content:e.tooltipContent,isFullscreen:l.isFullscreen,isCustom:e.FINAL_CONFIG.chart.tooltip.customFormat&&typeof e.FINAL_CONFIG.chart.tooltip.customFormat=="function"},{"tooltip-before":t.withCtx(()=>[t.renderSlot(r.$slots,"tooltip-before",t.normalizeProps(t.guardReactiveProps({...e.dataTooltipSlot})),void 0,!0)]),"tooltip-after":t.withCtx(()=>[t.renderSlot(r.$slots,"tooltip-after",t.normalizeProps(t.guardReactiveProps({...e.dataTooltipSlot})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),e.isDataset?(t.openBlock(),t.createBlock(w,{key:11,hideDetails:"",config:{open:l.mutableConfig.showTable,maxHeight:1e4,body:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color},head:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color}}},{content:t.withCtx(()=>[t.createElementVNode("div",{style:t.normalizeStyle(`${l.isPrinting?"":"max-height:400px"};overflow:auto;width:100%;margin-top:48px`)},[t.createElementVNode("div",Qt,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":i[4]||(i[4]=a=>l.showSparklineTable=a)},null,512),[[t.vModelCheckbox,l.showSparklineTable]]),t.createElementVNode("div",{onClick:i[5]||(i[5]=a=>l.showSparklineTable=!l.showSparklineTable),style:{cursor:"pointer"}},[t.createVNode(y,{name:"chartLine",size:20,stroke:e.FINAL_CONFIG.chart.color},null,8,["stroke"])])]),l.showSparklineTable?(t.openBlock(),t.createBlock(N,{key:`sparkline_${l.segregateStep}`,dataset:e.tableSparklineDataset,config:e.tableSparklineConfig},null,8,["dataset","config"])):(t.openBlock(),t.createBlock(b,{key:`table_${l.tableStep}`,colNames:e.dataTable.colNames,head:e.dataTable.head,body:e.dataTable.body,config:e.dataTable.config,title:`${e.FINAL_CONFIG.chart.title.text}${e.FINAL_CONFIG.chart.title.subtitle.text?` : ${e.FINAL_CONFIG.chart.title.subtitle.text}`:""}`,onClose:i[6]||(i[6]=a=>l.mutableConfig.showTable=!1)},{th:t.withCtx(({th:a})=>[t.createElementVNode("div",{innerHTML:a},null,8,jt)]),td:t.withCtx(({td:a})=>[t.createTextVNode(t.toDisplayString(isNaN(Number(a))?a:e.dataLabel({p:e.FINAL_CONFIG.chart.labels.prefix,v:a,s:e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.table.rounding})),1)]),_:1},8,["colNames","head","body","config","title"]))],4)]),_:1},8,["config"])):t.createCommentVNode("",!0)],46,Z)}const el=Y._export_sfc(U,[["render",$t],["__scopeId","data-v-fb685f15"]]);exports.default=el;
|