vue-data-ui 2.12.3 → 2.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-7DZD153U.js → Arrow-DWXcP0Gw.js} +1 -1
- package/dist/BaseDraggableDialog-DyV-BY6O.js +186 -0
- package/dist/{BaseIcon-4Tt-jDsF.js → BaseIcon-DIIS9hFE.js} +1 -1
- package/dist/{ColorPicker-D9cQ_1h3.js → ColorPicker-D09a5oTx.js} +3 -3
- package/dist/{DataTable-CXRbXtrU.js → DataTable-BAr4XpSA.js} +2 -2
- package/dist/{Legend-CMVT8Hmn.js → Legend-CxZqkiNm.js} +4 -4
- package/dist/{PackageVersion-DrcIKw3H.js → PackageVersion-CQUs0b3q.js} +1 -1
- package/dist/{PenAndPaper-B52M1Af-.js → PenAndPaper-DmGOEcsD.js} +3 -3
- package/dist/{Shape-DsC3hyrC.js → Shape-gJBc0QCq.js} +1 -1
- package/dist/{Slicer-9d1_C4bi.js → Slicer-B81b2Jr1.js} +2 -2
- package/dist/{Title-9qKNVCMA.js → Title-BQKp20eU.js} +1 -1
- package/dist/{Tooltip-n2JxyMqg.js → Tooltip-Bjsc232E.js} +1 -1
- package/dist/{dom-to-png-mBFxJrIS.js → dom-to-png-BAR1EMYe.js} +1 -1
- package/dist/{img-DrpWNEaa.js → img-BDqur_YP.js} +1 -1
- package/dist/{index-CK9QG5R4.js → index-BKDMQMKQ.js} +441 -393
- package/dist/{pdf-BalkhgZX.js → pdf-CMw0Bw1w.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +12 -0
- package/dist/types/vue-data-ui.d.ts +12 -0
- package/dist/{useNestedProp-X5zYwXdP.js → useNestedProp-B_1UW4X2.js} +1 -1
- package/dist/{usePrinter-BZsCVIwN.js → usePrinter-BNaQ2HUw.js} +3 -3
- package/dist/{vue-data-ui-65FSOU9n.js → vue-data-ui-RV3mQ1d3.js} +63 -63
- package/dist/vue-data-ui.js +23 -23
- package/dist/{vue-ui-3d-bar-CaLDkBVj.js → vue-ui-3d-bar-Bq4AcGdm.js} +9 -9
- package/dist/{vue-ui-accordion-BA3mkouQ.js → vue-ui-accordion-DyqkVlpC.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DdlGpZy9.js → vue-ui-age-pyramid-BYn8ffyI.js} +10 -10
- package/dist/{vue-ui-annotator-CKvRES98.js → vue-ui-annotator-Biv6tN6c.js} +2 -2
- package/dist/{vue-ui-bullet-CdcJXA6l.js → vue-ui-bullet-DVflwrvi.js} +8 -8
- package/dist/{vue-ui-candlestick-CkllTOUY.js → vue-ui-candlestick-C-gmKrpa.js} +11 -11
- package/dist/{vue-ui-carousel-table-D3vCB81N.js → vue-ui-carousel-table-DJT77KEd.js} +4 -4
- package/dist/{vue-ui-chestnut-BE16kanb.js → vue-ui-chestnut-CuF02nem.js} +8 -8
- package/dist/{vue-ui-chord-BpsjJuE7.js → vue-ui-chord-7PHPveVU.js} +12 -12
- package/dist/{vue-ui-circle-pack-C438GSXx.js → vue-ui-circle-pack-BU_MxW6h.js} +9 -9
- package/dist/{vue-ui-cursor-a30lAfyb.js → vue-ui-cursor-DSFHMrnK.js} +2 -2
- package/dist/{vue-ui-dashboard-BkRc89ac.js → vue-ui-dashboard-CHyk8pO_.js} +62 -62
- package/dist/{vue-ui-digits-C3f9FAdw.js → vue-ui-digits-GOVpxQeg.js} +2 -2
- package/dist/{vue-ui-donut-Dwsm3xe8.js → vue-ui-donut-C5sXao7U.js} +103 -103
- package/dist/vue-ui-donut-evolution-BsoNZw0_.js +871 -0
- package/dist/{vue-ui-dumbbell-CIICXHWw.js → vue-ui-dumbbell-BVX3en_Z.js} +10 -10
- package/dist/{vue-ui-flow-Bs4GfLdc.js → vue-ui-flow-CrRVJbjl.js} +24 -24
- package/dist/{vue-ui-funnel-CASIJPoW.js → vue-ui-funnel-DyJvSMLV.js} +9 -9
- package/dist/{vue-ui-galaxy-BoTSH1dz.js → vue-ui-galaxy-B1WrIt-g.js} +32 -32
- package/dist/{vue-ui-gauge-Cfvwu5jW.js → vue-ui-gauge-C7qvMFcc.js} +19 -19
- package/dist/{vue-ui-gizmo-HB1PEZIT.js → vue-ui-gizmo-Agt3kM2d.js} +3 -3
- package/dist/{vue-ui-heatmap-BXQslQxq.js → vue-ui-heatmap-Czh2uHtX.js} +32 -32
- package/dist/{vue-ui-history-plot-qW_cLH2J.js → vue-ui-history-plot-KGGrayk7.js} +11 -11
- package/dist/{vue-ui-kpi-CHTFlQmm.js → vue-ui-kpi-B-aYK4fp.js} +3 -3
- package/dist/{vue-ui-mini-loader-CZFa8WdC.js → vue-ui-mini-loader-C0W2_f3L.js} +2 -2
- package/dist/{vue-ui-molecule-2XWcGAxa.js → vue-ui-molecule-DjWODfzW.js} +22 -22
- package/dist/{vue-ui-mood-radar-B0wwOAcZ.js → vue-ui-mood-radar-CFEN6SOJ.js} +11 -11
- package/dist/{vue-ui-nested-donuts-CD47r6S8.js → vue-ui-nested-donuts-Dw_TX78M.js} +56 -56
- package/dist/{vue-ui-onion-BrefEoKM.js → vue-ui-onion-CiTCTFRi.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-Ci9k0ZMR.js → vue-ui-parallel-coordinate-plot-YAyEWj2K.js} +36 -36
- package/dist/{vue-ui-quadrant-DRd3t6uQ.js → vue-ui-quadrant-j54lbADV.js} +41 -41
- package/dist/{vue-ui-quick-chart-DVyuMMNZ.js → vue-ui-quick-chart-f9MTErUH.js} +9 -9
- package/dist/{vue-ui-radar-BMlo5wj_.js → vue-ui-radar-BQ45fltP.js} +12 -12
- package/dist/{vue-ui-rating-BZLepZbE.js → vue-ui-rating-BjTlb4Lj.js} +11 -11
- package/dist/{vue-ui-relation-circle-BMWf_-ts.js → vue-ui-relation-circle-NX-yzRRP.js} +7 -7
- package/dist/vue-ui-ridgeline-BezQ7Hj-.js +924 -0
- package/dist/{vue-ui-rings-CyN6PZZw.js → vue-ui-rings-DJbgQBHR.js} +12 -12
- package/dist/{vue-ui-scatter-Dm24n28E.js → vue-ui-scatter-17fw3Pcy.js} +60 -60
- package/dist/{vue-ui-skeleton-CCPLO_mW.js → vue-ui-skeleton-BgWQSBb-.js} +19 -19
- package/dist/{vue-ui-smiley-D5GLTCkV.js → vue-ui-smiley-Bo-A4uMV.js} +2 -2
- package/dist/{vue-ui-spark-trend-DM-YH2Vz.js → vue-ui-spark-trend-BV9qCKr_.js} +5 -5
- package/dist/{vue-ui-sparkbar-Dp-Vp0Bz.js → vue-ui-sparkbar-CSGGtPTT.js} +4 -4
- package/dist/{vue-ui-sparkgauge-AhGrljqS.js → vue-ui-sparkgauge-BAia263V.js} +9 -9
- package/dist/{vue-ui-sparkhistogram-C_WzbJka.js → vue-ui-sparkhistogram-CKexMmEN.js} +5 -5
- package/dist/{vue-ui-sparkline-D3TgSaqu.js → vue-ui-sparkline-DRtP5cMm.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-Dx1gnUfv.js → vue-ui-sparkstackbar-D_bqkCIj.js} +5 -5
- package/dist/{vue-ui-stackbar-kPpS5ytk.js → vue-ui-stackbar-u_kZc4Th.js} +13 -13
- package/dist/{vue-ui-strip-plot-DMgQkOFL.js → vue-ui-strip-plot-UQEhmlcX.js} +11 -11
- package/dist/{vue-ui-table-DhN_orHh.js → vue-ui-table-4BTltNPf.js} +3 -3
- package/dist/{vue-ui-table-heatmap-CghBmNfB.js → vue-ui-table-heatmap-BXlfBI5z.js} +4 -4
- package/dist/{vue-ui-table-sparkline-DwZ6dDd7.js → vue-ui-table-sparkline-DFqDxs2Y.js} +5 -5
- package/dist/{vue-ui-thermometer-Bk2nGclO.js → vue-ui-thermometer-DD0QQ8b8.js} +7 -7
- package/dist/{vue-ui-timer-C7G-xWU0.js → vue-ui-timer-jlPkhU3j.js} +5 -5
- package/dist/{vue-ui-tiremarks-DInEjYlc.js → vue-ui-tiremarks-DZ1kGvwG.js} +7 -7
- package/dist/{vue-ui-treemap-BKvkNCsR.js → vue-ui-treemap-Xo1ZAK3l.js} +12 -12
- package/dist/{vue-ui-vertical-bar-DiQI4bPT.js → vue-ui-vertical-bar-G3mo6Ms5.js} +12 -12
- package/dist/{vue-ui-waffle-z1dbL3gf.js → vue-ui-waffle-B2Oz6oPQ.js} +27 -27
- package/dist/{vue-ui-wheel-cH-wbQMg.js → vue-ui-wheel-Ml-x_ere.js} +7 -7
- package/dist/{vue-ui-word-cloud-L7hmGLCt.js → vue-ui-word-cloud-3LB7Ntxy.js} +49 -49
- package/dist/{vue-ui-world-DNbRBwbT.js → vue-ui-world-ttJISk8E.js} +11 -11
- package/dist/{vue-ui-xy-CHkLFwbF.js → vue-ui-xy-2Z_f3J92.js} +16 -16
- package/dist/{vue-ui-xy-canvas-CXZZH9wb.js → vue-ui-xy-canvas-olPGemLS.js} +12 -12
- package/package.json +1 -1
- package/dist/vue-ui-donut-evolution-HVTx2TzC.js +0 -948
- package/dist/vue-ui-ridgeline-DoNIDa-r.js +0 -1102
|
@@ -0,0 +1,871 @@
|
|
|
1
|
+
import { computed as b, ref as y, onMounted as vt, watch as Ue, createElementBlock as s, openBlock as o, unref as i, normalizeStyle as K, normalizeClass as D, createBlock as N, createCommentVNode as c, renderSlot as S, createSlots as dt, withCtx as _, normalizeProps as X, guardReactiveProps as G, createVNode as ht, createElementVNode as C, Fragment as L, renderList as z, toDisplayString as p, createTextVNode as ie, nextTick as W } from "vue";
|
|
2
|
+
import { u as yt, o as gt, e as Q, g as ft, c as Be, t as mt, p as Z, a as bt, C as Xe, b as pt, d as ce, H as xt, D as Ge, m as ve, X as kt, s as j, E as _t, i as de, f as ee, j as Ct, k as wt, n as We, q as $t, r as St, I as je, J as Lt } from "./index-BKDMQMKQ.js";
|
|
3
|
+
import { _ as zt } from "./Title-BQKp20eU.js";
|
|
4
|
+
import { u as At, U as It } from "./usePrinter-BNaQ2HUw.js";
|
|
5
|
+
import { D as Nt } from "./DataTable-BAr4XpSA.js";
|
|
6
|
+
import { L as Dt } from "./Legend-CxZqkiNm.js";
|
|
7
|
+
import Ft from "./vue-ui-skeleton-BgWQSBb-.js";
|
|
8
|
+
import { S as Ot } from "./Slicer-B81b2Jr1.js";
|
|
9
|
+
import Pt from "./vue-ui-accordion-DyqkVlpC.js";
|
|
10
|
+
import { u as Ye } from "./useNestedProp-B_1UW4X2.js";
|
|
11
|
+
import { _ as Et } from "./PackageVersion-CQUs0b3q.js";
|
|
12
|
+
import { _ as Tt } from "./PenAndPaper-DmGOEcsD.js";
|
|
13
|
+
import { u as Vt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
14
|
+
import { u as Ht } from "./useChartAccessibility-BWojgys7.js";
|
|
15
|
+
import { B as Rt } from "./BaseDraggableDialog-DyV-BY6O.js";
|
|
16
|
+
import Mt from "./vue-ui-donut-C5sXao7U.js";
|
|
17
|
+
import { _ as Ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
|
+
const Bt = ["id"], Xt = ["xmlns", "viewBox"], Gt = ["x", "y", "width", "height"], Wt = ["id"], jt = ["stop-color"], Yt = ["stop-color"], qt = ["id"], Jt = ["stop-color"], Kt = ["stop-color"], Qt = ["stop-color"], Zt = { key: 1 }, el = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], tl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ll = { key: 0 }, al = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ol = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ul = ["x", "y", "font-size", "fill", "font-weight"], sl = {
|
|
19
|
+
key: 3,
|
|
20
|
+
class: /* @__PURE__ */ D({ "donut-opacity": !0 })
|
|
21
|
+
}, nl = ["text-anchor", "font-size", "fill", "transform"], rl = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], il = { key: 1 }, cl = ["cx", "cy", "r", "fill"], vl = { key: 0 }, dl = { key: 0 }, hl = ["d", "stroke"], yl = ["text-anchor", "x", "y", "fill"], gl = ["cx", "cy", "r", "fill"], fl = { key: 0 }, ml = ["cx", "cy", "fill"], bl = { key: 1 }, pl = ["d", "fill", "stroke"], xl = { key: 2 }, kl = ["d", "fill", "stroke"], _l = ["x", "y", "font-size", "fill"], Cl = ["x", "y", "width", "height", "fill"], wl = ["x", "y", "width", "height", "onMouseenter", "onClick"], $l = {
|
|
22
|
+
key: 5,
|
|
23
|
+
class: "vue-data-ui-watermark"
|
|
24
|
+
}, Sl = ["onClick"], Ll = { key: 0 }, zl = { key: 1 }, Al = {
|
|
25
|
+
key: 9,
|
|
26
|
+
ref: "source",
|
|
27
|
+
dir: "auto"
|
|
28
|
+
}, Il = { key: 0 }, Nl = { key: 1 }, Dl = {
|
|
29
|
+
__name: "vue-ui-donut-evolution",
|
|
30
|
+
props: {
|
|
31
|
+
config: {
|
|
32
|
+
type: Object,
|
|
33
|
+
default() {
|
|
34
|
+
return {};
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
dataset: {
|
|
38
|
+
type: Array,
|
|
39
|
+
default() {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
emits: ["selectLegend"],
|
|
45
|
+
setup(qe, { expose: Je, emit: Ke }) {
|
|
46
|
+
const { vue_ui_donut_evolution: Qe } = yt(), m = qe, Y = b(() => !!m.dataset && m.dataset.length), d = y({
|
|
47
|
+
start: 0,
|
|
48
|
+
end: Math.max(...m.dataset.map((t) => t.values.length))
|
|
49
|
+
});
|
|
50
|
+
function he() {
|
|
51
|
+
ye();
|
|
52
|
+
}
|
|
53
|
+
const P = y(null);
|
|
54
|
+
async function ye() {
|
|
55
|
+
(e.value.style.chart.zoom.startIndex !== null || e.value.style.chart.zoom.endIndex !== null) && P.value ? (e.value.style.chart.zoom.startIndex !== null && (await W(), await W(), P.value && P.value.setStartValue(e.value.style.chart.zoom.startIndex)), e.value.style.chart.zoom.endIndex !== null && (await W(), await W(), P.value && P.value.setEndValue(Ze(e.value.style.chart.zoom.endIndex + 1)))) : (d.value = {
|
|
56
|
+
start: 0,
|
|
57
|
+
end: O.value
|
|
58
|
+
}, be.value += 1);
|
|
59
|
+
}
|
|
60
|
+
function Ze(t) {
|
|
61
|
+
const a = O.value;
|
|
62
|
+
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;
|
|
63
|
+
}
|
|
64
|
+
vt(() => {
|
|
65
|
+
ge();
|
|
66
|
+
});
|
|
67
|
+
function ge() {
|
|
68
|
+
gt(m.dataset) ? Q({
|
|
69
|
+
componentName: "VueUiDonutEvolution",
|
|
70
|
+
type: "dataset"
|
|
71
|
+
}) : m.dataset.length && m.dataset.forEach((t, a) => {
|
|
72
|
+
ft({
|
|
73
|
+
datasetObject: t,
|
|
74
|
+
requiredAttributes: ["name", "values"]
|
|
75
|
+
}).forEach((l) => {
|
|
76
|
+
Q({
|
|
77
|
+
componentName: "VueUiDonutEvolution",
|
|
78
|
+
type: "datasetSerieAttribute",
|
|
79
|
+
property: l,
|
|
80
|
+
index: a
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}), ye();
|
|
84
|
+
}
|
|
85
|
+
const E = y(Be()), x = y([]), f = y(null), te = y(null), le = y(!1), T = y(null), fe = y(null), et = y(null), me = y(0), be = y(0), pe = y(0), xe = y(0), ke = y(0), _e = Ke, e = b({
|
|
86
|
+
get: () => Se(),
|
|
87
|
+
set: (t) => t
|
|
88
|
+
}), { userOptionsVisible: ae, setUserOptionsVisibility: Ce, keepUserOptionState: we } = Vt({ config: e.value }), { svgRef: $e } = Ht({ config: e.value.style.chart.title });
|
|
89
|
+
function Se() {
|
|
90
|
+
const t = Ye({
|
|
91
|
+
userConfig: m.config,
|
|
92
|
+
defaultConfig: Qe
|
|
93
|
+
});
|
|
94
|
+
let a = {};
|
|
95
|
+
return t.theme ? a = {
|
|
96
|
+
...Ye({
|
|
97
|
+
userConfig: bt.vue_ui_donut_evolution[t.theme] || m.config,
|
|
98
|
+
defaultConfig: t
|
|
99
|
+
}),
|
|
100
|
+
customPalette: mt[t.theme] || Z
|
|
101
|
+
} : a = t, m.config && Xe(m.config, "style.chart.zoom.startIndex") ? a.style.chart.zoom.startIndex = m.config.style.chart.zoom.startIndex : a.style.chart.zoom.startIndex = null, m.config && Xe(m.config, "style.chart.zoom.endIndex") ? a.style.chart.zoom.endIndex = m.config.style.chart.zoom.endIndex : a.style.chart.zoom.endIndex = null, a;
|
|
102
|
+
}
|
|
103
|
+
Ue(() => m.config, (t) => {
|
|
104
|
+
e.value = Se(), ae.value = !e.value.userOptions.showOnChartHover, ge(), pe.value += 1, xe.value += 1, ke.value += 1, M.value.showTable = e.value.table.show;
|
|
105
|
+
}, { deep: !0 }), Ue(() => m.dataset, (t) => {
|
|
106
|
+
he();
|
|
107
|
+
}, { deep: !0 });
|
|
108
|
+
const { isPrinting: Le, isImaging: ze, generatePdf: Ae, generateImage: Ie } = At({
|
|
109
|
+
elementId: E.value,
|
|
110
|
+
fileName: e.value.style.chart.title.text || "vue-ui-donut-evolution",
|
|
111
|
+
options: e.value.userOptions.print
|
|
112
|
+
}), tt = b(() => e.value.userOptions.show && !e.value.style.chart.title.text), lt = b(() => pt(e.value.customPalette)), M = y({
|
|
113
|
+
showTable: e.value.table.show
|
|
114
|
+
}), r = b(() => ({
|
|
115
|
+
top: e.value.style.chart.layout.padding.top,
|
|
116
|
+
right: e.value.style.chart.layout.padding.right,
|
|
117
|
+
bottom: e.value.style.chart.layout.padding.bottom,
|
|
118
|
+
left: e.value.style.chart.layout.padding.left
|
|
119
|
+
})), v = b(() => {
|
|
120
|
+
const t = e.value.style.chart.layout.height, a = e.value.style.chart.layout.width, l = t - r.value.top - r.value.bottom, n = a - r.value.left - r.value.right;
|
|
121
|
+
return {
|
|
122
|
+
absoluteHeight: t,
|
|
123
|
+
absoluteWidth: a,
|
|
124
|
+
centerX: r.value.left + n / 2,
|
|
125
|
+
centerY: r.value.top + l / 2,
|
|
126
|
+
height: l,
|
|
127
|
+
width: n
|
|
128
|
+
};
|
|
129
|
+
}), F = b(() => (m.dataset.forEach((t, a) => {
|
|
130
|
+
[null, void 0].includes(t.name) && Q({
|
|
131
|
+
componentName: "VueUiDonutEvolution",
|
|
132
|
+
type: "datasetSerieAttribute",
|
|
133
|
+
property: "name",
|
|
134
|
+
index: a
|
|
135
|
+
}), [null, void 0].includes(t.values) && Q({
|
|
136
|
+
componentName: "VueUiDonutEvolution",
|
|
137
|
+
type: "datasetSerieAttribute",
|
|
138
|
+
property: "values",
|
|
139
|
+
index: a
|
|
140
|
+
});
|
|
141
|
+
}), m.dataset.map((t, a) => ({
|
|
142
|
+
...t,
|
|
143
|
+
values: xt(t.values),
|
|
144
|
+
color: ce(t.color) || lt.value[a] || Z[a] || Z[a % Z.length],
|
|
145
|
+
length: (t.values || []).length,
|
|
146
|
+
uid: Be()
|
|
147
|
+
})))), U = b(() => F.value.filter((t) => !x.value.includes(t.uid)).map((t) => ({
|
|
148
|
+
...t,
|
|
149
|
+
values: t.values.filter((a, l) => l >= d.value.start && l <= d.value.end)
|
|
150
|
+
}))), O = b(() => Math.max(...U.value.map((t) => t.length))), w = b(() => v.value.width / (d.value.end - d.value.start)), k = b(() => {
|
|
151
|
+
const t = [];
|
|
152
|
+
for (let u = 0; u < d.value.end - d.value.start; u += 1) {
|
|
153
|
+
const g = U.value.map((I) => I.values[u] ?? null), h = g.filter((I) => [void 0, null].includes(I)).length === g.length, A = g.reduce((I, $) => I + $, 0), re = g.map((I) => I / A), R = r.value.left + w.value * u + w.value / 2;
|
|
154
|
+
t.push({
|
|
155
|
+
index: u,
|
|
156
|
+
percentages: re,
|
|
157
|
+
subtotal: h || A < 0 ? null : A,
|
|
158
|
+
values: g,
|
|
159
|
+
x: R
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
const a = 0, l = Math.max(...t.map((u) => u.subtotal)), n = t.length === 1 ? l * 2 : l;
|
|
163
|
+
return t.map((u, g) => {
|
|
164
|
+
const h = w.value / 2 * 0.7, A = h > v.value.width / 16 ? v.value.width / 16 : h, re = f.value === u.index ? v.value.width / 16 : A, R = t.length > 4 ? h * 2 : h * 2 > w.value / 2 * 0.7 ? w.value / 2 * 0.7 : h * 2, I = v.value.absoluteHeight - r.value.bottom - v.value.height * u.subtotal / Ge(a, n, e.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;
|
|
165
|
+
return {
|
|
166
|
+
...u,
|
|
167
|
+
y: I,
|
|
168
|
+
radius: A,
|
|
169
|
+
activeRadius: re,
|
|
170
|
+
hoverRadius: R,
|
|
171
|
+
donut: ve({
|
|
172
|
+
series: U.value.map(($, Me) => ({
|
|
173
|
+
color: $.color,
|
|
174
|
+
name: $.name,
|
|
175
|
+
value: $.values[g] ?? 0
|
|
176
|
+
}))
|
|
177
|
+
}, u.x, I, A, A, 1.99999, 2, 1, 360, 105.25, A / 2),
|
|
178
|
+
donutHover: ve({
|
|
179
|
+
series: U.value.map(($, Me) => ({
|
|
180
|
+
color: $.color,
|
|
181
|
+
name: $.name,
|
|
182
|
+
value: $.values[g] ?? 0
|
|
183
|
+
}))
|
|
184
|
+
}, u.x, I, R, R, 1.99999, 2, 1, 360, 105.25, R / 2),
|
|
185
|
+
donutFocus: ve({
|
|
186
|
+
series: U.value.map(($, Me) => ({
|
|
187
|
+
color: $.color,
|
|
188
|
+
name: $.name,
|
|
189
|
+
value: $.values[g] ?? 0
|
|
190
|
+
}))
|
|
191
|
+
}, v.value.centerX, v.value.centerY, v.value.height / 3.6, v.value.height / 3.6, 1.99999, 2, 1, 360, 105.25, v.value.height / 6)
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
function Ne(t, a, l) {
|
|
196
|
+
return de(
|
|
197
|
+
e.value.style.chart.layout.dataLabels.formatter,
|
|
198
|
+
t,
|
|
199
|
+
ee({
|
|
200
|
+
p: e.value.style.chart.layout.dataLabels.prefix,
|
|
201
|
+
v: t,
|
|
202
|
+
s: e.value.style.chart.layout.dataLabels.suffix,
|
|
203
|
+
r: e.value.style.chart.layout.dataLabels.rounding
|
|
204
|
+
}),
|
|
205
|
+
{ datapoint: a, index: l }
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
const oe = b(() => ({
|
|
209
|
+
max: Math.max(...k.value.map((t) => t.subtotal)),
|
|
210
|
+
min: 0
|
|
211
|
+
})), V = b(() => {
|
|
212
|
+
const t = k.value.length === 1 ? oe.value.max * 2 : oe.value.max;
|
|
213
|
+
return Ge(oe.value.min, t, e.value.style.chart.layout.grid.yAxis.dataLabels.steps);
|
|
214
|
+
});
|
|
215
|
+
function at(t) {
|
|
216
|
+
return t / V.value.max;
|
|
217
|
+
}
|
|
218
|
+
const ot = b(() => V.value.ticks.map((t) => ({
|
|
219
|
+
y: v.value.absoluteHeight - r.value.bottom - v.value.height * at(t),
|
|
220
|
+
value: t
|
|
221
|
+
})));
|
|
222
|
+
function ut(t, a) {
|
|
223
|
+
return isNaN(t.value / je(a, "value")) ? 0 : (t.value / je(a, "value") * 100).toFixed(0) + "%";
|
|
224
|
+
}
|
|
225
|
+
function De() {
|
|
226
|
+
f.value = null, te.value = null;
|
|
227
|
+
}
|
|
228
|
+
function st(t) {
|
|
229
|
+
f.value = t.index, te.value = t;
|
|
230
|
+
}
|
|
231
|
+
const q = y(null);
|
|
232
|
+
function Fe(t, a) {
|
|
233
|
+
!t.subtotal || !e.value.style.chart.dialog.show || (te.value = null, f.value = null, le.value = !0, T.value = t, ct(t), [null, void 0].includes(a) || (q.value = a));
|
|
234
|
+
}
|
|
235
|
+
const Oe = b(() => F.value.map((t, a) => ({
|
|
236
|
+
name: t.name,
|
|
237
|
+
value: t.values.slice(d.value.start, d.value.end).reduce((l, n) => l + n, 0),
|
|
238
|
+
shape: "circle",
|
|
239
|
+
uid: t.uid,
|
|
240
|
+
color: t.color
|
|
241
|
+
})).sort((t, a) => a.value - t.value).map((t) => ({
|
|
242
|
+
...t,
|
|
243
|
+
opacity: x.value.includes(t.uid) ? 0.5 : 1,
|
|
244
|
+
segregate: () => ue(t.uid),
|
|
245
|
+
isSegregated: x.value.includes(t.uid)
|
|
246
|
+
}))), Pe = b(() => k.value.map((t) => t.subtotal).reduce((t, a) => t + a, 0)), nt = b(() => ({
|
|
247
|
+
cy: "donut-div-legend",
|
|
248
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
249
|
+
color: e.value.style.chart.legend.color,
|
|
250
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
251
|
+
paddingBottom: 12,
|
|
252
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
253
|
+
}));
|
|
254
|
+
function ue(t) {
|
|
255
|
+
if (x.value.includes(t))
|
|
256
|
+
x.value = x.value.filter((a) => a !== t), _e("selectLegend", null);
|
|
257
|
+
else {
|
|
258
|
+
if (x.value.length === F.value.length - 1) return;
|
|
259
|
+
x.value.push(t), _e("selectLegend", F.value.find((a) => a.uid === t));
|
|
260
|
+
}
|
|
261
|
+
T.value && Fe(k.value.find((a, l) => l === q.value));
|
|
262
|
+
}
|
|
263
|
+
const H = b(() => {
|
|
264
|
+
const t = [""].concat(F.value.filter((u) => !x.value.includes(u.uid)).map((u) => ({
|
|
265
|
+
name: u.name,
|
|
266
|
+
color: u.color
|
|
267
|
+
}))).concat(["Σ"]);
|
|
268
|
+
let a = [];
|
|
269
|
+
for (let u = 0; u < O.value; u += 1) {
|
|
270
|
+
const g = F.value.filter((h) => !x.value.includes(h.uid)).map((h) => h.values[u] ?? 0).reduce((h, A) => h + A, 0);
|
|
271
|
+
a.push([e.value.style.chart.layout.grid.xAxis.dataLabels.values[u] ?? "-"].concat(F.value.filter((h) => !x.value.includes(h.uid)).map((h) => ({
|
|
272
|
+
value: h.values[u] ?? 0,
|
|
273
|
+
percentage: h.values[u] ? h.values[u] / g * 100 : 0
|
|
274
|
+
}))).concat([`${e.value.style.chart.layout.dataLabels.prefix}${Number(g.toFixed(e.value.table.td.roundingValue))}${e.value.style.chart.layout.dataLabels.suffix}`]));
|
|
275
|
+
}
|
|
276
|
+
const l = {
|
|
277
|
+
th: {
|
|
278
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
279
|
+
color: e.value.table.th.color,
|
|
280
|
+
outline: e.value.table.th.outline
|
|
281
|
+
},
|
|
282
|
+
td: {
|
|
283
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
284
|
+
color: e.value.table.td.color,
|
|
285
|
+
outline: e.value.table.td.outline
|
|
286
|
+
},
|
|
287
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
288
|
+
}, n = [
|
|
289
|
+
e.value.table.columnNames.period
|
|
290
|
+
].concat(F.value.filter((u) => !x.value.includes(u.uid)).map((u) => u.name)).concat(e.value.table.columnNames.total);
|
|
291
|
+
return { head: t, body: a, config: l, colNames: n };
|
|
292
|
+
});
|
|
293
|
+
function rt() {
|
|
294
|
+
return F.value;
|
|
295
|
+
}
|
|
296
|
+
function Ee() {
|
|
297
|
+
W(() => {
|
|
298
|
+
const t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = [...H.value.head.map((g) => g.name ?? g)], l = [...H.value.body.map((g) => g.map((h) => h.value ?? h))], n = t.concat([a]).concat(l), u = $t(n);
|
|
299
|
+
St({ csvContent: u, title: e.value.style.chart.title.text || "vue-ui-donut-evolution" });
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
const B = y(!1);
|
|
303
|
+
function it(t) {
|
|
304
|
+
B.value = t, me.value += 1;
|
|
305
|
+
}
|
|
306
|
+
function Te() {
|
|
307
|
+
M.value.showTable = !M.value.showTable;
|
|
308
|
+
}
|
|
309
|
+
const J = y(!1);
|
|
310
|
+
function se() {
|
|
311
|
+
J.value = !J.value;
|
|
312
|
+
}
|
|
313
|
+
function Ve(t) {
|
|
314
|
+
return t.proportion * 100 > e.value.style.chart.donuts.hover.hideLabelsUnderValue;
|
|
315
|
+
}
|
|
316
|
+
const He = y([]), Re = y({}), ne = y(null);
|
|
317
|
+
function ct(t) {
|
|
318
|
+
He.value = t.donut.map((a) => ({
|
|
319
|
+
name: a.name,
|
|
320
|
+
values: [a.value],
|
|
321
|
+
color: a.color
|
|
322
|
+
})), Re.value = Lt({
|
|
323
|
+
...e.value.style.chart.dialog.donutChart,
|
|
324
|
+
responsive: !0,
|
|
325
|
+
theme: e.value.theme
|
|
326
|
+
}), ne.value && ne.value.open();
|
|
327
|
+
}
|
|
328
|
+
return Je({
|
|
329
|
+
getData: rt,
|
|
330
|
+
generatePdf: Ae,
|
|
331
|
+
generateCsv: Ee,
|
|
332
|
+
generateImage: Ie,
|
|
333
|
+
toggleTable: Te,
|
|
334
|
+
toggleAnnotator: se
|
|
335
|
+
}), (t, a) => (o(), s("div", {
|
|
336
|
+
ref_key: "donutEvolutionChart",
|
|
337
|
+
ref: fe,
|
|
338
|
+
class: D(`vue-ui-donut-evolution ${B.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
339
|
+
style: K(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
340
|
+
id: E.value,
|
|
341
|
+
onMouseenter: a[5] || (a[5] = () => i(Ce)(!0)),
|
|
342
|
+
onMouseleave: a[6] || (a[6] = () => i(Ce)(!1))
|
|
343
|
+
}, [
|
|
344
|
+
e.value.userOptions.buttons.annotator ? (o(), N(Tt, {
|
|
345
|
+
key: 0,
|
|
346
|
+
svgRef: i($e),
|
|
347
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
348
|
+
color: e.value.style.chart.color,
|
|
349
|
+
active: J.value,
|
|
350
|
+
onClose: se
|
|
351
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : c("", !0),
|
|
352
|
+
tt.value ? (o(), s("div", {
|
|
353
|
+
key: 1,
|
|
354
|
+
ref_key: "noTitle",
|
|
355
|
+
ref: et,
|
|
356
|
+
class: "vue-data-ui-no-title-space",
|
|
357
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
358
|
+
}, null, 512)) : c("", !0),
|
|
359
|
+
e.value.style.chart.title.text ? (o(), s("div", {
|
|
360
|
+
key: 2,
|
|
361
|
+
style: "width:100%;background:transparent;padding-bottom:24px",
|
|
362
|
+
onMouseleave: De
|
|
363
|
+
}, [
|
|
364
|
+
(o(), N(zt, {
|
|
365
|
+
key: `title_${pe.value}`,
|
|
366
|
+
config: {
|
|
367
|
+
title: {
|
|
368
|
+
cy: "donut-evolution-div-title",
|
|
369
|
+
...e.value.style.chart.title
|
|
370
|
+
},
|
|
371
|
+
subtitle: {
|
|
372
|
+
cy: "donut-evolution-div-subtitle",
|
|
373
|
+
...e.value.style.chart.title.subtitle
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}, null, 8, ["config"]))
|
|
377
|
+
], 32)) : c("", !0),
|
|
378
|
+
e.value.userOptions.show && Y.value && (i(we) || i(ae)) ? (o(), N(It, {
|
|
379
|
+
ref: "details",
|
|
380
|
+
key: `user_options_${me.value}`,
|
|
381
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
382
|
+
color: e.value.style.chart.color,
|
|
383
|
+
isPrinting: i(Le),
|
|
384
|
+
isImaging: i(ze),
|
|
385
|
+
uid: E.value,
|
|
386
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
387
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
388
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
389
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
390
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
391
|
+
isFullscreen: B.value,
|
|
392
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
393
|
+
chartElement: fe.value,
|
|
394
|
+
position: e.value.userOptions.position,
|
|
395
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
396
|
+
isAnnotation: J.value,
|
|
397
|
+
onToggleFullscreen: it,
|
|
398
|
+
onGeneratePdf: i(Ae),
|
|
399
|
+
onGenerateCsv: Ee,
|
|
400
|
+
onGenerateImage: i(Ie),
|
|
401
|
+
onToggleTable: Te,
|
|
402
|
+
onToggleAnnotator: se,
|
|
403
|
+
style: K({
|
|
404
|
+
visibility: i(we) ? i(ae) ? "visible" : "hidden" : "visible"
|
|
405
|
+
})
|
|
406
|
+
}, dt({ _: 2 }, [
|
|
407
|
+
t.$slots.menuIcon ? {
|
|
408
|
+
name: "menuIcon",
|
|
409
|
+
fn: _(({ isOpen: l, color: n }) => [
|
|
410
|
+
S(t.$slots, "menuIcon", X(G({ isOpen: l, color: n })), void 0, !0)
|
|
411
|
+
]),
|
|
412
|
+
key: "0"
|
|
413
|
+
} : void 0,
|
|
414
|
+
t.$slots.optionPdf ? {
|
|
415
|
+
name: "optionPdf",
|
|
416
|
+
fn: _(() => [
|
|
417
|
+
S(t.$slots, "optionPdf", {}, void 0, !0)
|
|
418
|
+
]),
|
|
419
|
+
key: "1"
|
|
420
|
+
} : void 0,
|
|
421
|
+
t.$slots.optionCsv ? {
|
|
422
|
+
name: "optionCsv",
|
|
423
|
+
fn: _(() => [
|
|
424
|
+
S(t.$slots, "optionCsv", {}, void 0, !0)
|
|
425
|
+
]),
|
|
426
|
+
key: "2"
|
|
427
|
+
} : void 0,
|
|
428
|
+
t.$slots.optionImg ? {
|
|
429
|
+
name: "optionImg",
|
|
430
|
+
fn: _(() => [
|
|
431
|
+
S(t.$slots, "optionImg", {}, void 0, !0)
|
|
432
|
+
]),
|
|
433
|
+
key: "3"
|
|
434
|
+
} : void 0,
|
|
435
|
+
t.$slots.optionTable ? {
|
|
436
|
+
name: "optionTable",
|
|
437
|
+
fn: _(() => [
|
|
438
|
+
S(t.$slots, "optionTable", {}, void 0, !0)
|
|
439
|
+
]),
|
|
440
|
+
key: "4"
|
|
441
|
+
} : void 0,
|
|
442
|
+
t.$slots.optionFullscreen ? {
|
|
443
|
+
name: "optionFullscreen",
|
|
444
|
+
fn: _(({ toggleFullscreen: l, isFullscreen: n }) => [
|
|
445
|
+
S(t.$slots, "optionFullscreen", X(G({ toggleFullscreen: l, isFullscreen: n })), void 0, !0)
|
|
446
|
+
]),
|
|
447
|
+
key: "5"
|
|
448
|
+
} : void 0,
|
|
449
|
+
t.$slots.optionAnnotator ? {
|
|
450
|
+
name: "optionAnnotator",
|
|
451
|
+
fn: _(({ toggleAnnotator: l, isAnnotator: n }) => [
|
|
452
|
+
S(t.$slots, "optionAnnotator", X(G({ toggleAnnotator: l, isAnnotator: n })), void 0, !0)
|
|
453
|
+
]),
|
|
454
|
+
key: "6"
|
|
455
|
+
} : void 0
|
|
456
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
|
|
457
|
+
Y.value ? (o(), s("svg", {
|
|
458
|
+
key: 4,
|
|
459
|
+
ref_key: "svgRef",
|
|
460
|
+
ref: $e,
|
|
461
|
+
xmlns: i(kt),
|
|
462
|
+
class: D({ "vue-data-ui-fullscreen--on": B.value, "vue-data-ui-fulscreen--off": !B.value }),
|
|
463
|
+
viewBox: `0 0 ${v.value.absoluteWidth} ${v.value.absoluteHeight}`,
|
|
464
|
+
style: K(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};`)
|
|
465
|
+
}, [
|
|
466
|
+
ht(Et),
|
|
467
|
+
t.$slots["chart-background"] ? (o(), s("foreignObject", {
|
|
468
|
+
key: 0,
|
|
469
|
+
x: r.value.left,
|
|
470
|
+
y: r.value.top,
|
|
471
|
+
width: v.value.width,
|
|
472
|
+
height: v.value.height,
|
|
473
|
+
style: {
|
|
474
|
+
pointerEvents: "none"
|
|
475
|
+
}
|
|
476
|
+
}, [
|
|
477
|
+
S(t.$slots, "chart-background", {}, void 0, !0)
|
|
478
|
+
], 8, Gt)) : c("", !0),
|
|
479
|
+
C("defs", null, [
|
|
480
|
+
C("linearGradient", {
|
|
481
|
+
id: `hover_${E.value}`,
|
|
482
|
+
x1: "0%",
|
|
483
|
+
y1: "0%",
|
|
484
|
+
x2: "0%",
|
|
485
|
+
y2: "100%"
|
|
486
|
+
}, [
|
|
487
|
+
C("stop", {
|
|
488
|
+
offset: "0%",
|
|
489
|
+
"stop-color": i(j)(e.value.style.chart.backgroundColor, e.value.style.chart.layout.highlighter.opacity)
|
|
490
|
+
}, null, 8, jt),
|
|
491
|
+
C("stop", {
|
|
492
|
+
offset: "100%",
|
|
493
|
+
"stop-color": i(j)(e.value.style.chart.layout.highlighter.color, e.value.style.chart.layout.highlighter.opacity)
|
|
494
|
+
}, null, 8, Yt)
|
|
495
|
+
], 8, Wt),
|
|
496
|
+
C("radialGradient", {
|
|
497
|
+
id: `focus_${E.value}`
|
|
498
|
+
}, [
|
|
499
|
+
C("stop", {
|
|
500
|
+
offset: "0%",
|
|
501
|
+
"stop-color": i(j)(i(ce)(e.value.style.chart.backgroundColor), 0)
|
|
502
|
+
}, null, 8, Jt),
|
|
503
|
+
C("stop", {
|
|
504
|
+
offset: "77%",
|
|
505
|
+
"stop-color": i(j)("#FFFFFF", 30)
|
|
506
|
+
}, null, 8, Kt),
|
|
507
|
+
C("stop", {
|
|
508
|
+
offset: "100%",
|
|
509
|
+
"stop-color": i(j)(i(ce)(e.value.style.chart.backgroundColor), 0)
|
|
510
|
+
}, null, 8, Qt)
|
|
511
|
+
], 8, qt)
|
|
512
|
+
]),
|
|
513
|
+
e.value.style.chart.layout.grid.show ? (o(), s("g", Zt, [
|
|
514
|
+
C("line", {
|
|
515
|
+
x1: r.value.left,
|
|
516
|
+
x2: r.value.left,
|
|
517
|
+
y1: r.value.top,
|
|
518
|
+
y2: r.value.top + v.value.height,
|
|
519
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
520
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth,
|
|
521
|
+
"stroke-linecap": "round"
|
|
522
|
+
}, null, 8, el),
|
|
523
|
+
C("line", {
|
|
524
|
+
x1: r.value.left,
|
|
525
|
+
x2: v.value.absoluteWidth - r.value.right,
|
|
526
|
+
y1: v.value.absoluteHeight - r.value.bottom,
|
|
527
|
+
y2: v.value.absoluteHeight - r.value.bottom,
|
|
528
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
529
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth,
|
|
530
|
+
"stroke-linecap": "round"
|
|
531
|
+
}, null, 8, tl),
|
|
532
|
+
e.value.style.chart.layout.grid.showVerticalLines ? (o(), s("g", ll, [
|
|
533
|
+
(o(!0), s(L, null, z(d.value.end - d.value.start, (l, n) => (o(), s("line", {
|
|
534
|
+
x1: r.value.left + (n + 1) * w.value,
|
|
535
|
+
x2: r.value.left + (n + 1) * w.value,
|
|
536
|
+
y1: r.value.top,
|
|
537
|
+
y2: v.value.absoluteHeight - r.value.bottom,
|
|
538
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
539
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth,
|
|
540
|
+
"stroke-linecap": "round"
|
|
541
|
+
}, null, 8, al))), 256))
|
|
542
|
+
])) : c("", !0)
|
|
543
|
+
])) : c("", !0),
|
|
544
|
+
e.value.style.chart.layout.grid.yAxis.dataLabels.show ? (o(), s("g", {
|
|
545
|
+
key: 2,
|
|
546
|
+
class: D({ "donut-opacity": !0, "donut-behind": f.value !== null })
|
|
547
|
+
}, [
|
|
548
|
+
(o(!0), s(L, null, z(ot.value, (l, n) => (o(), s("g", null, [
|
|
549
|
+
l.value >= V.value.min && l.value <= V.value.max ? (o(), s("line", {
|
|
550
|
+
key: 0,
|
|
551
|
+
x1: r.value.left,
|
|
552
|
+
x2: r.value.left - 5,
|
|
553
|
+
y1: l.y,
|
|
554
|
+
y2: l.y,
|
|
555
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
556
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth
|
|
557
|
+
}, null, 8, ol)) : c("", !0),
|
|
558
|
+
l.value >= V.value.min && l.value <= V.value.max ? (o(), s("text", {
|
|
559
|
+
key: 1,
|
|
560
|
+
x: r.value.left - 8 + e.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,
|
|
561
|
+
y: l.y + e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize / 3,
|
|
562
|
+
"font-size": e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,
|
|
563
|
+
"text-anchor": "end",
|
|
564
|
+
fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
|
|
565
|
+
"font-weight": e.value.style.chart.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
566
|
+
}, p(i(_t)(l.value) ? i(de)(
|
|
567
|
+
e.value.style.chart.layout.dataLabels.formatter,
|
|
568
|
+
l.value,
|
|
569
|
+
i(ee)({
|
|
570
|
+
p: e.value.style.chart.layout.dataLabels.prefix,
|
|
571
|
+
v: l.value,
|
|
572
|
+
s: e.value.style.chart.layout.dataLabels.suffix,
|
|
573
|
+
r: e.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue
|
|
574
|
+
}),
|
|
575
|
+
{ datapoint: l, seriesIndex: n }
|
|
576
|
+
) : ""), 9, ul)) : c("", !0)
|
|
577
|
+
]))), 256))
|
|
578
|
+
], 2)) : c("", !0),
|
|
579
|
+
e.value.style.chart.layout.grid.xAxis.dataLabels.show ? (o(), s("g", sl, [
|
|
580
|
+
(o(!0), s(L, null, z(d.value.end - d.value.start, (l, n) => (o(), s("g", null, [
|
|
581
|
+
e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast && (n === 0 || n === O.value - 1) || !e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast ? (o(), s("text", {
|
|
582
|
+
key: 0,
|
|
583
|
+
"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",
|
|
584
|
+
"font-size": e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
|
|
585
|
+
fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
|
|
586
|
+
transform: `translate(${r.value.left + w.value * n + w.value / 2}, ${e.value.style.chart.layout.grid.xAxis.dataLabels.offsetY + v.value.absoluteHeight - r.value.bottom + e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize * 2}), rotate(${e.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`
|
|
587
|
+
}, p(e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(n) + Number(d.value.start)] ?? ""), 9, nl)) : c("", !0)
|
|
588
|
+
]))), 256))
|
|
589
|
+
])) : c("", !0),
|
|
590
|
+
(o(!0), s(L, null, z(k.value, (l, n) => (o(), s("g", null, [
|
|
591
|
+
e.value.style.chart.layout.line.show && n < k.value.length - 1 && ![l.subtotal, k.value[n + 1].subtotal].includes(null) ? (o(), s("line", {
|
|
592
|
+
key: 0,
|
|
593
|
+
class: D({ "donut-opacity": !0, "donut-behind": f.value !== null }),
|
|
594
|
+
x1: l.x,
|
|
595
|
+
y1: l.y,
|
|
596
|
+
x2: k.value[n + 1].x,
|
|
597
|
+
y2: k.value[n + 1].y,
|
|
598
|
+
stroke: e.value.style.chart.layout.line.stroke,
|
|
599
|
+
"stroke-width": e.value.style.chart.layout.line.strokeWidth,
|
|
600
|
+
"stroke-linecap": "round",
|
|
601
|
+
"stroke-linejoin": "round"
|
|
602
|
+
}, null, 10, rl)) : c("", !0),
|
|
603
|
+
l.subtotal !== null ? (o(), s("g", il, [
|
|
604
|
+
l.subtotal ? (o(), s("circle", {
|
|
605
|
+
key: 0,
|
|
606
|
+
cx: l.x,
|
|
607
|
+
cy: l.y,
|
|
608
|
+
r: l.activeRadius,
|
|
609
|
+
fill: e.value.style.chart.backgroundColor
|
|
610
|
+
}, null, 8, cl)) : c("", !0)
|
|
611
|
+
])) : c("", !0)
|
|
612
|
+
]))), 256)),
|
|
613
|
+
(o(!0), s(L, null, z(k.value, (l, n) => (o(), s("g", {
|
|
614
|
+
class: D({ "donut-opacity": !0, "donut-behind": n !== f.value && f.value !== null })
|
|
615
|
+
}, [
|
|
616
|
+
l.subtotal ? (o(), s("g", vl, [
|
|
617
|
+
f.value !== null && f.value === n ? (o(), s("g", dl, [
|
|
618
|
+
(o(!0), s(L, null, z(l.donutHover, (u) => (o(), s("g", null, [
|
|
619
|
+
Ve(u) ? (o(), s("path", {
|
|
620
|
+
key: 0,
|
|
621
|
+
d: i(Ct)(u, { x: u.center.endX, y: u.center.endY }, 12, 12, { x: l.x, y: l.y }, !1, 20),
|
|
622
|
+
stroke: u.color,
|
|
623
|
+
"stroke-width": "1",
|
|
624
|
+
"stroke-linecap": "round",
|
|
625
|
+
"stroke-linejoin": "round",
|
|
626
|
+
fill: "none"
|
|
627
|
+
}, null, 8, hl)) : c("", !0)
|
|
628
|
+
]))), 256)),
|
|
629
|
+
(o(!0), s(L, null, z(l.donutHover, (u, g) => (o(), s("g", null, [
|
|
630
|
+
Ve(u) ? (o(), s("text", {
|
|
631
|
+
key: 0,
|
|
632
|
+
"data-cy-hover-label": "",
|
|
633
|
+
"text-anchor": i(We)(u, !0, 0).anchor,
|
|
634
|
+
x: i(We)(u, !0, 9).x,
|
|
635
|
+
y: i(wt)(u, 14, 10),
|
|
636
|
+
fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
|
|
637
|
+
"font-size": 8,
|
|
638
|
+
"font-weight": "bold"
|
|
639
|
+
}, p(u.name) + ": " + p(ut(u, l.donut)) + " (" + p(u.value === null ? "-" : Ne(u.value, u, g)) + ") ", 9, yl)) : c("", !0)
|
|
640
|
+
]))), 256)),
|
|
641
|
+
C("g", null, [
|
|
642
|
+
C("circle", {
|
|
643
|
+
cx: l.x,
|
|
644
|
+
cy: l.y,
|
|
645
|
+
r: l.hoverRadius,
|
|
646
|
+
fill: e.value.style.chart.backgroundColor
|
|
647
|
+
}, null, 8, gl)
|
|
648
|
+
])
|
|
649
|
+
])) : c("", !0)
|
|
650
|
+
])) : c("", !0)
|
|
651
|
+
], 2))), 256)),
|
|
652
|
+
(o(!0), s(L, null, z(k.value, (l, n) => (o(), s("g", {
|
|
653
|
+
class: D({ "donut-opacity": !0, "donut-behind": n !== f.value && f.value !== null })
|
|
654
|
+
}, [
|
|
655
|
+
l.subtotal !== null ? (o(), s("g", fl, [
|
|
656
|
+
l.subtotal === 0 ? (o(), s("circle", {
|
|
657
|
+
key: 0,
|
|
658
|
+
cx: l.x,
|
|
659
|
+
cy: l.y,
|
|
660
|
+
r: 3,
|
|
661
|
+
fill: e.value.style.chart.color
|
|
662
|
+
}, null, 8, ml)) : f.value !== null && f.value === n ? (o(), s("g", bl, [
|
|
663
|
+
(o(!0), s(L, null, z(l.donutHover, (u, g) => (o(), s("path", {
|
|
664
|
+
d: u.arcSlice,
|
|
665
|
+
fill: `${u.color}`,
|
|
666
|
+
"stroke-width": 1,
|
|
667
|
+
stroke: e.value.style.chart.backgroundColor
|
|
668
|
+
}, null, 8, pl))), 256))
|
|
669
|
+
])) : (o(), s("g", xl, [
|
|
670
|
+
(o(!0), s(L, null, z(l.donut, (u, g) => (o(), s("path", {
|
|
671
|
+
d: u.arcSlice,
|
|
672
|
+
fill: `${u.color}`,
|
|
673
|
+
"stroke-width": 0.5,
|
|
674
|
+
stroke: e.value.style.chart.backgroundColor
|
|
675
|
+
}, null, 8, kl))), 256))
|
|
676
|
+
]))
|
|
677
|
+
])) : c("", !0)
|
|
678
|
+
], 2))), 256)),
|
|
679
|
+
(o(!0), s(L, null, z(k.value, (l, n) => (o(), s("g", {
|
|
680
|
+
class: D({ "donut-opacity": !0, "donut-behind": n !== f.value && f.value !== null || le.value && n !== T.value.index })
|
|
681
|
+
}, [
|
|
682
|
+
l.subtotal !== null && e.value.style.chart.layout.dataLabels.show ? (o(), s("text", {
|
|
683
|
+
key: 0,
|
|
684
|
+
"text-anchor": "middle",
|
|
685
|
+
x: l.x,
|
|
686
|
+
y: f.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,
|
|
687
|
+
"font-size": e.value.style.chart.layout.dataLabels.fontSize,
|
|
688
|
+
"font-weight": "bold",
|
|
689
|
+
fill: e.value.style.chart.layout.dataLabels.color
|
|
690
|
+
}, p(Ne(l.subtotal, l, n)), 9, _l)) : c("", !0)
|
|
691
|
+
], 2))), 256)),
|
|
692
|
+
(o(!0), s(L, null, z(k.value, (l, n) => (o(), s("rect", {
|
|
693
|
+
x: r.value.left + n * w.value,
|
|
694
|
+
y: r.value.top,
|
|
695
|
+
width: w.value,
|
|
696
|
+
height: v.value.height,
|
|
697
|
+
fill: [f.value, q.value].includes(l.index) ? `url(#hover_${E.value})` : "transparent",
|
|
698
|
+
class: D({ "donut-hover": l.subtotal && [f.value, q.value].includes(l.index) }),
|
|
699
|
+
style: {
|
|
700
|
+
pointerEvents: "none"
|
|
701
|
+
}
|
|
702
|
+
}, null, 10, Cl))), 256)),
|
|
703
|
+
(o(!0), s(L, null, z(k.value, (l, n) => (o(), s("rect", {
|
|
704
|
+
"data-cy-trap": "",
|
|
705
|
+
x: r.value.left + n * w.value,
|
|
706
|
+
y: r.value.top,
|
|
707
|
+
width: w.value,
|
|
708
|
+
height: v.value.height,
|
|
709
|
+
fill: "transparent",
|
|
710
|
+
onMouseenter: (u) => st(l),
|
|
711
|
+
onMouseleave: De,
|
|
712
|
+
onClick: (u) => Fe(l, n),
|
|
713
|
+
class: D({ "donut-hover": f.value === l.index && l.subtotal })
|
|
714
|
+
}, null, 42, wl))), 256)),
|
|
715
|
+
S(t.$slots, "svg", { svg: v.value }, void 0, !0)
|
|
716
|
+
], 14, Xt)) : c("", !0),
|
|
717
|
+
t.$slots.watermark ? (o(), s("div", $l, [
|
|
718
|
+
S(t.$slots, "watermark", X(G({ isPrinting: i(Le) || i(ze) })), void 0, !0)
|
|
719
|
+
])) : c("", !0),
|
|
720
|
+
Y.value ? c("", !0) : (o(), N(Ft, {
|
|
721
|
+
key: 6,
|
|
722
|
+
config: {
|
|
723
|
+
type: "donutEvolution",
|
|
724
|
+
style: {
|
|
725
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
726
|
+
donutEvolution: {
|
|
727
|
+
axis: {
|
|
728
|
+
color: "#CCCCCC"
|
|
729
|
+
},
|
|
730
|
+
donuts: {
|
|
731
|
+
color: "#CCCCCC"
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
}, null, 8, ["config"])),
|
|
737
|
+
O.value > 1 && e.value.style.chart.zoom.show ? (o(), N(Ot, {
|
|
738
|
+
ref_key: "slicerComponent",
|
|
739
|
+
ref: P,
|
|
740
|
+
key: `slicer_${be.value}`,
|
|
741
|
+
background: e.value.style.chart.zoom.color,
|
|
742
|
+
borderColor: e.value.style.chart.backgroundColor,
|
|
743
|
+
fontSize: e.value.style.chart.zoom.fontSize,
|
|
744
|
+
useResetSlot: e.value.style.chart.zoom.useResetSlot,
|
|
745
|
+
labelLeft: e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(d.value.start)] || "",
|
|
746
|
+
labelRight: e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(d.value.end) - 1] || "",
|
|
747
|
+
textColor: e.value.style.chart.color,
|
|
748
|
+
inputColor: e.value.style.chart.zoom.color,
|
|
749
|
+
selectColor: e.value.style.chart.zoom.highlightColor,
|
|
750
|
+
max: O.value,
|
|
751
|
+
min: 0,
|
|
752
|
+
valueStart: d.value.start,
|
|
753
|
+
valueEnd: d.value.end,
|
|
754
|
+
start: d.value.start,
|
|
755
|
+
"onUpdate:start": a[0] || (a[0] = (l) => d.value.start = l),
|
|
756
|
+
end: d.value.end,
|
|
757
|
+
"onUpdate:end": a[1] || (a[1] = (l) => d.value.end = l),
|
|
758
|
+
refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
|
|
759
|
+
refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : O.value,
|
|
760
|
+
enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
|
|
761
|
+
enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
|
|
762
|
+
onReset: he
|
|
763
|
+
}, {
|
|
764
|
+
"reset-action": _(({ reset: l }) => [
|
|
765
|
+
S(t.$slots, "reset-action", X(G({ reset: l })), void 0, !0)
|
|
766
|
+
]),
|
|
767
|
+
_: 3
|
|
768
|
+
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : c("", !0),
|
|
769
|
+
e.value.style.chart.legend.show ? (o(), N(Dt, {
|
|
770
|
+
key: `legend_${ke.value}`,
|
|
771
|
+
legendSet: Oe.value,
|
|
772
|
+
config: nt.value,
|
|
773
|
+
onClickMarker: a[2] || (a[2] = ({ legend: l }) => ue(l.uid))
|
|
774
|
+
}, {
|
|
775
|
+
item: _(({ legend: l, index: n }) => [
|
|
776
|
+
C("div", {
|
|
777
|
+
onClick: (u) => ue(l.uid),
|
|
778
|
+
style: K(`opacity:${x.value.includes(l.uid) ? 0.5 : 1}`)
|
|
779
|
+
}, [
|
|
780
|
+
ie(p(l.name) + ": " + p(i(de)(
|
|
781
|
+
e.value.style.chart.layout.dataLabels.formatter,
|
|
782
|
+
l.value,
|
|
783
|
+
i(ee)({
|
|
784
|
+
p: e.value.style.chart.layout.dataLabels.prefix,
|
|
785
|
+
v: l.value,
|
|
786
|
+
s: e.value.style.chart.layout.dataLabels.suffix,
|
|
787
|
+
r: e.value.style.chart.legend.roundingValue
|
|
788
|
+
}),
|
|
789
|
+
{ datapoint: l, seriesIndex: n }
|
|
790
|
+
)) + " ", 1),
|
|
791
|
+
x.value.includes(l.uid) ? (o(), s("span", zl, " ( - % ) ")) : (o(), s("span", Ll, " (" + p(isNaN(l.value / Pe.value) ? "-" : i(ee)({
|
|
792
|
+
v: l.value / Pe.value * 100,
|
|
793
|
+
s: "%",
|
|
794
|
+
r: e.value.style.chart.legend.roundingPercentage
|
|
795
|
+
})) + ") ", 1))
|
|
796
|
+
], 12, Sl)
|
|
797
|
+
]),
|
|
798
|
+
_: 1
|
|
799
|
+
}, 8, ["legendSet", "config"])) : c("", !0),
|
|
800
|
+
S(t.$slots, "legend", { legend: Oe.value }, void 0, !0),
|
|
801
|
+
t.$slots.source ? (o(), s("div", Al, [
|
|
802
|
+
S(t.$slots, "source", {}, void 0, !0)
|
|
803
|
+
], 512)) : c("", !0),
|
|
804
|
+
Y.value ? (o(), N(Pt, {
|
|
805
|
+
key: 10,
|
|
806
|
+
hideDetails: "",
|
|
807
|
+
config: {
|
|
808
|
+
open: M.value.showTable,
|
|
809
|
+
maxHeight: 1e4,
|
|
810
|
+
body: {
|
|
811
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
812
|
+
color: e.value.style.chart.color
|
|
813
|
+
},
|
|
814
|
+
head: {
|
|
815
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
816
|
+
color: e.value.style.chart.color
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}, {
|
|
820
|
+
content: _(() => [
|
|
821
|
+
(o(), N(Nt, {
|
|
822
|
+
key: `table_${xe.value}`,
|
|
823
|
+
colNames: H.value.colNames,
|
|
824
|
+
head: H.value.head,
|
|
825
|
+
body: H.value.body,
|
|
826
|
+
config: H.value.config,
|
|
827
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
828
|
+
onClose: a[3] || (a[3] = (l) => M.value.showTable = !1)
|
|
829
|
+
}, {
|
|
830
|
+
th: _(({ th: l }) => [
|
|
831
|
+
ie(p(l.name ?? l), 1)
|
|
832
|
+
]),
|
|
833
|
+
td: _(({ td: l }) => [
|
|
834
|
+
l.value === null ? (o(), s("span", Il, "-")) : (o(), s("b", Nl, p(isNaN(l.value) ? "" : e.value.style.chart.layout.dataLabels.prefix) + p(!isNaN(l.value) && l.value !== null ? Number(l.value.toFixed(e.value.table.td.roundingValue)).toLocaleString() : l) + p(isNaN(l.value) ? "" : e.value.style.chart.layout.dataLabels.suffix), 1)),
|
|
835
|
+
C("span", null, p(l.percentage && !isNaN(l.percentage) ? `(${Number(l.percentage.toFixed(e.value.table.td.roundingPercentage)).toLocaleString()}%)` : ""), 1)
|
|
836
|
+
]),
|
|
837
|
+
_: 1
|
|
838
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
839
|
+
]),
|
|
840
|
+
_: 1
|
|
841
|
+
}, 8, ["config"])) : c("", !0),
|
|
842
|
+
e.value.style.chart.dialog.show ? (o(), N(Rt, {
|
|
843
|
+
key: 11,
|
|
844
|
+
ref_key: "dialog",
|
|
845
|
+
ref: ne,
|
|
846
|
+
onClose: a[4] || (a[4] = (l) => {
|
|
847
|
+
T.value = null, le.value = !1;
|
|
848
|
+
}),
|
|
849
|
+
backgroundColor: e.value.style.chart.dialog.backgroundColor,
|
|
850
|
+
color: e.value.style.chart.dialog.color,
|
|
851
|
+
headerBg: e.value.style.chart.dialog.header.backgroundColor,
|
|
852
|
+
headerColor: e.value.style.chart.dialog.header.color
|
|
853
|
+
}, {
|
|
854
|
+
title: _(() => [
|
|
855
|
+
ie(p(e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(T.value.index) + Number(d.value.start)]), 1)
|
|
856
|
+
]),
|
|
857
|
+
default: _(() => [
|
|
858
|
+
T.value ? (o(), N(Mt, {
|
|
859
|
+
key: 0,
|
|
860
|
+
config: Re.value,
|
|
861
|
+
dataset: He.value
|
|
862
|
+
}, null, 8, ["config", "dataset"])) : c("", !0)
|
|
863
|
+
]),
|
|
864
|
+
_: 1
|
|
865
|
+
}, 8, ["backgroundColor", "color", "headerBg", "headerColor"])) : c("", !0)
|
|
866
|
+
], 46, Bt));
|
|
867
|
+
}
|
|
868
|
+
}, Jl = /* @__PURE__ */ Ut(Dl, [["__scopeId", "data-v-9bb660c0"]]);
|
|
869
|
+
export {
|
|
870
|
+
Jl as default
|
|
871
|
+
};
|