vue-data-ui 2.6.45 → 2.6.47
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-Bfwl8OAb.cjs → Arrow-CRrMt_zT.cjs} +1 -1
- package/dist/{Arrow-km8WlE5f.js → Arrow-Dvz6Z2gU.js} +1 -1
- package/dist/{BaseIcon-DywZoZmD.js → BaseIcon-CEgQPz8O.js} +6 -3
- package/dist/{BaseIcon-BjlTm9wZ.cjs → BaseIcon-DoqpR480.cjs} +1 -1
- package/dist/{ColorPicker-COPqu9IV.cjs → ColorPicker-Bp_7FV2c.cjs} +1 -1
- package/dist/{ColorPicker-gkZLlxzP.js → ColorPicker-DwezDvSV.js} +3 -3
- package/dist/{DataTable-CrhPpuOy.js → DataTable-751-cN2c.js} +2 -2
- package/dist/{DataTable-ImmHVJ0i.cjs → DataTable-D_Guh5Hf.cjs} +1 -1
- package/dist/{Legend-BVtJaKHS.js → Legend-BG9fLat9.js} +2 -2
- package/dist/{Legend-CfimXfYH.cjs → Legend-CepYsC9r.cjs} +1 -1
- package/dist/{PackageVersion-DjHCw2D_.cjs → PackageVersion-D8T0gm3t.cjs} +1 -1
- package/dist/{PackageVersion-DJu8NH8u.js → PackageVersion-SrpgZayt.js} +1 -1
- package/dist/{PenAndPaper-AZpGBe7x.cjs → PenAndPaper-BJ6gGBM2.cjs} +1 -1
- package/dist/{PenAndPaper-DC3X33rh.js → PenAndPaper-jnD991LP.js} +3 -3
- package/dist/{Shape-Bs4vWaC-.js → Shape-BaijOBYT.js} +1 -1
- package/dist/{Shape-Dl6kIG9D.cjs → Shape-og7-ULyN.cjs} +1 -1
- package/dist/{Slicer-OBTv9I2-.cjs → Slicer-B4ZDkwnQ.cjs} +1 -1
- package/dist/{Slicer-CgnhZJgM.js → Slicer-COHzItjq.js} +3 -3
- package/dist/{Title-DBgUbEU1.cjs → Title-BUnn57ZR.cjs} +1 -1
- package/dist/{Title-6BRNasyb.js → Title-DMhhB9yN.js} +1 -1
- package/dist/{Tooltip-BUPxcljs.js → Tooltip-BaPecnnV.js} +1 -1
- package/dist/{Tooltip-TGHDsCSU.cjs → Tooltip-DJtOxx2P.cjs} +1 -1
- package/dist/index-DEbhC0cM.cjs +9 -0
- package/dist/{index-jVWdGfFl.js → index-KdQpiTkm.js} +3 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +6 -1
- package/dist/types/vue-data-ui.d.ts +6 -1
- package/dist/{useNestedProp-BN5jbfiQ.js → useNestedProp-CO8Pe266.js} +1 -1
- package/dist/{useNestedProp-DhyCNtMY.cjs → useNestedProp-COYn8tA0.cjs} +1 -1
- package/dist/{usePrinter-BI95cSFJ.js → usePrinter-BuiF8wZK.js} +1 -1
- package/dist/{usePrinter-DRWBcwQ7.cjs → usePrinter-DRmOwFc2.cjs} +1 -1
- package/dist/useResponsive-Cw4oZ8sQ.js +192 -0
- package/dist/useResponsive-DQmBAoBf.cjs +1 -0
- package/dist/{vue-data-ui-DFmsvz9E.js → vue-data-ui-3jkYjNO_.js} +61 -61
- package/dist/{vue-data-ui-B0eO9goE.cjs → vue-data-ui-BbpJaKj_.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-BcdL4c9H.js → vue-ui-3d-bar-Bda7eCM_.js} +9 -9
- package/dist/{vue-ui-3d-bar-CwXgNWXb.cjs → vue-ui-3d-bar-D7_7INdZ.cjs} +1 -1
- package/dist/{vue-ui-accordion-DOBMerZl.js → vue-ui-accordion-CDTJiQu0.js} +3 -3
- package/dist/{vue-ui-accordion-DdHwnq9o.cjs → vue-ui-accordion-ChxVn9CH.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-i52Ub253.cjs → vue-ui-age-pyramid-C-5yJnWs.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Dtaikxqn.js → vue-ui-age-pyramid-C4FUVgL1.js} +11 -11
- package/dist/{vue-ui-annotator-BrjeA9CQ.js → vue-ui-annotator-pYtolxGn.js} +1 -1
- package/dist/{vue-ui-annotator-CKUZCHHC.cjs → vue-ui-annotator-yLvZcOQb.cjs} +1 -1
- package/dist/{vue-ui-bullet-DxUauLaF.cjs → vue-ui-bullet-BVmbUAYh.cjs} +1 -1
- package/dist/{vue-ui-bullet-C1xxCzws.js → vue-ui-bullet-oEZK6DxU.js} +8 -8
- package/dist/{vue-ui-candlestick-t1BaVylo.cjs → vue-ui-candlestick-CVM-Yvvm.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CPF7rQqu.js → vue-ui-candlestick-Cm0ipv0t.js} +12 -12
- package/dist/{vue-ui-carousel-table-BqPfItK8.cjs → vue-ui-carousel-table-BGPWwg3x.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-x8RLpKZv.js → vue-ui-carousel-table-PcE7YCyE.js} +4 -4
- package/dist/{vue-ui-chestnut-BiX9TQ2v.cjs → vue-ui-chestnut-CeYVXtyW.cjs} +1 -1
- package/dist/{vue-ui-chestnut-SdFREl6l.js → vue-ui-chestnut-Ob9Rt-3r.js} +8 -8
- package/dist/{vue-ui-circle-pack-DVkRm1KL.js → vue-ui-circle-pack-BF0PBuDU.js} +10 -10
- package/dist/{vue-ui-circle-pack-B28TVLHQ.cjs → vue-ui-circle-pack-pbnF0Jb7.cjs} +1 -1
- package/dist/{vue-ui-cursor-BkQNdavl.cjs → vue-ui-cursor-DE4hlTca.cjs} +1 -1
- package/dist/{vue-ui-cursor-CY5VZS8t.js → vue-ui-cursor-Drnazkqg.js} +2 -2
- package/dist/{vue-ui-dashboard-BCcNNuM_.cjs → vue-ui-dashboard-D3-z2poA.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DQ8lax7M.js → vue-ui-dashboard-j5IuBHiv.js} +2 -2
- package/dist/{vue-ui-digits-BkXEbzlS.js → vue-ui-digits-BRMuUzSA.js} +2 -2
- package/dist/{vue-ui-digits-D-F0Chxn.cjs → vue-ui-digits-CD5-WopZ.cjs} +1 -1
- package/dist/{vue-ui-donut-qRDAQa4n.js → vue-ui-donut-CdVSree_.js} +229 -219
- package/dist/vue-ui-donut-Dq1F2vBg.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-C8ZQum6h.cjs → vue-ui-donut-evolution-BQ7-rOnh.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-YKmsjVkR.js → vue-ui-donut-evolution-DzrJwccW.js} +11 -11
- package/dist/{vue-ui-dumbbell-bOMg4szX.cjs → vue-ui-dumbbell-DSdwbWLI.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-C6OpTSyF.js → vue-ui-dumbbell-DuCdZc41.js} +11 -11
- package/dist/{vue-ui-flow-aIpHJK9l.js → vue-ui-flow-CYpiRQ_u.js} +9 -9
- package/dist/{vue-ui-flow-Bnj7K0Td.cjs → vue-ui-flow-D_UgsB9t.cjs} +1 -1
- package/dist/{vue-ui-funnel-Ckn6d97S.js → vue-ui-funnel-6q79enxr.js} +10 -10
- package/dist/{vue-ui-funnel-CapST2C3.cjs → vue-ui-funnel-Dr4ssgIM.cjs} +1 -1
- package/dist/{vue-ui-galaxy-FIQp4ePf.cjs → vue-ui-galaxy-BGxIGzn8.cjs} +1 -1
- package/dist/{vue-ui-galaxy-0p-jvo0s.js → vue-ui-galaxy-Bg-3xnWe.js} +11 -11
- package/dist/{vue-ui-gauge-CtzP0_kK.js → vue-ui-gauge-Cwhlraja.js} +8 -8
- package/dist/{vue-ui-gauge-C1QU2678.cjs → vue-ui-gauge-DGt25KK7.cjs} +1 -1
- package/dist/{vue-ui-gizmo-D6E03WtQ.cjs → vue-ui-gizmo-C0024J7B.cjs} +1 -1
- package/dist/{vue-ui-gizmo--TFv_z_f.js → vue-ui-gizmo-VRONxCxp.js} +3 -3
- package/dist/{vue-ui-heatmap-DQ_4z6a6.cjs → vue-ui-heatmap-CTwazjkR.cjs} +1 -1
- package/dist/{vue-ui-heatmap-Bx9RCECY.js → vue-ui-heatmap-ay3NAawN.js} +10 -10
- package/dist/{vue-ui-history-plot-OlxcB4fR.js → vue-ui-history-plot-BQ_2NZVm.js} +12 -12
- package/dist/{vue-ui-history-plot-BNybvrYe.cjs → vue-ui-history-plot-B_IHuJff.cjs} +1 -1
- package/dist/{vue-ui-kpi-D-EjjlYh.js → vue-ui-kpi-BGSgE7Ck.js} +3 -3
- package/dist/{vue-ui-kpi-DhsQdhIg.cjs → vue-ui-kpi-BtHmGmj6.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-gsh0jMbc.cjs → vue-ui-mini-loader-Bwe3_hqy.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CYRJtuw3.js → vue-ui-mini-loader-DyRqUv0j.js} +2 -2
- package/dist/{vue-ui-molecule-K4PM7UqE.cjs → vue-ui-molecule-Cy_P0hK2.cjs} +1 -1
- package/dist/{vue-ui-molecule-Dke-JabR.js → vue-ui-molecule-gJVbPM60.js} +10 -10
- package/dist/{vue-ui-mood-radar-CnR7mp7Z.cjs → vue-ui-mood-radar-BxFd74g3.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-sXLyAWIK.js → vue-ui-mood-radar-DAYJLwXw.js} +11 -11
- package/dist/vue-ui-nested-donuts-DP_cQ0OI.cjs +17 -0
- package/dist/{vue-ui-nested-donuts-CJ9r-x9P.js → vue-ui-nested-donuts-r67jsUHC.js} +221 -211
- package/dist/{vue-ui-onion-CVRrdFde.js → vue-ui-onion-C-d1e3w2.js} +12 -12
- package/dist/{vue-ui-onion-DM-jq72Y.cjs → vue-ui-onion-CR4UoiPQ.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DMouPTwE.cjs → vue-ui-parallel-coordinate-plot-DVltec37.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DLVjGpqC.js → vue-ui-parallel-coordinate-plot-FRhJ4mby.js} +13 -13
- package/dist/{vue-ui-quadrant-BGuywSpy.js → vue-ui-quadrant-BKWD8HER.js} +13 -13
- package/dist/{vue-ui-quadrant-CXFcrSRD.cjs → vue-ui-quadrant-D-vSAn7m.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-9R835dAy.cjs → vue-ui-quick-chart-Bbcex3jc.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-D_ZSUMnh.js → vue-ui-quick-chart-Cy3FCnd-.js} +10 -10
- package/dist/{vue-ui-radar-CGSB8Q_3.cjs → vue-ui-radar-BHCghGVU.cjs} +1 -1
- package/dist/{vue-ui-radar-CrF3XMq8.js → vue-ui-radar-BX_7Ngn_.js} +13 -13
- package/dist/{vue-ui-rating-DCH03Nd-.js → vue-ui-rating-CM6YiPW3.js} +2 -2
- package/dist/{vue-ui-rating-BiwEz-WI.cjs → vue-ui-rating-JhzvmHjC.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-D7sKIx2H.cjs → vue-ui-relation-circle-BPhcc_fN.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CFB3nQrw.js → vue-ui-relation-circle-JTWFex69.js} +8 -8
- package/dist/{vue-ui-rings-CMzJJbL7.cjs → vue-ui-rings-CzXIKikH.cjs} +1 -1
- package/dist/{vue-ui-rings-CDFQgsVL.js → vue-ui-rings-NBAca-G8.js} +13 -13
- package/dist/{vue-ui-scatter-CYweE3aN.js → vue-ui-scatter-5SJ4F605.js} +13 -13
- package/dist/{vue-ui-scatter-Cpc9LK6H.cjs → vue-ui-scatter-DCunyG-E.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BRY1fQOv.js → vue-ui-screenshot-DPm6Bpiq.js} +1 -1
- package/dist/{vue-ui-screenshot-BA27Irge.cjs → vue-ui-screenshot-q3DSJ00h.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Dsd0bx0Y.js → vue-ui-skeleton-BhHXiz99.js} +3 -3
- package/dist/{vue-ui-skeleton-CLMRPxZm.cjs → vue-ui-skeleton-D7S6OsSN.cjs} +1 -1
- package/dist/{vue-ui-smiley-CNnxNaGC.cjs → vue-ui-smiley-CQE1dvvV.cjs} +1 -1
- package/dist/{vue-ui-smiley-CeC-WFLx.js → vue-ui-smiley-Cb8d713r.js} +2 -2
- package/dist/{vue-ui-spark-trend-liGslvUe.cjs → vue-ui-spark-trend-7Bo9O1fQ.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-C8FlaTDz.js → vue-ui-spark-trend-BVNEGhp9.js} +5 -5
- package/dist/{vue-ui-sparkbar-BjCkuYB0.js → vue-ui-sparkbar-BbOu_w63.js} +4 -4
- package/dist/{vue-ui-sparkbar-DTUuvjOA.cjs → vue-ui-sparkbar-qAaHy4or.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BBJvgM0r.js → vue-ui-sparkgauge-BwNM15jl.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BEL_6k7M.cjs → vue-ui-sparkgauge-ddRVuzSQ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B12f_DfZ.cjs → vue-ui-sparkhistogram-C8E73uuw.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DgRpgf4S.js → vue-ui-sparkhistogram-DhJ72P8O.js} +5 -5
- package/dist/{vue-ui-sparkline-CgNq3TDg.cjs → vue-ui-sparkline-C6wkmXa0.cjs} +1 -1
- package/dist/{vue-ui-sparkline-COtgfnKN.js → vue-ui-sparkline-m3nNPKwo.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-3qtBnVN-.js → vue-ui-sparkstackbar-B71Vue4E.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-JgTWCear.cjs → vue-ui-sparkstackbar-CJyCwn7x.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BIQOmKWQ.cjs → vue-ui-stackbar-6W0SjyLd.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BzWMNHEl.js → vue-ui-stackbar-CL7KXBrn.js} +14 -14
- package/dist/{vue-ui-strip-plot-Pr-p3HVe.cjs → vue-ui-strip-plot-D10qNzJu.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-B5yz7F4O.js → vue-ui-strip-plot-T99zioSX.js} +12 -12
- package/dist/{vue-ui-table-DfzIKXYz.js → vue-ui-table-CCrE_Qnd.js} +1 -1
- package/dist/{vue-ui-table-Da8yPHbm.cjs → vue-ui-table-Cva4CGRJ.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-B42LEDQq.js → vue-ui-table-heatmap-CQbPKFW_.js} +4 -4
- package/dist/{vue-ui-table-heatmap-m9WunlMI.cjs → vue-ui-table-heatmap-GOsIhgPo.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-D87wVYbh.cjs → vue-ui-table-sparkline-AIunqOTn.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-D0NpqAlx.js → vue-ui-table-sparkline-CHtZhhn6.js} +5 -5
- package/dist/{vue-ui-thermometer-CLrrfpCH.js → vue-ui-thermometer-CCVPdXye.js} +7 -7
- package/dist/{vue-ui-thermometer-CpaWOGHr.cjs → vue-ui-thermometer-CGAA0bAU.cjs} +1 -1
- package/dist/{vue-ui-timer-DJ3N2OIu.cjs → vue-ui-timer-C3detaHT.cjs} +1 -1
- package/dist/{vue-ui-timer-ruhqlCDV.js → vue-ui-timer-Djxb8XuU.js} +6 -6
- package/dist/{vue-ui-tiremarks-By-ZwLdD.cjs → vue-ui-tiremarks-D-xQKhur.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-B1PaJvW_.js → vue-ui-tiremarks-DExuaGwV.js} +7 -7
- package/dist/vue-ui-treemap-BXWbdL3o.cjs +1 -0
- package/dist/vue-ui-treemap-Dnn29Qdu.js +956 -0
- package/dist/{vue-ui-vertical-bar-D51OT6tD.cjs → vue-ui-vertical-bar-3V-J4-Qp.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Bi_p2HMG.js → vue-ui-vertical-bar-B9-cwCz2.js} +13 -13
- package/dist/{vue-ui-waffle-D_OFNFu_.js → vue-ui-waffle-BH4NkBmK.js} +13 -13
- package/dist/{vue-ui-waffle-BRFWNTTy.cjs → vue-ui-waffle-by6o3KnD.cjs} +1 -1
- package/dist/{vue-ui-wheel-Dm-sn-fc.js → vue-ui-wheel-D2BqDvNB.js} +8 -8
- package/dist/{vue-ui-wheel-C_0xODX0.cjs → vue-ui-wheel-DWNHihoO.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-WO_xGFwd.js → vue-ui-word-cloud-Bpyn_t-K.js} +11 -11
- package/dist/{vue-ui-word-cloud-CpbPC0k6.cjs → vue-ui-word-cloud-DvXgJCIv.cjs} +1 -1
- package/dist/{vue-ui-xy-DYGsBFzv.js → vue-ui-xy-CuLfvdAU.js} +14 -14
- package/dist/{vue-ui-xy-canvas-SpUUvBPW.js → vue-ui-xy-canvas-BK3C3PqR.js} +13 -13
- package/dist/{vue-ui-xy-canvas-DCFJnGtu.cjs → vue-ui-xy-canvas-bysKB96p.cjs} +1 -1
- package/dist/{vue-ui-xy-ArWU04zz.cjs → vue-ui-xy-luOYkYWO.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BXhJaCcU.cjs +0 -9
- package/dist/useResponsive-N8jl0-aC.cjs +0 -1
- package/dist/useResponsive-vZgZwV-S.js +0 -191
- package/dist/vue-ui-donut-Dxie1WUb.cjs +0 -1
- package/dist/vue-ui-nested-donuts-DW1Zx5R0.cjs +0 -17
- package/dist/vue-ui-treemap-B3_lUi3B.js +0 -939
- package/dist/vue-ui-treemap-DX_oIHsl.cjs +0 -1
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
function C(e, i, o, t = {}) {
|
|
2
|
-
if (o <= 0) return;
|
|
3
|
-
e.save();
|
|
4
|
-
const {
|
|
5
|
-
color: s = "black",
|
|
6
|
-
lineWidth: u = 1,
|
|
7
|
-
lineCap: d = "round",
|
|
8
|
-
lineJoin: f = "round",
|
|
9
|
-
lineDash: g = null,
|
|
10
|
-
lineDashoffset: r = 0,
|
|
11
|
-
shadowColor: l = null,
|
|
12
|
-
shadowBlur: a = 0,
|
|
13
|
-
shadowOffsetX: y = 0,
|
|
14
|
-
shadowOffsetY: w = 0,
|
|
15
|
-
fillStyle: N = "#FFFFFF"
|
|
16
|
-
} = t;
|
|
17
|
-
e.beginPath(), e.arc(i.x, i.y, o, 0, 2 * Math.PI), e.strokeStyle = s, e.lineWidth = u, e.lineCap = d, e.lineJoin = f, g && (e.setLineDash(g), e.lineDashoffset = r), l && (e.shadowColor = l, e.shadowOffsetX = y, e.shadowOffsetY = w), a && (e.shadowBlur = a), N && (e.fillStyle = N), e.fillStyle && e.fill(), e.stroke(), e.restore();
|
|
18
|
-
}
|
|
19
|
-
function m(e, i, o = {}) {
|
|
20
|
-
if (!i.length) return;
|
|
21
|
-
e.save();
|
|
22
|
-
const {
|
|
23
|
-
color: t = "black",
|
|
24
|
-
lineWidth: s = 1,
|
|
25
|
-
lineCap: u = "round",
|
|
26
|
-
lineJoin: d = "round",
|
|
27
|
-
lineDash: f = null,
|
|
28
|
-
lineDashoffset: g = 0,
|
|
29
|
-
shadowColor: r = null,
|
|
30
|
-
shadowBlur: l = 0,
|
|
31
|
-
shadowOffsetX: a = 0,
|
|
32
|
-
shadowOffsetY: y = 0
|
|
33
|
-
} = o;
|
|
34
|
-
e.beginPath(), e.moveTo(i[0].x, i[0].y);
|
|
35
|
-
for (let w = 1; w < i.length; w += 1)
|
|
36
|
-
e.lineTo(i[w].x, i[w].y);
|
|
37
|
-
e.strokeStyle = t, e.lineWidth = s, e.lineCap = u, e.lineJoin = d, f && (e.setLineDash(f), e.lineDashoffset = g), r && (e.shadowColor = r, e.shadowOffsetX = a, e.shadowOffsetY = y), l && (e.shadowBlur = l), e.stroke(), e.restore();
|
|
38
|
-
}
|
|
39
|
-
function L(e, i, o = {}) {
|
|
40
|
-
if (!i.length) return;
|
|
41
|
-
e.save();
|
|
42
|
-
const {
|
|
43
|
-
strokeColor: t = "black",
|
|
44
|
-
lineWidth: s = 1,
|
|
45
|
-
lineCap: u = "round",
|
|
46
|
-
lineJoin: d = "round",
|
|
47
|
-
lineDash: f = null,
|
|
48
|
-
lineDashoffset: g = 0,
|
|
49
|
-
fillColor: r = null,
|
|
50
|
-
gradient: l = null,
|
|
51
|
-
shadowColor: a = null,
|
|
52
|
-
shadowBlur: y = 0,
|
|
53
|
-
shadowOffsetX: w = 0,
|
|
54
|
-
shadowOffsetY: N = 0
|
|
55
|
-
} = o;
|
|
56
|
-
e.beginPath(), e.moveTo(i[0].x, i[0].y);
|
|
57
|
-
for (let n = 1; n < i.length; n += 1)
|
|
58
|
-
e.lineTo(i[n].x, i[n].y);
|
|
59
|
-
if (e.closePath(), e.strokeStyle = t, e.lineWidth = s, e.lineCap = u, e.lineJoin = d, f && (e.setLineDash(f), e.lineDashoffset = g), a && (e.shadowColor = a, e.shadowBlur = y, e.shadowOffsetX = w, e.shadowOffsetY = N), l) {
|
|
60
|
-
let n;
|
|
61
|
-
l.type === "linear" ? n = e.createLinearGradient(
|
|
62
|
-
h(l.start.x, Number.MIN_VALUE),
|
|
63
|
-
h(l.start.y, Number.MIN_VALUE),
|
|
64
|
-
h(l.end.x, Number.MIN_VALUE * 2),
|
|
65
|
-
h(l.end.y, Number.MIN_VALUE * 2)
|
|
66
|
-
) : l.type === "radial" && (n = e.createRadialGradient(
|
|
67
|
-
h(l.start.x, Number.MIN_VALUE),
|
|
68
|
-
h(l.start.y, Number.MIN_VALUE),
|
|
69
|
-
l.start.r || 0,
|
|
70
|
-
h(l.end.x, Number.MIN_VALUE * 2),
|
|
71
|
-
h(l.end.y, Number.MIN_VALUE * 2),
|
|
72
|
-
l.end.r || 0
|
|
73
|
-
)), n && l.stops && (l.stops.forEach((p) => {
|
|
74
|
-
n.addColorStop(p.offset, p.color);
|
|
75
|
-
}), e.fillStyle = n);
|
|
76
|
-
} else r && (e.fillStyle = r);
|
|
77
|
-
e.fillStyle && e.fill(), t && e.stroke(), e.restore();
|
|
78
|
-
}
|
|
79
|
-
function I(e, i, o = {}) {
|
|
80
|
-
if (!i.length) return;
|
|
81
|
-
e.save();
|
|
82
|
-
const {
|
|
83
|
-
strokeColor: t = "black",
|
|
84
|
-
lineWidth: s = 1,
|
|
85
|
-
lineCap: u = "round",
|
|
86
|
-
lineJoin: d = "round",
|
|
87
|
-
lineDash: f = null,
|
|
88
|
-
lineDashoffset: g = 0,
|
|
89
|
-
fillColor: r = null,
|
|
90
|
-
gradient: l = null,
|
|
91
|
-
shadowColor: a = null,
|
|
92
|
-
shadowBlur: y = 0,
|
|
93
|
-
shadowOffsetX: w = 0,
|
|
94
|
-
shadowOffsetY: N = 0
|
|
95
|
-
} = o;
|
|
96
|
-
e.beginPath(), e.moveTo(i[0].x, i[0].y);
|
|
97
|
-
for (let n = 1; n < i.length; n += 1)
|
|
98
|
-
e.lineTo(i[n].x, i[n].y);
|
|
99
|
-
if (e.closePath(), e.strokeStyle = t, e.lineWidth = s, e.lineCap = u, e.lineJoin = d, f && (e.setLineDash(f), e.lineDashoffset = g), a && (e.shadowColor = a, e.shadowBlur = y, e.shadowOffsetX = w, e.shadowOffsetY = N), l) {
|
|
100
|
-
let n;
|
|
101
|
-
l.type === "linear" ? n = e.createLinearGradient(
|
|
102
|
-
h(l.start.x, Number.MIN_VALUE),
|
|
103
|
-
h(l.start.y, Number.MIN_VALUE),
|
|
104
|
-
h(l.end.x, Number.MIN_VALUE * 2),
|
|
105
|
-
h(l.end.y, Number.MIN_VALUE * 2)
|
|
106
|
-
) : l.type === "radial" && (n = e.createRadialGradient(
|
|
107
|
-
h(l.start.x, Number.MIN_VALUE),
|
|
108
|
-
h(l.start.y, Number.MIN_VALUE),
|
|
109
|
-
l.start.r || 0,
|
|
110
|
-
h(l.end.x, Number.MIN_VALUE * 2),
|
|
111
|
-
h(l.end.y, Number.MIN_VALUE * 2),
|
|
112
|
-
l.end.r || 0
|
|
113
|
-
)), n && l.stops && (l.stops.forEach((p) => {
|
|
114
|
-
n.addColorStop(p.offset, p.color);
|
|
115
|
-
}), e.fillStyle = n);
|
|
116
|
-
} else r && (e.fillStyle = r);
|
|
117
|
-
e.fillStyle && e.fill(), t && e.stroke(), e.restore();
|
|
118
|
-
}
|
|
119
|
-
function O(e, i, o, t, s = {}) {
|
|
120
|
-
e.save();
|
|
121
|
-
const {
|
|
122
|
-
font: u = "16px sans-serif",
|
|
123
|
-
color: d = "black",
|
|
124
|
-
align: f = "start",
|
|
125
|
-
baseline: g = "alphabetic",
|
|
126
|
-
maxWidth: r = void 0,
|
|
127
|
-
rotation: l = 0,
|
|
128
|
-
shadowColor: a = null,
|
|
129
|
-
shadowBlur: y = 0,
|
|
130
|
-
shadowOffsetX: w = 0,
|
|
131
|
-
shadowOffsetY: N = 0,
|
|
132
|
-
strokeColor: n = null,
|
|
133
|
-
lineWidth: p = 1,
|
|
134
|
-
globalAlpha: b = 1
|
|
135
|
-
} = s;
|
|
136
|
-
e.font = u, e.fillStyle = d, e.textAlign = f, e.textBaseline = g, e.globalAlpha = b, a && (e.shadowColor = a, e.shadowBlur = y, e.shadowOffsetX = w, e.shadowOffsetY = N), n && (e.strokeStyle = n, e.lineWidth = p), l !== 0 && (e.translate(o, t), e.rotate(Math.PI / 180 * l), e.translate(-o, -t)), e.fillText(i, o, t, r), n && e.strokeText(i, o, t, r), e.restore();
|
|
137
|
-
}
|
|
138
|
-
function A(e, i = 20) {
|
|
139
|
-
let o;
|
|
140
|
-
return function(...t) {
|
|
141
|
-
const s = this;
|
|
142
|
-
o || (e.apply(s, t), o = !0, setTimeout(() => o = !1, i));
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
function E(e, i, o = !1) {
|
|
146
|
-
let t;
|
|
147
|
-
return function(...s) {
|
|
148
|
-
const u = this, d = function() {
|
|
149
|
-
t = null, o || e.apply(u, s);
|
|
150
|
-
}, f = o && !t;
|
|
151
|
-
clearTimeout(t), t = setTimeout(d, i), f && e.apply(u, s);
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
function S(e) {
|
|
155
|
-
const i = document.createElement("canvas");
|
|
156
|
-
return i.width = e.width || 1, i.height = e.height || 1, e.width || (e.width = 1), e.height || (e.height = 1), i.getContext("2d").drawImage(e, 0, 0), i;
|
|
157
|
-
}
|
|
158
|
-
function h(e, i) {
|
|
159
|
-
return [null, void 0, NaN, 1 / 0, -1 / 0].includes(e) ? i : e;
|
|
160
|
-
}
|
|
161
|
-
function k({
|
|
162
|
-
chart: e,
|
|
163
|
-
title: i = null,
|
|
164
|
-
slicer: o = null,
|
|
165
|
-
legend: t = null,
|
|
166
|
-
source: s = null,
|
|
167
|
-
noTitle: u = null
|
|
168
|
-
}) {
|
|
169
|
-
let d = 0, f = 0, g = 0, r = 0, l = 0, a = 0, y = 0;
|
|
170
|
-
if (e) {
|
|
171
|
-
const w = e.parentNode, { height: N, width: n } = w.getBoundingClientRect();
|
|
172
|
-
i && (g = i.getBoundingClientRect().height), o && (r = o.getBoundingClientRect().height), t && (l = t.getBoundingClientRect().height), s && (a = s.getBoundingClientRect().height), u && (y = u.getBoundingClientRect().height), d = N - g - r - l - a - y, f = n;
|
|
173
|
-
}
|
|
174
|
-
return {
|
|
175
|
-
width: f,
|
|
176
|
-
height: d,
|
|
177
|
-
heightTitle: g,
|
|
178
|
-
heightNoTitle: y
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
export {
|
|
182
|
-
C as a,
|
|
183
|
-
O as b,
|
|
184
|
-
S as c,
|
|
185
|
-
E as d,
|
|
186
|
-
m as l,
|
|
187
|
-
L as p,
|
|
188
|
-
I as r,
|
|
189
|
-
A as t,
|
|
190
|
-
k as u
|
|
191
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BXhJaCcU.cjs"),we=require("./useResponsive-N8jl0-aC.cjs"),Xe=require("./Title-DBgUbEU1.cjs"),Ce=require("./usePrinter-DRWBcwQ7.cjs"),De=require("./DataTable-ImmHVJ0i.cjs"),Me=require("./Tooltip-TGHDsCSU.cjs"),Ye=require("./Legend-CfimXfYH.cjs"),Ae=require("./vue-ui-skeleton-CLMRPxZm.cjs"),Ie=require("./vue-ui-accordion-DdHwnq9o.cjs"),Be=require("./useNestedProp-DhyCNtMY.cjs"),qe=require("./PackageVersion-DjHCw2D_.cjs"),Re=require("./PenAndPaper-AZpGBe7x.cjs"),Ge=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./Shape-Dl6kIG9D.cjs"),je=require("./useChartAccessibility-Cm7nkzTG.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),We=["id"],Je=["xmlns","viewBox"],Ke=["width","height"],Qe={key:1},Ze=["id"],et=["stop-color"],tt=["offset","stop-color"],lt=["offset","stop-color"],ot=["stop-color"],at={key:2},rt=["id","cx","cy"],nt=["stop-color","stop-opacity"],ut=["stop-color"],st=["id"],it=["id"],ct=["id"],dt=["flood-color"],vt=["id"],ht=["flood-color"],ft=["d","stroke","filter"],yt=["x1","y1","x2","y2","stroke","filter"],pt=["cx","cy","r","fill","filter"],mt={key:6},kt=["stroke","d"],gt={key:0},bt=["d","fill","stroke","stroke-width","filter"],wt=["d","fill","stroke","stroke-width","filter"],Ct={key:0},Bt=["stroke","d"],_t={key:0},xt=["d","stroke","stroke-width","filter"],$t={key:1},St=["d","fill","stroke","stroke-width","filter"],Et=["d","fill","stroke","stroke-width","filter"],Nt={key:1},Pt=["cx","cy","r","fill","stroke","stroke-width"],Vt=["cx","cy","r","fill","stroke","stroke-width"],Ft=["cx","cy","r","stroke"],Lt=["cx","cy","r","fill"],Ot={key:0},zt=["d","fill","onMouseenter","onClick"],Tt={key:1},Xt=["cx","cy","r","fill"],Dt=["x","y","fill","font-size"],Mt=["x","y","fill","font-size"],Yt=["x","y","fill","font-size"],At=["x","y","fill","font-size"],It=["filter"],qt={key:0},Rt=["x","y"],Gt={key:1},Ut=["cx","cy","fill","stroke","filter","onClick"],jt=["cx","cy","fill","stroke","filter","onClick"],Ht=["text-anchor","x","y","fill","font-size","onClick"],Wt=["text-anchor","x","y","fill","font-size","onClick"],Jt=["text-anchor","x","y","fill","font-size","onClick"],Kt=["text-anchor","x","y","fill","font-size","onClick"],Qt={key:2},Zt=["x","y","width"],el=["x","y","width"],tl={key:5,class:"vue-data-ui-watermark"},ll=["onClick"],ol={key:0,style:{"font-variant-numeric":"tabular-nums"}},al={key:1},rl=["innerHTML"],nl={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(_e,{expose:xe,emit:$e}){const{vue_ui_donut:Se}=r.useConfig(),Ee=e.useSlots(),b=_e,P=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),V=e.ref(null),G=e.ref(null),U=e.ref(null),O=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(()=>{O.value&&O.value.disconnect()});function Q(){if(r.objectIsEmpty(b.dataset)?r.error({componentName:"VueUiDonut",type:"dataset"}):b.dataset.forEach((o,u)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{P.value=!1,r.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:u})})}),t.value.responsive){const o=we.throttle(()=>{const{width:u,height:l}=we.useResponsive({chart:V.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?U.value:null,source:j.value,noTitle:H.value});requestAnimationFrame(()=>{n.value.width=u,n.value.height=l})});O.value=new ResizeObserver(o),O.value.observe(V.value.parentNode)}}const d=e.ref(r.createUid()),Ne=e.ref(null),z=e.ref(!1),D=e.ref(""),p=e.ref(null),Z=e.ref(0);function ee(){const o=Be.useNestedProp({userConfig:b.config,defaultConfig:Se});return o.theme?{...Be.useNestedProp({userConfig:r.themes.vue_ui_donut[o.theme]||b.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}const t=e.computed({get:()=>ee(),set:o=>o}),{userOptionsVisible:M,setUserOptionsVisibility:te,keepUserOptionState:le}=Ge.useUserOptionState({config:t.value}),{svgRef:Y}=je.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>b.config,o=>{t.value=ee(),M.value=!t.value.userOptions.showOnChartHover,Q(),W.value+=1,J.value+=1,K.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:oe,isImaging:ae,generatePdf:re,generateImage:ne}=Ce.usePrinter({elementId:`donut__${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut",options:t.value.userOptions.print}),Pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:360,width:512}),F=e.computed(()=>{const o=t.value.style.chart.layout.donut.strokeWidth/512,u=Math.min(n.value.width,n.value.height)*o,l=u>y.value?y.value:u;return Math.max(l,3)}),se=$e,x=e.computed(()=>b.dataset.map((o,u)=>({name:o.name,color:r.convertColorToHex(o.color)||ue.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:o.values.reduce((l,a)=>l+a,0),absoluteValues:o.values,comment:o.comment||"",patternIndex:u}))),k=e.ref(x.value);e.watch(()=>x.value,o=>k.value=o);function Ve(){return x.value.map(o=>({name:o.name,color:o.color,value:o.value}))}const w=e.ref([]),ie=e.ref(null),ce=e.ref(null),$=e.ref(!1);function de(o){const u=x.value.find((s,h)=>h===o),l=k.value.find((s,h)=>h===o);let a=l.value;if(w.value.includes(o)){let h=function(){a>s?(cancelAnimationFrame(ie.value),k.value=k.value.map((f,R)=>o===R?{...f,value:s}:f),$.value=!1):($.value=!0,a+=s*.025,k.value=k.value.map((f,R)=>o===R?{...f,value:a}:f),ie.value=requestAnimationFrame(h))};w.value=w.value.filter(f=>f!==o);const s=u.value;h()}else if(w.value.length<x.value.length-1){let s=function(){a<l.value/100?(cancelAnimationFrame(ce.value),w.value.push(o),k.value=k.value.map((h,f)=>o===f?{...h,value:0}:h),$.value=!1):($.value=!0,a/=1.1,k.value=k.value.map((h,f)=>o===f?{...h,value:a}:h),ce.value=requestAnimationFrame(s))};s()}se("selectLegend",C.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const C=e.computed(()=>(k.value.forEach((o,u)=>{if([null,void 0].includes(o.values))return{...o,values:[]}}),k.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:r.convertColorToHex(o.color)||ue.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:(o.values||[]).reduce((l,a)=>l+a,0),shape:"circle",patternIndex:u})).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:()=>!$.value&&de(u),isSegregated:w.value.includes(u)}))),Fe=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(n.value.width/3,n.value.height/3);return o<55?55:o}),c=e.computed(()=>r.makeDonut({series:C.value},n.value.width/2,n.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 r.createPolarAreas({series:u,center:{x:n.value.width/2,y:n.value.height/2},maxRadius:Math.min(n.value.width,n.value.height)/3})});function E(o){return o.x>n.value.width/2+6?"start":o.x<n.value.width/2-6?"end":"middle"}function Le(o){return o.middlePoint.y>n.value.height/2?r.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:100,centerX:n.value.width/2,centerY:n.value.height/2}).y:r.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:0,centerX:n.value.width/2,centerY:n.value.height/2}).y-100}function g(o){return o.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function A(o,u){const l=o.value/Oe(u);return isNaN(l)?0:r.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,r.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:o})}function Oe(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=>$.value?o.proportion*100:o.value/m.value*100),I=e.ref(null),L=e.ref(!1);function ye({datapoint:o,relativeIndex:u,seriesIndex:l,show:a=!1}){I.value={datapoint:o,seriesIndex:l,config:t.value,series:x.value},z.value=a,p.value=u;let s="";const h=t.value.style.chart.tooltip.customFormat;if(L.value=!1,r.isFunction(h))try{const f=h({seriesIndex:l,datapoint:o,series:x.value,config:t.value});typeof f=="string"&&(D.value=f,L.value=!0)}catch{console.warn("Custom format cannot be applied."),L.value=!1}if(!L.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 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${o.color}"/>${Ee.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${d.value}_${l})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,o.value,r.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 f=r.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,o.proportion*100,r.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>(${f})</span></div>`:s+=`<b>${f}</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>`),D.value=`<div>${s}</div>`}}function S(o){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o?`url(#blur_${d.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=r.createCsvContent(u);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const T=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>',r.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)=>[{color:s.color,name:s.name},B.value.body[h],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}}),N=e.ref(!1);function ze(o){N.value=o,Z.value+=1}const me=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Te(o){return o.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(u=>"-").join("")}function _(o,u){se("selectDatapoint",{datapoint:o,index:u})}function ke(){v.value.showTable=!v.value.showTable}function ge(){v.value.dataLabels.show=!v.value.dataLabels.show}function be(){v.value.showTooltip=!v.value.showTooltip}const X=e.ref(!1);function q(){X.value=!X.value}return xe({getData:Ve,generatePdf:re,generateCsv:pe,generateImage:ne,toggleTable:ke,toggleLabels:ge,toggleTooltip:be,toggleAnnotator:q}),(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:V,class:e.normalizeClass(`vue-ui-donut ${N.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__${d.value}`,onMouseenter:u[6]||(u[6]=()=>e.unref(te)(!0)),onMouseleave:u[7]||(u[7]=()=>e.unref(te)(!1))},[t.value.userOptions.buttons.annotator&&e.unref(Y)?(e.openBlock(),e.createBlock(Re.PenAndPaper,{key:0,color:t.value.style.chart.color,backgroundColor:t.value.style.chart.backgroundColor,active:X.value,svgRef:e.unref(Y),onClose:q},null,8,["color","backgroundColor","active","svgRef"])):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:G,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Xe._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&&P.value&&(e.unref(le)||e.unref(M))?(e.openBlock(),e.createBlock(Ce.UserOptions,{ref_key:"details",ref:Ne,key:`user_option_${Z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(oe),isImaging:e.unref(ae),uid:d.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:N.value,chartElement:V.value,position:t.value.userOptions.position,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:X.value,onToggleFullscreen:ze,onGeneratePdf:e.unref(re),onGenerateCsv:pe,onGenerateImage:e.unref(ne),onToggleTable:ke,onToggleLabels:ge,onToggleTooltip:be,onToggleAnnotator:q,style:e.normalizeStyle({visibility:e.unref(le)?e.unref(M)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:a})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:a})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}: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:"7"}: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:"8"}: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),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Y,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(qe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ke)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("defs",Qe,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,et),e.createElementVNode("stop",{offset:`${(1-F.value/y.value)*100}%`,"stop-color":e.unref(r.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,tt),e.createElementVNode("stop",{offset:`${(1-F.value/y.value/2)*100}%`,"stop-color":e.unref(r.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,ot)],8,Ze)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${a}_${d.value}`,cx:l.middlePoint.x/n.value.width*100+"%",cy:l.middlePoint.y/n.value.height*100+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.shiftHue)(c.value[a].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,nt),e.createElementVNode("stop",{offset:"100%","stop-color":c.value[a].color},null,8,ut)],8,rt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${d.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${d.value}`},null,8,it),u[8]||(u[8]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,st),e.createElementVNode("filter",{id:`shadow_${d.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,dt)],8,ct),e.createElementVNode("filter",{id:`drop_shadow_${d.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,ht)],8,vt)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[g(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(r.calcNutArrowPath)(l,{x:n.value.width/2,y:n.value.height/2},16,16,!1,!1,F.value,12,t.value.style.chart.layout.curvedMarkers),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:S(a)},null,8,ft)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[g(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:e.unref(r.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:n.value.width/2,centerY:n.value.height/2}).x,y1:e.unref(r.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:n.value.width/2,centerY:n.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:S(a)},null,8,yt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"&&t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("circle",{key:5,cx:n.value.width/2,cy:n.value.height/2,r:y.value<=0?10:y.value,fill:t.value.style.chart.backgroundColor,filter:`url(#shadow_${d.value})`},null,8,pt)):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{...l,patternId:`pattern_${d.value}_${l.patternIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),m.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,kt))),256)),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:`url(#pattern_${d.value}_${l.patternIndex})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:S(a)},null,8,bt))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(r.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:S(a)},null,8,wt))),256))],64)):e.createCommentVNode("",!0),m.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[c.value.length>1?(e.openBlock(),e.createElementBlock("g",Ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[a].path,fill:"#FFFFFF"},null,8,Bt))),256)),t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("g",_t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.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_${d.value})`},null,8,xt))),256))])):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",$t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:`url(#pattern_${d.value}_${l.patternIndex})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:S(a)},null,8,St))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.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}_${d.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:S(a)},null,8,Et))),256))])):(e.openBlock(),e.createElementBlock("g",Nt,[o.$slots.pattern?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:n.value.width/2,cy:n.value.height/2,r:y.value,fill:`url(#pattern_${d.value}_${c.value[0].patternIndex})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Pt)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:n.value.width/2,cy:n.value.height/2,r:y.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${d.value})`:c.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Vt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:9,cx:n.value.width/2,cy:n.value.height/2,r:y.value<=0?10:y.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,Ft)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:10,cx:n.value.width/2,cy:n.value.height/2,r:y.value<=0?10:y.value,fill:`url(#gradient_${d.value})`},null,8,Lt)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[c.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",Ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{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=>{z.value=!1,p.value=null}),onClick:s=>_(l,a)},null,40,zt))),256))])):(e.openBlock(),e.createElementBlock("g",Tt,[e.createElementVNode("circle",{cx:n.value.width/2,cy:n.value.height/2,r:y.value,fill:p.value===o.i?"rgba(0,0,0,0.1)":"transparent",onMouseenter:u[1]||(u[1]=l=>ye({datapoint:c.value[0],relativeIndex:0,seriesIndex:c.value[0].seriesIndex,show:!0})),onMouseleave:u[2]||(u[2]=l=>{z.value=!1,p.value=null}),onClick:u[3]||(u[3]=l=>_(c.value[0],o.i))},null,40,Xt)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:n.value.width/2,y:n.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,Dt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:n.value.width/2,y:n.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(r.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,m.value,e.unref(r.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,Mt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:n.value.width/2,y:n.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,Yt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:n.value.width/2,y:n.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($.value?"--":e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,he.value,e.unref(r.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,At)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",{filter:S(a),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",qt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(r.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(r.calcMarkerOffsetX)(l).x-120:e.unref(r.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(r.calcMarkerOffsetX)(l).x-60:e.unref(r.calcMarkerOffsetX)(l).x,y:e.unref(r.calcMarkerOffsetY)(l)-(me.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"dataLabel",e.mergeProps({ref_for:!0},{datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a,isSafari:me.value,isVisible:g(l)&&v.value.dataLabels.show,textAlign:e.unref(r.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(r.calcMarkerOffsetX)(l,!0,16).anchor,percentage:A(l,c.value)}),void 0,!0)])],8,Rt))])):(e.openBlock(),e.createElementBlock("g",Gt,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(r.calcMarkerOffsetX)(l).x,cy:e.unref(r.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_${d.value})`,onClick:s=>_(l,a)},null,8,Ut)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(r.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:n.value.width/2,centerY:n.value.height/2}).x,cy:e.unref(r.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:n.value.width/2,centerY:n.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_${d.value})`,onClick:s=>_(l,a)},null,8,jt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[g(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(r.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(r.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=>_(l,a)},e.toDisplayString(A(l,c.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(r.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,Ht)):e.createCommentVNode("",!0),g(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(r.calcMarkerOffsetX)(l).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(r.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=>_(l,a)},e.toDisplayString(l.name),13,Wt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[g(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":E(i.value[a].middlePoint),x:e.unref(r.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:n.value.width/2,centerY:n.value.height/2}).x,y:e.unref(r.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:n.value.width/2,centerY:n.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=>_(l,a)},e.toDisplayString(A(l,c.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(r.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,Jt)):e.createCommentVNode("",!0),g(l)&&v.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":E(i.value[a].middlePoint),x:e.unref(r.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:n.value.width/2,centerY:n.value.height/2}).x,y:e.unref(r.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:n.value.width/2,centerY:n.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=>_(l,a)},e.toDisplayString(l.name),13,Kt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),v.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",Qt,[g(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(r.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(r.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(r.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(r.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(r.calcMarkerOffsetX)(l).x),y:e.unref(r.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(r.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(r.calcMarkerOffsetX)(l,!0,16).anchor}},void 0,!0)])],8,Zt)):e.createCommentVNode("",!0),g(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+(E(i.value[a].middlePoint)==="end"?e.unref(r.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:n.value.width/2,centerY:n.value.height/2}).x-t.value.style.chart.comments.width:E(i.value[a].middlePoint)==="middle"?e.unref(r.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:n.value.width/2,centerY:n.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(r.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:n.value.width/2,centerY:n.value.height/2}).x),y:Le(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:E(i.value[a].middlePoint),flexAlign:E(i.value[a].middlePoint)}},void 0,!0)])],8,el)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,It))),256)),e.renderSlot(o.$slots,"svg",{svg:n.value},void 0,!0)],14,Je)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tl,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(oe)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ae.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(Ye.Legend,{key:`legend_${K.value}`,legendSet:ve.value,config:Fe.value,onClickMarker:u[4]||(u[4]=({i:l})=>de(l))},e.createSlots({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(r.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(r.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",al," ( "+e.toDisplayString(Te(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",ol," ("+e.toDisplayString(isNaN(l.value/m.value)?"-":e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,fe.value(l),e.unref(r.dataLabel)({v:fe.value(l),s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,ll)]),_:2},[o.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:a})=>[e.createVNode(Ue._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${d.value}_${a})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["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(Me._sfc_main,{show:v.value.showTooltip&&z.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:V.value,content:D.value,isCustom:L.value,isFullscreen:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),P.value?(e.openBlock(),e.createBlock(Ie.default,{key:8,hideDetails:"",config:{open:v.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(De.DataTable,{key:`table_${J.value}`,colNames:T.value.colNames,head:T.value.head,body:T.value.body,config:T.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=>v.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,rl)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(r.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(r.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,We))}},ul=He._export_sfc(nl,[["__scopeId","data-v-649fdaa0"]]);exports.default=ul;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BXhJaCcU.cjs"),ye=require("./useResponsive-N8jl0-aC.cjs"),Fe=require("./Title-DBgUbEU1.cjs"),me=require("./usePrinter-DRWBcwQ7.cjs"),Te=require("./DataTable-ImmHVJ0i.cjs"),Oe=require("./Tooltip-TGHDsCSU.cjs"),Pe=require("./Legend-CfimXfYH.cjs"),ze=require("./vue-ui-skeleton-CLMRPxZm.cjs"),De=require("./vue-ui-accordion-DdHwnq9o.cjs"),be=require("./useNestedProp-DhyCNtMY.cjs"),Ae=require("./PackageVersion-DjHCw2D_.cjs"),Ie=require("./PenAndPaper-AZpGBe7x.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),Re=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),qe=["id"],Ye=["xmlns","viewBox"],Xe=["width","height"],Ge=["id"],He=["offset","stop-color"],We=["offset","stop-opacity"],Je=["id"],Ke=["id"],Qe=["id"],Ze=["flood-color"],je=["d","fill","stroke","stroke-width","filter"],et={key:1},tt=["d","fill"],lt={key:2},at=["x","y","font-size","font-weight","fill"],ot={key:3},nt=["filter"],rt=["text-anchor","x","y","fill","font-size","font-weight"],st=["text-anchor","x","y","fill","font-size","font-weight"],ut=["text-anchor","x","y","fill","font-size","font-weight"],it=["d","fill","onMouseenter","onClick"],ct={key:5,class:"vue-data-ui-watermark"},dt={key:0,class:"vue-ui-nested-donuts-legend-title"},vt=["onClick"],ft=["innerHTML"],pt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ge,{expose:ke,emit:Ce}){const{vue_ui_nested_donuts:we}=r.useConfig(),k=ge,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),Le=e.ref(null),U=e.ref(0),B=e.ref(null),q=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),L=e.ref(!1);function Be(l){L.value=l,U.value+=1}const t=e.computed({get:()=>Z(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Me.useUserOptionState({config:t.value}),{svgRef:Q}=Re.useChartAccessibility({config:t.value.style.chart.title});function Z(){const l=be.useNestedProp({userConfig:k.config,defaultConfig:we});return l.theme?{...be.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=Z(),P.value=!t.value.userOptions.showOnChartHover,j(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const $=e.ref(null);e.onMounted(()=>{j()});function j(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ye.throttle(()=>{const{width:s,height:o}=ye.useResponsive({chart:B.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value});requestAnimationFrame(()=>{c.value.width=s,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(B.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts",options:t.value.userOptions.print}),xe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),$e=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),oe=Ce;function Ne({datapoint:l,index:s}){oe("selectDatapoint",{datapoint:l,index:s})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${h.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${s}`,id:`${h.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||$e.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),ne=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Se(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const d=e.ref(ne.value);e.watch(()=>ne.value,l=>d.value=l);const re=e.ref(null),se=e.ref(null);function z(l){oe("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),p=Se(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(re.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),re.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(se.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),se.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),ue=e.computed(()=>d.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ie=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),ce=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function _e({datapoint:l,_relativeIndex:s,seriesIndex:o}){ce.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)return"";a+=`
|
|
2
|
-
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
|
-
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
|
-
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
5
|
-
<circle cx="10" cy="10" r="10" fill="${p.color}"/>
|
|
6
|
-
</svg>
|
|
7
|
-
<span>
|
|
8
|
-
${p.arcOf??""} - ${p.name}
|
|
9
|
-
</span>
|
|
10
|
-
</div>
|
|
11
|
-
<span>
|
|
12
|
-
${t.value.style.chart.tooltip.showValue?`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.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.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}
|
|
13
|
-
</b>`:""}
|
|
14
|
-
${t.value.style.chart.tooltip.showPercentage?`(${r.dataLabel({v:p.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})`:""}
|
|
15
|
-
</span>
|
|
16
|
-
</div>
|
|
17
|
-
`})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,a+=`<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="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(a+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.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.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?a+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}F.value=!0}function I(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function de(l,s){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0)return[null,void 0].includes(_.value)||_.value===s?"":`url(#blur_${h.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||f.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${h.value})`}const M=e.computed(()=>m.value.map((l,s)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:s,total:l.series.filter(a=>!f.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:f.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:f.value.includes(o.id)})))),Ve=e.computed(()=>({cy:"nested-donuts-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":""})),C=e.computed(()=>{const l=d.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),s=d.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:s}});function ve(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const V=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],s=C.value.head.map((a,u)=>{const p=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},p,isNaN(C.value.body[u]/a.total)?"-":r.dataLabel({v:C.value.body[u]/a.total*100,s:"%",r:t.value.table.td.roundingPercentage})]}),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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:s,config:o}});function Ee(){return m.value}function fe(){v.value.showTable=!v.value.showTable}function pe(){v.value.dataLabels.show=!v.value.dataLabels.show}function he(){v.value.showTooltip=!v.value.showTooltip}const E=e.ref(!1);function R(){E.value=!E.value}return ke({getData:Ee,generatePdf:le,generateCsv:ve,generateImage:ae,toggleTable:fe,toggleLabels:pe,toggleTooltip:he,toggleAnnotator:R}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:B,class:e.normalizeClass(`vue-ui-nested-donuts ${L.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${h.value}`,onMouseenter:s[3]||(s[3]=()=>e.unref(J)(!0)),onMouseleave:s[4]||(s[4]=()=>e.unref(J)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,svgRef:e.unref(Q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:E.value,onClose:R},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),xe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:q},[(e.openBlock(),e.createBlock(Fe._sfc_main,{key:`title_${G.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&&x.value&&(e.unref(K)||e.unref(P))?(e.openBlock(),e.createBlock(me.UserOptions,{ref:"details",key:`user_option_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:E.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(le),onGenerateCsv:ve,onGenerateImage:e.unref(ae),onToggleTable:fe,onToggleLabels:pe,onToggleTooltip:he,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(K)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"7"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Q,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${c.value.width<=0?.001:c.value.width} ${c.value.height<0?.001:c.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ae._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?.001:c.value.width,height:c.value.height<0?.001:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Xe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${h.value}_${n}`},[s[5]||(s[5]=e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),e.createElementVNode("stop",{offset:`${(1-D.value/ue.value[n])*100}%`,"stop-color":e.unref(r.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,He),e.createElementVNode("stop",{offset:`${(1-D.value/ue.value[n]/2)*100}%`,"stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,We),s[6]||(s[6]=e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1))],8,Ge))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${h.value}`},null,8,Ke),s[7]||(s[7]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,Je),e.createElementVNode("filter",{id:`shadow_${h.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,Ze)],8,Qe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:e.unref(r.setOpacity)(a.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:de(a,u)},null,8,je)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${h.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,tt)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&c.value.width&&c.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:c.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,at)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:de(a,u)},[I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(r.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,rt)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,st)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,ut)):e.createCommentVNode("",!0)],8,nt))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:a.arcSlice,fill:Le.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:p=>_e({datapoint:a,seriesIndex:a.seriesIndex}),onClick:p=>Ne({datapoint:a,index:u}),onMouseleave:s[0]||(s[0]=p=>{F.value=!1,ce.value=null,S.value=null,_.value=null})},null,40,it)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ct,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ze.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Oe._sfc_main,{show:v.value.showTooltip&&F.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:B.value,content:T.value,isFullscreen:L.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:O,class:e.normalizeClass({"vue-ui-nested-donuts-legend":M.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,n)=>(e.openBlock(),e.createBlock(Pe.Legend,{key:`legend_${n}_${W.value}`,legendSet:o,config:Ve.value,onClickMarker:s[1]||(s[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",dt,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:p=>z(a),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),f.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(r.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,vt)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:M.value},void 0,!0)],512)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:Y,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(De.default,{key:10,hideDetails:"",config:{open:v.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(Te.DataTable,{key:`table_${H.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ft)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,qe))}},ht=Ue._export_sfc(pt,[["__scopeId","data-v-8783db5e"]]);exports.default=ht;
|