vue-data-ui 3.22.3 → 3.22.4
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-Ct8T_Lyp.js → Arrow-CgzmXCW_.js} +1 -1
- package/dist/{BaseDraggableDialog-DLuXvUbs.js → BaseDraggableDialog-DjzNWkiE.js} +2 -2
- package/dist/{BaseIcon-CX_ChMz-.js → BaseIcon-xBuW2jjI.js} +1 -1
- package/dist/{BaseLegendToggle-qL0O9ooF.js → BaseLegendToggle-C4Usj0LI.js} +1 -1
- package/dist/{BaseZoomControls-BI5sLb6d.js → BaseZoomControls-Cg9o2J-q.js} +2 -2
- package/dist/{ColorPicker-CwyWzPx_.js → ColorPicker-Usv7badH.js} +2 -2
- package/dist/{DataTable-KEMekOVu.js → DataTable-PidUPOit.js} +2 -2
- package/dist/Legend-DXOzbXb-.js +156 -0
- package/dist/{NonSvgPenAndPaper-CeNJtWON.js → NonSvgPenAndPaper-OIs8I25K.js} +19 -19
- package/dist/{PackageVersion-D-_GVhxY.js → PackageVersion-Cm-3hwIF.js} +1 -1
- package/dist/{PenAndPaper-DkZYRnrW.js → PenAndPaper-ISUbDKXq.js} +11 -11
- package/dist/{Shape-S-7v8SAE.js → Shape-BnF9aMPX.js} +3 -3
- package/dist/Slicer-hEvKOLw3.js +1145 -0
- package/dist/{SlicerPreview-Co-V9YBf.js → SlicerPreview-BDI-aCXE.js} +36 -35
- package/dist/{SparkTooltip-D2BBjZKc.js → SparkTooltip-DaWSTzfA.js} +1 -1
- package/dist/{Title-Cxgd_JyY.js → Title-DDEEO-Nr.js} +1 -1
- package/dist/{Tooltip-BqdN_ZBE.js → Tooltip-BhKov422.js} +1 -1
- package/dist/{UserOptions-WIxTs7Xf.js → UserOptions-BxT1XHzN.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-DsEPQbU1.js → dom-to-png-ZOysoMwu.js} +1 -1
- package/dist/exposedLib-C2U48XK7.js +19 -0
- package/dist/img-B29J8tV5.js +129 -0
- package/dist/{labelUtils-WDjGa7EP.js → labelUtils-BFcL_t-A.js} +1 -1
- package/dist/{lib-NmjQazSn.js → lib-CuwHGt1j.js} +142 -123
- package/dist/{package-KQdsc0if.js → package-CRlwXCDr.js} +1 -1
- package/dist/{pdf-BVocBz-Y.js → pdf-ymYt9Lee.js} +1 -1
- package/dist/{render-common-BUbY65H0.js → render-common-D6ny-Fwu.js} +22 -22
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +59 -2
- package/dist/types/vue-ui-strip-plot.d.ts +2 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-DBv7sw1h.js → useAutoSizeLabelsInsideViewbox-DzAZ-MeY.js} +1 -1
- package/dist/{useConfig-Bf_EBbe3.js → useConfig-pVLia3dt.js} +30 -2
- package/dist/{useNestedProp-C9viY7oU.js → useNestedProp-BjkuFaz1.js} +1 -1
- package/dist/{useObjectBindings-Byts-nf-.js → useObjectBindings-C1XuDxFr.js} +2 -2
- package/dist/{usePrinter-DRYgV-XS.js → usePrinter-C0wAS8yc.js} +3 -3
- package/dist/utils.js +14 -14
- package/dist/{vue-data-ui-CDgunUso.js → vue-data-ui-DTWqd0R2.js} +68 -68
- package/dist/vue-data-ui.js +73 -73
- package/dist/vue-ui-3d-bar-DBpSRV-C.js +1757 -0
- package/dist/{vue-ui-accordion-vYLqcJJd.js → vue-ui-accordion-B64IJyPU.js} +4 -4
- package/dist/{vue-ui-age-pyramid-CCAcpoA2.js → vue-ui-age-pyramid-e09oK-Fp.js} +289 -289
- package/dist/{vue-ui-annotator-CmjcPCRy.js → vue-ui-annotator-CU4CdKMm.js} +69 -69
- package/dist/vue-ui-bullet-tlj5_z_z.js +710 -0
- package/dist/{vue-ui-bump-UWs3Fols.js → vue-ui-bump-BD0Uq3As.js} +259 -259
- package/dist/vue-ui-candlestick-CZxsNGKS.js +1826 -0
- package/dist/{vue-ui-carousel-table-DiPXX1eV.js → vue-ui-carousel-table-ycbcmBKt.js} +122 -122
- package/dist/vue-ui-chestnut-CnEsjvh4.js +2010 -0
- package/dist/{vue-ui-chord-MB6BktFk.js → vue-ui-chord-BZhXsZXp.js} +53 -53
- package/dist/{vue-ui-circle-pack-D4n5rKtA.js → vue-ui-circle-pack-BPC6zUis.js} +46 -46
- package/dist/{vue-ui-cursor-Cu_HGeoy.js → vue-ui-cursor-DF_e5k1s.js} +4 -4
- package/dist/{vue-ui-dag-DQlbTBPB.js → vue-ui-dag-BIo4-Oa8.js} +49 -49
- package/dist/{vue-ui-dashboard-BD-M8q8G.js → vue-ui-dashboard-BEtF6UX2.js} +70 -70
- package/dist/{vue-ui-digits-C21SWRDQ.js → vue-ui-digits-07IxTlNO.js} +4 -4
- package/dist/vue-ui-donut-C4FcvXm3.js +2410 -0
- package/dist/{vue-ui-donut-Djiw7Rz1.js → vue-ui-donut-C5oRCxAO.js} +193 -193
- package/dist/{vue-ui-donut-evolution-BkI06V1N.js → vue-ui-donut-evolution-BSeyPC9k.js} +419 -419
- package/dist/{vue-ui-dumbbell-Yn79Apx7.js → vue-ui-dumbbell-Cykw4WYn.js} +341 -341
- package/dist/{vue-ui-flow-DfWx60DS.js → vue-ui-flow-R_dLE1WS.js} +72 -72
- package/dist/vue-ui-funnel-Ct5xQdak.js +777 -0
- package/dist/vue-ui-galaxy-B5BkdIt5.js +1077 -0
- package/dist/vue-ui-gauge-AbzY-7Gg.js +920 -0
- package/dist/{vue-ui-geo-DdB-gJBh.js → vue-ui-geo-DVT9XEC3.js} +18 -18
- package/dist/{vue-ui-gizmo-AMWvrL1N.js → vue-ui-gizmo-DJTRXao8.js} +62 -62
- package/dist/{vue-ui-heatmap-8cmpKIN5.js → vue-ui-heatmap-BCFId15K.js} +293 -293
- package/dist/vue-ui-history-plot-DCeroetw.js +1700 -0
- package/dist/{vue-ui-horizontal-bar-D32lWjQJ.js → vue-ui-horizontal-bar-j3jszojt.js} +75 -75
- package/dist/{vue-ui-kpi-B3FdCV-T.js → vue-ui-kpi-DJjF6tcf.js} +12 -12
- package/dist/{vue-ui-mini-loader-Bk-5TDbT.js → vue-ui-mini-loader-nOsOsA2V.js} +3 -3
- package/dist/{vue-ui-molecule-B4fNC1Bk.js → vue-ui-molecule-2pfoR63d.js} +213 -213
- package/dist/{vue-ui-mood-radar-_mw9D1wg.js → vue-ui-mood-radar-DP_4LHfZ.js} +40 -40
- package/dist/{vue-ui-nested-donuts-DPhDz07R.js → vue-ui-nested-donuts-DFsLZEqx.js} +255 -255
- package/dist/{vue-ui-onion-Cob0y2FO.js → vue-ui-onion-CzXx3Rme.js} +293 -293
- package/dist/vue-ui-parallel-coordinate-plot-BY6dptUG.js +1416 -0
- package/dist/{vue-ui-quadrant-D6wv44Hs.js → vue-ui-quadrant-Br_iZmcw.js} +57 -57
- package/dist/{vue-ui-quick-chart-EeT-lzAq.js → vue-ui-quick-chart-CnIFPFPv.js} +654 -654
- package/dist/vue-ui-radar-CNwKFbHc.js +1281 -0
- package/dist/{vue-ui-rating-DlMTyra_.js → vue-ui-rating-CRziryE2.js} +22 -22
- package/dist/vue-ui-relation-circle-BVDIikGi.js +924 -0
- package/dist/{vue-ui-ridgeline-VO2-zPGd.js → vue-ui-ridgeline-Kw50zROq.js} +468 -468
- package/dist/vue-ui-rings-BDJyoWvT.js +1246 -0
- package/dist/vue-ui-scatter-DoL5Kh1Y.js +2413 -0
- package/dist/{vue-ui-skeleton-ImkpUdwJ.js → vue-ui-skeleton-BOHwJSdz.js} +22 -22
- package/dist/{vue-ui-smiley-Ct3ijoOw.js → vue-ui-smiley-BTvDy8Fm.js} +5 -5
- package/dist/{vue-ui-spark-trend-_b2gVafQ.js → vue-ui-spark-trend-OgSFIFh0.js} +24 -24
- package/dist/{vue-ui-sparkbar-CRH8b1fM.js → vue-ui-sparkbar-D8FdqMB_.js} +35 -35
- package/dist/{vue-ui-sparkgauge-Z_lgEp7i.js → vue-ui-sparkgauge-CBpPbVkw.js} +56 -56
- package/dist/vue-ui-sparkhistogram-BQjbLa2k.js +560 -0
- package/dist/{vue-ui-sparkline-B-QS62r4.js → vue-ui-sparkline-BJfh5Lje.js} +200 -200
- package/dist/{vue-ui-sparkstackbar-DICmDZrB.js → vue-ui-sparkstackbar-1WUQrqd7.js} +126 -126
- package/dist/{vue-ui-stackbar-BRqqDp3a.js → vue-ui-stackbar-Dqs7_g8D.js} +147 -147
- package/dist/{vue-ui-stackline-DVY_4Fmh.js → vue-ui-stackline-IRjugedp.js} +417 -417
- package/dist/vue-ui-strip-plot-B7D6Hk8R.js +1729 -0
- package/dist/{vue-ui-table-ByFPF5fJ.js → vue-ui-table-Bqi9XNvY.js} +64 -64
- package/dist/{vue-ui-table-heatmap-DfLfYJiR.js → vue-ui-table-heatmap-D38YSxhJ.js} +16 -16
- package/dist/{vue-ui-table-sparkline-Gi1MQO-E.js → vue-ui-table-sparkline-0Ffb2jdf.js} +19 -19
- package/dist/vue-ui-thermometer-Di5PXtEO.js +763 -0
- package/dist/{vue-ui-timer-CrIq3NmZ.js → vue-ui-timer-9CDcd-gP.js} +6 -6
- package/dist/{vue-ui-tiremarks-BB3VV4tK.js → vue-ui-tiremarks-BAQ-cCSq.js} +10 -10
- package/dist/vue-ui-treemap-CLOlWiDE.js +1587 -0
- package/dist/vue-ui-waffle-DG2IfACo.js +1362 -0
- package/dist/{vue-ui-wheel-DZq3C6wh.js → vue-ui-wheel-BfXJFCjv.js} +29 -29
- package/dist/{vue-ui-word-cloud-BNK1nfDn.js → vue-ui-word-cloud-3NJy1z6d.js} +28 -28
- package/dist/{vue-ui-world-D3F772fb.js → vue-ui-world-vrGT5g1H.js} +127 -127
- package/dist/{vue-ui-xy-f56XjeNS.js → vue-ui-xy-Cb7u46JN.js} +410 -410
- package/dist/{vue-ui-xy-DOnq4Na2.js → vue-ui-xy-Dg0wxSeC.js} +760 -760
- package/dist/{vue-ui-xy-canvas-OajdJbzS.js → vue-ui-xy-canvas-CjbjJ70r.js} +60 -60
- package/dist/{vue_ui_strip_plot-CtJe8_gq.js → vue_ui_strip_plot-BaHbnnwN.js} +7 -0
- package/package.json +1 -1
- package/dist/Legend--t7Mbp9Z.js +0 -115
- package/dist/Slicer-CpBaahpI.js +0 -1144
- package/dist/exposedLib-BkRxoSB9.js +0 -19
- package/dist/img-CyjhDDaM.js +0 -74
- package/dist/vue-ui-3d-bar-BrSoUZQ_.js +0 -1757
- package/dist/vue-ui-bullet-BYrQAbvp.js +0 -710
- package/dist/vue-ui-candlestick-CJw3R21J.js +0 -1826
- package/dist/vue-ui-chestnut-DJkyr3uK.js +0 -2010
- package/dist/vue-ui-donut-BPOS4Aoe.js +0 -2410
- package/dist/vue-ui-funnel-hsmCJgE5.js +0 -777
- package/dist/vue-ui-galaxy-BC-D8ZZ6.js +0 -1077
- package/dist/vue-ui-gauge-CnDTR46T.js +0 -920
- package/dist/vue-ui-history-plot-ZcraxoDy.js +0 -1554
- package/dist/vue-ui-parallel-coordinate-plot-BPyfEQEf.js +0 -1416
- package/dist/vue-ui-radar-DNid-gVu.js +0 -1281
- package/dist/vue-ui-relation-circle-DALWYwuI.js +0 -924
- package/dist/vue-ui-rings-CGU8bnut.js +0 -1246
- package/dist/vue-ui-scatter-CDy2LLD_.js +0 -2413
- package/dist/vue-ui-sparkhistogram-DzukoeRA.js +0 -560
- package/dist/vue-ui-strip-plot-DUv9SsML.js +0 -1340
- package/dist/vue-ui-thermometer-MfzmVt9N.js +0 -763
- package/dist/vue-ui-treemap-CeE1TT6j.js +0 -1587
- package/dist/vue-ui-waffle-KDOR3fMN.js +0 -1362
|
@@ -0,0 +1,2410 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { Et as t, Gt as n, Lt as r, O as i, Ot as a, Q as o, Rt as s, S as c, U as l, Ut as u, W as ee, X as te, Z as ne, b as d, d as f, i as p, it as m, jt as h, kt as g, o as re, p as ie, q as _, rt as ae, t as oe, u as v, ut as se, v as ce, vt as le, w as ue } from "./lib-CuwHGt1j.js";
|
|
3
|
+
import { t as de } from "./useConfig-pVLia3dt.js";
|
|
4
|
+
import { t as fe } from "./usePrinter-C0wAS8yc.js";
|
|
5
|
+
import { n as pe, t as me } from "./BaseScanner-DZvpgOjM.js";
|
|
6
|
+
import { t as he } from "./useSvgExport-SVIsDot8.js";
|
|
7
|
+
import { t as ge } from "./useNestedProp-BjkuFaz1.js";
|
|
8
|
+
import { t as _e } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as ve } from "./img-B29J8tV5.js";
|
|
10
|
+
import { n as ye } from "./Title-DDEEO-Nr.js";
|
|
11
|
+
import { t as be } from "./Shape-BnF9aMPX.js";
|
|
12
|
+
import { t as xe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
|
+
import { c as Se } from "./canvas-lib-BOP_HS11.js";
|
|
14
|
+
import { t as Ce } from "./useResponsive-BfnK0KxU.js";
|
|
15
|
+
import { t as we } from "./BaseLegendToggle-C4Usj0LI.js";
|
|
16
|
+
import { t as Te } from "./A11yDataTable-DdRsVULz.js";
|
|
17
|
+
import { t as Ee } from "./useUserOptionState-DK-_1ddE.js";
|
|
18
|
+
import { t as De } from "./useChartAccessibility-DYqac8yF.js";
|
|
19
|
+
import { n as Oe, t as ke } from "./labelUtils-BFcL_t-A.js";
|
|
20
|
+
import { t as Ae } from "./vue_ui_donut-BDGqG07h.js";
|
|
21
|
+
import { t as je } from "./Legend-DXOzbXb-.js";
|
|
22
|
+
import { Fragment as y, Teleport as Me, computed as b, createBlock as Ne, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as Pe, createTextVNode as Fe, createVNode as Ie, defineAsyncComponent as Le, guardReactiveProps as w, mergeProps as Re, nextTick as ze, normalizeClass as Be, normalizeProps as T, normalizeStyle as E, onBeforeUnmount as Ve, onMounted as He, openBlock as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as Ue, shallowRef as We, toDisplayString as Ge, toRefs as Ke, unref as j, useSlots as qe, vShow as Je, watch as Ye, withCtx as M, withDirectives as Xe } from "vue";
|
|
23
|
+
//#region src/useSmallArcLayouts.js
|
|
24
|
+
function Ze(e) {
|
|
25
|
+
let { FINAL_CONFIG: t, noGhostDonut: n, svg: r, padding: i, labels_inline_fontSize: a, minSize: o, findArcMidpoint: s, calcMarkerOffsetX: c, calcMarkerOffsetY: l, animatingIndex: u, segregated: ee, isSmallArc: te } = e;
|
|
26
|
+
return { smallArcLayoutsClassic: b(() => {
|
|
27
|
+
if (t.value.type !== "classic") return {};
|
|
28
|
+
let e = {}, ne = n.value || [];
|
|
29
|
+
if (!ne.length) return e;
|
|
30
|
+
let d = r.value.width / 2, f = r.value.height / 2, p = i.value.top + 16, m = r.value.height - i.value.bottom - 16, h = a.value, g = h / 3, re = h * 1.5, ie = d - (o.value + 6), _ = d + (o.value + 6), ae = !!t.value.style.chart.layout.curvedMarkers;
|
|
31
|
+
function oe({ midX: e, midY: t, bandX: n, bandY: r }) {
|
|
32
|
+
if (!ae) return `M ${e} ${t} L ${e} ${r} L ${n} ${r}`;
|
|
33
|
+
let i = n < d ? -1 : 1, a = n - e, o = r - t, s = Math.sqrt(a * a + o * o) || 1, c = e - d, l = t - f, u = Math.sqrt(c * c + l * l) || 1, ee = c / u, te = l / u, ne = u + 9;
|
|
34
|
+
function p({ x: e, y: t }) {
|
|
35
|
+
let n = e - d, r = t - f, i = Math.sqrt(n * n + r * r) || 1;
|
|
36
|
+
if (i >= ne) return {
|
|
37
|
+
x: e,
|
|
38
|
+
y: t
|
|
39
|
+
};
|
|
40
|
+
let a = ne / i;
|
|
41
|
+
return {
|
|
42
|
+
x: d + n * a,
|
|
43
|
+
y: f + r * a
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (s < 56) {
|
|
47
|
+
let i = a / s, c = -(o / s), l = i, u = (e + n) * .5, ne = (t + r) * .5, m = u + c, h = ne + l, g = (m - d) * (m - d) + (h - f) * (h - f), re = u - c, ie = ne - l;
|
|
48
|
+
(re - d) * (re - d) + (ie - f) * (ie - f) > g && (c = -c, l = -l);
|
|
49
|
+
let _ = .78, ae = e + a * _, oe = t + o * _, v = Math.max(0, Math.min(1, (s - 18) / 44)), se = v * v * (3 - 2 * v), ce = 2.5 + se * 4, le = 1 + se * 2.5;
|
|
50
|
+
ce *= .9;
|
|
51
|
+
let ue = p({
|
|
52
|
+
x: ae + c * ce + ee * le,
|
|
53
|
+
y: oe + l * ce + te * le
|
|
54
|
+
});
|
|
55
|
+
return `M ${e} ${t} Q ${ue.x} ${ue.y} ${n} ${r}`;
|
|
56
|
+
}
|
|
57
|
+
let m = s * .34;
|
|
58
|
+
m < 20 && (m = 20), m > 46 && (m = 46);
|
|
59
|
+
let h = s * .46;
|
|
60
|
+
h < 22 && (h = 22), h > 70 && (h = 70);
|
|
61
|
+
let g = {
|
|
62
|
+
x: e + ee * m,
|
|
63
|
+
y: t + te * m
|
|
64
|
+
}, re = d + i * Math.max(Math.abs(n - d), ne), ie = {
|
|
65
|
+
x: n - i * Math.min(h, Math.abs(re - n) * .75),
|
|
66
|
+
y: r
|
|
67
|
+
}, _ = p(g), oe = p(ie);
|
|
68
|
+
return `M ${e} ${t} C ${_.x} ${_.y} ${oe.x} ${oe.y} ${n} ${r}`;
|
|
69
|
+
}
|
|
70
|
+
function v(e) {
|
|
71
|
+
let t = String(e ?? "").split(/\n/g);
|
|
72
|
+
return re + Math.max(0, t.length - 1) * (h * 1.2);
|
|
73
|
+
}
|
|
74
|
+
function se({ arc: e, index: t }) {
|
|
75
|
+
let { x: n, y: r } = s(e.path);
|
|
76
|
+
return {
|
|
77
|
+
arc: e,
|
|
78
|
+
index: t,
|
|
79
|
+
midX: n,
|
|
80
|
+
midY: r,
|
|
81
|
+
inlineMarkerX: c(e).x,
|
|
82
|
+
inlineMarkerY: l(e) - 3.5,
|
|
83
|
+
labelHeight: v(e.name)
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function ce(e) {
|
|
87
|
+
let { arc: t } = e, n = t.seriesIndex ?? 0;
|
|
88
|
+
return u.value === n || ee.value.includes(n) ? !1 : te(t, n);
|
|
89
|
+
}
|
|
90
|
+
function le(e) {
|
|
91
|
+
let t = e.inlineMarkerY < f, n = e.inlineMarkerX < d;
|
|
92
|
+
return t && n ? "TL" : t && !n ? "TR" : !t && n ? "BL" : "BR";
|
|
93
|
+
}
|
|
94
|
+
function ue(e, t) {
|
|
95
|
+
if (t.startsWith("T")) {
|
|
96
|
+
e.sort((e, t) => e.inlineMarkerY - t.inlineMarkerY || e.index - t.index);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
e.sort((e, t) => t.inlineMarkerY - e.inlineMarkerY || e.index - t.index);
|
|
100
|
+
}
|
|
101
|
+
function de({ side: e, markerX: t, markerY: n, labelY: r, connectorPath: i }) {
|
|
102
|
+
return {
|
|
103
|
+
side: e,
|
|
104
|
+
labelX: e === "left" ? t - 8 : t + 8,
|
|
105
|
+
labelY: r + g,
|
|
106
|
+
textAnchor: e === "left" ? "end" : "start",
|
|
107
|
+
markerX: t,
|
|
108
|
+
markerY: n,
|
|
109
|
+
connectorPath: i
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function fe({ candidateList: t, side: n, bandMarkerX: r, startY: i, direction: a }) {
|
|
113
|
+
let o = i;
|
|
114
|
+
t.forEach((t) => {
|
|
115
|
+
let { index: i, midX: s, midY: c, labelHeight: l } = t, u;
|
|
116
|
+
a === "down" ? (u = o, o += l) : (o -= l, u = o);
|
|
117
|
+
let ee = u, te = oe({
|
|
118
|
+
midX: s,
|
|
119
|
+
midY: c,
|
|
120
|
+
bandX: r,
|
|
121
|
+
bandY: ee
|
|
122
|
+
});
|
|
123
|
+
e[i] = de({
|
|
124
|
+
side: n,
|
|
125
|
+
markerX: r,
|
|
126
|
+
markerY: ee,
|
|
127
|
+
labelY: u,
|
|
128
|
+
connectorPath: te
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
let pe = ne.map((e, t) => se({
|
|
133
|
+
arc: e,
|
|
134
|
+
index: t
|
|
135
|
+
})).filter(ce), me = {
|
|
136
|
+
TL: [],
|
|
137
|
+
TR: [],
|
|
138
|
+
BL: [],
|
|
139
|
+
BR: []
|
|
140
|
+
};
|
|
141
|
+
return pe.forEach((e) => {
|
|
142
|
+
me[le(e)].push(e);
|
|
143
|
+
}), Object.keys(me).forEach((e) => {
|
|
144
|
+
ue(me[e], e);
|
|
145
|
+
}), fe({
|
|
146
|
+
candidateList: me.TL,
|
|
147
|
+
side: "left",
|
|
148
|
+
bandMarkerX: ie,
|
|
149
|
+
startY: p,
|
|
150
|
+
direction: "down"
|
|
151
|
+
}), fe({
|
|
152
|
+
candidateList: me.TR,
|
|
153
|
+
side: "right",
|
|
154
|
+
bandMarkerX: _,
|
|
155
|
+
startY: p,
|
|
156
|
+
direction: "down"
|
|
157
|
+
}), me.BL.length > 1 && fe({
|
|
158
|
+
candidateList: me.BL,
|
|
159
|
+
side: "left",
|
|
160
|
+
bandMarkerX: ie,
|
|
161
|
+
startY: m,
|
|
162
|
+
direction: "up"
|
|
163
|
+
}), me.BR.length > 1 && fe({
|
|
164
|
+
candidateList: me.BR,
|
|
165
|
+
side: "right",
|
|
166
|
+
bandMarkerX: _,
|
|
167
|
+
startY: m,
|
|
168
|
+
direction: "up"
|
|
169
|
+
}), e;
|
|
170
|
+
}) };
|
|
171
|
+
}
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/components/vue-ui-donut.vue
|
|
174
|
+
var Qe = /* @__PURE__ */ e({ default: () => bn }), $e = ["id"], et = ["id"], tt = ["id"], nt = { style: { position: "relative" } }, rt = [
|
|
175
|
+
"xmlns",
|
|
176
|
+
"aria-describedby",
|
|
177
|
+
"viewBox"
|
|
178
|
+
], it = ["width", "height"], at = { key: 1 }, ot = ["id"], st = ["stop-color"], ct = ["offset", "stop-color"], lt = ["offset", "stop-color"], ut = ["stop-color"], dt = { key: 2 }, ft = [
|
|
179
|
+
"id",
|
|
180
|
+
"cx",
|
|
181
|
+
"cy"
|
|
182
|
+
], pt = ["stop-color", "stop-opacity"], mt = ["stop-color"], ht = ["id"], gt = ["id"], _t = ["id"], vt = ["flood-color"], yt = ["id"], bt = ["flood-color"], xt = [
|
|
183
|
+
"d",
|
|
184
|
+
"stroke",
|
|
185
|
+
"filter"
|
|
186
|
+
], St = [
|
|
187
|
+
"d",
|
|
188
|
+
"stroke",
|
|
189
|
+
"filter"
|
|
190
|
+
], Ct = [
|
|
191
|
+
"cx",
|
|
192
|
+
"cy",
|
|
193
|
+
"r",
|
|
194
|
+
"fill",
|
|
195
|
+
"filter"
|
|
196
|
+
], wt = { key: 6 }, Tt = ["stroke", "d"], Et = [
|
|
197
|
+
"d",
|
|
198
|
+
"fill",
|
|
199
|
+
"stroke",
|
|
200
|
+
"stroke-width",
|
|
201
|
+
"filter"
|
|
202
|
+
], Dt = { key: 0 }, Ot = [
|
|
203
|
+
"d",
|
|
204
|
+
"fill",
|
|
205
|
+
"stroke",
|
|
206
|
+
"stroke-width",
|
|
207
|
+
"filter"
|
|
208
|
+
], kt = { key: 0 }, At = ["stroke", "d"], jt = { key: 0 }, Mt = [
|
|
209
|
+
"d",
|
|
210
|
+
"stroke",
|
|
211
|
+
"stroke-width",
|
|
212
|
+
"filter"
|
|
213
|
+
], Nt = { key: 1 }, Pt = [
|
|
214
|
+
"d",
|
|
215
|
+
"fill",
|
|
216
|
+
"stroke",
|
|
217
|
+
"stroke-width",
|
|
218
|
+
"filter"
|
|
219
|
+
], Ft = [
|
|
220
|
+
"d",
|
|
221
|
+
"fill",
|
|
222
|
+
"stroke",
|
|
223
|
+
"stroke-width",
|
|
224
|
+
"filter"
|
|
225
|
+
], It = { key: 1 }, Lt = [
|
|
226
|
+
"cx",
|
|
227
|
+
"cy",
|
|
228
|
+
"r",
|
|
229
|
+
"fill",
|
|
230
|
+
"stroke",
|
|
231
|
+
"stroke-width"
|
|
232
|
+
], Rt = [
|
|
233
|
+
"cx",
|
|
234
|
+
"cy",
|
|
235
|
+
"r",
|
|
236
|
+
"fill",
|
|
237
|
+
"stroke",
|
|
238
|
+
"stroke-width"
|
|
239
|
+
], zt = { key: 0 }, Bt = [
|
|
240
|
+
"d",
|
|
241
|
+
"fill",
|
|
242
|
+
"stroke",
|
|
243
|
+
"stroke-width"
|
|
244
|
+
], Vt = [
|
|
245
|
+
"cx",
|
|
246
|
+
"cy",
|
|
247
|
+
"r",
|
|
248
|
+
"stroke"
|
|
249
|
+
], Ht = [
|
|
250
|
+
"cx",
|
|
251
|
+
"cy",
|
|
252
|
+
"r",
|
|
253
|
+
"fill"
|
|
254
|
+
], Ut = [
|
|
255
|
+
"cx",
|
|
256
|
+
"cy",
|
|
257
|
+
"r"
|
|
258
|
+
], Wt = { key: 0 }, Gt = [
|
|
259
|
+
"d",
|
|
260
|
+
"stroke",
|
|
261
|
+
"fill",
|
|
262
|
+
"onMouseenter",
|
|
263
|
+
"onMouseleave",
|
|
264
|
+
"onClick"
|
|
265
|
+
], Kt = { key: 1 }, qt = [
|
|
266
|
+
"cx",
|
|
267
|
+
"cy",
|
|
268
|
+
"r"
|
|
269
|
+
], Jt = [
|
|
270
|
+
"x",
|
|
271
|
+
"y",
|
|
272
|
+
"fill",
|
|
273
|
+
"font-size"
|
|
274
|
+
], Yt = [
|
|
275
|
+
"x",
|
|
276
|
+
"y",
|
|
277
|
+
"fill",
|
|
278
|
+
"font-size"
|
|
279
|
+
], Xt = [
|
|
280
|
+
"x",
|
|
281
|
+
"y",
|
|
282
|
+
"fill",
|
|
283
|
+
"font-size"
|
|
284
|
+
], Zt = [
|
|
285
|
+
"x",
|
|
286
|
+
"y",
|
|
287
|
+
"fill",
|
|
288
|
+
"font-size"
|
|
289
|
+
], Qt = ["filter", "opacity"], $t = { key: 0 }, en = ["x", "y"], tn = { key: 1 }, nn = [
|
|
290
|
+
"cx",
|
|
291
|
+
"cy",
|
|
292
|
+
"fill",
|
|
293
|
+
"stroke",
|
|
294
|
+
"filter",
|
|
295
|
+
"onClick",
|
|
296
|
+
"onMouseenter",
|
|
297
|
+
"onMouseleave"
|
|
298
|
+
], rn = [
|
|
299
|
+
"text-anchor",
|
|
300
|
+
"x",
|
|
301
|
+
"y",
|
|
302
|
+
"onClick",
|
|
303
|
+
"onMouseenter",
|
|
304
|
+
"onMouseleave",
|
|
305
|
+
"innerHTML"
|
|
306
|
+
], an = [
|
|
307
|
+
"text-anchor",
|
|
308
|
+
"x",
|
|
309
|
+
"y",
|
|
310
|
+
"fill",
|
|
311
|
+
"font-size",
|
|
312
|
+
"onClick",
|
|
313
|
+
"onMouseenter",
|
|
314
|
+
"onMouseleave"
|
|
315
|
+
], on = [
|
|
316
|
+
"text-anchor",
|
|
317
|
+
"x",
|
|
318
|
+
"y",
|
|
319
|
+
"fill",
|
|
320
|
+
"font-size",
|
|
321
|
+
"onClick",
|
|
322
|
+
"onMouseenter",
|
|
323
|
+
"onMouseleave",
|
|
324
|
+
"innerHTML"
|
|
325
|
+
], sn = [
|
|
326
|
+
"cx",
|
|
327
|
+
"cy",
|
|
328
|
+
"fill",
|
|
329
|
+
"stroke",
|
|
330
|
+
"filter",
|
|
331
|
+
"onClick",
|
|
332
|
+
"onMouseenter",
|
|
333
|
+
"onMouseleave"
|
|
334
|
+
], cn = [
|
|
335
|
+
"text-anchor",
|
|
336
|
+
"x",
|
|
337
|
+
"y",
|
|
338
|
+
"onClick",
|
|
339
|
+
"onMouseenter",
|
|
340
|
+
"onMouseleave",
|
|
341
|
+
"innerHTML"
|
|
342
|
+
], ln = [
|
|
343
|
+
"text-anchor",
|
|
344
|
+
"x",
|
|
345
|
+
"y",
|
|
346
|
+
"fill",
|
|
347
|
+
"font-size",
|
|
348
|
+
"onClick",
|
|
349
|
+
"onMouseenter",
|
|
350
|
+
"onMouseleave"
|
|
351
|
+
], un = [
|
|
352
|
+
"text-anchor",
|
|
353
|
+
"x",
|
|
354
|
+
"y",
|
|
355
|
+
"fill",
|
|
356
|
+
"font-size",
|
|
357
|
+
"onClick",
|
|
358
|
+
"onMouseenter",
|
|
359
|
+
"onMouseleave",
|
|
360
|
+
"innerHTML"
|
|
361
|
+
], dn = { key: 2 }, fn = [
|
|
362
|
+
"x",
|
|
363
|
+
"y",
|
|
364
|
+
"width"
|
|
365
|
+
], pn = [
|
|
366
|
+
"x",
|
|
367
|
+
"y",
|
|
368
|
+
"width"
|
|
369
|
+
], mn = {
|
|
370
|
+
key: 0,
|
|
371
|
+
style: {
|
|
372
|
+
position: "absolute",
|
|
373
|
+
top: "100%",
|
|
374
|
+
left: "0",
|
|
375
|
+
width: "100%"
|
|
376
|
+
},
|
|
377
|
+
"data-dom-to-png-ignore": "",
|
|
378
|
+
"aria-hidden": "true"
|
|
379
|
+
}, hn = {
|
|
380
|
+
key: 5,
|
|
381
|
+
class: "vue-data-ui-watermark"
|
|
382
|
+
}, gn = ["id"], _n = ["onClick"], vn = {
|
|
383
|
+
key: 8,
|
|
384
|
+
class: "vue-ui-donut-hollow"
|
|
385
|
+
}, yn = ["innerHTML"], bn = /*#__PURE__*/ xe({
|
|
386
|
+
__name: "vue-ui-donut",
|
|
387
|
+
props: {
|
|
388
|
+
config: {
|
|
389
|
+
type: Object,
|
|
390
|
+
default() {
|
|
391
|
+
return {};
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
dataset: {
|
|
395
|
+
type: Array,
|
|
396
|
+
default() {
|
|
397
|
+
return [];
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
emits: [
|
|
402
|
+
"selectLegend",
|
|
403
|
+
"selectDatapoint",
|
|
404
|
+
"copyAlt"
|
|
405
|
+
],
|
|
406
|
+
setup(e, { expose: xe, emit: Qe }) {
|
|
407
|
+
let bn = Le(() => import("./Tooltip-BhKov422.js")), xn = Le(() => import("./BaseIcon-xBuW2jjI.js").then((e) => e.n)), Sn = Le(() => import("./vue-ui-accordion-B64IJyPU.js").then((e) => e.n)), Cn = Le(() => import("./DataTable-PidUPOit.js")), wn = Le(() => import("./PenAndPaper-ISUbDKXq.js").then((e) => e.t)), Tn = Le(() => import("./UserOptions-BxT1XHzN.js").then((e) => e.n)), En = Le(() => import("./PackageVersion-Cm-3hwIF.js").then((e) => e.t)), Dn = Le(() => import("./BaseDraggableDialog-DjzNWkiE.js").then((e) => e.n)), { vue_ui_donut: On } = de(), { isThemeValid: kn, warnInvalidTheme: An } = _e(), jn = qe(), N = e, Mn = b({
|
|
408
|
+
get() {
|
|
409
|
+
return !!N.dataset && N.dataset.length;
|
|
410
|
+
},
|
|
411
|
+
set(e) {
|
|
412
|
+
return e;
|
|
413
|
+
}
|
|
414
|
+
}), P = We(null), Nn = O(null), Pn = O(null), Fn = O(null), In = We(null), Ln = We(null), Rn = We(null), zn = We(null), Bn = We(null), Vn = We(null), Hn = O(0), Un = O(0), Wn = O(0), Gn = O(!1), Kn = O(null), qn = O(null), Jn = O(!1), Yn = O(!1), Xn = O(null), Zn = O({
|
|
415
|
+
x: 0,
|
|
416
|
+
y: 0
|
|
417
|
+
}), Qn = O("pointer"), $n = O(!1), er = b({
|
|
418
|
+
get: () => R.value.style.chart.layout.labels.percentage.fontSize,
|
|
419
|
+
set: (e) => e
|
|
420
|
+
}), F = b({
|
|
421
|
+
get: () => R.value.style.chart.layout.labels.name.fontSize,
|
|
422
|
+
set: (e) => e
|
|
423
|
+
}), tr = b({
|
|
424
|
+
get: () => R.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
|
|
425
|
+
set: (e) => e
|
|
426
|
+
}), nr = !1, rr = () => {
|
|
427
|
+
!R.value.autoSize || nr || (nr = !0, requestAnimationFrame(() => {
|
|
428
|
+
nr = !1;
|
|
429
|
+
let e = R.value, t = Nn.value, n = wr.value;
|
|
430
|
+
if (!e.autoSize || !t || !n) return;
|
|
431
|
+
let [r, i, a, o] = n.getAttribute("viewBox").split(" ").map(Number), s = {
|
|
432
|
+
x: r,
|
|
433
|
+
y: i,
|
|
434
|
+
width: a,
|
|
435
|
+
height: o
|
|
436
|
+
}, c = [
|
|
437
|
+
{
|
|
438
|
+
selector: ".vue-data-ui-datalabel-value",
|
|
439
|
+
baseSize: e.style.chart.layout.labels.percentage.fontSize,
|
|
440
|
+
minSize: e.style.chart.layout.labels.percentage.minFontSize,
|
|
441
|
+
sizeRef: er
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
selector: ".vue-data-ui-datalabel-name",
|
|
445
|
+
baseSize: e.style.chart.layout.labels.name.fontSize,
|
|
446
|
+
minSize: e.style.chart.layout.labels.name.minFontSize,
|
|
447
|
+
sizeRef: F
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
selector: ".vue-data-ui-datalabel-inline",
|
|
451
|
+
baseSize: e.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
|
|
452
|
+
minSize: e.style.chart.layout.labels.name.minFontSize,
|
|
453
|
+
sizeRef: tr
|
|
454
|
+
}
|
|
455
|
+
];
|
|
456
|
+
c.map((e) => t.querySelectorAll(e.selector).length).reduce((e, t) => e + t, 0) !== 0 && c.forEach(({ selector: e, baseSize: n, minSize: r, sizeRef: i }) => {
|
|
457
|
+
t.querySelectorAll(e).forEach((e) => {
|
|
458
|
+
i.value = re({
|
|
459
|
+
el: e,
|
|
460
|
+
bounds: s,
|
|
461
|
+
currentFontSize: n,
|
|
462
|
+
minFontSize: r,
|
|
463
|
+
attempts: 200,
|
|
464
|
+
padding: 1
|
|
465
|
+
});
|
|
466
|
+
});
|
|
467
|
+
});
|
|
468
|
+
}));
|
|
469
|
+
};
|
|
470
|
+
He(async () => {
|
|
471
|
+
Gn.value = !0, or(), requestAnimationFrame(rr);
|
|
472
|
+
});
|
|
473
|
+
let ir;
|
|
474
|
+
He(() => {
|
|
475
|
+
P.value && (ir = new ResizeObserver((e) => {
|
|
476
|
+
for (let t of e) {
|
|
477
|
+
let { width: e, height: n } = t.contentRect;
|
|
478
|
+
if (e > 0 && n > 0) {
|
|
479
|
+
rr();
|
|
480
|
+
break;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}), ir.observe(P.value.parentElement));
|
|
484
|
+
}), Ve(() => {
|
|
485
|
+
ir?.disconnect();
|
|
486
|
+
}), Ve(() => {
|
|
487
|
+
Rn.value && (zn.value && Rn.value.unobserve(zn.value), Rn.value.disconnect());
|
|
488
|
+
});
|
|
489
|
+
let ar = b(() => !!R.value.debug);
|
|
490
|
+
function or() {
|
|
491
|
+
if (a(N.dataset) ? (o({
|
|
492
|
+
componentName: "VueUiDonut",
|
|
493
|
+
type: "dataset",
|
|
494
|
+
debug: ar.value
|
|
495
|
+
}), Mn.value = !1, hr.value = !0) : (N.dataset.forEach((e, t) => {
|
|
496
|
+
se({
|
|
497
|
+
datasetObject: e,
|
|
498
|
+
requiredAttributes: ["name", "values"]
|
|
499
|
+
}).forEach((e) => {
|
|
500
|
+
o({
|
|
501
|
+
componentName: "VueUiDonut",
|
|
502
|
+
type: "datasetSerieAttribute",
|
|
503
|
+
property: e,
|
|
504
|
+
index: t,
|
|
505
|
+
debug: ar.value
|
|
506
|
+
}), Mn.value = !1, hr.value = !0;
|
|
507
|
+
});
|
|
508
|
+
}), N.dataset.forEach((e, t) => {
|
|
509
|
+
(!e.name || e.name === "") && o({
|
|
510
|
+
componentName: "VueUiDonut",
|
|
511
|
+
type: "datasetAttributeEmpty",
|
|
512
|
+
property: "name",
|
|
513
|
+
index: t,
|
|
514
|
+
debug: ar.value
|
|
515
|
+
});
|
|
516
|
+
})), a(N.dataset) || (hr.value = R.value.loading), R.value.responsive) {
|
|
517
|
+
let e = Se(() => {
|
|
518
|
+
let { width: e, height: t } = Ce({
|
|
519
|
+
chart: P.value,
|
|
520
|
+
title: R.value.style.chart.title.text ? In.value : null,
|
|
521
|
+
legend: R.value.style.chart.legend.show ? Ln.value : null,
|
|
522
|
+
source: Bn.value,
|
|
523
|
+
noTitle: Vn.value,
|
|
524
|
+
padding: R.value.autoSize ? void 0 : Dr.value
|
|
525
|
+
});
|
|
526
|
+
requestAnimationFrame(() => {
|
|
527
|
+
V.value.width = e, V.value.height = t, rr();
|
|
528
|
+
});
|
|
529
|
+
});
|
|
530
|
+
Rn.value && (zn.value && Rn.value.unobserve(zn.value), Rn.value.disconnect()), Rn.value = new ResizeObserver(e), zn.value = P.value.parentNode, Rn.value.observe(zn.value);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
let I = O(ee()), sr = O(!1), cr = O(""), L = O(null), lr = O(0);
|
|
534
|
+
function ur() {
|
|
535
|
+
let e = ge({
|
|
536
|
+
userConfig: N.config,
|
|
537
|
+
defaultConfig: On
|
|
538
|
+
}), t = {}, n = e.theme;
|
|
539
|
+
if (!n) t = e;
|
|
540
|
+
else if (!kn.value(e)) An(e), t = e;
|
|
541
|
+
else {
|
|
542
|
+
let r = ge({
|
|
543
|
+
userConfig: Ae[n] || N.config,
|
|
544
|
+
defaultConfig: e
|
|
545
|
+
});
|
|
546
|
+
t = {
|
|
547
|
+
...ge({
|
|
548
|
+
userConfig: N.config,
|
|
549
|
+
defaultConfig: r
|
|
550
|
+
}),
|
|
551
|
+
customPalette: e.customPalette.length ? e.customPalette : u[n] || h
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
return t;
|
|
555
|
+
}
|
|
556
|
+
let R = O(ur()), dr = b(() => R.value.userOptions.useCursorPointer), fr = b(() => n({
|
|
557
|
+
defaultConfig: {
|
|
558
|
+
useCssAnimation: !1,
|
|
559
|
+
table: { show: !1 },
|
|
560
|
+
startAnimation: { show: !1 },
|
|
561
|
+
userOptions: { show: !1 },
|
|
562
|
+
style: { chart: {
|
|
563
|
+
backgroundColor: "#99999930",
|
|
564
|
+
layout: { labels: {
|
|
565
|
+
dataLabels: { show: !1 },
|
|
566
|
+
hollow: {
|
|
567
|
+
average: { show: !1 },
|
|
568
|
+
total: { show: !1 }
|
|
569
|
+
},
|
|
570
|
+
value: { show: !1 }
|
|
571
|
+
} },
|
|
572
|
+
legend: {
|
|
573
|
+
backgroundColor: "transparent",
|
|
574
|
+
showValue: !1,
|
|
575
|
+
showPercentage: !1
|
|
576
|
+
},
|
|
577
|
+
title: {
|
|
578
|
+
color: "#1A1A1A",
|
|
579
|
+
subtitle: { color: "#5A5A5A" }
|
|
580
|
+
}
|
|
581
|
+
} }
|
|
582
|
+
},
|
|
583
|
+
userConfig: R.value.skeletonConfig ?? {}
|
|
584
|
+
})), { loading: pr, FINAL_DATASET: mr, manualLoading: hr, skeletonDataset: gr } = pe({
|
|
585
|
+
...Ke(N),
|
|
586
|
+
FINAL_CONFIG: R,
|
|
587
|
+
prepareConfig: ur,
|
|
588
|
+
skeletonDataset: N.config?.skeletonDataset ?? [
|
|
589
|
+
{
|
|
590
|
+
name: "",
|
|
591
|
+
values: [3],
|
|
592
|
+
color: "#BABABA"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
name: "",
|
|
596
|
+
values: [2],
|
|
597
|
+
color: "#AAAAAA"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
name: "",
|
|
601
|
+
values: [1],
|
|
602
|
+
color: "#CACACA"
|
|
603
|
+
}
|
|
604
|
+
],
|
|
605
|
+
skeletonConfig: n({
|
|
606
|
+
defaultConfig: R.value,
|
|
607
|
+
userConfig: fr.value
|
|
608
|
+
})
|
|
609
|
+
}), z = O(!0), _r = O(0), vr = O(!1), yr = null;
|
|
610
|
+
function br(e = 1e3) {
|
|
611
|
+
return new Promise((t) => {
|
|
612
|
+
let n = performance.now();
|
|
613
|
+
function r(i) {
|
|
614
|
+
let a = i - n, o = Math.min(a / e, 1);
|
|
615
|
+
_r.value = ne(o), o < 1 ? yr = requestAnimationFrame(r) : (_r.value = 1, yr = null, t());
|
|
616
|
+
}
|
|
617
|
+
yr !== null && cancelAnimationFrame(yr), _r.value = 0, yr = requestAnimationFrame(r);
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
Ye(() => pr.value, async (e) => {
|
|
621
|
+
if (e || vr.value) return;
|
|
622
|
+
let t = mr.value === gr, n = R.value.startAnimation?.show;
|
|
623
|
+
!t && n ? (vr.value = !0, await br(R.value.startAnimation.durationMs || 1e3)) : _r.value = 1, z.value = !1;
|
|
624
|
+
}, { immediate: !0 });
|
|
625
|
+
let { userOptionsVisible: xr, setUserOptionsVisibility: Sr, keepUserOptionState: Cr } = Ee({ config: R.value }), { svgRef: wr } = De({ config: R.value.style.chart.title });
|
|
626
|
+
function Tr() {
|
|
627
|
+
Sr(!0);
|
|
628
|
+
}
|
|
629
|
+
function Er() {
|
|
630
|
+
Sr(!1);
|
|
631
|
+
}
|
|
632
|
+
Ye(() => N.config, (e) => {
|
|
633
|
+
pr.value || (R.value = ur()), xr.value = !R.value.userOptions.showOnChartHover, or(), Hn.value += 1, Un.value += 1, Wn.value += 1, B.value.dataLabels.show = R.value.style.chart.layout.labels.dataLabels.show, B.value.showTable = R.value.table.show, B.value.showTooltip = R.value.style.chart.tooltip.show, V.value.height = R.value.style.chart.height, V.value.width = R.value.style.chart.width;
|
|
634
|
+
}, { deep: !0 });
|
|
635
|
+
let Dr = b(() => {
|
|
636
|
+
let { top: e, right: t, bottom: n, left: r } = R.value.style.chart.padding;
|
|
637
|
+
return {
|
|
638
|
+
css: `padding:${e}px ${t}px ${n}px ${r}px`,
|
|
639
|
+
top: e,
|
|
640
|
+
right: t,
|
|
641
|
+
bottom: n,
|
|
642
|
+
left: r
|
|
643
|
+
};
|
|
644
|
+
}), { isPrinting: Or, isImaging: kr, generatePdf: Ar, generateImage: jr } = fe({
|
|
645
|
+
elementId: `donut__${I.value}`,
|
|
646
|
+
fileName: R.value.style.chart.title.text || "vue-ui-donut",
|
|
647
|
+
options: R.value.userOptions.print
|
|
648
|
+
}), Mr = b(() => R.value.userOptions.show && !R.value.style.chart.title.text), Nr = b(() => c(R.value.customPalette)), B = O({
|
|
649
|
+
dataLabels: { show: R.value.style.chart.layout.labels.dataLabels.show },
|
|
650
|
+
showTable: R.value.table.show,
|
|
651
|
+
showTooltip: R.value.style.chart.tooltip.show
|
|
652
|
+
});
|
|
653
|
+
Ye(R, () => {
|
|
654
|
+
B.value = {
|
|
655
|
+
dataLabels: { show: R.value.style.chart.layout.labels.dataLabels.show },
|
|
656
|
+
showTable: R.value.table.show,
|
|
657
|
+
showTooltip: R.value.style.chart.tooltip.show
|
|
658
|
+
};
|
|
659
|
+
}, { immediate: !0 });
|
|
660
|
+
let V = O({
|
|
661
|
+
height: R.value.style.chart.height,
|
|
662
|
+
width: R.value.style.chart.width
|
|
663
|
+
}), Pr = b(() => {
|
|
664
|
+
if (R.value.pie) return G.value;
|
|
665
|
+
let e = R.value.style.chart.layout.donut.strokeWidth / 512, t = Math.min(V.value.width, V.value.height) * e, n = t > G.value ? G.value : t;
|
|
666
|
+
return Math.max(n, 12 * (1 + e));
|
|
667
|
+
}), Fr = Qe, H = b(() => mr.value.sort((e, t) => {
|
|
668
|
+
let n = Array.isArray(e.values) ? e.values.reduce((e, t) => e + t, 0) : e.value ?? 0, r = Array.isArray(t.values) ? t.values.reduce((e, t) => e + t, 0) : t.value ?? 0;
|
|
669
|
+
return e.ghost && !t.ghost ? 1 : t.ghost && !e.ghost ? -1 : r - n;
|
|
670
|
+
}).map((e, t) => ({
|
|
671
|
+
name: e.name,
|
|
672
|
+
color: d(e.color) || Nr.value[t] || h[t] || h[t % h.length],
|
|
673
|
+
value: ce(e.values.reduce((e, t) => e + t, 0)),
|
|
674
|
+
absoluteValues: e.values,
|
|
675
|
+
comment: e.comment || "",
|
|
676
|
+
patternIndex: t,
|
|
677
|
+
seriesIndex: t,
|
|
678
|
+
ghost: !1,
|
|
679
|
+
pattern: `pattern_${I.value}_${t}`
|
|
680
|
+
})));
|
|
681
|
+
Ye(() => N.dataset, (e) => {
|
|
682
|
+
Array.isArray(e) && e.length > 0 && (hr.value = !1);
|
|
683
|
+
}, { immediate: !0 });
|
|
684
|
+
let U = We(H.value);
|
|
685
|
+
Ye(() => H.value, (e) => {
|
|
686
|
+
U.value = e, requestAnimationFrame(rr);
|
|
687
|
+
});
|
|
688
|
+
function Ir() {
|
|
689
|
+
return H.value.map((e) => ({
|
|
690
|
+
name: e.name,
|
|
691
|
+
color: e.color,
|
|
692
|
+
value: e.value
|
|
693
|
+
}));
|
|
694
|
+
}
|
|
695
|
+
let W = O([]), Lr = O(!1), Rr = O(null);
|
|
696
|
+
function zr() {
|
|
697
|
+
Fr("selectLegend", qr.value.map((e) => ({
|
|
698
|
+
name: e.name,
|
|
699
|
+
color: e.color,
|
|
700
|
+
value: e.value
|
|
701
|
+
})));
|
|
702
|
+
}
|
|
703
|
+
function Br({ from: e, to: t, duration: n, onUpdate: r, onDone: i, easing: a = ne }) {
|
|
704
|
+
let o = performance.now();
|
|
705
|
+
function s(c) {
|
|
706
|
+
let l = Math.min((c - o) / n, 1), u = a(l);
|
|
707
|
+
r(e + (t - e) * u, l), l < 1 ? requestAnimationFrame(s) : (r(t, 1), i && i());
|
|
708
|
+
}
|
|
709
|
+
requestAnimationFrame(s);
|
|
710
|
+
}
|
|
711
|
+
function Vr() {
|
|
712
|
+
W.value.length ? W.value = [] : Jr.value.forEach((e, t) => {
|
|
713
|
+
W.value.push(t);
|
|
714
|
+
}), zr();
|
|
715
|
+
}
|
|
716
|
+
function Hr(e) {
|
|
717
|
+
let t = H.value.find((t, n) => n === e), n = U.value.find((t, n) => n === e).value;
|
|
718
|
+
if (W.value.includes(e)) {
|
|
719
|
+
W.value = W.value.filter((t) => t !== e);
|
|
720
|
+
let r = t.value;
|
|
721
|
+
function i() {
|
|
722
|
+
U.value = U.value.map((t, n) => e === n ? {
|
|
723
|
+
...t,
|
|
724
|
+
value: r
|
|
725
|
+
} : t), zr();
|
|
726
|
+
}
|
|
727
|
+
function a() {
|
|
728
|
+
Lr.value = !0, Rr.value = e, Br({
|
|
729
|
+
from: n,
|
|
730
|
+
to: r,
|
|
731
|
+
duration: R.value.serieToggleAnimation.durationMs,
|
|
732
|
+
onUpdate: (t, n) => {
|
|
733
|
+
U.value = U.value.map((n, r) => e === r ? {
|
|
734
|
+
...n,
|
|
735
|
+
value: t
|
|
736
|
+
} : n), requestAnimationFrame(rr);
|
|
737
|
+
},
|
|
738
|
+
onDone: () => {
|
|
739
|
+
i(), Lr.value = !1, Rr.value = null;
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
R.value.serieToggleAnimation.show && R.value.type === "classic" ? a() : (i(), requestAnimationFrame(rr));
|
|
744
|
+
} else if (W.value.length < H.value.length - 1) {
|
|
745
|
+
function t() {
|
|
746
|
+
W.value.push(e), U.value = U.value.map((t, n) => e === n ? {
|
|
747
|
+
...t,
|
|
748
|
+
value: 0
|
|
749
|
+
} : t), zr();
|
|
750
|
+
}
|
|
751
|
+
function r() {
|
|
752
|
+
Lr.value = !0, Rr.value = e, Br({
|
|
753
|
+
from: n,
|
|
754
|
+
to: 0,
|
|
755
|
+
duration: R.value.serieToggleAnimation.durationMs,
|
|
756
|
+
onUpdate: (t, n) => {
|
|
757
|
+
U.value = U.value.map((n, r) => e === r ? {
|
|
758
|
+
...n,
|
|
759
|
+
value: t
|
|
760
|
+
} : n), requestAnimationFrame(rr);
|
|
761
|
+
},
|
|
762
|
+
onDone: () => {
|
|
763
|
+
t(), requestAnimationFrame(rr), Lr.value = !1, Rr.value = null;
|
|
764
|
+
}
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
R.value.serieToggleAnimation.show && R.value.type === "classic" ? r() : t();
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
function Ur(e) {
|
|
771
|
+
return H.value.length ? H.value.find((t) => t.name === e) || (R.value.debug && console.warn(`VueUiDonut - Series name not found "${e}"`), null) : (R.value.debug && console.warn("VueUiDonut - There are no series to show."), null);
|
|
772
|
+
}
|
|
773
|
+
function Wr(e) {
|
|
774
|
+
let t = Ur(e);
|
|
775
|
+
t !== null && W.value.includes(t.seriesIndex) && Hr(t.seriesIndex);
|
|
776
|
+
}
|
|
777
|
+
function Gr(e) {
|
|
778
|
+
let t = Ur(e);
|
|
779
|
+
t !== null && (W.value.includes(t.seriesIndex) || Hr(t.seriesIndex));
|
|
780
|
+
}
|
|
781
|
+
let Kr = b(() => mr.value.reduce((e, t) => e + t.values.reduce((e, t) => e + t, 0), 0)), qr = b(() => {
|
|
782
|
+
if (z.value && !pr.value) {
|
|
783
|
+
let e = _r.value, t = H.value.map((t) => ({
|
|
784
|
+
...t,
|
|
785
|
+
value: t.value * e,
|
|
786
|
+
color: t.color,
|
|
787
|
+
ghost: !1
|
|
788
|
+
})), n = Kr.value * (1 - e);
|
|
789
|
+
return n > 0 && t.push({
|
|
790
|
+
name: "__ghost__",
|
|
791
|
+
value: n,
|
|
792
|
+
color: "transparent",
|
|
793
|
+
ghost: !0
|
|
794
|
+
}), t;
|
|
795
|
+
} else return U.value.forEach((e) => {
|
|
796
|
+
if ([null, void 0].includes(e.values)) return {
|
|
797
|
+
...e,
|
|
798
|
+
values: []
|
|
799
|
+
};
|
|
800
|
+
}), U.value.map((e, t) => ({
|
|
801
|
+
...e,
|
|
802
|
+
seriesIndex: t
|
|
803
|
+
})).filter((e, t) => !W.value.includes(t));
|
|
804
|
+
}), Jr = b(() => mr.value.map((e, t) => {
|
|
805
|
+
let n = (e.values || []).reduce((e, t) => e + t, 0), r = n / mr.value.map((e) => (e.values || []).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0);
|
|
806
|
+
return {
|
|
807
|
+
name: e.name,
|
|
808
|
+
color: d(e.color) || Nr.value[t] || h[t] || h[t % h.length],
|
|
809
|
+
value: n,
|
|
810
|
+
shape: "circle",
|
|
811
|
+
patternIndex: t,
|
|
812
|
+
proportion: r
|
|
813
|
+
};
|
|
814
|
+
}).map((e, t) => {
|
|
815
|
+
let n = p(R.value.style.chart.layout.labels.value.formatter, e.value, _({
|
|
816
|
+
p: R.value.style.chart.layout.labels.dataLabels.prefix,
|
|
817
|
+
v: e.value,
|
|
818
|
+
s: R.value.style.chart.layout.labels.dataLabels.suffix,
|
|
819
|
+
r: R.value.style.chart.legend.roundingValue
|
|
820
|
+
}), {
|
|
821
|
+
datapoint: e,
|
|
822
|
+
index: t
|
|
823
|
+
}), r = p(R.value.style.chart.layout.labels.percentage.formatter, ai(e), _({
|
|
824
|
+
v: ai(e),
|
|
825
|
+
s: "%",
|
|
826
|
+
r: R.value.style.chart.legend.roundingPercentage
|
|
827
|
+
})), i = xi({
|
|
828
|
+
val: n,
|
|
829
|
+
percentage: W.value.includes(t) ? `${bi(e.proportion * 100)}%` : r,
|
|
830
|
+
showVal: R.value.style.chart.legend.showValue,
|
|
831
|
+
showPercentage: R.value.style.chart.legend.showPercentage,
|
|
832
|
+
config: R.value.style.chart.legend
|
|
833
|
+
});
|
|
834
|
+
return {
|
|
835
|
+
...e,
|
|
836
|
+
opacity: W.value.includes(t) ? .5 : 1,
|
|
837
|
+
segregate: () => !Lr.value && Hr(t),
|
|
838
|
+
isSegregated: W.value.includes(t),
|
|
839
|
+
display: `${e.name}${R.value.style.chart.legend.showPercentage || R.value.style.chart.legend.showValue ? ": " : ""}${i}`
|
|
840
|
+
};
|
|
841
|
+
})), Yr = b(() => ({
|
|
842
|
+
cy: "donut-div-legend",
|
|
843
|
+
backgroundColor: R.value.style.chart.legend.backgroundColor,
|
|
844
|
+
color: R.value.style.chart.legend.color,
|
|
845
|
+
fontSize: R.value.style.chart.legend.fontSize,
|
|
846
|
+
paddingBottom: 12,
|
|
847
|
+
fontWeight: R.value.style.chart.legend.bold ? "bold" : ""
|
|
848
|
+
})), G = b(() => {
|
|
849
|
+
let e = R.value.style.chart.layout.donut.radiusRatio, t = Math.max(.1, Math.min(.50001, e)), n = Math.min(V.value.width * t, V.value.height * t);
|
|
850
|
+
return Math.max(12, n);
|
|
851
|
+
}), K = b(() => t({ series: qr.value }, V.value.width / 2, V.value.height / 2, G.value, G.value, 1.99999, 2, 1, 360, 105.25, Pr.value)), Xr = b(() => Math.abs(qr.value.map((e) => e.value).reduce((e, t) => e + t, 0)) > 0), Zr = b(() => t({ series: [{
|
|
852
|
+
value: 1,
|
|
853
|
+
color: R.value.style.chart.layout.donut.emptyFill,
|
|
854
|
+
name: "_",
|
|
855
|
+
seriesIndex: 0,
|
|
856
|
+
patternIndex: -1,
|
|
857
|
+
ghost: !1,
|
|
858
|
+
absoluteValues: [1]
|
|
859
|
+
}] }, V.value.width / 2, V.value.height / 2, G.value, G.value, 1.99999, 2, 1, 360, 105.25, Pr.value)), q = b(() => K.value.filter((e) => !e.ghost)), J = b(() => {
|
|
860
|
+
let e = Math.max(...qr.value.map((e) => e.value));
|
|
861
|
+
return i({
|
|
862
|
+
series: qr.value.map((t) => t.value / e),
|
|
863
|
+
center: {
|
|
864
|
+
x: V.value.width / 2,
|
|
865
|
+
y: V.value.height / 2
|
|
866
|
+
},
|
|
867
|
+
maxRadius: Math.min(V.value.width, V.value.height) / 3,
|
|
868
|
+
hasGhost: z.value
|
|
869
|
+
});
|
|
870
|
+
});
|
|
871
|
+
function Qr(e) {
|
|
872
|
+
return e.x > V.value.width / 2 + 6 ? "start" : e.x < V.value.width / 2 - 6 ? "end" : "middle";
|
|
873
|
+
}
|
|
874
|
+
function $r(e) {
|
|
875
|
+
return e.middlePoint.y > V.value.height / 2 ? g({
|
|
876
|
+
initX: e.middlePoint.x,
|
|
877
|
+
initY: e.middlePoint.y,
|
|
878
|
+
offset: 100,
|
|
879
|
+
centerX: V.value.width / 2,
|
|
880
|
+
centerY: V.value.height / 2
|
|
881
|
+
}).y : g({
|
|
882
|
+
initX: e.middlePoint.x,
|
|
883
|
+
initY: e.middlePoint.y,
|
|
884
|
+
offset: 0,
|
|
885
|
+
centerX: V.value.width / 2,
|
|
886
|
+
centerY: V.value.height / 2
|
|
887
|
+
}).y - 100;
|
|
888
|
+
}
|
|
889
|
+
function Y(e) {
|
|
890
|
+
return e.proportion * 100 > R.value.style.chart.layout.labels.dataLabels.hideUnderValue;
|
|
891
|
+
}
|
|
892
|
+
function ei(e, t) {
|
|
893
|
+
let n = R.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = R.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold, i = (ri.value[t] ?? e.proportion ?? 0) * 100;
|
|
894
|
+
return i > n && i <= r;
|
|
895
|
+
}
|
|
896
|
+
let { smallArcLayoutsClassic: X } = Ze({
|
|
897
|
+
FINAL_CONFIG: R,
|
|
898
|
+
noGhostDonut: q,
|
|
899
|
+
svg: V,
|
|
900
|
+
padding: Dr,
|
|
901
|
+
labels_inline_fontSize: tr,
|
|
902
|
+
minSize: G,
|
|
903
|
+
findArcMidpoint: ae,
|
|
904
|
+
calcMarkerOffsetX: v,
|
|
905
|
+
calcMarkerOffsetY: f,
|
|
906
|
+
animatingIndex: Rr,
|
|
907
|
+
segregated: W,
|
|
908
|
+
isSmallArc: ei
|
|
909
|
+
});
|
|
910
|
+
function ti(e, t) {
|
|
911
|
+
let n = e.value / ni(t);
|
|
912
|
+
return isNaN(n) ? 0 : p(R.value.style.chart.layout.labels.percentage.formatter, n * 100, _({
|
|
913
|
+
v: n * 100,
|
|
914
|
+
s: "%",
|
|
915
|
+
r: R.value.style.chart.layout.labels.percentage.rounding
|
|
916
|
+
}), { datapoint: e });
|
|
917
|
+
}
|
|
918
|
+
function ni(e) {
|
|
919
|
+
return [...e].map((e) => e.value).reduce((e, t) => e + t, 0);
|
|
920
|
+
}
|
|
921
|
+
let Z = b(() => qr.value.map((e) => e.value).reduce((e, t) => e + t, 0)), ri = b(() => {
|
|
922
|
+
let e = H.value.reduce((e, t) => e + t.value, 0);
|
|
923
|
+
return e <= 0 ? [] : H.value.map((t) => t.value / e);
|
|
924
|
+
}), ii = b(() => Z.value / qr.value.length);
|
|
925
|
+
function ai(e) {
|
|
926
|
+
return Lr.value ? e.proportion * 100 : e.value / Z.value * 100;
|
|
927
|
+
}
|
|
928
|
+
let oi = O(null), si = O(!1);
|
|
929
|
+
function ci({ datapoint: e, seriesIndex: t }) {
|
|
930
|
+
R.value.events.datapointLeave && R.value.events.datapointLeave({
|
|
931
|
+
datapoint: e,
|
|
932
|
+
seriesIndex: t
|
|
933
|
+
}), sr.value = !1, L.value = null, Xn.value = null, Qn.value = "pointer";
|
|
934
|
+
}
|
|
935
|
+
function Q({ datapoint: e, relativeIndex: t, seriesIndex: n, show: r = !1, triggerMode: i = "pointer" }) {
|
|
936
|
+
R.value.events.datapointEnter && R.value.events.datapointEnter({
|
|
937
|
+
datapoint: e,
|
|
938
|
+
seriesIndex: n
|
|
939
|
+
}), Qn.value = i, Xn.value = t, oi.value = {
|
|
940
|
+
datapoint: e,
|
|
941
|
+
seriesIndex: n,
|
|
942
|
+
config: R.value,
|
|
943
|
+
series: H.value
|
|
944
|
+
}, sr.value = r, L.value = t;
|
|
945
|
+
let a = "", o = R.value.style.chart.tooltip.customFormat;
|
|
946
|
+
if (si.value = !1, le(o)) try {
|
|
947
|
+
let t = o({
|
|
948
|
+
seriesIndex: n,
|
|
949
|
+
datapoint: e,
|
|
950
|
+
series: H.value,
|
|
951
|
+
config: R.value
|
|
952
|
+
});
|
|
953
|
+
typeof t == "string" && (cr.value = t, si.value = !0);
|
|
954
|
+
} catch {
|
|
955
|
+
console.warn("Custom format cannot be applied."), si.value = !1;
|
|
956
|
+
}
|
|
957
|
+
si.value || (a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${R.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, a += `<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="${e.color}"/>${jn.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${I.value}_${n})"/>` : ""}</svg>`, a += `<b>${xi({
|
|
958
|
+
showVal: R.value.style.chart.tooltip.showValue,
|
|
959
|
+
showPercentage: R.value.style.chart.tooltip.showPercentage,
|
|
960
|
+
val: `<span>${p(R.value.style.chart.layout.labels.value.formatter, e.value, _({
|
|
961
|
+
p: R.value.style.chart.layout.labels.dataLabels.prefix,
|
|
962
|
+
v: e.value,
|
|
963
|
+
s: R.value.style.chart.layout.labels.dataLabels.suffix,
|
|
964
|
+
r: R.value.style.chart.tooltip.roundingValue
|
|
965
|
+
}), {
|
|
966
|
+
datapoint: e,
|
|
967
|
+
relativeIndex: t,
|
|
968
|
+
seriesIndex: n
|
|
969
|
+
})}</span>`,
|
|
970
|
+
percentage: p(R.value.style.chart.layout.labels.percentage.formatter, e.proportion * 100, _({
|
|
971
|
+
v: e.proportion * 100,
|
|
972
|
+
s: "%",
|
|
973
|
+
r: R.value.style.chart.tooltip.roundingPercentage
|
|
974
|
+
}), {
|
|
975
|
+
datapoint: e,
|
|
976
|
+
relativeIndex: t,
|
|
977
|
+
seriesIndex: n
|
|
978
|
+
}),
|
|
979
|
+
config: R.value.style.chart.tooltip
|
|
980
|
+
})}</b></div>`, R.value.style.chart.comments.showInTooltip && e.comment && (a += `<div class="vue-data-ui-tooltip-comment" style="background:${e.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`), cr.value = `<div>${a}</div>`);
|
|
981
|
+
}
|
|
982
|
+
function li(e, t) {
|
|
983
|
+
let n = X.value[t];
|
|
984
|
+
if (n) return {
|
|
985
|
+
textAnchor: n.textAnchor,
|
|
986
|
+
x: n.labelX,
|
|
987
|
+
y: n.labelY
|
|
988
|
+
};
|
|
989
|
+
let r = v(e, !0, 12);
|
|
990
|
+
return {
|
|
991
|
+
textAnchor: r.anchor,
|
|
992
|
+
x: r.x,
|
|
993
|
+
y: f(e)
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
function ui(e, t, n) {
|
|
997
|
+
let { textAnchor: r, x: i } = li(e, t), a = Si(e), o = `
|
|
998
|
+
<tspan
|
|
999
|
+
class="vue-data-ui-datalabel-inline"
|
|
1000
|
+
fill="${R.value.style.chart.layout.labels.percentage.color}"
|
|
1001
|
+
font-size="${n ? tr.value : er.value}px"
|
|
1002
|
+
style="font-weight:${R.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}"
|
|
1003
|
+
>${a}</tspan>
|
|
1004
|
+
`, s = String(e.name ?? "").split(/\n/g), c = "";
|
|
1005
|
+
return s.forEach((e, t) => {
|
|
1006
|
+
t === 0 ? c += `
|
|
1007
|
+
<tspan
|
|
1008
|
+
class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
|
|
1009
|
+
fill="${R.value.style.chart.layout.labels.name.color}"
|
|
1010
|
+
font-size="${n ? tr.value : F.value}px"
|
|
1011
|
+
style="font-weight:${R.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
|
|
1012
|
+
>${e}</tspan>
|
|
1013
|
+
` : c += `
|
|
1014
|
+
<tspan
|
|
1015
|
+
class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
|
|
1016
|
+
x="${i}"
|
|
1017
|
+
dy="${(n ? tr.value : F.value) * 1.2}"
|
|
1018
|
+
fill="${R.value.style.chart.layout.labels.name.color}"
|
|
1019
|
+
font-size="${n ? tr.value : F.value}px"
|
|
1020
|
+
style="font-weight:${R.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
|
|
1021
|
+
>${e}</tspan>
|
|
1022
|
+
`;
|
|
1023
|
+
}), r === "end" ? `${R.value.style.chart.layout.labels.name.show ? c : ""}${o}` : `${o}${R.value.style.chart.layout.labels.name.show ? c : ""}`;
|
|
1024
|
+
}
|
|
1025
|
+
function di(e, t) {
|
|
1026
|
+
let n = J.value[t].middlePoint, r = Qr(n), i = g({
|
|
1027
|
+
initX: n.x,
|
|
1028
|
+
initY: n.y,
|
|
1029
|
+
offset: 42,
|
|
1030
|
+
centerX: V.value.width / 2,
|
|
1031
|
+
centerY: V.value.height / 2
|
|
1032
|
+
}), a = i.x;
|
|
1033
|
+
i.y;
|
|
1034
|
+
let o = Si(e), s = `
|
|
1035
|
+
<tspan
|
|
1036
|
+
class="vue-data-ui-datalabel-value"
|
|
1037
|
+
fill="${R.value.style.chart.layout.labels.percentage.color}"
|
|
1038
|
+
font-size="${er.value}px"
|
|
1039
|
+
style="font-weight:${R.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"}"
|
|
1040
|
+
>${o}</tspan>
|
|
1041
|
+
`, c = String(e.name ?? "").split(/\n/g), l = "";
|
|
1042
|
+
return c.forEach((e, t) => {
|
|
1043
|
+
t === 0 ? l += `
|
|
1044
|
+
<tspan
|
|
1045
|
+
class="vue-data-ui-datalabel-name"
|
|
1046
|
+
fill="${R.value.style.chart.layout.labels.name.color}"
|
|
1047
|
+
font-size="${F.value}px"
|
|
1048
|
+
style="font-weight:${R.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
|
|
1049
|
+
>${e}</tspan>
|
|
1050
|
+
` : l += `
|
|
1051
|
+
<tspan
|
|
1052
|
+
class="vue-data-ui-datalabel-name"
|
|
1053
|
+
x="${a}"
|
|
1054
|
+
dy="${F.value * 1.2}"
|
|
1055
|
+
fill="${R.value.style.chart.layout.labels.name.color}"
|
|
1056
|
+
font-size="${F.value}px"
|
|
1057
|
+
style="font-weight:${R.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
|
|
1058
|
+
>${e}</tspan>
|
|
1059
|
+
`;
|
|
1060
|
+
}), r === "end" ? `${R.value.style.chart.layout.labels.name.show ? l : ""}${s}` : `${s}${R.value.style.chart.layout.labels.name.show ? l : ""}`;
|
|
1061
|
+
}
|
|
1062
|
+
function fi(e) {
|
|
1063
|
+
return R.value.useBlurOnHover && ![null, void 0].includes(L.value) && L.value !== e ? `url(#blur_${I.value})` : "";
|
|
1064
|
+
}
|
|
1065
|
+
function pi(e) {
|
|
1066
|
+
if (!Lr.value || Rr.value === null || e.seriesIndex !== Rr.value) return 1;
|
|
1067
|
+
let t = (e.proportion ?? 0) * 100, n = R.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = R.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold + 2, i = n;
|
|
1068
|
+
return t >= r ? 1 : t <= i ? 0 : (t - i) / (r - i);
|
|
1069
|
+
}
|
|
1070
|
+
let mi = b(() => ({
|
|
1071
|
+
head: qr.value.map((e) => ({
|
|
1072
|
+
name: e.name,
|
|
1073
|
+
color: e.color
|
|
1074
|
+
})),
|
|
1075
|
+
body: qr.value.map((e) => e.value)
|
|
1076
|
+
}));
|
|
1077
|
+
function hi(e = null) {
|
|
1078
|
+
ze(() => {
|
|
1079
|
+
let t = mi.value.head.map((e, t) => [
|
|
1080
|
+
[e.name],
|
|
1081
|
+
[mi.value.body[t]],
|
|
1082
|
+
[isNaN(mi.value.body[t] / Z.value) ? "-" : mi.value.body[t] / Z.value * 100]
|
|
1083
|
+
]), n = ue([
|
|
1084
|
+
[R.value.style.chart.title.text],
|
|
1085
|
+
[R.value.style.chart.title.subtitle.text],
|
|
1086
|
+
[
|
|
1087
|
+
[""],
|
|
1088
|
+
["val"],
|
|
1089
|
+
["%"]
|
|
1090
|
+
]
|
|
1091
|
+
].concat(t));
|
|
1092
|
+
e ? e(n) : te({
|
|
1093
|
+
csvContent: n,
|
|
1094
|
+
title: R.value.style.chart.title.text || "vue-ui-donut"
|
|
1095
|
+
});
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
let gi = b(() => {
|
|
1099
|
+
let e = [
|
|
1100
|
+
" <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>",
|
|
1101
|
+
_({
|
|
1102
|
+
p: R.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1103
|
+
v: Z.value,
|
|
1104
|
+
s: R.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1105
|
+
r: R.value.table.td.roundingValue
|
|
1106
|
+
}),
|
|
1107
|
+
"100%"
|
|
1108
|
+
], t = mi.value.head.map((e, t) => [
|
|
1109
|
+
{
|
|
1110
|
+
color: e.color,
|
|
1111
|
+
name: e.name || "-"
|
|
1112
|
+
},
|
|
1113
|
+
mi.value.body[t],
|
|
1114
|
+
isNaN(mi.value.body[t] / Z.value) ? "-" : (mi.value.body[t] / Z.value * 100).toFixed(R.value.table.td.roundingPercentage) + "%"
|
|
1115
|
+
]), n = t.map((e) => e.map((e, t) => t === 0 ? e.name : e)), r = {
|
|
1116
|
+
th: {
|
|
1117
|
+
backgroundColor: R.value.table.th.backgroundColor,
|
|
1118
|
+
color: R.value.table.th.color,
|
|
1119
|
+
outline: R.value.table.th.outline
|
|
1120
|
+
},
|
|
1121
|
+
td: {
|
|
1122
|
+
backgroundColor: R.value.table.td.backgroundColor,
|
|
1123
|
+
color: R.value.table.td.color,
|
|
1124
|
+
outline: R.value.table.td.outline
|
|
1125
|
+
},
|
|
1126
|
+
breakpoint: R.value.table.responsiveBreakpoint
|
|
1127
|
+
};
|
|
1128
|
+
return {
|
|
1129
|
+
colNames: [
|
|
1130
|
+
R.value.table.columnNames.series,
|
|
1131
|
+
R.value.table.columnNames.value,
|
|
1132
|
+
R.value.table.columnNames.percentage
|
|
1133
|
+
],
|
|
1134
|
+
head: e,
|
|
1135
|
+
body: t,
|
|
1136
|
+
a11yBody: n,
|
|
1137
|
+
config: r
|
|
1138
|
+
};
|
|
1139
|
+
}), _i = O(!1);
|
|
1140
|
+
function vi(e) {
|
|
1141
|
+
_i.value = e, lr.value += 1;
|
|
1142
|
+
}
|
|
1143
|
+
let yi = b(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
|
|
1144
|
+
function bi(e) {
|
|
1145
|
+
return Oe({
|
|
1146
|
+
num: e,
|
|
1147
|
+
rounding: R.value.style.chart.legend.roundingPercentage
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
function xi({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
|
|
1151
|
+
return ke({
|
|
1152
|
+
config: i,
|
|
1153
|
+
val: e,
|
|
1154
|
+
percentage: t,
|
|
1155
|
+
showVal: n,
|
|
1156
|
+
showPercentage: r
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
function Si(e) {
|
|
1160
|
+
return xi({
|
|
1161
|
+
val: p(R.value.style.chart.layout.labels.value.formatter, e.value, _({
|
|
1162
|
+
p: R.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1163
|
+
v: e.value,
|
|
1164
|
+
s: R.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1165
|
+
r: R.value.style.chart.layout.labels.value.rounding
|
|
1166
|
+
}), { datapoint: e }),
|
|
1167
|
+
percentage: ti(e, q.value),
|
|
1168
|
+
showVal: R.value.style.chart.layout.labels.value.show,
|
|
1169
|
+
showPercentage: R.value.style.chart.layout.labels.percentage.show,
|
|
1170
|
+
config: R.value.style.chart.layout.labels.dataLabels
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
function $(e, t) {
|
|
1174
|
+
R.value.events.datapointClick && R.value.events.datapointClick({
|
|
1175
|
+
datapoint: e,
|
|
1176
|
+
seriesIndex: e.seriesIndex
|
|
1177
|
+
}), Fr("selectDatapoint", {
|
|
1178
|
+
datapoint: e,
|
|
1179
|
+
index: t
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
function Ci() {
|
|
1183
|
+
B.value.showTable = !B.value.showTable;
|
|
1184
|
+
}
|
|
1185
|
+
function wi() {
|
|
1186
|
+
B.value.dataLabels.show = !B.value.dataLabels.show;
|
|
1187
|
+
}
|
|
1188
|
+
function Ti() {
|
|
1189
|
+
B.value.showTooltip = !B.value.showTooltip;
|
|
1190
|
+
}
|
|
1191
|
+
let Ei = O(!1);
|
|
1192
|
+
function Di() {
|
|
1193
|
+
Ei.value = !Ei.value;
|
|
1194
|
+
}
|
|
1195
|
+
async function Oi({ scale: e = 2 } = {}) {
|
|
1196
|
+
if (!P.value) return;
|
|
1197
|
+
let { width: t, height: n } = P.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ve({
|
|
1198
|
+
domElement: P.value,
|
|
1199
|
+
base64: !0,
|
|
1200
|
+
img: !0,
|
|
1201
|
+
scale: e
|
|
1202
|
+
});
|
|
1203
|
+
return {
|
|
1204
|
+
imageUri: i,
|
|
1205
|
+
base64: a,
|
|
1206
|
+
title: R.value.style.chart.title.text,
|
|
1207
|
+
width: t,
|
|
1208
|
+
height: n,
|
|
1209
|
+
aspectRatio: r
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
function ki() {
|
|
1213
|
+
if (!Nn.value) return;
|
|
1214
|
+
let { x: e, y: t, width: n, height: r } = Nn.value.getBBox();
|
|
1215
|
+
wr.value && wr.value.setAttribute("viewBox", `${e} ${t} ${n + Math.min(0, e)} ${r + Math.min(0, t)}`);
|
|
1216
|
+
}
|
|
1217
|
+
let Ai = b(() => {
|
|
1218
|
+
let e = R.value.table.useDialog && !R.value.table.show, t = B.value.showTable;
|
|
1219
|
+
return {
|
|
1220
|
+
component: e ? Dn : Sn,
|
|
1221
|
+
title: `${R.value.style.chart.title.text}${R.value.style.chart.title.subtitle.text ? `: ${R.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1222
|
+
props: e ? {
|
|
1223
|
+
backgroundColor: R.value.table.th.backgroundColor,
|
|
1224
|
+
color: R.value.table.th.color,
|
|
1225
|
+
headerColor: R.value.table.th.color,
|
|
1226
|
+
headerBg: R.value.table.th.backgroundColor,
|
|
1227
|
+
isFullscreen: _i.value,
|
|
1228
|
+
fullscreenParent: P.value,
|
|
1229
|
+
forcedWidth: Math.min(500, window.innerWidth * .8),
|
|
1230
|
+
isCursorPointer: dr.value
|
|
1231
|
+
} : {
|
|
1232
|
+
hideDetails: !0,
|
|
1233
|
+
config: {
|
|
1234
|
+
open: t,
|
|
1235
|
+
maxHeight: 1e4,
|
|
1236
|
+
body: {
|
|
1237
|
+
backgroundColor: R.value.style.chart.backgroundColor,
|
|
1238
|
+
color: R.value.style.chart.color
|
|
1239
|
+
},
|
|
1240
|
+
head: {
|
|
1241
|
+
backgroundColor: R.value.style.chart.backgroundColor,
|
|
1242
|
+
color: R.value.style.chart.color
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
};
|
|
1247
|
+
});
|
|
1248
|
+
Ye(() => B.value.showTable, (e) => {
|
|
1249
|
+
R.value.table.show || (e && R.value.table.useDialog && Kn.value ? Kn.value.open() : "close" in Kn.value && Kn.value.close());
|
|
1250
|
+
});
|
|
1251
|
+
function ji() {
|
|
1252
|
+
B.value.showTable = !1, qn.value && qn.value.setTableIconState(!1);
|
|
1253
|
+
}
|
|
1254
|
+
let Mi = b(() => Jr.value.map((e) => ({
|
|
1255
|
+
...e,
|
|
1256
|
+
name: e.display
|
|
1257
|
+
}))), Ni = b(() => R.value.style.chart.backgroundColor), Pi = b(() => R.value.style.chart.legend), { exportSvg: Fi, getSvg: Ii } = he({
|
|
1258
|
+
svg: wr,
|
|
1259
|
+
title: b(() => R.value.style.chart.title),
|
|
1260
|
+
legend: Pi,
|
|
1261
|
+
legendItems: Mi,
|
|
1262
|
+
backgroundColor: Ni
|
|
1263
|
+
});
|
|
1264
|
+
async function Li({ isCb: e }) {
|
|
1265
|
+
Yn.value = !0, await ze();
|
|
1266
|
+
try {
|
|
1267
|
+
if (e) {
|
|
1268
|
+
let { blob: e, url: t, text: n, dataUrl: r } = await Ii();
|
|
1269
|
+
await Promise.resolve(R.value.userOptions.callbacks.svg({
|
|
1270
|
+
blob: e,
|
|
1271
|
+
url: t,
|
|
1272
|
+
text: n,
|
|
1273
|
+
dataUrl: r
|
|
1274
|
+
}));
|
|
1275
|
+
} else await Promise.resolve(Fi());
|
|
1276
|
+
} finally {
|
|
1277
|
+
Yn.value = !1;
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
function Ri(e) {
|
|
1281
|
+
if (e?.stage === "start") {
|
|
1282
|
+
Jn.value = !0;
|
|
1283
|
+
return;
|
|
1284
|
+
}
|
|
1285
|
+
if (e?.stage === "end") {
|
|
1286
|
+
Jn.value = !1;
|
|
1287
|
+
return;
|
|
1288
|
+
}
|
|
1289
|
+
jr();
|
|
1290
|
+
}
|
|
1291
|
+
async function zi() {
|
|
1292
|
+
if (Fr("copyAlt", {
|
|
1293
|
+
config: R.value,
|
|
1294
|
+
dataset: U.value
|
|
1295
|
+
}), !R.value.userOptions.callbacks.altCopy) {
|
|
1296
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1297
|
+
return;
|
|
1298
|
+
}
|
|
1299
|
+
await Promise.resolve(R.value.userOptions.callbacks.altCopy({
|
|
1300
|
+
config: R.value,
|
|
1301
|
+
dataset: U.value
|
|
1302
|
+
}));
|
|
1303
|
+
}
|
|
1304
|
+
function Bi() {
|
|
1305
|
+
Xn.value = null, $n.value = !0;
|
|
1306
|
+
}
|
|
1307
|
+
function Vi() {
|
|
1308
|
+
Xn.value = null, Qn.value = "pointer", sr.value = !1, L.value = null, $n.value = !1;
|
|
1309
|
+
}
|
|
1310
|
+
function Hi(e) {
|
|
1311
|
+
if (!wr.value || Ei.value || document.activeElement !== wr.value || !q.value.length) return;
|
|
1312
|
+
let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
1313
|
+
if (!t && !n && !r && !i) return;
|
|
1314
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
1315
|
+
Xn.value = null, Qn.value = "pointer", sr.value = !1, L.value = null;
|
|
1316
|
+
return;
|
|
1317
|
+
}
|
|
1318
|
+
if (r) {
|
|
1319
|
+
if (Xn.value === null) return;
|
|
1320
|
+
let e = q.value[Xn.value];
|
|
1321
|
+
if (!e) return;
|
|
1322
|
+
$(e, Xn.value);
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
let a = Xn.value, o = L.value, s = a !== null && a >= 0 && a < q.value.length, c = o !== null && o >= 0 && o < q.value.length;
|
|
1326
|
+
s ? n ? (a += 1, a >= q.value.length && (a = 0)) : t && (--a, a < 0 && (a = q.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= q.value.length && (a = 0), a < 0 && (a = q.value.length - 1)) : a = n ? 0 : q.value.length - 1;
|
|
1327
|
+
let l = q.value[a];
|
|
1328
|
+
l && (Xn.value = a, Ui(a), Q({
|
|
1329
|
+
datapoint: l,
|
|
1330
|
+
relativeIndex: a,
|
|
1331
|
+
seriesIndex: l.seriesIndex,
|
|
1332
|
+
show: !0,
|
|
1333
|
+
triggerMode: "keyboard"
|
|
1334
|
+
}));
|
|
1335
|
+
}
|
|
1336
|
+
function Ui(e) {
|
|
1337
|
+
if (!Number.isFinite(e) || !wr.value) return;
|
|
1338
|
+
let t = V.value.width / 2, n = V.value.height / 2;
|
|
1339
|
+
if (R.value.type === "classic") {
|
|
1340
|
+
let r = q.value[e];
|
|
1341
|
+
if (!r?.arcSlice) return;
|
|
1342
|
+
let i = ae(r.arcSlice);
|
|
1343
|
+
if (!i) return;
|
|
1344
|
+
t = i.x, n = i.y;
|
|
1345
|
+
} else {
|
|
1346
|
+
let r = J.value[e]?.middlePoint;
|
|
1347
|
+
if (!r) return;
|
|
1348
|
+
t = r.x, n = r.y;
|
|
1349
|
+
}
|
|
1350
|
+
let r = wr.value.getBoundingClientRect();
|
|
1351
|
+
Zn.value = {
|
|
1352
|
+
x: r.left + t / V.value.width * r.width,
|
|
1353
|
+
y: r.top + n / V.value.height * r.height
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1356
|
+
let Wi = b(() => ({
|
|
1357
|
+
headers: gi.value?.colNames ?? [],
|
|
1358
|
+
rows: gi.value?.a11yBody ?? []
|
|
1359
|
+
}));
|
|
1360
|
+
return xe({
|
|
1361
|
+
autoSize: ki,
|
|
1362
|
+
getData: Ir,
|
|
1363
|
+
getImage: Oi,
|
|
1364
|
+
generatePdf: Ar,
|
|
1365
|
+
generateCsv: hi,
|
|
1366
|
+
generateImage: jr,
|
|
1367
|
+
generateSvg: Li,
|
|
1368
|
+
hideSeries: Gr,
|
|
1369
|
+
showSeries: Wr,
|
|
1370
|
+
toggleTable: Ci,
|
|
1371
|
+
toggleLabels: wi,
|
|
1372
|
+
toggleTooltip: Ti,
|
|
1373
|
+
toggleAnnotator: Di,
|
|
1374
|
+
toggleFullscreen: vi,
|
|
1375
|
+
copyAlt: zi
|
|
1376
|
+
}), (t, n) => (D(), S("div", {
|
|
1377
|
+
ref_key: "donutChart",
|
|
1378
|
+
ref: P,
|
|
1379
|
+
class: Be(`vue-data-ui-component vue-ui-donut ${_i.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${R.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1380
|
+
style: E(`font-family:${R.value.style.fontFamily};width:100%; ${R.value.responsive ? "height:100%;" : ""} text-align:center;background:${R.value.style.chart.backgroundColor}`),
|
|
1381
|
+
id: `donut__${I.value}`,
|
|
1382
|
+
onMouseenter: Tr,
|
|
1383
|
+
onMouseleave: Er
|
|
1384
|
+
}, [
|
|
1385
|
+
C("div", {
|
|
1386
|
+
id: `chart-instructions-${I.value}`,
|
|
1387
|
+
class: "sr-only"
|
|
1388
|
+
}, [C("p", null, Ge(R.value.a11y.translations.keyboardNavigation), 1)], 8, et),
|
|
1389
|
+
Wi.value?.rows?.length ? (D(), Ne(Te, {
|
|
1390
|
+
key: 0,
|
|
1391
|
+
uid: I.value,
|
|
1392
|
+
head: Wi.value.headers,
|
|
1393
|
+
body: Wi.value.rows,
|
|
1394
|
+
notice: R.value.a11y.translations.tableAvailable,
|
|
1395
|
+
caption: R.value.a11y.translations.tableCaption
|
|
1396
|
+
}, null, 8, [
|
|
1397
|
+
"uid",
|
|
1398
|
+
"head",
|
|
1399
|
+
"body",
|
|
1400
|
+
"notice",
|
|
1401
|
+
"caption"
|
|
1402
|
+
])) : x("", !0),
|
|
1403
|
+
R.value.userOptions.buttons.annotator && j(wr) ? (D(), Ne(j(wn), {
|
|
1404
|
+
key: 1,
|
|
1405
|
+
color: R.value.style.chart.color,
|
|
1406
|
+
backgroundColor: R.value.style.chart.backgroundColor,
|
|
1407
|
+
active: Ei.value,
|
|
1408
|
+
svgRef: j(wr),
|
|
1409
|
+
isCursorPointer: dr.value,
|
|
1410
|
+
onClose: Di
|
|
1411
|
+
}, {
|
|
1412
|
+
"annotator-action-close": M(() => [A(t.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1413
|
+
"annotator-action-color": M(({ color: e }) => [A(t.$slots, "annotator-action-color", T(w({ color: e })), void 0, !0)]),
|
|
1414
|
+
"annotator-action-draw": M(({ mode: e }) => [A(t.$slots, "annotator-action-draw", T(w({ mode: e })), void 0, !0)]),
|
|
1415
|
+
"annotator-action-undo": M(({ disabled: e }) => [A(t.$slots, "annotator-action-undo", T(w({ disabled: e })), void 0, !0)]),
|
|
1416
|
+
"annotator-action-redo": M(({ disabled: e }) => [A(t.$slots, "annotator-action-redo", T(w({ disabled: e })), void 0, !0)]),
|
|
1417
|
+
"annotator-action-delete": M(({ disabled: e }) => [A(t.$slots, "annotator-action-delete", T(w({ disabled: e })), void 0, !0)]),
|
|
1418
|
+
_: 3
|
|
1419
|
+
}, 8, [
|
|
1420
|
+
"color",
|
|
1421
|
+
"backgroundColor",
|
|
1422
|
+
"active",
|
|
1423
|
+
"svgRef",
|
|
1424
|
+
"isCursorPointer"
|
|
1425
|
+
])) : x("", !0),
|
|
1426
|
+
A(t.$slots, "userConfig", {}, void 0, !0),
|
|
1427
|
+
Mr.value ? (D(), S("div", {
|
|
1428
|
+
key: 2,
|
|
1429
|
+
ref_key: "noTitle",
|
|
1430
|
+
ref: Vn,
|
|
1431
|
+
class: "vue-data-ui-no-title-space",
|
|
1432
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1433
|
+
}, null, 512)) : x("", !0),
|
|
1434
|
+
R.value.style.chart.title.text ? (D(), S("div", {
|
|
1435
|
+
key: 3,
|
|
1436
|
+
ref_key: "chartTitle",
|
|
1437
|
+
ref: In,
|
|
1438
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
1439
|
+
}, [(D(), Ne(ye, {
|
|
1440
|
+
key: `title_${Hn.value}`,
|
|
1441
|
+
config: {
|
|
1442
|
+
title: {
|
|
1443
|
+
cy: "donut-div-title",
|
|
1444
|
+
...R.value.style.chart.title
|
|
1445
|
+
},
|
|
1446
|
+
subtitle: {
|
|
1447
|
+
cy: "donut-div-subtitle",
|
|
1448
|
+
...R.value.style.chart.title.subtitle
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
}, null, 8, ["config"]))], 512)) : x("", !0),
|
|
1452
|
+
C("div", { id: `legend-top-${I.value}` }, null, 8, tt),
|
|
1453
|
+
R.value.userOptions.show && Mn.value && (j(Cr) || j(xr)) ? (D(), Ne(j(Tn), {
|
|
1454
|
+
ref_key: "userOptionsRef",
|
|
1455
|
+
ref: qn,
|
|
1456
|
+
key: `user_option_${lr.value}`,
|
|
1457
|
+
backgroundColor: R.value.style.chart.backgroundColor,
|
|
1458
|
+
color: R.value.style.chart.color,
|
|
1459
|
+
isPrinting: j(Or),
|
|
1460
|
+
isImaging: j(kr),
|
|
1461
|
+
uid: I.value,
|
|
1462
|
+
hasTooltip: R.value.style.chart.tooltip.show && R.value.userOptions.buttons.tooltip,
|
|
1463
|
+
hasPdf: R.value.userOptions.buttons.pdf,
|
|
1464
|
+
hasImg: R.value.userOptions.buttons.img,
|
|
1465
|
+
hasSvg: R.value.userOptions.buttons.svg,
|
|
1466
|
+
hasXls: R.value.userOptions.buttons.csv,
|
|
1467
|
+
hasTable: R.value.userOptions.buttons.table,
|
|
1468
|
+
hasLabel: R.value.userOptions.buttons.labels,
|
|
1469
|
+
hasFullscreen: R.value.userOptions.buttons.fullscreen,
|
|
1470
|
+
hasAltCopy: R.value.userOptions.buttons.altCopy,
|
|
1471
|
+
isFullscreen: _i.value,
|
|
1472
|
+
chartElement: P.value,
|
|
1473
|
+
position: R.value.userOptions.position,
|
|
1474
|
+
callbacks: R.value.userOptions.callbacks,
|
|
1475
|
+
isTooltip: B.value.showTooltip,
|
|
1476
|
+
titles: { ...R.value.userOptions.buttonTitles },
|
|
1477
|
+
hasAnnotator: R.value.userOptions.buttons.annotator,
|
|
1478
|
+
isAnnotation: Ei.value,
|
|
1479
|
+
printScale: R.value.userOptions.print.scale,
|
|
1480
|
+
tableDialog: R.value.table.useDialog,
|
|
1481
|
+
isCursorPointer: dr.value,
|
|
1482
|
+
onToggleFullscreen: vi,
|
|
1483
|
+
onGeneratePdf: j(Ar),
|
|
1484
|
+
onGenerateCsv: hi,
|
|
1485
|
+
onGenerateImage: Ri,
|
|
1486
|
+
onGenerateSvg: Li,
|
|
1487
|
+
onToggleTable: Ci,
|
|
1488
|
+
onToggleLabels: wi,
|
|
1489
|
+
onToggleTooltip: Ti,
|
|
1490
|
+
onToggleAnnotator: Di,
|
|
1491
|
+
onCopyAlt: zi,
|
|
1492
|
+
style: E({ visibility: j(Cr) ? j(xr) ? "visible" : "hidden" : "visible" })
|
|
1493
|
+
}, Pe({ _: 2 }, [
|
|
1494
|
+
t.$slots.menuIcon ? {
|
|
1495
|
+
name: "menuIcon",
|
|
1496
|
+
fn: M(({ isOpen: e, color: n }) => [A(t.$slots, "menuIcon", T(w({
|
|
1497
|
+
isOpen: e,
|
|
1498
|
+
color: n
|
|
1499
|
+
})), void 0, !0)]),
|
|
1500
|
+
key: "0"
|
|
1501
|
+
} : void 0,
|
|
1502
|
+
t.$slots.optionTooltip ? {
|
|
1503
|
+
name: "optionTooltip",
|
|
1504
|
+
fn: M(() => [A(t.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1505
|
+
key: "1"
|
|
1506
|
+
} : void 0,
|
|
1507
|
+
t.$slots.optionPdf ? {
|
|
1508
|
+
name: "optionPdf",
|
|
1509
|
+
fn: M(() => [A(t.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1510
|
+
key: "2"
|
|
1511
|
+
} : void 0,
|
|
1512
|
+
t.$slots.optionCsv ? {
|
|
1513
|
+
name: "optionCsv",
|
|
1514
|
+
fn: M(() => [A(t.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1515
|
+
key: "3"
|
|
1516
|
+
} : void 0,
|
|
1517
|
+
t.$slots.optionImg ? {
|
|
1518
|
+
name: "optionImg",
|
|
1519
|
+
fn: M(() => [A(t.$slots, "optionImg", {}, void 0, !0)]),
|
|
1520
|
+
key: "4"
|
|
1521
|
+
} : void 0,
|
|
1522
|
+
t.$slots.optionSvg ? {
|
|
1523
|
+
name: "optionSvg",
|
|
1524
|
+
fn: M(() => [A(t.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1525
|
+
key: "5"
|
|
1526
|
+
} : void 0,
|
|
1527
|
+
t.$slots.optionTable ? {
|
|
1528
|
+
name: "optionTable",
|
|
1529
|
+
fn: M(() => [A(t.$slots, "optionTable", {}, void 0, !0)]),
|
|
1530
|
+
key: "6"
|
|
1531
|
+
} : void 0,
|
|
1532
|
+
t.$slots.optionLabels ? {
|
|
1533
|
+
name: "optionLabels",
|
|
1534
|
+
fn: M(() => [A(t.$slots, "optionLabels", {}, void 0, !0)]),
|
|
1535
|
+
key: "7"
|
|
1536
|
+
} : void 0,
|
|
1537
|
+
t.$slots.optionFullscreen ? {
|
|
1538
|
+
name: "optionFullscreen",
|
|
1539
|
+
fn: M(({ toggleFullscreen: e, isFullscreen: n }) => [A(t.$slots, "optionFullscreen", T(w({
|
|
1540
|
+
toggleFullscreen: e,
|
|
1541
|
+
isFullscreen: n
|
|
1542
|
+
})), void 0, !0)]),
|
|
1543
|
+
key: "8"
|
|
1544
|
+
} : void 0,
|
|
1545
|
+
t.$slots.optionAnnotator ? {
|
|
1546
|
+
name: "optionAnnotator",
|
|
1547
|
+
fn: M(({ toggleAnnotator: e, isAnnotator: n }) => [A(t.$slots, "optionAnnotator", T(w({
|
|
1548
|
+
toggleAnnotator: e,
|
|
1549
|
+
isAnnotator: n
|
|
1550
|
+
})), void 0, !0)]),
|
|
1551
|
+
key: "9"
|
|
1552
|
+
} : void 0,
|
|
1553
|
+
t.$slots.optionAltCopy ? {
|
|
1554
|
+
name: "optionAltCopy",
|
|
1555
|
+
fn: M(({ altCopy: e }) => [A(t.$slots, "optionAltCopy", T(w({ altCopy: e })), void 0, !0)]),
|
|
1556
|
+
key: "10"
|
|
1557
|
+
} : void 0,
|
|
1558
|
+
t.$slots["custom-menu-before"] ? {
|
|
1559
|
+
name: "custom-menu-before",
|
|
1560
|
+
fn: M(() => [A(t.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1561
|
+
key: "11"
|
|
1562
|
+
} : void 0,
|
|
1563
|
+
t.$slots["custom-menu-after"] ? {
|
|
1564
|
+
name: "custom-menu-after",
|
|
1565
|
+
fn: M(() => [A(t.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1566
|
+
key: "12"
|
|
1567
|
+
} : void 0
|
|
1568
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.isTooltip.titles.hasAnnotator.isAnnotation.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : x("", !0),
|
|
1569
|
+
C("div", nt, [(D(), S("svg", {
|
|
1570
|
+
ref_key: "svgRef",
|
|
1571
|
+
ref: wr,
|
|
1572
|
+
xmlns: j(oe),
|
|
1573
|
+
"aria-describedby": `chart-instructions-${I.value}`,
|
|
1574
|
+
class: Be({
|
|
1575
|
+
"vue-data-ui-fullscreen--on": _i.value,
|
|
1576
|
+
"vue-data-ui-fulscreen--off": !_i.value,
|
|
1577
|
+
"vue-data-ui-svg": !0
|
|
1578
|
+
}),
|
|
1579
|
+
viewBox: `0 0 ${V.value.width <= 0 ? 10 : V.value.width} ${V.value.height <= 0 ? 10 : V.value.height}`,
|
|
1580
|
+
style: E(`max-width:100%; overflow: visible; background:transparent;color:${R.value.style.chart.color};${Dr.value.css}`),
|
|
1581
|
+
tabindex: "0",
|
|
1582
|
+
onFocus: Bi,
|
|
1583
|
+
onBlur: Vi,
|
|
1584
|
+
onKeydown: Hi
|
|
1585
|
+
}, [C("g", {
|
|
1586
|
+
ref_key: "G",
|
|
1587
|
+
ref: Nn,
|
|
1588
|
+
class: "vue-data-ui-g"
|
|
1589
|
+
}, [
|
|
1590
|
+
Ie(j(En)),
|
|
1591
|
+
t.$slots["chart-background"] ? (D(), S("foreignObject", {
|
|
1592
|
+
key: 0,
|
|
1593
|
+
x: 0,
|
|
1594
|
+
y: 0,
|
|
1595
|
+
width: V.value.width <= 0 ? 10 : V.value.width,
|
|
1596
|
+
height: V.value.height <= 0 ? 10 : V.value.height,
|
|
1597
|
+
style: { pointerEvents: "none" }
|
|
1598
|
+
}, [A(t.$slots, "chart-background", {}, void 0, !0)], 8, it)) : x("", !0),
|
|
1599
|
+
R.value.type === "classic" && !isNaN(Pr.value / G.value) ? (D(), S("defs", at, [R.value.style.chart.useGradient ? (D(), S("radialGradient", {
|
|
1600
|
+
key: 0,
|
|
1601
|
+
id: `gradient_${I.value}`
|
|
1602
|
+
}, [
|
|
1603
|
+
C("stop", {
|
|
1604
|
+
offset: "0%",
|
|
1605
|
+
"stop-color": j(r)(R.value.style.chart.backgroundColor, 0),
|
|
1606
|
+
"stop-opacity": "0"
|
|
1607
|
+
}, null, 8, st),
|
|
1608
|
+
C("stop", {
|
|
1609
|
+
offset: `${(1 - Pr.value / G.value) * 100}%`,
|
|
1610
|
+
"stop-color": j(r)("#FFFFFF", 0),
|
|
1611
|
+
"stop-opacity": "0"
|
|
1612
|
+
}, null, 8, ct),
|
|
1613
|
+
C("stop", {
|
|
1614
|
+
offset: `${(1 - Pr.value / G.value / 2) * 100}%`,
|
|
1615
|
+
"stop-color": j(r)("#FFFFFF", R.value.style.chart.gradientIntensity)
|
|
1616
|
+
}, null, 8, lt),
|
|
1617
|
+
C("stop", {
|
|
1618
|
+
offset: "100%",
|
|
1619
|
+
"stop-color": j(r)(R.value.style.chart.backgroundColor, 0),
|
|
1620
|
+
"stop-opacity": "0"
|
|
1621
|
+
}, null, 8, ut)
|
|
1622
|
+
], 8, ot)) : x("", !0)])) : x("", !0),
|
|
1623
|
+
R.value.type === "polar" ? (D(), S("defs", dt, [(D(!0), S(y, null, k(J.value, (e, t) => (D(), S("radialGradient", {
|
|
1624
|
+
id: `polar_gradient_${t}_${I.value}`,
|
|
1625
|
+
cx: (isNaN(e.middlePoint.x / V.value.width * 100) ? 0 : e.middlePoint.x / V.value.width * 100) + "%",
|
|
1626
|
+
cy: (isNaN(e.middlePoint.y / V.value.height * 100) ? 0 : e.middlePoint.y / V.value.height * 100) + "%",
|
|
1627
|
+
r: "62%"
|
|
1628
|
+
}, [C("stop", {
|
|
1629
|
+
offset: "0%",
|
|
1630
|
+
"stop-color": j(s)(K.value[t].color, .05),
|
|
1631
|
+
"stop-opacity": R.value.style.chart.gradientIntensity / 100
|
|
1632
|
+
}, null, 8, pt), C("stop", {
|
|
1633
|
+
offset: "100%",
|
|
1634
|
+
"stop-color": K.value[t].color
|
|
1635
|
+
}, null, 8, mt)], 8, ft))), 256))])) : x("", !0),
|
|
1636
|
+
C("defs", null, [
|
|
1637
|
+
C("filter", {
|
|
1638
|
+
id: `blur_${I.value}`,
|
|
1639
|
+
x: "-50%",
|
|
1640
|
+
y: "-50%",
|
|
1641
|
+
width: "200%",
|
|
1642
|
+
height: "200%"
|
|
1643
|
+
}, [C("feGaussianBlur", {
|
|
1644
|
+
in: "SourceGraphic",
|
|
1645
|
+
stdDeviation: 2,
|
|
1646
|
+
id: `blur_std_${I.value}`
|
|
1647
|
+
}, null, 8, gt), n[5] ||= C("feColorMatrix", {
|
|
1648
|
+
type: "saturate",
|
|
1649
|
+
values: "0"
|
|
1650
|
+
}, null, -1)], 8, ht),
|
|
1651
|
+
C("filter", {
|
|
1652
|
+
id: `shadow_${I.value}`,
|
|
1653
|
+
"color-interpolation-filters": "sRGB"
|
|
1654
|
+
}, [C("feDropShadow", {
|
|
1655
|
+
dx: "0",
|
|
1656
|
+
dy: "0",
|
|
1657
|
+
stdDeviation: "10",
|
|
1658
|
+
"flood-opacity": "0.5",
|
|
1659
|
+
"flood-color": R.value.style.chart.layout.donut.shadowColor
|
|
1660
|
+
}, null, 8, vt)], 8, _t),
|
|
1661
|
+
C("filter", {
|
|
1662
|
+
id: `drop_shadow_${I.value}`,
|
|
1663
|
+
"color-interpolation-filters": "sRGB",
|
|
1664
|
+
x: "-50%",
|
|
1665
|
+
y: "-50%",
|
|
1666
|
+
width: "200%",
|
|
1667
|
+
height: "200%"
|
|
1668
|
+
}, [C("feDropShadow", {
|
|
1669
|
+
dx: "0",
|
|
1670
|
+
dy: "0",
|
|
1671
|
+
stdDeviation: "3",
|
|
1672
|
+
"flood-opacity": "1",
|
|
1673
|
+
"flood-color": R.value.style.chart.layout.donut.shadowColor
|
|
1674
|
+
}, null, 8, bt)], 8, yt)
|
|
1675
|
+
]),
|
|
1676
|
+
R.value.type === "classic" ? (D(!0), S(y, { key: 3 }, k(K.value.filter((e) => !e.ghost), (e, t) => (D(), S("g", null, [Y(e) && B.value.dataLabels.show ? (D(), S("path", {
|
|
1677
|
+
key: 0,
|
|
1678
|
+
d: j(X)[t]?.connectorPath || j(ie)(e, {
|
|
1679
|
+
x: V.value.width / 2,
|
|
1680
|
+
y: V.value.height / 2
|
|
1681
|
+
}, 16, 16, !1, !1, Pr.value, 12, R.value.style.chart.layout.curvedMarkers),
|
|
1682
|
+
stroke: e.color,
|
|
1683
|
+
"stroke-width": "1",
|
|
1684
|
+
"stroke-linecap": "round",
|
|
1685
|
+
"stroke-linejoin": "round",
|
|
1686
|
+
fill: "none",
|
|
1687
|
+
filter: fi(t)
|
|
1688
|
+
}, null, 8, xt)) : x("", !0)]))), 256)) : x("", !0),
|
|
1689
|
+
R.value.type === "polar" ? (D(!0), S(y, { key: 4 }, k(K.value.filter((e) => !e.ghost), (e, t) => (D(), S("g", null, [Y(e) && B.value.dataLabels.show ? (D(), S("path", {
|
|
1690
|
+
key: 0,
|
|
1691
|
+
d: `M ${j(g)({
|
|
1692
|
+
initX: J.value[t].middlePoint.x,
|
|
1693
|
+
initY: J.value[t].middlePoint.y,
|
|
1694
|
+
offset: 24,
|
|
1695
|
+
centerX: V.value.width / 2,
|
|
1696
|
+
centerY: V.value.height / 2
|
|
1697
|
+
}).x},${j(g)({
|
|
1698
|
+
initX: J.value[t].middlePoint.x,
|
|
1699
|
+
initY: J.value[t].middlePoint.y,
|
|
1700
|
+
offset: 24,
|
|
1701
|
+
centerX: V.value.width / 2,
|
|
1702
|
+
centerY: V.value.height / 2
|
|
1703
|
+
}).y} ${J.value[t].middlePoint.x},${J.value[t].middlePoint.y}`,
|
|
1704
|
+
stroke: e.color,
|
|
1705
|
+
"stroke-width": "1",
|
|
1706
|
+
"stroke-linecap": "round",
|
|
1707
|
+
"stroke-linejoin": "round",
|
|
1708
|
+
fill: "none",
|
|
1709
|
+
filter: fi(t),
|
|
1710
|
+
style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` })
|
|
1711
|
+
}, null, 12, St)) : x("", !0)]))), 256)) : x("", !0),
|
|
1712
|
+
R.value.type === "classic" && R.value.style.chart.layout.donut.useShadow ? (D(), S("circle", {
|
|
1713
|
+
key: 5,
|
|
1714
|
+
cx: V.value.width / 2,
|
|
1715
|
+
cy: V.value.height / 2,
|
|
1716
|
+
r: G.value <= 0 ? 10 : G.value,
|
|
1717
|
+
fill: R.value.style.chart.backgroundColor,
|
|
1718
|
+
filter: `url(#shadow_${I.value})`
|
|
1719
|
+
}, null, 8, Ct)) : x("", !0),
|
|
1720
|
+
t.$slots.pattern ? (D(), S("g", wt, [(D(!0), S(y, null, k(e.dataset, (e, n) => (D(), S("defs", { key: `pattern-${e.patternIndex}` }, [A(t.$slots, "pattern", Re({ ref_for: !0 }, {
|
|
1721
|
+
seriesIndex: n,
|
|
1722
|
+
patternId: `pattern_${I.value}_${n}`
|
|
1723
|
+
}), void 0, !0)]))), 128))])) : x("", !0),
|
|
1724
|
+
Z.value && R.value.type === "classic" ? (D(), S(y, { key: 7 }, [
|
|
1725
|
+
(D(!0), S(y, null, k(q.value, (e, t) => (D(), S("path", {
|
|
1726
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
1727
|
+
d: e.arcSlice,
|
|
1728
|
+
fill: "#FFFFFF"
|
|
1729
|
+
}, null, 8, Tt))), 256)),
|
|
1730
|
+
(D(!0), S(y, null, k(q.value, (e, t) => (D(), S("path", {
|
|
1731
|
+
class: "vue-ui-donut-arc-path",
|
|
1732
|
+
d: e.arcSlice,
|
|
1733
|
+
fill: e.color,
|
|
1734
|
+
stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
|
|
1735
|
+
"stroke-width": R.value.style.chart.layout.donut.borderWidth,
|
|
1736
|
+
filter: fi(t)
|
|
1737
|
+
}, null, 8, Et))), 256)),
|
|
1738
|
+
t.$slots.pattern ? (D(), S("g", Dt, [(D(!0), S(y, null, k(q.value, (e, t) => (D(), S("path", {
|
|
1739
|
+
class: "vue-ui-donut-arc-path",
|
|
1740
|
+
d: e.arcSlice,
|
|
1741
|
+
fill: `url(#${e.pattern})`,
|
|
1742
|
+
stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
|
|
1743
|
+
"stroke-width": R.value.style.chart.layout.donut.borderWidth,
|
|
1744
|
+
filter: fi(t)
|
|
1745
|
+
}, null, 8, Ot))), 256))])) : x("", !0)
|
|
1746
|
+
], 64)) : x("", !0),
|
|
1747
|
+
Z.value && R.value.type === "polar" ? (D(), S(y, { key: 8 }, [K.value.length > 1 ? (D(), S("g", kt, [
|
|
1748
|
+
(D(!0), S(y, null, k(q.value, (e, t) => (D(), S("path", {
|
|
1749
|
+
stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
|
|
1750
|
+
d: J.value[t].path,
|
|
1751
|
+
fill: "#FFFFFF",
|
|
1752
|
+
style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` })
|
|
1753
|
+
}, null, 12, At))), 256)),
|
|
1754
|
+
R.value.style.chart.layout.donut.useShadow ? (D(), S("g", jt, [(D(!0), S(y, null, k(q.value, (e, t) => (D(), S("path", {
|
|
1755
|
+
class: "vue-ui-donut-arc-path",
|
|
1756
|
+
d: J.value[t].path,
|
|
1757
|
+
fill: "transparent",
|
|
1758
|
+
stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
|
|
1759
|
+
"stroke-width": R.value.style.chart.layout.donut.borderWidth,
|
|
1760
|
+
filter: `url(#drop_shadow_${I.value})`,
|
|
1761
|
+
style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` })
|
|
1762
|
+
}, null, 12, Mt))), 256))])) : x("", !0),
|
|
1763
|
+
t.$slots.pattern ? (D(), S("g", Nt, [(D(!0), S(y, null, k(q.value, (e, t) => (D(), S("path", {
|
|
1764
|
+
class: "vue-ui-donut-arc-path",
|
|
1765
|
+
d: J.value[t].path,
|
|
1766
|
+
fill: `url(#${e.pattern})`,
|
|
1767
|
+
stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
|
|
1768
|
+
"stroke-width": R.value.style.chart.layout.donut.borderWidth,
|
|
1769
|
+
filter: fi(t),
|
|
1770
|
+
style: E({
|
|
1771
|
+
transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1772
|
+
transformOrigin: "center"
|
|
1773
|
+
})
|
|
1774
|
+
}, null, 12, Pt))), 256))])) : x("", !0),
|
|
1775
|
+
(D(!0), S(y, null, k(q.value, (e, t) => (D(), S("path", {
|
|
1776
|
+
class: "vue-ui-donut-arc-path",
|
|
1777
|
+
d: J.value[t].path,
|
|
1778
|
+
fill: R.value.style.chart.useGradient ? `url(#polar_gradient_${t}_${I.value})` : e.color,
|
|
1779
|
+
stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
|
|
1780
|
+
"stroke-width": R.value.style.chart.layout.donut.borderWidth,
|
|
1781
|
+
filter: fi(t),
|
|
1782
|
+
style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` })
|
|
1783
|
+
}, null, 12, Ft))), 256))
|
|
1784
|
+
])) : (D(), S("g", It, [t.$slots.pattern ? (D(), S("circle", {
|
|
1785
|
+
key: 0,
|
|
1786
|
+
cx: V.value.width / 2,
|
|
1787
|
+
cy: V.value.height / 2,
|
|
1788
|
+
r: G.value,
|
|
1789
|
+
fill: `url(#pattern_${I.value}_${K.value[0].patternIndex})`,
|
|
1790
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
1791
|
+
"stroke-width": R.value.style.chart.layout.donut.borderWidth
|
|
1792
|
+
}, null, 8, Lt)) : x("", !0), C("circle", {
|
|
1793
|
+
cx: V.value.width / 2,
|
|
1794
|
+
cy: V.value.height / 2,
|
|
1795
|
+
r: G.value,
|
|
1796
|
+
fill: R.value.style.chart.useGradient ? `url(#polar_gradient_0_${I.value})` : K.value[0].color,
|
|
1797
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
1798
|
+
"stroke-width": R.value.style.chart.layout.donut.borderWidth
|
|
1799
|
+
}, null, 8, Rt)]))], 64)) : (D(), S(y, { key: 9 }, [R.value.type === "classic" && !Xr.value ? (D(), S("g", zt, [(D(!0), S(y, null, k(Zr.value, (e, t) => (D(), S("path", {
|
|
1800
|
+
class: "vue-ui-donut-arc-path",
|
|
1801
|
+
d: e.arcSlice,
|
|
1802
|
+
fill: e.color,
|
|
1803
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
1804
|
+
"stroke-width": R.value.style.chart.layout.donut.borderWidth
|
|
1805
|
+
}, null, 8, Bt))), 256))])) : x("", !0), C("circle", {
|
|
1806
|
+
cx: V.value.width / 2,
|
|
1807
|
+
cy: V.value.height / 2,
|
|
1808
|
+
r: G.value <= 0 ? 10 : G.value,
|
|
1809
|
+
fill: "transparent",
|
|
1810
|
+
stroke: R.value.style.chart.backgroundColor
|
|
1811
|
+
}, null, 8, Vt)], 64)),
|
|
1812
|
+
R.value.style.chart.useGradient && R.value.type === "classic" ? (D(), S("circle", {
|
|
1813
|
+
key: 10,
|
|
1814
|
+
cx: V.value.width / 2,
|
|
1815
|
+
cy: V.value.height / 2,
|
|
1816
|
+
r: G.value <= 0 ? 10 : G.value,
|
|
1817
|
+
fill: `url(#gradient_${I.value})`
|
|
1818
|
+
}, null, 8, Ht)) : x("", !0),
|
|
1819
|
+
C("circle", {
|
|
1820
|
+
ref_key: "circle_hollow",
|
|
1821
|
+
ref: Fn,
|
|
1822
|
+
style: { pointerEvents: "none" },
|
|
1823
|
+
fill: "none",
|
|
1824
|
+
cx: V.value.width / 2,
|
|
1825
|
+
cy: V.value.height / 2,
|
|
1826
|
+
r: Math.max(.1, Pr.value * 1.7)
|
|
1827
|
+
}, null, 8, Ut),
|
|
1828
|
+
Z.value ? (D(), S(y, { key: 11 }, [K.value.length > 1 || R.value.type === "classic" ? (D(), S("g", Wt, [(D(!0), S(y, null, k(K.value.filter((e) => !e.ghost), (e, t) => (D(), S("path", {
|
|
1829
|
+
d: R.value.type === "classic" ? e.arcSlice : J.value[t].path,
|
|
1830
|
+
stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
|
|
1831
|
+
fill: L.value === t ? R.value.style.chart.layout.donut.selectedColor : "transparent",
|
|
1832
|
+
onMouseenter: (n) => Q({
|
|
1833
|
+
datapoint: e,
|
|
1834
|
+
relativeIndex: t,
|
|
1835
|
+
seriesIndex: e.seriesIndex,
|
|
1836
|
+
show: !0
|
|
1837
|
+
}),
|
|
1838
|
+
onMouseleave: (t) => ci({
|
|
1839
|
+
datapoint: e,
|
|
1840
|
+
seriesIndex: e.seriesIndex
|
|
1841
|
+
}),
|
|
1842
|
+
onClick: (n) => $(e, t)
|
|
1843
|
+
}, null, 40, Gt))), 256))])) : (D(), S("g", Kt, [C("circle", {
|
|
1844
|
+
cx: V.value.width / 2,
|
|
1845
|
+
cy: V.value.height / 2,
|
|
1846
|
+
r: G.value,
|
|
1847
|
+
fill: "transparent",
|
|
1848
|
+
onMouseenter: n[0] ||= (e) => Q({
|
|
1849
|
+
datapoint: K.value[0],
|
|
1850
|
+
relativeIndex: 0,
|
|
1851
|
+
seriesIndex: K.value[0].seriesIndex,
|
|
1852
|
+
show: !0
|
|
1853
|
+
}),
|
|
1854
|
+
onMouseleave: n[1] ||= (e) => ci({
|
|
1855
|
+
datapoint: K.value[0],
|
|
1856
|
+
seriesIndex: K.value[0].seriesIndex
|
|
1857
|
+
}),
|
|
1858
|
+
onClick: n[2] ||= (e) => $(K.value[0], t.i)
|
|
1859
|
+
}, null, 40, qt)]))], 64)) : x("", !0),
|
|
1860
|
+
R.value.type === "classic" ? (D(), S("g", {
|
|
1861
|
+
key: 12,
|
|
1862
|
+
ref_key: "G_hollow",
|
|
1863
|
+
ref: Pn,
|
|
1864
|
+
class: "vue-data-ui-donut-hollow-labels"
|
|
1865
|
+
}, [
|
|
1866
|
+
R.value.style.chart.layout.labels.hollow.total.show ? (D(), S("text", {
|
|
1867
|
+
key: 0,
|
|
1868
|
+
"text-anchor": "middle",
|
|
1869
|
+
x: V.value.width / 2,
|
|
1870
|
+
y: V.value.height / 2 - (R.value.style.chart.layout.labels.hollow.average.show ? R.value.style.chart.layout.labels.hollow.total.fontSize : 0) + R.value.style.chart.layout.labels.hollow.total.offsetY,
|
|
1871
|
+
fill: R.value.style.chart.layout.labels.hollow.total.color,
|
|
1872
|
+
"font-size": R.value.style.chart.layout.labels.hollow.total.fontSize,
|
|
1873
|
+
style: E(`font-weight:${R.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
|
|
1874
|
+
}, Ge(R.value.style.chart.layout.labels.hollow.total.text), 13, Jt)) : x("", !0),
|
|
1875
|
+
R.value.style.chart.layout.labels.hollow.total.show ? (D(), S("text", {
|
|
1876
|
+
key: 1,
|
|
1877
|
+
"text-anchor": "middle",
|
|
1878
|
+
x: V.value.width / 2,
|
|
1879
|
+
y: V.value.height / 2 + R.value.style.chart.layout.labels.hollow.total.fontSize - (R.value.style.chart.layout.labels.hollow.average.show ? R.value.style.chart.layout.labels.hollow.total.fontSize : 0) + R.value.style.chart.layout.labels.hollow.total.value.offsetY,
|
|
1880
|
+
fill: R.value.style.chart.layout.labels.hollow.total.value.color,
|
|
1881
|
+
"font-size": R.value.style.chart.layout.labels.hollow.total.value.fontSize,
|
|
1882
|
+
style: E(`font-weight:${R.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
|
|
1883
|
+
}, Ge(j(p)(R.value.style.chart.layout.labels.hollow.total.value.formatter, Z.value, j(_)({
|
|
1884
|
+
p: R.value.style.chart.layout.labels.hollow.total.value.prefix,
|
|
1885
|
+
v: Z.value,
|
|
1886
|
+
s: R.value.style.chart.layout.labels.hollow.total.value.suffix
|
|
1887
|
+
}))), 13, Yt)) : x("", !0),
|
|
1888
|
+
R.value.style.chart.layout.labels.hollow.average.show ? (D(), S("text", {
|
|
1889
|
+
key: 2,
|
|
1890
|
+
"text-anchor": "middle",
|
|
1891
|
+
x: V.value.width / 2,
|
|
1892
|
+
y: V.value.height / 2 + (R.value.style.chart.layout.labels.hollow.total.show ? R.value.style.chart.layout.labels.hollow.average.fontSize : 0) + R.value.style.chart.layout.labels.hollow.average.offsetY,
|
|
1893
|
+
fill: R.value.style.chart.layout.labels.hollow.average.color,
|
|
1894
|
+
"font-size": R.value.style.chart.layout.labels.hollow.average.fontSize,
|
|
1895
|
+
style: E(`font-weight:${R.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
|
|
1896
|
+
}, Ge(R.value.style.chart.layout.labels.hollow.average.text), 13, Xt)) : x("", !0),
|
|
1897
|
+
R.value.style.chart.layout.labels.hollow.average.show ? (D(), S("text", {
|
|
1898
|
+
key: 3,
|
|
1899
|
+
"text-anchor": "middle",
|
|
1900
|
+
x: V.value.width / 2,
|
|
1901
|
+
y: V.value.height / 2 + (R.value.style.chart.layout.labels.hollow.total.show ? R.value.style.chart.layout.labels.hollow.average.fontSize : 0) + R.value.style.chart.layout.labels.hollow.average.fontSize + R.value.style.chart.layout.labels.hollow.average.value.offsetY,
|
|
1902
|
+
fill: R.value.style.chart.layout.labels.hollow.average.value.color,
|
|
1903
|
+
"font-size": R.value.style.chart.layout.labels.hollow.average.value.fontSize,
|
|
1904
|
+
style: E(`font-weight:${R.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
|
|
1905
|
+
}, Ge(Lr.value || z.value ? "--" : j(p)(R.value.style.chart.layout.labels.hollow.average.value.formatter, j(m)(ii.value), j(_)({
|
|
1906
|
+
p: R.value.style.chart.layout.labels.hollow.average.value.prefix,
|
|
1907
|
+
v: j(m)(ii.value),
|
|
1908
|
+
s: R.value.style.chart.layout.labels.hollow.average.value.suffix,
|
|
1909
|
+
r: R.value.style.chart.layout.labels.hollow.average.value.rounding
|
|
1910
|
+
}))), 13, Zt)) : x("", !0)
|
|
1911
|
+
], 512)) : x("", !0),
|
|
1912
|
+
(D(!0), S(y, null, k(q.value.filter((e) => !e.ghost), (e, n) => (D(), S("g", {
|
|
1913
|
+
filter: fi(n),
|
|
1914
|
+
class: Be({ animated: R.value.useCssAnimation }),
|
|
1915
|
+
key: e.seriesIndex,
|
|
1916
|
+
opacity: pi(e)
|
|
1917
|
+
}, [R.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (D(), S("g", $t, [(D(), S("foreignObject", {
|
|
1918
|
+
x: j(v)(e, !0).anchor === "end" ? j(v)(e).x - 120 : j(v)(e, !0).anchor === "middle" ? j(v)(e).x - 60 : j(v)(e).x,
|
|
1919
|
+
y: j(f)(e) - (yi.value ? 20 : 0),
|
|
1920
|
+
width: "120",
|
|
1921
|
+
height: "60",
|
|
1922
|
+
style: { overflow: "visible" }
|
|
1923
|
+
}, [C("div", null, [A(t.$slots, "dataLabel", Re({ ref_for: !0 }, {
|
|
1924
|
+
datapoint: e,
|
|
1925
|
+
isBlur: !R.value.useBlurOnHover || [null, void 0].includes(L.value) || L.value === n,
|
|
1926
|
+
isSafari: yi.value,
|
|
1927
|
+
isVisible: Y(e) && B.value.dataLabels.show,
|
|
1928
|
+
textAlign: j(v)(e, !0, 16, !0).anchor,
|
|
1929
|
+
flexAlign: j(v)(e, !0, 16).anchor,
|
|
1930
|
+
percentage: ti(e, q.value)
|
|
1931
|
+
}), void 0, !0)])], 8, en))])) : (D(), S("g", tn, [R.value.type === "classic" ? (D(), S(y, { key: 0 }, [Y(e) && B.value.dataLabels.show ? (D(), S("circle", {
|
|
1932
|
+
key: 0,
|
|
1933
|
+
cx: j(X)[n]?.markerX ?? j(v)(e).x,
|
|
1934
|
+
cy: j(X)[n]?.markerY ?? j(f)(e) - 3.5,
|
|
1935
|
+
fill: e.color,
|
|
1936
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
1937
|
+
"stroke-width": 1,
|
|
1938
|
+
r: 3,
|
|
1939
|
+
filter: !R.value.useBlurOnHover || [null, void 0].includes(L.value) || L.value === n ? "" : `url(#blur_${I.value})`,
|
|
1940
|
+
onClick: (t) => $(e, n),
|
|
1941
|
+
onMouseenter: (t) => Q({
|
|
1942
|
+
datapoint: e,
|
|
1943
|
+
relativeIndex: n,
|
|
1944
|
+
seriesIndex: e.seriesIndex,
|
|
1945
|
+
show: !0
|
|
1946
|
+
}),
|
|
1947
|
+
onMouseleave: (t) => ci({
|
|
1948
|
+
datapoint: e,
|
|
1949
|
+
seriesIndex: e.seriesIndex
|
|
1950
|
+
})
|
|
1951
|
+
}, null, 40, nn)) : x("", !0), R.value.style.chart.layout.labels.dataLabels.oneLine || j(X)[n] ? Xe((D(), S("text", {
|
|
1952
|
+
key: 1,
|
|
1953
|
+
class: "vue-data-ui-datalabel-inline",
|
|
1954
|
+
"text-anchor": j(X)[n]?.textAnchor || j(v)(e, !0, 12).anchor,
|
|
1955
|
+
x: j(X)[n]?.labelX ?? j(v)(e, !0, 12).x,
|
|
1956
|
+
y: j(X)[n]?.labelY ?? j(f)(e),
|
|
1957
|
+
onClick: (t) => $(e, n),
|
|
1958
|
+
onMouseenter: (t) => Q({
|
|
1959
|
+
datapoint: e,
|
|
1960
|
+
relativeIndex: n,
|
|
1961
|
+
seriesIndex: e.seriesIndex,
|
|
1962
|
+
show: !0
|
|
1963
|
+
}),
|
|
1964
|
+
onMouseleave: (t) => ci({
|
|
1965
|
+
datapoint: e,
|
|
1966
|
+
seriesIndex: e.seriesIndex
|
|
1967
|
+
}),
|
|
1968
|
+
innerHTML: ui(e, n, !!j(X)[n])
|
|
1969
|
+
}, null, 40, rn)), [[Je, Y(e) && B.value.dataLabels.show]]) : (D(), S(y, { key: 2 }, [Xe(C("text", {
|
|
1970
|
+
class: "vue-data-ui-datalabel-value",
|
|
1971
|
+
"text-anchor": j(X)[n]?.textAnchor || j(v)(e, !0, 12).anchor,
|
|
1972
|
+
x: j(X)[n]?.labelX ?? j(v)(e, !0, 12).x,
|
|
1973
|
+
y: j(X)[n]?.labelY ?? j(f)(e),
|
|
1974
|
+
fill: R.value.style.chart.layout.labels.percentage.color,
|
|
1975
|
+
"font-size": er.value + "px",
|
|
1976
|
+
style: E(`font-weight:${R.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
|
|
1977
|
+
onClick: (t) => $(e, n),
|
|
1978
|
+
onMouseenter: (t) => Q({
|
|
1979
|
+
datapoint: e,
|
|
1980
|
+
relativeIndex: n,
|
|
1981
|
+
seriesIndex: e.seriesIndex,
|
|
1982
|
+
show: !0
|
|
1983
|
+
}),
|
|
1984
|
+
onMouseleave: (t) => ci({
|
|
1985
|
+
datapoint: e,
|
|
1986
|
+
seriesIndex: e.seriesIndex
|
|
1987
|
+
})
|
|
1988
|
+
}, Ge(Si(e)), 45, an), [[Je, Y(e) && B.value.dataLabels.show]]), Xe(C("text", {
|
|
1989
|
+
class: "vue-data-ui-datalabel-name",
|
|
1990
|
+
"text-anchor": j(X)[n]?.textAnchor || j(v)(e).anchor,
|
|
1991
|
+
x: j(X)[n]?.labelX ?? j(v)(e, !0, 12).x,
|
|
1992
|
+
y: (j(X)[n]?.labelY ?? j(f)(e)) + F.value * 1.2,
|
|
1993
|
+
fill: R.value.style.chart.layout.labels.name.color,
|
|
1994
|
+
"font-size": F.value + "px",
|
|
1995
|
+
style: E(`font-weight:${R.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
|
|
1996
|
+
onClick: (t) => $(e, n),
|
|
1997
|
+
onMouseenter: (t) => Q({
|
|
1998
|
+
datapoint: e,
|
|
1999
|
+
relativeIndex: n,
|
|
2000
|
+
seriesIndex: e.seriesIndex,
|
|
2001
|
+
show: !0
|
|
2002
|
+
}),
|
|
2003
|
+
onMouseleave: (t) => ci({
|
|
2004
|
+
datapoint: e,
|
|
2005
|
+
seriesIndex: e.seriesIndex
|
|
2006
|
+
}),
|
|
2007
|
+
innerHTML: j(l)({
|
|
2008
|
+
content: e.name,
|
|
2009
|
+
fontSize: F.value,
|
|
2010
|
+
fill: R.value.style.chart.layout.labels.name.color,
|
|
2011
|
+
x: j(X)[n]?.labelX ?? j(v)(e, !0, 12).x,
|
|
2012
|
+
y: (j(X)[n]?.labelY ?? j(f)(e)) + F.value
|
|
2013
|
+
})
|
|
2014
|
+
}, null, 44, on), [[Je, Y(e, !0, 12) && B.value.dataLabels.show && R.value.style.chart.layout.labels.name.show]])], 64))], 64)) : x("", !0), R.value.type === "polar" ? (D(), S(y, { key: 1 }, [Y(e) && B.value.dataLabels.show ? (D(), S("circle", {
|
|
2015
|
+
key: 0,
|
|
2016
|
+
cx: j(g)({
|
|
2017
|
+
initX: J.value[n].middlePoint.x,
|
|
2018
|
+
initY: J.value[n].middlePoint.y,
|
|
2019
|
+
offset: 24,
|
|
2020
|
+
centerX: V.value.width / 2,
|
|
2021
|
+
centerY: V.value.height / 2
|
|
2022
|
+
}).x,
|
|
2023
|
+
cy: j(g)({
|
|
2024
|
+
initX: J.value[n].middlePoint.x,
|
|
2025
|
+
initY: J.value[n].middlePoint.y,
|
|
2026
|
+
offset: 24,
|
|
2027
|
+
centerX: V.value.width / 2,
|
|
2028
|
+
centerY: V.value.height / 2
|
|
2029
|
+
}).y,
|
|
2030
|
+
fill: e.color,
|
|
2031
|
+
stroke: R.value.style.chart.backgroundColor,
|
|
2032
|
+
"stroke-width": 1,
|
|
2033
|
+
r: 3,
|
|
2034
|
+
filter: !R.value.useBlurOnHover || [null, void 0].includes(L.value) || L.value === n ? "" : `url(#blur_${I.value})`,
|
|
2035
|
+
onClick: (t) => $(e, n),
|
|
2036
|
+
onMouseenter: (t) => Q({
|
|
2037
|
+
datapoint: e,
|
|
2038
|
+
relativeIndex: n,
|
|
2039
|
+
seriesIndex: e.seriesIndex,
|
|
2040
|
+
show: !0
|
|
2041
|
+
}),
|
|
2042
|
+
onMouseleave: (t) => ci({
|
|
2043
|
+
datapoint: e,
|
|
2044
|
+
seriesIndex: e.seriesIndex
|
|
2045
|
+
}),
|
|
2046
|
+
style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` })
|
|
2047
|
+
}, null, 44, sn)) : x("", !0), R.value.style.chart.layout.labels.dataLabels.oneLine ? Xe((D(), S("text", {
|
|
2048
|
+
key: 1,
|
|
2049
|
+
class: "vue-data-ui-datalabel-inline",
|
|
2050
|
+
"text-anchor": Qr(J.value[n].middlePoint),
|
|
2051
|
+
x: j(g)({
|
|
2052
|
+
initX: J.value[n].middlePoint.x,
|
|
2053
|
+
initY: J.value[n].middlePoint.y,
|
|
2054
|
+
offset: 42,
|
|
2055
|
+
centerX: V.value.width / 2,
|
|
2056
|
+
centerY: V.value.height / 2
|
|
2057
|
+
}).x,
|
|
2058
|
+
y: j(g)({
|
|
2059
|
+
initX: J.value[n].middlePoint.x,
|
|
2060
|
+
initY: J.value[n].middlePoint.y,
|
|
2061
|
+
offset: 42,
|
|
2062
|
+
centerX: V.value.width / 2,
|
|
2063
|
+
centerY: V.value.height / 2
|
|
2064
|
+
}).y,
|
|
2065
|
+
style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` }),
|
|
2066
|
+
onClick: (t) => $(e, n),
|
|
2067
|
+
onMouseenter: (t) => Q({
|
|
2068
|
+
datapoint: e,
|
|
2069
|
+
relativeIndex: n,
|
|
2070
|
+
seriesIndex: e.seriesIndex,
|
|
2071
|
+
show: !0
|
|
2072
|
+
}),
|
|
2073
|
+
onMouseleave: (t) => ci({
|
|
2074
|
+
datapoint: e,
|
|
2075
|
+
seriesIndex: e.seriesIndex
|
|
2076
|
+
}),
|
|
2077
|
+
innerHTML: di(e, n)
|
|
2078
|
+
}, null, 44, cn)), [[Je, Y(e) && B.value.dataLabels.show]]) : (D(), S(y, { key: 2 }, [Y(e) && B.value.dataLabels.show ? (D(), S("text", {
|
|
2079
|
+
key: 0,
|
|
2080
|
+
class: "vue-data-ui-datalabel-value",
|
|
2081
|
+
"text-anchor": Qr(J.value[n].middlePoint),
|
|
2082
|
+
x: j(g)({
|
|
2083
|
+
initX: J.value[n].middlePoint.x,
|
|
2084
|
+
initY: J.value[n].middlePoint.y,
|
|
2085
|
+
offset: 42,
|
|
2086
|
+
centerX: V.value.width / 2,
|
|
2087
|
+
centerY: V.value.height / 2
|
|
2088
|
+
}).x,
|
|
2089
|
+
y: j(g)({
|
|
2090
|
+
initX: J.value[n].middlePoint.x,
|
|
2091
|
+
initY: J.value[n].middlePoint.y,
|
|
2092
|
+
offset: 42,
|
|
2093
|
+
centerX: V.value.width / 2,
|
|
2094
|
+
centerY: V.value.height / 2
|
|
2095
|
+
}).y,
|
|
2096
|
+
fill: R.value.style.chart.layout.labels.percentage.color,
|
|
2097
|
+
"font-size": er.value,
|
|
2098
|
+
style: E({
|
|
2099
|
+
transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
2100
|
+
fontWeight: R.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
|
|
2101
|
+
}),
|
|
2102
|
+
onClick: (t) => $(e, n),
|
|
2103
|
+
onMouseenter: (t) => Q({
|
|
2104
|
+
datapoint: e,
|
|
2105
|
+
relativeIndex: n,
|
|
2106
|
+
seriesIndex: e.seriesIndex,
|
|
2107
|
+
show: !0
|
|
2108
|
+
}),
|
|
2109
|
+
onMouseleave: (t) => ci({
|
|
2110
|
+
datapoint: e,
|
|
2111
|
+
seriesIndex: e.seriesIndex
|
|
2112
|
+
})
|
|
2113
|
+
}, Ge(Si(e)), 45, ln)) : x("", !0), Y(e, !0, 12) && B.value.dataLabels.show && R.value.style.chart.layout.labels.name.show ? (D(), S("text", {
|
|
2114
|
+
key: 1,
|
|
2115
|
+
class: "vue-data-ui-datalabel-name",
|
|
2116
|
+
"text-anchor": Qr(J.value[n].middlePoint),
|
|
2117
|
+
x: j(g)({
|
|
2118
|
+
initX: J.value[n].middlePoint.x,
|
|
2119
|
+
initY: J.value[n].middlePoint.y,
|
|
2120
|
+
offset: 42,
|
|
2121
|
+
centerX: V.value.width / 2,
|
|
2122
|
+
centerY: V.value.height / 2
|
|
2123
|
+
}).x,
|
|
2124
|
+
y: j(g)({
|
|
2125
|
+
initX: J.value[n].middlePoint.x,
|
|
2126
|
+
initY: J.value[n].middlePoint.y,
|
|
2127
|
+
offset: 42,
|
|
2128
|
+
centerX: V.value.width / 2,
|
|
2129
|
+
centerY: V.value.height / 2
|
|
2130
|
+
}).y + F.value * 1.2,
|
|
2131
|
+
fill: R.value.style.chart.layout.labels.name.color,
|
|
2132
|
+
"font-size": F.value,
|
|
2133
|
+
style: E({
|
|
2134
|
+
transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
2135
|
+
fontWeight: R.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
|
|
2136
|
+
}),
|
|
2137
|
+
onClick: (t) => $(e, n),
|
|
2138
|
+
onMouseenter: (t) => Q({
|
|
2139
|
+
datapoint: e,
|
|
2140
|
+
relativeIndex: n,
|
|
2141
|
+
seriesIndex: e.seriesIndex,
|
|
2142
|
+
show: !0
|
|
2143
|
+
}),
|
|
2144
|
+
onMouseleave: (t) => ci({
|
|
2145
|
+
datapoint: e,
|
|
2146
|
+
seriesIndex: e.seriesIndex
|
|
2147
|
+
}),
|
|
2148
|
+
innerHTML: j(l)({
|
|
2149
|
+
content: e.name,
|
|
2150
|
+
fontSize: F.value,
|
|
2151
|
+
fill: R.value.style.chart.layout.labels.name.color,
|
|
2152
|
+
x: j(g)({
|
|
2153
|
+
initX: J.value[n].middlePoint.x,
|
|
2154
|
+
initY: J.value[n].middlePoint.y,
|
|
2155
|
+
offset: 42,
|
|
2156
|
+
centerX: V.value.width / 2,
|
|
2157
|
+
centerY: V.value.height / 2
|
|
2158
|
+
}).x,
|
|
2159
|
+
y: j(g)({
|
|
2160
|
+
initX: J.value[n].middlePoint.x,
|
|
2161
|
+
initY: J.value[n].middlePoint.y,
|
|
2162
|
+
offset: 42,
|
|
2163
|
+
centerX: V.value.width / 2,
|
|
2164
|
+
centerY: V.value.height / 2
|
|
2165
|
+
}).y + F.value * 1.2
|
|
2166
|
+
})
|
|
2167
|
+
}, null, 44, un)) : x("", !0)], 64))], 64)) : x("", !0)])), B.value.dataLabels.show && R.value.style.chart.comments.show && e.comment ? (D(), S("g", dn, [Y(e) && R.value.type === "classic" ? (D(), S("foreignObject", {
|
|
2168
|
+
key: 0,
|
|
2169
|
+
x: R.value.style.chart.comments.offsetX + (j(v)(e, !0).anchor === "end" ? j(v)(e).x - R.value.style.chart.comments.width : j(v)(e, !0).anchor === "middle" ? j(v)(e).x - R.value.style.chart.comments.width / 2 : j(v)(e).x),
|
|
2170
|
+
y: j(f)(e) + 24 + R.value.style.chart.comments.offsetY,
|
|
2171
|
+
width: R.value.style.chart.comments.width,
|
|
2172
|
+
height: "200",
|
|
2173
|
+
style: {
|
|
2174
|
+
overflow: "visible",
|
|
2175
|
+
"pointer-events": "none"
|
|
2176
|
+
}
|
|
2177
|
+
}, [C("div", null, [A(t.$slots, "plot-comment", { plot: {
|
|
2178
|
+
...e,
|
|
2179
|
+
textAlign: j(v)(e, !0, 16, !0).anchor,
|
|
2180
|
+
flexAlign: j(v)(e, !0, 16).anchor,
|
|
2181
|
+
isFirstLoad: z.value
|
|
2182
|
+
} }, void 0, !0)])], 8, fn)) : x("", !0), Y(e) && R.value.type === "polar" ? (D(), S("foreignObject", {
|
|
2183
|
+
key: 1,
|
|
2184
|
+
x: R.value.style.chart.comments.offsetX + (Qr(J.value[n].middlePoint) === "end" ? j(g)({
|
|
2185
|
+
initX: J.value[n].middlePoint.x,
|
|
2186
|
+
initY: J.value[n].middlePoint.y,
|
|
2187
|
+
offset: 42,
|
|
2188
|
+
centerX: V.value.width / 2,
|
|
2189
|
+
centerY: V.value.height / 2
|
|
2190
|
+
}).x - R.value.style.chart.comments.width : Qr(J.value[n].middlePoint) === "middle" ? j(g)({
|
|
2191
|
+
initX: J.value[n].middlePoint.x,
|
|
2192
|
+
initY: J.value[n].middlePoint.y,
|
|
2193
|
+
offset: 42,
|
|
2194
|
+
centerX: V.value.width / 2,
|
|
2195
|
+
centerY: V.value.height / 2
|
|
2196
|
+
}).x - R.value.style.chart.comments.width / 2 : j(g)({
|
|
2197
|
+
initX: J.value[n].middlePoint.x,
|
|
2198
|
+
initY: J.value[n].middlePoint.y,
|
|
2199
|
+
offset: 42,
|
|
2200
|
+
centerX: V.value.width / 2,
|
|
2201
|
+
centerY: V.value.height / 2
|
|
2202
|
+
}).x),
|
|
2203
|
+
y: $r(J.value[n]) + R.value.style.chart.comments.offsetY,
|
|
2204
|
+
width: R.value.style.chart.comments.width,
|
|
2205
|
+
height: "200",
|
|
2206
|
+
style: E({
|
|
2207
|
+
transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
2208
|
+
overflow: "visible",
|
|
2209
|
+
pointerEvents: "none"
|
|
2210
|
+
})
|
|
2211
|
+
}, [C("div", null, [A(t.$slots, "plot-comment", { plot: {
|
|
2212
|
+
...e,
|
|
2213
|
+
textAlign: Qr(J.value[n].middlePoint),
|
|
2214
|
+
flexAlign: Qr(J.value[n].middlePoint),
|
|
2215
|
+
isFirstLoad: z.value
|
|
2216
|
+
} }, void 0, !0)])], 12, pn)) : x("", !0)])) : x("", !0)], 10, Qt))), 128)),
|
|
2217
|
+
A(t.$slots, "svg", { svg: {
|
|
2218
|
+
...V.value,
|
|
2219
|
+
datapoints: K.value,
|
|
2220
|
+
isPrintingImg: j(Or) || j(kr) || Jn.value,
|
|
2221
|
+
isPrintingSvg: Yn.value
|
|
2222
|
+
} }, void 0, !0)
|
|
2223
|
+
], 512)], 46, rt)), t.$slots.hint ? (D(), S("div", mn, [A(t.$slots, "hint", T(w({
|
|
2224
|
+
hint: R.value.a11y.translations.keyboardNavigation,
|
|
2225
|
+
isVisible: $n.value
|
|
2226
|
+
})), void 0, !0)])) : x("", !0)]),
|
|
2227
|
+
t.$slots.watermark ? (D(), S("div", hn, [A(t.$slots, "watermark", T(w({ isPrinting: j(Or) || j(kr) || Jn.value || Yn.value })), void 0, !0)])) : x("", !0),
|
|
2228
|
+
C("div", { id: `legend-bottom-${I.value}` }, null, 8, gn),
|
|
2229
|
+
Gn.value && (R.value.style.chart.legend.show || t.$slots.legend) ? (D(), Ne(Me, {
|
|
2230
|
+
key: 6,
|
|
2231
|
+
to: R.value.style.chart.legend.position === "top" ? `#legend-top-${I.value}` : `#legend-bottom-${I.value}`
|
|
2232
|
+
}, [C("div", {
|
|
2233
|
+
ref_key: "chartLegend",
|
|
2234
|
+
ref: Ln
|
|
2235
|
+
}, [A(t.$slots, "legend", { legend: Jr.value }, () => [R.value.style.chart.legend.show ? (D(), Ne(je, {
|
|
2236
|
+
key: `legend_${Wn.value}`,
|
|
2237
|
+
legendSet: Jr.value,
|
|
2238
|
+
config: Yr.value,
|
|
2239
|
+
onClickMarker: n[3] ||= ({ i: e }) => Hr(e),
|
|
2240
|
+
isCursorPointer: dr.value
|
|
2241
|
+
}, Pe({
|
|
2242
|
+
item: M(({ legend: e, index: t }) => [C("div", {
|
|
2243
|
+
style: E(`opacity:${W.value.includes(t) ? .5 : 1}`),
|
|
2244
|
+
onClick: (t) => e.segregate()
|
|
2245
|
+
}, Ge(e.display), 13, _n)]),
|
|
2246
|
+
legendToggle: M(() => [Jr.value.length > 2 && R.value.style.chart.legend.selectAllToggle.show && !j(pr) ? (D(), Ne(we, {
|
|
2247
|
+
key: 0,
|
|
2248
|
+
backgroundColor: R.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
2249
|
+
color: R.value.style.chart.legend.selectAllToggle.color,
|
|
2250
|
+
fontSize: R.value.style.chart.legend.fontSize,
|
|
2251
|
+
checked: W.value.length > 0,
|
|
2252
|
+
isCursorPointer: dr.value,
|
|
2253
|
+
onToggle: Vr
|
|
2254
|
+
}, null, 8, [
|
|
2255
|
+
"backgroundColor",
|
|
2256
|
+
"color",
|
|
2257
|
+
"fontSize",
|
|
2258
|
+
"checked",
|
|
2259
|
+
"isCursorPointer"
|
|
2260
|
+
])) : x("", !0)]),
|
|
2261
|
+
_: 2
|
|
2262
|
+
}, [t.$slots.pattern ? {
|
|
2263
|
+
name: "legend-pattern",
|
|
2264
|
+
fn: M(({ legend: e, index: t }) => [Ie(be, {
|
|
2265
|
+
shape: e.shape,
|
|
2266
|
+
radius: 30,
|
|
2267
|
+
stroke: "none",
|
|
2268
|
+
plot: {
|
|
2269
|
+
x: 30,
|
|
2270
|
+
y: 30
|
|
2271
|
+
},
|
|
2272
|
+
fill: `url(#pattern_${I.value}_${t})`
|
|
2273
|
+
}, null, 8, ["shape", "fill"])]),
|
|
2274
|
+
key: "0"
|
|
2275
|
+
} : void 0]), 1032, [
|
|
2276
|
+
"legendSet",
|
|
2277
|
+
"config",
|
|
2278
|
+
"isCursorPointer"
|
|
2279
|
+
])) : x("", !0)], !0)], 512)], 8, ["to"])) : x("", !0),
|
|
2280
|
+
t.$slots.source ? (D(), S("div", {
|
|
2281
|
+
key: 7,
|
|
2282
|
+
ref_key: "source",
|
|
2283
|
+
ref: Bn,
|
|
2284
|
+
dir: "auto"
|
|
2285
|
+
}, [A(t.$slots, "source", {}, void 0, !0)], 512)) : x("", !0),
|
|
2286
|
+
t.$slots.hollow ? (D(), S("div", vn, [A(t.$slots, "hollow", T(w({
|
|
2287
|
+
total: Z.value,
|
|
2288
|
+
average: ii.value,
|
|
2289
|
+
dataset: H.value,
|
|
2290
|
+
...V.value
|
|
2291
|
+
})), void 0, !0)])) : x("", !0),
|
|
2292
|
+
Ie(j(bn), {
|
|
2293
|
+
teleportTo: R.value.style.chart.tooltip.teleportTo,
|
|
2294
|
+
show: B.value.showTooltip && sr.value,
|
|
2295
|
+
backgroundColor: R.value.style.chart.tooltip.backgroundColor,
|
|
2296
|
+
color: R.value.style.chart.tooltip.color,
|
|
2297
|
+
fontSize: R.value.style.chart.tooltip.fontSize,
|
|
2298
|
+
borderRadius: R.value.style.chart.tooltip.borderRadius,
|
|
2299
|
+
borderColor: R.value.style.chart.tooltip.borderColor,
|
|
2300
|
+
borderWidth: R.value.style.chart.tooltip.borderWidth,
|
|
2301
|
+
backgroundOpacity: R.value.style.chart.tooltip.backgroundOpacity,
|
|
2302
|
+
position: R.value.style.chart.tooltip.position,
|
|
2303
|
+
offsetX: R.value.style.chart.tooltip.offsetX,
|
|
2304
|
+
offsetY: R.value.style.chart.tooltip.offsetY,
|
|
2305
|
+
parent: P.value,
|
|
2306
|
+
content: cr.value,
|
|
2307
|
+
isCustom: si.value,
|
|
2308
|
+
isFullscreen: _i.value,
|
|
2309
|
+
smooth: R.value.style.chart.tooltip.smooth,
|
|
2310
|
+
backdropFilter: R.value.style.chart.tooltip.backdropFilter,
|
|
2311
|
+
smoothForce: R.value.style.chart.tooltip.smoothForce,
|
|
2312
|
+
smoothSnapThreshold: R.value.style.chart.tooltip.smoothSnapThrehsold,
|
|
2313
|
+
isA11yMode: Qn.value === "keyboard",
|
|
2314
|
+
a11yPosition: Zn.value
|
|
2315
|
+
}, {
|
|
2316
|
+
"tooltip-before": M(() => [A(t.$slots, "tooltip-before", T(w({ ...oi.value })), void 0, !0)]),
|
|
2317
|
+
tooltip: M(() => [A(t.$slots, "tooltip", T(w({ ...oi.value })), void 0, !0)]),
|
|
2318
|
+
"tooltip-after": M(() => [A(t.$slots, "tooltip-after", T(w({ ...oi.value })), void 0, !0)]),
|
|
2319
|
+
_: 3
|
|
2320
|
+
}, 8, [
|
|
2321
|
+
"teleportTo",
|
|
2322
|
+
"show",
|
|
2323
|
+
"backgroundColor",
|
|
2324
|
+
"color",
|
|
2325
|
+
"fontSize",
|
|
2326
|
+
"borderRadius",
|
|
2327
|
+
"borderColor",
|
|
2328
|
+
"borderWidth",
|
|
2329
|
+
"backgroundOpacity",
|
|
2330
|
+
"position",
|
|
2331
|
+
"offsetX",
|
|
2332
|
+
"offsetY",
|
|
2333
|
+
"parent",
|
|
2334
|
+
"content",
|
|
2335
|
+
"isCustom",
|
|
2336
|
+
"isFullscreen",
|
|
2337
|
+
"smooth",
|
|
2338
|
+
"backdropFilter",
|
|
2339
|
+
"smoothForce",
|
|
2340
|
+
"smoothSnapThreshold",
|
|
2341
|
+
"isA11yMode",
|
|
2342
|
+
"a11yPosition"
|
|
2343
|
+
]),
|
|
2344
|
+
Mn.value && R.value.userOptions.buttons.table ? (D(), Ne(Ue(Ai.value.component), Re({ key: 9 }, Ai.value.props, {
|
|
2345
|
+
ref_key: "tableUnit",
|
|
2346
|
+
ref: Kn,
|
|
2347
|
+
onClose: ji
|
|
2348
|
+
}), Pe({
|
|
2349
|
+
content: M(() => [(D(), Ne(j(Cn), {
|
|
2350
|
+
key: `table_${Un.value}`,
|
|
2351
|
+
colNames: gi.value.colNames,
|
|
2352
|
+
head: gi.value.head,
|
|
2353
|
+
body: gi.value.body,
|
|
2354
|
+
config: gi.value.config,
|
|
2355
|
+
title: R.value.table.useDialog ? "" : Ai.value.title,
|
|
2356
|
+
withCloseButton: !R.value.table.useDialog,
|
|
2357
|
+
isCursorPointer: dr.value,
|
|
2358
|
+
onClose: ji
|
|
2359
|
+
}, {
|
|
2360
|
+
th: M(({ th: e }) => [C("div", {
|
|
2361
|
+
innerHTML: e,
|
|
2362
|
+
style: {
|
|
2363
|
+
display: "flex",
|
|
2364
|
+
"align-items": "center"
|
|
2365
|
+
}
|
|
2366
|
+
}, null, 8, yn)]),
|
|
2367
|
+
td: M(({ td: e }) => [Fe(Ge(e.name ? e.name : isNaN(Number(e)) ? e.includes("%") ? e : j(p)(R.value.style.chart.layout.labels.percentage.formatter, e, j(_)({
|
|
2368
|
+
v: e,
|
|
2369
|
+
s: "%",
|
|
2370
|
+
r: R.value.style.chart.layout.labels.percentage.rounding
|
|
2371
|
+
})) : j(p)(R.value.style.chart.layout.labels.value.formatter, e, j(_)({
|
|
2372
|
+
p: R.value.style.chart.layout.labels.dataLabels.prefix,
|
|
2373
|
+
v: e,
|
|
2374
|
+
s: R.value.style.chart.layout.labels.dataLabels.suffix,
|
|
2375
|
+
r: R.value.style.chart.layout.labels.value.rounding
|
|
2376
|
+
}))), 1)]),
|
|
2377
|
+
_: 1
|
|
2378
|
+
}, 8, [
|
|
2379
|
+
"colNames",
|
|
2380
|
+
"head",
|
|
2381
|
+
"body",
|
|
2382
|
+
"config",
|
|
2383
|
+
"title",
|
|
2384
|
+
"withCloseButton",
|
|
2385
|
+
"isCursorPointer"
|
|
2386
|
+
]))]),
|
|
2387
|
+
_: 2
|
|
2388
|
+
}, [R.value.table.useDialog ? {
|
|
2389
|
+
name: "title",
|
|
2390
|
+
fn: M(() => [Fe(Ge(Ai.value.title), 1)]),
|
|
2391
|
+
key: "0"
|
|
2392
|
+
} : void 0, R.value.table.useDialog ? {
|
|
2393
|
+
name: "actions",
|
|
2394
|
+
fn: M(() => [C("button", {
|
|
2395
|
+
tabindex: "0",
|
|
2396
|
+
class: "vue-ui-user-options-button",
|
|
2397
|
+
onClick: n[4] ||= (e) => hi(R.value.userOptions.callbacks.csv),
|
|
2398
|
+
style: E({ cursor: dr.value ? "pointer" : "default" })
|
|
2399
|
+
}, [Ie(j(xn), {
|
|
2400
|
+
name: "fileCsv",
|
|
2401
|
+
stroke: Ai.value.props.color
|
|
2402
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
2403
|
+
key: "1"
|
|
2404
|
+
} : void 0]), 1040)) : x("", !0),
|
|
2405
|
+
A(t.$slots, "skeleton", {}, () => [j(pr) ? (D(), Ne(me, { key: 0 })) : x("", !0)], !0)
|
|
2406
|
+
], 46, $e));
|
|
2407
|
+
}
|
|
2408
|
+
}, [["__scopeId", "data-v-568e9c77"]]);
|
|
2409
|
+
//#endregion
|
|
2410
|
+
export { Qe as n, bn as t };
|