vue-data-ui 3.0.0-next.9 → 3.0.0
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/README.md +32 -30
- package/dist/{Arrow-B6OlqyCG.js → Arrow-r2f8Bpd-.js} +1 -1
- package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
- package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-CXtL10fo.js} +1 -1
- package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-H91bBsqM.js} +2 -2
- package/dist/{DataTable--paavNqF.js → DataTable-BSSXpM7w.js} +2 -2
- package/dist/{Legend-BZ06qU55.js → Legend-BUk0WvWJ.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
- package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CJ6Vd7V5.js} +3 -3
- package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3zudcNI.js} +32 -32
- package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
- package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
- package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
- package/dist/{Shape-Mr1eIp_G.js → Shape-BRzOzubn.js} +43 -37
- package/dist/Slicer-MID8pgT3.js +602 -0
- package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-DATI1fGZ.js} +7 -7
- package/dist/{Title-B2dA6-uH.js → Title-BGu6gEd2.js} +1 -1
- package/dist/{Tooltip-O_hCvqgF.js → Tooltip-Bh2zYSoM.js} +23 -19
- package/dist/{UserOptions-Bk03FRqW.js → UserOptions-Ck8fz9f4.js} +2 -2
- package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-DhIh24Ti.js} +1 -1
- package/dist/{img-C_9wps3s.js → img-DrR839Ot.js} +1 -1
- package/dist/{index-CgShIRes.js → index-BtNwOUja.js} +2885 -2010
- package/dist/{pdf-CXdbjyRJ.js → pdf-DoShrdT5.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +753 -65
- package/dist/types/vue-data-ui.d.ts +753 -65
- package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-f2H3m6Yj.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DUNjpQNe.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
- package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-D7QVxNhO.js} +105 -100
- package/dist/vue-data-ui.js +26 -25
- package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
- package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-BKUrAowe.js} +3 -3
- package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
- package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
- package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
- package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
- package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
- package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
- package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
- package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
- package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
- package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
- package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-zKn3uhGN.js} +2 -2
- package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-BtnIwS_E.js} +431 -422
- package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
- package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
- package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
- package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
- package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
- package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
- package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
- package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
- package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
- package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
- package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
- package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
- package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
- package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
- package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
- package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
- package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
- package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
- package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-Bh35aujf.js} +2 -2
- package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
- package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
- package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
- package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
- package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
- package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
- package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
- package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
- package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
- package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
- package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
- package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
- package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
- package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
- package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BXOLZXuz.js} +17 -17
- package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
- package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
- package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
- package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
- package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
- package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
- package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-C-i2dRnU.js} +104 -102
- package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
- package/dist/vue-ui-wheel-waZf462K.js +379 -0
- package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
- package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-Cx4uuwTY.js} +364 -327
- package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
- package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
- package/package.json +4 -4
- package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
- package/dist/Slicer-3t0HimeE.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-BC4Ciblw.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
- package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
- package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
- package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
- package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
- package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
- package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
- package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
- package/dist/vue-ui-flow-MvORTthN.js +0 -765
- package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
- package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
- package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
- package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
- package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
- package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
- package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
- package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
- package/dist/vue-ui-onion-DXLokGec.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
- package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
- package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
- package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
- package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
- package/dist/vue-ui-rings-Duay-EmS.js +0 -685
- package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
- package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
- package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
- package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
- package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
- package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
- package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
- package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
- package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
- package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
- package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
- package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
- package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
- package/dist/vue-ui-wheel-tydUATi8.js +0 -352
- package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
- package/dist/vue-ui-xy--HToGdle.js +0 -2982
|
@@ -0,0 +1,1076 @@
|
|
|
1
|
+
import { defineAsyncComponent as V, ref as c, shallowRef as vt, computed as f, onMounted as jt, toRefs as qt, nextTick as Ce, watch as Le, watchEffect as Jt, onBeforeUnmount as Kt, createElementBlock as n, openBlock as u, unref as i, normalizeStyle as J, normalizeClass as N, createBlock as T, createCommentVNode as v, createElementVNode as p, createSlots as Qt, withCtx as _, renderSlot as S, normalizeProps as K, guardReactiveProps as Q, createVNode as Zt, Fragment as z, renderList as $, toDisplayString as m, createTextVNode as dt } from "vue";
|
|
2
|
+
import { u as el, c as ht, o as yt, f as se, g as tl, t as ll, a as al, p as ne, b as ol, C as ft, d as ul, e as _e, G as sl, D as gt, m as Ae, X as nl, s as Z, H as rl, k as Se, i as re, I as il, n as cl, q as vl, r as mt, v as dl, w as hl, J as bt, K as yl } from "./index-BtNwOUja.js";
|
|
3
|
+
import { u as fl } from "./useChartAccessibility-9icAAmYg.js";
|
|
4
|
+
import { u as xt } from "./useNestedProp-f2H3m6Yj.js";
|
|
5
|
+
import { u as gl } from "./usePrinter-DUNjpQNe.js";
|
|
6
|
+
import { u as ml } from "./useTimeLabels-DkzmKfZn.js";
|
|
7
|
+
import { u as bl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
+
import { u as xl } from "./useTimeLabelCollider-CIsgDrl9.js";
|
|
9
|
+
import pl from "./Legend-BUk0WvWJ.js";
|
|
10
|
+
import { S as kl } from "./Slicer-MID8pgT3.js";
|
|
11
|
+
import wl from "./Title-BGu6gEd2.js";
|
|
12
|
+
import Cl from "./img-DrR839Ot.js";
|
|
13
|
+
import { t as pt, u as Ll } from "./useResponsive-DfdjqQps.js";
|
|
14
|
+
import { u as _l, B as Al } from "./useLoading-D7YHNtLX.js";
|
|
15
|
+
import { _ as Sl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
+
const zl = ["id"], $l = ["xmlns", "viewBox"], Il = ["x", "y", "width", "height"], Nl = ["id"], Tl = ["stop-color"], Ol = ["stop-color"], Pl = ["id"], Dl = ["stop-color"], Fl = ["stop-color"], El = ["stop-color"], Rl = { key: 1 }, Vl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ml = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Hl = { key: 0 }, Bl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ul = ["font-size", "fill", "transform"], Xl = ["x", "y", "font-size", "fill"], Gl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Wl = ["x", "y", "font-size", "fill", "font-weight"], Yl = { key: 0 }, jl = ["text-anchor", "font-size", "fill", "transform"], ql = ["text-anchor", "font-size", "fill", "transform", "innerHTML"], Jl = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Kl = { key: 1 }, Ql = ["cx", "cy", "r", "fill"], Zl = { key: 0 }, ea = { key: 0 }, ta = ["d", "stroke"], la = ["text-anchor", "x", "y", "fill"], aa = ["cx", "cy", "r", "fill"], oa = { key: 0 }, ua = ["cx", "cy", "fill"], sa = { key: 1 }, na = ["d", "fill", "stroke"], ra = { key: 2 }, ia = ["d", "fill", "stroke"], ca = ["x", "y", "font-size", "fill"], va = ["x", "y", "width", "height", "fill"], da = ["x", "y", "width", "height", "onMouseenter", "onMouseleave", "onClick"], ha = {
|
|
17
|
+
key: 4,
|
|
18
|
+
class: "vue-data-ui-watermark"
|
|
19
|
+
}, ya = ["onClick"], fa = { key: 0 }, ga = { key: 1 }, ma = {
|
|
20
|
+
__name: "vue-ui-donut-evolution",
|
|
21
|
+
props: {
|
|
22
|
+
config: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default() {
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
dataset: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default() {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
emits: ["selectLegend"],
|
|
36
|
+
setup(kt, { expose: wt, emit: Ct }) {
|
|
37
|
+
const Lt = V(() => import("./vue-ui-accordion-BKUrAowe.js")), _t = V(() => import("./BaseDraggableDialog-CGGcf8d8.js")), At = V(() => import("./DataTable-BSSXpM7w.js")), St = V(() => import("./PackageVersion-CJ6Vd7V5.js")), zt = V(() => import("./PenAndPaper-D3zudcNI.js")), $t = V(() => import("./UserOptions-Ck8fz9f4.js")), It = V(() => import("./vue-ui-donut-BtnIwS_E.js")), { vue_ui_donut_evolution: Nt } = el(), b = kt, M = c(ht()), w = c([]), g = c(null), ee = c(null), ie = c(!1), E = c(null), P = c(null), Tt = c(null), ze = c(0), $e = c(0), Ie = c(0), Ne = c(0), Te = c(0), ce = c(null), te = c(null), ve = c(null), de = c(null), Oe = c(null), Pe = c(null), De = c(null), Fe = c(null), Ee = c(null), he = c(!1), Y = vt(null), le = vt(null), Re = c(null), Ve = Ct, Me = f(() => !!b.dataset && b.dataset.length);
|
|
38
|
+
jt(() => {
|
|
39
|
+
He();
|
|
40
|
+
});
|
|
41
|
+
const ae = f(() => !!e.value.debug);
|
|
42
|
+
function He() {
|
|
43
|
+
if (yt(b.dataset) ? (se({
|
|
44
|
+
componentName: "VueUiDonutEvolution",
|
|
45
|
+
type: "dataset",
|
|
46
|
+
debug: ae.value
|
|
47
|
+
}), oe.value = !0) : b.dataset.length && b.dataset.forEach((t, a) => {
|
|
48
|
+
tl({
|
|
49
|
+
datasetObject: t,
|
|
50
|
+
requiredAttributes: ["name", "values"]
|
|
51
|
+
}).forEach((l) => {
|
|
52
|
+
se({
|
|
53
|
+
componentName: "VueUiDonutEvolution",
|
|
54
|
+
type: "datasetSerieAttribute",
|
|
55
|
+
property: l,
|
|
56
|
+
index: a,
|
|
57
|
+
debug: ae.value
|
|
58
|
+
}), oe.value = !0;
|
|
59
|
+
});
|
|
60
|
+
}), yt(b.dataset) || (oe.value = e.value.loading), setTimeout(() => {
|
|
61
|
+
he.value = !0;
|
|
62
|
+
}, 10), fe(), e.value.responsive) {
|
|
63
|
+
const t = pt(() => {
|
|
64
|
+
he.value = !1;
|
|
65
|
+
const { width: a, height: l } = Ll({
|
|
66
|
+
chart: P.value,
|
|
67
|
+
title: e.value.style.chart.title.text ? Oe.value : null,
|
|
68
|
+
legend: e.value.style.chart.legend.show ? Pe.value : null,
|
|
69
|
+
slicer: e.value.style.chart.zoom.show && Ue.value > 1 ? Ee.value : null,
|
|
70
|
+
source: De.value
|
|
71
|
+
});
|
|
72
|
+
requestAnimationFrame(() => {
|
|
73
|
+
H.value.width = a, H.value.height = l - 12, clearTimeout(Re.value), Re.value = setTimeout(() => {
|
|
74
|
+
he.value = !0;
|
|
75
|
+
}, 10);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
Y.value && (le.value && Y.value.unobserve(le.value), Y.value.disconnect()), Y.value = new ResizeObserver(t), le.value = P.value.parentNode, Y.value.observe(le.value);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const e = c(me()), { loading: Be, FINAL_DATASET: ye, manualLoading: oe } = _l({
|
|
82
|
+
...qt(b),
|
|
83
|
+
FINAL_CONFIG: e,
|
|
84
|
+
prepareConfig: me,
|
|
85
|
+
callback: () => {
|
|
86
|
+
Promise.resolve().then(async () => {
|
|
87
|
+
await fe();
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
skeletonDataset: [
|
|
91
|
+
{
|
|
92
|
+
name: "",
|
|
93
|
+
values: [1, 2, 3, 5, 8, 13],
|
|
94
|
+
color: "#AAAAAA"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "",
|
|
98
|
+
values: [1, 2, 3, 5, 8, 13],
|
|
99
|
+
color: "#BABABA"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "",
|
|
103
|
+
values: [1, 2, 3, 5, 8, 13],
|
|
104
|
+
color: "#CACACA"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
skeletonConfig: ll({
|
|
108
|
+
defaultConfig: e.value,
|
|
109
|
+
userConfig: {
|
|
110
|
+
useCssAnimation: !1,
|
|
111
|
+
table: { show: !1 },
|
|
112
|
+
userOptions: { show: !1 },
|
|
113
|
+
style: {
|
|
114
|
+
chart: {
|
|
115
|
+
backgroundColor: "#99999930",
|
|
116
|
+
layout: {
|
|
117
|
+
dataLabels: { show: !1 },
|
|
118
|
+
grid: {
|
|
119
|
+
stroke: "#6A6A6A",
|
|
120
|
+
axis: {
|
|
121
|
+
yLabel: "",
|
|
122
|
+
xLabel: ""
|
|
123
|
+
},
|
|
124
|
+
yAxis: {
|
|
125
|
+
dataLabels: { show: !1 }
|
|
126
|
+
},
|
|
127
|
+
xAxis: {
|
|
128
|
+
dataLabels: { show: !1 }
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
line: {
|
|
132
|
+
stroke: "#CACACA60"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
legend: {
|
|
136
|
+
backgroundColor: "transparent",
|
|
137
|
+
showValue: !1,
|
|
138
|
+
showPercentage: !1
|
|
139
|
+
},
|
|
140
|
+
zoom: {
|
|
141
|
+
show: !1,
|
|
142
|
+
startIndex: null,
|
|
143
|
+
endIndex: null
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
})
|
|
149
|
+
}), H = c({
|
|
150
|
+
width: e.value.style.chart.layout.width,
|
|
151
|
+
height: e.value.style.chart.layout.height
|
|
152
|
+
}), Ue = f(() => Math.max(...ye.value.map((t) => t.values.length))), h = c({
|
|
153
|
+
start: 0,
|
|
154
|
+
end: Ue.value
|
|
155
|
+
});
|
|
156
|
+
function Xe() {
|
|
157
|
+
fe();
|
|
158
|
+
}
|
|
159
|
+
async function fe() {
|
|
160
|
+
await Ce(), await Ce();
|
|
161
|
+
const { startIndex: t, endIndex: a } = e.value.style.chart.zoom, l = Fe.value;
|
|
162
|
+
(t != null || a != null) && l ? (t != null && l.setStartValue(t), a != null && l.setEndValue(Ot(a + 1))) : (h.value = {
|
|
163
|
+
start: 0,
|
|
164
|
+
end: D.value
|
|
165
|
+
}, $e.value += 1);
|
|
166
|
+
}
|
|
167
|
+
function Ot(t) {
|
|
168
|
+
const a = D.value;
|
|
169
|
+
return t > a ? a : t < 0 || e.value.style.chart.zoom.startIndex !== null && t < e.value.style.chart.zoom.startIndex ? e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex + 1 : 1 : t;
|
|
170
|
+
}
|
|
171
|
+
const { userOptionsVisible: ge, setUserOptionsVisibility: Ge, keepUserOptionState: We } = bl({ config: e.value }), { svgRef: Ye } = fl({ config: e.value.style.chart.title });
|
|
172
|
+
function me() {
|
|
173
|
+
const t = xt({
|
|
174
|
+
userConfig: b.config,
|
|
175
|
+
defaultConfig: Nt
|
|
176
|
+
});
|
|
177
|
+
let a = {};
|
|
178
|
+
return t.theme ? a = {
|
|
179
|
+
...xt({
|
|
180
|
+
userConfig: ol.vue_ui_donut_evolution[t.theme] || b.config,
|
|
181
|
+
defaultConfig: t
|
|
182
|
+
}),
|
|
183
|
+
customPalette: al[t.theme] || ne
|
|
184
|
+
} : a = t, b.config && ft(b.config, "style.chart.zoom.startIndex") ? a.style.chart.zoom.startIndex = b.config.style.chart.zoom.startIndex : a.style.chart.zoom.startIndex = null, b.config && ft(b.config, "style.chart.zoom.endIndex") ? a.style.chart.zoom.endIndex = b.config.style.chart.zoom.endIndex : a.style.chart.zoom.endIndex = null, a;
|
|
185
|
+
}
|
|
186
|
+
Le(() => b.config, (t) => {
|
|
187
|
+
Be.value || (e.value = me()), ge.value = !e.value.userOptions.showOnChartHover, He(), Ie.value += 1, Ne.value += 1, Te.value += 1, B.value.showTable = e.value.table.show;
|
|
188
|
+
}, { deep: !0 }), Le(() => b.dataset, (t) => {
|
|
189
|
+
Array.isArray(t) && t.length > 0 && (oe.value = !1), Xe();
|
|
190
|
+
}, { deep: !0 });
|
|
191
|
+
const { isPrinting: je, isImaging: qe, generatePdf: Je, generateImage: Ke } = gl({
|
|
192
|
+
elementId: M.value,
|
|
193
|
+
fileName: e.value.style.chart.title.text || "vue-ui-donut-evolution",
|
|
194
|
+
options: e.value.userOptions.print
|
|
195
|
+
}), Pt = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), Dt = f(() => ul(e.value.customPalette)), B = c({
|
|
196
|
+
showTable: e.value.table.show
|
|
197
|
+
});
|
|
198
|
+
Le(e, () => {
|
|
199
|
+
B.value = {
|
|
200
|
+
showTable: e.value.table.show
|
|
201
|
+
};
|
|
202
|
+
}, { immediate: !0 });
|
|
203
|
+
const R = f(() => ({
|
|
204
|
+
top: e.value.style.chart.layout.padding.top,
|
|
205
|
+
right: e.value.style.chart.layout.padding.right,
|
|
206
|
+
bottom: e.value.style.chart.layout.padding.bottom,
|
|
207
|
+
left: e.value.style.chart.layout.padding.left
|
|
208
|
+
}));
|
|
209
|
+
function Ft() {
|
|
210
|
+
let t = 0;
|
|
211
|
+
ce.value && (t = Array.from(ce.value.querySelectorAll("text")).reduce((o, y) => {
|
|
212
|
+
const d = y.getComputedTextLength();
|
|
213
|
+
return (d > o ? d : o) + e.value.style.chart.layout.grid.axis.yLabelOffsetX;
|
|
214
|
+
}, 0));
|
|
215
|
+
const a = de.value ? de.value.getBoundingClientRect().width + e.value.style.chart.layout.grid.axis.yLabelOffsetX + e.value.style.chart.layout.grid.axis.fontSize : 0;
|
|
216
|
+
return t + a + 5;
|
|
217
|
+
}
|
|
218
|
+
const be = c(0), Et = pt((t) => {
|
|
219
|
+
be.value = t;
|
|
220
|
+
}, 100);
|
|
221
|
+
Jt((t) => {
|
|
222
|
+
const a = te.value;
|
|
223
|
+
if (!a) return;
|
|
224
|
+
const l = new ResizeObserver((s) => {
|
|
225
|
+
Et(s[0].contentRect.height);
|
|
226
|
+
});
|
|
227
|
+
l.observe(a), t(() => l.disconnect());
|
|
228
|
+
}), Kt(() => {
|
|
229
|
+
be.value = 0;
|
|
230
|
+
});
|
|
231
|
+
const Qe = f(() => {
|
|
232
|
+
let t = 0;
|
|
233
|
+
ve.value && (t = ve.value.getBBox().height);
|
|
234
|
+
let a = 0;
|
|
235
|
+
return te.value && (a = be.value), t + a + e.value.style.chart.layout.grid.axis.fontSize + e.value.style.chart.layout.grid.xAxis.dataLabels.offsetY;
|
|
236
|
+
}), r = f(() => {
|
|
237
|
+
const t = Ft(), a = e.value.style.chart.layout.dataLabels.fontSize * 3, l = H.value.width, s = H.value.height, o = R.value.left + t, y = l - R.value.right, d = l - o - R.value.right, x = s - R.value.top - R.value.bottom - a - Qe.value, W = R.value.top + a, F = s - R.value.bottom - Qe.value;
|
|
238
|
+
return {
|
|
239
|
+
top: W,
|
|
240
|
+
left: o,
|
|
241
|
+
right: y,
|
|
242
|
+
bottom: F,
|
|
243
|
+
absoluteHeight: s,
|
|
244
|
+
absoluteWidth: l,
|
|
245
|
+
centerX: o + Math.max(10, d) / 2,
|
|
246
|
+
centerY: W + Math.max(10, x) / 2,
|
|
247
|
+
width: Math.max(10, d),
|
|
248
|
+
height: Math.max(10, x)
|
|
249
|
+
};
|
|
250
|
+
}), O = f(() => (ye.value.forEach((t, a) => {
|
|
251
|
+
[null, void 0].includes(t.name) && se({
|
|
252
|
+
componentName: "VueUiDonutEvolution",
|
|
253
|
+
type: "datasetSerieAttribute",
|
|
254
|
+
property: "name",
|
|
255
|
+
index: a,
|
|
256
|
+
debug: ae.value
|
|
257
|
+
}), [null, void 0].includes(t.values) && se({
|
|
258
|
+
componentName: "VueUiDonutEvolution",
|
|
259
|
+
type: "datasetSerieAttribute",
|
|
260
|
+
property: "values",
|
|
261
|
+
index: a,
|
|
262
|
+
debug: ae.value
|
|
263
|
+
});
|
|
264
|
+
}), ye.value.map((t, a) => ({
|
|
265
|
+
...t,
|
|
266
|
+
values: sl(t.values),
|
|
267
|
+
color: _e(t.color) || Dt.value[a] || ne[a] || ne[a % ne.length],
|
|
268
|
+
length: (t.values || []).length,
|
|
269
|
+
uid: ht()
|
|
270
|
+
})))), j = f(() => O.value.filter((t) => !w.value.includes(t.uid)).map((t) => ({
|
|
271
|
+
...t,
|
|
272
|
+
values: t.values.filter((a, l) => l >= h.value.start && l <= h.value.end)
|
|
273
|
+
}))), D = f(() => Math.max(...j.value.map((t) => t.length))), C = f(() => ml({
|
|
274
|
+
values: e.value.style.chart.layout.grid.xAxis.dataLabels.values,
|
|
275
|
+
maxDatapoints: D.value,
|
|
276
|
+
formatter: e.value.style.chart.layout.grid.xAxis.dataLabels.datetimeFormatter,
|
|
277
|
+
start: h.value.start,
|
|
278
|
+
end: h.value.end
|
|
279
|
+
})), k = f(() => r.value.width / (h.value.end - h.value.start)), L = f(() => {
|
|
280
|
+
const t = [];
|
|
281
|
+
for (let o = 0; o < h.value.end - h.value.start; o += 1) {
|
|
282
|
+
const y = j.value.map((I) => I.values[o] ?? null), d = y.filter((I) => [void 0, null].includes(I)).length === y.length, x = y.reduce((I, A) => I + A, 0), W = y.map((I) => I / x), F = r.value.left + k.value * o + k.value / 2;
|
|
283
|
+
t.push({
|
|
284
|
+
index: o,
|
|
285
|
+
percentages: W,
|
|
286
|
+
subtotal: d || x < 0 ? null : x,
|
|
287
|
+
values: y,
|
|
288
|
+
x: F
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
const a = 0, l = Math.max(...t.map((o) => o.subtotal)), s = t.length === 1 ? l * 2 : l;
|
|
292
|
+
return t.map((o, y) => {
|
|
293
|
+
const d = Math.min(r.value.width / 24, k.value / 2 * 0.7), x = d > r.value.width / 16 ? r.value.width / 16 : d, W = g.value === o.index ? r.value.width / 16 : x, F = t.length > 4 ? d * 2 : d * 2 > k.value / 2 * 0.7 ? k.value / 2 * 0.7 : d * 2, I = r.value.bottom - r.value.height * o.subtotal / gt(a, s, e.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;
|
|
294
|
+
return {
|
|
295
|
+
...o,
|
|
296
|
+
y: I,
|
|
297
|
+
radius: x,
|
|
298
|
+
activeRadius: W,
|
|
299
|
+
hoverRadius: F,
|
|
300
|
+
donut: Ae({
|
|
301
|
+
series: j.value.map((A, ct) => ({
|
|
302
|
+
color: A.color,
|
|
303
|
+
name: A.name,
|
|
304
|
+
value: A.values[y] ?? 0
|
|
305
|
+
}))
|
|
306
|
+
}, o.x, I, x, x, 1.99999, 2, 1, 360, 105.25, x / 2),
|
|
307
|
+
donutHover: Ae({
|
|
308
|
+
series: j.value.map((A, ct) => ({
|
|
309
|
+
color: A.color,
|
|
310
|
+
name: A.name,
|
|
311
|
+
value: A.values[y] ?? 0
|
|
312
|
+
}))
|
|
313
|
+
}, o.x, I, F, F, 1.99999, 2, 1, 360, 105.25, F / 2),
|
|
314
|
+
donutFocus: Ae({
|
|
315
|
+
series: j.value.map((A, ct) => ({
|
|
316
|
+
color: A.color,
|
|
317
|
+
name: A.name,
|
|
318
|
+
value: A.values[y] ?? 0
|
|
319
|
+
}))
|
|
320
|
+
}, r.value.centerX, r.value.centerY, r.value.height / 3.6, r.value.height / 3.6, 1.99999, 2, 1, 360, 105.25, r.value.height / 6)
|
|
321
|
+
};
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
function Ze(t, a, l) {
|
|
325
|
+
return Se(
|
|
326
|
+
e.value.style.chart.layout.dataLabels.formatter,
|
|
327
|
+
t,
|
|
328
|
+
re({
|
|
329
|
+
p: e.value.style.chart.layout.dataLabels.prefix,
|
|
330
|
+
v: t,
|
|
331
|
+
s: e.value.style.chart.layout.dataLabels.suffix,
|
|
332
|
+
r: e.value.style.chart.layout.dataLabels.rounding
|
|
333
|
+
}),
|
|
334
|
+
{ datapoint: a, index: l }
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
const xe = f(() => ({
|
|
338
|
+
max: Math.max(...L.value.map((t) => t.subtotal)),
|
|
339
|
+
min: 0
|
|
340
|
+
})), U = f(() => {
|
|
341
|
+
const t = L.value.length === 1 ? xe.value.max * 2 : xe.value.max;
|
|
342
|
+
return gt(xe.value.min, t, e.value.style.chart.layout.grid.yAxis.dataLabels.steps);
|
|
343
|
+
});
|
|
344
|
+
function Rt(t) {
|
|
345
|
+
return t / U.value.max;
|
|
346
|
+
}
|
|
347
|
+
const Vt = f(() => U.value.ticks.map((t) => ({
|
|
348
|
+
y: r.value.bottom - r.value.height * Rt(t),
|
|
349
|
+
value: t
|
|
350
|
+
})));
|
|
351
|
+
function Mt(t, a) {
|
|
352
|
+
return isNaN(t.value / bt(a, "value")) ? 0 : (t.value / bt(a, "value") * 100).toFixed(0) + "%";
|
|
353
|
+
}
|
|
354
|
+
function et(t) {
|
|
355
|
+
g.value = null, ee.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: t.seriesIndex + h.value.start });
|
|
356
|
+
}
|
|
357
|
+
function Ht(t) {
|
|
358
|
+
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: t.index + h.value.start }), g.value = t.index, ee.value = t;
|
|
359
|
+
}
|
|
360
|
+
const q = c(null);
|
|
361
|
+
function tt(t, a) {
|
|
362
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.index + h.value.start }), !(!t.subtotal || !e.value.style.chart.dialog.show) && (ee.value = null, g.value = null, ie.value = !0, E.value = t, Xt(t), [null, void 0].includes(a) || (q.value = a));
|
|
363
|
+
}
|
|
364
|
+
const lt = f(() => O.value.map((t, a) => ({
|
|
365
|
+
name: t.name,
|
|
366
|
+
value: t.values.slice(h.value.start, h.value.end).reduce((l, s) => l + s, 0),
|
|
367
|
+
shape: "circle",
|
|
368
|
+
uid: t.uid,
|
|
369
|
+
color: t.color
|
|
370
|
+
})).sort((t, a) => a.value - t.value).map((t) => ({
|
|
371
|
+
...t,
|
|
372
|
+
opacity: w.value.includes(t.uid) ? 0.5 : 1,
|
|
373
|
+
segregate: () => pe(t.uid),
|
|
374
|
+
isSegregated: w.value.includes(t.uid)
|
|
375
|
+
}))), at = f(() => L.value.map((t) => t.subtotal).reduce((t, a) => t + a, 0)), Bt = f(() => ({
|
|
376
|
+
cy: "donut-div-legend",
|
|
377
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
378
|
+
color: e.value.style.chart.legend.color,
|
|
379
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
380
|
+
paddingBottom: 12,
|
|
381
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
382
|
+
}));
|
|
383
|
+
function pe(t) {
|
|
384
|
+
if (w.value.includes(t))
|
|
385
|
+
w.value = w.value.filter((a) => a !== t), Ve("selectLegend", null);
|
|
386
|
+
else {
|
|
387
|
+
if (w.value.length === O.value.length - 1) return;
|
|
388
|
+
w.value.push(t), Ve("selectLegend", O.value.find((a) => a.uid === t));
|
|
389
|
+
}
|
|
390
|
+
E.value && tt(L.value.find((a, l) => l === q.value));
|
|
391
|
+
}
|
|
392
|
+
const X = f(() => {
|
|
393
|
+
const t = [""].concat(O.value.filter((o) => !w.value.includes(o.uid)).map((o) => ({
|
|
394
|
+
name: o.name,
|
|
395
|
+
color: o.color
|
|
396
|
+
}))).concat(["Σ"]);
|
|
397
|
+
let a = [];
|
|
398
|
+
for (let o = 0; o < D.value; o += 1) {
|
|
399
|
+
const y = O.value.filter((d) => !w.value.includes(d.uid)).map((d) => d.values[o] ?? 0).reduce((d, x) => d + x, 0);
|
|
400
|
+
a.push([C[o] ? C[o].text : "-"].concat(O.value.filter((d) => !w.value.includes(d.uid)).map((d) => ({
|
|
401
|
+
value: d.values[o] ?? 0,
|
|
402
|
+
percentage: d.values[o] ? d.values[o] / y * 100 : 0
|
|
403
|
+
}))).concat([`${e.value.style.chart.layout.dataLabels.prefix}${Number(y.toFixed(e.value.table.td.roundingValue))}${e.value.style.chart.layout.dataLabels.suffix}`]));
|
|
404
|
+
}
|
|
405
|
+
const l = {
|
|
406
|
+
th: {
|
|
407
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
408
|
+
color: e.value.table.th.color,
|
|
409
|
+
outline: e.value.table.th.outline
|
|
410
|
+
},
|
|
411
|
+
td: {
|
|
412
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
413
|
+
color: e.value.table.td.color,
|
|
414
|
+
outline: e.value.table.td.outline
|
|
415
|
+
},
|
|
416
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
417
|
+
}, s = [
|
|
418
|
+
e.value.table.columnNames.period
|
|
419
|
+
].concat(O.value.filter((o) => !w.value.includes(o.uid)).map((o) => o.name)).concat(e.value.table.columnNames.total);
|
|
420
|
+
return { head: t, body: a, config: l, colNames: s };
|
|
421
|
+
});
|
|
422
|
+
function Ut() {
|
|
423
|
+
return O.value;
|
|
424
|
+
}
|
|
425
|
+
function ot(t = null) {
|
|
426
|
+
Ce(() => {
|
|
427
|
+
const a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], l = [...X.value.head.map((d) => d.name ?? d)], s = [...X.value.body.map((d) => d.map((x) => x.value ?? x))], o = a.concat([l]).concat(s), y = dl(o);
|
|
428
|
+
t ? t(y) : hl({ csvContent: y, title: e.value.style.chart.title.text || "vue-ui-donut-evolution" });
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
const G = c(!1);
|
|
432
|
+
function ut(t) {
|
|
433
|
+
G.value = t, ze.value += 1;
|
|
434
|
+
}
|
|
435
|
+
function st() {
|
|
436
|
+
B.value.showTable = !B.value.showTable;
|
|
437
|
+
}
|
|
438
|
+
const ue = c(!1);
|
|
439
|
+
function ke() {
|
|
440
|
+
ue.value = !ue.value;
|
|
441
|
+
}
|
|
442
|
+
function nt(t) {
|
|
443
|
+
return t.proportion * 100 > e.value.style.chart.donuts.hover.hideLabelsUnderValue;
|
|
444
|
+
}
|
|
445
|
+
const rt = c([]), it = c({}), we = c(null);
|
|
446
|
+
function Xt(t) {
|
|
447
|
+
rt.value = t.donut.map((a) => ({
|
|
448
|
+
name: a.name,
|
|
449
|
+
values: [a.value],
|
|
450
|
+
color: a.color
|
|
451
|
+
})), it.value = yl({
|
|
452
|
+
...e.value.style.chart.dialog.donutChart,
|
|
453
|
+
responsive: !0,
|
|
454
|
+
theme: e.value.theme
|
|
455
|
+
}), we.value && we.value.open();
|
|
456
|
+
}
|
|
457
|
+
async function Gt({ scale: t = 2 } = {}) {
|
|
458
|
+
if (!P.value) return;
|
|
459
|
+
const { width: a, height: l } = P.value.getBoundingClientRect(), s = a / l, { imageUri: o, base64: y } = await Cl({ domElement: P.value, base64: !0, img: !0, scale: t });
|
|
460
|
+
return {
|
|
461
|
+
imageUri: o,
|
|
462
|
+
base64: y,
|
|
463
|
+
title: e.value.style.chart.title.text,
|
|
464
|
+
width: a,
|
|
465
|
+
height: l,
|
|
466
|
+
aspectRatio: s
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
const Wt = f(() => H.value.width), Yt = f(() => H.value.height);
|
|
470
|
+
return xl({
|
|
471
|
+
timeLabelsEls: te,
|
|
472
|
+
timeLabels: C,
|
|
473
|
+
slicer: h,
|
|
474
|
+
configRef: e,
|
|
475
|
+
rotationPath: ["style", "chart", "layout", "grid", "xAxis", "dataLabels", "rotation"],
|
|
476
|
+
autoRotatePath: ["style", "chart", "layout", "grid", "xAxis", "dataLabels", "autoRotate", "enable"],
|
|
477
|
+
isAutoSize: !1,
|
|
478
|
+
width: Wt,
|
|
479
|
+
height: Yt,
|
|
480
|
+
rotation: e.value.style.chart.layout.grid.xAxis.dataLabels.autoRotate.angle
|
|
481
|
+
}), wt({
|
|
482
|
+
getData: Ut,
|
|
483
|
+
getImage: Gt,
|
|
484
|
+
generatePdf: Je,
|
|
485
|
+
generateCsv: ot,
|
|
486
|
+
generateImage: Ke,
|
|
487
|
+
toggleTable: st,
|
|
488
|
+
toggleAnnotator: ke,
|
|
489
|
+
toggleFullscreen: ut
|
|
490
|
+
}), (t, a) => (u(), n("div", {
|
|
491
|
+
ref_key: "donutEvolutionChart",
|
|
492
|
+
ref: P,
|
|
493
|
+
class: N(`vue-ui-donut-evolution ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
494
|
+
style: J(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
495
|
+
id: M.value,
|
|
496
|
+
onMouseenter: a[5] || (a[5] = () => i(Ge)(!0)),
|
|
497
|
+
onMouseleave: a[6] || (a[6] = () => i(Ge)(!1))
|
|
498
|
+
}, [
|
|
499
|
+
e.value.userOptions.buttons.annotator ? (u(), T(i(zt), {
|
|
500
|
+
key: 0,
|
|
501
|
+
svgRef: i(Ye),
|
|
502
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
503
|
+
color: e.value.style.chart.color,
|
|
504
|
+
active: ue.value,
|
|
505
|
+
onClose: ke
|
|
506
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : v("", !0),
|
|
507
|
+
Pt.value ? (u(), n("div", {
|
|
508
|
+
key: 1,
|
|
509
|
+
ref_key: "noTitle",
|
|
510
|
+
ref: Tt,
|
|
511
|
+
class: "vue-data-ui-no-title-space",
|
|
512
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
513
|
+
}, null, 512)) : v("", !0),
|
|
514
|
+
e.value.style.chart.title.text ? (u(), n("div", {
|
|
515
|
+
key: 2,
|
|
516
|
+
ref_key: "chartTitle",
|
|
517
|
+
ref: Oe,
|
|
518
|
+
style: "width:100%;background:transparent;padding-bottom:24px",
|
|
519
|
+
onMouseleave: et
|
|
520
|
+
}, [
|
|
521
|
+
(u(), T(wl, {
|
|
522
|
+
key: `title_${Ie.value}`,
|
|
523
|
+
config: {
|
|
524
|
+
title: {
|
|
525
|
+
cy: "donut-evolution-div-title",
|
|
526
|
+
...e.value.style.chart.title
|
|
527
|
+
},
|
|
528
|
+
subtitle: {
|
|
529
|
+
cy: "donut-evolution-div-subtitle",
|
|
530
|
+
...e.value.style.chart.title.subtitle
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}, null, 8, ["config"]))
|
|
534
|
+
], 544)) : v("", !0),
|
|
535
|
+
e.value.userOptions.show && Me.value && (i(We) || i(ge)) ? (u(), T(i($t), {
|
|
536
|
+
ref: "details",
|
|
537
|
+
key: `user_options_${ze.value}`,
|
|
538
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
539
|
+
color: e.value.style.chart.color,
|
|
540
|
+
isPrinting: i(je),
|
|
541
|
+
isImaging: i(qe),
|
|
542
|
+
uid: M.value,
|
|
543
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
544
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
545
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
546
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
547
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
548
|
+
isFullscreen: G.value,
|
|
549
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
550
|
+
chartElement: P.value,
|
|
551
|
+
position: e.value.userOptions.position,
|
|
552
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
553
|
+
isAnnotation: ue.value,
|
|
554
|
+
callbacks: e.value.userOptions.callbacks,
|
|
555
|
+
printScale: e.value.userOptions.print.scale,
|
|
556
|
+
onToggleFullscreen: ut,
|
|
557
|
+
onGeneratePdf: i(Je),
|
|
558
|
+
onGenerateCsv: ot,
|
|
559
|
+
onGenerateImage: i(Ke),
|
|
560
|
+
onToggleTable: st,
|
|
561
|
+
onToggleAnnotator: ke,
|
|
562
|
+
style: J({
|
|
563
|
+
visibility: i(We) ? i(ge) ? "visible" : "hidden" : "visible"
|
|
564
|
+
})
|
|
565
|
+
}, Qt({ _: 2 }, [
|
|
566
|
+
t.$slots.menuIcon ? {
|
|
567
|
+
name: "menuIcon",
|
|
568
|
+
fn: _(({ isOpen: l, color: s }) => [
|
|
569
|
+
S(t.$slots, "menuIcon", K(Q({ isOpen: l, color: s })), void 0, !0)
|
|
570
|
+
]),
|
|
571
|
+
key: "0"
|
|
572
|
+
} : void 0,
|
|
573
|
+
t.$slots.optionPdf ? {
|
|
574
|
+
name: "optionPdf",
|
|
575
|
+
fn: _(() => [
|
|
576
|
+
S(t.$slots, "optionPdf", {}, void 0, !0)
|
|
577
|
+
]),
|
|
578
|
+
key: "1"
|
|
579
|
+
} : void 0,
|
|
580
|
+
t.$slots.optionCsv ? {
|
|
581
|
+
name: "optionCsv",
|
|
582
|
+
fn: _(() => [
|
|
583
|
+
S(t.$slots, "optionCsv", {}, void 0, !0)
|
|
584
|
+
]),
|
|
585
|
+
key: "2"
|
|
586
|
+
} : void 0,
|
|
587
|
+
t.$slots.optionImg ? {
|
|
588
|
+
name: "optionImg",
|
|
589
|
+
fn: _(() => [
|
|
590
|
+
S(t.$slots, "optionImg", {}, void 0, !0)
|
|
591
|
+
]),
|
|
592
|
+
key: "3"
|
|
593
|
+
} : void 0,
|
|
594
|
+
t.$slots.optionTable ? {
|
|
595
|
+
name: "optionTable",
|
|
596
|
+
fn: _(() => [
|
|
597
|
+
S(t.$slots, "optionTable", {}, void 0, !0)
|
|
598
|
+
]),
|
|
599
|
+
key: "4"
|
|
600
|
+
} : void 0,
|
|
601
|
+
t.$slots.optionFullscreen ? {
|
|
602
|
+
name: "optionFullscreen",
|
|
603
|
+
fn: _(({ toggleFullscreen: l, isFullscreen: s }) => [
|
|
604
|
+
S(t.$slots, "optionFullscreen", K(Q({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
|
|
605
|
+
]),
|
|
606
|
+
key: "5"
|
|
607
|
+
} : void 0,
|
|
608
|
+
t.$slots.optionAnnotator ? {
|
|
609
|
+
name: "optionAnnotator",
|
|
610
|
+
fn: _(({ toggleAnnotator: l, isAnnotator: s }) => [
|
|
611
|
+
S(t.$slots, "optionAnnotator", K(Q({ toggleAnnotator: l, isAnnotator: s })), void 0, !0)
|
|
612
|
+
]),
|
|
613
|
+
key: "6"
|
|
614
|
+
} : void 0
|
|
615
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : v("", !0),
|
|
616
|
+
(u(), n("svg", {
|
|
617
|
+
ref_key: "svgRef",
|
|
618
|
+
ref: Ye,
|
|
619
|
+
xmlns: i(nl),
|
|
620
|
+
class: N({ "vue-data-ui-fullscreen--on": G.value, "vue-data-ui-fulscreen--off": !G.value }),
|
|
621
|
+
viewBox: `0 0 ${r.value.absoluteWidth} ${r.value.absoluteHeight}`,
|
|
622
|
+
style: J(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};`)
|
|
623
|
+
}, [
|
|
624
|
+
Zt(i(St)),
|
|
625
|
+
t.$slots["chart-background"] ? (u(), n("foreignObject", {
|
|
626
|
+
key: 0,
|
|
627
|
+
x: r.value.left,
|
|
628
|
+
y: r.value.top,
|
|
629
|
+
width: r.value.width,
|
|
630
|
+
height: r.value.height,
|
|
631
|
+
style: {
|
|
632
|
+
pointerEvents: "none"
|
|
633
|
+
}
|
|
634
|
+
}, [
|
|
635
|
+
S(t.$slots, "chart-background", {}, void 0, !0)
|
|
636
|
+
], 8, Il)) : v("", !0),
|
|
637
|
+
p("defs", null, [
|
|
638
|
+
p("linearGradient", {
|
|
639
|
+
id: `hover_${M.value}`,
|
|
640
|
+
x1: "0%",
|
|
641
|
+
y1: "0%",
|
|
642
|
+
x2: "0%",
|
|
643
|
+
y2: "100%"
|
|
644
|
+
}, [
|
|
645
|
+
p("stop", {
|
|
646
|
+
offset: "0%",
|
|
647
|
+
"stop-color": i(Z)(e.value.style.chart.backgroundColor, e.value.style.chart.layout.highlighter.opacity)
|
|
648
|
+
}, null, 8, Tl),
|
|
649
|
+
p("stop", {
|
|
650
|
+
offset: "100%",
|
|
651
|
+
"stop-color": i(Z)(e.value.style.chart.layout.highlighter.color, e.value.style.chart.layout.highlighter.opacity)
|
|
652
|
+
}, null, 8, Ol)
|
|
653
|
+
], 8, Nl),
|
|
654
|
+
p("radialGradient", {
|
|
655
|
+
id: `focus_${M.value}`
|
|
656
|
+
}, [
|
|
657
|
+
p("stop", {
|
|
658
|
+
offset: "0%",
|
|
659
|
+
"stop-color": i(Z)(i(_e)(e.value.style.chart.backgroundColor), 0)
|
|
660
|
+
}, null, 8, Dl),
|
|
661
|
+
p("stop", {
|
|
662
|
+
offset: "77%",
|
|
663
|
+
"stop-color": i(Z)("#FFFFFF", 30)
|
|
664
|
+
}, null, 8, Fl),
|
|
665
|
+
p("stop", {
|
|
666
|
+
offset: "100%",
|
|
667
|
+
"stop-color": i(Z)(i(_e)(e.value.style.chart.backgroundColor), 0)
|
|
668
|
+
}, null, 8, El)
|
|
669
|
+
], 8, Pl)
|
|
670
|
+
]),
|
|
671
|
+
e.value.style.chart.layout.grid.show ? (u(), n("g", Rl, [
|
|
672
|
+
p("line", {
|
|
673
|
+
x1: r.value.left,
|
|
674
|
+
x2: r.value.left,
|
|
675
|
+
y1: r.value.top,
|
|
676
|
+
y2: r.value.top + r.value.height,
|
|
677
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
678
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth,
|
|
679
|
+
"stroke-linecap": "round"
|
|
680
|
+
}, null, 8, Vl),
|
|
681
|
+
p("line", {
|
|
682
|
+
x1: r.value.left,
|
|
683
|
+
x2: r.value.right,
|
|
684
|
+
y1: r.value.bottom,
|
|
685
|
+
y2: r.value.bottom,
|
|
686
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
687
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth,
|
|
688
|
+
"stroke-linecap": "round"
|
|
689
|
+
}, null, 8, Ml),
|
|
690
|
+
e.value.style.chart.layout.grid.showVerticalLines ? (u(), n("g", Hl, [
|
|
691
|
+
(u(!0), n(z, null, $(h.value.end - h.value.start, (l, s) => (u(), n("line", {
|
|
692
|
+
x1: r.value.left + (s + 1) * k.value,
|
|
693
|
+
x2: r.value.left + (s + 1) * k.value,
|
|
694
|
+
y1: r.value.top,
|
|
695
|
+
y2: r.value.bottom,
|
|
696
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
697
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth,
|
|
698
|
+
"stroke-linecap": "round"
|
|
699
|
+
}, null, 8, Bl))), 256))
|
|
700
|
+
])) : v("", !0)
|
|
701
|
+
])) : v("", !0),
|
|
702
|
+
p("g", null, [
|
|
703
|
+
e.value.style.chart.layout.grid.axis.yLabel ? (u(), n("text", {
|
|
704
|
+
key: 0,
|
|
705
|
+
ref_key: "yAxisLabel",
|
|
706
|
+
ref: de,
|
|
707
|
+
"font-size": e.value.style.chart.layout.grid.axis.fontSize,
|
|
708
|
+
fill: e.value.style.chart.layout.grid.axis.color,
|
|
709
|
+
transform: `translate(${e.value.style.chart.layout.grid.axis.fontSize}, ${r.value.top + r.value.height / 2}) rotate(-90)`,
|
|
710
|
+
"text-anchor": "middle",
|
|
711
|
+
style: { transition: "none" }
|
|
712
|
+
}, m(e.value.style.chart.layout.grid.axis.yLabel), 9, Ul)) : v("", !0),
|
|
713
|
+
e.value.style.chart.layout.grid.axis.xLabel ? (u(), n("text", {
|
|
714
|
+
key: 1,
|
|
715
|
+
ref_key: "xAxisLabel",
|
|
716
|
+
ref: ve,
|
|
717
|
+
"text-anchor": "middle",
|
|
718
|
+
x: r.value.absoluteWidth / 2,
|
|
719
|
+
y: r.value.absoluteHeight - 3,
|
|
720
|
+
"font-size": e.value.style.chart.layout.grid.axis.fontSize,
|
|
721
|
+
fill: e.value.style.chart.layout.grid.axis.color
|
|
722
|
+
}, m(e.value.style.chart.layout.grid.axis.xLabel), 9, Xl)) : v("", !0)
|
|
723
|
+
]),
|
|
724
|
+
e.value.style.chart.layout.grid.yAxis.dataLabels.show ? (u(), n("g", {
|
|
725
|
+
key: 2,
|
|
726
|
+
ref_key: "scaleLabels",
|
|
727
|
+
ref: ce,
|
|
728
|
+
class: N({ "donut-opacity": !0, "donut-behind": g.value !== null })
|
|
729
|
+
}, [
|
|
730
|
+
(u(!0), n(z, null, $(Vt.value, (l, s) => (u(), n("g", null, [
|
|
731
|
+
l.value >= U.value.min && l.value <= U.value.max ? (u(), n("line", {
|
|
732
|
+
key: 0,
|
|
733
|
+
x1: r.value.left,
|
|
734
|
+
x2: r.value.left - 5,
|
|
735
|
+
y1: l.y,
|
|
736
|
+
y2: l.y,
|
|
737
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
738
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth
|
|
739
|
+
}, null, 8, Gl)) : v("", !0),
|
|
740
|
+
l.value >= U.value.min && l.value <= U.value.max ? (u(), n("text", {
|
|
741
|
+
key: 1,
|
|
742
|
+
x: r.value.left,
|
|
743
|
+
y: l.y + e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize / 3,
|
|
744
|
+
"font-size": e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,
|
|
745
|
+
"text-anchor": "end",
|
|
746
|
+
fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
|
|
747
|
+
"font-weight": e.value.style.chart.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
748
|
+
}, m(i(rl)(l.value) ? i(Se)(
|
|
749
|
+
e.value.style.chart.layout.dataLabels.formatter,
|
|
750
|
+
l.value,
|
|
751
|
+
i(re)({
|
|
752
|
+
p: e.value.style.chart.layout.dataLabels.prefix,
|
|
753
|
+
v: l.value,
|
|
754
|
+
s: e.value.style.chart.layout.dataLabels.suffix,
|
|
755
|
+
r: e.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue
|
|
756
|
+
}),
|
|
757
|
+
{ datapoint: l, seriesIndex: s }
|
|
758
|
+
) : ""), 9, Wl)) : v("", !0)
|
|
759
|
+
]))), 256))
|
|
760
|
+
], 2)) : v("", !0),
|
|
761
|
+
e.value.style.chart.layout.grid.xAxis.dataLabels.show ? (u(), n("g", {
|
|
762
|
+
key: 3,
|
|
763
|
+
ref_key: "timeLabelsEls",
|
|
764
|
+
ref: te,
|
|
765
|
+
class: N({ "donut-opacity": !0 })
|
|
766
|
+
}, [
|
|
767
|
+
(u(!0), n(z, null, $(h.value.end - h.value.start, (l, s) => (u(), n("g", null, [
|
|
768
|
+
(e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast && (s === 0 || s === D.value - 1) || !e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast) && C.value[s] && C.value[s].text ? (u(), n("g", Yl, [
|
|
769
|
+
String(C.value[s].text).includes(`
|
|
770
|
+
`) ? (u(), n("text", {
|
|
771
|
+
key: 1,
|
|
772
|
+
class: "vue-data-ui-time-label",
|
|
773
|
+
"text-anchor": e.value.style.chart.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.chart.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
774
|
+
"font-size": e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
|
|
775
|
+
fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
|
|
776
|
+
transform: `translate(${r.value.left + k.value * s + k.value / 2}, ${r.value.bottom + e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize + e.value.style.chart.layout.grid.xAxis.dataLabels.offsetY}), rotate(${e.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`,
|
|
777
|
+
innerHTML: i(il)({
|
|
778
|
+
content: String(C.value[s].text),
|
|
779
|
+
fontSize: e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
|
|
780
|
+
fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
|
|
781
|
+
x: 0,
|
|
782
|
+
y: 0
|
|
783
|
+
})
|
|
784
|
+
}, null, 8, ql)) : (u(), n("text", {
|
|
785
|
+
key: 0,
|
|
786
|
+
class: "vue-data-ui-time-label",
|
|
787
|
+
"text-anchor": e.value.style.chart.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.chart.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
788
|
+
"font-size": e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
|
|
789
|
+
fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
|
|
790
|
+
transform: `translate(${r.value.left + k.value * s + k.value / 2}, ${r.value.bottom + e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize + e.value.style.chart.layout.grid.xAxis.dataLabels.offsetY}), rotate(${e.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`
|
|
791
|
+
}, m(C.value[s].text || ""), 9, jl))
|
|
792
|
+
])) : v("", !0)
|
|
793
|
+
]))), 256))
|
|
794
|
+
], 512)) : v("", !0),
|
|
795
|
+
(u(!0), n(z, null, $(L.value, (l, s) => (u(), n("g", null, [
|
|
796
|
+
e.value.style.chart.layout.line.show && s < L.value.length - 1 && ![l.subtotal, L.value[s + 1].subtotal].includes(null) ? (u(), n("line", {
|
|
797
|
+
key: 0,
|
|
798
|
+
class: N({ "donut-opacity": !0, "donut-behind": g.value !== null }),
|
|
799
|
+
x1: l.x,
|
|
800
|
+
y1: l.y,
|
|
801
|
+
x2: L.value[s + 1].x,
|
|
802
|
+
y2: L.value[s + 1].y,
|
|
803
|
+
stroke: e.value.style.chart.layout.line.stroke,
|
|
804
|
+
"stroke-width": e.value.style.chart.layout.line.strokeWidth,
|
|
805
|
+
"stroke-linecap": "round",
|
|
806
|
+
"stroke-linejoin": "round"
|
|
807
|
+
}, null, 10, Jl)) : v("", !0),
|
|
808
|
+
l.subtotal !== null ? (u(), n("g", Kl, [
|
|
809
|
+
l.subtotal ? (u(), n("circle", {
|
|
810
|
+
key: 0,
|
|
811
|
+
cx: l.x,
|
|
812
|
+
cy: l.y,
|
|
813
|
+
r: l.activeRadius,
|
|
814
|
+
fill: e.value.style.chart.backgroundColor
|
|
815
|
+
}, null, 8, Ql)) : v("", !0)
|
|
816
|
+
])) : v("", !0)
|
|
817
|
+
]))), 256)),
|
|
818
|
+
(u(!0), n(z, null, $(L.value, (l, s) => (u(), n("g", {
|
|
819
|
+
class: N({ "donut-opacity": !0, "donut-behind": s !== g.value && g.value !== null })
|
|
820
|
+
}, [
|
|
821
|
+
l.subtotal ? (u(), n("g", Zl, [
|
|
822
|
+
g.value !== null && g.value === s ? (u(), n("g", ea, [
|
|
823
|
+
(u(!0), n(z, null, $(l.donutHover, (o) => (u(), n("g", null, [
|
|
824
|
+
nt(o) ? (u(), n("path", {
|
|
825
|
+
key: 0,
|
|
826
|
+
d: i(cl)(o, { x: o.center.endX, y: o.center.endY }, 12, 12, { x: l.x, y: l.y }, !1, 20),
|
|
827
|
+
stroke: o.color,
|
|
828
|
+
"stroke-width": "1",
|
|
829
|
+
"stroke-linecap": "round",
|
|
830
|
+
"stroke-linejoin": "round",
|
|
831
|
+
fill: "none"
|
|
832
|
+
}, null, 8, ta)) : v("", !0)
|
|
833
|
+
]))), 256)),
|
|
834
|
+
(u(!0), n(z, null, $(l.donutHover, (o, y) => (u(), n("g", null, [
|
|
835
|
+
nt(o) ? (u(), n("text", {
|
|
836
|
+
key: 0,
|
|
837
|
+
"data-cy-hover-label": "",
|
|
838
|
+
"text-anchor": i(mt)(o, !0, 0).anchor,
|
|
839
|
+
x: i(mt)(o, !0, 9).x,
|
|
840
|
+
y: i(vl)(o, 14, 10),
|
|
841
|
+
fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
|
|
842
|
+
"font-size": 8,
|
|
843
|
+
"font-weight": "bold"
|
|
844
|
+
}, m(o.name) + ": " + m(Mt(o, l.donut)) + " (" + m(o.value === null ? "-" : Ze(o.value, o, y)) + ") ", 9, la)) : v("", !0)
|
|
845
|
+
]))), 256)),
|
|
846
|
+
p("g", null, [
|
|
847
|
+
p("circle", {
|
|
848
|
+
cx: l.x,
|
|
849
|
+
cy: l.y,
|
|
850
|
+
r: l.hoverRadius,
|
|
851
|
+
fill: e.value.style.chart.backgroundColor
|
|
852
|
+
}, null, 8, aa)
|
|
853
|
+
])
|
|
854
|
+
])) : v("", !0)
|
|
855
|
+
])) : v("", !0)
|
|
856
|
+
], 2))), 256)),
|
|
857
|
+
(u(!0), n(z, null, $(L.value, (l, s) => (u(), n("g", {
|
|
858
|
+
class: N({ "donut-opacity": !0, "donut-behind": s !== g.value && g.value !== null })
|
|
859
|
+
}, [
|
|
860
|
+
l.subtotal !== null ? (u(), n("g", oa, [
|
|
861
|
+
l.subtotal === 0 ? (u(), n("circle", {
|
|
862
|
+
key: 0,
|
|
863
|
+
cx: l.x,
|
|
864
|
+
cy: l.y,
|
|
865
|
+
r: 3,
|
|
866
|
+
fill: e.value.style.chart.color
|
|
867
|
+
}, null, 8, ua)) : g.value !== null && g.value === s ? (u(), n("g", sa, [
|
|
868
|
+
(u(!0), n(z, null, $(l.donutHover, (o, y) => (u(), n("path", {
|
|
869
|
+
d: o.arcSlice,
|
|
870
|
+
fill: `${o.color}`,
|
|
871
|
+
"stroke-width": 1,
|
|
872
|
+
stroke: e.value.style.chart.backgroundColor
|
|
873
|
+
}, null, 8, na))), 256))
|
|
874
|
+
])) : (u(), n("g", ra, [
|
|
875
|
+
(u(!0), n(z, null, $(l.donut, (o, y) => (u(), n("path", {
|
|
876
|
+
d: o.arcSlice,
|
|
877
|
+
fill: `${o.color}`,
|
|
878
|
+
"stroke-width": 0.5,
|
|
879
|
+
stroke: e.value.style.chart.backgroundColor
|
|
880
|
+
}, null, 8, ia))), 256))
|
|
881
|
+
]))
|
|
882
|
+
])) : v("", !0)
|
|
883
|
+
], 2))), 256)),
|
|
884
|
+
(u(!0), n(z, null, $(L.value, (l, s) => (u(), n("g", {
|
|
885
|
+
class: N({ "donut-opacity": !0, "donut-behind": s !== g.value && g.value !== null || ie.value && s !== E.value.index })
|
|
886
|
+
}, [
|
|
887
|
+
l.subtotal !== null && e.value.style.chart.layout.dataLabels.show ? (u(), n("text", {
|
|
888
|
+
key: 0,
|
|
889
|
+
"text-anchor": "middle",
|
|
890
|
+
x: l.x,
|
|
891
|
+
y: g.value === l.index && l.subtotal ? l.y + e.value.style.chart.layout.dataLabels.fontSize / 3 : l.y - l.radius - e.value.style.chart.layout.dataLabels.fontSize + e.value.style.chart.layout.dataLabels.offsetY,
|
|
892
|
+
"font-size": e.value.style.chart.layout.dataLabels.fontSize,
|
|
893
|
+
"font-weight": "bold",
|
|
894
|
+
fill: e.value.style.chart.layout.dataLabels.color
|
|
895
|
+
}, m(Ze(l.subtotal, l, s)), 9, ca)) : v("", !0)
|
|
896
|
+
], 2))), 256)),
|
|
897
|
+
(u(!0), n(z, null, $(L.value, (l, s) => (u(), n("rect", {
|
|
898
|
+
x: r.value.left + s * k.value,
|
|
899
|
+
y: r.value.top,
|
|
900
|
+
width: k.value,
|
|
901
|
+
height: r.value.height,
|
|
902
|
+
fill: [g.value, q.value].includes(l.index) ? `url(#hover_${M.value})` : "transparent",
|
|
903
|
+
class: N({ "donut-hover": l.subtotal && [g.value, q.value].includes(l.index) }),
|
|
904
|
+
style: {
|
|
905
|
+
pointerEvents: "none"
|
|
906
|
+
}
|
|
907
|
+
}, null, 10, va))), 256)),
|
|
908
|
+
(u(!0), n(z, null, $(L.value, (l, s) => (u(), n("rect", {
|
|
909
|
+
"data-cy-trap": "",
|
|
910
|
+
x: r.value.left + s * k.value,
|
|
911
|
+
y: r.value.top,
|
|
912
|
+
width: k.value,
|
|
913
|
+
height: r.value.height,
|
|
914
|
+
fill: "transparent",
|
|
915
|
+
onMouseenter: (o) => Ht(l),
|
|
916
|
+
onMouseleave: (o) => et(l),
|
|
917
|
+
onClick: (o) => tt(l, s),
|
|
918
|
+
class: N({ "donut-hover": g.value === l.index && l.subtotal })
|
|
919
|
+
}, null, 42, da))), 256)),
|
|
920
|
+
S(t.$slots, "svg", { svg: r.value }, void 0, !0)
|
|
921
|
+
], 14, $l)),
|
|
922
|
+
t.$slots.watermark ? (u(), n("div", ha, [
|
|
923
|
+
S(t.$slots, "watermark", K(Q({ isPrinting: i(je) || i(qe) })), void 0, !0)
|
|
924
|
+
])) : v("", !0),
|
|
925
|
+
p("div", {
|
|
926
|
+
ref_key: "chartSlicer",
|
|
927
|
+
ref: Ee,
|
|
928
|
+
style: J(`width:100%;background:${e.value.style.chart.backgroundColor}`),
|
|
929
|
+
"data-dom-to-png-ignore": ""
|
|
930
|
+
}, [
|
|
931
|
+
D.value > 1 && e.value.style.chart.zoom.show ? (u(), T(kl, {
|
|
932
|
+
ref_key: "slicerComponent",
|
|
933
|
+
ref: Fe,
|
|
934
|
+
key: `slicer_${$e.value}`,
|
|
935
|
+
background: e.value.style.chart.zoom.color,
|
|
936
|
+
borderColor: e.value.style.chart.backgroundColor,
|
|
937
|
+
fontSize: e.value.style.chart.zoom.fontSize,
|
|
938
|
+
useResetSlot: e.value.style.chart.zoom.useResetSlot,
|
|
939
|
+
labelLeft: C.value[0] ? C.value[0].text : "",
|
|
940
|
+
labelRight: C.value.at(-1) ? C.value.at(-1).text : "",
|
|
941
|
+
textColor: e.value.style.chart.color,
|
|
942
|
+
inputColor: e.value.style.chart.zoom.color,
|
|
943
|
+
selectColor: e.value.style.chart.zoom.highlightColor,
|
|
944
|
+
max: D.value,
|
|
945
|
+
min: 0,
|
|
946
|
+
valueStart: h.value.start,
|
|
947
|
+
valueEnd: h.value.end,
|
|
948
|
+
start: h.value.start,
|
|
949
|
+
"onUpdate:start": a[0] || (a[0] = (l) => h.value.start = l),
|
|
950
|
+
end: h.value.end,
|
|
951
|
+
"onUpdate:end": a[1] || (a[1] = (l) => h.value.end = l),
|
|
952
|
+
refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
|
|
953
|
+
refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : D.value,
|
|
954
|
+
enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
|
|
955
|
+
enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
|
|
956
|
+
onReset: Xe
|
|
957
|
+
}, {
|
|
958
|
+
"reset-action": _(({ reset: l }) => [
|
|
959
|
+
S(t.$slots, "reset-action", K(Q({ reset: l })), void 0, !0)
|
|
960
|
+
]),
|
|
961
|
+
_: 3
|
|
962
|
+
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : v("", !0)
|
|
963
|
+
], 4),
|
|
964
|
+
p("div", {
|
|
965
|
+
ref_key: "chartLegend",
|
|
966
|
+
ref: Pe
|
|
967
|
+
}, [
|
|
968
|
+
e.value.style.chart.legend.show ? (u(), T(pl, {
|
|
969
|
+
key: `legend_${Te.value}`,
|
|
970
|
+
legendSet: lt.value,
|
|
971
|
+
config: Bt.value,
|
|
972
|
+
onClickMarker: a[2] || (a[2] = ({ legend: l }) => pe(l.uid))
|
|
973
|
+
}, {
|
|
974
|
+
item: _(({ legend: l, index: s }) => [
|
|
975
|
+
p("div", {
|
|
976
|
+
onClick: (o) => pe(l.uid),
|
|
977
|
+
style: J(`opacity:${w.value.includes(l.uid) ? 0.5 : 1}`)
|
|
978
|
+
}, m(l.name) + m(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + m(e.value.style.chart.legend.showValue ? i(Se)(
|
|
979
|
+
e.value.style.chart.layout.dataLabels.formatter,
|
|
980
|
+
l.value,
|
|
981
|
+
i(re)({
|
|
982
|
+
p: e.value.style.chart.layout.dataLabels.prefix,
|
|
983
|
+
v: l.value,
|
|
984
|
+
s: e.value.style.chart.layout.dataLabels.suffix,
|
|
985
|
+
r: e.value.style.chart.legend.roundingValue
|
|
986
|
+
}),
|
|
987
|
+
{ datapoint: l, seriesIndex: s }
|
|
988
|
+
) : "") + " " + m(e.value.style.chart.legend.showPercentage ? w.value.includes(l.uid) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(l.value / at.value) ? "-" : i(re)({
|
|
989
|
+
v: l.value / at.value * 100,
|
|
990
|
+
s: "%",
|
|
991
|
+
r: e.value.style.chart.legend.roundingPercentage
|
|
992
|
+
})}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, ya)
|
|
993
|
+
]),
|
|
994
|
+
_: 1
|
|
995
|
+
}, 8, ["legendSet", "config"])) : v("", !0),
|
|
996
|
+
S(t.$slots, "legend", { legend: lt.value }, void 0, !0)
|
|
997
|
+
], 512),
|
|
998
|
+
t.$slots.source ? (u(), n("div", {
|
|
999
|
+
key: 5,
|
|
1000
|
+
ref_key: "source",
|
|
1001
|
+
ref: De,
|
|
1002
|
+
dir: "auto"
|
|
1003
|
+
}, [
|
|
1004
|
+
S(t.$slots, "source", {}, void 0, !0)
|
|
1005
|
+
], 512)) : v("", !0),
|
|
1006
|
+
Me.value ? (u(), T(i(Lt), {
|
|
1007
|
+
key: 6,
|
|
1008
|
+
hideDetails: "",
|
|
1009
|
+
config: {
|
|
1010
|
+
open: B.value.showTable,
|
|
1011
|
+
maxHeight: 1e4,
|
|
1012
|
+
body: {
|
|
1013
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1014
|
+
color: e.value.style.chart.color
|
|
1015
|
+
},
|
|
1016
|
+
head: {
|
|
1017
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1018
|
+
color: e.value.style.chart.color
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}, {
|
|
1022
|
+
content: _(() => [
|
|
1023
|
+
(u(), T(i(At), {
|
|
1024
|
+
key: `table_${Ne.value}`,
|
|
1025
|
+
colNames: X.value.colNames,
|
|
1026
|
+
head: X.value.head,
|
|
1027
|
+
body: X.value.body,
|
|
1028
|
+
config: X.value.config,
|
|
1029
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1030
|
+
onClose: a[3] || (a[3] = (l) => B.value.showTable = !1)
|
|
1031
|
+
}, {
|
|
1032
|
+
th: _(({ th: l }) => [
|
|
1033
|
+
dt(m(l.name ?? l), 1)
|
|
1034
|
+
]),
|
|
1035
|
+
td: _(({ td: l }) => [
|
|
1036
|
+
l.value === null ? (u(), n("span", fa, "-")) : (u(), n("b", ga, m(isNaN(l.value) ? "" : e.value.style.chart.layout.dataLabels.prefix) + m(!isNaN(l.value) && l.value !== null ? Number(l.value.toFixed(e.value.table.td.roundingValue)).toLocaleString() : l) + m(isNaN(l.value) ? "" : e.value.style.chart.layout.dataLabels.suffix), 1)),
|
|
1037
|
+
p("span", null, m(l.percentage && !isNaN(l.percentage) ? `(${Number(l.percentage.toFixed(e.value.table.td.roundingPercentage)).toLocaleString()}%)` : ""), 1)
|
|
1038
|
+
]),
|
|
1039
|
+
_: 1
|
|
1040
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
1041
|
+
]),
|
|
1042
|
+
_: 1
|
|
1043
|
+
}, 8, ["config"])) : v("", !0),
|
|
1044
|
+
e.value.style.chart.dialog.show ? (u(), T(i(_t), {
|
|
1045
|
+
key: 7,
|
|
1046
|
+
ref_key: "dialog",
|
|
1047
|
+
ref: we,
|
|
1048
|
+
onClose: a[4] || (a[4] = (l) => {
|
|
1049
|
+
E.value = null, ie.value = !1, ee.value = null, g.value = null, q.value = null;
|
|
1050
|
+
}),
|
|
1051
|
+
backgroundColor: e.value.style.chart.dialog.backgroundColor,
|
|
1052
|
+
color: e.value.style.chart.dialog.color,
|
|
1053
|
+
headerBg: e.value.style.chart.dialog.header.backgroundColor,
|
|
1054
|
+
headerColor: e.value.style.chart.dialog.header.color,
|
|
1055
|
+
isFullscreen: G.value,
|
|
1056
|
+
fullscreenParent: P.value
|
|
1057
|
+
}, {
|
|
1058
|
+
title: _(() => [
|
|
1059
|
+
dt(m(C.value[Number(E.value.index)] ? C.value[Number(E.value.index)].text : ""), 1)
|
|
1060
|
+
]),
|
|
1061
|
+
default: _(() => [
|
|
1062
|
+
E.value ? (u(), T(i(It), {
|
|
1063
|
+
key: 0,
|
|
1064
|
+
config: it.value,
|
|
1065
|
+
dataset: rt.value
|
|
1066
|
+
}, null, 8, ["config", "dataset"])) : v("", !0)
|
|
1067
|
+
]),
|
|
1068
|
+
_: 1
|
|
1069
|
+
}, 8, ["backgroundColor", "color", "headerBg", "headerColor", "isFullscreen", "fullscreenParent"])) : v("", !0),
|
|
1070
|
+
i(Be) ? (u(), T(Al, { key: 8 })) : v("", !0)
|
|
1071
|
+
], 46, zl));
|
|
1072
|
+
}
|
|
1073
|
+
}, Oa = /* @__PURE__ */ Sl(ma, [["__scopeId", "data-v-58bc97c2"]]);
|
|
1074
|
+
export {
|
|
1075
|
+
Oa as default
|
|
1076
|
+
};
|