vue-data-ui 3.25.5 → 3.25.6
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/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
- package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
- package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
- package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
- package/dist/{ColorPicker-Bn3MY7eL.js → ColorPicker-CUy15T72.js} +1 -1
- package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
- package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
- package/dist/{NonSvgPenAndPaper-KXRhcsxM.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
- package/dist/{PackageVersion-M2Ws-VwJ.js → PackageVersion-ur6jKRL5.js} +1 -1
- package/dist/{PenAndPaper-BgH3m_LP.js → PenAndPaper-KFzKlvbi.js} +2 -2
- package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
- package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.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-hill.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-label.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/{package-ta2JoIjx.js → package-Dx7M6sYy.js} +1 -1
- package/dist/{render-common-bvOuxfN3.js → render-common-DETHvNhl.js} +1 -1
- 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 +10 -0
- package/dist/{useConfig-C_mX5pOZ.js → useConfig-CIQZ6_r7.js} +11 -1
- package/dist/{useObjectBindings-uXpBcVyo.js → useObjectBindings---mHNfbS.js} +2 -2
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-BjdCpsRV.js → vue-data-ui-Dh3_EsHb.js} +70 -70
- package/dist/vue-data-ui.js +71 -71
- package/dist/vue-ui-3d-bar-i1REAKnM.js +1831 -0
- package/dist/{vue-ui-accordion-DRf3NQyH.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
- package/dist/vue-ui-age-pyramid-DuHblCNO.js +1293 -0
- package/dist/{vue-ui-annotator-DZ0O8Xa5.js → vue-ui-annotator-CTQHAPho.js} +676 -676
- package/dist/vue-ui-bullet-CYLnKrmM.js +702 -0
- package/dist/{vue-ui-bump-DoHnD1Xy.js → vue-ui-bump-DhwySwgn.js} +380 -380
- package/dist/vue-ui-candlestick-BpiECaDj.js +1859 -0
- package/dist/{vue-ui-carousel-table-k1cBJ1i1.js → vue-ui-carousel-table-D-T2yA7-.js} +2 -2
- package/dist/vue-ui-chestnut-1MsZ9Q3r.js +2016 -0
- package/dist/vue-ui-chord-QBQUSe7r.js +1347 -0
- package/dist/vue-ui-circle-pack-ZWEwtesD.js +1635 -0
- package/dist/{vue-ui-cursor-CQWLyEx0.js → vue-ui-cursor-CHQcHAHQ.js} +2 -2
- package/dist/{vue-ui-dag-BqlsutMj.js → vue-ui-dag-C_inEafb.js} +792 -792
- package/dist/{vue-ui-dashboard-Be3MmkgS.js → vue-ui-dashboard-Bs2mBur5.js} +67 -67
- package/dist/{vue-ui-digits-BqdfbcKX.js → vue-ui-digits-DwE4MoXI.js} +2 -2
- package/dist/vue-ui-donut-BM9dMHXj.js +2415 -0
- package/dist/{vue-ui-donut-gzGZ42uH.js → vue-ui-donut-CbOSJmRu.js} +2 -2
- package/dist/vue-ui-donut-evolution-C97_RHus.js +1552 -0
- package/dist/vue-ui-dumbbell-DwKa5EL5.js +1533 -0
- package/dist/vue-ui-flow-DTTr3YL9.js +1217 -0
- package/dist/vue-ui-funnel-C4pkBk3D.js +749 -0
- package/dist/vue-ui-galaxy-CuAPLOvX.js +1085 -0
- package/dist/vue-ui-gauge-DLDULH26.js +934 -0
- package/dist/{vue-ui-geo-Ca8kPYr-.js → vue-ui-geo-DXIHhp-G.js} +429 -429
- package/dist/{vue-ui-gizmo-wUqHJICb.js → vue-ui-gizmo-PuURiePo.js} +2 -2
- package/dist/vue-ui-heatmap-mvWLKB99.js +1555 -0
- package/dist/{vue-ui-hill-D6Y9Xy2K.js → vue-ui-hill-DqsVJkmO.js} +470 -470
- package/dist/vue-ui-history-plot-BBVLgt9_.js +1698 -0
- package/dist/{vue-ui-horizontal-bar-3on3-H3B.js → vue-ui-horizontal-bar-y8Q8PZwT.js} +511 -511
- package/dist/{vue-ui-kpi-CUpRRIUf.js → vue-ui-kpi-B2hf3kpp.js} +2 -2
- package/dist/{vue-ui-label-DR2qUZOG.js → vue-ui-label-ClMQ5Gez.js} +1 -1
- package/dist/{vue-ui-mini-loader-D8W-fERs.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
- package/dist/vue-ui-molecule-eeW1Pmg8.js +929 -0
- package/dist/{vue-ui-mood-radar-TW251icr.js → vue-ui-mood-radar-Dd1qfUiu.js} +376 -376
- package/dist/vue-ui-nested-donuts-CUARCr6O.js +1503 -0
- package/dist/vue-ui-onion-NoxHP0cG.js +1235 -0
- package/dist/{vue-ui-parallel-coordinate-plot-RM25bxtf.js → vue-ui-parallel-coordinate-plot-Cp3pCyxK.js} +407 -407
- package/dist/vue-ui-quadrant-C3kQtaeX.js +1967 -0
- package/dist/{vue-ui-quick-chart-Cswm3_eI.js → vue-ui-quick-chart-BZq517pL.js} +4 -4
- package/dist/vue-ui-radar-DvNrl4uD.js +1374 -0
- package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
- package/dist/vue-ui-relation-circle-1iS6C0xx.js +905 -0
- package/dist/vue-ui-ridgeline-B-EZiPCF.js +1630 -0
- package/dist/vue-ui-rings-BXuwrHos.js +1252 -0
- package/dist/vue-ui-scatter-ByL-ZZ3B.js +2405 -0
- package/dist/{vue-ui-skeleton-D_u8EWeW.js → vue-ui-skeleton-BcU1onF6.js} +698 -698
- package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
- package/dist/vue-ui-spark-trend-DjS31avb.js +457 -0
- package/dist/vue-ui-sparkbar-1Al_TLw1.js +401 -0
- package/dist/vue-ui-sparkgauge-CwLo53Y8.js +268 -0
- package/dist/vue-ui-sparkhistogram-CGw6SThG.js +589 -0
- package/dist/{vue-ui-sparkline-9qkNNZG6.js → vue-ui-sparkline-CSZGBFfI.js} +511 -511
- package/dist/vue-ui-sparkstackbar-B8dloLMp.js +738 -0
- package/dist/vue-ui-stackbar-FvNd77t1.js +2355 -0
- package/dist/vue-ui-stackline-CP7PkqiG.js +2469 -0
- package/dist/vue-ui-strip-plot-DSMlDkv1.js +1740 -0
- package/dist/{vue-ui-table-heatmap-XmDK1aHJ.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
- package/dist/vue-ui-table-rwKtnJKt.js +1352 -0
- package/dist/vue-ui-table-sparkline-B6wyEAyC.js +738 -0
- package/dist/{vue-ui-thermometer-CLx3SPRv.js → vue-ui-thermometer-D0_KsB-y.js} +192 -192
- package/dist/{vue-ui-timer-BDWUNb6t.js → vue-ui-timer-1Z2zginj.js} +153 -153
- package/dist/vue-ui-tiremarks-zbl7aooy.js +540 -0
- package/dist/vue-ui-treemap-Drs4gK6L.js +1733 -0
- package/dist/vue-ui-waffle-DqUVsVNE.js +1621 -0
- package/dist/vue-ui-wheel-DLCBPW9t.js +873 -0
- package/dist/vue-ui-word-cloud-8Agk9h6c.js +1710 -0
- package/dist/{vue-ui-world-C2atz4Xm.js → vue-ui-world-BOBHo7-L.js} +524 -524
- package/dist/vue-ui-xy-CSTJzRkk.js +5283 -0
- package/dist/{vue-ui-xy-CpA0W6zM.js → vue-ui-xy-Dmk1gQkI.js} +2 -2
- package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
- package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-C0aLR6lw.js +0 -1831
- package/dist/vue-ui-age-pyramid-DUcB3lYs.js +0 -1243
- package/dist/vue-ui-bullet-DIOCMF2H.js +0 -702
- package/dist/vue-ui-candlestick-Cf8TYPl5.js +0 -1859
- package/dist/vue-ui-chestnut-BMAuaeif.js +0 -2016
- package/dist/vue-ui-chord-DCe2iPjk.js +0 -1347
- package/dist/vue-ui-circle-pack-Eb5hS_z3.js +0 -1635
- package/dist/vue-ui-donut-CuQVKuZa.js +0 -2415
- package/dist/vue-ui-donut-evolution-DckruxZ9.js +0 -1552
- package/dist/vue-ui-dumbbell-BYU-hh2E.js +0 -1531
- package/dist/vue-ui-flow-DLRcNDLc.js +0 -1217
- package/dist/vue-ui-funnel-DjoqNN1U.js +0 -749
- package/dist/vue-ui-galaxy-BhR4IOra.js +0 -1085
- package/dist/vue-ui-gauge-Cq161Kwp.js +0 -934
- package/dist/vue-ui-heatmap-Bl5ymvi9.js +0 -1555
- package/dist/vue-ui-history-plot-CvVjsdCL.js +0 -1698
- package/dist/vue-ui-molecule-BExVLLgE.js +0 -929
- package/dist/vue-ui-nested-donuts-CWzJKr3S.js +0 -1503
- package/dist/vue-ui-onion-VaYZQK5i.js +0 -1235
- package/dist/vue-ui-quadrant-Dmtwow7n.js +0 -1967
- package/dist/vue-ui-radar-C3GYthqu.js +0 -1374
- package/dist/vue-ui-rating-CBdDXL80.js +0 -359
- package/dist/vue-ui-relation-circle-BA0qy0kp.js +0 -905
- package/dist/vue-ui-ridgeline-C5skjBTe.js +0 -1630
- package/dist/vue-ui-rings-BJ8yEQMw.js +0 -1252
- package/dist/vue-ui-scatter-DXg8ESgr.js +0 -2405
- package/dist/vue-ui-smiley-DQOp87rr.js +0 -376
- package/dist/vue-ui-spark-trend-CjCufXof.js +0 -457
- package/dist/vue-ui-sparkbar-BniEM15a.js +0 -401
- package/dist/vue-ui-sparkgauge-BtyCrqTQ.js +0 -268
- package/dist/vue-ui-sparkhistogram-DQdn3PW1.js +0 -589
- package/dist/vue-ui-sparkstackbar-BXQlOdOk.js +0 -738
- package/dist/vue-ui-stackbar-CkjicNDv.js +0 -2355
- package/dist/vue-ui-stackline-BB1IZta8.js +0 -2469
- package/dist/vue-ui-strip-plot-DGLGuH6e.js +0 -1740
- package/dist/vue-ui-table-BXz_HY2g.js +0 -1352
- package/dist/vue-ui-table-sparkline-MTEw3imE.js +0 -738
- package/dist/vue-ui-tiremarks-DoaypTC-.js +0 -540
- package/dist/vue-ui-treemap-Bv7PgpiC.js +0 -1733
- package/dist/vue-ui-waffle-z2DhvSAx.js +0 -1621
- package/dist/vue-ui-wheel-DYLBJuFb.js +0 -873
- package/dist/vue-ui-word-cloud-CbpEhSdL.js +0 -1710
- package/dist/vue-ui-xy-B3DQ6t46.js +0 -5283
- package/dist/vue-ui-xy-canvas-CJefORWc.js +0 -1824
|
@@ -0,0 +1,1503 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Ct as n, D as r, Lt as i, Mt as a, Pt as o, Rt as s, S as ee, Ut as c, Vt as l, X as u, Yt as te, Zt as ne, b as re, f as ie, i as ae, lt as oe, n as se, nt as ce, p as le, q as ue, t as de, tt as fe, w as pe } from "./lib-Dql7cqyA.js";
|
|
3
|
+
import { n as me, t as he } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as ge } from "./useConfig-CIQZ6_r7.js";
|
|
5
|
+
import { t as _e } from "./usePrinter-DISD7q5m.js";
|
|
6
|
+
import { n as ve, t as ye } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
+
import { t as be } from "./useNestedProp-Chvyfpl-.js";
|
|
8
|
+
import { t as xe } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as Se } from "./useChartExport-iwOqiIWX.js";
|
|
10
|
+
import { t as Ce } from "./img-DhGApYG0.js";
|
|
11
|
+
import { n as we } from "./Title-CPHi-evi.js";
|
|
12
|
+
import { t as Te } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
|
+
import { l as Ee, t as De } from "./useResponsive-ZtArZtUf.js";
|
|
14
|
+
import { t as Oe } from "./DefGrad-DVBqDjhO.js";
|
|
15
|
+
import { t as ke } from "./BaseLegendToggle-CXQrLjd-.js";
|
|
16
|
+
import { t as Ae } from "./A11yDataTable-DdRsVULz.js";
|
|
17
|
+
import { t as je } from "./useUserOptionState-DK-_1ddE.js";
|
|
18
|
+
import { t as Me } from "./useChartAccessibility-DYqac8yF.js";
|
|
19
|
+
import { t as Ne } from "./labelUtils-BXX2NzRe.js";
|
|
20
|
+
import { t as Pe } from "./Legend-X4kF4PvW.js";
|
|
21
|
+
import { t as Fe } from "./vue_ui_nested_donuts-B8csIoVO.js";
|
|
22
|
+
import { Fragment as d, Teleport as Ie, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as Le, createTextVNode as Re, createVNode as ze, defineAsyncComponent as _, guardReactiveProps as v, mergeProps as Be, nextTick as Ve, normalizeClass as He, normalizeProps as y, normalizeStyle as Ue, onBeforeUnmount as We, onMounted as Ge, openBlock as b, ref as x, renderList as S, renderSlot as C, resolveDynamicComponent as Ke, shallowRef as qe, toDisplayString as w, toRefs as Je, unref as T, vShow as Ye, watch as Xe, withCtx as E, withDirectives as Ze } from "vue";
|
|
23
|
+
//#region src/components/vue-ui-nested-donuts.vue
|
|
24
|
+
var Qe = /* @__PURE__ */ e({ default: () => kt }), $e = ["id"], et = ["id"], tt = ["id"], nt = { style: { position: "relative" } }, rt = [
|
|
25
|
+
"xmlns",
|
|
26
|
+
"aria-describedby",
|
|
27
|
+
"viewBox"
|
|
28
|
+
], it = ["width", "height"], at = ["id"], ot = ["id"], st = ["id"], ct = ["flood-color"], lt = ["id", "d"], ut = [
|
|
29
|
+
"d",
|
|
30
|
+
"fill",
|
|
31
|
+
"stroke",
|
|
32
|
+
"stroke-width",
|
|
33
|
+
"filter"
|
|
34
|
+
], dt = [
|
|
35
|
+
"d",
|
|
36
|
+
"fill",
|
|
37
|
+
"stroke",
|
|
38
|
+
"stroke-width"
|
|
39
|
+
], ft = { key: 1 }, pt = ["d", "fill"], mt = { key: 2 }, ht = [
|
|
40
|
+
"font-size",
|
|
41
|
+
"font-weight",
|
|
42
|
+
"fill",
|
|
43
|
+
"dy"
|
|
44
|
+
], gt = ["href"], _t = [
|
|
45
|
+
"x",
|
|
46
|
+
"y",
|
|
47
|
+
"font-size",
|
|
48
|
+
"font-weight",
|
|
49
|
+
"fill"
|
|
50
|
+
], vt = { key: 3 }, yt = ["filter"], bt = [
|
|
51
|
+
"opacity",
|
|
52
|
+
"text-anchor",
|
|
53
|
+
"x",
|
|
54
|
+
"y",
|
|
55
|
+
"fill",
|
|
56
|
+
"font-size",
|
|
57
|
+
"font-weight"
|
|
58
|
+
], xt = [
|
|
59
|
+
"opacity",
|
|
60
|
+
"text-anchor",
|
|
61
|
+
"x",
|
|
62
|
+
"y",
|
|
63
|
+
"fill",
|
|
64
|
+
"font-size",
|
|
65
|
+
"font-weight"
|
|
66
|
+
], St = [
|
|
67
|
+
"d",
|
|
68
|
+
"fill",
|
|
69
|
+
"onMouseenter",
|
|
70
|
+
"onClick",
|
|
71
|
+
"onMouseleave"
|
|
72
|
+
], Ct = {
|
|
73
|
+
key: 0,
|
|
74
|
+
style: {
|
|
75
|
+
position: "absolute",
|
|
76
|
+
top: "100%",
|
|
77
|
+
left: "0",
|
|
78
|
+
width: "100%"
|
|
79
|
+
},
|
|
80
|
+
"data-dom-to-png-ignore": "",
|
|
81
|
+
"aria-hidden": "true"
|
|
82
|
+
}, wt = {
|
|
83
|
+
key: 5,
|
|
84
|
+
class: "vue-data-ui-watermark"
|
|
85
|
+
}, Tt = ["id"], Et = {
|
|
86
|
+
key: 0,
|
|
87
|
+
class: "vue-ui-nested-donuts-legend-title"
|
|
88
|
+
}, Dt = ["onClick"], Ot = { style: {
|
|
89
|
+
display: "flex",
|
|
90
|
+
"align-items": "center"
|
|
91
|
+
} }, kt = /*#__PURE__*/ Te({
|
|
92
|
+
__name: "vue-ui-nested-donuts",
|
|
93
|
+
props: {
|
|
94
|
+
config: {
|
|
95
|
+
type: Object,
|
|
96
|
+
default() {
|
|
97
|
+
return {};
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
dataset: {
|
|
101
|
+
type: Array,
|
|
102
|
+
default() {
|
|
103
|
+
return [];
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
emits: [
|
|
108
|
+
"selectLegend",
|
|
109
|
+
"selectDatapoint",
|
|
110
|
+
"copyAlt"
|
|
111
|
+
],
|
|
112
|
+
setup(e, { expose: Te, emit: Qe }) {
|
|
113
|
+
let kt = _(() => import("./Tooltip-hhrkQ3Lk.js")), At = _(() => import("./BaseIcon-D8R6_sKH.js").then((e) => e.n)), jt = _(() => import("./vue-ui-accordion-BSmBUjwZ.js").then((e) => e.n)), Mt = _(() => import("./DataTable-oiM9uWrQ.js")), Nt = _(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), Pt = _(() => import("./PenAndPaper-KFzKlvbi.js").then((e) => e.t)), Ft = _(() => import("./PackageVersion-ur6jKRL5.js").then((e) => e.t)), It = _(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), { vue_ui_nested_donuts: Lt } = ge(), { isThemeValid: Rt, warnInvalidTheme: zt } = xe(), D = e, Bt = f({
|
|
114
|
+
get() {
|
|
115
|
+
return !!D.dataset && D.dataset.length;
|
|
116
|
+
},
|
|
117
|
+
set(e) {
|
|
118
|
+
return e;
|
|
119
|
+
}
|
|
120
|
+
}), O = x(ue()), Vt = x(!1), Ht = x(""), Ut = x(null), Wt = x(0), k = x(null), Gt = x(null), Kt = x(null), qt = x(null), Jt = x(null), Yt = x(0), Xt = x(0), Zt = x(0), A = x(!0), j = x([]), Qt = x([]), $t = x(!1), en = x(null), tn = x(null), M = x(null), nn = x({
|
|
121
|
+
x: 0,
|
|
122
|
+
y: 0
|
|
123
|
+
}), rn = x("pointer"), an = x(!1), N = x(!1);
|
|
124
|
+
function on(e) {
|
|
125
|
+
N.value = e, Wt.value += 1;
|
|
126
|
+
}
|
|
127
|
+
let P = x(mn()), F = f(() => P.value.style.chart.layout.labels), I = f(() => P.value.style.chart.tooltip), L = f(() => P.value.userOptions), R = f(() => P.value.style.chart.layout), z = f(() => P.value.style.chart);
|
|
128
|
+
me({
|
|
129
|
+
config: () => P.value,
|
|
130
|
+
dataset: () => D.dataset,
|
|
131
|
+
component: "VueUiNestedDonuts",
|
|
132
|
+
rules: [
|
|
133
|
+
he.emptyArray,
|
|
134
|
+
{
|
|
135
|
+
test: (e) => e.some((e) => e.series.length > 6),
|
|
136
|
+
message: [
|
|
137
|
+
"👀 Some series have > 6 data points. Consider:",
|
|
138
|
+
"",
|
|
139
|
+
"▶️ Grouping small values dynamically into a single \"Other\" data point.",
|
|
140
|
+
"",
|
|
141
|
+
"▶️ Using filters to let users choose a maximum number of data points to display.",
|
|
142
|
+
"",
|
|
143
|
+
"▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
test: (e) => e.length === 1,
|
|
148
|
+
message: [
|
|
149
|
+
"👀 There is only one series in your dataset. Consider:",
|
|
150
|
+
"",
|
|
151
|
+
"▶️ Using VueUiDonut instead."
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
test: (e) => e.length > 6,
|
|
156
|
+
message: [
|
|
157
|
+
"👀 The number of series in your dataset > 6. Consider:",
|
|
158
|
+
"",
|
|
159
|
+
"▶️ Using filters to let users choose a maximum number of series to display",
|
|
160
|
+
"",
|
|
161
|
+
"▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
});
|
|
166
|
+
let B = f(() => P.value.userOptions.useCursorPointer), sn = {
|
|
167
|
+
name: "",
|
|
168
|
+
series: [
|
|
169
|
+
{
|
|
170
|
+
name: "",
|
|
171
|
+
values: [3],
|
|
172
|
+
color: "#BABABA"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "",
|
|
176
|
+
values: [2],
|
|
177
|
+
color: "#AAAAAA"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "",
|
|
181
|
+
values: [1],
|
|
182
|
+
color: "#CACACA"
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}, cn = f(() => ne({
|
|
186
|
+
defaultConfig: {
|
|
187
|
+
useCssAnimation: !1,
|
|
188
|
+
table: { show: !1 },
|
|
189
|
+
startAnimation: { show: !1 },
|
|
190
|
+
userOptions: { show: !1 },
|
|
191
|
+
style: { chart: {
|
|
192
|
+
backgroundColor: "#99999930",
|
|
193
|
+
layout: { labels: { dataLabels: { show: !1 } } },
|
|
194
|
+
legend: {
|
|
195
|
+
backgroundColor: "transparent",
|
|
196
|
+
showValue: !1,
|
|
197
|
+
showPercentage: !1
|
|
198
|
+
},
|
|
199
|
+
title: {
|
|
200
|
+
color: "#1A1A1A",
|
|
201
|
+
subtitle: { color: "#5A5A5A" }
|
|
202
|
+
}
|
|
203
|
+
} }
|
|
204
|
+
},
|
|
205
|
+
userConfig: P.value.skeletonConfig ?? {}
|
|
206
|
+
})), { loading: ln, FINAL_DATASET: V, manualLoading: un } = ve({
|
|
207
|
+
...Je(D),
|
|
208
|
+
FINAL_CONFIG: P,
|
|
209
|
+
prepareConfig: mn,
|
|
210
|
+
callback: () => {
|
|
211
|
+
Promise.resolve().then(async () => {
|
|
212
|
+
await _n();
|
|
213
|
+
});
|
|
214
|
+
},
|
|
215
|
+
skeletonDataset: D.config?.skeletonDataset ?? [sn, sn],
|
|
216
|
+
skeletonConfig: ne({
|
|
217
|
+
defaultConfig: P.value,
|
|
218
|
+
userConfig: cn.value
|
|
219
|
+
})
|
|
220
|
+
}), { userOptionsVisible: dn, setUserOptionsVisibility: fn, keepUserOptionState: pn } = je({ config: P.value }), { svgRef: H } = Me({ config: z.value.title });
|
|
221
|
+
function mn() {
|
|
222
|
+
let e = be({
|
|
223
|
+
userConfig: D.config,
|
|
224
|
+
defaultConfig: Lt
|
|
225
|
+
}), t = {}, n = e.theme;
|
|
226
|
+
if (n) {
|
|
227
|
+
if (!Rt.value(e)) zt(e), t = e;
|
|
228
|
+
else {
|
|
229
|
+
let r = be({
|
|
230
|
+
userConfig: Fe[n] || D.config,
|
|
231
|
+
defaultConfig: e
|
|
232
|
+
});
|
|
233
|
+
t = {
|
|
234
|
+
...be({
|
|
235
|
+
userConfig: D.config,
|
|
236
|
+
defaultConfig: r
|
|
237
|
+
}),
|
|
238
|
+
customPalette: e.customPalette.length ? e.customPalette : te[n] || i
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
} else t = e;
|
|
242
|
+
return t;
|
|
243
|
+
}
|
|
244
|
+
Xe(() => D.config, (e) => {
|
|
245
|
+
ln.value || (P.value = mn()), dn.value = !P.value.userOptions.showOnChartHover, yn(), Yt.value += 1, Xt.value += 1, Zt.value += 1, G.value.dataLabels.show = F.value.dataLabels.show, G.value.showTable = P.value.table.show, G.value.showTooltip = I.value.show, K.value.width = z.value.width, K.value.height = z.value.height;
|
|
246
|
+
}, { deep: !0 });
|
|
247
|
+
let hn = f(() => {
|
|
248
|
+
let { top: e, right: t, bottom: n, left: r } = z.value.padding;
|
|
249
|
+
return {
|
|
250
|
+
css: `padding:${e}px ${t}px ${n}px ${r}px`,
|
|
251
|
+
top: e,
|
|
252
|
+
right: t,
|
|
253
|
+
bottom: n,
|
|
254
|
+
left: r
|
|
255
|
+
};
|
|
256
|
+
});
|
|
257
|
+
function gn(e, t = 1e3, n = 50) {
|
|
258
|
+
return new Promise((r) => {
|
|
259
|
+
let i = e.length;
|
|
260
|
+
j.value = Array(i).fill(0), Qt.value = [];
|
|
261
|
+
let a = 0;
|
|
262
|
+
e.forEach((e, o) => {
|
|
263
|
+
setTimeout(() => {
|
|
264
|
+
let n = performance.now();
|
|
265
|
+
function s(ee) {
|
|
266
|
+
let c = Math.min((ee - n) / t, 1), u = e * fe(c);
|
|
267
|
+
j.value[o] = u, j.value = [...j.value];
|
|
268
|
+
let te = [], ne = 0;
|
|
269
|
+
D.dataset.forEach((e, t) => {
|
|
270
|
+
let n = re(e.series.reduce((e, t) => e + re(l(t.values).reduce((e, t) => e + t, 0)), 0)) - re(j.value.slice(ne, ne + e.series.length).reduce((e, t) => e + t, 0));
|
|
271
|
+
n > Number.MIN_VALUE && te.push({
|
|
272
|
+
name: "__ghost__",
|
|
273
|
+
arcOf: e.name,
|
|
274
|
+
arcOfId: `${O.value}_${t}`,
|
|
275
|
+
id: `ghost_${O.value}_${t}`,
|
|
276
|
+
seriesIndex: -1,
|
|
277
|
+
datasetIndex: t,
|
|
278
|
+
color: "transparent",
|
|
279
|
+
value: n,
|
|
280
|
+
fullValue: n,
|
|
281
|
+
absoluteValues: [],
|
|
282
|
+
ghost: !0
|
|
283
|
+
}), ne += e.series.length;
|
|
284
|
+
}), Qt.value = te, c < 1 ? requestAnimationFrame(s) : (a += 1, a === i && r());
|
|
285
|
+
}
|
|
286
|
+
requestAnimationFrame(s);
|
|
287
|
+
}, o * n);
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
async function _n() {
|
|
292
|
+
if (P.value.startAnimation?.show) {
|
|
293
|
+
let e = V.value.flatMap((e) => e.series).map((e) => l(e.values).reduce((e, t) => e + t, 0));
|
|
294
|
+
j.value = e.map(() => 0), A.value = !0, Qt.value = V.value.map((e, t) => {
|
|
295
|
+
let n = e.series.reduce((e, t) => e + l(t.values).reduce((e, t) => e + t, 0), 0);
|
|
296
|
+
return {
|
|
297
|
+
name: "__ghost__",
|
|
298
|
+
arcOf: e.name,
|
|
299
|
+
arcOfId: `${O.value}_${t}`,
|
|
300
|
+
id: `ghost_${O.value}_${t}`,
|
|
301
|
+
seriesIndex: -1,
|
|
302
|
+
datasetIndex: t,
|
|
303
|
+
color: "transparent",
|
|
304
|
+
value: n,
|
|
305
|
+
fullValue: n,
|
|
306
|
+
absoluteValues: [],
|
|
307
|
+
ghost: !0
|
|
308
|
+
};
|
|
309
|
+
}), await Ve(), gn(e, P.value.startAnimation.durationMs, P.value.startAnimation.staggerMs).then(() => {
|
|
310
|
+
A.value = !1, Qt.value = [];
|
|
311
|
+
});
|
|
312
|
+
} else A.value = !1;
|
|
313
|
+
}
|
|
314
|
+
Ge(async () => {
|
|
315
|
+
$t.value = !0, yn(), await _n();
|
|
316
|
+
});
|
|
317
|
+
let U = qe(null), vn = qe(null), W = f(() => P.value.debug);
|
|
318
|
+
function yn() {
|
|
319
|
+
if (o(D.dataset) ? (ce({
|
|
320
|
+
componentName: "VueUiNestedDonuts",
|
|
321
|
+
type: "dataset",
|
|
322
|
+
debug: W.value
|
|
323
|
+
}), Bt.value = !1, un.value = !0) : un.value = P.value.loading, P.value.responsive) {
|
|
324
|
+
let e = Ee(() => {
|
|
325
|
+
let { width: e, height: t } = De({
|
|
326
|
+
chart: k.value,
|
|
327
|
+
title: z.value.title.text ? Gt.value : null,
|
|
328
|
+
legend: z.value.legend.show ? Kt.value : null,
|
|
329
|
+
source: qt.value,
|
|
330
|
+
noTitle: Jt.value,
|
|
331
|
+
padding: hn.value
|
|
332
|
+
});
|
|
333
|
+
requestAnimationFrame(() => {
|
|
334
|
+
K.value.width = e, K.value.height = t;
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
U.value && (vn.value && U.value.unobserve(vn.value), U.value.disconnect()), U.value = new ResizeObserver(e), vn.value = k.value.parentNode, U.value.observe(vn.value);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
We(() => {
|
|
341
|
+
U.value && (vn.value && U.value.unobserve(vn.value), U.value.disconnect());
|
|
342
|
+
});
|
|
343
|
+
let { isPrinting: bn, isImaging: xn, generatePdf: Sn, generateImage: Cn } = _e({
|
|
344
|
+
elementId: `nested_donuts_${O.value}`,
|
|
345
|
+
fileName: z.value.title.text || "vue-ui-nested-donuts",
|
|
346
|
+
options: P.value.userOptions.print
|
|
347
|
+
}), wn = f(() => P.value.userOptions.show && !z.value.title.text), Tn = f(() => pe(P.value.customPalette)), G = x({
|
|
348
|
+
dataLabels: { show: F.value.dataLabels.show },
|
|
349
|
+
showTable: P.value.table.show,
|
|
350
|
+
showTooltip: I.value.show
|
|
351
|
+
});
|
|
352
|
+
Xe(P, () => {
|
|
353
|
+
G.value = {
|
|
354
|
+
dataLabels: { show: F.value.dataLabels.show },
|
|
355
|
+
showTable: P.value.table.show,
|
|
356
|
+
showTooltip: I.value.show
|
|
357
|
+
};
|
|
358
|
+
}, { immediate: !0 });
|
|
359
|
+
let K = x({
|
|
360
|
+
width: z.value.width,
|
|
361
|
+
height: z.value.height
|
|
362
|
+
}), q = Qe;
|
|
363
|
+
function En({ datapoint: e, index: t, seriesIndex: n }) {
|
|
364
|
+
P.value.events.datapointClick && P.value.events.datapointClick({
|
|
365
|
+
datapoint: e,
|
|
366
|
+
seriesIndex: n
|
|
367
|
+
}), q("selectDatapoint", {
|
|
368
|
+
datapoint: e,
|
|
369
|
+
index: t
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
function Dn({ from: e, to: t, duration: n, onUpdate: r, onDone: i, easing: a = fe }) {
|
|
373
|
+
let o = performance.now();
|
|
374
|
+
function s(ee) {
|
|
375
|
+
let c = Math.min((ee - o) / n, 1), l = a(c);
|
|
376
|
+
r(e + (t - e) * l, c), c < 1 ? requestAnimationFrame(s) : (r(t, 1), i && i());
|
|
377
|
+
}
|
|
378
|
+
requestAnimationFrame(s);
|
|
379
|
+
}
|
|
380
|
+
let J = x([]), Y = f(() => {
|
|
381
|
+
ln.value, V.value.forEach((e, t) => {
|
|
382
|
+
[null, void 0].includes(e.name) && ce({
|
|
383
|
+
componentName: "VueUiNestedDonuts",
|
|
384
|
+
type: "datasetSerieAttribute",
|
|
385
|
+
property: "name",
|
|
386
|
+
index: t,
|
|
387
|
+
debug: W.value
|
|
388
|
+
}), [null, void 0].includes(e.series) ? ce({
|
|
389
|
+
componentName: "VueUiNestedDonuts",
|
|
390
|
+
type: "datasetSerieAttribute",
|
|
391
|
+
property: "series",
|
|
392
|
+
index: t,
|
|
393
|
+
debug: W.value
|
|
394
|
+
}) : e.series.length === 0 ? ce({
|
|
395
|
+
componentName: "VueUiNestedDonuts",
|
|
396
|
+
type: "datasetAttributeEmpty",
|
|
397
|
+
property: `series at index ${t}`,
|
|
398
|
+
debug: W.value
|
|
399
|
+
}) : e.series.forEach((e, t) => {
|
|
400
|
+
[null, void 0].includes(e.name) && ce({
|
|
401
|
+
componentName: "VueUiNestedDonuts",
|
|
402
|
+
type: "datasetSerieAttribute",
|
|
403
|
+
property: "name",
|
|
404
|
+
index: t,
|
|
405
|
+
key: "serie",
|
|
406
|
+
debug: W.value
|
|
407
|
+
}), [null, void 0].includes(e.values) && ce({
|
|
408
|
+
componentName: "VueUiNestedDonuts",
|
|
409
|
+
type: "datasetSerieAttribute",
|
|
410
|
+
property: "values",
|
|
411
|
+
index: t,
|
|
412
|
+
key: "serie",
|
|
413
|
+
debug: W.value
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
});
|
|
417
|
+
let e = 0;
|
|
418
|
+
return V.value.map((t, n) => ({
|
|
419
|
+
...t,
|
|
420
|
+
total: t.series.filter((e) => !J.value.includes(e.id)).map((e) => l(e.values).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0),
|
|
421
|
+
datasetIndex: n,
|
|
422
|
+
id: `${O.value}_${n}`,
|
|
423
|
+
series: t.series.map((r, a) => {
|
|
424
|
+
let o = l(r.values).reduce((e, t) => e + t, 0);
|
|
425
|
+
return {
|
|
426
|
+
name: r.name,
|
|
427
|
+
arcOf: t.name,
|
|
428
|
+
arcOfId: `${O.value}_${n}`,
|
|
429
|
+
id: `${O.value}_${n}_${a}`,
|
|
430
|
+
seriesIndex: a,
|
|
431
|
+
datasetIndex: n,
|
|
432
|
+
color: ee(r.color) || Tn.value[a] || i[a % i.length],
|
|
433
|
+
value: A.value ? j.value[e++] ?? 0 : o,
|
|
434
|
+
absoluteValues: r.values || []
|
|
435
|
+
};
|
|
436
|
+
})
|
|
437
|
+
}));
|
|
438
|
+
});
|
|
439
|
+
Xe(() => D.dataset, (e) => {
|
|
440
|
+
Array.isArray(e) && e.length > 0 && (un.value = !1);
|
|
441
|
+
}, { immediate: !0 });
|
|
442
|
+
let X = f(() => Math.min(K.value.height, K.value.width) * (R.value.donut.strokeWidth / 512)), On = f(() => [...Y.value].map((e, t) => {
|
|
443
|
+
let n = e.series.filter((e) => !J.value.includes(e.id)).map((e) => e.value).reduce((e, t) => e + t, 0);
|
|
444
|
+
return {
|
|
445
|
+
...e,
|
|
446
|
+
total: n,
|
|
447
|
+
series: e.series.filter((e) => !J.value.includes(e.id)).map((e) => ({
|
|
448
|
+
...e,
|
|
449
|
+
proportion: e.value / n
|
|
450
|
+
}))
|
|
451
|
+
};
|
|
452
|
+
}));
|
|
453
|
+
function kn(e, t, n) {
|
|
454
|
+
let r = 0;
|
|
455
|
+
for (let t = 0; t < e.length; t += 1) n.includes(e[t]) && (r += 1);
|
|
456
|
+
return r < t;
|
|
457
|
+
}
|
|
458
|
+
let Z = x(On.value);
|
|
459
|
+
Xe(() => On.value, (e) => Z.value = e);
|
|
460
|
+
function An(e) {
|
|
461
|
+
let t = e.map((e) => e.id);
|
|
462
|
+
if (e.some((e) => J.value.includes(e.id))) {
|
|
463
|
+
let e = new Set(t);
|
|
464
|
+
J.value = J.value.filter((t) => !e.has(t));
|
|
465
|
+
} else J.value.push(...t);
|
|
466
|
+
q("selectLegend", On.value);
|
|
467
|
+
}
|
|
468
|
+
function jn(e) {
|
|
469
|
+
let t = D.dataset.flatMap((e, t) => e.series.map((e, n) => ({
|
|
470
|
+
value: l(e.values).reduce((e, t) => e + t, 0),
|
|
471
|
+
id: `${O.value}_${t}_${n}`,
|
|
472
|
+
arcOfId: `${O.value}_${t}`
|
|
473
|
+
}))).find((t) => t.id === e.id);
|
|
474
|
+
if (!t) return;
|
|
475
|
+
let n = Y.value.flatMap((e) => e.series).find((t) => t.id === e.id)?.value ?? 0, r = Z.value.flatMap((e) => e.series).find((t) => t.id === e.id), i = r ? r.value : 0, a = Y.value.find((e) => e.id === t.arcOfId);
|
|
476
|
+
if (!a) return;
|
|
477
|
+
let o = a.series.map((e) => e.id), s = kn(o, o.length - 1, J.value);
|
|
478
|
+
J.value.includes(e.id) ? (J.value = J.value.filter((t) => t !== e.id), P.value.serieToggleAnimation.show ? Dn({
|
|
479
|
+
from: i,
|
|
480
|
+
to: n,
|
|
481
|
+
duration: P.value.serieToggleAnimation.durationMs,
|
|
482
|
+
onUpdate: (t) => {
|
|
483
|
+
Z.value = Z.value.map((n) => ({
|
|
484
|
+
...n,
|
|
485
|
+
series: n.series.map((n) => n.id === e.id ? {
|
|
486
|
+
...n,
|
|
487
|
+
value: t
|
|
488
|
+
} : n)
|
|
489
|
+
}));
|
|
490
|
+
},
|
|
491
|
+
onDone: () => {
|
|
492
|
+
q("selectLegend", On.value);
|
|
493
|
+
}
|
|
494
|
+
}) : (Z.value = Z.value.map((t) => ({
|
|
495
|
+
...t,
|
|
496
|
+
series: t.series.map((t) => t.id === e.id ? {
|
|
497
|
+
...t,
|
|
498
|
+
value: n
|
|
499
|
+
} : t)
|
|
500
|
+
})), q("selectLegend", On.value))) : s && (P.value.serieToggleAnimation.show ? Dn({
|
|
501
|
+
from: i,
|
|
502
|
+
to: 0,
|
|
503
|
+
duration: P.value.serieToggleAnimation.durationMs,
|
|
504
|
+
onUpdate: (t) => {
|
|
505
|
+
Z.value = Z.value.map((n) => ({
|
|
506
|
+
...n,
|
|
507
|
+
series: n.series.map((n) => n.id === e.id ? {
|
|
508
|
+
...n,
|
|
509
|
+
value: t
|
|
510
|
+
} : n)
|
|
511
|
+
}));
|
|
512
|
+
},
|
|
513
|
+
onDone: () => {
|
|
514
|
+
J.value.push(e.id), q("selectLegend", On.value);
|
|
515
|
+
}
|
|
516
|
+
}) : (Z.value = Z.value.map((t) => ({
|
|
517
|
+
...t,
|
|
518
|
+
series: t.series.map((t) => t.id === e.id ? {
|
|
519
|
+
...t,
|
|
520
|
+
value: 0
|
|
521
|
+
} : t)
|
|
522
|
+
})), J.value.push(e.id), q("selectLegend", On.value)));
|
|
523
|
+
}
|
|
524
|
+
function Mn(e) {
|
|
525
|
+
return Y.value.length ? Y.value.flatMap((e) => e.series).filter((t) => t.name === e) || (W.value && console.warn(`VueUiNestedDonuts - Series name not found "${e}"`), null) : (W.value && console.warn("VueUiNestedDonuts - There are no series to show."), null);
|
|
526
|
+
}
|
|
527
|
+
function Nn(e) {
|
|
528
|
+
let t = Mn(e);
|
|
529
|
+
t !== null && (Array.isArray(t) ? t.forEach((e) => {
|
|
530
|
+
J.value.includes(e.id) && jn({ id: e.id });
|
|
531
|
+
}) : J.value.includes(t.id) && jn({ id: t.id }));
|
|
532
|
+
}
|
|
533
|
+
function Pn(e) {
|
|
534
|
+
let t = Mn(e);
|
|
535
|
+
t !== null && (Array.isArray(t) ? t.forEach((e) => {
|
|
536
|
+
J.value.includes(e.id) || jn({ id: e.id });
|
|
537
|
+
}) : J.value.includes(t.id) || jn({ id: t.id }));
|
|
538
|
+
}
|
|
539
|
+
let Fn = f(() => X.value / Y.value.length * R.value.donut.spacingRatio), In = f(() => Z.value.map((e, t) => X.value - t * X.value / Y.value.length)), Ln = f(() => Z.value.map((e, t) => {
|
|
540
|
+
let n = Math.abs(e.series.map((e) => e.value).reduce((e, t) => e + t, 0)) > 0, r = X.value - t * X.value / Z.value.length, i = A.value ? Qt.value.find((e) => e.datasetIndex === t) : null, o = [...e.series, ...i ? [i] : []].map((e) => ({
|
|
541
|
+
...e,
|
|
542
|
+
value: e.value < 1e-11 ? Number.MIN_VALUE : e.value
|
|
543
|
+
})), s = a({ series: [{
|
|
544
|
+
name: "_",
|
|
545
|
+
color: R.value.donut.emptyFill,
|
|
546
|
+
value: 1
|
|
547
|
+
}] }, K.value.width / 2, K.value.height / 2, r, r, 1.99999, 2, 1, 360, 105.25, Fn.value), ee = `M ${K.value.width / 2},${K.value.height / 2 + r}
|
|
548
|
+
a ${r},${r} 0 1,1 0,${-2 * r}
|
|
549
|
+
a ${r},${r} 0 1,1 0,${2 * r}`;
|
|
550
|
+
return {
|
|
551
|
+
...e,
|
|
552
|
+
hasData: n,
|
|
553
|
+
radius: r,
|
|
554
|
+
skeleton: s,
|
|
555
|
+
fullCirclePath: ee,
|
|
556
|
+
donut: a({ series: o }, K.value.width / 2, K.value.height / 2, r, r, 1.99999, 2, 1, 360, 105.25, Fn.value)
|
|
557
|
+
};
|
|
558
|
+
})), Rn = f(() => [...Y.value].map((e, t) => {
|
|
559
|
+
let n = t * X.value / Y.value.length;
|
|
560
|
+
return {
|
|
561
|
+
sizeRatio: n,
|
|
562
|
+
donut: a({ series: [{ value: 1 }] }, K.value.width / 2, K.value.height / 2, X.value - n, X.value - n, 1.99999, 2, 1, 360, 105.25, X.value / Y.value.length * R.value.donut.spacingRatio)[0]
|
|
563
|
+
};
|
|
564
|
+
})), zn = x(null), Bn = x(null), Vn = x(null), Hn = x(null);
|
|
565
|
+
function Un({ datapoint: e, seriesIndex: t }) {
|
|
566
|
+
P.value.events.datapointLeave && P.value.events.datapointLeave({
|
|
567
|
+
datapoint: e,
|
|
568
|
+
seriesIndex: t
|
|
569
|
+
}), Vt.value = !1, zn.value = null, Ut.value = null, Bn.value = null, Vn.value = null, M.value = null, rn.value = "pointer";
|
|
570
|
+
}
|
|
571
|
+
function Wn({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
|
|
572
|
+
return Ne({
|
|
573
|
+
config: i,
|
|
574
|
+
val: e,
|
|
575
|
+
percentage: t,
|
|
576
|
+
showVal: n,
|
|
577
|
+
showPercentage: r
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
function Gn({ datapoint: e, _relativeIndex: t, seriesIndex: r, triggerMode: i = "pointer" }) {
|
|
581
|
+
P.value.events.datapointEnter && P.value.events.datapointEnter({
|
|
582
|
+
datapoint: e,
|
|
583
|
+
seriesIndex: r
|
|
584
|
+
}), rn.value = i, M.value = r, zn.value = e.arcOfId, Bn.value = e.id, Vn.value = r, Ut.value = e.id, Hn.value = {
|
|
585
|
+
datapoint: e,
|
|
586
|
+
seriesIndex: r,
|
|
587
|
+
series: Z.value,
|
|
588
|
+
config: P.value
|
|
589
|
+
};
|
|
590
|
+
let a = I.value.customFormat;
|
|
591
|
+
if (n(a) && oe(() => a({
|
|
592
|
+
seriesIndex: r,
|
|
593
|
+
datapoint: e,
|
|
594
|
+
series: Z.value,
|
|
595
|
+
config: P.value
|
|
596
|
+
}))) Ht.value = a({
|
|
597
|
+
seriesIndex: r,
|
|
598
|
+
datapoint: e,
|
|
599
|
+
series: Z.value,
|
|
600
|
+
config: P.value
|
|
601
|
+
});
|
|
602
|
+
else {
|
|
603
|
+
let t = "";
|
|
604
|
+
if (I.value.showAllItemsAtIndex && J.value.length === 0) {
|
|
605
|
+
let n = Z.value.map((e) => e.series.find((e) => e.seriesIndex === r));
|
|
606
|
+
n.forEach((i, a) => {
|
|
607
|
+
if (!i) return "";
|
|
608
|
+
t += `
|
|
609
|
+
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${a < n.length - 1 ? `border-bottom:1px solid ${I.value.borderColor}` : ""}">
|
|
610
|
+
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
611
|
+
<svg viewBox="0 0 20 20" height="${I.value.fontSize}" width="${I.value.fontSize}">
|
|
612
|
+
<circle cx="10" cy="10" r="10" fill="${i.color}"/>
|
|
613
|
+
</svg>
|
|
614
|
+
<span>
|
|
615
|
+
${i.arcOf ?? ""} - ${i.name}
|
|
616
|
+
</span>
|
|
617
|
+
</div>
|
|
618
|
+
<span>
|
|
619
|
+
<b>
|
|
620
|
+
${Wn({
|
|
621
|
+
config: z.value.tooltip,
|
|
622
|
+
showVal: I.value.showValue,
|
|
623
|
+
showPercentage: I.value.showPercentage,
|
|
624
|
+
val: ae(R.value.labels.dataLabels.formatter, e.value, u({
|
|
625
|
+
p: z.value.layout.labels.dataLabels.prefix,
|
|
626
|
+
v: e.value,
|
|
627
|
+
s: z.value.layout.labels.dataLabels.suffix,
|
|
628
|
+
r: z.value.tooltip.roundingValue
|
|
629
|
+
}), {
|
|
630
|
+
datapoint: e,
|
|
631
|
+
seriesIndex: r
|
|
632
|
+
}),
|
|
633
|
+
percentage: u({
|
|
634
|
+
v: i.proportion * 100,
|
|
635
|
+
s: "%",
|
|
636
|
+
r: z.value.tooltip.roundingPercentage
|
|
637
|
+
})
|
|
638
|
+
})}
|
|
639
|
+
</b>
|
|
640
|
+
</span>
|
|
641
|
+
</div>
|
|
642
|
+
`;
|
|
643
|
+
});
|
|
644
|
+
} else t += `<div style="width:100%;text-align:center;border-bottom:1px solid ${I.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.arcOf ?? ""} - ${e.name}</div>`, t += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${e.color}"/></svg>`, I.value.showValue && (t += `<b>${ae(F.value.dataLabels.formatter, e.value, u({
|
|
645
|
+
p: F.value.dataLabels.prefix,
|
|
646
|
+
v: e.value,
|
|
647
|
+
s: F.value.dataLabels.suffix,
|
|
648
|
+
r: I.value.roundingValue
|
|
649
|
+
}), {
|
|
650
|
+
datapoint: e,
|
|
651
|
+
seriesIndex: r
|
|
652
|
+
})}</b>`), I.value.showPercentage && (I.value.showValue ? t += `<span>(${u({
|
|
653
|
+
v: e.proportion * 100,
|
|
654
|
+
s: "%",
|
|
655
|
+
r: I.value.roundingPercentage
|
|
656
|
+
})})</span></div>` : t += `<b>${u({
|
|
657
|
+
v: e.proportion * 100,
|
|
658
|
+
s: "%",
|
|
659
|
+
r: I.value.roundingPercentage
|
|
660
|
+
})}</b></div>`);
|
|
661
|
+
Ht.value = `<div style="font-size:${I.value.fontSize}px">${t}</div>`;
|
|
662
|
+
}
|
|
663
|
+
Vt.value = !0;
|
|
664
|
+
}
|
|
665
|
+
function Kn(e) {
|
|
666
|
+
return e.proportion * 100 > F.value.dataLabels.hideUnderValue;
|
|
667
|
+
}
|
|
668
|
+
function qn(e, t) {
|
|
669
|
+
if (!P.value.useBlurOnHover) return "";
|
|
670
|
+
if (I.value.showAllItemsAtIndex && J.value.length === 0) return [null, void 0].includes(Vn.value) || Vn.value === t ? "" : `url(#blur_${O.value})`;
|
|
671
|
+
if (!I.value.showAllItemsAtIndex || J.value.length) return [null, void 0].includes(Bn.value) || Bn.value === e.id ? "" : `url(#blur_${O.value})`;
|
|
672
|
+
}
|
|
673
|
+
let Jn = f(() => Y.value.map((e, t) => {
|
|
674
|
+
let n = e.series.filter((e) => !J.value.includes(e.id)), r = A.value ? n.map((e) => {
|
|
675
|
+
let n = V.value[t].series.findIndex((t) => t.name === e.name);
|
|
676
|
+
return l(V.value[t].series[n].values).reduce((e, t) => e + t, 0);
|
|
677
|
+
}).reduce((e, t) => e + t, 0) : n.map((e) => e.value).reduce((e, t) => e + t, 0);
|
|
678
|
+
return e.series.map((e, n) => {
|
|
679
|
+
let i = l(V.value[t].series[n].values).reduce((e, t) => e + t, 0), a = A.value ? i : e.value, o = Wn({
|
|
680
|
+
val: ae(F.value.dataLabels.formatter, a, u({
|
|
681
|
+
p: F.value.dataLabels.prefix,
|
|
682
|
+
v: a,
|
|
683
|
+
s: F.value.dataLabels.suffix,
|
|
684
|
+
r: z.value.legend.roundingValue
|
|
685
|
+
}), {
|
|
686
|
+
datapoint: e,
|
|
687
|
+
seriesIndex: n
|
|
688
|
+
}),
|
|
689
|
+
percentage: isNaN(a / r) || J.value.includes(e.id) ? "-" : u({
|
|
690
|
+
v: a / r * 100,
|
|
691
|
+
s: "%",
|
|
692
|
+
r: z.value.legend.roundingPercentage
|
|
693
|
+
}),
|
|
694
|
+
showVal: z.value.legend.showValue,
|
|
695
|
+
showPercentage: z.value.legend.showPercentage,
|
|
696
|
+
config: z.value.legend
|
|
697
|
+
}), s = `${e.name}${z.value.legend.showPercentage || z.value.legend.showValue ? ": " : ""}${o}`;
|
|
698
|
+
return {
|
|
699
|
+
name: e.name,
|
|
700
|
+
color: e.color,
|
|
701
|
+
value: a,
|
|
702
|
+
display: s,
|
|
703
|
+
svgDisplay: `${e.arcOf ? `${e.arcOf} - ` : ""}${s}`,
|
|
704
|
+
shape: "circle",
|
|
705
|
+
arcOf: e.arcOf,
|
|
706
|
+
id: e.id,
|
|
707
|
+
seriesIndex: n,
|
|
708
|
+
datasetIndex: t,
|
|
709
|
+
total: r,
|
|
710
|
+
opacity: J.value.includes(e.id) ? .5 : 1,
|
|
711
|
+
segregate: () => jn(e),
|
|
712
|
+
isSegregated: J.value.includes(e.id)
|
|
713
|
+
};
|
|
714
|
+
});
|
|
715
|
+
})), Yn = f(() => ({
|
|
716
|
+
cy: "nested-donuts-legend",
|
|
717
|
+
backgroundColor: z.value.legend.backgroundColor,
|
|
718
|
+
color: z.value.legend.color,
|
|
719
|
+
fontSize: z.value.legend.fontSize,
|
|
720
|
+
paddingBottom: 12,
|
|
721
|
+
fontWeight: z.value.legend.bold ? "bold" : ""
|
|
722
|
+
})), Q = f(() => ({
|
|
723
|
+
head: Z.value.flatMap((e) => e.series.map((t) => ({
|
|
724
|
+
name: `${e.name} - ${t.name}`,
|
|
725
|
+
color: t.color,
|
|
726
|
+
total: e.total
|
|
727
|
+
}))),
|
|
728
|
+
body: Z.value.flatMap((e) => e.series.map((e) => e.value))
|
|
729
|
+
}));
|
|
730
|
+
function Xn(e = null) {
|
|
731
|
+
Ve(() => {
|
|
732
|
+
let n = Q.value.head.map((e, t) => [
|
|
733
|
+
[e.name],
|
|
734
|
+
[Q.value.body[t]],
|
|
735
|
+
[isNaN(Q.value.body[t] / e.total) ? "-" : Q.value.body[t] / e.total * 100]
|
|
736
|
+
]), i = [
|
|
737
|
+
[z.value.title.text],
|
|
738
|
+
[z.value.title.subtitle.text],
|
|
739
|
+
[
|
|
740
|
+
[""],
|
|
741
|
+
["val"],
|
|
742
|
+
["%"]
|
|
743
|
+
]
|
|
744
|
+
].concat(n), a = r(i);
|
|
745
|
+
e ? e(a) : t({
|
|
746
|
+
csvContent: a,
|
|
747
|
+
title: z.value.title.text || "vue-ui-nested-donuts"
|
|
748
|
+
});
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
let Zn = f(() => {
|
|
752
|
+
let e = [
|
|
753
|
+
P.value.table.columnNames.series,
|
|
754
|
+
P.value.table.columnNames.value,
|
|
755
|
+
P.value.table.columnNames.percentage
|
|
756
|
+
], t = Q.value.head.map((e, t) => {
|
|
757
|
+
let n = u({
|
|
758
|
+
p: F.value.dataLabels.prefix,
|
|
759
|
+
v: Q.value.body[t],
|
|
760
|
+
s: F.value.dataLabels.suffix,
|
|
761
|
+
r: P.value.table.td.roundingValue
|
|
762
|
+
});
|
|
763
|
+
return [
|
|
764
|
+
{
|
|
765
|
+
color: e.color,
|
|
766
|
+
name: e.name
|
|
767
|
+
},
|
|
768
|
+
n,
|
|
769
|
+
isNaN(Q.value.body[t] / e.total) ? "-" : u({
|
|
770
|
+
v: Q.value.body[t] / e.total * 100,
|
|
771
|
+
s: "%",
|
|
772
|
+
r: P.value.table.td.roundingPercentage
|
|
773
|
+
})
|
|
774
|
+
];
|
|
775
|
+
}), n = t.map((e) => e.map((e, t) => t === 0 ? e.name : e)), r = {
|
|
776
|
+
th: {
|
|
777
|
+
backgroundColor: P.value.table.th.backgroundColor,
|
|
778
|
+
color: P.value.table.th.color,
|
|
779
|
+
outline: P.value.table.th.outline
|
|
780
|
+
},
|
|
781
|
+
td: {
|
|
782
|
+
backgroundColor: P.value.table.td.backgroundColor,
|
|
783
|
+
color: P.value.table.td.color,
|
|
784
|
+
outline: P.value.table.td.outline
|
|
785
|
+
},
|
|
786
|
+
breakpoint: P.value.table.responsiveBreakpoint
|
|
787
|
+
};
|
|
788
|
+
return {
|
|
789
|
+
colNames: [
|
|
790
|
+
P.value.table.columnNames.series,
|
|
791
|
+
P.value.table.columnNames.value,
|
|
792
|
+
P.value.table.columnNames.percentage
|
|
793
|
+
],
|
|
794
|
+
head: e,
|
|
795
|
+
body: t,
|
|
796
|
+
a11yBody: n,
|
|
797
|
+
config: r
|
|
798
|
+
};
|
|
799
|
+
});
|
|
800
|
+
function Qn() {
|
|
801
|
+
return Y.value;
|
|
802
|
+
}
|
|
803
|
+
function $n() {
|
|
804
|
+
G.value.showTable = !G.value.showTable;
|
|
805
|
+
}
|
|
806
|
+
function er() {
|
|
807
|
+
G.value.dataLabels.show = !G.value.dataLabels.show;
|
|
808
|
+
}
|
|
809
|
+
function tr() {
|
|
810
|
+
G.value.showTooltip = !G.value.showTooltip;
|
|
811
|
+
}
|
|
812
|
+
let nr = x(!1);
|
|
813
|
+
function rr() {
|
|
814
|
+
nr.value = !nr.value;
|
|
815
|
+
}
|
|
816
|
+
async function ir({ scale: e = 2 } = {}) {
|
|
817
|
+
if (!k.value) return;
|
|
818
|
+
let { width: t, height: n } = k.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await Ce({
|
|
819
|
+
domElement: k.value,
|
|
820
|
+
base64: !0,
|
|
821
|
+
img: !0,
|
|
822
|
+
scale: e
|
|
823
|
+
});
|
|
824
|
+
return {
|
|
825
|
+
imageUri: i,
|
|
826
|
+
base64: a,
|
|
827
|
+
title: z.value.title.text,
|
|
828
|
+
width: t,
|
|
829
|
+
height: n,
|
|
830
|
+
aspectRatio: r
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
let ar = x(null);
|
|
834
|
+
function or() {
|
|
835
|
+
if (!ar.value) return;
|
|
836
|
+
let { x: e, y: t, width: n, height: r } = ar.value.getBBox();
|
|
837
|
+
H.value && H.value.setAttribute("viewBox", `${e} ${t} ${n + Math.min(0, e)} ${r + Math.min(0, t)}`);
|
|
838
|
+
}
|
|
839
|
+
let sr = f(() => {
|
|
840
|
+
let e = P.value.table.useDialog && !P.value.table.show, t = G.value.showTable;
|
|
841
|
+
return {
|
|
842
|
+
component: e ? It : jt,
|
|
843
|
+
title: `${z.value.title.text}${z.value.title.subtitle.text ? `: ${z.value.title.subtitle.text}` : ""}`,
|
|
844
|
+
props: e ? {
|
|
845
|
+
backgroundColor: P.value.table.th.backgroundColor,
|
|
846
|
+
color: P.value.table.th.color,
|
|
847
|
+
headerColor: P.value.table.th.color,
|
|
848
|
+
headerBg: P.value.table.th.backgroundColor,
|
|
849
|
+
isFullscreen: N.value,
|
|
850
|
+
fullscreenParent: k.value,
|
|
851
|
+
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
852
|
+
isCursorPointer: B.value
|
|
853
|
+
} : {
|
|
854
|
+
hideDetails: !0,
|
|
855
|
+
config: {
|
|
856
|
+
open: t,
|
|
857
|
+
maxHeight: 1e4,
|
|
858
|
+
body: {
|
|
859
|
+
backgroundColor: z.value.backgroundColor,
|
|
860
|
+
color: z.value.color
|
|
861
|
+
},
|
|
862
|
+
head: {
|
|
863
|
+
backgroundColor: z.value.backgroundColor,
|
|
864
|
+
color: z.value.color
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
});
|
|
870
|
+
Xe(() => G.value.showTable, (e) => {
|
|
871
|
+
P.value.table.show || (e && P.value.table.useDialog && en.value ? en.value.open() : "close" in en.value && en.value.close());
|
|
872
|
+
});
|
|
873
|
+
function cr() {
|
|
874
|
+
G.value.showTable = !1, tn.value && tn.value.setTableIconState(!1);
|
|
875
|
+
}
|
|
876
|
+
let lr = f(() => z.value.backgroundColor), ur = f(() => z.value.legend), dr = f(() => z.value.title), fr = f(() => Jn.value.flat().map((e) => ({
|
|
877
|
+
...e,
|
|
878
|
+
name: e.svgDisplay
|
|
879
|
+
}))), { isCallbackImaging: pr, isCallbackSvg: mr, generateSvg: hr, onGenerateImage: gr } = Se({
|
|
880
|
+
svg: H,
|
|
881
|
+
title: dr,
|
|
882
|
+
legend: ur,
|
|
883
|
+
legendItems: fr,
|
|
884
|
+
backgroundColor: lr,
|
|
885
|
+
getSvgCallback: () => P.value.userOptions.callbacks.svg,
|
|
886
|
+
generateImage: Cn
|
|
887
|
+
});
|
|
888
|
+
async function _r() {
|
|
889
|
+
if (q("copyAlt", {
|
|
890
|
+
config: P.value,
|
|
891
|
+
dataset: Z.value
|
|
892
|
+
}), !P.value.userOptions.callbacks.altCopy) {
|
|
893
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
await Promise.resolve(P.value.userOptions.callbacks.altCopy({
|
|
897
|
+
config: P.value,
|
|
898
|
+
dataset: Z.value
|
|
899
|
+
}));
|
|
900
|
+
}
|
|
901
|
+
let $ = f(() => Ln.value.flatMap((e) => e.donut.filter((e) => !e.ghost)));
|
|
902
|
+
function vr() {
|
|
903
|
+
M.value = null, an.value = !0;
|
|
904
|
+
}
|
|
905
|
+
function yr() {
|
|
906
|
+
M.value = null, rn.value = "pointer", Vt.value = !1, zn.value = null, Ut.value = null, Bn.value = null, Vn.value = null, an.value = !1;
|
|
907
|
+
}
|
|
908
|
+
function br(e) {
|
|
909
|
+
if (!H.value || nr.value || document.activeElement !== H.value || !$.value.length) return;
|
|
910
|
+
let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
911
|
+
if (!t && !n && !r && !i) return;
|
|
912
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
913
|
+
M.value = null, rn.value = "pointer", Vt.value = !1, zn.value = null, Ut.value = null, Bn.value = null, Vn.value = null;
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
if (r) {
|
|
917
|
+
if (M.value === null) return;
|
|
918
|
+
let e = $.value[M.value];
|
|
919
|
+
if (!e) return;
|
|
920
|
+
En({
|
|
921
|
+
datapoint: e,
|
|
922
|
+
index: M.value,
|
|
923
|
+
seriesIndex: e.seriesIndex
|
|
924
|
+
});
|
|
925
|
+
return;
|
|
926
|
+
}
|
|
927
|
+
let a = M.value, o = Vn.value, s = a !== null && a >= 0 && a < $.value.length, ee = o !== null && o >= 0 && o < $.value.length;
|
|
928
|
+
s ? n ? (a += 1, a >= $.value.length && (a = 0)) : t && (--a, a < 0 && (a = $.value.length - 1)) : ee ? (a = n ? o + 1 : o - 1, a >= $.value.length && (a = 0), a < 0 && (a = $.value.length - 1)) : a = n ? 0 : $.value.length - 1;
|
|
929
|
+
let c = $.value[a];
|
|
930
|
+
c && (M.value = a, xr(), Gn({
|
|
931
|
+
datapoint: c,
|
|
932
|
+
relativeIndex: a,
|
|
933
|
+
seriesIndex: c.seriesIndex,
|
|
934
|
+
show: !0,
|
|
935
|
+
triggerMode: "keyboard"
|
|
936
|
+
}));
|
|
937
|
+
}
|
|
938
|
+
function xr() {
|
|
939
|
+
if (!H.value) return;
|
|
940
|
+
let e = H.value.getBoundingClientRect();
|
|
941
|
+
nn.value = {
|
|
942
|
+
x: e.left + e.width / 2,
|
|
943
|
+
y: e.top + e.height / 2
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
let Sr = f(() => ({
|
|
947
|
+
headers: Zn.value?.colNames ?? [],
|
|
948
|
+
rows: Zn.value?.a11yBody ?? []
|
|
949
|
+
}));
|
|
950
|
+
return Te({
|
|
951
|
+
autoSize: or,
|
|
952
|
+
getData: Qn,
|
|
953
|
+
getImage: ir,
|
|
954
|
+
generatePdf: Sn,
|
|
955
|
+
generateCsv: Xn,
|
|
956
|
+
generateImage: Cn,
|
|
957
|
+
generateSvg: hr,
|
|
958
|
+
hideSeries: Pn,
|
|
959
|
+
showSeries: Nn,
|
|
960
|
+
toggleTable: $n,
|
|
961
|
+
toggleLabels: er,
|
|
962
|
+
toggleTooltip: tr,
|
|
963
|
+
toggleAnnotator: rr,
|
|
964
|
+
toggleFullscreen: on,
|
|
965
|
+
copyAlt: _r
|
|
966
|
+
}), (e, t) => (b(), h("div", {
|
|
967
|
+
ref_key: "nestedDonutsChart",
|
|
968
|
+
ref: k,
|
|
969
|
+
class: He(`vue-data-ui-component vue-ui-nested-donuts ${N.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${P.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
970
|
+
style: Ue(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${z.value.backgroundColor}`),
|
|
971
|
+
id: `nested_donuts_${O.value}`,
|
|
972
|
+
onMouseenter: t[2] ||= () => T(fn)(!0),
|
|
973
|
+
onMouseleave: t[3] ||= () => T(fn)(!1)
|
|
974
|
+
}, [
|
|
975
|
+
g("div", {
|
|
976
|
+
id: `chart-instructions-${O.value}`,
|
|
977
|
+
class: "sr-only"
|
|
978
|
+
}, [g("p", null, w(P.value.a11y.translations.keyboardNavigation), 1)], 8, et),
|
|
979
|
+
Sr.value?.rows?.length ? (b(), p(Ae, {
|
|
980
|
+
key: 0,
|
|
981
|
+
uid: O.value,
|
|
982
|
+
head: Sr.value.headers,
|
|
983
|
+
body: Sr.value.rows,
|
|
984
|
+
notice: P.value.a11y.translations.tableAvailable,
|
|
985
|
+
caption: P.value.a11y.translations.tableCaption
|
|
986
|
+
}, null, 8, [
|
|
987
|
+
"uid",
|
|
988
|
+
"head",
|
|
989
|
+
"body",
|
|
990
|
+
"notice",
|
|
991
|
+
"caption"
|
|
992
|
+
])) : m("", !0),
|
|
993
|
+
L.value.buttons.annotator ? (b(), p(T(Pt), {
|
|
994
|
+
key: 1,
|
|
995
|
+
svgRef: T(H),
|
|
996
|
+
backgroundColor: z.value.backgroundColor,
|
|
997
|
+
color: z.value.color,
|
|
998
|
+
active: nr.value,
|
|
999
|
+
isCursorPointer: B.value,
|
|
1000
|
+
palette: L.value.annotatorPalette,
|
|
1001
|
+
onClose: rr
|
|
1002
|
+
}, {
|
|
1003
|
+
"annotator-action-close": E(() => [C(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1004
|
+
"annotator-action-color": E(({ color: t }) => [C(e.$slots, "annotator-action-color", y(v({ color: t })), void 0, !0)]),
|
|
1005
|
+
"annotator-action-draw": E(({ mode: t }) => [C(e.$slots, "annotator-action-draw", y(v({ mode: t })), void 0, !0)]),
|
|
1006
|
+
"annotator-action-undo": E(({ disabled: t }) => [C(e.$slots, "annotator-action-undo", y(v({ disabled: t })), void 0, !0)]),
|
|
1007
|
+
"annotator-action-redo": E(({ disabled: t }) => [C(e.$slots, "annotator-action-redo", y(v({ disabled: t })), void 0, !0)]),
|
|
1008
|
+
"annotator-action-delete": E(({ disabled: t }) => [C(e.$slots, "annotator-action-delete", y(v({ disabled: t })), void 0, !0)]),
|
|
1009
|
+
_: 3
|
|
1010
|
+
}, 8, [
|
|
1011
|
+
"svgRef",
|
|
1012
|
+
"backgroundColor",
|
|
1013
|
+
"color",
|
|
1014
|
+
"active",
|
|
1015
|
+
"isCursorPointer",
|
|
1016
|
+
"palette"
|
|
1017
|
+
])) : m("", !0),
|
|
1018
|
+
wn.value ? (b(), h("div", {
|
|
1019
|
+
key: 2,
|
|
1020
|
+
ref_key: "noTitle",
|
|
1021
|
+
ref: Jt,
|
|
1022
|
+
class: "vue-data-ui-no-title-space",
|
|
1023
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1024
|
+
}, null, 512)) : m("", !0),
|
|
1025
|
+
z.value.title.text ? (b(), h("div", {
|
|
1026
|
+
key: 3,
|
|
1027
|
+
ref_key: "chartTitle",
|
|
1028
|
+
ref: Gt
|
|
1029
|
+
}, [(b(), p(we, {
|
|
1030
|
+
key: `title_${Yt.value}`,
|
|
1031
|
+
config: {
|
|
1032
|
+
title: {
|
|
1033
|
+
cy: "donut-div-title",
|
|
1034
|
+
...z.value.title
|
|
1035
|
+
},
|
|
1036
|
+
subtitle: {
|
|
1037
|
+
cy: "donut-div-subtitle",
|
|
1038
|
+
...z.value.title.subtitle
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}, null, 8, ["config"]))], 512)) : m("", !0),
|
|
1042
|
+
g("div", { id: `legend-top-${O.value}` }, null, 8, tt),
|
|
1043
|
+
L.value.show && Bt.value && (T(pn) || T(dn)) ? (b(), p(T(Nt), {
|
|
1044
|
+
ref_key: "userOptionsRef",
|
|
1045
|
+
ref: tn,
|
|
1046
|
+
key: `user_option_${Wt.value}`,
|
|
1047
|
+
backgroundColor: z.value.backgroundColor,
|
|
1048
|
+
color: z.value.color,
|
|
1049
|
+
isPrinting: T(bn),
|
|
1050
|
+
isImaging: T(xn),
|
|
1051
|
+
uid: O.value,
|
|
1052
|
+
hasTooltip: L.value.buttons.tooltip && I.value.show,
|
|
1053
|
+
hasPdf: L.value.buttons.pdf,
|
|
1054
|
+
hasXls: L.value.buttons.csv,
|
|
1055
|
+
hasImg: L.value.buttons.img,
|
|
1056
|
+
hasSvg: L.value.buttons.svg,
|
|
1057
|
+
hasTable: L.value.buttons.table,
|
|
1058
|
+
hasLabel: L.value.buttons.labels,
|
|
1059
|
+
hasFullscreen: L.value.buttons.fullscreen,
|
|
1060
|
+
hasAltCopy: L.value.buttons.altCopy,
|
|
1061
|
+
isFullscreen: N.value,
|
|
1062
|
+
isTooltip: G.value.showTooltip,
|
|
1063
|
+
titles: { ...L.value.buttonTitles },
|
|
1064
|
+
chartElement: k.value,
|
|
1065
|
+
position: L.value.position,
|
|
1066
|
+
hasAnnotator: L.value.buttons.annotator,
|
|
1067
|
+
isAnnotation: nr.value,
|
|
1068
|
+
callbacks: L.value.callbacks,
|
|
1069
|
+
printScale: L.value.print.scale,
|
|
1070
|
+
tableDialog: P.value.table.useDialog,
|
|
1071
|
+
isCursorPointer: B.value,
|
|
1072
|
+
onToggleFullscreen: on,
|
|
1073
|
+
onGeneratePdf: T(Sn),
|
|
1074
|
+
onGenerateCsv: Xn,
|
|
1075
|
+
onGenerateImage: T(gr),
|
|
1076
|
+
onGenerateSvg: T(hr),
|
|
1077
|
+
onToggleTable: $n,
|
|
1078
|
+
onToggleLabels: er,
|
|
1079
|
+
onToggleTooltip: tr,
|
|
1080
|
+
onToggleAnnotator: rr,
|
|
1081
|
+
onCopyAlt: _r,
|
|
1082
|
+
style: Ue({ visibility: T(pn) ? T(dn) ? "visible" : "hidden" : "visible" })
|
|
1083
|
+
}, Le({ _: 2 }, [
|
|
1084
|
+
e.$slots.menuIcon ? {
|
|
1085
|
+
name: "menuIcon",
|
|
1086
|
+
fn: E(({ isOpen: t, color: n }) => [C(e.$slots, "menuIcon", y(v({
|
|
1087
|
+
isOpen: t,
|
|
1088
|
+
color: n
|
|
1089
|
+
})), void 0, !0)]),
|
|
1090
|
+
key: "0"
|
|
1091
|
+
} : void 0,
|
|
1092
|
+
e.$slots.optionTooltip ? {
|
|
1093
|
+
name: "optionTooltip",
|
|
1094
|
+
fn: E(() => [C(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1095
|
+
key: "1"
|
|
1096
|
+
} : void 0,
|
|
1097
|
+
e.$slots.optionPdf ? {
|
|
1098
|
+
name: "optionPdf",
|
|
1099
|
+
fn: E(() => [C(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1100
|
+
key: "2"
|
|
1101
|
+
} : void 0,
|
|
1102
|
+
e.$slots.optionCsv ? {
|
|
1103
|
+
name: "optionCsv",
|
|
1104
|
+
fn: E(() => [C(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1105
|
+
key: "3"
|
|
1106
|
+
} : void 0,
|
|
1107
|
+
e.$slots.optionImg ? {
|
|
1108
|
+
name: "optionImg",
|
|
1109
|
+
fn: E(() => [C(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1110
|
+
key: "4"
|
|
1111
|
+
} : void 0,
|
|
1112
|
+
e.$slots.optionSvg ? {
|
|
1113
|
+
name: "optionSvg",
|
|
1114
|
+
fn: E(() => [C(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1115
|
+
key: "5"
|
|
1116
|
+
} : void 0,
|
|
1117
|
+
e.$slots.optionTable ? {
|
|
1118
|
+
name: "optionTable",
|
|
1119
|
+
fn: E(() => [C(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1120
|
+
key: "6"
|
|
1121
|
+
} : void 0,
|
|
1122
|
+
e.$slots.optionLabels ? {
|
|
1123
|
+
name: "optionLabels",
|
|
1124
|
+
fn: E(() => [C(e.$slots, "optionLabels", {}, void 0, !0)]),
|
|
1125
|
+
key: "7"
|
|
1126
|
+
} : void 0,
|
|
1127
|
+
e.$slots.optionFullscreen ? {
|
|
1128
|
+
name: "optionFullscreen",
|
|
1129
|
+
fn: E(({ toggleFullscreen: t, isFullscreen: n }) => [C(e.$slots, "optionFullscreen", y(v({
|
|
1130
|
+
toggleFullscreen: t,
|
|
1131
|
+
isFullscreen: n
|
|
1132
|
+
})), void 0, !0)]),
|
|
1133
|
+
key: "8"
|
|
1134
|
+
} : void 0,
|
|
1135
|
+
e.$slots.optionAnnotator ? {
|
|
1136
|
+
name: "optionAnnotator",
|
|
1137
|
+
fn: E(({ toggleAnnotator: t, isAnnotator: n }) => [C(e.$slots, "optionAnnotator", y(v({
|
|
1138
|
+
toggleAnnotator: t,
|
|
1139
|
+
isAnnotator: n
|
|
1140
|
+
})), void 0, !0)]),
|
|
1141
|
+
key: "9"
|
|
1142
|
+
} : void 0,
|
|
1143
|
+
e.$slots.optionAltCopy ? {
|
|
1144
|
+
name: "optionAltCopy",
|
|
1145
|
+
fn: E(({ altCopy: t }) => [C(e.$slots, "optionAltCopy", y(v({ altCopy: t })), void 0, !0)]),
|
|
1146
|
+
key: "10"
|
|
1147
|
+
} : void 0,
|
|
1148
|
+
e.$slots["custom-menu-before"] ? {
|
|
1149
|
+
name: "custom-menu-before",
|
|
1150
|
+
fn: E(() => [C(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1151
|
+
key: "11"
|
|
1152
|
+
} : void 0,
|
|
1153
|
+
e.$slots["custom-menu-after"] ? {
|
|
1154
|
+
name: "custom-menu-after",
|
|
1155
|
+
fn: E(() => [C(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1156
|
+
key: "12"
|
|
1157
|
+
} : void 0
|
|
1158
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : m("", !0),
|
|
1159
|
+
g("div", nt, [(b(), h("svg", {
|
|
1160
|
+
ref_key: "svgRef",
|
|
1161
|
+
ref: H,
|
|
1162
|
+
xmlns: T(de),
|
|
1163
|
+
"aria-describedby": `chart-instructions-${O.value}`,
|
|
1164
|
+
class: He({
|
|
1165
|
+
"vue-data-ui-fullscreen--on": N.value,
|
|
1166
|
+
"vue-data-ui-fulscreen--off": !N.value,
|
|
1167
|
+
"vue-data-ui-svg": !0
|
|
1168
|
+
}),
|
|
1169
|
+
viewBox: `0 0 ${K.value.width <= 0 ? .001 : K.value.width} ${K.value.height < 0 ? .001 : K.value.height}`,
|
|
1170
|
+
style: Ue(`max-width:100%; overflow: visible; background:transparent;color:${z.value.color};${hn.value.css}`),
|
|
1171
|
+
tabindex: "0",
|
|
1172
|
+
onFocus: vr,
|
|
1173
|
+
onBlur: yr,
|
|
1174
|
+
onKeydown: br
|
|
1175
|
+
}, [g("g", {
|
|
1176
|
+
ref_key: "G",
|
|
1177
|
+
ref: ar,
|
|
1178
|
+
class: "vue-data-ui-g"
|
|
1179
|
+
}, [
|
|
1180
|
+
ze(T(Ft)),
|
|
1181
|
+
e.$slots["chart-background"] ? (b(), h("foreignObject", {
|
|
1182
|
+
key: 0,
|
|
1183
|
+
x: 0,
|
|
1184
|
+
y: 0,
|
|
1185
|
+
width: K.value.width <= 0 ? .001 : K.value.width,
|
|
1186
|
+
height: K.value.height < 0 ? .001 : K.value.height,
|
|
1187
|
+
style: { pointerEvents: "none" }
|
|
1188
|
+
}, [C(e.$slots, "chart-background", {}, void 0, !0)], 8, it)) : m("", !0),
|
|
1189
|
+
g("defs", null, [(b(!0), h(d, null, S(Rn.value, (e, t) => (b(), p(Oe, {
|
|
1190
|
+
t: "radial",
|
|
1191
|
+
id: `radial_${O.value}_${t}`,
|
|
1192
|
+
key: `radial_${O.value}_${t}`,
|
|
1193
|
+
stops: [
|
|
1194
|
+
[
|
|
1195
|
+
"0%",
|
|
1196
|
+
"#FFFFFF",
|
|
1197
|
+
0
|
|
1198
|
+
],
|
|
1199
|
+
[
|
|
1200
|
+
`${(1 - Fn.value / In.value[t]) * 100}%`,
|
|
1201
|
+
T(c)("#FFFFFF", 0),
|
|
1202
|
+
0
|
|
1203
|
+
],
|
|
1204
|
+
[
|
|
1205
|
+
`${(1 - Fn.value / In.value[t] / 2) * 100}%`,
|
|
1206
|
+
"#FFFFFF",
|
|
1207
|
+
z.value.gradientIntensity / 100
|
|
1208
|
+
],
|
|
1209
|
+
[
|
|
1210
|
+
"100%",
|
|
1211
|
+
"#FFFFFF",
|
|
1212
|
+
0
|
|
1213
|
+
]
|
|
1214
|
+
]
|
|
1215
|
+
}, null, 8, ["id", "stops"]))), 128))]),
|
|
1216
|
+
g("defs", null, [g("filter", {
|
|
1217
|
+
id: `blur_${O.value}`,
|
|
1218
|
+
x: "-50%",
|
|
1219
|
+
y: "-50%",
|
|
1220
|
+
width: "200%",
|
|
1221
|
+
height: "200%"
|
|
1222
|
+
}, [g("feGaussianBlur", {
|
|
1223
|
+
in: "SourceGraphic",
|
|
1224
|
+
stdDeviation: 2,
|
|
1225
|
+
id: `blur_std_${O.value}`
|
|
1226
|
+
}, null, 8, ot), t[4] ||= g("feColorMatrix", {
|
|
1227
|
+
type: "saturate",
|
|
1228
|
+
values: "0"
|
|
1229
|
+
}, null, -1)], 8, at), g("filter", {
|
|
1230
|
+
id: `shadow_${O.value}`,
|
|
1231
|
+
"color-interpolation-filters": "sRGB"
|
|
1232
|
+
}, [g("feDropShadow", {
|
|
1233
|
+
dx: "0",
|
|
1234
|
+
dy: "0",
|
|
1235
|
+
stdDeviation: "10",
|
|
1236
|
+
"flood-opacity": "0.5",
|
|
1237
|
+
"flood-color": R.value.donut.shadowColor
|
|
1238
|
+
}, null, 8, ct)], 8, st)]),
|
|
1239
|
+
g("defs", null, [(b(!0), h(d, null, S(Ln.value, (e, t) => (b(), h("path", {
|
|
1240
|
+
key: `path-full-${t}`,
|
|
1241
|
+
id: `path-full-${t}-${O.value}`,
|
|
1242
|
+
d: e.fullCirclePath,
|
|
1243
|
+
fill: "none"
|
|
1244
|
+
}, null, 8, lt))), 128))]),
|
|
1245
|
+
(b(!0), h(d, null, S(Ln.value, (e, t) => (b(), h("g", null, [e.hasData ? (b(!0), h(d, { key: 0 }, S(e.donut.filter((e) => !e.ghost), (e, t) => (b(), h("g", null, [g("path", {
|
|
1246
|
+
class: "vue-ui-donut-arc-path",
|
|
1247
|
+
d: e.arcSlice,
|
|
1248
|
+
fill: e.color,
|
|
1249
|
+
stroke: R.value.donut.borderColorAuto ? z.value.backgroundColor : R.value.donut.borderColor,
|
|
1250
|
+
"stroke-width": R.value.donut.borderWidth,
|
|
1251
|
+
filter: qn(e, t)
|
|
1252
|
+
}, null, 8, ut)]))), 256)) : (b(!0), h(d, { key: 1 }, S(e.skeleton, (e, t) => (b(), h("g", null, [g("path", {
|
|
1253
|
+
class: "vue-ui-donut-arc-path",
|
|
1254
|
+
d: e.arcSlice,
|
|
1255
|
+
fill: e.color,
|
|
1256
|
+
stroke: R.value.donut.borderColorAuto ? z.value.backgroundColor : R.value.donut.borderColor,
|
|
1257
|
+
"stroke-width": R.value.donut.borderWidth
|
|
1258
|
+
}, null, 8, dt)]))), 256))]))), 256)),
|
|
1259
|
+
z.value.useGradient ? (b(), h("g", ft, [(b(!0), h(d, null, S(Rn.value, (e, t) => (b(), h("g", null, [g("path", {
|
|
1260
|
+
d: e.donut.arcSlice,
|
|
1261
|
+
fill: `url(#radial_${O.value}_${t})`,
|
|
1262
|
+
stroke: "transparent",
|
|
1263
|
+
"stroke-width": "0"
|
|
1264
|
+
}, null, 8, pt)]))), 256))])) : m("", !0),
|
|
1265
|
+
F.value.dataLabels.showDonutName ? (b(), h("g", mt, [F.value.dataLabels.curvedDonutName ? (b(!0), h(d, { key: 0 }, S(Ln.value, (e, t) => (b(), h("g", null, [(b(!0), h(d, null, S(e.donut, (n, r) => (b(), h("g", null, [r === 0 && K.value.width && K.value.height ? (b(), h("text", {
|
|
1266
|
+
key: 0,
|
|
1267
|
+
"text-anchor": "middle",
|
|
1268
|
+
"font-size": R.value.labels.dataLabels.fontSize,
|
|
1269
|
+
"font-weight": R.value.labels.dataLabels.boldDonutName ? "bold" : "normal",
|
|
1270
|
+
fill: R.value.labels.dataLabels.color,
|
|
1271
|
+
dy: R.value.labels.dataLabels.donutNameOffsetY
|
|
1272
|
+
}, [g("textPath", {
|
|
1273
|
+
href: `#path-full-${t}-${O.value}`,
|
|
1274
|
+
startOffset: "50%",
|
|
1275
|
+
"text-anchor": "middle",
|
|
1276
|
+
method: "align",
|
|
1277
|
+
spacing: "auto"
|
|
1278
|
+
}, w(R.value.labels.dataLabels.donutNameAbbreviation ? T(se)({
|
|
1279
|
+
source: e.name,
|
|
1280
|
+
length: P.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
|
|
1281
|
+
}) : e.name), 9, gt)], 8, ht)) : m("", !0)]))), 256))]))), 256)) : (b(!0), h(d, { key: 1 }, S(Ln.value, (e, t) => (b(), h("g", null, [(b(!0), h(d, null, S(e.donut, (t, n) => (b(), h("g", null, [n === 0 && K.value.width && K.value.height ? (b(), h("text", {
|
|
1282
|
+
key: 0,
|
|
1283
|
+
x: K.value.width / 2,
|
|
1284
|
+
y: t.startY - R.value.labels.dataLabels.fontSize + R.value.labels.dataLabels.donutNameOffsetY,
|
|
1285
|
+
"text-anchor": "middle",
|
|
1286
|
+
"font-size": R.value.labels.dataLabels.fontSize,
|
|
1287
|
+
"font-weight": R.value.labels.dataLabels.boldDonutName ? "bold" : "normal",
|
|
1288
|
+
fill: R.value.labels.dataLabels.color
|
|
1289
|
+
}, w(R.value.labels.dataLabels.donutNameAbbreviation ? T(se)({
|
|
1290
|
+
source: e.name,
|
|
1291
|
+
length: P.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
|
|
1292
|
+
}) : e.name), 9, _t)) : m("", !0)]))), 256))]))), 256))])) : m("", !0),
|
|
1293
|
+
F.value.dataLabels.show ? (b(), h("g", vt, [(b(!0), h(d, null, S(Ln.value, (e, t) => (b(), h("g", null, [(b(!0), h(d, null, S(e.donut.filter((e) => !e.ghost), (e, n) => (b(), h("g", { filter: qn(e, n) }, [Ze(g("text", {
|
|
1294
|
+
opacity: +!!Kn(e),
|
|
1295
|
+
"text-anchor": T(ie)(e, !0).anchor,
|
|
1296
|
+
x: T(ie)(e, !1, R.value.labels.dataLabels.offsetX).x || 0,
|
|
1297
|
+
y: T(le)(e, R.value.labels.dataLabels.offsetY, R.value.labels.dataLabels.offsetY) + (F.value.dataLabels.showValueFirst && F.value.dataLabels.showValue ? R.value.labels.dataLabels.fontSize : 0),
|
|
1298
|
+
fill: F.value.dataLabels.useSerieColor ? e.color : R.value.labels.dataLabels.color,
|
|
1299
|
+
"font-size": F.value.dataLabels.fontSize,
|
|
1300
|
+
"font-weight": F.value.dataLabels.boldPercentage ? "bold" : "normal"
|
|
1301
|
+
}, w(T(s)(T(u)({
|
|
1302
|
+
v: e.proportion * 100,
|
|
1303
|
+
s: "%",
|
|
1304
|
+
r: z.value.layout.labels.dataLabels.roundingPercentage
|
|
1305
|
+
}), R.value.labels.dataLabels.usePercentageParens ? "(" : "", R.value.labels.dataLabels.usePercentageParens ? ")" : "")), 9, bt), [[Ye, G.value.dataLabels.show && F.value.dataLabels.showPercentage]]), Ze(g("text", {
|
|
1306
|
+
opacity: +!!Kn(e),
|
|
1307
|
+
"text-anchor": T(ie)(e, !0).anchor,
|
|
1308
|
+
x: T(ie)(e, !1, R.value.labels.dataLabels.offsetX).x || 0,
|
|
1309
|
+
y: T(le)(e, R.value.labels.dataLabels.offsetY, R.value.labels.dataLabels.offsetY) + (F.value.dataLabels.showValueFirst || !F.value.dataLabels.showPercentage ? 0 : R.value.labels.dataLabels.fontSize),
|
|
1310
|
+
fill: F.value.dataLabels.useSerieColor ? e.color : R.value.labels.dataLabels.color,
|
|
1311
|
+
"font-size": F.value.dataLabels.fontSize,
|
|
1312
|
+
"font-weight": F.value.dataLabels.boldValue ? "bold" : "normal"
|
|
1313
|
+
}, w(T(s)(T(ae)(R.value.labels.dataLabels.formatter, e.value, T(u)({
|
|
1314
|
+
p: z.value.layout.labels.dataLabels.prefix,
|
|
1315
|
+
v: e.value,
|
|
1316
|
+
s: z.value.layout.labels.dataLabels.suffix,
|
|
1317
|
+
r: z.value.layout.labels.dataLabels.roundingValue
|
|
1318
|
+
}), {
|
|
1319
|
+
datapoint: e,
|
|
1320
|
+
seriesIndex: t,
|
|
1321
|
+
datapointIndex: n
|
|
1322
|
+
}), R.value.labels.dataLabels.useValueParens ? "(" : "", R.value.labels.dataLabels.useValueParens ? ")" : "")), 9, xt), [[Ye, G.value.dataLabels.show && F.value.dataLabels.showValue]])], 8, yt))), 256))]))), 256))])) : m("", !0),
|
|
1323
|
+
(b(!0), h(d, null, S(Ln.value, (e, t) => (b(), h("g", null, [(b(!0), h(d, null, S(e.donut, (e, t) => (b(), h("g", null, [g("path", {
|
|
1324
|
+
d: e.arcSlice,
|
|
1325
|
+
fill: Ut.value === e.id ? R.value.donut.selectedColor : "transparent",
|
|
1326
|
+
onMouseenter: (t) => Gn({
|
|
1327
|
+
datapoint: e,
|
|
1328
|
+
relativeIndex: $.value.findIndex((t) => t.id === e.id),
|
|
1329
|
+
seriesIndex: e.seriesIndex
|
|
1330
|
+
}),
|
|
1331
|
+
onClick: (n) => En({
|
|
1332
|
+
datapoint: e,
|
|
1333
|
+
index: t,
|
|
1334
|
+
seriesIndex: e.seriesIndex
|
|
1335
|
+
}),
|
|
1336
|
+
onMouseleave: (t) => Un({
|
|
1337
|
+
datapoint: e,
|
|
1338
|
+
seriesIndex: e.seriesIndex
|
|
1339
|
+
})
|
|
1340
|
+
}, null, 40, St)]))), 256))]))), 256)),
|
|
1341
|
+
C(e.$slots, "svg", { svg: {
|
|
1342
|
+
...K.value,
|
|
1343
|
+
isPrintingImg: T(bn) || T(xn) || T(pr),
|
|
1344
|
+
isPrintingSvg: T(mr)
|
|
1345
|
+
} }, void 0, !0)
|
|
1346
|
+
], 512)], 46, rt)), e.$slots.hint ? (b(), h("div", Ct, [C(e.$slots, "hint", y(v({
|
|
1347
|
+
hint: P.value.a11y.translations.keyboardNavigation,
|
|
1348
|
+
isVisible: an.value
|
|
1349
|
+
})), void 0, !0)])) : m("", !0)]),
|
|
1350
|
+
e.$slots.watermark ? (b(), h("div", wt, [C(e.$slots, "watermark", y(v({ isPrinting: T(bn) || T(xn) || T(pr) || T(mr) })), void 0, !0)])) : m("", !0),
|
|
1351
|
+
ze(T(kt), {
|
|
1352
|
+
teleportTo: I.value.teleportTo,
|
|
1353
|
+
show: G.value.showTooltip && Vt.value,
|
|
1354
|
+
backgroundColor: I.value.backgroundColor,
|
|
1355
|
+
color: I.value.color,
|
|
1356
|
+
borderRadius: I.value.borderRadius,
|
|
1357
|
+
borderColor: I.value.borderColor,
|
|
1358
|
+
borderWidth: I.value.borderWidth,
|
|
1359
|
+
fontSize: I.value.fontSize,
|
|
1360
|
+
backgroundOpacity: I.value.backgroundOpacity,
|
|
1361
|
+
position: I.value.position,
|
|
1362
|
+
offsetX: I.value.offsetX,
|
|
1363
|
+
offsetY: I.value.offsetY,
|
|
1364
|
+
parent: k.value,
|
|
1365
|
+
content: Ht.value,
|
|
1366
|
+
isFullscreen: N.value,
|
|
1367
|
+
isCustom: T(n)(I.value.customFormat),
|
|
1368
|
+
smooth: I.value.smooth,
|
|
1369
|
+
backdropFilter: I.value.backdropFilter,
|
|
1370
|
+
smoothForce: I.value.smoothForce,
|
|
1371
|
+
smoothSnapThreshold: I.value.smoothSnapThreshold,
|
|
1372
|
+
isA11yMode: rn.value === "keyboard",
|
|
1373
|
+
a11yPosition: nn.value
|
|
1374
|
+
}, {
|
|
1375
|
+
"tooltip-before": E(() => [C(e.$slots, "tooltip-before", y(v({ ...Hn.value })), void 0, !0)]),
|
|
1376
|
+
tooltip: E(() => [C(e.$slots, "tooltip", y(v({ ...Hn.value })), void 0, !0)]),
|
|
1377
|
+
"tooltip-after": E(() => [C(e.$slots, "tooltip-after", y(v({ ...Hn.value })), void 0, !0)]),
|
|
1378
|
+
_: 3
|
|
1379
|
+
}, 8, [
|
|
1380
|
+
"teleportTo",
|
|
1381
|
+
"show",
|
|
1382
|
+
"backgroundColor",
|
|
1383
|
+
"color",
|
|
1384
|
+
"borderRadius",
|
|
1385
|
+
"borderColor",
|
|
1386
|
+
"borderWidth",
|
|
1387
|
+
"fontSize",
|
|
1388
|
+
"backgroundOpacity",
|
|
1389
|
+
"position",
|
|
1390
|
+
"offsetX",
|
|
1391
|
+
"offsetY",
|
|
1392
|
+
"parent",
|
|
1393
|
+
"content",
|
|
1394
|
+
"isFullscreen",
|
|
1395
|
+
"isCustom",
|
|
1396
|
+
"smooth",
|
|
1397
|
+
"backdropFilter",
|
|
1398
|
+
"smoothForce",
|
|
1399
|
+
"smoothSnapThreshold",
|
|
1400
|
+
"isA11yMode",
|
|
1401
|
+
"a11yPosition"
|
|
1402
|
+
]),
|
|
1403
|
+
g("div", { id: `legend-bottom-${O.value}` }, null, 8, Tt),
|
|
1404
|
+
$t.value && (z.value.legend.show || e.$slots.legend) ? (b(), p(Ie, {
|
|
1405
|
+
key: 6,
|
|
1406
|
+
to: z.value.legend.position === "top" ? `#legend-top-${O.value}` : `#legend-bottom-${O.value}`
|
|
1407
|
+
}, [z.value.legend.show ? (b(), h("div", {
|
|
1408
|
+
key: 0,
|
|
1409
|
+
ref_key: "chartLegend",
|
|
1410
|
+
ref: Kt,
|
|
1411
|
+
class: He({ "vue-ui-nested-donuts-legend": Jn.value.length > 1 })
|
|
1412
|
+
}, [C(e.$slots, "legend", { legend: Jn.value }, () => [(b(!0), h(d, null, S(Jn.value, (e, n) => (b(), p(Pe, {
|
|
1413
|
+
key: `legend_${n}_${Zt.value}`,
|
|
1414
|
+
legendSet: e,
|
|
1415
|
+
config: Yn.value,
|
|
1416
|
+
isCursorPointer: B.value,
|
|
1417
|
+
onClickMarker: t[0] ||= ({ legend: e }) => jn(e)
|
|
1418
|
+
}, {
|
|
1419
|
+
legendTitle: E(({ titleSet: e }) => [e[0] && e[0].arcOf ? (b(), h("div", Et, w(e[0].arcOf), 1)) : m("", !0)]),
|
|
1420
|
+
item: E(({ legend: e, index: t }) => [g("div", {
|
|
1421
|
+
onClick: (t) => jn(e),
|
|
1422
|
+
style: Ue(`opacity:${J.value.includes(e.id) ? .5 : 1}`)
|
|
1423
|
+
}, w(e.display), 13, Dt)]),
|
|
1424
|
+
legendToggle: E(() => [e.length > 2 && z.value.legend.selectAllToggle.show && !T(ln) ? (b(), p(ke, {
|
|
1425
|
+
key: `toggle-${n}`,
|
|
1426
|
+
backgroundColor: z.value.legend.selectAllToggle.backgroundColor,
|
|
1427
|
+
color: z.value.legend.selectAllToggle.color,
|
|
1428
|
+
fontSize: z.value.legend.fontSize,
|
|
1429
|
+
checked: e.some((e) => J.value.includes(e.id)),
|
|
1430
|
+
isCursorPointer: B.value,
|
|
1431
|
+
onToggle: (t) => An(e)
|
|
1432
|
+
}, null, 8, [
|
|
1433
|
+
"backgroundColor",
|
|
1434
|
+
"color",
|
|
1435
|
+
"fontSize",
|
|
1436
|
+
"checked",
|
|
1437
|
+
"isCursorPointer",
|
|
1438
|
+
"onToggle"
|
|
1439
|
+
])) : m("", !0)]),
|
|
1440
|
+
_: 2
|
|
1441
|
+
}, 1032, [
|
|
1442
|
+
"legendSet",
|
|
1443
|
+
"config",
|
|
1444
|
+
"isCursorPointer"
|
|
1445
|
+
]))), 128))], !0)], 2)) : m("", !0)], 8, ["to"])) : m("", !0),
|
|
1446
|
+
e.$slots.source ? (b(), h("div", {
|
|
1447
|
+
key: 7,
|
|
1448
|
+
ref_key: "source",
|
|
1449
|
+
ref: qt,
|
|
1450
|
+
dir: "auto"
|
|
1451
|
+
}, [C(e.$slots, "source", {}, void 0, !0)], 512)) : m("", !0),
|
|
1452
|
+
Bt.value && L.value.buttons.table ? (b(), p(Ke(sr.value.component), Be({ key: 8 }, sr.value.props, {
|
|
1453
|
+
ref_key: "tableUnit",
|
|
1454
|
+
ref: en,
|
|
1455
|
+
onClose: cr
|
|
1456
|
+
}), Le({
|
|
1457
|
+
content: E(() => [(b(), p(T(Mt), {
|
|
1458
|
+
key: `table_${Xt.value}`,
|
|
1459
|
+
colNames: Zn.value.colNames,
|
|
1460
|
+
head: Zn.value.head,
|
|
1461
|
+
body: Zn.value.body,
|
|
1462
|
+
config: Zn.value.config,
|
|
1463
|
+
title: P.value.table.useDialog ? "" : sr.value.title,
|
|
1464
|
+
withCloseButton: !P.value.table.useDialog,
|
|
1465
|
+
isCursorPointer: B.value,
|
|
1466
|
+
onClose: cr
|
|
1467
|
+
}, {
|
|
1468
|
+
th: E(({ th: e }) => [g("div", Ot, w(e), 1)]),
|
|
1469
|
+
td: E(({ td: e }) => [Re(w(e.name || e), 1)]),
|
|
1470
|
+
_: 1
|
|
1471
|
+
}, 8, [
|
|
1472
|
+
"colNames",
|
|
1473
|
+
"head",
|
|
1474
|
+
"body",
|
|
1475
|
+
"config",
|
|
1476
|
+
"title",
|
|
1477
|
+
"withCloseButton",
|
|
1478
|
+
"isCursorPointer"
|
|
1479
|
+
]))]),
|
|
1480
|
+
_: 2
|
|
1481
|
+
}, [P.value.table.useDialog ? {
|
|
1482
|
+
name: "title",
|
|
1483
|
+
fn: E(() => [Re(w(sr.value.title), 1)]),
|
|
1484
|
+
key: "0"
|
|
1485
|
+
} : void 0, P.value.table.useDialog ? {
|
|
1486
|
+
name: "actions",
|
|
1487
|
+
fn: E(() => [g("button", {
|
|
1488
|
+
tabindex: "0",
|
|
1489
|
+
class: "vue-ui-user-options-button",
|
|
1490
|
+
onClick: t[1] ||= (e) => Xn(L.value.callbacks.csv),
|
|
1491
|
+
style: Ue({ cursor: B.value ? "pointer" : "default" })
|
|
1492
|
+
}, [ze(T(At), {
|
|
1493
|
+
name: "fileCsv",
|
|
1494
|
+
stroke: sr.value.props.color
|
|
1495
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1496
|
+
key: "1"
|
|
1497
|
+
} : void 0]), 1040)) : m("", !0),
|
|
1498
|
+
C(e.$slots, "skeleton", {}, () => [T(ln) ? (b(), p(ye, { key: 0 })) : m("", !0)], !0)
|
|
1499
|
+
], 46, $e));
|
|
1500
|
+
}
|
|
1501
|
+
}, [["__scopeId", "data-v-7c3032b7"]]);
|
|
1502
|
+
//#endregion
|
|
1503
|
+
export { Qe as n, kt as t };
|