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