vue-data-ui 3.23.1 → 3.23.2
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/{PackageVersion-D6d8SCp9.js → PackageVersion-DXU7nRr9.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-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/{package-KvlL5CqE.js → package-bsfpO6y3.js} +1 -1
- package/dist/{render-common-oDYGTc5P.js → render-common-C0PEe9so.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 +6 -0
- package/dist/{useSvgExport-DH-FfcqQ.js → useChartExport-DNiwdPmb.js} +47 -1
- package/dist/{useConfig-D3scuR88.js → useConfig-DlNpz6P8.js} +6 -0
- package/dist/{useObjectBindings-Brg8mm5J.js → useObjectBindings-BeWS5v0i.js} +1 -1
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-DGWDPCwC.js → vue-data-ui-BNxtW8pK.js} +68 -68
- package/dist/vue-data-ui.js +69 -69
- package/dist/{vue-ui-3d-bar-C_Su9fve.js → vue-ui-3d-bar-BYumVxZG.js} +164 -182
- package/dist/{vue-ui-accordion-BxGriZik.js → vue-ui-accordion-DegI2lzR.js} +1 -1
- package/dist/vue-ui-age-pyramid-tJx_hCsS.js +1241 -0
- package/dist/{vue-ui-annotator-CCtnM8Rv.js → vue-ui-annotator-DfG79D4r.js} +2 -2
- package/dist/vue-ui-bullet-DrWG4jRy.js +700 -0
- package/dist/{vue-ui-bump-CcdzJZ9n.js → vue-ui-bump-mKysp0KO.js} +213 -263
- package/dist/vue-ui-candlestick-PgKcBZdy.js +1837 -0
- package/dist/vue-ui-carousel-table-DRvycNBl.js +467 -0
- package/dist/vue-ui-chestnut-Dpklo-VE.js +2014 -0
- package/dist/vue-ui-chord-7PPVH_iG.js +1345 -0
- package/dist/vue-ui-circle-pack-DW4Os6_8.js +1636 -0
- package/dist/{vue-ui-cursor-BqHr0n1Z.js → vue-ui-cursor-DIt7vOwc.js} +2 -2
- package/dist/{vue-ui-dag-jMLVoQkb.js → vue-ui-dag-Cl0WdSLb.js} +492 -515
- package/dist/{vue-ui-dashboard-DVAUFETR.js → vue-ui-dashboard-BwxRLR4E.js} +65 -65
- package/dist/{vue-ui-digits-Dy4gG6qm.js → vue-ui-digits-Bp1OH_t1.js} +2 -2
- package/dist/{vue-ui-donut-C0cWRLbU.js → vue-ui-donut-BZUT7QYt.js} +333 -359
- package/dist/vue-ui-donut-evolution-CQy3ZKXk.js +1549 -0
- package/dist/{vue-ui-donut-CYpxGBhl.js → vue-ui-donut-y6tOAVyY.js} +2 -2
- package/dist/{vue-ui-dumbbell-DxVbRjKR.js → vue-ui-dumbbell-BtKZcAOV.js} +378 -428
- package/dist/{vue-ui-flow-DWaZF4FS.js → vue-ui-flow-BF_cndsv.js} +182 -207
- package/dist/vue-ui-funnel-z3AeiDu6.js +750 -0
- package/dist/{vue-ui-galaxy-CWBP9oH9.js → vue-ui-galaxy-ClWaSOmM.js} +308 -334
- package/dist/vue-ui-gauge-CJstpakj.js +932 -0
- package/dist/{vue-ui-geo-ZA7CBy8f.js → vue-ui-geo-B1tOD3HC.js} +362 -413
- package/dist/{vue-ui-gizmo-SQCou0bQ.js → vue-ui-gizmo-foatosAv.js} +2 -2
- package/dist/{vue-ui-heatmap-CHd9gs_p.js → vue-ui-heatmap-By33A9dZ.js} +292 -315
- package/dist/vue-ui-hill-ewqkK9s5.js +1745 -0
- package/dist/{vue-ui-history-plot-BwnlC1mx.js → vue-ui-history-plot-FEIwXlsz.js} +258 -283
- package/dist/{vue-ui-horizontal-bar-BUar2HUH.js → vue-ui-horizontal-bar-D51sAeVu.js} +273 -298
- package/dist/{vue-ui-kpi-BF_9WWoo.js → vue-ui-kpi-y3EkgqJQ.js} +2 -2
- package/dist/{vue-ui-mini-loader-CvfukjXi.js → vue-ui-mini-loader-CtTewZJG.js} +1 -1
- package/dist/vue-ui-molecule-paWHp18h.js +935 -0
- package/dist/{vue-ui-mood-radar-_zpbmvJs.js → vue-ui-mood-radar-wBRTZI5k.js} +337 -386
- package/dist/vue-ui-nested-donuts-CB-HOLo2.js +1503 -0
- package/dist/{vue-ui-onion-CB5RYIy5.js → vue-ui-onion-B2Q2n55x.js} +257 -282
- package/dist/{vue-ui-parallel-coordinate-plot-BUwt-apg.js → vue-ui-parallel-coordinate-plot-GpkXiIZA.js} +190 -215
- package/dist/{vue-ui-quadrant-CoROD3er.js → vue-ui-quadrant-DOPuejDE.js} +213 -243
- package/dist/{vue-ui-quick-chart-BcH7eY4-.js → vue-ui-quick-chart-CgHX9njq.js} +52 -61
- package/dist/{vue-ui-radar-DGbaXGme.js → vue-ui-radar-BLvG-_zE.js} +343 -370
- package/dist/{vue-ui-rating-Bo3zD3yW.js → vue-ui-rating-BDVSVFA0.js} +8 -9
- package/dist/vue-ui-relation-circle-plOXwxJ5.js +903 -0
- package/dist/{vue-ui-ridgeline-BCaGcyfk.js → vue-ui-ridgeline-BbrnXvBo.js} +267 -317
- package/dist/{vue-ui-rings-BJUBn8_b.js → vue-ui-rings-B3cKfMWy.js} +407 -432
- package/dist/vue-ui-scatter-BY7waF2T.js +2403 -0
- package/dist/{vue-ui-skeleton-EeJcGbCo.js → vue-ui-skeleton-DwKxd7fk.js} +2 -2
- package/dist/{vue-ui-smiley-D0gibt5c.js → vue-ui-smiley-5iHJeTPc.js} +62 -63
- package/dist/{vue-ui-spark-trend-BRoQ7JpQ.js → vue-ui-spark-trend-MpvrV5Wd.js} +2 -2
- package/dist/{vue-ui-sparkbar-DFp2k7-7.js → vue-ui-sparkbar-s-2rBmEz.js} +97 -100
- package/dist/{vue-ui-sparkgauge-D0Bq85Hs.js → vue-ui-sparkgauge-B-BYVv4p.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-BPln7v63.js → vue-ui-sparkhistogram-D7D4NHdi.js} +7 -8
- package/dist/{vue-ui-sparkline-C6Q45Dqp.js → vue-ui-sparkline-RbeYtLWp.js} +6 -7
- package/dist/{vue-ui-sparkstackbar-CjK4bcQg.js → vue-ui-sparkstackbar-ohN7mtbg.js} +191 -195
- package/dist/{vue-ui-stackbar-Ca8EPf3e.js → vue-ui-stackbar-D2bpvQYt.js} +524 -549
- package/dist/{vue-ui-stackline-Pz5WWlWT.js → vue-ui-stackline-Bo1oE8yq.js} +570 -595
- package/dist/vue-ui-strip-plot-CZ-C4a5x.js +1734 -0
- package/dist/{vue-ui-table-Bjg-ujJu.js → vue-ui-table-3PPiJPV6.js} +3 -3
- package/dist/{vue-ui-table-heatmap-ljeYW8Wc.js → vue-ui-table-heatmap-D1bbPXKG.js} +48 -49
- package/dist/{vue-ui-table-sparkline-iRFmtK5S.js → vue-ui-table-sparkline-l1cUX3ny.js} +7 -9
- package/dist/{vue-ui-thermometer-D8uiOaeA.js → vue-ui-thermometer-DltAELO7.js} +240 -261
- package/dist/{vue-ui-timer-CYw983oL.js → vue-ui-timer-DWNdx47q.js} +2 -2
- package/dist/vue-ui-tiremarks-GYhji_fa.js +538 -0
- package/dist/{vue-ui-treemap-h4VbnqPA.js → vue-ui-treemap-DjNlnOG5.js} +498 -524
- package/dist/vue-ui-waffle-BAA9EX6O.js +1386 -0
- package/dist/{vue-ui-wheel-tLvJadk5.js → vue-ui-wheel-DrefGLos.js} +188 -209
- package/dist/{vue-ui-word-cloud-BjpGSsod.js → vue-ui-word-cloud-CQZ8AyOi.js} +375 -398
- package/dist/{vue-ui-world-B4fCS3jN.js → vue-ui-world-Y7a3VEjq.js} +428 -453
- package/dist/{vue-ui-xy-7ZT9IRD8.js → vue-ui-xy-CJcdttNL.js} +857 -883
- package/dist/{vue-ui-xy-gyNS0yH0.js → vue-ui-xy-DPxtkYGc.js} +2 -2
- package/dist/{vue-ui-xy-canvas-BnLEwBpi.js → vue-ui-xy-canvas-1rbwMA1m.js} +13 -12
- package/package.json +1 -1
- package/dist/Slicer-CIk57nL4.js +0 -1163
- package/dist/vue-ui-age-pyramid-D4k1MkAL.js +0 -1264
- package/dist/vue-ui-bullet-DLZr2Uk8.js +0 -724
- package/dist/vue-ui-candlestick-EEEt7ORC.js +0 -1866
- package/dist/vue-ui-carousel-table-BicIpNAD.js +0 -463
- package/dist/vue-ui-chestnut-BI7mC5dd.js +0 -2068
- package/dist/vue-ui-chord-DXaq8ZMu.js +0 -1396
- package/dist/vue-ui-circle-pack-XHJBMG51.js +0 -1659
- package/dist/vue-ui-donut-evolution-DwR47A2r.js +0 -1603
- package/dist/vue-ui-funnel-Bmpx5GHR.js +0 -797
- package/dist/vue-ui-gauge-ByE_txav.js +0 -953
- package/dist/vue-ui-hill-BT183G-_.js +0 -1768
- package/dist/vue-ui-molecule-Bi2CKHer.js +0 -958
- package/dist/vue-ui-nested-donuts-qHZAJ70u.js +0 -1528
- package/dist/vue-ui-relation-circle-DaU1eTsG.js +0 -925
- package/dist/vue-ui-scatter-Pcft1bUt.js +0 -2428
- package/dist/vue-ui-strip-plot-Dw4MGDSO.js +0 -1757
- package/dist/vue-ui-tiremarks-CekiW2Ru.js +0 -559
- package/dist/vue-ui-waffle-cu0w_s6L.js +0 -1412
|
@@ -0,0 +1,1549 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Bt as n, D as r, G as i, Jt as a, Kt as o, Pt as s, Q as c, Rt as ee, S as te, Ut as ne, X as re, _ as ie, f as ae, h as oe, i as se, jt as ce, kt as le, p as ue, pt as de, q as fe, t as pe, tt as me, w as he, wt as ge, y as _e } from "./lib-Bttd6u5E.js";
|
|
3
|
+
import { n as ve, t as ye } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as be } from "./useTimeLabels-d2f-W1L4.js";
|
|
5
|
+
import { t as xe } from "./useConfig-DlNpz6P8.js";
|
|
6
|
+
import { t as Se } from "./usePrinter-DN5bYhTG.js";
|
|
7
|
+
import { n as Ce, t as we } from "./BaseScanner-DZvpgOjM.js";
|
|
8
|
+
import { t as Te } from "./useNestedProp-vPNvh7rV.js";
|
|
9
|
+
import { t as Ee } from "./useThemeCheck-C43Tcqmk.js";
|
|
10
|
+
import { t as De } from "./useChartExport-DNiwdPmb.js";
|
|
11
|
+
import { t as Oe } from "./useTransitions-g_zBREk2.js";
|
|
12
|
+
import { t as ke } from "./useStableElementSize-C7KADDKj.js";
|
|
13
|
+
import { t as Ae } from "./useTimeLabelCollider-AEcY4Ioe.js";
|
|
14
|
+
import { t as je } from "./img-Bnokohej.js";
|
|
15
|
+
import { n as Me } from "./Title-BE3qg9xl.js";
|
|
16
|
+
import { t as Ne } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
17
|
+
import { l as Pe, t as Fe } from "./useResponsive-ZtArZtUf.js";
|
|
18
|
+
import { t as Ie } from "./DefGrad-DVBqDjhO.js";
|
|
19
|
+
import { t as Le } from "./SlicerPreview-wUw1hFwe.js";
|
|
20
|
+
import { t as Re } from "./BaseLegendToggle-DZVucLnv.js";
|
|
21
|
+
import { t as ze } from "./A11yDataTable-DdRsVULz.js";
|
|
22
|
+
import { t as Be } from "./useUserOptionState-DK-_1ddE.js";
|
|
23
|
+
import { t as Ve } from "./useChartAccessibility-DYqac8yF.js";
|
|
24
|
+
import { t as He } from "./Legend-CQxUgOd-.js";
|
|
25
|
+
import { t as Ue } from "./vue_ui_donut_evolution-D1yAAIHr.js";
|
|
26
|
+
import { Fragment as l, Teleport as We, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as Ge, createTextVNode as Ke, createVNode as qe, defineAsyncComponent as h, guardReactiveProps as g, mergeProps as Je, nextTick as Ye, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as Xe, onMounted as Ze, openBlock as b, ref as x, renderList as S, renderSlot as C, resolveDynamicComponent as Qe, shallowRef as $e, toDisplayString as w, toRefs as et, unref as T, watch as tt, watchEffect as nt, withCtx as E } from "vue";
|
|
27
|
+
//#region src/components/vue-ui-donut-evolution.vue
|
|
28
|
+
var rt = /* @__PURE__ */ e({ default: () => Gt }), it = ["id"], at = ["id"], ot = ["id"], st = { style: { position: "relative" } }, ct = [
|
|
29
|
+
"xmlns",
|
|
30
|
+
"aria-describedby",
|
|
31
|
+
"viewBox"
|
|
32
|
+
], lt = [
|
|
33
|
+
"x",
|
|
34
|
+
"y",
|
|
35
|
+
"width",
|
|
36
|
+
"height"
|
|
37
|
+
], ut = { key: 1 }, dt = [
|
|
38
|
+
"x1",
|
|
39
|
+
"x2",
|
|
40
|
+
"y1",
|
|
41
|
+
"y2",
|
|
42
|
+
"stroke",
|
|
43
|
+
"stroke-width"
|
|
44
|
+
], ft = [
|
|
45
|
+
"x1",
|
|
46
|
+
"x2",
|
|
47
|
+
"y1",
|
|
48
|
+
"y2",
|
|
49
|
+
"stroke",
|
|
50
|
+
"stroke-width"
|
|
51
|
+
], pt = { key: 0 }, mt = [
|
|
52
|
+
"x1",
|
|
53
|
+
"x2",
|
|
54
|
+
"y1",
|
|
55
|
+
"y2",
|
|
56
|
+
"stroke",
|
|
57
|
+
"stroke-width"
|
|
58
|
+
], ht = [
|
|
59
|
+
"font-size",
|
|
60
|
+
"fill",
|
|
61
|
+
"transform"
|
|
62
|
+
], gt = [
|
|
63
|
+
"x",
|
|
64
|
+
"y",
|
|
65
|
+
"font-size",
|
|
66
|
+
"fill"
|
|
67
|
+
], _t = [
|
|
68
|
+
"d",
|
|
69
|
+
"stroke",
|
|
70
|
+
"stroke-width"
|
|
71
|
+
], vt = [
|
|
72
|
+
"transform",
|
|
73
|
+
"font-size",
|
|
74
|
+
"text-anchor",
|
|
75
|
+
"fill",
|
|
76
|
+
"font-weight"
|
|
77
|
+
], yt = { key: 0 }, bt = [
|
|
78
|
+
"text-anchor",
|
|
79
|
+
"font-size",
|
|
80
|
+
"fill",
|
|
81
|
+
"transform"
|
|
82
|
+
], xt = [
|
|
83
|
+
"text-anchor",
|
|
84
|
+
"font-size",
|
|
85
|
+
"fill",
|
|
86
|
+
"transform",
|
|
87
|
+
"innerHTML"
|
|
88
|
+
], St = [
|
|
89
|
+
"x1",
|
|
90
|
+
"y1",
|
|
91
|
+
"x2",
|
|
92
|
+
"y2",
|
|
93
|
+
"stroke",
|
|
94
|
+
"stroke-width"
|
|
95
|
+
], Ct = { key: 1 }, wt = [
|
|
96
|
+
"cx",
|
|
97
|
+
"cy",
|
|
98
|
+
"r",
|
|
99
|
+
"fill"
|
|
100
|
+
], Tt = { key: 0 }, Et = { key: 0 }, Dt = ["d", "stroke"], Ot = [
|
|
101
|
+
"text-anchor",
|
|
102
|
+
"x",
|
|
103
|
+
"y",
|
|
104
|
+
"fill"
|
|
105
|
+
], kt = [
|
|
106
|
+
"cx",
|
|
107
|
+
"cy",
|
|
108
|
+
"r",
|
|
109
|
+
"fill"
|
|
110
|
+
], At = { key: 0 }, jt = [
|
|
111
|
+
"cx",
|
|
112
|
+
"cy",
|
|
113
|
+
"fill"
|
|
114
|
+
], Mt = { key: 1 }, Nt = [
|
|
115
|
+
"d",
|
|
116
|
+
"fill",
|
|
117
|
+
"stroke"
|
|
118
|
+
], Pt = { key: 2 }, Ft = [
|
|
119
|
+
"d",
|
|
120
|
+
"fill",
|
|
121
|
+
"stroke"
|
|
122
|
+
], It = [
|
|
123
|
+
"x",
|
|
124
|
+
"y",
|
|
125
|
+
"font-size",
|
|
126
|
+
"fill"
|
|
127
|
+
], Lt = [
|
|
128
|
+
"x",
|
|
129
|
+
"y",
|
|
130
|
+
"width",
|
|
131
|
+
"height",
|
|
132
|
+
"fill"
|
|
133
|
+
], Rt = [
|
|
134
|
+
"x",
|
|
135
|
+
"y",
|
|
136
|
+
"width",
|
|
137
|
+
"height",
|
|
138
|
+
"onMouseenter",
|
|
139
|
+
"onMouseleave",
|
|
140
|
+
"onClick"
|
|
141
|
+
], zt = {
|
|
142
|
+
key: 0,
|
|
143
|
+
style: {
|
|
144
|
+
position: "absolute",
|
|
145
|
+
top: "100%",
|
|
146
|
+
left: "0",
|
|
147
|
+
width: "100%"
|
|
148
|
+
},
|
|
149
|
+
"data-dom-to-png-ignore": "",
|
|
150
|
+
"aria-hidden": "true"
|
|
151
|
+
}, Bt = {
|
|
152
|
+
key: 5,
|
|
153
|
+
class: "vue-data-ui-watermark"
|
|
154
|
+
}, Vt = ["id"], Ht = ["onClick"], Ut = { key: 0 }, Wt = { key: 1 }, Gt = /*#__PURE__*/ Ne({
|
|
155
|
+
__name: "vue-ui-donut-evolution",
|
|
156
|
+
props: {
|
|
157
|
+
config: {
|
|
158
|
+
type: Object,
|
|
159
|
+
default() {
|
|
160
|
+
return {};
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
dataset: {
|
|
164
|
+
type: Array,
|
|
165
|
+
default() {
|
|
166
|
+
return [];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
emits: ["selectLegend", "copyAlt"],
|
|
171
|
+
setup(e, { expose: Ne, emit: rt }) {
|
|
172
|
+
let Gt = h(() => import("./vue-ui-accordion-DegI2lzR.js").then((e) => e.n)), Kt = h(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), qt = h(() => import("./DataTable-BbKgJ5UI.js")), Jt = h(() => import("./PackageVersion-DXU7nRr9.js").then((e) => e.t)), Yt = h(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), Xt = h(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Zt = h(() => import("./vue-ui-donut-BZUT7QYt.js").then((e) => e.n)), Qt = h(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_donut_evolution: $t } = xe(), { isThemeValid: en, warnInvalidTheme: tn } = Ee(), D = e, O = x(fe()), k = x([]), A = x(null), j = x(null), nn = x(!1), M = x(null), N = x(null), rn = x(null), an = x(0), on = x(0), sn = x(0), cn = x(0), ln = x(0), un = x(null), dn = x(null), fn = x(null), pn = x(null), mn = x(!1), hn = x(null), gn = x(null), _n = $e(null), vn = x(0), yn = x(0), bn = x(!1);
|
|
173
|
+
function xn() {
|
|
174
|
+
_n.value = N.value?.parentNode ?? null;
|
|
175
|
+
}
|
|
176
|
+
function Sn() {
|
|
177
|
+
return new Promise((e) => {
|
|
178
|
+
requestAnimationFrame(() => {
|
|
179
|
+
requestAnimationFrame(e);
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
async function Cn() {
|
|
184
|
+
let e = ++yn.value;
|
|
185
|
+
await Ye(), await Sn(), await Sn(), e === yn.value && (vn.value += 1);
|
|
186
|
+
}
|
|
187
|
+
function wn() {
|
|
188
|
+
bn.value || (bn.value = !0, Ye(() => {
|
|
189
|
+
bn.value = !1, xn(), Cn();
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
let Tn = ke({
|
|
193
|
+
elementRef: _n,
|
|
194
|
+
minimumWidth: 2,
|
|
195
|
+
minimumHeight: 2,
|
|
196
|
+
stableFramesRequired: 2,
|
|
197
|
+
once: !1,
|
|
198
|
+
onSizeAccepted: () => {
|
|
199
|
+
Cn();
|
|
200
|
+
}
|
|
201
|
+
}), En = x(null), Dn = x(null), On = x(null), kn = x(null), An = x(null), jn = x(!1), P = $e(null), F = $e(null), Mn = x(null), I = x(null), Nn = x(!1), Pn = rt, Fn = u(() => !!D.dataset && D.dataset.length);
|
|
202
|
+
Ze(() => {
|
|
203
|
+
mn.value = !0, xn(), Tn.start(), Ln(), Cn();
|
|
204
|
+
});
|
|
205
|
+
let In = u(() => L.value.debug);
|
|
206
|
+
function Ln() {
|
|
207
|
+
if (ce(D.dataset) ? (me({
|
|
208
|
+
componentName: "VueUiDonutEvolution",
|
|
209
|
+
type: "dataset",
|
|
210
|
+
debug: In.value
|
|
211
|
+
}), Hn.value = !0) : D.dataset.length && D.dataset.forEach((e, t) => {
|
|
212
|
+
de({
|
|
213
|
+
datasetObject: e,
|
|
214
|
+
requiredAttributes: ["name", "values"]
|
|
215
|
+
}).forEach((e) => {
|
|
216
|
+
me({
|
|
217
|
+
componentName: "VueUiDonutEvolution",
|
|
218
|
+
type: "datasetSerieAttribute",
|
|
219
|
+
property: e,
|
|
220
|
+
index: t,
|
|
221
|
+
debug: In.value
|
|
222
|
+
}), Hn.value = !0;
|
|
223
|
+
});
|
|
224
|
+
}), ce(D.dataset) || (Hn.value = L.value.loading), setTimeout(() => {
|
|
225
|
+
jn.value = !0;
|
|
226
|
+
}, 10), Gn(), L.value.responsive) {
|
|
227
|
+
let e = Pe(() => {
|
|
228
|
+
jn.value = !1;
|
|
229
|
+
let { width: e, height: t } = Fe({
|
|
230
|
+
chart: N.value,
|
|
231
|
+
title: L.value.style.chart.title.text ? En.value : null,
|
|
232
|
+
legend: L.value.style.chart.legend.show ? Dn.value : null,
|
|
233
|
+
slicer: L.value.style.chart.zoom.show && Un.value > 1 ? An.value : null,
|
|
234
|
+
source: On.value
|
|
235
|
+
});
|
|
236
|
+
requestAnimationFrame(() => {
|
|
237
|
+
z.value.width = e, z.value.height = t - 12, wn(), clearTimeout(Mn.value), Mn.value = setTimeout(() => {
|
|
238
|
+
jn.value = !0;
|
|
239
|
+
}, 10);
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
P.value && (F.value && P.value.unobserve(F.value), P.value.disconnect()), P.value = new ResizeObserver(e), F.value = N.value.parentNode, P.value.observe(F.value);
|
|
243
|
+
}
|
|
244
|
+
wn();
|
|
245
|
+
}
|
|
246
|
+
let L = x(Xn());
|
|
247
|
+
ve({
|
|
248
|
+
config: () => L.value,
|
|
249
|
+
dataset: () => D.dataset,
|
|
250
|
+
component: "VueUiDonutEvolution",
|
|
251
|
+
rules: [
|
|
252
|
+
ye.emptyArray,
|
|
253
|
+
{
|
|
254
|
+
test: (e) => e.length === 1,
|
|
255
|
+
message: [
|
|
256
|
+
"👀 There is only a single series in your dataset. Consider:",
|
|
257
|
+
"",
|
|
258
|
+
"▶️ Using VueUiXy instead, for a regular line chart."
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
test: (e) => e.length > 6,
|
|
263
|
+
message: [
|
|
264
|
+
"👀 The number of series is > 6, which makes donuts hard to read. Consider:",
|
|
265
|
+
"",
|
|
266
|
+
"▶️ Grouping small values dynamically into a single \"Other\" series.",
|
|
267
|
+
"",
|
|
268
|
+
"▶️ Using filters to let users choose a maximum number of series to display.",
|
|
269
|
+
"",
|
|
270
|
+
"▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
test: (e) => e.some((e) => e.values.length > 24),
|
|
275
|
+
message: [
|
|
276
|
+
"👀 Some series have a number of data points > 24, which can make the chart and donuts hard to read. Consider:",
|
|
277
|
+
"",
|
|
278
|
+
"▶️ Using larger time scales, or aggregated values.",
|
|
279
|
+
"",
|
|
280
|
+
"▶️ Filtering the time range by adding date intputs in your UI.",
|
|
281
|
+
"",
|
|
282
|
+
"▶️ Using VueUiXy to show longer series in a more comfortable display."
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
});
|
|
287
|
+
let { transitionEnabled: Rn } = Oe({
|
|
288
|
+
config: () => L.value.transitions,
|
|
289
|
+
dataset: () => D.dataset
|
|
290
|
+
}), R = u(() => L.value.userOptions.useCursorPointer), zn = u(() => a({
|
|
291
|
+
defaultConfig: {
|
|
292
|
+
useCssAnimation: !1,
|
|
293
|
+
table: { show: !1 },
|
|
294
|
+
userOptions: { show: !1 },
|
|
295
|
+
style: { chart: {
|
|
296
|
+
backgroundColor: "#99999930",
|
|
297
|
+
layout: {
|
|
298
|
+
dataLabels: { show: !1 },
|
|
299
|
+
grid: {
|
|
300
|
+
stroke: "#6A6A6A",
|
|
301
|
+
axis: {
|
|
302
|
+
yLabel: "",
|
|
303
|
+
xLabel: ""
|
|
304
|
+
},
|
|
305
|
+
yAxis: {
|
|
306
|
+
scaleMin: null,
|
|
307
|
+
scaleMax: null,
|
|
308
|
+
autoScale: !1,
|
|
309
|
+
dataLabels: { show: !1 }
|
|
310
|
+
},
|
|
311
|
+
xAxis: { dataLabels: { show: !1 } }
|
|
312
|
+
},
|
|
313
|
+
line: { stroke: "#CACACA60" }
|
|
314
|
+
},
|
|
315
|
+
legend: {
|
|
316
|
+
backgroundColor: "transparent",
|
|
317
|
+
showValue: !1,
|
|
318
|
+
showPercentage: !1
|
|
319
|
+
},
|
|
320
|
+
zoom: {
|
|
321
|
+
show: !1,
|
|
322
|
+
startIndex: null,
|
|
323
|
+
endIndex: null
|
|
324
|
+
}
|
|
325
|
+
} }
|
|
326
|
+
},
|
|
327
|
+
userConfig: L.value.skeletonConfig ?? {}
|
|
328
|
+
})), { loading: Bn, FINAL_DATASET: Vn, manualLoading: Hn } = Ce({
|
|
329
|
+
...et(D),
|
|
330
|
+
FINAL_CONFIG: L,
|
|
331
|
+
prepareConfig: Xn,
|
|
332
|
+
callback: () => {
|
|
333
|
+
Promise.resolve().then(async () => {
|
|
334
|
+
await Gn();
|
|
335
|
+
});
|
|
336
|
+
},
|
|
337
|
+
skeletonDataset: D.config?.skeletonDataset ?? [
|
|
338
|
+
{
|
|
339
|
+
name: "",
|
|
340
|
+
values: [
|
|
341
|
+
1,
|
|
342
|
+
2,
|
|
343
|
+
3,
|
|
344
|
+
5,
|
|
345
|
+
8,
|
|
346
|
+
13
|
|
347
|
+
],
|
|
348
|
+
color: "#AAAAAA"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: "",
|
|
352
|
+
values: [
|
|
353
|
+
1,
|
|
354
|
+
2,
|
|
355
|
+
3,
|
|
356
|
+
5,
|
|
357
|
+
8,
|
|
358
|
+
13
|
|
359
|
+
],
|
|
360
|
+
color: "#BABABA"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
name: "",
|
|
364
|
+
values: [
|
|
365
|
+
1,
|
|
366
|
+
2,
|
|
367
|
+
3,
|
|
368
|
+
5,
|
|
369
|
+
8,
|
|
370
|
+
13
|
|
371
|
+
],
|
|
372
|
+
color: "#CACACA"
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
skeletonConfig: a({
|
|
376
|
+
defaultConfig: L.value,
|
|
377
|
+
userConfig: zn.value
|
|
378
|
+
})
|
|
379
|
+
}), z = x({
|
|
380
|
+
width: L.value.style.chart.layout.width,
|
|
381
|
+
height: L.value.style.chart.layout.height
|
|
382
|
+
}), Un = u(() => Math.max(...Vn.value.map((e) => e.values.length))), B = x({
|
|
383
|
+
start: 0,
|
|
384
|
+
end: Un.value
|
|
385
|
+
});
|
|
386
|
+
function Wn() {
|
|
387
|
+
Gn();
|
|
388
|
+
}
|
|
389
|
+
async function Gn() {
|
|
390
|
+
await Ye(), await Ye();
|
|
391
|
+
let { startIndex: e, endIndex: t } = L.value.style.chart.zoom, n = kn.value;
|
|
392
|
+
B.value = {
|
|
393
|
+
start: 0,
|
|
394
|
+
max: q.value
|
|
395
|
+
}, (e != null || t != null) && n ? (e == null ? (B.value.start = 0, n.setStartValue(0)) : n.setStartValue(e), t == null ? (B.value.end = q.value, n.setEndValue(q.value)) : n.setEndValue(Kn(t + 1))) : (B.value = {
|
|
396
|
+
start: 0,
|
|
397
|
+
end: q.value
|
|
398
|
+
}, on.value += 1), wn();
|
|
399
|
+
}
|
|
400
|
+
function Kn(e) {
|
|
401
|
+
let t = q.value;
|
|
402
|
+
return e > t ? t : e < 0 || L.value.style.chart.zoom.startIndex !== null && e < L.value.style.chart.zoom.startIndex ? L.value.style.chart.zoom.startIndex === null ? 1 : L.value.style.chart.zoom.startIndex + 1 : e;
|
|
403
|
+
}
|
|
404
|
+
let { userOptionsVisible: qn, setUserOptionsVisibility: Jn, keepUserOptionState: Yn } = Be({ config: L.value }), { svgRef: V } = Ve({ config: L.value.style.chart.title });
|
|
405
|
+
function Xn() {
|
|
406
|
+
let e = Te({
|
|
407
|
+
userConfig: D.config,
|
|
408
|
+
defaultConfig: $t
|
|
409
|
+
}), t = {}, n = e.theme;
|
|
410
|
+
if (n) if (!en.value(e)) tn(e), t = e;
|
|
411
|
+
else {
|
|
412
|
+
let r = Te({
|
|
413
|
+
userConfig: Ue[n] || D.config,
|
|
414
|
+
defaultConfig: e
|
|
415
|
+
});
|
|
416
|
+
t = {
|
|
417
|
+
...Te({
|
|
418
|
+
userConfig: D.config,
|
|
419
|
+
defaultConfig: r
|
|
420
|
+
}),
|
|
421
|
+
customPalette: e.customPalette ? e.customPalette : o[n] || s
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
else t = e;
|
|
425
|
+
return t;
|
|
426
|
+
}
|
|
427
|
+
tt(() => D.config, (e) => {
|
|
428
|
+
Bn.value || (L.value = Xn()), qn.value = !L.value.userOptions.showOnChartHover, Ln(), sn.value += 1, cn.value += 1, ln.value += 1, H.value.showTable = L.value.table.show;
|
|
429
|
+
}, { deep: !0 }), tt(() => D.dataset, (e) => {
|
|
430
|
+
Array.isArray(e) && e.length > 0 && (Hn.value = !1), Wn();
|
|
431
|
+
}, { deep: !0 });
|
|
432
|
+
let { isPrinting: Zn, isImaging: Qn, generatePdf: $n, generateImage: er } = Se({
|
|
433
|
+
elementId: O.value,
|
|
434
|
+
fileName: L.value.style.chart.title.text || "vue-ui-donut-evolution",
|
|
435
|
+
options: L.value.userOptions.print
|
|
436
|
+
}), tr = u(() => L.value.userOptions.show && !L.value.style.chart.title.text), nr = u(() => he(L.value.customPalette)), H = x({ showTable: L.value.table.show });
|
|
437
|
+
tt(L, () => {
|
|
438
|
+
H.value = { showTable: L.value.table.show };
|
|
439
|
+
}, { immediate: !0 });
|
|
440
|
+
let U = u(() => ({
|
|
441
|
+
top: L.value.style.chart.layout.padding.top,
|
|
442
|
+
right: L.value.style.chart.layout.padding.right,
|
|
443
|
+
bottom: L.value.style.chart.layout.padding.bottom,
|
|
444
|
+
left: L.value.style.chart.layout.padding.left
|
|
445
|
+
})), W = u(() => L.value.style.chart.layout.grid.yAxis.position === "right");
|
|
446
|
+
function rr() {
|
|
447
|
+
let e = 0;
|
|
448
|
+
un.value && (e = Array.from(un.value.querySelectorAll("text")).reduce((e, t) => {
|
|
449
|
+
let n = t.getComputedTextLength();
|
|
450
|
+
return n > e ? n : e;
|
|
451
|
+
}, 0));
|
|
452
|
+
let t = pn.value ? pn.value.getBoundingClientRect().width + L.value.style.chart.layout.grid.axis.yLabelOffsetX + L.value.style.chart.layout.grid.axis.fontSize : 0, n = e + t + 5;
|
|
453
|
+
return {
|
|
454
|
+
left: W.value ? 0 : n,
|
|
455
|
+
right: W.value ? n : 0,
|
|
456
|
+
scaleLabelsWidth: e,
|
|
457
|
+
yAxisLabelWidth: t,
|
|
458
|
+
crosshair: 5
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
let ir = x(0), ar = Pe((e) => {
|
|
462
|
+
ir.value = e;
|
|
463
|
+
}, 100);
|
|
464
|
+
nt((e) => {
|
|
465
|
+
let t = dn.value;
|
|
466
|
+
if (!t) return;
|
|
467
|
+
let n = new ResizeObserver((e) => {
|
|
468
|
+
ar(e[0].contentRect.height);
|
|
469
|
+
});
|
|
470
|
+
n.observe(t), e(() => n.disconnect());
|
|
471
|
+
}), Xe(() => {
|
|
472
|
+
ir.value = 0, Tn.stop(), clearTimeout(Mn.value), P.value && (F.value && P.value.unobserve(F.value), P.value.disconnect(), P.value = null, F.value = null);
|
|
473
|
+
});
|
|
474
|
+
let or = u(() => {
|
|
475
|
+
let e = 0;
|
|
476
|
+
fn.value && (e = fn.value.getBBox().height);
|
|
477
|
+
let t = 0;
|
|
478
|
+
return dn.value && (t = ir.value), e + t + L.value.style.chart.layout.grid.axis.fontSize + L.value.style.chart.layout.grid.xAxis.dataLabels.offsetY;
|
|
479
|
+
}), G = u(() => {
|
|
480
|
+
vn.value;
|
|
481
|
+
let e = rr(), t = L.value.style.chart.layout.dataLabels.fontSize * 3, n = z.value.width, r = z.value.height, i = U.value.left + e.left, a = n - U.value.right - e.right, o = n - i - U.value.right - e.right, s = r - U.value.top - U.value.bottom - t - or.value, c = U.value.top + t;
|
|
482
|
+
return {
|
|
483
|
+
top: c,
|
|
484
|
+
left: i,
|
|
485
|
+
right: a,
|
|
486
|
+
bottom: r - U.value.bottom - or.value,
|
|
487
|
+
absoluteHeight: r,
|
|
488
|
+
absoluteWidth: n,
|
|
489
|
+
centerX: i + Math.max(10, o) / 2,
|
|
490
|
+
centerY: c + Math.max(10, s) / 2,
|
|
491
|
+
width: Math.max(10, o),
|
|
492
|
+
height: Math.max(10, s),
|
|
493
|
+
scaleLabelsWidth: e.scaleLabelsWidth,
|
|
494
|
+
yAxisLabelWidth: e.yAxisLabelWidth,
|
|
495
|
+
crosshair: e.crosshair
|
|
496
|
+
};
|
|
497
|
+
}), K = u(() => (In.value && Vn.value.forEach((e, t) => {
|
|
498
|
+
[null, void 0].includes(e.name) && me({
|
|
499
|
+
componentName: "VueUiDonutEvolution",
|
|
500
|
+
type: "datasetSerieAttribute",
|
|
501
|
+
property: "name",
|
|
502
|
+
index: t
|
|
503
|
+
}), [null, void 0].includes(e.values) && me({
|
|
504
|
+
componentName: "VueUiDonutEvolution",
|
|
505
|
+
type: "datasetSerieAttribute",
|
|
506
|
+
property: "values",
|
|
507
|
+
index: t
|
|
508
|
+
});
|
|
509
|
+
}), Vn.value.map((e, t) => ({
|
|
510
|
+
...e,
|
|
511
|
+
values: ee(e.values),
|
|
512
|
+
color: te(e.color) || nr.value[t] || s[t] || s[t % s.length],
|
|
513
|
+
length: (e.values || []).length,
|
|
514
|
+
uid: fe()
|
|
515
|
+
})))), sr = u(() => K.value.filter((e) => !k.value.includes(e.uid)).map((e) => ({
|
|
516
|
+
...e,
|
|
517
|
+
values: e.values.filter((e, t) => t >= B.value.start && t <= B.value.end)
|
|
518
|
+
}))), q = u(() => Math.max(...K.value.map((e) => e.length))), J = x([]), cr = 0;
|
|
519
|
+
nt(() => {
|
|
520
|
+
let e = ++cr;
|
|
521
|
+
(async () => {
|
|
522
|
+
let t = await be({
|
|
523
|
+
values: L.value.style.chart.layout.grid.xAxis.dataLabels.values,
|
|
524
|
+
maxDatapoints: q.value,
|
|
525
|
+
formatter: L.value.style.chart.layout.grid.xAxis.dataLabels.datetimeFormatter,
|
|
526
|
+
start: B.value.start,
|
|
527
|
+
end: B.value.end
|
|
528
|
+
});
|
|
529
|
+
e === cr && (J.value = t);
|
|
530
|
+
})();
|
|
531
|
+
});
|
|
532
|
+
let Y = u(() => G.value.width / (B.value.end - B.value.start)), lr = u(() => {
|
|
533
|
+
let e = [];
|
|
534
|
+
for (let t = 0; t < B.value.end - B.value.start; t += 1) {
|
|
535
|
+
let n = sr.value.map((e) => e.values[t] ?? null), r = n.filter((e) => [void 0, null].includes(e)).length === n.length, i = n.reduce((e, t) => e + t, 0), a = n.map((e) => e / i), o = G.value.left + Y.value * t + Y.value / 2;
|
|
536
|
+
e.push({
|
|
537
|
+
index: t,
|
|
538
|
+
percentages: a,
|
|
539
|
+
subtotal: r || i < 0 ? null : i,
|
|
540
|
+
values: n,
|
|
541
|
+
x: o
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
return e;
|
|
545
|
+
}), ur = u(() => {
|
|
546
|
+
let e = Math.max(...lr.value.map((e) => e.subtotal).filter((e) => ge(e))) ?? 1, t = Math.min(...lr.value.map((e) => e.subtotal).filter((e) => ge(e))) ?? 0, n = Math.max(L.value.style.chart.layout.grid.yAxis.scaleMax ?? 0, e), r;
|
|
547
|
+
return r = L.value.style.chart.layout.grid.yAxis.scaleMin == null ? 0 : Math.min(t, L.value.style.chart.layout.grid.yAxis.scaleMin), L.value.style.chart.layout.grid.yAxis.autoScale && (r = t, n = e), r === n && (r = n / 2, n *= 1.5), {
|
|
548
|
+
max: n,
|
|
549
|
+
min: r
|
|
550
|
+
};
|
|
551
|
+
}), X = u(() => {
|
|
552
|
+
let e = lr.value.length === 1 ? ur.value.max * 2 : ur.value.max;
|
|
553
|
+
return ie(ur.value.min, e, L.value.style.chart.layout.grid.yAxis.dataLabels.steps);
|
|
554
|
+
});
|
|
555
|
+
tt(() => X.value.ticks.join("|"), () => {
|
|
556
|
+
wn();
|
|
557
|
+
}, { flush: "post" });
|
|
558
|
+
function dr(e) {
|
|
559
|
+
return (e - X.value.min) / (X.value.max - X.value.min);
|
|
560
|
+
}
|
|
561
|
+
let fr = u(() => X.value.ticks.map((e) => ({
|
|
562
|
+
y: G.value.bottom - G.value.height * dr(e),
|
|
563
|
+
value: e
|
|
564
|
+
}))), Z = u(() => {
|
|
565
|
+
let e = lr.value, t = Math.max(...e.map((e) => e.subtotal));
|
|
566
|
+
return e.length === 1 && t * 2, e.map((t, n) => {
|
|
567
|
+
let r = Math.min(G.value.width / 24, Y.value / 2 * .7), i = r > G.value.width / 16 ? G.value.width / 16 : r, a = A.value === t.index ? G.value.width / 16 : i, o = e.length > 4 ? r * 2 : r * 2 > Y.value / 2 * .7 ? Y.value / 2 * .7 : r * 2, s = G.value.bottom - G.value.height * dr(t.subtotal), c = sr.value.map((e) => ({
|
|
568
|
+
color: e.color,
|
|
569
|
+
name: e.name,
|
|
570
|
+
value: e.values[n] ?? 0
|
|
571
|
+
})).toSorted((e, t) => t.value - e.value);
|
|
572
|
+
return {
|
|
573
|
+
...t,
|
|
574
|
+
y: s,
|
|
575
|
+
radius: i,
|
|
576
|
+
activeRadius: a,
|
|
577
|
+
hoverRadius: o,
|
|
578
|
+
donut: le({ series: c }, t.x, s, i, i, 1.99999, 2, 1, 360, 105.25, i / 2),
|
|
579
|
+
donutHover: le({ series: c }, t.x, s, o, o, 1.99999, 2, 1, 360, 105.25, o / 2),
|
|
580
|
+
donutFocus: le({ series: c }, G.value.centerX, G.value.centerY, G.value.height / 3.6, G.value.height / 3.6, 1.99999, 2, 1, 360, 105.25, G.value.height / 6)
|
|
581
|
+
};
|
|
582
|
+
});
|
|
583
|
+
});
|
|
584
|
+
function pr(e, t, n) {
|
|
585
|
+
return se(L.value.style.chart.layout.dataLabels.formatter, e, re({
|
|
586
|
+
p: L.value.style.chart.layout.dataLabels.prefix,
|
|
587
|
+
v: e,
|
|
588
|
+
s: L.value.style.chart.layout.dataLabels.suffix,
|
|
589
|
+
r: L.value.style.chart.layout.dataLabels.rounding
|
|
590
|
+
}), {
|
|
591
|
+
datapoint: t,
|
|
592
|
+
index: n
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
function mr(e, t) {
|
|
596
|
+
return isNaN(e.value / ne(t, "value")) ? 0 : (e.value / ne(t, "value") * 100).toFixed(0) + "%";
|
|
597
|
+
}
|
|
598
|
+
function hr(e) {
|
|
599
|
+
A.value = null, j.value = null, I.value = null, L.value.events.datapointLeave && L.value.events.datapointLeave({
|
|
600
|
+
datapoint: e,
|
|
601
|
+
seriesIndex: e.seriesIndex + B.value.start
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
function gr(e) {
|
|
605
|
+
L.value.events.datapointEnter && L.value.events.datapointEnter({
|
|
606
|
+
datapoint: e,
|
|
607
|
+
seriesIndex: e.index + B.value.start
|
|
608
|
+
}), A.value = e.index, j.value = e, I.value = e.index;
|
|
609
|
+
}
|
|
610
|
+
let _r = x(null);
|
|
611
|
+
function vr(e, t) {
|
|
612
|
+
L.value.events.datapointClick && L.value.events.datapointClick({
|
|
613
|
+
datapoint: e,
|
|
614
|
+
seriesIndex: e.index + B.value.start
|
|
615
|
+
}), !(!e.subtotal || !L.value.style.chart.dialog.show) && (j.value = null, A.value = null, nn.value = !0, M.value = e, Lr(e), [null, void 0].includes(t) || (_r.value = t));
|
|
616
|
+
}
|
|
617
|
+
let yr = u(() => K.value.map((e, t) => ({
|
|
618
|
+
name: e.name,
|
|
619
|
+
value: e.values.slice(B.value.start, B.value.end).reduce((e, t) => e + t, 0),
|
|
620
|
+
shape: "circle",
|
|
621
|
+
uid: e.uid,
|
|
622
|
+
color: e.color
|
|
623
|
+
})).sort((e, t) => t.value - e.value).map((e, t) => ({
|
|
624
|
+
...e,
|
|
625
|
+
opacity: k.value.includes(e.uid) ? .5 : 1,
|
|
626
|
+
segregate: () => Cr(e.uid),
|
|
627
|
+
isSegregated: k.value.includes(e.uid),
|
|
628
|
+
display: `${e.name}${L.value.style.chart.legend.showPercentage || L.value.style.chart.legend.showValue ? ": " : ""}${L.value.style.chart.legend.showValue ? se(L.value.style.chart.layout.dataLabels.formatter, e.value, re({
|
|
629
|
+
p: L.value.style.chart.layout.dataLabels.prefix,
|
|
630
|
+
v: e.value,
|
|
631
|
+
s: L.value.style.chart.layout.dataLabels.suffix,
|
|
632
|
+
r: L.value.style.chart.legend.roundingValue
|
|
633
|
+
}), {
|
|
634
|
+
datapoint: e,
|
|
635
|
+
seriesIndex: t
|
|
636
|
+
}) : ""}${L.value.style.chart.legend.showPercentage ? k.value.includes(e.uid) ? `${L.value.style.chart.legend.showValue ? " (" : ""}- %${L.value.style.chart.legend.showValue ? ")" : ""}` : `${L.value.style.chart.legend.showValue ? " (" : ""}${isNaN(e.value / br.value) ? "-" : re({
|
|
637
|
+
v: e.value / br.value * 100,
|
|
638
|
+
s: "%",
|
|
639
|
+
r: L.value.style.chart.legend.roundingPercentage
|
|
640
|
+
})}${L.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
|
|
641
|
+
}))), br = u(() => Z.value.map((e) => e.subtotal).reduce((e, t) => e + t, 0)), xr = u(() => ({
|
|
642
|
+
cy: "donut-div-legend",
|
|
643
|
+
backgroundColor: L.value.style.chart.legend.backgroundColor,
|
|
644
|
+
color: L.value.style.chart.legend.color,
|
|
645
|
+
fontSize: L.value.style.chart.legend.fontSize,
|
|
646
|
+
paddingBottom: 12,
|
|
647
|
+
fontWeight: L.value.style.chart.legend.bold ? "bold" : ""
|
|
648
|
+
}));
|
|
649
|
+
function Sr() {
|
|
650
|
+
k.value.length ? k.value = [] : yr.value.forEach((e) => {
|
|
651
|
+
k.value.push(e.uid);
|
|
652
|
+
}), Pn("selectLegend", sr.value);
|
|
653
|
+
}
|
|
654
|
+
function Cr(e) {
|
|
655
|
+
if (k.value.includes(e)) k.value = k.value.filter((t) => t !== e), Pn("selectLegend", sr.value);
|
|
656
|
+
else {
|
|
657
|
+
if (k.value.length === K.value.length - 1) return;
|
|
658
|
+
k.value.push(e), Pn("selectLegend", sr.value);
|
|
659
|
+
}
|
|
660
|
+
M.value && vr(Z.value.find((e, t) => t === _r.value));
|
|
661
|
+
}
|
|
662
|
+
function wr(e) {
|
|
663
|
+
return K.value.length ? K.value.find((t) => t.name === e) || (In.value && console.warn(`VueUiDonutEvolution - Series name not found "${e}"`), null) : (In.value && console.warn("VueUiDonutEvolution - There are no series to show."), null);
|
|
664
|
+
}
|
|
665
|
+
function Tr(e) {
|
|
666
|
+
let t = wr(e);
|
|
667
|
+
t !== null && k.value.includes(t.uid) && Cr(t.uid);
|
|
668
|
+
}
|
|
669
|
+
function Er(e) {
|
|
670
|
+
let t = wr(e);
|
|
671
|
+
t !== null && (k.value.includes(t.uid) || Cr(t.uid));
|
|
672
|
+
}
|
|
673
|
+
let Q = u(() => {
|
|
674
|
+
let e = [""].concat(K.value.filter((e) => !k.value.includes(e.uid)).map((e) => ({
|
|
675
|
+
name: e.name,
|
|
676
|
+
color: e.color
|
|
677
|
+
})), ["Σ"]), t = [];
|
|
678
|
+
for (let e = 0; e < q.value; e += 1) {
|
|
679
|
+
let n = K.value.filter((e) => !k.value.includes(e.uid)).map((t) => t.values[e] ?? 0).reduce((e, t) => e + t, 0);
|
|
680
|
+
t.push([J.value[e] ? J.value[e].text : "-"].concat(K.value.filter((e) => !k.value.includes(e.uid)).map((t) => ({
|
|
681
|
+
value: t.values[e] ?? 0,
|
|
682
|
+
percentage: t.values[e] ? t.values[e] / n * 100 : 0
|
|
683
|
+
})), [`${L.value.style.chart.layout.dataLabels.prefix}${Number(n.toFixed(L.value.table.td.roundingValue))}${L.value.style.chart.layout.dataLabels.suffix}`]));
|
|
684
|
+
}
|
|
685
|
+
return {
|
|
686
|
+
head: e,
|
|
687
|
+
body: t,
|
|
688
|
+
bodyA11y: t.map((e) => e.map((t, n) => n === 0 || n === e.length - 1 ? t : `${pr(t.value ?? 0, null, n)} (${t.percentage.toFixed(1)}%)`)),
|
|
689
|
+
config: {
|
|
690
|
+
th: {
|
|
691
|
+
backgroundColor: L.value.table.th.backgroundColor,
|
|
692
|
+
color: L.value.table.th.color,
|
|
693
|
+
outline: L.value.table.th.outline
|
|
694
|
+
},
|
|
695
|
+
td: {
|
|
696
|
+
backgroundColor: L.value.table.td.backgroundColor,
|
|
697
|
+
color: L.value.table.td.color,
|
|
698
|
+
outline: L.value.table.td.outline
|
|
699
|
+
},
|
|
700
|
+
breakpoint: L.value.table.responsiveBreakpoint
|
|
701
|
+
},
|
|
702
|
+
colNames: [L.value.table.columnNames.period].concat(K.value.filter((e) => !k.value.includes(e.uid)).map((e) => e.name), L.value.table.columnNames.total)
|
|
703
|
+
};
|
|
704
|
+
});
|
|
705
|
+
function Dr() {
|
|
706
|
+
return K.value;
|
|
707
|
+
}
|
|
708
|
+
function Or(e = null) {
|
|
709
|
+
Ye(() => {
|
|
710
|
+
let n = [
|
|
711
|
+
[L.value.style.chart.title.text],
|
|
712
|
+
[L.value.style.chart.title.subtitle.text],
|
|
713
|
+
[""]
|
|
714
|
+
], i = [...Q.value.head.map((e) => e.name ?? e)], a = [...Q.value.body.map((e) => e.map((e) => e.value ?? e))], o = n.concat([i]).concat(a), s = r(o);
|
|
715
|
+
e ? e(s) : t({
|
|
716
|
+
csvContent: s,
|
|
717
|
+
title: L.value.style.chart.title.text || "vue-ui-donut-evolution"
|
|
718
|
+
});
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
let $ = x(!1);
|
|
722
|
+
function kr(e) {
|
|
723
|
+
$.value = e, an.value += 1;
|
|
724
|
+
}
|
|
725
|
+
function Ar() {
|
|
726
|
+
H.value.showTable = !H.value.showTable;
|
|
727
|
+
}
|
|
728
|
+
let jr = x(!1);
|
|
729
|
+
function Mr() {
|
|
730
|
+
jr.value = !jr.value;
|
|
731
|
+
}
|
|
732
|
+
function Nr(e) {
|
|
733
|
+
return e.proportion * 100 > L.value.style.chart.donuts.hover.hideLabelsUnderValue;
|
|
734
|
+
}
|
|
735
|
+
let Pr = x([]), Fr = x({}), Ir = x(null);
|
|
736
|
+
function Lr(e) {
|
|
737
|
+
Pr.value = e.donut.map((e) => ({
|
|
738
|
+
name: e.name,
|
|
739
|
+
values: [e.value],
|
|
740
|
+
color: e.color
|
|
741
|
+
})), Fr.value = c({
|
|
742
|
+
...L.value.style.chart.dialog.donutChart,
|
|
743
|
+
responsive: !0,
|
|
744
|
+
theme: L.value.theme
|
|
745
|
+
}), Ir.value && Ir.value.open();
|
|
746
|
+
}
|
|
747
|
+
async function Rr({ scale: e = 2 } = {}) {
|
|
748
|
+
if (!N.value) return;
|
|
749
|
+
let { width: t, height: n } = N.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await je({
|
|
750
|
+
domElement: N.value,
|
|
751
|
+
base64: !0,
|
|
752
|
+
img: !0,
|
|
753
|
+
scale: e
|
|
754
|
+
});
|
|
755
|
+
return {
|
|
756
|
+
imageUri: i,
|
|
757
|
+
base64: a,
|
|
758
|
+
title: L.value.style.chart.title.text,
|
|
759
|
+
width: t,
|
|
760
|
+
height: n,
|
|
761
|
+
aspectRatio: r
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
let zr = u(() => z.value.width), Br = u(() => z.value.height);
|
|
765
|
+
Ae({
|
|
766
|
+
timeLabelsEls: dn,
|
|
767
|
+
timeLabels: J,
|
|
768
|
+
slicer: B,
|
|
769
|
+
configRef: L,
|
|
770
|
+
rotationPath: [
|
|
771
|
+
"style",
|
|
772
|
+
"chart",
|
|
773
|
+
"layout",
|
|
774
|
+
"grid",
|
|
775
|
+
"xAxis",
|
|
776
|
+
"dataLabels",
|
|
777
|
+
"rotation"
|
|
778
|
+
],
|
|
779
|
+
autoRotatePath: [
|
|
780
|
+
"style",
|
|
781
|
+
"chart",
|
|
782
|
+
"layout",
|
|
783
|
+
"grid",
|
|
784
|
+
"xAxis",
|
|
785
|
+
"dataLabels",
|
|
786
|
+
"autoRotate",
|
|
787
|
+
"enable"
|
|
788
|
+
],
|
|
789
|
+
isAutoSize: !1,
|
|
790
|
+
width: zr,
|
|
791
|
+
height: Br,
|
|
792
|
+
rotation: L.value.style.chart.layout.grid.xAxis.dataLabels.autoRotate.angle
|
|
793
|
+
});
|
|
794
|
+
let Vr = u(() => {
|
|
795
|
+
let e = L.value.table.useDialog && !L.value.table.show, t = H.value.showTable;
|
|
796
|
+
return {
|
|
797
|
+
component: e ? Qt : Gt,
|
|
798
|
+
title: `${L.value.style.chart.title.text}${L.value.style.chart.title.subtitle.text ? `: ${L.value.style.chart.title.subtitle.text}` : ""}`,
|
|
799
|
+
props: e ? {
|
|
800
|
+
backgroundColor: L.value.table.th.backgroundColor,
|
|
801
|
+
color: L.value.table.th.color,
|
|
802
|
+
headerColor: L.value.table.th.color,
|
|
803
|
+
headerBg: L.value.table.th.backgroundColor,
|
|
804
|
+
isFullscreen: $.value,
|
|
805
|
+
fullscreenParent: N.value,
|
|
806
|
+
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
807
|
+
isCursorPointer: R.value
|
|
808
|
+
} : {
|
|
809
|
+
hideDetails: !0,
|
|
810
|
+
config: {
|
|
811
|
+
open: t,
|
|
812
|
+
maxHeight: 1e4,
|
|
813
|
+
body: {
|
|
814
|
+
backgroundColor: L.value.style.chart.backgroundColor,
|
|
815
|
+
color: L.value.style.chart.color
|
|
816
|
+
},
|
|
817
|
+
head: {
|
|
818
|
+
backgroundColor: L.value.style.chart.backgroundColor,
|
|
819
|
+
color: L.value.style.chart.color
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
});
|
|
825
|
+
tt(() => H.value.showTable, (e) => {
|
|
826
|
+
L.value.table.show || (e && L.value.table.useDialog && hn.value ? hn.value.open() : "close" in hn.value && hn.value.close());
|
|
827
|
+
});
|
|
828
|
+
function Hr() {
|
|
829
|
+
H.value.showTable = !1, gn.value && gn.value.setTableIconState(!1);
|
|
830
|
+
}
|
|
831
|
+
let Ur = u(() => yr.value.map((e) => ({
|
|
832
|
+
...e,
|
|
833
|
+
name: e.display
|
|
834
|
+
}))), Wr = u(() => L.value.style.chart.backgroundColor), Gr = u(() => L.value.style.chart.legend), Kr = u(() => L.value.style.chart.title), { isCallbackImaging: qr, isCallbackSvg: Jr, generateSvg: Yr, onGenerateImage: Xr } = De({
|
|
835
|
+
svg: V,
|
|
836
|
+
title: Kr,
|
|
837
|
+
legend: Gr,
|
|
838
|
+
legendItems: Ur,
|
|
839
|
+
backgroundColor: Wr,
|
|
840
|
+
getSvgCallback: () => L.value.userOptions.callbacks.svg,
|
|
841
|
+
generateImage: er
|
|
842
|
+
});
|
|
843
|
+
async function Zr() {
|
|
844
|
+
if (Pn("copyAlt", {
|
|
845
|
+
config: L.value,
|
|
846
|
+
dataset: Z.value
|
|
847
|
+
}), !L.value.userOptions.callbacks.altCopy) {
|
|
848
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
849
|
+
return;
|
|
850
|
+
}
|
|
851
|
+
await Promise.resolve(L.value.userOptions.callbacks.altCopy({
|
|
852
|
+
config: L.value,
|
|
853
|
+
dataset: Z.value
|
|
854
|
+
}));
|
|
855
|
+
}
|
|
856
|
+
function Qr() {
|
|
857
|
+
I.value = null, Nn.value = !0;
|
|
858
|
+
}
|
|
859
|
+
function $r() {
|
|
860
|
+
I.value = null, A.value = null, j.value = null, Nn.value = !1;
|
|
861
|
+
}
|
|
862
|
+
function ei(e) {
|
|
863
|
+
if (!V.value || jr.value || document.activeElement !== V.value || !Z.value.length) return;
|
|
864
|
+
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
865
|
+
if (!t && !n && !r && !i) return;
|
|
866
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
867
|
+
I.value = null, A.value = null, j.value = null;
|
|
868
|
+
return;
|
|
869
|
+
}
|
|
870
|
+
if (r) {
|
|
871
|
+
if (I.value === null) return;
|
|
872
|
+
let e = Z.value[I.value];
|
|
873
|
+
if (!e) return;
|
|
874
|
+
vr(e, I.value);
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
let a = I.value, o = A.value, s = a !== null && a >= 0 && a < Z.value.length, c = o !== null && o >= 0 && o < Z.value.length;
|
|
878
|
+
s ? n ? (a += 1, a >= Z.value.length && (a = 0)) : t && (--a, a < 0 && (a = Z.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= Z.value.length && (a = 0), a < 0 && (a = Z.value.length - 1)) : a = n ? 0 : Z.value.length - 1;
|
|
879
|
+
let ee = Z.value[a];
|
|
880
|
+
ee && gr(ee);
|
|
881
|
+
}
|
|
882
|
+
let ti = u(() => ({
|
|
883
|
+
headers: Q.value?.colNames ?? [],
|
|
884
|
+
rows: Q.value?.bodyA11y ?? []
|
|
885
|
+
}));
|
|
886
|
+
return Ne({
|
|
887
|
+
getData: Dr,
|
|
888
|
+
getImage: Rr,
|
|
889
|
+
generatePdf: $n,
|
|
890
|
+
generateCsv: Or,
|
|
891
|
+
generateImage: er,
|
|
892
|
+
generateSvg: Yr,
|
|
893
|
+
hideSeries: Er,
|
|
894
|
+
showSeries: Tr,
|
|
895
|
+
toggleTable: Ar,
|
|
896
|
+
toggleAnnotator: Mr,
|
|
897
|
+
toggleFullscreen: kr,
|
|
898
|
+
copyAlt: Zr
|
|
899
|
+
}), (e, t) => (b(), p("div", {
|
|
900
|
+
ref_key: "donutEvolutionChart",
|
|
901
|
+
ref: N,
|
|
902
|
+
class: _(`vue-data-ui-component vue-ui-donut-evolution ${$.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${L.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
903
|
+
style: y(`font-family:${L.value.style.fontFamily};width:100%; text-align:center;background:${L.value.style.chart.backgroundColor}`),
|
|
904
|
+
id: O.value,
|
|
905
|
+
onMouseenter: t[5] ||= () => T(Jn)(!0),
|
|
906
|
+
onMouseleave: t[6] ||= () => T(Jn)(!1)
|
|
907
|
+
}, [
|
|
908
|
+
m("div", {
|
|
909
|
+
id: `chart-instructions-${O.value}`,
|
|
910
|
+
class: "sr-only"
|
|
911
|
+
}, [m("p", null, w(L.value.a11y.translations.keyboardNavigation), 1)], 8, at),
|
|
912
|
+
ti.value?.rows?.length ? (b(), d(ze, {
|
|
913
|
+
key: 0,
|
|
914
|
+
uid: O.value,
|
|
915
|
+
head: ti.value.headers,
|
|
916
|
+
body: ti.value.rows,
|
|
917
|
+
notice: L.value.a11y.translations.tableAvailable,
|
|
918
|
+
caption: L.value.a11y.translations.tableCaption
|
|
919
|
+
}, null, 8, [
|
|
920
|
+
"uid",
|
|
921
|
+
"head",
|
|
922
|
+
"body",
|
|
923
|
+
"notice",
|
|
924
|
+
"caption"
|
|
925
|
+
])) : f("", !0),
|
|
926
|
+
L.value.userOptions.buttons.annotator ? (b(), d(T(Yt), {
|
|
927
|
+
key: 1,
|
|
928
|
+
svgRef: T(V),
|
|
929
|
+
backgroundColor: L.value.style.chart.backgroundColor,
|
|
930
|
+
color: L.value.style.chart.color,
|
|
931
|
+
active: jr.value,
|
|
932
|
+
isCursorPointer: R.value,
|
|
933
|
+
onClose: Mr
|
|
934
|
+
}, {
|
|
935
|
+
"annotator-action-close": E(() => [C(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
936
|
+
"annotator-action-color": E(({ color: t }) => [C(e.$slots, "annotator-action-color", v(g({ color: t })), void 0, !0)]),
|
|
937
|
+
"annotator-action-draw": E(({ mode: t }) => [C(e.$slots, "annotator-action-draw", v(g({ mode: t })), void 0, !0)]),
|
|
938
|
+
"annotator-action-undo": E(({ disabled: t }) => [C(e.$slots, "annotator-action-undo", v(g({ disabled: t })), void 0, !0)]),
|
|
939
|
+
"annotator-action-redo": E(({ disabled: t }) => [C(e.$slots, "annotator-action-redo", v(g({ disabled: t })), void 0, !0)]),
|
|
940
|
+
"annotator-action-delete": E(({ disabled: t }) => [C(e.$slots, "annotator-action-delete", v(g({ disabled: t })), void 0, !0)]),
|
|
941
|
+
_: 3
|
|
942
|
+
}, 8, [
|
|
943
|
+
"svgRef",
|
|
944
|
+
"backgroundColor",
|
|
945
|
+
"color",
|
|
946
|
+
"active",
|
|
947
|
+
"isCursorPointer"
|
|
948
|
+
])) : f("", !0),
|
|
949
|
+
tr.value ? (b(), p("div", {
|
|
950
|
+
key: 2,
|
|
951
|
+
ref_key: "noTitle",
|
|
952
|
+
ref: rn,
|
|
953
|
+
class: "vue-data-ui-no-title-space",
|
|
954
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
955
|
+
}, null, 512)) : f("", !0),
|
|
956
|
+
L.value.style.chart.title.text ? (b(), p("div", {
|
|
957
|
+
key: 3,
|
|
958
|
+
ref_key: "chartTitle",
|
|
959
|
+
ref: En,
|
|
960
|
+
style: "width:100%;background:transparent;padding-bottom:24px",
|
|
961
|
+
onMouseleave: hr
|
|
962
|
+
}, [(b(), d(Me, {
|
|
963
|
+
key: `title_${sn.value}`,
|
|
964
|
+
config: {
|
|
965
|
+
title: {
|
|
966
|
+
cy: "donut-evolution-div-title",
|
|
967
|
+
...L.value.style.chart.title
|
|
968
|
+
},
|
|
969
|
+
subtitle: {
|
|
970
|
+
cy: "donut-evolution-div-subtitle",
|
|
971
|
+
...L.value.style.chart.title.subtitle
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}, null, 8, ["config"]))], 544)) : f("", !0),
|
|
975
|
+
m("div", { id: `legend-top-${O.value}` }, null, 8, ot),
|
|
976
|
+
L.value.userOptions.show && Fn.value && (T(Yn) || T(qn)) ? (b(), d(T(Xt), {
|
|
977
|
+
ref_key: "userOptionsRef",
|
|
978
|
+
ref: gn,
|
|
979
|
+
key: `user_options_${an.value}`,
|
|
980
|
+
backgroundColor: L.value.style.chart.backgroundColor,
|
|
981
|
+
color: L.value.style.chart.color,
|
|
982
|
+
isPrinting: T(Zn),
|
|
983
|
+
isImaging: T(Qn),
|
|
984
|
+
uid: O.value,
|
|
985
|
+
hasPdf: L.value.userOptions.buttons.pdf,
|
|
986
|
+
hasImg: L.value.userOptions.buttons.img,
|
|
987
|
+
hasSvg: L.value.userOptions.buttons.svg,
|
|
988
|
+
hasXls: L.value.userOptions.buttons.csv,
|
|
989
|
+
hasTable: L.value.userOptions.buttons.table,
|
|
990
|
+
hasFullscreen: L.value.userOptions.buttons.fullscreen,
|
|
991
|
+
hasAltCopy: L.value.userOptions.buttons.altCopy,
|
|
992
|
+
isFullscreen: $.value,
|
|
993
|
+
titles: { ...L.value.userOptions.buttonTitles },
|
|
994
|
+
chartElement: N.value,
|
|
995
|
+
position: L.value.userOptions.position,
|
|
996
|
+
hasAnnotator: L.value.userOptions.buttons.annotator,
|
|
997
|
+
isAnnotation: jr.value,
|
|
998
|
+
callbacks: L.value.userOptions.callbacks,
|
|
999
|
+
printScale: L.value.userOptions.print.scale,
|
|
1000
|
+
tableDialog: L.value.table.useDialog,
|
|
1001
|
+
isCursorPointer: R.value,
|
|
1002
|
+
onToggleFullscreen: kr,
|
|
1003
|
+
onGeneratePdf: T($n),
|
|
1004
|
+
onGenerateCsv: Or,
|
|
1005
|
+
onGenerateImage: T(Xr),
|
|
1006
|
+
onGenerateSvg: T(Yr),
|
|
1007
|
+
onToggleTable: Ar,
|
|
1008
|
+
onToggleAnnotator: Mr,
|
|
1009
|
+
onCopyAlt: Zr,
|
|
1010
|
+
style: y({ visibility: T(Yn) ? T(qn) ? "visible" : "hidden" : "visible" })
|
|
1011
|
+
}, Ge({ _: 2 }, [
|
|
1012
|
+
e.$slots.menuIcon ? {
|
|
1013
|
+
name: "menuIcon",
|
|
1014
|
+
fn: E(({ isOpen: t, color: n }) => [C(e.$slots, "menuIcon", v(g({
|
|
1015
|
+
isOpen: t,
|
|
1016
|
+
color: n
|
|
1017
|
+
})), void 0, !0)]),
|
|
1018
|
+
key: "0"
|
|
1019
|
+
} : void 0,
|
|
1020
|
+
e.$slots.optionPdf ? {
|
|
1021
|
+
name: "optionPdf",
|
|
1022
|
+
fn: E(() => [C(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1023
|
+
key: "1"
|
|
1024
|
+
} : void 0,
|
|
1025
|
+
e.$slots.optionCsv ? {
|
|
1026
|
+
name: "optionCsv",
|
|
1027
|
+
fn: E(() => [C(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1028
|
+
key: "2"
|
|
1029
|
+
} : void 0,
|
|
1030
|
+
e.$slots.optionImg ? {
|
|
1031
|
+
name: "optionImg",
|
|
1032
|
+
fn: E(() => [C(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1033
|
+
key: "3"
|
|
1034
|
+
} : void 0,
|
|
1035
|
+
e.$slots.optionSvg ? {
|
|
1036
|
+
name: "optionSvg",
|
|
1037
|
+
fn: E(() => [C(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1038
|
+
key: "4"
|
|
1039
|
+
} : void 0,
|
|
1040
|
+
e.$slots.optionTable ? {
|
|
1041
|
+
name: "optionTable",
|
|
1042
|
+
fn: E(() => [C(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1043
|
+
key: "5"
|
|
1044
|
+
} : void 0,
|
|
1045
|
+
e.$slots.optionFullscreen ? {
|
|
1046
|
+
name: "optionFullscreen",
|
|
1047
|
+
fn: E(({ toggleFullscreen: t, isFullscreen: n }) => [C(e.$slots, "optionFullscreen", v(g({
|
|
1048
|
+
toggleFullscreen: t,
|
|
1049
|
+
isFullscreen: n
|
|
1050
|
+
})), void 0, !0)]),
|
|
1051
|
+
key: "6"
|
|
1052
|
+
} : void 0,
|
|
1053
|
+
e.$slots.optionAnnotator ? {
|
|
1054
|
+
name: "optionAnnotator",
|
|
1055
|
+
fn: E(({ toggleAnnotator: t, isAnnotator: n }) => [C(e.$slots, "optionAnnotator", v(g({
|
|
1056
|
+
toggleAnnotator: t,
|
|
1057
|
+
isAnnotator: n
|
|
1058
|
+
})), void 0, !0)]),
|
|
1059
|
+
key: "7"
|
|
1060
|
+
} : void 0,
|
|
1061
|
+
e.$slots.optionAltCopy ? {
|
|
1062
|
+
name: "optionAltCopy",
|
|
1063
|
+
fn: E(({ altCopy: t }) => [C(e.$slots, "optionAltCopy", v(g({ altCopy: t })), void 0, !0)]),
|
|
1064
|
+
key: "8"
|
|
1065
|
+
} : void 0,
|
|
1066
|
+
e.$slots["custom-menu-before"] ? {
|
|
1067
|
+
name: "custom-menu-before",
|
|
1068
|
+
fn: E(() => [C(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1069
|
+
key: "9"
|
|
1070
|
+
} : void 0,
|
|
1071
|
+
e.$slots["custom-menu-after"] ? {
|
|
1072
|
+
name: "custom-menu-after",
|
|
1073
|
+
fn: E(() => [C(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1074
|
+
key: "10"
|
|
1075
|
+
} : void 0
|
|
1076
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : f("", !0),
|
|
1077
|
+
m("div", st, [(b(), p("svg", {
|
|
1078
|
+
ref_key: "svgRef",
|
|
1079
|
+
ref: V,
|
|
1080
|
+
xmlns: T(pe),
|
|
1081
|
+
"aria-describedby": `chart-instructions-${O.value}`,
|
|
1082
|
+
class: _({
|
|
1083
|
+
"vue-data-ui-fullscreen--on": $.value,
|
|
1084
|
+
"vue-data-ui-fulscreen--off": !$.value,
|
|
1085
|
+
"vue-data-ui-no-transition": !T(Rn)
|
|
1086
|
+
}),
|
|
1087
|
+
viewBox: `0 0 ${G.value.absoluteWidth} ${G.value.absoluteHeight}`,
|
|
1088
|
+
style: y(`max-width:100%; overflow: visible; background:transparent;color:${L.value.style.chart.color};`),
|
|
1089
|
+
tabindex: "0",
|
|
1090
|
+
onFocus: Qr,
|
|
1091
|
+
onBlur: $r,
|
|
1092
|
+
onKeydown: ei
|
|
1093
|
+
}, [
|
|
1094
|
+
qe(T(Jt)),
|
|
1095
|
+
e.$slots["chart-background"] ? (b(), p("foreignObject", {
|
|
1096
|
+
key: 0,
|
|
1097
|
+
x: G.value.left,
|
|
1098
|
+
y: G.value.top,
|
|
1099
|
+
width: G.value.width,
|
|
1100
|
+
height: G.value.height,
|
|
1101
|
+
style: { pointerEvents: "none" }
|
|
1102
|
+
}, [C(e.$slots, "chart-background", {}, void 0, !0)], 8, lt)) : f("", !0),
|
|
1103
|
+
m("defs", null, [qe(Ie, {
|
|
1104
|
+
t: "linear",
|
|
1105
|
+
id: `hover_${O.value}`,
|
|
1106
|
+
x1: "0%",
|
|
1107
|
+
y1: "0%",
|
|
1108
|
+
x2: "0%",
|
|
1109
|
+
y2: "100%",
|
|
1110
|
+
stops: [[
|
|
1111
|
+
"0%",
|
|
1112
|
+
T(n)(L.value.style.chart.backgroundColor, L.value.style.chart.layout.highlighter.opacity),
|
|
1113
|
+
1
|
|
1114
|
+
], [
|
|
1115
|
+
"100%",
|
|
1116
|
+
T(n)(L.value.style.chart.layout.highlighter.color, L.value.style.chart.layout.highlighter.opacity),
|
|
1117
|
+
1
|
|
1118
|
+
]]
|
|
1119
|
+
}, null, 8, ["id", "stops"]), qe(Ie, {
|
|
1120
|
+
t: "radial",
|
|
1121
|
+
id: `focus_${O.value}`,
|
|
1122
|
+
stops: [
|
|
1123
|
+
[
|
|
1124
|
+
"0%",
|
|
1125
|
+
T(n)(T(te)(L.value.style.chart.backgroundColor), 0),
|
|
1126
|
+
1
|
|
1127
|
+
],
|
|
1128
|
+
[
|
|
1129
|
+
"77%",
|
|
1130
|
+
T(n)("#FFFFFF", 30),
|
|
1131
|
+
1
|
|
1132
|
+
],
|
|
1133
|
+
[
|
|
1134
|
+
"100%",
|
|
1135
|
+
T(n)(T(te)(L.value.style.chart.backgroundColor), 0),
|
|
1136
|
+
1
|
|
1137
|
+
]
|
|
1138
|
+
]
|
|
1139
|
+
}, null, 8, ["id", "stops"])]),
|
|
1140
|
+
L.value.style.chart.layout.grid.show ? (b(), p("g", ut, [
|
|
1141
|
+
m("line", {
|
|
1142
|
+
x1: W.value ? G.value.right : G.value.left,
|
|
1143
|
+
x2: W.value ? G.value.right : G.value.left,
|
|
1144
|
+
y1: G.value.top,
|
|
1145
|
+
y2: G.value.top + G.value.height,
|
|
1146
|
+
stroke: L.value.style.chart.layout.grid.stroke,
|
|
1147
|
+
"stroke-width": L.value.style.chart.layout.grid.strokeWidth,
|
|
1148
|
+
"stroke-linecap": "round"
|
|
1149
|
+
}, null, 8, dt),
|
|
1150
|
+
m("line", {
|
|
1151
|
+
x1: G.value.left,
|
|
1152
|
+
x2: G.value.right,
|
|
1153
|
+
y1: G.value.bottom,
|
|
1154
|
+
y2: G.value.bottom,
|
|
1155
|
+
stroke: L.value.style.chart.layout.grid.stroke,
|
|
1156
|
+
"stroke-width": L.value.style.chart.layout.grid.strokeWidth,
|
|
1157
|
+
"stroke-linecap": "round"
|
|
1158
|
+
}, null, 8, ft),
|
|
1159
|
+
L.value.style.chart.layout.grid.showVerticalLines ? (b(), p("g", pt, [(b(!0), p(l, null, S(B.value.end - B.value.start, (e, t) => (b(), p("line", {
|
|
1160
|
+
x1: G.value.left + (t + 1) * Y.value,
|
|
1161
|
+
x2: G.value.left + (t + 1) * Y.value,
|
|
1162
|
+
y1: G.value.top,
|
|
1163
|
+
y2: G.value.bottom,
|
|
1164
|
+
stroke: L.value.style.chart.layout.grid.stroke,
|
|
1165
|
+
"stroke-width": L.value.style.chart.layout.grid.strokeWidth,
|
|
1166
|
+
"stroke-linecap": "round"
|
|
1167
|
+
}, null, 8, mt))), 256))])) : f("", !0)
|
|
1168
|
+
])) : f("", !0),
|
|
1169
|
+
m("g", null, [L.value.style.chart.layout.grid.axis.yLabel ? (b(), p("text", {
|
|
1170
|
+
key: 0,
|
|
1171
|
+
ref_key: "yAxisLabel",
|
|
1172
|
+
ref: pn,
|
|
1173
|
+
"font-size": L.value.style.chart.layout.grid.axis.fontSize,
|
|
1174
|
+
fill: L.value.style.chart.layout.grid.axis.color,
|
|
1175
|
+
transform: `translate(${W.value ? G.value.absoluteWidth - L.value.style.chart.layout.grid.axis.fontSize / 2 - L.value.style.chart.layout.grid.axis.yLabelOffsetX : L.value.style.chart.layout.grid.axis.fontSize}, ${G.value.top + G.value.height / 2}) rotate(-90)`,
|
|
1176
|
+
"text-anchor": "middle",
|
|
1177
|
+
style: { transition: "none" }
|
|
1178
|
+
}, w(L.value.style.chart.layout.grid.axis.yLabel), 9, ht)) : f("", !0), L.value.style.chart.layout.grid.axis.xLabel ? (b(), p("text", {
|
|
1179
|
+
key: 1,
|
|
1180
|
+
ref_key: "xAxisLabel",
|
|
1181
|
+
ref: fn,
|
|
1182
|
+
"text-anchor": "middle",
|
|
1183
|
+
x: G.value.absoluteWidth / 2,
|
|
1184
|
+
y: G.value.absoluteHeight - 3,
|
|
1185
|
+
"font-size": L.value.style.chart.layout.grid.axis.fontSize,
|
|
1186
|
+
fill: L.value.style.chart.layout.grid.axis.color
|
|
1187
|
+
}, w(L.value.style.chart.layout.grid.axis.xLabel), 9, gt)) : f("", !0)]),
|
|
1188
|
+
L.value.style.chart.layout.grid.yAxis.dataLabels.show ? (b(), p("g", {
|
|
1189
|
+
key: 2,
|
|
1190
|
+
ref_key: "scaleLabels",
|
|
1191
|
+
ref: un,
|
|
1192
|
+
class: _({
|
|
1193
|
+
"donut-opacity": !0,
|
|
1194
|
+
"donut-behind": A.value !== null
|
|
1195
|
+
})
|
|
1196
|
+
}, [(b(!0), p(l, null, S(fr.value, (e, t) => (b(), p("g", { key: `sl_${t}` }, [e.value >= X.value.min && e.value <= X.value.max ? (b(), p("path", {
|
|
1197
|
+
key: 0,
|
|
1198
|
+
class: _({ "vue-data-ui-transition": T(Rn) }),
|
|
1199
|
+
d: `M${W.value ? G.value.right : G.value.left},${e.y} ${W.value ? G.value.right + 5 : G.value.left - 5},${e.y}`,
|
|
1200
|
+
stroke: L.value.style.chart.layout.grid.stroke,
|
|
1201
|
+
"stroke-width": L.value.style.chart.layout.grid.strokeWidth,
|
|
1202
|
+
"stroke-linecap": "round"
|
|
1203
|
+
}, null, 10, _t)) : f("", !0), e.value >= X.value.min && e.value <= X.value.max ? (b(), p("text", {
|
|
1204
|
+
key: 1,
|
|
1205
|
+
class: _({ "vue-data-ui-transition": T(Rn) }),
|
|
1206
|
+
transform: `translate(${W.value ? G.value.right - L.value.style.chart.layout.grid.yAxis.dataLabels.offsetX + 7 : G.value.left + L.value.style.chart.layout.grid.yAxis.dataLabels.offsetX - 7}, ${e.y + L.value.style.chart.layout.grid.yAxis.dataLabels.fontSize / 3})`,
|
|
1207
|
+
"font-size": L.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,
|
|
1208
|
+
"text-anchor": W.value ? "start" : "end",
|
|
1209
|
+
fill: L.value.style.chart.layout.grid.yAxis.dataLabels.color,
|
|
1210
|
+
"font-weight": L.value.style.chart.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
1211
|
+
}, w(T(_e)(e.value) ? T(se)(L.value.style.chart.layout.dataLabels.formatter, e.value, T(re)({
|
|
1212
|
+
p: L.value.style.chart.layout.dataLabels.prefix,
|
|
1213
|
+
v: e.value,
|
|
1214
|
+
s: L.value.style.chart.layout.dataLabels.suffix,
|
|
1215
|
+
r: L.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue
|
|
1216
|
+
}), {
|
|
1217
|
+
datapoint: e,
|
|
1218
|
+
seriesIndex: t
|
|
1219
|
+
}) : ""), 11, vt)) : f("", !0)]))), 128))], 2)) : f("", !0),
|
|
1220
|
+
L.value.style.chart.layout.grid.xAxis.dataLabels.show ? (b(), p("g", {
|
|
1221
|
+
key: 3,
|
|
1222
|
+
ref_key: "timeLabelsEls",
|
|
1223
|
+
ref: dn,
|
|
1224
|
+
class: _({ "donut-opacity": !0 })
|
|
1225
|
+
}, [(b(!0), p(l, null, S(B.value.end - B.value.start, (e, t) => (b(), p("g", null, [(L.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast && (t === 0 || t === q.value - 1) || !L.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast) && J.value[t] && J.value[t].text ? (b(), p("g", yt, [String(J.value[t].text).includes("\n") ? (b(), p("text", {
|
|
1226
|
+
key: 1,
|
|
1227
|
+
class: "vue-data-ui-time-label",
|
|
1228
|
+
"text-anchor": L.value.style.chart.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : L.value.style.chart.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
1229
|
+
"font-size": L.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
|
|
1230
|
+
fill: L.value.style.chart.layout.grid.xAxis.dataLabels.color,
|
|
1231
|
+
transform: `translate(${G.value.left + Y.value * t + Y.value / 2}, ${G.value.bottom + L.value.style.chart.layout.grid.xAxis.dataLabels.fontSize + L.value.style.chart.layout.grid.xAxis.dataLabels.offsetY}), rotate(${L.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`,
|
|
1232
|
+
innerHTML: T(i)({
|
|
1233
|
+
content: String(J.value[t].text),
|
|
1234
|
+
fontSize: L.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
|
|
1235
|
+
fill: L.value.style.chart.layout.grid.xAxis.dataLabels.color,
|
|
1236
|
+
x: 0,
|
|
1237
|
+
y: 0
|
|
1238
|
+
})
|
|
1239
|
+
}, null, 8, xt)) : (b(), p("text", {
|
|
1240
|
+
key: 0,
|
|
1241
|
+
class: "vue-data-ui-time-label",
|
|
1242
|
+
"text-anchor": L.value.style.chart.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : L.value.style.chart.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
1243
|
+
"font-size": L.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
|
|
1244
|
+
fill: L.value.style.chart.layout.grid.xAxis.dataLabels.color,
|
|
1245
|
+
transform: `translate(${G.value.left + Y.value * t + Y.value / 2}, ${G.value.bottom + L.value.style.chart.layout.grid.xAxis.dataLabels.fontSize + L.value.style.chart.layout.grid.xAxis.dataLabels.offsetY}), rotate(${L.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`
|
|
1246
|
+
}, w(J.value[t].text || ""), 9, bt))])) : f("", !0)]))), 256))], 512)) : f("", !0),
|
|
1247
|
+
(b(!0), p(l, null, S(Z.value, (e, t) => (b(), p("g", null, [L.value.style.chart.layout.line.show && t < Z.value.length - 1 && ![e.subtotal, Z.value[t + 1].subtotal].includes(null) ? (b(), p("line", {
|
|
1248
|
+
key: 0,
|
|
1249
|
+
class: _({
|
|
1250
|
+
"donut-opacity": !0,
|
|
1251
|
+
"donut-behind": A.value !== null
|
|
1252
|
+
}),
|
|
1253
|
+
x1: e.x,
|
|
1254
|
+
y1: e.y,
|
|
1255
|
+
x2: Z.value[t + 1].x,
|
|
1256
|
+
y2: Z.value[t + 1].y,
|
|
1257
|
+
stroke: L.value.style.chart.layout.line.stroke,
|
|
1258
|
+
"stroke-width": L.value.style.chart.layout.line.strokeWidth,
|
|
1259
|
+
"stroke-linecap": "round",
|
|
1260
|
+
"stroke-linejoin": "round"
|
|
1261
|
+
}, null, 10, St)) : f("", !0), e.subtotal === null ? f("", !0) : (b(), p("g", Ct, [e.subtotal ? (b(), p("circle", {
|
|
1262
|
+
key: 0,
|
|
1263
|
+
cx: e.x,
|
|
1264
|
+
cy: e.y,
|
|
1265
|
+
r: e.activeRadius,
|
|
1266
|
+
fill: L.value.style.chart.backgroundColor
|
|
1267
|
+
}, null, 8, wt)) : f("", !0)]))]))), 256)),
|
|
1268
|
+
(b(!0), p(l, null, S(Z.value, (e, t) => (b(), p("g", { class: _({
|
|
1269
|
+
"donut-opacity": !0,
|
|
1270
|
+
"donut-behind": t !== A.value && A.value !== null
|
|
1271
|
+
}) }, [e.subtotal ? (b(), p("g", Tt, [A.value !== null && A.value === t ? (b(), p("g", Et, [
|
|
1272
|
+
(b(!0), p(l, null, S(e.donutHover, (t) => (b(), p("g", null, [Nr(t) ? (b(), p("path", {
|
|
1273
|
+
key: 0,
|
|
1274
|
+
d: T(oe)(t, {
|
|
1275
|
+
x: t.center.endX,
|
|
1276
|
+
y: t.center.endY
|
|
1277
|
+
}, 12, 12, {
|
|
1278
|
+
x: e.x,
|
|
1279
|
+
y: e.y
|
|
1280
|
+
}, !1, 20),
|
|
1281
|
+
stroke: t.color,
|
|
1282
|
+
"stroke-width": "1",
|
|
1283
|
+
"stroke-linecap": "round",
|
|
1284
|
+
"stroke-linejoin": "round",
|
|
1285
|
+
fill: "none"
|
|
1286
|
+
}, null, 8, Dt)) : f("", !0)]))), 256)),
|
|
1287
|
+
(b(!0), p(l, null, S(e.donutHover, (t, n) => (b(), p("g", null, [Nr(t) ? (b(), p("text", {
|
|
1288
|
+
key: 0,
|
|
1289
|
+
"data-cy-hover-label": "",
|
|
1290
|
+
"text-anchor": T(ae)(t, !0, 0).anchor,
|
|
1291
|
+
x: T(ae)(t, !0, 9).x,
|
|
1292
|
+
y: T(ue)(t, 14, 10),
|
|
1293
|
+
fill: L.value.style.chart.layout.grid.yAxis.dataLabels.color,
|
|
1294
|
+
"font-size": 8,
|
|
1295
|
+
"font-weight": "bold"
|
|
1296
|
+
}, w(t.name) + ": " + w(mr(t, e.donut)) + " (" + w(t.value === null ? "-" : pr(t.value, t, n)) + ") ", 9, Ot)) : f("", !0)]))), 256)),
|
|
1297
|
+
m("g", null, [m("circle", {
|
|
1298
|
+
cx: e.x,
|
|
1299
|
+
cy: e.y,
|
|
1300
|
+
r: e.hoverRadius,
|
|
1301
|
+
fill: L.value.style.chart.backgroundColor
|
|
1302
|
+
}, null, 8, kt)])
|
|
1303
|
+
])) : f("", !0)])) : f("", !0)], 2))), 256)),
|
|
1304
|
+
(b(!0), p(l, null, S(Z.value, (e, t) => (b(), p("g", { class: _({
|
|
1305
|
+
"donut-opacity": !0,
|
|
1306
|
+
"donut-behind": t !== A.value && A.value !== null
|
|
1307
|
+
}) }, [e.subtotal === null ? f("", !0) : (b(), p("g", At, [e.subtotal === 0 ? (b(), p("circle", {
|
|
1308
|
+
key: 0,
|
|
1309
|
+
cx: e.x,
|
|
1310
|
+
cy: e.y,
|
|
1311
|
+
r: 3,
|
|
1312
|
+
fill: L.value.style.chart.color
|
|
1313
|
+
}, null, 8, jt)) : A.value !== null && A.value === t ? (b(), p("g", Mt, [(b(!0), p(l, null, S(e.donutHover, (e, t) => (b(), p("path", {
|
|
1314
|
+
d: e.arcSlice,
|
|
1315
|
+
fill: `${e.color}`,
|
|
1316
|
+
"stroke-width": 1,
|
|
1317
|
+
stroke: L.value.style.chart.backgroundColor
|
|
1318
|
+
}, null, 8, Nt))), 256))])) : (b(), p("g", Pt, [(b(!0), p(l, null, S(e.donut, (e, t) => (b(), p("path", {
|
|
1319
|
+
d: e.arcSlice,
|
|
1320
|
+
fill: `${e.color}`,
|
|
1321
|
+
"stroke-width": .5,
|
|
1322
|
+
stroke: L.value.style.chart.backgroundColor
|
|
1323
|
+
}, null, 8, Ft))), 256))]))]))], 2))), 256)),
|
|
1324
|
+
(b(!0), p(l, null, S(Z.value, (e, t) => (b(), p("g", { class: _({
|
|
1325
|
+
"donut-opacity": !0,
|
|
1326
|
+
"donut-behind": t !== A.value && A.value !== null || nn.value && t !== M.value.index
|
|
1327
|
+
}) }, [e.subtotal !== null && L.value.style.chart.layout.dataLabels.show ? (b(), p("text", {
|
|
1328
|
+
key: 0,
|
|
1329
|
+
"text-anchor": "middle",
|
|
1330
|
+
x: e.x,
|
|
1331
|
+
y: A.value === e.index && e.subtotal ? e.y + L.value.style.chart.layout.dataLabels.fontSize / 3 : e.y - e.radius - L.value.style.chart.layout.dataLabels.fontSize + L.value.style.chart.layout.dataLabels.offsetY,
|
|
1332
|
+
"font-size": L.value.style.chart.layout.dataLabels.fontSize,
|
|
1333
|
+
"font-weight": "bold",
|
|
1334
|
+
fill: L.value.style.chart.layout.dataLabels.color
|
|
1335
|
+
}, w(pr(e.subtotal, e, t)), 9, It)) : f("", !0)], 2))), 256)),
|
|
1336
|
+
(b(!0), p(l, null, S(Z.value, (e, t) => (b(), p("rect", {
|
|
1337
|
+
x: G.value.left + t * Y.value,
|
|
1338
|
+
y: G.value.top,
|
|
1339
|
+
width: Y.value,
|
|
1340
|
+
height: G.value.height,
|
|
1341
|
+
fill: [A.value, _r.value].includes(e.index) ? `url(#hover_${O.value})` : "transparent",
|
|
1342
|
+
class: _({ "donut-hover": R.value && e.subtotal && [A.value, _r.value].includes(e.index) }),
|
|
1343
|
+
style: { pointerEvents: "none" }
|
|
1344
|
+
}, null, 10, Lt))), 256)),
|
|
1345
|
+
(b(!0), p(l, null, S(Z.value, (e, t) => (b(), p("rect", {
|
|
1346
|
+
"data-cy-trap": "",
|
|
1347
|
+
x: G.value.left + t * Y.value,
|
|
1348
|
+
y: G.value.top,
|
|
1349
|
+
width: Y.value,
|
|
1350
|
+
height: G.value.height,
|
|
1351
|
+
fill: "transparent",
|
|
1352
|
+
onMouseenter: (t) => gr(e),
|
|
1353
|
+
onMouseleave: (t) => hr(e),
|
|
1354
|
+
onClick: (n) => vr(e, t),
|
|
1355
|
+
class: _({ "donut-hover": R.value && A.value === e.index && e.subtotal })
|
|
1356
|
+
}, null, 42, Rt))), 256)),
|
|
1357
|
+
C(e.$slots, "svg", { svg: {
|
|
1358
|
+
...G.value,
|
|
1359
|
+
isPrintingImg: T(Zn) || T(Qn) || T(qr),
|
|
1360
|
+
isPrintingSvg: T(Jr)
|
|
1361
|
+
} }, void 0, !0)
|
|
1362
|
+
], 46, ct)), e.$slots.hint ? (b(), p("div", zt, [C(e.$slots, "hint", v(g({
|
|
1363
|
+
hint: L.value.a11y.translations.keyboardNavigation,
|
|
1364
|
+
isVisible: Nn.value
|
|
1365
|
+
})), void 0, !0)])) : f("", !0)]),
|
|
1366
|
+
e.$slots.watermark ? (b(), p("div", Bt, [C(e.$slots, "watermark", v(g({ isPrinting: T(Zn) || T(Qn) || T(qr) || T(Jr) })), void 0, !0)])) : f("", !0),
|
|
1367
|
+
m("div", {
|
|
1368
|
+
ref_key: "chartSlicer",
|
|
1369
|
+
ref: An,
|
|
1370
|
+
style: y(`width:100%;background:${L.value.style.chart.backgroundColor}`),
|
|
1371
|
+
"data-dom-to-png-ignore": ""
|
|
1372
|
+
}, [q.value > 1 && L.value.style.chart.zoom.show ? (b(), d(Le, {
|
|
1373
|
+
ref_key: "slicerComponent",
|
|
1374
|
+
ref: kn,
|
|
1375
|
+
key: `slicer_${on.value}`,
|
|
1376
|
+
background: L.value.style.chart.zoom.color,
|
|
1377
|
+
borderColor: L.value.style.chart.backgroundColor,
|
|
1378
|
+
fontSize: L.value.style.chart.zoom.fontSize,
|
|
1379
|
+
useResetSlot: L.value.style.chart.zoom.useResetSlot,
|
|
1380
|
+
timeLabels: J.value,
|
|
1381
|
+
textColor: L.value.style.chart.color,
|
|
1382
|
+
inputColor: L.value.style.chart.zoom.color,
|
|
1383
|
+
selectColor: L.value.style.chart.zoom.highlightColor,
|
|
1384
|
+
max: q.value,
|
|
1385
|
+
min: 0,
|
|
1386
|
+
valueStart: B.value.start,
|
|
1387
|
+
valueEnd: B.value.end,
|
|
1388
|
+
start: B.value.start,
|
|
1389
|
+
"onUpdate:start": t[0] ||= (e) => B.value.start = e,
|
|
1390
|
+
end: B.value.end,
|
|
1391
|
+
"onUpdate:end": t[1] ||= (e) => B.value.end = e,
|
|
1392
|
+
refreshStartPoint: L.value.style.chart.zoom.startIndex === null ? 0 : L.value.style.chart.zoom.startIndex,
|
|
1393
|
+
refreshEndPoint: L.value.style.chart.zoom.endIndex === null ? q.value : L.value.style.chart.zoom.endIndex + 1,
|
|
1394
|
+
enableRangeHandles: L.value.style.chart.zoom.enableRangeHandles,
|
|
1395
|
+
enableSelectionDrag: L.value.style.chart.zoom.enableSelectionDrag,
|
|
1396
|
+
focusOnDrag: L.value.style.chart.zoom.focusOnDrag,
|
|
1397
|
+
focusRangeRatio: L.value.style.chart.zoom.focusRangeRatio,
|
|
1398
|
+
isCursorPointer: R.value,
|
|
1399
|
+
maxWidth: L.value.style.chart.zoom.maxWidth,
|
|
1400
|
+
minimapLeftInsetRatio: G.value.absoluteWidth > 0 && L.value.style.chart.zoom.autoFit ? G.value.left / G.value.absoluteWidth : null,
|
|
1401
|
+
minimapRightInsetRatio: G.value.absoluteWidth > 0 && L.value.style.chart.zoom.autoFit ? (G.value.absoluteWidth - G.value.right) / G.value.absoluteWidth : null,
|
|
1402
|
+
onReset: Wn
|
|
1403
|
+
}, {
|
|
1404
|
+
"reset-action": E(({ reset: t }) => [C(e.$slots, "reset-action", v(g({ reset: t })), void 0, !0)]),
|
|
1405
|
+
_: 3
|
|
1406
|
+
}, 8, [
|
|
1407
|
+
"background",
|
|
1408
|
+
"borderColor",
|
|
1409
|
+
"fontSize",
|
|
1410
|
+
"useResetSlot",
|
|
1411
|
+
"timeLabels",
|
|
1412
|
+
"textColor",
|
|
1413
|
+
"inputColor",
|
|
1414
|
+
"selectColor",
|
|
1415
|
+
"max",
|
|
1416
|
+
"valueStart",
|
|
1417
|
+
"valueEnd",
|
|
1418
|
+
"start",
|
|
1419
|
+
"end",
|
|
1420
|
+
"refreshStartPoint",
|
|
1421
|
+
"refreshEndPoint",
|
|
1422
|
+
"enableRangeHandles",
|
|
1423
|
+
"enableSelectionDrag",
|
|
1424
|
+
"focusOnDrag",
|
|
1425
|
+
"focusRangeRatio",
|
|
1426
|
+
"isCursorPointer",
|
|
1427
|
+
"maxWidth",
|
|
1428
|
+
"minimapLeftInsetRatio",
|
|
1429
|
+
"minimapRightInsetRatio"
|
|
1430
|
+
])) : f("", !0)], 4),
|
|
1431
|
+
m("div", { id: `legend-bottom-${O.value}` }, null, 8, Vt),
|
|
1432
|
+
mn.value && (L.value.style.chart.legend.show || e.$slots.legend) ? (b(), d(We, {
|
|
1433
|
+
key: 6,
|
|
1434
|
+
to: L.value.style.chart.legend.position === "top" ? `#legend-top-${O.value}` : `#legend-bottom-${O.value}`
|
|
1435
|
+
}, [m("div", {
|
|
1436
|
+
ref_key: "chartLegend",
|
|
1437
|
+
ref: Dn
|
|
1438
|
+
}, [C(e.$slots, "legend", { legend: yr.value }, () => [L.value.style.chart.legend.show ? (b(), d(He, {
|
|
1439
|
+
key: `legend_${ln.value}`,
|
|
1440
|
+
legendSet: yr.value,
|
|
1441
|
+
config: xr.value,
|
|
1442
|
+
onClickMarker: t[2] ||= ({ legend: e }) => Cr(e.uid)
|
|
1443
|
+
}, {
|
|
1444
|
+
item: E(({ legend: e, index: t }) => [m("div", {
|
|
1445
|
+
onClick: (t) => Cr(e.uid),
|
|
1446
|
+
style: y(`opacity:${k.value.includes(e.uid) ? .5 : 1}`)
|
|
1447
|
+
}, w(e.display), 13, Ht)]),
|
|
1448
|
+
legendToggle: E(() => [yr.value.length > 2 && L.value.style.chart.legend.selectAllToggle.show && !T(Bn) ? (b(), d(Re, {
|
|
1449
|
+
key: 0,
|
|
1450
|
+
backgroundColor: L.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1451
|
+
color: L.value.style.chart.legend.selectAllToggle.color,
|
|
1452
|
+
fontSize: L.value.style.chart.legend.fontSize,
|
|
1453
|
+
checked: k.value.length > 0,
|
|
1454
|
+
onToggle: Sr
|
|
1455
|
+
}, null, 8, [
|
|
1456
|
+
"backgroundColor",
|
|
1457
|
+
"color",
|
|
1458
|
+
"fontSize",
|
|
1459
|
+
"checked"
|
|
1460
|
+
])) : f("", !0)]),
|
|
1461
|
+
_: 1
|
|
1462
|
+
}, 8, ["legendSet", "config"])) : f("", !0)], !0)], 512)], 8, ["to"])) : f("", !0),
|
|
1463
|
+
e.$slots.source ? (b(), p("div", {
|
|
1464
|
+
key: 7,
|
|
1465
|
+
ref_key: "source",
|
|
1466
|
+
ref: On,
|
|
1467
|
+
dir: "auto"
|
|
1468
|
+
}, [C(e.$slots, "source", {}, void 0, !0)], 512)) : f("", !0),
|
|
1469
|
+
Fn.value && L.value.userOptions.buttons.table ? (b(), d(Qe(Vr.value.component), Je({ key: 8 }, Vr.value.props, {
|
|
1470
|
+
ref_key: "tableUnit",
|
|
1471
|
+
ref: hn,
|
|
1472
|
+
onClose: Hr
|
|
1473
|
+
}), Ge({
|
|
1474
|
+
content: E(() => [(b(), d(T(qt), {
|
|
1475
|
+
key: `table_${cn.value}`,
|
|
1476
|
+
colNames: Q.value.colNames,
|
|
1477
|
+
head: Q.value.head,
|
|
1478
|
+
body: Q.value.body,
|
|
1479
|
+
config: Q.value.config,
|
|
1480
|
+
title: L.value.table.useDialog ? "" : Vr.value.title,
|
|
1481
|
+
withCloseButton: !L.value.table.useDialog,
|
|
1482
|
+
isCursorPointer: R.value,
|
|
1483
|
+
onClose: Hr
|
|
1484
|
+
}, {
|
|
1485
|
+
th: E(({ th: e }) => [Ke(w(e.name ?? e), 1)]),
|
|
1486
|
+
td: E(({ td: e }) => [e.value === null ? (b(), p("span", Ut, "-")) : (b(), p("b", Wt, w(isNaN(e.value) ? "" : L.value.style.chart.layout.dataLabels.prefix) + w(!isNaN(e.value) && e.value !== null ? Number(e.value.toFixed(L.value.table.td.roundingValue)).toLocaleString() : e) + w(isNaN(e.value) ? "" : L.value.style.chart.layout.dataLabels.suffix), 1)), m("span", null, w(e.percentage && !isNaN(e.percentage) ? `(${Number(e.percentage.toFixed(L.value.table.td.roundingPercentage)).toLocaleString()}%)` : ""), 1)]),
|
|
1487
|
+
_: 1
|
|
1488
|
+
}, 8, [
|
|
1489
|
+
"colNames",
|
|
1490
|
+
"head",
|
|
1491
|
+
"body",
|
|
1492
|
+
"config",
|
|
1493
|
+
"title",
|
|
1494
|
+
"withCloseButton",
|
|
1495
|
+
"isCursorPointer"
|
|
1496
|
+
]))]),
|
|
1497
|
+
_: 2
|
|
1498
|
+
}, [L.value.table.useDialog ? {
|
|
1499
|
+
name: "title",
|
|
1500
|
+
fn: E(() => [Ke(w(Vr.value.title), 1)]),
|
|
1501
|
+
key: "0"
|
|
1502
|
+
} : void 0, L.value.table.useDialog ? {
|
|
1503
|
+
name: "actions",
|
|
1504
|
+
fn: E(() => [m("button", {
|
|
1505
|
+
tabindex: "0",
|
|
1506
|
+
class: "vue-ui-user-options-button",
|
|
1507
|
+
onClick: t[3] ||= (e) => Or(L.value.userOptions.callbacks.csv),
|
|
1508
|
+
style: y({ cursor: R.value ? "cursor" : "default" })
|
|
1509
|
+
}, [qe(T(Kt), {
|
|
1510
|
+
name: "fileCsv",
|
|
1511
|
+
stroke: Vr.value.props.color
|
|
1512
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1513
|
+
key: "1"
|
|
1514
|
+
} : void 0]), 1040)) : f("", !0),
|
|
1515
|
+
L.value.style.chart.dialog.show ? (b(), d(T(Qt), {
|
|
1516
|
+
key: 9,
|
|
1517
|
+
ref_key: "dialog",
|
|
1518
|
+
ref: Ir,
|
|
1519
|
+
onClose: t[4] ||= (e) => {
|
|
1520
|
+
M.value = null, nn.value = !1, j.value = null, A.value = null, _r.value = null;
|
|
1521
|
+
},
|
|
1522
|
+
backgroundColor: L.value.style.chart.dialog.backgroundColor,
|
|
1523
|
+
color: L.value.style.chart.dialog.color,
|
|
1524
|
+
headerBg: L.value.style.chart.dialog.header.backgroundColor,
|
|
1525
|
+
headerColor: L.value.style.chart.dialog.header.color,
|
|
1526
|
+
isFullscreen: $.value,
|
|
1527
|
+
fullscreenParent: N.value
|
|
1528
|
+
}, {
|
|
1529
|
+
title: E(() => [Ke(w(J.value[Number(M.value.index)] ? J.value[Number(M.value.index)].text : ""), 1)]),
|
|
1530
|
+
content: E(() => [M.value ? (b(), d(T(Zt), {
|
|
1531
|
+
key: 0,
|
|
1532
|
+
config: Fr.value,
|
|
1533
|
+
dataset: Pr.value
|
|
1534
|
+
}, null, 8, ["config", "dataset"])) : f("", !0)]),
|
|
1535
|
+
_: 1
|
|
1536
|
+
}, 8, [
|
|
1537
|
+
"backgroundColor",
|
|
1538
|
+
"color",
|
|
1539
|
+
"headerBg",
|
|
1540
|
+
"headerColor",
|
|
1541
|
+
"isFullscreen",
|
|
1542
|
+
"fullscreenParent"
|
|
1543
|
+
])) : f("", !0),
|
|
1544
|
+
T(Bn) ? (b(), d(we, { key: 10 })) : f("", !0)
|
|
1545
|
+
], 46, it));
|
|
1546
|
+
}
|
|
1547
|
+
}, [["__scopeId", "data-v-d2e3ee5d"]]);
|
|
1548
|
+
//#endregion
|
|
1549
|
+
export { rt as n, Gt as t };
|