vue-data-ui 2.4.51 → 2.4.52
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-BUz63pb2.js → Arrow-BuBoE64l.js} +1 -1
- package/dist/{Arrow-2a_SwBgz.cjs → Arrow-CFlFdPC5.cjs} +1 -1
- package/dist/{BaseIcon-BASl_NFX.cjs → BaseIcon-CfhoS_qC.cjs} +1 -1
- package/dist/{BaseIcon-CmiukQBl.js → BaseIcon-zmxwsaLW.js} +1 -1
- package/dist/{DataTable-DGf6RrOJ.js → DataTable-COkA4Nyz.js} +2 -2
- package/dist/{DataTable-G3ICK-5h.cjs → DataTable-CwAdpLng.cjs} +1 -1
- package/dist/{Legend-BiuPlEMg.cjs → Legend-CR9ydX8N.cjs} +1 -1
- package/dist/{Legend-BLaZxMge.js → Legend-bYlSC7I7.js} +1 -1
- package/dist/{PackageVersion-Bj34UNnQ.cjs → PackageVersion-C1F3QLoY.cjs} +1 -1
- package/dist/{PackageVersion-CxJghxYD.js → PackageVersion-Dz3KcTL4.js} +1 -1
- package/dist/{PenAndPaper-ZdZEumki.js → PenAndPaper-BycdTwSP.js} +3 -3
- package/dist/{PenAndPaper-D9yQnc0e.cjs → PenAndPaper-DDheVRNG.cjs} +1 -1
- package/dist/{Shape-yducHWd0.cjs → Shape-BBp5EwJH.cjs} +1 -1
- package/dist/{Shape-DIKzzpFm.js → Shape-BDJJ38uM.js} +1 -1
- package/dist/{Slicer-BHS9W4MJ.cjs → Slicer-7oTpm-cZ.cjs} +1 -1
- package/dist/{Slicer-Cxdl3cDt.js → Slicer-D_DaIThC.js} +2 -2
- package/dist/{Title-Bk_55doC.cjs → Title-B7ruS8yl.cjs} +1 -1
- package/dist/{Title-aSAft5dl.js → Title-aMb2ETf7.js} +1 -1
- package/dist/{Tooltip-smutPF--.js → Tooltip-BRZ3DT4p.js} +1 -1
- package/dist/{Tooltip-G7ENx87_.cjs → Tooltip-BqSN71SL.cjs} +1 -1
- package/dist/{index-DhDYBLBe.cjs → index-BkXYJDpD.cjs} +1 -1
- package/dist/{index-BbPeL8Gp.js → index-K5uyh1gA.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BphUExEh.cjs → useNestedProp-C6IvqE-r.cjs} +1 -1
- package/dist/{useNestedProp-BN8claGG.js → useNestedProp-DifqJZAs.js} +1 -1
- package/dist/{usePrinter-2_QjJFdH.cjs → usePrinter-DHv-BwME.cjs} +1 -1
- package/dist/{usePrinter-DaybDVqP.js → usePrinter-p_ZZlGc9.js} +1 -1
- package/dist/{vue-data-ui-Ckbp-yIf.js → vue-data-ui-3PlAeIlX.js} +60 -60
- package/dist/{vue-data-ui-C5vsHRHD.cjs → vue-data-ui-M0E2b8Dw.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-wDYs3sVe.js → vue-ui-3d-bar-PrijRaoI.js} +30 -30
- package/dist/{vue-ui-3d-bar-DUgumRsg.cjs → vue-ui-3d-bar-VQyMytda.cjs} +2 -2
- package/dist/{vue-ui-accordion-5d5iVpr7.js → vue-ui-accordion-CsJT7Az3.js} +3 -3
- package/dist/{vue-ui-accordion-B7tNzRWB.cjs → vue-ui-accordion-kr18wKfc.cjs} +1 -1
- package/dist/vue-ui-age-pyramid-BV1MgH8J.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-BH1khaaq.js → vue-ui-age-pyramid-DFYykOow.js} +42 -42
- package/dist/{vue-ui-annotator-B9VKE_qz.js → vue-ui-annotator-Blg3LdqF.js} +1 -1
- package/dist/{vue-ui-annotator-jXkB5XnD.cjs → vue-ui-annotator-DffUZR4a.cjs} +1 -1
- package/dist/vue-ui-bullet-DSampkai.cjs +34 -0
- package/dist/{vue-ui-bullet-BLi9CSZw.js → vue-ui-bullet-Ybz4qPWl.js} +41 -41
- package/dist/{vue-ui-candlestick-Da4ygGXR.cjs → vue-ui-candlestick-BxcwK8UI.cjs} +2 -2
- package/dist/{vue-ui-candlestick-Bjz1uFbv.js → vue-ui-candlestick-DsVBdCz_.js} +61 -61
- package/dist/{vue-ui-carousel-table-B6zgTL-W.js → vue-ui-carousel-table-C2ThrWYt.js} +50 -50
- package/dist/vue-ui-carousel-table-DkWNe0mJ.cjs +1 -0
- package/dist/{vue-ui-chestnut-D5HpkuIa.js → vue-ui-chestnut-BacH0ZYK.js} +66 -66
- package/dist/{vue-ui-chestnut-C_N7EbjQ.cjs → vue-ui-chestnut-Cw8LKuZG.cjs} +3 -3
- package/dist/{vue-ui-cursor-DZNIbvR2.js → vue-ui-cursor-CMKSCQ-v.js} +2 -2
- package/dist/{vue-ui-cursor-A_siHYBc.cjs → vue-ui-cursor-D2kQNFWy.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DCqe4BZg.js → vue-ui-dashboard-9PYl4mWC.js} +2 -2
- package/dist/{vue-ui-dashboard-BfPJyiY9.cjs → vue-ui-dashboard-BHwlhK33.cjs} +1 -1
- package/dist/{vue-ui-digits-BEhLa3jI.cjs → vue-ui-digits-2yacgzrJ.cjs} +1 -1
- package/dist/{vue-ui-digits-BEWCnojc.js → vue-ui-digits-CyTjq_oN.js} +2 -2
- package/dist/vue-ui-donut-BNv1eGiu.cjs +1 -0
- package/dist/{vue-ui-donut-g5ZLhYPx.js → vue-ui-donut-BxLlCBhU.js} +57 -57
- package/dist/{vue-ui-donut-evolution-Cu6dmlT2.js → vue-ui-donut-evolution-Bw9hfwuO.js} +66 -66
- package/dist/vue-ui-donut-evolution-DGjHfyq8.cjs +1 -0
- package/dist/vue-ui-dumbbell-CjHcgzti.cjs +9 -0
- package/dist/{vue-ui-dumbbell-bb4-Ep6o.js → vue-ui-dumbbell-D0PjpD19.js} +46 -46
- package/dist/{vue-ui-flow-hD0F6mTK.js → vue-ui-flow-BuTJcn6b.js} +43 -43
- package/dist/vue-ui-flow-Dc-KV4a3.cjs +1 -0
- package/dist/{vue-ui-funnel-hcbE4yky.js → vue-ui-funnel-CxO1aav3.js} +59 -59
- package/dist/vue-ui-funnel-QQGqK4OD.cjs +1 -0
- package/dist/{vue-ui-galaxy-ByKjxVWV.js → vue-ui-galaxy-B2uwYVgz.js} +54 -54
- package/dist/vue-ui-galaxy-CABgAX76.cjs +1 -0
- package/dist/vue-ui-gauge-CTEPbzWe.cjs +1 -0
- package/dist/{vue-ui-gauge-PGirbe6O.js → vue-ui-gauge-CqhJx__t.js} +70 -70
- package/dist/{vue-ui-gizmo-ChSfBYZ_.js → vue-ui-gizmo-D7G-8Al-.js} +3 -3
- package/dist/{vue-ui-gizmo-CHMApil6.cjs → vue-ui-gizmo-DlQOItIS.cjs} +1 -1
- package/dist/vue-ui-heatmap-BOwY6qNR.cjs +1 -0
- package/dist/{vue-ui-heatmap-CK3FIWpo.js → vue-ui-heatmap-DLNzJh--.js} +87 -87
- package/dist/{vue-ui-history-plot-EmQ-Byiz.js → vue-ui-history-plot-CH2mN74k.js} +75 -75
- package/dist/vue-ui-history-plot-EiYWpITj.cjs +1 -0
- package/dist/{vue-ui-kpi-DjC68pSz.js → vue-ui-kpi-Cb3fLQlS.js} +3 -3
- package/dist/{vue-ui-kpi-BdungaO2.cjs → vue-ui-kpi-DB00TrXv.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CzrblCCD.js → vue-ui-mini-loader-Czn2u6m3.js} +2 -2
- package/dist/{vue-ui-mini-loader-jwL_pZjb.cjs → vue-ui-mini-loader-DAaZwOTE.cjs} +1 -1
- package/dist/{vue-ui-molecule-DBQJQs4Y.js → vue-ui-molecule-BAwzIU19.js} +52 -52
- package/dist/vue-ui-molecule-DZ6Z4eru.cjs +1 -0
- package/dist/vue-ui-mood-radar-BL3vQzMq.cjs +1 -0
- package/dist/{vue-ui-mood-radar-Ca9wPZpJ.js → vue-ui-mood-radar-BXOWHB57.js} +35 -35
- package/dist/{vue-ui-nested-donuts-DEdS6dpj.cjs → vue-ui-nested-donuts-D1EF5IEw.cjs} +2 -2
- package/dist/{vue-ui-nested-donuts-C8at93dN.js → vue-ui-nested-donuts-F1pwFa1Y.js} +90 -90
- package/dist/{vue-ui-onion-B-PXxNu6.js → vue-ui-onion-C9dEaRbc.js} +52 -52
- package/dist/{vue-ui-onion-B2ioudP5.cjs → vue-ui-onion-nA8sXxh-.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-ByM3So9k.js → vue-ui-parallel-coordinate-plot-Cgc8JHMy.js} +62 -62
- package/dist/{vue-ui-parallel-coordinate-plot-DtJi9cT0.cjs → vue-ui-parallel-coordinate-plot-DL4DOhyh.cjs} +2 -2
- package/dist/{vue-ui-quadrant-BqOJBcsI.js → vue-ui-quadrant-C_hJHr9T.js} +50 -50
- package/dist/vue-ui-quadrant-DJGxKeBq.cjs +1 -0
- package/dist/{vue-ui-quick-chart-Bt9KA82P.cjs → vue-ui-quick-chart-C5v_8Kpw.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BfXxT3KM.js → vue-ui-quick-chart-D4k-zSan.js} +9 -9
- package/dist/vue-ui-radar-BeGVGueh.cjs +1 -0
- package/dist/{vue-ui-radar-BKpD9xDr.js → vue-ui-radar-WKQ-TavD.js} +59 -59
- package/dist/{vue-ui-rating-DQRuqev5.js → vue-ui-rating-BrSnMkzF.js} +2 -2
- package/dist/{vue-ui-rating-BE545aI4.cjs → vue-ui-rating-DI3L8UYN.cjs} +1 -1
- package/dist/vue-ui-relation-circle-BJ_TOhIp.cjs +1 -0
- package/dist/{vue-ui-relation-circle-nZ2nBpWX.js → vue-ui-relation-circle-DzZ5H4og.js} +56 -56
- package/dist/{vue-ui-rings-B7JzZ3ub.cjs → vue-ui-rings-1qwg2E0O.cjs} +2 -2
- package/dist/{vue-ui-rings-C1PV0873.js → vue-ui-rings-43dY-4_7.js} +65 -65
- package/dist/vue-ui-scatter-cTK10i0K.cjs +1 -0
- package/dist/{vue-ui-scatter-dgs1m3-2.js → vue-ui-scatter-q6Sfqa4W.js} +102 -102
- package/dist/{vue-ui-screenshot-Dxj0l8Jg.js → vue-ui-screenshot-CEy169Mc.js} +1 -1
- package/dist/{vue-ui-screenshot--cHV0jG3.cjs → vue-ui-screenshot-gOGGT_ti.cjs} +1 -1
- package/dist/{vue-ui-skeleton-lkPDknHn.cjs → vue-ui-skeleton-BTN1PKkz.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Bniq21d9.js → vue-ui-skeleton-BhA2lIT6.js} +3 -3
- package/dist/{vue-ui-smiley-D4DAZIpA.js → vue-ui-smiley-BAFdctGJ.js} +2 -2
- package/dist/{vue-ui-smiley-CozXoiti.cjs → vue-ui-smiley-BIEXWWWa.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-ZqrwhwqS.js → vue-ui-spark-trend-Deg6oJxD.js} +5 -5
- package/dist/{vue-ui-spark-trend-CSqyvI_K.cjs → vue-ui-spark-trend-LqnAP3mZ.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Bph8KIjk.cjs → vue-ui-sparkbar-CJR8pSqp.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-q0G4GvFm.js → vue-ui-sparkbar-Dm393iij.js} +4 -4
- package/dist/{vue-ui-sparkgauge-nSAW83dN.cjs → vue-ui-sparkgauge-DpP1XF6C.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DA_h9jcN.js → vue-ui-sparkgauge-WTo7H8eC.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BLYhRNpt.cjs → vue-ui-sparkhistogram-CEvdVaLZ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B1WyBiq_.js → vue-ui-sparkhistogram-DNVBeCU9.js} +5 -5
- package/dist/{vue-ui-sparkline-PNix1-R9.cjs → vue-ui-sparkline-B87AKRMY.cjs} +1 -1
- package/dist/{vue-ui-sparkline-ccfl0s3m.js → vue-ui-sparkline-Bcn_JAfC.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-DpuvEumy.cjs → vue-ui-sparkstackbar-Cmafq74u.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-PNKwVRu8.js → vue-ui-sparkstackbar-DPPTp1Tm.js} +5 -5
- package/dist/{vue-ui-stackbar-BBYnF8qm.js → vue-ui-stackbar-BeXW23yH.js} +43 -43
- package/dist/vue-ui-stackbar-DeFiDh8a.cjs +6 -0
- package/dist/vue-ui-strip-plot-5n6Om5PH.cjs +1 -0
- package/dist/{vue-ui-strip-plot-TVlnzXFq.js → vue-ui-strip-plot-CG-wp65N.js} +78 -78
- package/dist/{vue-ui-table-CHdv3KuM.cjs → vue-ui-table-Bbfdq7B8.cjs} +1 -1
- package/dist/{vue-ui-table-CsEajH9S.js → vue-ui-table-BzuWkWse.js} +1 -1
- package/dist/vue-ui-table-heatmap--Uj5nFcF.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-CubRipoB.js → vue-ui-table-heatmap-obAYC2HB.js} +38 -38
- package/dist/vue-ui-table-sparkline-Buh41Ovt.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-YV8DUOqh.js → vue-ui-table-sparkline-CW0-ubzl.js} +293 -247
- package/dist/{vue-ui-thermometer-DmMjSLc1.js → vue-ui-thermometer-BmgPuIr6.js} +74 -74
- package/dist/vue-ui-thermometer-DW10BlzG.cjs +1 -0
- package/dist/{vue-ui-timer-DvE_nqd9.js → vue-ui-timer-6eWSNYld.js} +5 -5
- package/dist/{vue-ui-timer-DteYgv9y.cjs → vue-ui-timer-CKp_yNVJ.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CCrkDgjX.js → vue-ui-tiremarks-DeEI5TAa.js} +46 -46
- package/dist/vue-ui-tiremarks-nb8r7akm.cjs +1 -0
- package/dist/vue-ui-treemap-B54QUZ46.cjs +1 -0
- package/dist/{vue-ui-treemap-C4A4spvg.js → vue-ui-treemap-tlPZye6M.js} +91 -91
- package/dist/{vue-ui-vertical-bar-8iL1xiaz.js → vue-ui-vertical-bar-BIst1a32.js} +67 -67
- package/dist/{vue-ui-vertical-bar-B60lSXNq.cjs → vue-ui-vertical-bar-CCXF79YU.cjs} +2 -2
- package/dist/vue-ui-waffle-Dctw-uNI.cjs +1 -0
- package/dist/{vue-ui-waffle-CaYNz-Kd.js → vue-ui-waffle-iJT4g4Ht.js} +48 -48
- package/dist/vue-ui-wheel-DnCpgZZo.cjs +1 -0
- package/dist/{vue-ui-wheel-BRR2rGou.js → vue-ui-wheel-v1_jsNWp.js} +36 -36
- package/dist/vue-ui-word-cloud-BXa6XzUJ.cjs +1 -0
- package/dist/{vue-ui-word-cloud-y2GGxwoq.js → vue-ui-word-cloud-DR8E1ArH.js} +66 -66
- package/dist/{vue-ui-xy-CXoWP8bh.js → vue-ui-xy-BZ3lbw6i.js} +14 -14
- package/dist/{vue-ui-xy-CbM75yXK.cjs → vue-ui-xy-CvFWhRR-.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-DWvIvSry.cjs → vue-ui-xy-canvas-BVw3zOIC.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-D7MrUJj7.js → vue-ui-xy-canvas-hPcU2SBK.js} +53 -53
- package/package.json +1 -1
- package/dist/vue-ui-age-pyramid-Dxx1mVwR.cjs +0 -1
- package/dist/vue-ui-bullet-QrXtipbT.cjs +0 -34
- package/dist/vue-ui-carousel-table-Cfif8Oiz.cjs +0 -1
- package/dist/vue-ui-donut-By3QRfkV.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DEABWsj0.cjs +0 -1
- package/dist/vue-ui-dumbbell-Dfb1l5qP.cjs +0 -9
- package/dist/vue-ui-flow-CCvTnu7z.cjs +0 -1
- package/dist/vue-ui-funnel-DKxAPRi_.cjs +0 -1
- package/dist/vue-ui-galaxy-D2kmqwpI.cjs +0 -1
- package/dist/vue-ui-gauge-BFA_unjg.cjs +0 -1
- package/dist/vue-ui-heatmap-C0VxwPhr.cjs +0 -1
- package/dist/vue-ui-history-plot-BmGodgUx.cjs +0 -1
- package/dist/vue-ui-molecule-Dzh-0SWI.cjs +0 -1
- package/dist/vue-ui-mood-radar-DV6ZZIXF.cjs +0 -1
- package/dist/vue-ui-quadrant-CIr4i6cC.cjs +0 -1
- package/dist/vue-ui-radar-Czmsd_uv.cjs +0 -1
- package/dist/vue-ui-relation-circle-B1uMTqFP.cjs +0 -1
- package/dist/vue-ui-scatter-CTI943ks.cjs +0 -1
- package/dist/vue-ui-stackbar-D4AIFoQT.cjs +0 -6
- package/dist/vue-ui-strip-plot-ClNxSw9M.cjs +0 -1
- package/dist/vue-ui-table-heatmap-BE3UT8U9.cjs +0 -1
- package/dist/vue-ui-table-sparkline-BeYviUrb.cjs +0 -1
- package/dist/vue-ui-thermometer-C6lMWRiF.cjs +0 -1
- package/dist/vue-ui-tiremarks-PGGgsNgS.cjs +0 -1
- package/dist/vue-ui-treemap-BzRVKqXL.cjs +0 -1
- package/dist/vue-ui-waffle-O8pAEf4X.cjs +0 -1
- package/dist/vue-ui-wheel-CnFdB_B1.cjs +0 -1
- package/dist/vue-ui-word-cloud-X4mp280j.cjs +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ref as i, computed as x, watch as D, nextTick as ce, onMounted as Ia, onBeforeUnmount as Ma, openBlock as z, createElementBlock as K, normalizeStyle as Y, normalizeClass as Ta, unref as S, createBlock as E, createCommentVNode as _, createSlots as Oa, withCtx as b, renderSlot as L, normalizeProps as B, guardReactiveProps as V, createElementVNode as Q, createVNode as Pa, toDisplayString as aa, createTextVNode as Ra } from "vue";
|
|
2
|
-
import { u as Fa, c as Ea, t as Na, a as Aa, p as H, C as de, b as Da, D as
|
|
3
|
-
import { d as Ga, c as ja, a as oa, t as qa, l as k, r as
|
|
4
|
-
import { _ as Ka } from "./Tooltip-
|
|
5
|
-
import { L as Qa } from "./Legend-
|
|
6
|
-
import { _ as el } from "./Title-
|
|
7
|
-
import { S as al } from "./Slicer-
|
|
8
|
-
import { u as ll, U as tl } from "./usePrinter-
|
|
9
|
-
import ol from "./vue-ui-accordion-
|
|
10
|
-
import { D as rl } from "./DataTable-
|
|
11
|
-
import ul from "./vue-ui-skeleton-
|
|
12
|
-
import { u as ua } from "./useNestedProp-
|
|
13
|
-
import { P as sl } from "./PenAndPaper-
|
|
2
|
+
import { u as Fa, c as Ea, t as Na, a as Aa, p as H, C as de, b as Da, D as we, i as ee, f as ae, Y as _a, J as Ha, d as la, a2 as Ua, o as Wa, e as Xa, x as ta, y as Ya, q as Ba, r as Va, s as le, l as Za } from "./index-K5uyh1gA.js";
|
|
3
|
+
import { d as Ga, c as ja, a as oa, t as qa, l as k, r as ze, b as N, p as ra, u as Ja } from "./useResponsive-CoxXLe23.js";
|
|
4
|
+
import { _ as Ka } from "./Tooltip-BRZ3DT4p.js";
|
|
5
|
+
import { L as Qa } from "./Legend-bYlSC7I7.js";
|
|
6
|
+
import { _ as el } from "./Title-aMb2ETf7.js";
|
|
7
|
+
import { S as al } from "./Slicer-D_DaIThC.js";
|
|
8
|
+
import { u as ll, U as tl } from "./usePrinter-p_ZZlGc9.js";
|
|
9
|
+
import ol from "./vue-ui-accordion-CsJT7Az3.js";
|
|
10
|
+
import { D as rl } from "./DataTable-COkA4Nyz.js";
|
|
11
|
+
import ul from "./vue-ui-skeleton-BhA2lIT6.js";
|
|
12
|
+
import { u as ua } from "./useNestedProp-DifqJZAs.js";
|
|
13
|
+
import { P as sl } from "./PenAndPaper-BycdTwSP.js";
|
|
14
14
|
import { u as nl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { _ as il } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const vl = ["id"], cl = ["onClick"], dl = {
|
|
@@ -33,11 +33,11 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
emits: ["selectLegend"],
|
|
36
|
-
setup(
|
|
37
|
-
const f =
|
|
36
|
+
setup(Se, { expose: sa, emit: na }) {
|
|
37
|
+
const f = Se, { vue_ui_xy_canvas: ia } = Fa(), he = i(Ea()), Z = i(null), M = i(null), G = i(null), s = i(null), y = i(1), P = i(1), te = i(!1), d = i(null), oe = i(""), $e = i(null), $ = i([]), U = i(1), A = i(!0), T = i(!0), ye = i(null), Ie = i(0), Me = i(0), re = i(!1), Te = i(null), Oe = i(null), Pe = i(null), Re = i(null), fe = i(0), ge = i(0), pe = i(0), me = x(() => !!f.dataset && f.dataset.length), a = x({
|
|
38
38
|
get: () => Ne(),
|
|
39
39
|
set: (e) => e
|
|
40
|
-
}), { userOptionsVisible:
|
|
40
|
+
}), { userOptionsVisible: be, setUserOptionsVisibility: Fe, keepUserOptionState: Ee } = nl({ config: a.value });
|
|
41
41
|
function Ne() {
|
|
42
42
|
const e = ua({
|
|
43
43
|
userConfig: f.config,
|
|
@@ -53,9 +53,9 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
53
53
|
} : l = e, f.config && de(f.config, "style.chart.scale.min") ? l.style.chart.scale.min = f.config.style.chart.scale.min : l.style.chart.scale.min = null, f.config && de(f.config, "style.chart.scale.max") ? l.style.chart.scale.max = f.config.style.chart.scale.max : l.style.chart.scale.max = null, f.config && de(f.config, "style.chart.zoom.startIndex") ? l.style.chart.zoom.startIndex = f.config.style.chart.zoom.startIndex : l.style.chart.zoom.startIndex = null, f.config && de(f.config, "style.chart.zoom.endIndex") ? l.style.chart.zoom.endIndex = f.config.style.chart.zoom.endIndex : l.style.chart.zoom.endIndex = null, l;
|
|
54
54
|
}
|
|
55
55
|
D(() => f.config, (e) => {
|
|
56
|
-
a.value = Ne(),
|
|
56
|
+
a.value = Ne(), be.value = !a.value.showOnChartHover, Le(), fe.value += 1, ge.value += 1, pe.value += 1;
|
|
57
57
|
}, { deep: !0 }), D(() => f.dataset, () => {
|
|
58
|
-
|
|
58
|
+
Le(), fe.value += 1, ge.value += 1, pe.value += 1;
|
|
59
59
|
}, { deep: !0 });
|
|
60
60
|
const Ae = i(a.value.style.chart.aspectRatio), { isPrinting: De, isImaging: _e, generatePdf: He, generateImage: Ue } = ll({
|
|
61
61
|
elementId: `xy_canvas_${he.value}`,
|
|
@@ -67,7 +67,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
67
67
|
showTooltip: a.value.style.chart.tooltip.show
|
|
68
68
|
});
|
|
69
69
|
function va(e) {
|
|
70
|
-
re.value = e,
|
|
70
|
+
re.value = e, Me.value += 1;
|
|
71
71
|
}
|
|
72
72
|
const We = x(() => Da(a.value.customPalette)), I = x(() => W.value ? Math.max(...W.value.filter((e, l) => !$.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0), t = x(() => {
|
|
73
73
|
const e = y.value - y.value * (a.value.style.chart.paddingProportions.left + a.value.style.chart.paddingProportions.right);
|
|
@@ -87,20 +87,20 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
87
87
|
return e / l;
|
|
88
88
|
}
|
|
89
89
|
function ca({ hasAutoScale: e, series: l, min: o, max: v, scale: c, yOffset: g, individualHeight: n, stackIndex: p = null }) {
|
|
90
|
-
return l.map((w,
|
|
90
|
+
return l.map((w, Ce) => {
|
|
91
91
|
const O = c.min < 0 ? Math.abs(c.min) : 0, R = Xe(w + O, O + c.max);
|
|
92
92
|
let F, j;
|
|
93
93
|
e && (F = Math.abs(c.min), j = Xe(w + F, c.max + F));
|
|
94
94
|
let q = 0;
|
|
95
95
|
return p === null ? q = t.value.bottom - t.value.height * (e ? j : R) : q = t.value.bottom - g - n * (e ? j : R), {
|
|
96
|
-
x: t.value.left + t.value.slot *
|
|
96
|
+
x: t.value.left + t.value.slot * Ce + t.value.slot / 2,
|
|
97
97
|
y: q,
|
|
98
98
|
value: w
|
|
99
99
|
};
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
const m = x(() => {
|
|
103
|
-
const e = a.value.style.chart.scale.min !== null ? a.value.style.chart.scale.min : Math.min(...W.value.filter((n, p) => !$.value.includes(n.absoluteIndex)).flatMap((n) => n.series.slice(r.value.start, r.value.end))), l = a.value.style.chart.scale.max !== null ? a.value.style.chart.scale.max : Math.max(...W.value.filter((n, p) => !$.value.includes(n.absoluteIndex)).flatMap((n) => n.series.slice(r.value.start, r.value.end))), o =
|
|
103
|
+
const e = a.value.style.chart.scale.min !== null ? a.value.style.chart.scale.min : Math.min(...W.value.filter((n, p) => !$.value.includes(n.absoluteIndex)).flatMap((n) => n.series.slice(r.value.start, r.value.end))), l = a.value.style.chart.scale.max !== null ? a.value.style.chart.scale.max : Math.max(...W.value.filter((n, p) => !$.value.includes(n.absoluteIndex)).flatMap((n) => n.series.slice(r.value.start, r.value.end))), o = we(e < 0 ? e : 0, l === e ? e + 1 < 0 ? 0 : e + 1 : l < 0 ? 0 : l, a.value.style.chart.scale.ticks), v = o.min < 0 ? Math.abs(o.min) : 0, c = t.value.bottom - t.value.height * (v / (o.max + v)), g = o.ticks.map((n) => ({
|
|
104
104
|
y: t.value.bottom - t.value.height * ((n + v) / (o.max + v)),
|
|
105
105
|
x: t.value.left - 8,
|
|
106
106
|
value: n
|
|
@@ -155,8 +155,8 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
155
155
|
valueMax: v
|
|
156
156
|
}, n = e.scaleSteps || a.value.style.chart.scale.ticks;
|
|
157
157
|
let p;
|
|
158
|
-
e.autoScaling ? p =
|
|
159
|
-
const w = u.value.stacked ? t.value.height * (1 - e.cumulatedStackRatio) : 0,
|
|
158
|
+
e.autoScaling ? p = we(g.valueMin, g.valueMax, n) : p = we(g.valueMin < 0 ? g.valueMin : 0, g.valueMax <= 0 ? 0 : g.valueMax, n);
|
|
159
|
+
const w = u.value.stacked ? t.value.height * (1 - e.cumulatedStackRatio) : 0, Ce = u.value.stacked ? t.value.height / a.value.style.chart.stackGap : 0, O = u.value.stacked ? t.value.height * e.stackRatio - Ce : t.value.height, R = p.min < 0 ? Math.abs(p.min) : 0;
|
|
160
160
|
let F;
|
|
161
161
|
e.autoScaling && u.value.stacked && v <= 0 ? F = t.value.bottom - w - O : F = t.value.bottom - w - O * (R / (p.max + R));
|
|
162
162
|
const j = p.ticks.map((J, $a) => ({
|
|
@@ -197,7 +197,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
197
197
|
(a.value.style.chart.zoom.startIndex !== null || a.value.style.chart.zoom.endIndex !== null) && X.value ? (a.value.style.chart.zoom.startIndex !== null && (await ce(), await ce(), X.value && X.value.setStartValue(a.value.style.chart.zoom.startIndex)), a.value.style.chart.zoom.endIndex !== null && (await ce(), await ce(), X.value && X.value.setEndValue(ha(a.value.style.chart.zoom.endIndex + 1)))) : (r.value = {
|
|
198
198
|
start: 0,
|
|
199
199
|
end: I.value
|
|
200
|
-
},
|
|
200
|
+
}, Ie.value += 1);
|
|
201
201
|
}
|
|
202
202
|
function ha(e) {
|
|
203
203
|
const l = I.value;
|
|
@@ -208,7 +208,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
208
208
|
if (!M.value)
|
|
209
209
|
return;
|
|
210
210
|
const e = G.value.offsetWidth, l = G.value.offsetHeight;
|
|
211
|
-
M.value.width = e * U.value * 2, M.value.height = l * U.value * 2, y.value = e * U.value * 2, P.value = l * U.value * 2, s.value.scale(U.value, U.value),
|
|
211
|
+
M.value.width = e * U.value * 2, M.value.height = l * U.value * 2, y.value = e * U.value * 2, P.value = l * U.value * 2, s.value.scale(U.value, U.value), xe();
|
|
212
212
|
}
|
|
213
213
|
function ga() {
|
|
214
214
|
if (s.value.clearRect(0, 0, 1e4, 1e4), s.value.fillStyle = a.value.style.chart.backgroundColor, s.value.fillRect(0, 0, t.value.canvasWidth, t.value.canvasHeight), u.value.stacked)
|
|
@@ -250,7 +250,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
250
250
|
);
|
|
251
251
|
}), a.value.style.chart.grid.x.horizontalLines.show && (a.value.style.chart.grid.x.horizontalLines.alternate ? h.value.forEach((e) => {
|
|
252
252
|
e.localYLabels.forEach((l, o) => {
|
|
253
|
-
o < e.localYLabels.length - 1 &&
|
|
253
|
+
o < e.localYLabels.length - 1 && ze(
|
|
254
254
|
s.value,
|
|
255
255
|
[
|
|
256
256
|
{ x: t.value.left, y: l.y },
|
|
@@ -371,7 +371,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
371
371
|
}
|
|
372
372
|
);
|
|
373
373
|
a.value.style.chart.grid.x.horizontalLines.show && (a.value.style.chart.grid.x.horizontalLines.alternate ? m.value.yLabels.forEach((e, l) => {
|
|
374
|
-
l < m.value.yLabels.length - 1 &&
|
|
374
|
+
l < m.value.yLabels.length - 1 && ze(
|
|
375
375
|
s.value,
|
|
376
376
|
[
|
|
377
377
|
{ x: t.value.left, y: e.y },
|
|
@@ -546,7 +546,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
546
546
|
function xa() {
|
|
547
547
|
C.value.forEach((e, l) => {
|
|
548
548
|
for (let o = 0; o < e.coordinatesLine.length; o += 1)
|
|
549
|
-
|
|
549
|
+
ze(
|
|
550
550
|
s.value,
|
|
551
551
|
[
|
|
552
552
|
{
|
|
@@ -644,7 +644,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
644
644
|
);
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function xe() {
|
|
648
648
|
ga(), A.value ? (T.value && d.value !== null && a.value.style.chart.selector.show && Ve(), xa(), u.value.stacked && a.value.style.chart.grid.x.showAxis && ka(), ya.value.forEach((e) => {
|
|
649
649
|
(e.type === "line" || !e.type) && La(e), T.value && (pa(e), u.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && ma(e));
|
|
650
650
|
}), ye.value = ja(M.value)) : (ye.value && (s.value.clearRect(0, 0, 1e4, 1e4), s.value.drawImage(ye.value, 0, 0)), T.value && d.value !== null && a.value.style.chart.selector.show && Ve(), T.value && d.value !== null && h.value.forEach((e) => {
|
|
@@ -706,11 +706,11 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
706
706
|
D(() => d.value, (e) => {
|
|
707
707
|
ue();
|
|
708
708
|
}), D(() => r.value, (e) => {
|
|
709
|
-
A.value = !0,
|
|
709
|
+
A.value = !0, xe();
|
|
710
710
|
}, {
|
|
711
711
|
deep: !0
|
|
712
712
|
}), D(() => u.value.showDataLabels, (e) => {
|
|
713
|
-
A.value = !0,
|
|
713
|
+
A.value = !0, xe();
|
|
714
714
|
}), D(() => u.value.stacked, (e) => {
|
|
715
715
|
A.value = !0, T.value = !0, ue();
|
|
716
716
|
});
|
|
@@ -719,9 +719,9 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
719
719
|
}
|
|
720
720
|
const se = i(null), ne = i(null);
|
|
721
721
|
Ia(() => {
|
|
722
|
-
|
|
722
|
+
Le();
|
|
723
723
|
});
|
|
724
|
-
function
|
|
724
|
+
function Le() {
|
|
725
725
|
if (Wa(f.dataset) ? Xa({
|
|
726
726
|
componentName: "VueUiXyCanvas",
|
|
727
727
|
type: "dataset"
|
|
@@ -729,10 +729,10 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
729
729
|
const e = qa(() => {
|
|
730
730
|
const { width: l, height: o } = Ja({
|
|
731
731
|
chart: Z.value,
|
|
732
|
-
title: a.value.style.chart.title.text ?
|
|
733
|
-
legend: a.value.style.chart.legend.show ?
|
|
734
|
-
slicer: a.value.style.chart.zoom.show && I.value > 1 ?
|
|
735
|
-
source:
|
|
732
|
+
title: a.value.style.chart.title.text ? Te.value : null,
|
|
733
|
+
legend: a.value.style.chart.legend.show ? Oe.value : null,
|
|
734
|
+
slicer: a.value.style.chart.zoom.show && I.value > 1 ? Pe.value : null,
|
|
735
|
+
source: Re.value
|
|
736
736
|
});
|
|
737
737
|
Ae.value = `${l} / ${o}`;
|
|
738
738
|
});
|
|
@@ -825,7 +825,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
825
825
|
u.value.showTooltip = !u.value.showTooltip;
|
|
826
826
|
}
|
|
827
827
|
const ve = i(!1);
|
|
828
|
-
function
|
|
828
|
+
function ke() {
|
|
829
829
|
ve.value = !ve.value;
|
|
830
830
|
}
|
|
831
831
|
return sa({
|
|
@@ -837,7 +837,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
837
837
|
toggleLabels: Ke,
|
|
838
838
|
toggleStack: Qe,
|
|
839
839
|
toggleTooltip: ea,
|
|
840
|
-
toggleAnnotator:
|
|
840
|
+
toggleAnnotator: ke
|
|
841
841
|
}), (e, l) => (z(), K("div", {
|
|
842
842
|
style: Y(`width:100%; position:relative; ${a.value.responsive ? "height: 100%" : ""}`),
|
|
843
843
|
ref_key: "xy",
|
|
@@ -850,7 +850,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
850
850
|
a.value.style.chart.title.text ? (z(), K("div", {
|
|
851
851
|
key: 0,
|
|
852
852
|
ref_key: "chartTitle",
|
|
853
|
-
ref:
|
|
853
|
+
ref: Te,
|
|
854
854
|
style: Y(`width:100%;background:${a.value.style.chart.backgroundColor};`)
|
|
855
855
|
}, [
|
|
856
856
|
(z(), E(el, {
|
|
@@ -867,9 +867,9 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
867
867
|
}
|
|
868
868
|
}, null, 8, ["config"]))
|
|
869
869
|
], 4)) : _("", !0),
|
|
870
|
-
a.value.userOptions.show && me.value && (S(Ee) || S(
|
|
870
|
+
a.value.userOptions.show && me.value && (S(Ee) || S(be)) ? (z(), E(tl, {
|
|
871
871
|
ref: "details",
|
|
872
|
-
key: `user_option_${
|
|
872
|
+
key: `user_option_${Me.value}`,
|
|
873
873
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
874
874
|
color: a.value.style.chart.color,
|
|
875
875
|
isPrinting: S(De),
|
|
@@ -880,7 +880,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
880
880
|
hasImg: a.value.userOptions.buttons.img,
|
|
881
881
|
hasXls: a.value.userOptions.buttons.csv,
|
|
882
882
|
hasLabel: a.value.userOptions.buttons.labels,
|
|
883
|
-
hasStack:
|
|
883
|
+
hasStack: Se.dataset.length > 1 && a.value.userOptions.buttons.stack,
|
|
884
884
|
hasFullscreen: a.value.userOptions.buttons.fullscreen,
|
|
885
885
|
hasTable: r.value.end - r.value.start < 200 && a.value.userOptions.buttons.table,
|
|
886
886
|
isFullscreen: re.value,
|
|
@@ -899,9 +899,9 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
899
899
|
onToggleLabels: Ke,
|
|
900
900
|
onToggleStack: Qe,
|
|
901
901
|
onToggleTooltip: ea,
|
|
902
|
-
onToggleAnnotator:
|
|
902
|
+
onToggleAnnotator: ke,
|
|
903
903
|
style: Y({
|
|
904
|
-
visibility: S(Ee) ? S(
|
|
904
|
+
visibility: S(Ee) ? S(be) ? "visible" : "hidden" : "visible"
|
|
905
905
|
})
|
|
906
906
|
}, Oa({ _: 2 }, [
|
|
907
907
|
e.$slots.optionTooltip ? {
|
|
@@ -1016,24 +1016,24 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
1016
1016
|
isCustom: S(ta)(a.value.style.chart.tooltip.customFormat)
|
|
1017
1017
|
}, {
|
|
1018
1018
|
"tooltip-before": b(() => [
|
|
1019
|
-
L(e.$slots, "tooltip-before", B(V({
|
|
1019
|
+
L(e.$slots, "tooltip-before", B(V({ ...$e.value })), void 0, !0)
|
|
1020
1020
|
]),
|
|
1021
1021
|
"tooltip-after": b(() => [
|
|
1022
|
-
L(e.$slots, "tooltip-after", B(V({
|
|
1022
|
+
L(e.$slots, "tooltip-after", B(V({ ...$e.value })), void 0, !0)
|
|
1023
1023
|
]),
|
|
1024
1024
|
_: 3
|
|
1025
1025
|
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "position", "offsetY", "parent", "content", "isFullscreen", "backgroundOpacity", "isCustom"])
|
|
1026
1026
|
], 4),
|
|
1027
1027
|
Q("div", {
|
|
1028
1028
|
ref_key: "chartSlicer",
|
|
1029
|
-
ref:
|
|
1029
|
+
ref: Pe,
|
|
1030
1030
|
style: Y(`width:100%;background:${a.value.style.chart.backgroundColor}`),
|
|
1031
1031
|
"data-html2canvas-ignore": ""
|
|
1032
1032
|
}, [
|
|
1033
1033
|
a.value.style.chart.zoom.show && I.value > 1 ? (z(), E(al, {
|
|
1034
1034
|
ref_key: "slicerComponent",
|
|
1035
1035
|
ref: X,
|
|
1036
|
-
key: `slicer_${
|
|
1036
|
+
key: `slicer_${Ie.value}`,
|
|
1037
1037
|
background: a.value.style.chart.zoom.color,
|
|
1038
1038
|
borderColor: a.value.style.chart.backgroundColor,
|
|
1039
1039
|
fontSize: a.value.style.chart.zoom.fontSize,
|
|
@@ -1063,7 +1063,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
1063
1063
|
], 4),
|
|
1064
1064
|
Q("div", {
|
|
1065
1065
|
ref_key: "chartLegend",
|
|
1066
|
-
ref:
|
|
1066
|
+
ref: Oe
|
|
1067
1067
|
}, [
|
|
1068
1068
|
a.value.style.chart.legend.show && me.value ? (z(), E(Qa, {
|
|
1069
1069
|
legendSet: Ge.value,
|
|
@@ -1089,7 +1089,7 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
1089
1089
|
e.$slots.source ? (z(), K("div", {
|
|
1090
1090
|
key: 3,
|
|
1091
1091
|
ref_key: "source",
|
|
1092
|
-
ref:
|
|
1092
|
+
ref: Re,
|
|
1093
1093
|
dir: "auto"
|
|
1094
1094
|
}, [
|
|
1095
1095
|
L(e.$slots, "source", {}, void 0, !0)
|
|
@@ -1137,11 +1137,11 @@ const vl = ["id"], cl = ["onClick"], dl = {
|
|
|
1137
1137
|
backgroundColor: a.value.style.chart.backgroundColor,
|
|
1138
1138
|
color: a.value.style.chart.color,
|
|
1139
1139
|
active: ve.value,
|
|
1140
|
-
onClose:
|
|
1140
|
+
onClose: ke
|
|
1141
1141
|
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : _("", !0)
|
|
1142
1142
|
], 46, vl));
|
|
1143
1143
|
}
|
|
1144
|
-
}, Tl = /* @__PURE__ */ il(yl, [["__scopeId", "data-v-
|
|
1144
|
+
}, Tl = /* @__PURE__ */ il(yl, [["__scopeId", "data-v-eda1aecb"]]);
|
|
1145
1145
|
export {
|
|
1146
1146
|
Tl as default
|
|
1147
1147
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DhDYBLBe.cjs"),j=require("./useResponsive-BJ7DTGpm.cjs"),re=require("./Title-Bk_55doC.cjs"),Y=require("./usePrinter-2_QjJFdH.cjs"),ie=require("./Tooltip-G7ENx87_.cjs"),ne=require("./DataTable-G3ICK-5h.cjs"),ue=require("./vue-ui-skeleton-lkPDknHn.cjs"),de=require("./vue-ui-accordion-B7tNzRWB.cjs"),J=require("./useNestedProp-BphUExEh.cjs"),ce=require("./PackageVersion-Bj34UNnQ.cjs"),ve=require("./PenAndPaper-D9yQnc0e.cjs"),ye=require("./useUserOptionState-BgepsfED.cjs"),he=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],pe=["xmlns","viewBox"],ge=["id"],be=["stop-color"],me=["stop-color"],xe=["id"],ke=["stop-color"],we=["stop-color"],Ce=["x","y","width","height","fill","rx"],_e=["x","y","width","height","fill","rx"],Ne=["x","y","width","height","fill","rx"],Le=["x","y","width","height","fill","rx"],Se={key:0},Te=["x","y","fill","font-size","font-weight"],Be=["x","y","fill","font-size","font-weight"],Ae={key:1},$e=["x","y","font-size","fill","font-weight"],Ee={key:2},Ve={key:0},ze=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Oe=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x","y","font-size","fill","font-weight"],Ie=["x1","x2","y1","y2","stroke","stroke-width"],De=["x","y","font-size","fill","font-weight"],Me=["x","y","font-size","fill","font-weight"],Re=["x","y","width","height","fill","onMouseover"],qe={key:5,class:"vue-data-ui-watermark"},Ue={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(S,{expose:K}){const u=S,{vue_ui_age_pyramid:Q}=s.useConfig(),m=e.computed(()=>!!u.dataset&&u.dataset.length),c=e.ref(s.createUid()),Z=e.ref(null),C=e.ref(!1),_=e.ref(""),x=e.ref(null),T=e.ref(0),y=e.ref(null),B=e.ref(null),A=e.ref(null),$=e.ref(null),E=e.ref(0),V=e.ref(0),t=e.computed({get:()=>F(),set:l=>l}),{userOptionsVisible:z,setUserOptionsVisibility:P,keepUserOptionState:O}=ye.useUserOptionState({config:t.value});function F(){const l=J.useNestedProp({userConfig:u.config,defaultConfig:Q});return l.theme?{...J.useNestedProp({userConfig:s.themes.vue_ui_age_pyramid[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=F(),D(),E.value+=1,V.value+=1},{deep:!0});const I=e.ref(null);e.onMounted(()=>{D()});function D(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=j.throttle(()=>{const{width:r,height:o}=j.useResponsive({chart:y.value,title:t.value.style.title.text?B.value:null,source:A.value,noTitle:$.value});d.value.width=r,d.value.height=o});I.value=new ResizeObserver(l),I.value.observe(y.value.parentNode)}}const{isPrinting:M,isImaging:R,generatePdf:q,generateImage:U}=Y.usePrinter({elementId:`vue-ui-age-pyramid_${c.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),i=e.computed(()=>{const l=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,r=t.value.style.layout.padding.left,o=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:r,right:o,bottom:d.value.height-t.value.style.layout.padding.bottom,width:l,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+l/2,leftChart:{width:l/2-t.value.style.layout.centerSlit.width,right:r+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:r+l/2+t.value.style.layout.centerSlit.width}}}),te=e.computed(()=>u.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),h=e.computed(()=>{const l=le(b.value/5),r=[],o=[];for(let a=0;a<=5;a+=1){const n=l*a,X=l*(a-5);r.push({value:n,x:i.value.left+i.value.width/2+t.value.style.layout.centerSlit.width+n/b.value*i.value.leftChart.width}),o.push({value:Math.abs(X),x:i.value.left+i.value.width/2+X/b.value*i.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:r,left:o}});function le(l){if(l===0)return 0;const o=10**Math.floor(Math.log10(Math.abs(l)));let a;return l<0,a=Math.round(l/o)*o,a}const b=e.computed(()=>Math.max(...u.dataset.flatMap(l=>l.slice(-2).map(r=>s.checkNaN(r))))),f=e.computed(()=>u.dataset.length),oe=e.computed(()=>u.dataset.map(l=>({segment:l[0],age:l[1],left:{value:l[2],proportionToMax:l[2]/b.value},right:{value:l[3],proportionToMax:l[3]/b.value}}))),p=e.computed(()=>oe.value.map((l,r)=>{const o=i.value.top+i.value.height/f.value*r,a=i.value.height/f.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:o,color:t.value.style.layout.bars.left.color,x:i.value.leftChart.right-l.left.proportionToMax*i.value.leftChart.width,width:s.checkNaN(l.left.proportionToMax*i.value.leftChart.width),height:a},right:{...l.right,y:o,color:t.value.style.layout.bars.right.color,x:i.value.rightChart.left,width:s.checkNaN(l.right.proportionToMax*i.value.rightChart.width),height:a}}})),N=e.ref(null);function ae(l,r){x.value=l,N.value={datapoint:r,seriesIndex:l,series:p.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(s.isFunction(o)&&s.functionReturnsString(()=>o({seriesIndex:l,datapoint:{segment:r[0],index:r[1],left:r[2],right:r[3]},series:p.value,config:t.value})))_.value=o({seriesIndex:l,datapoint:{segment:r[0],index:r[1],left:r[2],right:r[3]},series:p.value,config:t.value});else{let a="";const n=p.value[l];a+=`<div><b>${n.segment}</b></div>`,a+=`<div>${t.value.translations.age}: ${s.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,s.checkNaN(n.age),s.dataLabel({v:s.checkNaN(n.age)}),{datapoint:r,seriesIndex:l})}</div>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+='<div style="display:flex; flex-direction:row;gap:12px">',a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(n.left.value),s.dataLabel({v:s.checkNaN(n.left.value)}),{datapoint:r,seriesIndex:l})}</b></div></div>`,a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(n.right.value),s.dataLabel({v:s.checkNaN(n.right.value)}),{datapoint:r,seriesIndex:l})}</b></div></div>`,a+="</div>",a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(n.right.value)+s.checkNaN(n.left.value),s.dataLabel({v:s.checkNaN(n.right.value)+s.checkNaN(n.left.value)}),{datapoint:r,seriesIndex:l})}</b></div></div>`,a+="</div>",_.value=`<div>${a}</div>`}C.value=!0}function G(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],r=u.dataset.map(n=>[n[0],n[1],n[2],n[3],n[2]+n[3]]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(r),a=s.createCsvContent(o);s.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],r=u.dataset.map(a=>[a[0],a[1],a[2].toLocaleString(),a[3].toLocaleString(),(a[2]+a[3]).toLocaleString()]),o={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{head:l,body:r,config:o,colNames:l}}),g=e.ref(!1);function se(l){g.value=l,T.value+=1}function W(){v.value.showTable=!v.value.showTable}function H(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function L(){w.value=!w.value}return K({generatePdf:q,generateCsv:G,generateImage:U,toggleTable:W,toggleTooltip:H,toggleAnnotator:L}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${g.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:y,id:`vue-ui-age-pyramid_${c.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:r[2]||(r[2]=()=>e.unref(P)(!0)),onMouseleave:r[3]||(r[3]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ve.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:w.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:$,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(re._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"pyramid-div-title",...t.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(O)||e.unref(z))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:Z,key:`user_options_${T.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(R),isPrinting:e.unref(M),uid:c.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.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:g.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:se,onGeneratePdf:e.unref(q),onGenerateCsv:G,onGenerateImage:e.unref(U),onToggleTable:W,onToggleTooltip:H,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(O)?e.unref(z)?"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:o,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:a})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":g.value,"vue-data-ui-fulscreen--off":!g.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${d.value.height<=0?10:d.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ce._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.bars.left.color},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,me)],8,ge),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,we)],8,xe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:e.unref(s.checkNaN)(o.left.width<=0?1e-4:o.left.width),height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Ce),e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:o.left.width<=0?1e-4:o.left.width,height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:o.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,_e),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Ne),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:o.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,Le)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",Se,[e.createElementVNode("text",{x:i.value.left,y:i.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.left.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.female),9,Te),e.createElementVNode("text",{x:i.value.right,y:i.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.right.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.male),9,Be)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.value.centerX,y:i.value.top+i.value.height/f.value*a+t.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.yAxis.formatter,o,e.unref(s.dataLabel)({v:o}),{datapoint:o,seriesIndex:a})),9,$e)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ee,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ve,[e.createElementVNode("line",{x1:h.value.right[0].x,x2:h.value.right.at(-1).x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,ze),e.createElementVNode("line",{x1:h.value.left[0].x,x2:h.value.left.at(-1).x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Pe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.right,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Oe)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(s.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,Fe)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.left,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:i.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(s.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,De)]))),256)),e.createElementVNode("text",{x:i.value.right,y:d.value.height,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.translation),9,Me)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.dataset,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:i.value.left,y:i.value.top+i.value.height/f.value*a-t.value.style.layout.bars.gap/2,width:i.value.width<=0?1e-4:i.value.width,height:i.value.height/f.value<=0?1e-4:i.value.height/f.value,fill:x.value!==null&&x.value===a?e.unref(s.setOpacity)(t.value.style.highlighter.color,t.value.style.highlighter.opacity):"transparent",onMouseover:n=>ae(a,o),onMouseleave:r[0]||(r[0]=n=>{x.value=null,C.value=!1})},null,40,Re)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",qe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:6,config:{type:"pyramid",style:{backgroundColor:t.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(l.$slots,"legend",{legend:p.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:A,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ie._sfc_main,{show:v.value.showTooltip&&C.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:y.value,content:_.value,isFullscreen:g.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),m.value?(e.openBlock(),e.createBlock(de.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ne.DataTable,{key:`table_${V.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:r[1]||(r[1]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,fe))}},Ge=he._export_sfc(Ue,[["__scopeId","data-v-0934fe8b"]]);exports.default=Ge;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DhDYBLBe.cjs"),O=require("./useNestedProp-BphUExEh.cjs"),Y=require("./Title-Bk_55doC.cjs"),J=require("./Legend-BiuPlEMg.cjs"),F=require("./usePrinter-2_QjJFdH.cjs"),K=require("./PackageVersion-Bj34UNnQ.cjs"),Q=require("./PenAndPaper-D9yQnc0e.cjs"),Z=require("./vue-ui-skeleton-lkPDknHn.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},re=["xmlns","viewBox"],oe={key:0},se=["x","y","height","width","fill","stroke"],ne=["x","y","height","width","rx","fill","stroke","stroke-width"],ue=["x","y","height","width","fill","stroke","stroke-width"],ie=["x","y","font-size","font-weight","fill"],ce=["x","y","height","width","rx","fill","stroke","stroke-width"],de={key:3},he=["x","y","fill","font-size","font-weight"],ve={key:4},me=["x1","x2","y1","y2","stroke"],ge={key:5,class:"vue-data-ui-watermark"},fe={class:"vue-ui-bullet-legend-item",dir:"auto"},ye={style:{"margin-right":"2px"}},pe={key:7,ref:"source",dir:"auto"},ke={__name:"vue-ui-bullet",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:I}){const n=z,{vue_ui_bullet:T}=s.useConfig(),y=e.ref(null),H=e.ref(null),w=e.ref(0),M=e.ref(null),U=e.ref(0),d=e.computed({get:()=>n.dataset.hasOwnProperty("value"),set:a=>a}),v=e.computed(()=>n.dataset.segments?Array.isArray(n.dataset.segments)?n.dataset.segments.length?!0:(console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
|
|
2
|
-
|
|
3
|
-
segments: [
|
|
4
|
-
{
|
|
5
|
-
name: string;
|
|
6
|
-
from: number;
|
|
7
|
-
to: number;
|
|
8
|
-
color?: string;
|
|
9
|
-
},
|
|
10
|
-
{...}
|
|
11
|
-
]
|
|
12
|
-
`),d.value=!1,!1):(console.warn(`VueUiBullet: dataset segments must be an array of objects with this datastructure:
|
|
13
|
-
|
|
14
|
-
segments: [
|
|
15
|
-
{
|
|
16
|
-
name: string;
|
|
17
|
-
from: number;
|
|
18
|
-
to: number;
|
|
19
|
-
color?: string;
|
|
20
|
-
},
|
|
21
|
-
{...}
|
|
22
|
-
]
|
|
23
|
-
`),d.value=!1,!1):(console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
|
|
24
|
-
|
|
25
|
-
segments: [
|
|
26
|
-
{
|
|
27
|
-
name: string;
|
|
28
|
-
from: number;
|
|
29
|
-
to: number;
|
|
30
|
-
color?: string;
|
|
31
|
-
},
|
|
32
|
-
{...}
|
|
33
|
-
]
|
|
34
|
-
`),d.value=!1,!1));e.onMounted(B);function B(){s.objectIsEmpty(n.dataset)?s.error({componentName:"VueUiBullet",type:"dataset"}):v.value?n.dataset.segments.forEach((a,o)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","from","to"]}).forEach(l=>{d.value=!1,s.error({componentName:"VueUiBullet segment",type:"datasetSerieAttribute",property:l,index:o})})}):d.value=!1,t.value.style.chart.animation.show&&N(n.dataset.value||0)}const p=e.ref(s.createUid());function x(){const a=O.useNestedProp({userConfig:n.config,defaultConfig:T});return a.theme?{...O.useNestedProp({userConfig:s.themes.vue_ui_bullet[a.theme]||n.config,defaultConfig:a})}:a}const t=e.computed({get:()=>x(),set:a=>a}),{userOptionsVisible:C,setUserOptionsVisibility:_,keepUserOptionState:L}=ee.useUserOptionState({config:t.value});e.watch(()=>n.config,a=>{t.value=x(),B(),w.value+=1},{deep:!0});const r=e.computed(()=>{const a=t.value.style.chart.height,o=t.value.style.chart.width,l=t.value.style.chart.padding.left,h=o-t.value.style.chart.padding.right,f=t.value.style.chart.padding.top,c=a-t.value.style.chart.padding.bottom;return{height:a,width:o,left:l,right:h,top:f,bottom:c,chartWidth:h-l,chartHeight:c-f}}),q=e.computed(()=>{if(!v.value)return[];const a=[];for(let o=0;o<n.dataset.segments.length;o+=1)a.push(s.lightenHexColor(t.value.style.chart.segments.baseColor,o/n.dataset.segments.length));return a}),k=e.computed(()=>v.value?{min:Math.min(...n.dataset.segments.map(a=>a.from)),max:Math.max(...n.dataset.segments.map(a=>a.to))}:{min:0,max:1}),u=e.ref(D());e.watch(()=>n.dataset,a=>{t.value.style.chart.animation.show?N(a.value||0):u.value=a.value||0},{deep:!0});function D(){return t.value.style.chart.animation.show?k.value.min:n.dataset.value||0}const S=e.ref(null);function N(a){const o=Math.abs(a-u.value)/t.value.style.chart.animation.animationFrames;function l(){u.value<a?u.value=Math.min(u.value+o,a):u.value>a&&(u.value=Math.max(u.value-o,a)),u.value!==a&&(S.value=requestAnimationFrame(l))}l()}e.onBeforeUnmount(()=>{cancelAnimationFrame(S.value)});const i=e.computed(()=>{if(!v.value)return[];const a=s.calculateNiceScale(k.value.min,k.value.max,t.value.style.chart.segments.ticks.divisions),o=a.min>=0?0:Math.abs(a.min),l={x:r.value.left+(n.dataset.target+o)/(a.max+o)*r.value.chartWidth-t.value.style.chart.target.width/2},h={width:(u.value+o)/(a.max+o)*r.value.chartWidth},f=a.ticks.map(c=>({value:c,y:r.value.bottom+t.value.style.chart.segments.dataLabels.fontSize+3+t.value.style.chart.segments.dataLabels.offsetY,x:r.value.left+(c+o)/(a.max+o)*r.value.chartWidth}));return{scale:a,target:l,value:h,ticks:f,chunks:n.dataset.segments.map((c,X)=>({...c,color:c.color?s.convertColorToHex(c.color):q.value[X],x:r.value.left+r.value.chartWidth*((c.from+o)/(a.max+o)),y:r.value.top,height:r.value.chartHeight,width:r.value.chartWidth*(Math.abs(c.to-c.from)/(a.max+o))}))}}),P=e.computed(()=>!i.value||!i.value.chunks||!i.value.chunks.length?[]:i.value.chunks.map(a=>{const o=s.applyDataLabel(t.value.style.chart.segments.dataLabels.formatter,a.from,s.dataLabel({p:t.value.style.chart.segments.dataLabels.prefix,v:a.from,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding})),l=s.applyDataLabel(t.value.style.chart.segments.dataLabels.formatter,a.to,s.dataLabel({p:t.value.style.chart.segments.dataLabels.prefix,v:a.to,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}));return{...a,shape:"square",value:`${o} - ${l}`}})),W=e.computed(()=>({cy:"bullet-div-legend",backgroundColor:"transparent",color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:6,fontWeight:t.value.style.chart.legend.bold?"bold":""})),{isPrinting:E,isImaging:V,generatePdf:$,generateImage:A}=F.usePrinter({elementId:`bullet_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-bullet"}),R=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),m=e.ref(!1);function j(a){m.value=a,U.value+=1}function G(){return i.value}const g=e.ref(!1);function b(){g.value=!g.value}return I({getData:G,generatePdf:$,generateImage:A,toggleAnnotator:b}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"bulletChart",ref:y,class:e.normalizeClass(`vue-ui-bullet ${m.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%;background:${t.value.style.chart.backgroundColor}`),id:`bullet_${p.value}`,onMouseenter:o[0]||(o[0]=()=>e.unref(_)(!0)),onMouseleave:o[1]||(o[1]=()=>e.unref(_)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Q.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:g.value,onClose:b},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),R.value?(e.openBlock(),e.createElementBlock("div",le,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:H,style:"width:100%;background:transparent;"},[(e.openBlock(),e.createBlock(Y._sfc_main,{lineHeight:"1.3rem",key:`title_${w.value}`,config:{title:{cy:"bullet-div-title",...t.value.style.chart.title},subtitle:{cy:"bullet-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&d.value&&(e.unref(L)||e.unref(C))?(e.openBlock(),e.createBlock(F.UserOptions,{key:3,ref:"details",backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(E),isImaging:e.unref(V),uid:p.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:!1,hasTable:!1,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:m.value,chartElement:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:g.value,onToggleFullscreen:j,onGeneratePdf:e.unref($),onGenerateImage:e.unref(A),onToggleAnnotator:b,style:e.normalizeStyle({visibility:e.unref(L)?e.unref(C)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:h})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:h})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:h})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:h})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value,"vue-ui-bullet-svg":!0}),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`width: 100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(K._sfc_main),v.value?(e.openBlock(),e.createElementBlock("g",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.chunks,l=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:l.color,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,se))),256)),t.value.style.chart.target.onTop?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,x:i.value.target.x,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.target.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.target.heightRatio,width:t.value.style.chart.target.width,rx:t.value.style.chart.target.rounded?t.value.style.chart.target.width/2:0,fill:t.value.style.chart.target.color,stroke:t.value.style.chart.target.stroke,"stroke-width":t.value.style.chart.target.strokeWidth},null,8,ne)),e.createElementVNode("rect",{x:r.value.left,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.valueBar.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.valueBar.heightRatio,width:i.value.value.width,fill:t.value.style.chart.valueBar.color,stroke:t.value.style.chart.valueBar.stroke,"stroke-width":t.value.style.chart.valueBar.strokeWidth},null,8,ue),t.value.style.chart.valueBar.label.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:r.value.left+i.value.value.width,y:r.value.top-6+t.value.style.chart.valueBar.label.offsetY,"font-size":t.value.style.chart.valueBar.label.fontSize,"font-weight":t.value.style.chart.valueBar.label.bold?"bold":"normal",fill:t.value.style.chart.valueBar.label.color,"text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.segments.dataLabels.formatter,u.value,e.unref(s.dataLabel)({p:t.value.style.chart.segments.dataLabels.prefix,v:u.value,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}))),9,ie)):e.createCommentVNode("",!0),t.value.style.chart.target.onTop?(e.openBlock(),e.createElementBlock("rect",{key:2,x:i.value.target.x,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.target.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.target.heightRatio,width:t.value.style.chart.target.width,rx:t.value.style.chart.target.rounded?t.value.style.chart.target.width/2:0,fill:t.value.style.chart.target.color,stroke:t.value.style.chart.target.stroke,"stroke-width":t.value.style.chart.target.strokeWidth},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.segments.dataLabels.show?(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,l=>(e.openBlock(),e.createElementBlock("text",{x:l.x,y:l.y,"text-anchor":"middle",fill:t.value.style.chart.segments.dataLabels.color,"font-size":t.value.style.chart.segments.dataLabels.fontSize+"px","font-weight":t.value.style.chart.segments.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.segments.dataLabels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.segments.dataLabels.prefix,v:l.value,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}))),9,he))),256))])):e.createCommentVNode("",!0),t.value.style.chart.segments.dataLabels.show&&t.value.style.chart.segments.ticks.show?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,l=>(e.openBlock(),e.createElementBlock("line",{x1:l.x,x2:l.x,y1:r.value.bottom,y2:r.value.bottom+3,stroke:t.value.style.chart.segments.ticks.stroke,"stroke-width":1,"stroke-linecap":"round"},null,8,me))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ge,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:6,config:{type:"bullet",style:{backgroundColor:t.value.style.chart.backgroundColor,bullet:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:M},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(J.Legend,{key:0,clickable:!1,legendSet:P.value,config:W.value},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",fe,[e.createElementVNode("span",ye,e.toDisplayString(l.name)+":",1),e.createElementVNode("span",null,e.toDisplayString(l.value),1)])]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:P.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",pe,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,ae))}},be=te._export_sfc(ke,[["__scopeId","data-v-cd9011ec"]]);exports.default=be;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DhDYBLBe.cjs"),re=require("./useNestedProp-BphUExEh.cjs"),K=require("./usePrinter-2_QjJFdH.cjs"),ie=require("./vue-ui-skeleton-lkPDknHn.cjs"),ue=require("./useUserOptionState-BgepsfED.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],ve=["height"],ce=["data-cell","height"],pe={key:2,ref:"source",dir:"auto"},fe={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(p,{expose:Q}){const l=p,{vue_ui_carousel_table:W}=u.useConfig(),S=e.ref(u.createUid()),z=e.ref(!1),g=e.ref(!!l.dataset);e.onMounted(()=>{I()});function I(){u.objectIsEmpty(l.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!l.dataset.head||u.objectIsEmpty(l.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),g.value=!1),(!l.dataset.body||u.objectIsEmpty(l.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),g.value=!1))}const t=e.computed({get:()=>R(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:F,keepUserOptionState:N}=ue.useUserOptionState({config:t.value});function R(){return re.useNestedProp({userConfig:l.config,defaultConfig:W})}e.watch(()=>l.config,o=>{t.value=R(),I()},{deep:!0}),e.watch(()=>l.dataset,o=>{A()},{deep:!0});const{isPrinting:V,isImaging:U,generatePdf:Y,generateImage:M}=K.usePrinter({elementId:`carousel-table_${S.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),s=e.ref({showAnimation:t.value.animation.use}),i=e.ref(null),q=e.ref(null),b=e.ref(null),y=e.ref(null),k=e.ref(0),T=e.ref(0),w=e.ref(!1),C=e.ref(null),v=e.ref(null),$=e.ref(0);function A(){C.value&&(v.value={elements:C.value.getElementsByTagName("tr"),heights:Array.from(C.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(A);const Z=e.computed(()=>!v.value||!v.value.heights.length?0:Math.max(...v.value.heights)+k.value+T.value),_=e.computed(()=>l.dataset.body?t.value.tbody.tr.visible<=l.dataset.body.length?t.value.tbody.tr.visible:l.dataset.body.length:0),ee=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*_.value+k.value+T.value),x=e.ref(0),B=e.ref(null),f=e.ref(0),m=e.ref(!1),H=e.ref(0);e.onMounted(()=>{b.value&&(k.value=b.value.getBoundingClientRect().height),y.value&&(T.value=y.value.getBoundingClientRect().height),s.value.showAnimation&&v.value&&L()}),e.onMounted(()=>{if(i.value){let a=function(){const r=o.getBoundingClientRect().bottom;n.forEach(d=>{d.getBoundingClientRect().top<r?d.style.visibility="hidden":d.style.visibility="visible"})};const o=i.value.querySelector("thead"),n=Array.from(C.value.querySelectorAll("tr"));i.value.addEventListener("scroll",a),a(),e.onBeforeUnmount(()=>{i.value.removeEventListener("scroll",a)})}});function te(o){z.value=o,H.value+=1}function L(){!B.value&&!m.value&&(B.value=requestAnimationFrame(D))}function oe(){if(!i.value)return!1;const{scrollTop:o,scrollHeight:n,clientHeight:a}=i.value;return o+a>=n}function D(o){if(m.value)return;f.value||(f.value=o),o-f.value>=t.value.animation.speedMs&&(x.value+=v.value.heights[$.value],(oe()||$.value>=v.value.heights.length)&&(x.value=0,$.value=-1),$.value+=1,i.value&&i.value.scrollTo({top:x.value,behavior:"smooth"}),f.value=o),B.value=requestAnimationFrame(D)}function c(){m.value=!0,cancelAnimationFrame(B.value),B.value=null}e.onBeforeUnmount(c);function h(){!m.value||!s.value.showAnimation||(m.value=!1,f.value=0,L())}function ne(){t.value.animation.pauseOnHover&&c()}const O=e.ref(null);function ae(){c(),clearTimeout(O.value)}function G(){clearTimeout(O.value),O.value=setTimeout(h,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(s.value.showAnimation=!0,h()):(s.value.showAnimation=!1,c())});const le=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(n=>{n.forEach(a=>{w.value=a.contentRect.width<le.value}),k.value=b.value?b.value.getBoundingClientRect().height:0,T.value=y.value?y.value.getBoundingClientRect().height:0,$.value=0,e.nextTick(()=>{c(),f.value=0,x.value=0,A(),h()})});i.value&&o.observe(i.value)});function j(){Y()}function X(){s.value.showAnimation=!s.value.showAnimation,s.value.showAnimation?h():c()}function J(){e.nextTick(()=>{const o=l.dataset.head.map((r,d)=>[[l.dataset.body[d]]]),n=[[t.value.caption.text],[l.dataset.head.map(r=>[r])]].concat(o),a=u.createCsvContent(n);u.downloadCsv({csvContent:a,title:t.value.caption.text||"vue-ui-carousel-table"})})}return Q({pauseAnimation:c,resumeAnimation:h,toggleAnimation:X,generateCsv:J,generatePdf:j,generateImage:M}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:q,onMouseenter:n[5]||(n[5]=()=>e.unref(F)(!0)),onMouseleave:n[6]||(n[6]=()=>e.unref(F)(!1))},[e.createElementVNode("div",{ref_key:"tableContainer",ref:i,id:`carousel-table_${S.value}`,style:e.normalizeStyle({height:e.unref(V)||e.unref(U)?"auto":`${Math.max(ee.value,Z.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":w.value,"is-playing":t.value.scrollbar.hide||!m.value&&t.value.scrollbar.showOnlyOnHover}),onMouseover:n[0]||(n[0]=a=>ne()),onMouseleave:n[1]||(n[1]=a=>h()),onTouchstart:n[2]||(n[2]=a=>ae()),onTouchend:n[3]||(n[3]=a=>G()),onTouchcancel:n[4]||(n[4]=a=>G())},[g.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse",backgroundColor:t.value.tbody.backgroundColor})},[e.createElementVNode("caption",{ref_key:"caption",ref:b,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:w.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px",display:o.$slots.caption||t.value.caption.text||t.value.userOptions.show?"":"none"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${o.$slots.caption||t.value.caption.text||t.value.userOptions.show?k.value:0}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:y,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:w.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.dataset.head,(a,r)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${r}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":a)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:a,colIndex:r})),void 0,!0)],4))),128))],12,ve)],4),p.dataset.body&&p.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:C,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.dataset.body,(a,r)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(d,E)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":p.dataset.head[E]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:e.unref(u.setOpacity)(t.value.tbody.tr.td.style.backgroundColor,r%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":d)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:d,rowIndex:r,colIndex:E})),void 0,!0)],12,ce))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,de),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&g.value&&(e.unref(N)||e.unref(P))?(e.openBlock(),e.createBlock(K.UserOptions,{ref:"details",key:`user_option_${H.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(V),isImaging:e.unref(U),uid:S.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!s.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:q.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:j,onGenerateCsv:J,onGenerateImage:e.unref(M),onToggleAnimation:X,onToggleFullscreen:te,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(P)?"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.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage","style"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",pe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],544))}},me=se._export_sfc(fe,[["__scopeId","data-v-eed159a4"]]);exports.default=me;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DhDYBLBe.cjs"),we=require("./useResponsive-BJ7DTGpm.cjs"),Oe=require("./Title-Bk_55doC.cjs"),Ce=require("./usePrinter-2_QjJFdH.cjs"),ze=require("./DataTable-G3ICK-5h.cjs"),Te=require("./Tooltip-G7ENx87_.cjs"),Xe=require("./Legend-BiuPlEMg.cjs"),De=require("./vue-ui-skeleton-lkPDknHn.cjs"),Me=require("./vue-ui-accordion-B7tNzRWB.cjs"),Be=require("./useNestedProp-BphUExEh.cjs"),Ye=require("./PackageVersion-Bj34UNnQ.cjs"),Ae=require("./PenAndPaper-D9yQnc0e.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ge=E=>(e.pushScopeId("data-v-d4fdff95"),E=E(),e.popScopeId(),E),Re=["id"],Ue=["xmlns","viewBox"],je={key:0},He=["id"],We=["stop-color"],Je=["offset","stop-color"],Ke=["offset","stop-color"],Qe=["stop-color"],Ze={key:1},et=["id","cx","cy"],tt=["stop-color","stop-opacity"],lt=["stop-color"],ot=["id"],at=["id"],nt=Ge(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),rt=["id"],ut=["flood-color"],st=["id"],it=["flood-color"],ct=["d","stroke","filter"],dt=["x1","y1","x2","y2","stroke","filter"],vt=["cx","cy","r","fill","filter"],ht=["stroke","d"],ft=["d","fill","stroke","stroke-width","filter"],yt={key:0},pt=["stroke","d"],mt={key:0},gt=["d","stroke","stroke-width","filter"],kt=["d","fill","stroke","stroke-width","filter"],bt={key:1},wt=["cx","cy","r","fill","stroke","stroke-width"],Ct=["cx","cy","r","stroke"],Bt=["cx","cy","r","fill"],xt={key:0},_t=["d","fill","onMouseenter","onClick"],St={key:1},Pt=["cx","cy","r","fill"],Nt=["x","y","fill","font-size"],$t=["x","y","fill","font-size"],Et=["x","y","fill","font-size"],Lt=["x","y","fill","font-size"],Ft=["filter"],Vt={key:0},Ot=["x","y"],zt={key:1},Tt=["cx","cy","fill","stroke","filter","onClick"],Xt=["cx","cy","fill","stroke","filter","onClick"],Dt=["text-anchor","x","y","fill","font-size","onClick"],Mt=["text-anchor","x","y","fill","font-size","onClick"],Yt=["text-anchor","x","y","fill","font-size","onClick"],At=["text-anchor","x","y","fill","font-size","onClick"],It={key:2},qt=["x","y","width"],Gt=["x","y","width"],Rt={key:5,class:"vue-data-ui-watermark"},Ut=["onClick"],jt={key:0,style:{"font-variant-numeric":"tabular-nums"}},Ht={key:1},Wt=["innerHTML"],Jt={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(E,{expose:xe,emit:G}){const b=E,{vue_ui_donut:_e}=n.useConfig(),L=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),P=e.ref(null),R=e.ref(null),U=e.ref(null),z=e.ref(null),j=e.ref(null),H=e.ref(null),W=e.ref(0),J=e.ref(0),K=e.ref(0);e.onMounted(()=>{Q()}),e.onBeforeUnmount(()=>{z.value&&z.value.disconnect()});function Q(){if(n.objectIsEmpty(b.dataset)?n.error({componentName:"VueUiDonut",type:"dataset"}):b.dataset.forEach((o,u)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{L.value=!1,n.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:u})})}),t.value.responsive){const o=we.throttle(()=>{const{width:u,height:l}=we.useResponsive({chart:P.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?U.value:null,source:j.value,noTitle:H.value});r.value.width=u,r.value.height=l});z.value=new ResizeObserver(o),z.value.observe(P.value.parentNode)}}const f=e.ref(n.createUid()),Se=e.ref(null),T=e.ref(!1),M=e.ref(""),p=e.ref(null),Z=e.ref(0);function ee(){const o=Be.useNestedProp({userConfig:b.config,defaultConfig:_e});return o.theme?{...Be.useNestedProp({userConfig:n.themes.vue_ui_donut[o.theme]||b.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const t=e.computed({get:()=>ee(),set:o=>o}),{userOptionsVisible:te,setUserOptionsVisibility:le,keepUserOptionState:oe}=Ie.useUserOptionState({config:t.value});e.watch(()=>b.config,o=>{t.value=ee(),Q(),W.value+=1,J.value+=1,K.value+=1},{deep:!0});const{isPrinting:ae,isImaging:ne,generatePdf:re,generateImage:ue}=Ce.usePrinter({elementId:`donut__${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),Pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),se=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),r=e.ref({height:360,width:512}),F=e.computed(()=>{const o=t.value.style.chart.layout.donut.strokeWidth/512,u=r.value.width*o,l=u>y.value?y.value:u;return l<24?24:l}),_=e.computed(()=>b.dataset.map((o,u)=>({name:o.name,color:n.convertColorToHex(o.color)||se.value[u]||n.palette[u]||n.palette[u%n.palette.length],value:o.values.reduce((l,a)=>l+a,0),absoluteValues:o.values,comment:o.comment||""}))),g=e.ref(_.value);e.watch(()=>_.value,o=>g.value=o);function Ne(){return _.value.map(o=>({name:o.name,color:o.color,value:o.value}))}const w=e.ref([]),ie=e.ref(null),ce=e.ref(null),S=e.ref(!1);function de(o){const u=_.value.find((s,h)=>h===o);let a=g.value.find((s,h)=>h===o).value;if(w.value.includes(o)){let h=function(){a>s?(cancelAnimationFrame(ie.value),g.value=g.value.map((v,q)=>o===q?{...v,value:s}:v),S.value=!1):(S.value=!0,a+=s*.025,g.value=g.value.map((v,q)=>o===q?{...v,value:a}:v),ie.value=requestAnimationFrame(h))};w.value=w.value.filter(v=>v!==o);const s=u.value;h()}else if(w.value.length<_.value.length-1){let s=function(){a<.1?(cancelAnimationFrame(ce.value),w.value.push(o),g.value=g.value.map((h,v)=>o===v?{...h,value:0}:h),S.value=!1):(S.value=!0,a/=1.1,g.value=g.value.map((h,v)=>o===v?{...h,value:a}:h),ce.value=requestAnimationFrame(s))};s()}G("selectLegend",C.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const C=e.computed(()=>(g.value.forEach((o,u)=>{if([null,void 0].includes(o.values))return{...o,values:[]}}),g.value.map((o,u)=>({...o,seriesIndex:u})).filter((o,u)=>!w.value.includes(u)))),ve=e.computed(()=>b.dataset.map((o,u)=>({name:o.name,color:n.convertColorToHex(o.color)||se.value[u]||n.palette[u]||n.palette[u%n.palette.length],value:(o.values||[]).reduce((l,a)=>l+a,0),shape:"circle"})).map((o,u)=>({...o,proportion:o.value/b.dataset.map(l=>(l.values||[]).reduce((a,s)=>a+s,0)).reduce((l,a)=>l+a,0),opacity:w.value.includes(u)?.5:1,segregate:()=>!S.value&&de(u),isSegregated:w.value.includes(u)}))),$e=e.computed(()=>({cy:"donut-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":""})),y=e.computed(()=>{const o=Math.min(r.value.width/3,r.value.height/3);return o<55?55:o}),d=e.computed(()=>n.makeDonut({series:C.value},r.value.width/2,r.value.height/2,y.value,y.value,1.99999,2,1,360,105.25,F.value)),i=e.computed(()=>{const o=Math.max(...C.value.map(l=>l.value)),u=C.value.map(l=>l.value/o);return n.createPolarAreas({series:u,center:{x:r.value.width/2,y:r.value.height/2},maxRadius:Math.min(r.value.width,r.value.height)/3})});function N(o){return o.x>r.value.width/2+6?"start":o.x<r.value.width/2-6?"end":"middle"}function Ee(o){return o.middlePoint.y>r.value.height/2?n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:100,centerX:r.value.width/2,centerY:r.value.height/2}).y:n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:0,centerX:r.value.width/2,centerY:r.value.height/2}).y-100}function k(o){return o.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function Y(o,u){const l=o.value/Le(u);return isNaN(l)?0:n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,n.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:o})}function Le(o){return[...o].map(u=>u.value).reduce((u,l)=>u+l,0)}const m=e.computed(()=>C.value.map(o=>o.value).reduce((o,u)=>o+u,0)),he=e.computed(()=>m.value/C.value.length),fe=e.computed(()=>o=>S.value?o.proportion*100:o.value/m.value*100),A=e.ref(null),V=e.ref(!1);function ye({datapoint:o,relativeIndex:u,seriesIndex:l,show:a=!1}){A.value={datapoint:o,seriesIndex:l,config:t.value,series:_.value},T.value=a,p.value=u;let s="";const h=t.value.style.chart.tooltip.customFormat;if(V.value=!1,n.isFunction(h))try{const v=h({seriesIndex:l,datapoint:o,series:_.value,config:t.value});typeof v=="string"&&(M.value=v,V.value=!0)}catch{console.warn("Custom format cannot be applied."),V.value=!1}if(!V.value){if(s+=`<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>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,o.value,n.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,relativeIndex:u,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const v=n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,o.proportion*100,n.dataLabel({v:o.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:o,relativeIndex:u,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${v})</span></div>`:s+=`<b>${v}</b></div>`}t.value.style.chart.comments.showInTooltip&&o.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${o.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${o.color}">${o.comment}</div>`),M.value=`<div>${s}</div>`}}function O(o){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o?`url(#blur_${f.value})`:""}const B=e.computed(()=>{const o=C.value.map(l=>({name:l.name,color:l.color})),u=C.value.map(l=>l.value);return{head:o,body:u}});function pe(){e.nextTick(()=>{const o=B.value.head.map((a,s)=>[[a.name],[B.value.body[s]],[isNaN(B.value.body[s]/m.value)?"-":B.value.body[s]/m.value*100]]),u=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=n.createCsvContent(u);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const X=e.computed(()=>{const o=[' <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>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:m.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],u=B.value.head.map((s,h)=>{const v=n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:B.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},v,isNaN(B.value.body[h]/m.value)?"-":(B.value.body[h]/m.value*100).toFixed(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,t.value.table.columnNames.percentage],head:o,body:u,config:l}}),$=e.ref(!1);function Fe(o){$.value=o,Z.value+=1}const me=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ve(o){return o.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(u=>"-").join("")}function x(o,u){G("selectDatapoint",{datapoint:o,index:u})}function ge(){c.value.showTable=!c.value.showTable}function ke(){c.value.dataLabels.show=!c.value.dataLabels.show}function be(){c.value.showTooltip=!c.value.showTooltip}const D=e.ref(!1);function I(){D.value=!D.value}return xe({getData:Ne,generatePdf:re,generateCsv:pe,generateImage:ue,toggleTable:ge,toggleLabels:ke,toggleTooltip:be,toggleAnnotator:I}),(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:P,class:e.normalizeClass(`vue-ui-donut ${$.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:`donut__${f.value}`,onMouseenter:u[6]||(u[6]=()=>e.unref(le)(!0)),onMouseleave:u[7]||(u[7]=()=>e.unref(le)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:P.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:D.value,onClose:I},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),Pe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:H,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:R,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Oe._sfc_main,{key:`title_${W.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&L.value&&(e.unref(oe)||e.unref(te))?(e.openBlock(),e.createBlock(Ce.UserOptions,{ref_key:"details",ref:Se,key:`user_option_${Z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ae),isImaging:e.unref(ne),uid:f.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:$.value,chartElement:P.value,position:t.value.userOptions.position,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:D.value,onToggleFullscreen:Fe,onGeneratePdf:e.unref(re),onGenerateCsv:pe,onGenerateImage:e.unref(ue),onToggleTable:ge,onToggleLabels:ke,onToggleTooltip:be,onToggleAnnotator:I,style:e.normalizeStyle({visibility:e.unref(oe)?e.unref(te)?"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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),L.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ye._sfc_main),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("defs",je,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${f.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,We),e.createElementVNode("stop",{offset:`${(1-F.value/y.value)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,Je),e.createElementVNode("stop",{offset:`${(1-F.value/y.value/2)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,Qe)],8,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${a}_${f.value}`,cx:l.middlePoint.x/r.value.width*100+"%",cy:l.middlePoint.y/r.value.height*100+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.shiftHue)(d.value[a].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,tt),e.createElementVNode("stop",{offset:"100%","stop-color":d.value[a].color},null,8,lt)],8,et))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${f.value}`},null,8,at),nt],8,ot),e.createElementVNode("filter",{id:`shadow_${f.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,ut)],8,rt),e.createElementVNode("filter",{id:`drop_shadow_${f.value}`,"color-interpolation-filters":"sRGB",x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"3","flood-opacity":"1","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,it)],8,st)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(n.calcNutArrowPath)(l,{x:r.value.width/2,y:r.value.height/2},16,16,!1,!1,F.value),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:O(a)},null,8,ct)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,y1:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,x2:i.value[a].middlePoint.x,y2:i.value[a].middlePoint.y,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:O(a)},null,8,dt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:4,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${f.value})`:""},null,8,vt)):e.createCommentVNode("",!0),m.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,ht))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(n.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:O(a)},null,8,ft))),256))],64)):e.createCommentVNode("",!0),m.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[d.value.length>1?(e.openBlock(),e.createElementBlock("g",yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[a].path,fill:"#FFFFFF"},null,8,pt))),256)),t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:"transparent",stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:`url(#drop_shadow_${f.value})`},null,8,gt))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:t.value.style.chart.useGradient?`url(#polar_gradient_${a}_${f.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:O(a)},null,8,kt))),256))])):(e.openBlock(),e.createElementBlock("g",bt,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${f.value})`:d.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,wt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:7,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,Ct)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:8,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:`url(#gradient_${f.value})`},null,8,Bt)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:9},[d.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:t.value.type==="classic"?l.arcSlice:i.value[a].path,fill:p.value===a?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>ye({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:u[0]||(u[0]=s=>{T.value=!1,p.value=null}),onClick:s=>x(l,a)},null,40,_t))),256))])):(e.openBlock(),e.createElementBlock("g",St,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:p.value===o.i?"rgba(0,0,0,0.1)":"transparent","data-cy-donut-trap":"",onMouseenter:u[1]||(u[1]=l=>ye({datapoint:d.value[0],relativeIndex:0,seriesIndex:d.value[0].seriesIndex,show:!0})),onMouseleave:u[2]||(u[2]=l=>{T.value=!1,p.value=null}),onClick:u[3]||(u[3]=l=>x(d.value[0],o.i))},null,40,Pt)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,Nt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,m.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:m.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,$t)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,Et)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(S.value?"--":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,he.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:he.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,Lt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",{filter:O(a),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Vt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-120:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-60:e.unref(n.calcMarkerOffsetX)(l).x,y:e.unref(n.calcMarkerOffsetY)(l)-(me.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a,isSafari:me.value,isVisible:k(l)&&c.value.dataLabels.show,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,percentage:Y(l,d.value)})),void 0,!0)])],8,Ot))])):(e.openBlock(),e.createElementBlock("g",zt,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.calcMarkerOffsetX)(l).x,cy:e.unref(n.calcMarkerOffsetY)(l)-3.5,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${f.value})`,onClick:s=>x(l,a)},null,8,Tt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,cy:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${f.value})`,onClick:s=>x(l,a)},null,8,Xt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(Y(l,d.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Dt)):e.createCommentVNode("",!0),k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(l.name),13,Mt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":N(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(Y(l,d.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,Yt)):e.createCommentVNode("",!0),k(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":N(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>x(l,a)},e.toDisplayString(l.name),13,At)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",It,[k(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(n.calcMarkerOffsetX)(l).x),y:e.unref(n.calcMarkerOffsetY)(l)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor}},void 0,!0)])],8,qt)):e.createCommentVNode("",!0),k(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+(N(i.value[a].middlePoint)==="end"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width:N(i.value[a].middlePoint)==="middle"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x),y:Ee(i.value[a])+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:N(i.value[a].middlePoint),flexAlign:N(i.value[a].middlePoint)}},void 0,!0)])],8,Gt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Ft))),256)),e.renderSlot(o.$slots,"svg",{svg:r.value},void 0,!0)],14,Ue)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Rt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(ne)})),void 0,!0)])):e.createCommentVNode("",!0),L.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(De.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:F.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:U},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Xe.Legend,{key:`legend_${K.value}`,legendSet:ve.value,config:$e.value,onClickMarker:u[4]||(u[4]=({i:l})=>de(l))},{item:e.withCtx(({legend:l,index:a})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${w.value.includes(a)?.5:1}`),onClick:s=>l.segregate()},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,index:a}))+" ",1),w.value.includes(a)?(e.openBlock(),e.createElementBlock("span",Ht," ( "+e.toDisplayString(Ve(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",jt," ("+e.toDisplayString(isNaN(l.value/m.value)?"-":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,fe.value(l),e.unref(n.dataLabel)({v:fe.value(l),s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,Ut)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:ve.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:j,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Te._sfc_main,{show:c.value.showTooltip&&T.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:M.value,isCustom:V.value,isFullscreen:$.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),L.value?(e.openBlock(),e.createBlock(Me.default,{key:8,hideDetails:"",config:{open:c.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(ze.DataTable,{key:`table_${J.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:u[5]||(u[5]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Wt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(n.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Re))}},Kt=qe._export_sfc(Jt,[["__scopeId","data-v-d4fdff95"]]);exports.default=Kt;
|