vue-data-ui 2.12.6 → 2.12.7-beta.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/dist/{Arrow-Bd9ZVBnX.js → Arrow-CmqjRRUl.js} +1 -1
- package/dist/BaseDraggableDialog-BMlyvt7E.js +180 -0
- package/dist/{BaseIcon-CNbwMh_-.js → BaseIcon-CZdMutjs.js} +1 -1
- package/dist/{ColorPicker-B_FoQwtO.js → ColorPicker-DvVKgyAl.js} +23 -24
- package/dist/{DataTable-Rajdtaf6.js → DataTable-Cv9CIz-a.js} +11 -11
- package/dist/{Legend-BxtDQCIv.js → Legend-DFunFf8i.js} +8 -8
- package/dist/NonSvgPenAndPaper-pVuHj6_A.js +467 -0
- package/dist/PackageVersion-CLY-udAA.js +10 -0
- package/dist/{PenAndPaper-BkP3J-Ft.js → PenAndPaper-B9na2mbr.js} +8 -10
- package/dist/RecursiveCircles-Dn3TGoL6.js +96 -0
- package/dist/RecursiveLabels-NTMB9w5C.js +49 -0
- package/dist/RecursiveLinks-ld_gDZH4.js +64 -0
- package/dist/{Shape-C69a0f29.js → Shape-D3w9qas1.js} +2 -2
- package/dist/{Slicer-7qFdY-bT.js → Slicer-ncY8krrM.js} +2 -2
- package/dist/SparkTooltip-CwThutH2.js +68 -0
- package/dist/{Title-CzaCeCOm.js → Title-B5qqUI3M.js} +2 -2
- package/dist/Tooltip-C9rxJ-Ru.js +149 -0
- package/dist/{usePrinter-C5bLp34h.js → UserOptions-Ddy6CuLC.js} +172 -231
- package/dist/{dom-to-png-Bm0D0yPL.js → dom-to-png-DDlooC9r.js} +1 -1
- package/dist/{img-BN9AzqUr.js → img-m9g7lR5d.js} +1 -1
- package/dist/{index-BFzQMJda.js → index-BiHmNd1-.js} +21 -21
- package/dist/{pdf-uTbs813M.js → pdf-BqM953uL.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/useChartAccessibility-9icAAmYg.js +12 -0
- package/dist/useMouse-AicQS8Vf.js +13 -0
- package/dist/{useNestedProp-v7KPpwuP.js → useNestedProp-tRqS0ZAM.js} +1 -1
- package/dist/{usePanZoom-CUkkqW81.js → usePanZoom-BQMvRXEQ.js} +16 -17
- package/dist/usePrinter-CRCbl1WG.js +53 -0
- package/dist/vClickOutside-C6WiFswA.js +13 -0
- package/dist/{vue-data-ui-D1k8FeRp.js → vue-data-ui-D9uTDt73.js} +63 -63
- package/dist/vue-data-ui.js +19 -19
- package/dist/{vue-ui-3d-bar-DoklA4DT.js → vue-ui-3d-bar-rtuSc8FS.js} +397 -402
- package/dist/{vue-ui-accordion-BUz4JIIX.js → vue-ui-accordion-CmCs2yR2.js} +3 -3
- package/dist/{vue-ui-age-pyramid-4kyBq-Dy.js → vue-ui-age-pyramid-BrzMSiyu.js} +215 -218
- package/dist/{vue-ui-annotator-Bq1ZeFfb.js → vue-ui-annotator-CYxmTpf6.js} +2 -2
- package/dist/{vue-ui-bullet-DU10avvA.js → vue-ui-bullet-D25qNQfb.js} +137 -140
- package/dist/{vue-ui-candlestick-BI1t3flz.js → vue-ui-candlestick-BuerNa-r.js} +265 -271
- package/dist/{vue-ui-carousel-table-VowLf_oc.js → vue-ui-carousel-table-aN0HLsOO.js} +137 -137
- package/dist/{vue-ui-chestnut-BHjV3d94.js → vue-ui-chestnut-oUj2ocsZ.js} +397 -400
- package/dist/{vue-ui-chord-CPr7r-2_.js → vue-ui-chord-C4evlXYB.js} +356 -365
- package/dist/vue-ui-circle-pack-CWrNiKTY.js +656 -0
- package/dist/{vue-ui-cursor-C9teAbVI.js → vue-ui-cursor-DgpSttlt.js} +2 -2
- package/dist/{vue-ui-dashboard-CwDYB8tP.js → vue-ui-dashboard-BN2ha1Eh.js} +62 -62
- package/dist/{vue-ui-digits-CHmkL0hn.js → vue-ui-digits-BhjAxXgm.js} +2 -2
- package/dist/vue-ui-donut-D3_z61HI.js +1291 -0
- package/dist/vue-ui-donut-evolution-oKtmZPx4.js +864 -0
- package/dist/{vue-ui-dumbbell-DTKLLd1N.js → vue-ui-dumbbell-C8Lokx-F.js} +265 -270
- package/dist/{vue-ui-flow-BLBhsU2n.js → vue-ui-flow-BVRkH0PS.js} +291 -300
- package/dist/{vue-ui-funnel-CIrWdeBk.js → vue-ui-funnel-DFxcmAB5.js} +216 -219
- package/dist/{vue-ui-galaxy-ByhKyIV4.js → vue-ui-galaxy-CGE0hlBC.js} +227 -235
- package/dist/{vue-ui-gauge-BbfBMpng.js → vue-ui-gauge-B48eMvOR.js} +240 -243
- package/dist/{vue-ui-gizmo-BM-_QfHM.js → vue-ui-gizmo-zTKNpjvv.js} +57 -58
- package/dist/{vue-ui-heatmap-BA4z4hsw.js → vue-ui-heatmap-UNfTt8SM.js} +239 -242
- package/dist/{vue-ui-history-plot-8vM_IUy8.js → vue-ui-history-plot-CbCWmvtg.js} +257 -262
- package/dist/{vue-ui-kpi-D57QLK6A.js → vue-ui-kpi-Drf_lrlh.js} +29 -30
- package/dist/{vue-ui-mini-loader-CR4c-xJQ.js → vue-ui-mini-loader-DU3G6BVs.js} +2 -2
- package/dist/vue-ui-molecule-B5MOXYEA.js +580 -0
- package/dist/{vue-ui-mood-radar-Brc9cxoD.js → vue-ui-mood-radar-CC_CVLvn.js} +180 -186
- package/dist/{vue-ui-nested-donuts-W3Z5F--L.js → vue-ui-nested-donuts-D_H962kk.js} +366 -374
- package/dist/{vue-ui-onion-BNBlGNlF.js → vue-ui-onion-P8k6T724.js} +252 -258
- package/dist/{vue-ui-parallel-coordinate-plot-B5G3jyvg.js → vue-ui-parallel-coordinate-plot-B5Los0vX.js} +296 -303
- package/dist/{vue-ui-quadrant-CUy9mVIA.js → vue-ui-quadrant-B3wzCTxK.js} +402 -409
- package/dist/{vue-ui-quick-chart-D4_8mRXU.js → vue-ui-quick-chart-oucj6hXk.js} +611 -616
- package/dist/{vue-ui-radar-BUk56jGL.js → vue-ui-radar-Cjqlyu6d.js} +270 -277
- package/dist/{vue-ui-rating-B9TQl5KP.js → vue-ui-rating-gryk_h_6.js} +2 -2
- package/dist/vue-ui-relation-circle-ielvWC-1.js +525 -0
- package/dist/{vue-ui-ridgeline-Cl06bGom.js → vue-ui-ridgeline-Dydqo68b.js} +321 -326
- package/dist/{vue-ui-rings-B6bpFlFp.js → vue-ui-rings-BRBXektJ.js} +262 -269
- package/dist/{vue-ui-scatter--WUuVw5G.js → vue-ui-scatter-Df-BM7Ts.js} +372 -379
- package/dist/{vue-ui-skeleton-B_YI7Yuc.js → vue-ui-skeleton-CbYQYRvD.js} +19 -19
- package/dist/{vue-ui-smiley-Bbam2fDz.js → vue-ui-smiley-BfHaQMaW.js} +2 -2
- package/dist/{vue-ui-spark-trend-DavXuwGt.js → vue-ui-spark-trend-z3fUChs_.js} +114 -117
- package/dist/{vue-ui-sparkbar-9N1FU9-J.js → vue-ui-sparkbar-ChtFIugH.js} +104 -106
- package/dist/{vue-ui-sparkgauge-_9ntq4EK.js → vue-ui-sparkgauge-DtpODCww.js} +72 -74
- package/dist/{vue-ui-sparkhistogram-BEzOV4HV.js → vue-ui-sparkhistogram-C3XnYiXI.js} +83 -86
- package/dist/vue-ui-sparkline-CoL8jiX8.js +459 -0
- package/dist/{vue-ui-sparkstackbar-BSWcs3v0.js → vue-ui-sparkstackbar-CYk3mZJH.js} +102 -105
- package/dist/{vue-ui-stackbar-gG5BLlAr.js → vue-ui-stackbar-D9LGbuG5.js} +433 -437
- package/dist/{vue-ui-strip-plot-BJouRmxh.js → vue-ui-strip-plot-C5r1Ee2R.js} +245 -252
- package/dist/{vue-ui-table-D9Ry8s4N.js → vue-ui-table-DBaT_TfA.js} +3 -3
- package/dist/{vue-ui-table-heatmap-Bizzpi31.js → vue-ui-table-heatmap-CYW4YfKN.js} +93 -94
- package/dist/{vue-ui-table-sparkline-Dg54Ovs2.js → vue-ui-table-sparkline-Di0MYR4p.js} +212 -212
- package/dist/{vue-ui-thermometer-6MSdF_Gm.js → vue-ui-thermometer-BF1btHY2.js} +154 -157
- package/dist/{vue-ui-timer-ByaKokk8.js → vue-ui-timer-D9FfRWN5.js} +180 -181
- package/dist/vue-ui-tiremarks-CQ0lk8fJ.js +341 -0
- package/dist/vue-ui-treemap-1Lx7YRtc.js +947 -0
- package/dist/{vue-ui-vertical-bar-CE4oBwBv.js → vue-ui-vertical-bar-DdVVQ1ED.js} +397 -403
- package/dist/{vue-ui-waffle-DNEEnY_G.js → vue-ui-waffle-BhnuPiRD.js} +317 -324
- package/dist/vue-ui-wheel-BIjJ0fg8.js +335 -0
- package/dist/vue-ui-word-cloud-3-r8HwO_.js +642 -0
- package/dist/{vue-ui-world-Brhq17TE.js → vue-ui-world-CPIGEswq.js} +430 -442
- package/dist/{vue-ui-xy-K2G7QQxG.js → vue-ui-xy-9e_epIN4.js} +845 -846
- package/dist/vue-ui-xy-canvas-DcGgQ7s4.js +1206 -0
- package/package.json +6 -6
- package/dist/BaseDraggableDialog-Bzwlfmy1.js +0 -186
- package/dist/PackageVersion-BjrblLPQ.js +0 -10
- package/dist/Tooltip-CWmRmhJr.js +0 -158
- package/dist/useChartAccessibility-BWojgys7.js +0 -13
- package/dist/vue-ui-circle-pack-D_jYpsuD.js +0 -659
- package/dist/vue-ui-donut-WRUDvvZa.js +0 -1292
- package/dist/vue-ui-donut-evolution-BQxV5D_L.js +0 -871
- package/dist/vue-ui-molecule-Bq69N7rC.js +0 -782
- package/dist/vue-ui-relation-circle-T6aTibIU.js +0 -528
- package/dist/vue-ui-sparkline-D__GCUAz.js +0 -519
- package/dist/vue-ui-tiremarks-Z8pjUT1g.js +0 -344
- package/dist/vue-ui-treemap-pRJ3be5l.js +0 -956
- package/dist/vue-ui-wheel-DWPYZxdT.js +0 -338
- package/dist/vue-ui-word-cloud-DAR7R8F8.js +0 -648
- package/dist/vue-ui-xy-canvas-ml44sPHS.js +0 -1673
|
@@ -0,0 +1,864 @@
|
|
|
1
|
+
import { defineAsyncComponent as F, computed as b, ref as y, onMounted as xt, watch as Be, createElementBlock as n, openBlock as o, unref as r, normalizeStyle as Z, normalizeClass as D, createBlock as N, createCommentVNode as c, renderSlot as $, createSlots as kt, withCtx as C, normalizeProps as W, guardReactiveProps as j, createVNode as Ct, createElementVNode as _, Fragment as A, renderList as L, toDisplayString as p, createTextVNode as ce, nextTick as Y } from "vue";
|
|
2
|
+
import { u as _t, o as wt, e as ee, g as St, c as Xe, t as $t, p as te, a as At, C as Ge, b as Lt, d as ve, H as zt, D as We, m as de, X as It, s as q, E as Nt, i as he, f as le, j as Dt, k as Pt, n as je, q as Ft, r as Ot, I as Ye, J as Et } from "./index-BiHmNd1-.js";
|
|
3
|
+
import { u as qe } from "./useNestedProp-tRqS0ZAM.js";
|
|
4
|
+
import { u as Tt } from "./usePrinter-CRCbl1WG.js";
|
|
5
|
+
import { u as Vt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
6
|
+
import { u as Ht } from "./useChartAccessibility-9icAAmYg.js";
|
|
7
|
+
import Rt from "./Legend-DFunFf8i.js";
|
|
8
|
+
import { S as Mt } from "./Slicer-ncY8krrM.js";
|
|
9
|
+
import Ut from "./Title-B5qqUI3M.js";
|
|
10
|
+
import { _ as Bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
const Xt = ["id"], Gt = ["xmlns", "viewBox"], Wt = ["x", "y", "width", "height"], jt = ["id"], Yt = ["stop-color"], qt = ["stop-color"], Jt = ["id"], Kt = ["stop-color"], Qt = ["stop-color"], Zt = ["stop-color"], el = { key: 1 }, tl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ll = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], al = { key: 0 }, ol = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ul = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], nl = ["x", "y", "font-size", "fill", "font-weight"], sl = {
|
|
12
|
+
key: 3,
|
|
13
|
+
class: /* @__PURE__ */ D({ "donut-opacity": !0 })
|
|
14
|
+
}, rl = ["text-anchor", "font-size", "fill", "transform"], il = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], cl = { key: 1 }, vl = ["cx", "cy", "r", "fill"], dl = { key: 0 }, hl = { key: 0 }, yl = ["d", "stroke"], gl = ["text-anchor", "x", "y", "fill"], fl = ["cx", "cy", "r", "fill"], ml = { key: 0 }, bl = ["cx", "cy", "fill"], pl = { key: 1 }, xl = ["d", "fill", "stroke"], kl = { key: 2 }, Cl = ["d", "fill", "stroke"], _l = ["x", "y", "font-size", "fill"], wl = ["x", "y", "width", "height", "fill"], Sl = ["x", "y", "width", "height", "onMouseenter", "onClick"], $l = {
|
|
15
|
+
key: 5,
|
|
16
|
+
class: "vue-data-ui-watermark"
|
|
17
|
+
}, Al = ["onClick"], Ll = { key: 0 }, zl = { key: 1 }, Il = {
|
|
18
|
+
key: 9,
|
|
19
|
+
ref: "source",
|
|
20
|
+
dir: "auto"
|
|
21
|
+
}, Nl = { key: 0 }, Dl = { key: 1 }, Pl = {
|
|
22
|
+
__name: "vue-ui-donut-evolution",
|
|
23
|
+
props: {
|
|
24
|
+
config: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default() {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
dataset: {
|
|
31
|
+
type: Array,
|
|
32
|
+
default() {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
emits: ["selectLegend"],
|
|
38
|
+
setup(Je, { expose: Ke, emit: Qe }) {
|
|
39
|
+
const Ze = F(() => import("./vue-ui-accordion-CmCs2yR2.js")), et = F(() => import("./BaseDraggableDialog-BMlyvt7E.js")), tt = F(() => import("./DataTable-Cv9CIz-a.js")), lt = F(() => import("./PackageVersion-CLY-udAA.js")), at = F(() => import("./PenAndPaper-B9na2mbr.js")), ot = F(() => import("./vue-ui-skeleton-CbYQYRvD.js")), ut = F(() => import("./UserOptions-Ddy6CuLC.js")), nt = F(() => import("./vue-ui-donut-D3_z61HI.js")), { vue_ui_donut_evolution: st } = _t(), m = Je, J = b(() => !!m.dataset && m.dataset.length), d = y({
|
|
40
|
+
start: 0,
|
|
41
|
+
end: Math.max(...m.dataset.map((t) => t.values.length))
|
|
42
|
+
});
|
|
43
|
+
function ye() {
|
|
44
|
+
ge();
|
|
45
|
+
}
|
|
46
|
+
const E = y(null);
|
|
47
|
+
async function ge() {
|
|
48
|
+
(e.value.style.chart.zoom.startIndex !== null || e.value.style.chart.zoom.endIndex !== null) && E.value ? (e.value.style.chart.zoom.startIndex !== null && (await Y(), await Y(), E.value && E.value.setStartValue(e.value.style.chart.zoom.startIndex)), e.value.style.chart.zoom.endIndex !== null && (await Y(), await Y(), E.value && E.value.setEndValue(rt(e.value.style.chart.zoom.endIndex + 1)))) : (d.value = {
|
|
49
|
+
start: 0,
|
|
50
|
+
end: O.value
|
|
51
|
+
}, pe.value += 1);
|
|
52
|
+
}
|
|
53
|
+
function rt(t) {
|
|
54
|
+
const a = O.value;
|
|
55
|
+
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;
|
|
56
|
+
}
|
|
57
|
+
xt(() => {
|
|
58
|
+
fe();
|
|
59
|
+
});
|
|
60
|
+
function fe() {
|
|
61
|
+
wt(m.dataset) ? ee({
|
|
62
|
+
componentName: "VueUiDonutEvolution",
|
|
63
|
+
type: "dataset"
|
|
64
|
+
}) : m.dataset.length && m.dataset.forEach((t, a) => {
|
|
65
|
+
St({
|
|
66
|
+
datasetObject: t,
|
|
67
|
+
requiredAttributes: ["name", "values"]
|
|
68
|
+
}).forEach((l) => {
|
|
69
|
+
ee({
|
|
70
|
+
componentName: "VueUiDonutEvolution",
|
|
71
|
+
type: "datasetSerieAttribute",
|
|
72
|
+
property: l,
|
|
73
|
+
index: a
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}), ge();
|
|
77
|
+
}
|
|
78
|
+
const T = y(Xe()), x = y([]), g = y(null), K = y(null), ae = y(!1), V = y(null), me = y(null), it = y(null), be = y(0), pe = y(0), xe = y(0), ke = y(0), Ce = y(0), _e = Qe, e = b({
|
|
79
|
+
get: () => Ae(),
|
|
80
|
+
set: (t) => t
|
|
81
|
+
}), { userOptionsVisible: oe, setUserOptionsVisibility: we, keepUserOptionState: Se } = Vt({ config: e.value }), { svgRef: $e } = Ht({ config: e.value.style.chart.title });
|
|
82
|
+
function Ae() {
|
|
83
|
+
const t = qe({
|
|
84
|
+
userConfig: m.config,
|
|
85
|
+
defaultConfig: st
|
|
86
|
+
});
|
|
87
|
+
let a = {};
|
|
88
|
+
return t.theme ? a = {
|
|
89
|
+
...qe({
|
|
90
|
+
userConfig: At.vue_ui_donut_evolution[t.theme] || m.config,
|
|
91
|
+
defaultConfig: t
|
|
92
|
+
}),
|
|
93
|
+
customPalette: $t[t.theme] || te
|
|
94
|
+
} : a = t, m.config && Ge(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 && Ge(m.config, "style.chart.zoom.endIndex") ? a.style.chart.zoom.endIndex = m.config.style.chart.zoom.endIndex : a.style.chart.zoom.endIndex = null, a;
|
|
95
|
+
}
|
|
96
|
+
Be(() => m.config, (t) => {
|
|
97
|
+
e.value = Ae(), oe.value = !e.value.userOptions.showOnChartHover, fe(), xe.value += 1, ke.value += 1, Ce.value += 1, U.value.showTable = e.value.table.show;
|
|
98
|
+
}, { deep: !0 }), Be(() => m.dataset, (t) => {
|
|
99
|
+
ye();
|
|
100
|
+
}, { deep: !0 });
|
|
101
|
+
const { isPrinting: Le, isImaging: ze, generatePdf: Ie, generateImage: Ne } = Tt({
|
|
102
|
+
elementId: T.value,
|
|
103
|
+
fileName: e.value.style.chart.title.text || "vue-ui-donut-evolution",
|
|
104
|
+
options: e.value.userOptions.print
|
|
105
|
+
}), ct = b(() => e.value.userOptions.show && !e.value.style.chart.title.text), vt = b(() => Lt(e.value.customPalette)), U = y({
|
|
106
|
+
showTable: e.value.table.show
|
|
107
|
+
}), i = b(() => ({
|
|
108
|
+
top: e.value.style.chart.layout.padding.top,
|
|
109
|
+
right: e.value.style.chart.layout.padding.right,
|
|
110
|
+
bottom: e.value.style.chart.layout.padding.bottom,
|
|
111
|
+
left: e.value.style.chart.layout.padding.left
|
|
112
|
+
})), v = b(() => {
|
|
113
|
+
const t = e.value.style.chart.layout.height, a = e.value.style.chart.layout.width, l = t - i.value.top - i.value.bottom, s = a - i.value.left - i.value.right;
|
|
114
|
+
return {
|
|
115
|
+
absoluteHeight: t,
|
|
116
|
+
absoluteWidth: a,
|
|
117
|
+
centerX: i.value.left + s / 2,
|
|
118
|
+
centerY: i.value.top + l / 2,
|
|
119
|
+
height: l,
|
|
120
|
+
width: s
|
|
121
|
+
};
|
|
122
|
+
}), P = b(() => (m.dataset.forEach((t, a) => {
|
|
123
|
+
[null, void 0].includes(t.name) && ee({
|
|
124
|
+
componentName: "VueUiDonutEvolution",
|
|
125
|
+
type: "datasetSerieAttribute",
|
|
126
|
+
property: "name",
|
|
127
|
+
index: a
|
|
128
|
+
}), [null, void 0].includes(t.values) && ee({
|
|
129
|
+
componentName: "VueUiDonutEvolution",
|
|
130
|
+
type: "datasetSerieAttribute",
|
|
131
|
+
property: "values",
|
|
132
|
+
index: a
|
|
133
|
+
});
|
|
134
|
+
}), m.dataset.map((t, a) => ({
|
|
135
|
+
...t,
|
|
136
|
+
values: zt(t.values),
|
|
137
|
+
color: ve(t.color) || vt.value[a] || te[a] || te[a % te.length],
|
|
138
|
+
length: (t.values || []).length,
|
|
139
|
+
uid: Xe()
|
|
140
|
+
})))), B = b(() => P.value.filter((t) => !x.value.includes(t.uid)).map((t) => ({
|
|
141
|
+
...t,
|
|
142
|
+
values: t.values.filter((a, l) => l >= d.value.start && l <= d.value.end)
|
|
143
|
+
}))), O = b(() => Math.max(...B.value.map((t) => t.length))), w = b(() => v.value.width / (d.value.end - d.value.start)), k = b(() => {
|
|
144
|
+
const t = [];
|
|
145
|
+
for (let u = 0; u < d.value.end - d.value.start; u += 1) {
|
|
146
|
+
const f = B.value.map((I) => I.values[u] ?? null), h = f.filter((I) => [void 0, null].includes(I)).length === f.length, z = f.reduce((I, S) => I + S, 0), ie = f.map((I) => I / z), M = i.value.left + w.value * u + w.value / 2;
|
|
147
|
+
t.push({
|
|
148
|
+
index: u,
|
|
149
|
+
percentages: ie,
|
|
150
|
+
subtotal: h || z < 0 ? null : z,
|
|
151
|
+
values: f,
|
|
152
|
+
x: M
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
const a = 0, l = Math.max(...t.map((u) => u.subtotal)), s = t.length === 1 ? l * 2 : l;
|
|
156
|
+
return t.map((u, f) => {
|
|
157
|
+
const h = w.value / 2 * 0.7, z = h > v.value.width / 16 ? v.value.width / 16 : h, ie = g.value === u.index ? v.value.width / 16 : z, M = t.length > 4 ? h * 2 : h * 2 > w.value / 2 * 0.7 ? w.value / 2 * 0.7 : h * 2, I = v.value.absoluteHeight - i.value.bottom - v.value.height * u.subtotal / We(a, s, e.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;
|
|
158
|
+
return {
|
|
159
|
+
...u,
|
|
160
|
+
y: I,
|
|
161
|
+
radius: z,
|
|
162
|
+
activeRadius: ie,
|
|
163
|
+
hoverRadius: M,
|
|
164
|
+
donut: de({
|
|
165
|
+
series: B.value.map((S, Ue) => ({
|
|
166
|
+
color: S.color,
|
|
167
|
+
name: S.name,
|
|
168
|
+
value: S.values[f] ?? 0
|
|
169
|
+
}))
|
|
170
|
+
}, u.x, I, z, z, 1.99999, 2, 1, 360, 105.25, z / 2),
|
|
171
|
+
donutHover: de({
|
|
172
|
+
series: B.value.map((S, Ue) => ({
|
|
173
|
+
color: S.color,
|
|
174
|
+
name: S.name,
|
|
175
|
+
value: S.values[f] ?? 0
|
|
176
|
+
}))
|
|
177
|
+
}, u.x, I, M, M, 1.99999, 2, 1, 360, 105.25, M / 2),
|
|
178
|
+
donutFocus: de({
|
|
179
|
+
series: B.value.map((S, Ue) => ({
|
|
180
|
+
color: S.color,
|
|
181
|
+
name: S.name,
|
|
182
|
+
value: S.values[f] ?? 0
|
|
183
|
+
}))
|
|
184
|
+
}, 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)
|
|
185
|
+
};
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
function De(t, a, l) {
|
|
189
|
+
return he(
|
|
190
|
+
e.value.style.chart.layout.dataLabels.formatter,
|
|
191
|
+
t,
|
|
192
|
+
le({
|
|
193
|
+
p: e.value.style.chart.layout.dataLabels.prefix,
|
|
194
|
+
v: t,
|
|
195
|
+
s: e.value.style.chart.layout.dataLabels.suffix,
|
|
196
|
+
r: e.value.style.chart.layout.dataLabels.rounding
|
|
197
|
+
}),
|
|
198
|
+
{ datapoint: a, index: l }
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
const ue = b(() => ({
|
|
202
|
+
max: Math.max(...k.value.map((t) => t.subtotal)),
|
|
203
|
+
min: 0
|
|
204
|
+
})), H = b(() => {
|
|
205
|
+
const t = k.value.length === 1 ? ue.value.max * 2 : ue.value.max;
|
|
206
|
+
return We(ue.value.min, t, e.value.style.chart.layout.grid.yAxis.dataLabels.steps);
|
|
207
|
+
});
|
|
208
|
+
function dt(t) {
|
|
209
|
+
return t / H.value.max;
|
|
210
|
+
}
|
|
211
|
+
const ht = b(() => H.value.ticks.map((t) => ({
|
|
212
|
+
y: v.value.absoluteHeight - i.value.bottom - v.value.height * dt(t),
|
|
213
|
+
value: t
|
|
214
|
+
})));
|
|
215
|
+
function yt(t, a) {
|
|
216
|
+
return isNaN(t.value / Ye(a, "value")) ? 0 : (t.value / Ye(a, "value") * 100).toFixed(0) + "%";
|
|
217
|
+
}
|
|
218
|
+
function Pe() {
|
|
219
|
+
g.value = null, K.value = null;
|
|
220
|
+
}
|
|
221
|
+
function gt(t) {
|
|
222
|
+
g.value = t.index, K.value = t;
|
|
223
|
+
}
|
|
224
|
+
const X = y(null);
|
|
225
|
+
function Fe(t, a) {
|
|
226
|
+
!t.subtotal || !e.value.style.chart.dialog.show || (K.value = null, g.value = null, ae.value = !0, V.value = t, pt(t), [null, void 0].includes(a) || (X.value = a));
|
|
227
|
+
}
|
|
228
|
+
const Oe = b(() => P.value.map((t, a) => ({
|
|
229
|
+
name: t.name,
|
|
230
|
+
value: t.values.slice(d.value.start, d.value.end).reduce((l, s) => l + s, 0),
|
|
231
|
+
shape: "circle",
|
|
232
|
+
uid: t.uid,
|
|
233
|
+
color: t.color
|
|
234
|
+
})).sort((t, a) => a.value - t.value).map((t) => ({
|
|
235
|
+
...t,
|
|
236
|
+
opacity: x.value.includes(t.uid) ? 0.5 : 1,
|
|
237
|
+
segregate: () => ne(t.uid),
|
|
238
|
+
isSegregated: x.value.includes(t.uid)
|
|
239
|
+
}))), Ee = b(() => k.value.map((t) => t.subtotal).reduce((t, a) => t + a, 0)), ft = b(() => ({
|
|
240
|
+
cy: "donut-div-legend",
|
|
241
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
242
|
+
color: e.value.style.chart.legend.color,
|
|
243
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
244
|
+
paddingBottom: 12,
|
|
245
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
246
|
+
}));
|
|
247
|
+
function ne(t) {
|
|
248
|
+
if (x.value.includes(t))
|
|
249
|
+
x.value = x.value.filter((a) => a !== t), _e("selectLegend", null);
|
|
250
|
+
else {
|
|
251
|
+
if (x.value.length === P.value.length - 1) return;
|
|
252
|
+
x.value.push(t), _e("selectLegend", P.value.find((a) => a.uid === t));
|
|
253
|
+
}
|
|
254
|
+
V.value && Fe(k.value.find((a, l) => l === X.value));
|
|
255
|
+
}
|
|
256
|
+
const R = b(() => {
|
|
257
|
+
const t = [""].concat(P.value.filter((u) => !x.value.includes(u.uid)).map((u) => ({
|
|
258
|
+
name: u.name,
|
|
259
|
+
color: u.color
|
|
260
|
+
}))).concat(["Σ"]);
|
|
261
|
+
let a = [];
|
|
262
|
+
for (let u = 0; u < O.value; u += 1) {
|
|
263
|
+
const f = P.value.filter((h) => !x.value.includes(h.uid)).map((h) => h.values[u] ?? 0).reduce((h, z) => h + z, 0);
|
|
264
|
+
a.push([e.value.style.chart.layout.grid.xAxis.dataLabels.values[u] ?? "-"].concat(P.value.filter((h) => !x.value.includes(h.uid)).map((h) => ({
|
|
265
|
+
value: h.values[u] ?? 0,
|
|
266
|
+
percentage: h.values[u] ? h.values[u] / f * 100 : 0
|
|
267
|
+
}))).concat([`${e.value.style.chart.layout.dataLabels.prefix}${Number(f.toFixed(e.value.table.td.roundingValue))}${e.value.style.chart.layout.dataLabels.suffix}`]));
|
|
268
|
+
}
|
|
269
|
+
const l = {
|
|
270
|
+
th: {
|
|
271
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
272
|
+
color: e.value.table.th.color,
|
|
273
|
+
outline: e.value.table.th.outline
|
|
274
|
+
},
|
|
275
|
+
td: {
|
|
276
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
277
|
+
color: e.value.table.td.color,
|
|
278
|
+
outline: e.value.table.td.outline
|
|
279
|
+
},
|
|
280
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
281
|
+
}, s = [
|
|
282
|
+
e.value.table.columnNames.period
|
|
283
|
+
].concat(P.value.filter((u) => !x.value.includes(u.uid)).map((u) => u.name)).concat(e.value.table.columnNames.total);
|
|
284
|
+
return { head: t, body: a, config: l, colNames: s };
|
|
285
|
+
});
|
|
286
|
+
function mt() {
|
|
287
|
+
return P.value;
|
|
288
|
+
}
|
|
289
|
+
function Te() {
|
|
290
|
+
Y(() => {
|
|
291
|
+
const t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = [...R.value.head.map((f) => f.name ?? f)], l = [...R.value.body.map((f) => f.map((h) => h.value ?? h))], s = t.concat([a]).concat(l), u = Ft(s);
|
|
292
|
+
Ot({ csvContent: u, title: e.value.style.chart.title.text || "vue-ui-donut-evolution" });
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
const G = y(!1);
|
|
296
|
+
function bt(t) {
|
|
297
|
+
G.value = t, be.value += 1;
|
|
298
|
+
}
|
|
299
|
+
function Ve() {
|
|
300
|
+
U.value.showTable = !U.value.showTable;
|
|
301
|
+
}
|
|
302
|
+
const Q = y(!1);
|
|
303
|
+
function se() {
|
|
304
|
+
Q.value = !Q.value;
|
|
305
|
+
}
|
|
306
|
+
function He(t) {
|
|
307
|
+
return t.proportion * 100 > e.value.style.chart.donuts.hover.hideLabelsUnderValue;
|
|
308
|
+
}
|
|
309
|
+
const Re = y([]), Me = y({}), re = y(null);
|
|
310
|
+
function pt(t) {
|
|
311
|
+
Re.value = t.donut.map((a) => ({
|
|
312
|
+
name: a.name,
|
|
313
|
+
values: [a.value],
|
|
314
|
+
color: a.color
|
|
315
|
+
})), Me.value = Et({
|
|
316
|
+
...e.value.style.chart.dialog.donutChart,
|
|
317
|
+
responsive: !0,
|
|
318
|
+
theme: e.value.theme
|
|
319
|
+
}), re.value && re.value.open();
|
|
320
|
+
}
|
|
321
|
+
return Ke({
|
|
322
|
+
getData: mt,
|
|
323
|
+
generatePdf: Ie,
|
|
324
|
+
generateCsv: Te,
|
|
325
|
+
generateImage: Ne,
|
|
326
|
+
toggleTable: Ve,
|
|
327
|
+
toggleAnnotator: se
|
|
328
|
+
}), (t, a) => (o(), n("div", {
|
|
329
|
+
ref_key: "donutEvolutionChart",
|
|
330
|
+
ref: me,
|
|
331
|
+
class: D(`vue-ui-donut-evolution ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
332
|
+
style: Z(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
333
|
+
id: T.value,
|
|
334
|
+
onMouseenter: a[5] || (a[5] = () => r(we)(!0)),
|
|
335
|
+
onMouseleave: a[6] || (a[6] = () => r(we)(!1))
|
|
336
|
+
}, [
|
|
337
|
+
e.value.userOptions.buttons.annotator ? (o(), N(r(at), {
|
|
338
|
+
key: 0,
|
|
339
|
+
svgRef: r($e),
|
|
340
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
341
|
+
color: e.value.style.chart.color,
|
|
342
|
+
active: Q.value,
|
|
343
|
+
onClose: se
|
|
344
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : c("", !0),
|
|
345
|
+
ct.value ? (o(), n("div", {
|
|
346
|
+
key: 1,
|
|
347
|
+
ref_key: "noTitle",
|
|
348
|
+
ref: it,
|
|
349
|
+
class: "vue-data-ui-no-title-space",
|
|
350
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
351
|
+
}, null, 512)) : c("", !0),
|
|
352
|
+
e.value.style.chart.title.text ? (o(), n("div", {
|
|
353
|
+
key: 2,
|
|
354
|
+
style: "width:100%;background:transparent;padding-bottom:24px",
|
|
355
|
+
onMouseleave: Pe
|
|
356
|
+
}, [
|
|
357
|
+
(o(), N(Ut, {
|
|
358
|
+
key: `title_${xe.value}`,
|
|
359
|
+
config: {
|
|
360
|
+
title: {
|
|
361
|
+
cy: "donut-evolution-div-title",
|
|
362
|
+
...e.value.style.chart.title
|
|
363
|
+
},
|
|
364
|
+
subtitle: {
|
|
365
|
+
cy: "donut-evolution-div-subtitle",
|
|
366
|
+
...e.value.style.chart.title.subtitle
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}, null, 8, ["config"]))
|
|
370
|
+
], 32)) : c("", !0),
|
|
371
|
+
e.value.userOptions.show && J.value && (r(Se) || r(oe)) ? (o(), N(r(ut), {
|
|
372
|
+
ref: "details",
|
|
373
|
+
key: `user_options_${be.value}`,
|
|
374
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
375
|
+
color: e.value.style.chart.color,
|
|
376
|
+
isPrinting: r(Le),
|
|
377
|
+
isImaging: r(ze),
|
|
378
|
+
uid: T.value,
|
|
379
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
380
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
381
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
382
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
383
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
384
|
+
isFullscreen: G.value,
|
|
385
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
386
|
+
chartElement: me.value,
|
|
387
|
+
position: e.value.userOptions.position,
|
|
388
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
389
|
+
isAnnotation: Q.value,
|
|
390
|
+
onToggleFullscreen: bt,
|
|
391
|
+
onGeneratePdf: r(Ie),
|
|
392
|
+
onGenerateCsv: Te,
|
|
393
|
+
onGenerateImage: r(Ne),
|
|
394
|
+
onToggleTable: Ve,
|
|
395
|
+
onToggleAnnotator: se,
|
|
396
|
+
style: Z({
|
|
397
|
+
visibility: r(Se) ? r(oe) ? "visible" : "hidden" : "visible"
|
|
398
|
+
})
|
|
399
|
+
}, kt({ _: 2 }, [
|
|
400
|
+
t.$slots.menuIcon ? {
|
|
401
|
+
name: "menuIcon",
|
|
402
|
+
fn: C(({ isOpen: l, color: s }) => [
|
|
403
|
+
$(t.$slots, "menuIcon", W(j({ isOpen: l, color: s })), void 0, !0)
|
|
404
|
+
]),
|
|
405
|
+
key: "0"
|
|
406
|
+
} : void 0,
|
|
407
|
+
t.$slots.optionPdf ? {
|
|
408
|
+
name: "optionPdf",
|
|
409
|
+
fn: C(() => [
|
|
410
|
+
$(t.$slots, "optionPdf", {}, void 0, !0)
|
|
411
|
+
]),
|
|
412
|
+
key: "1"
|
|
413
|
+
} : void 0,
|
|
414
|
+
t.$slots.optionCsv ? {
|
|
415
|
+
name: "optionCsv",
|
|
416
|
+
fn: C(() => [
|
|
417
|
+
$(t.$slots, "optionCsv", {}, void 0, !0)
|
|
418
|
+
]),
|
|
419
|
+
key: "2"
|
|
420
|
+
} : void 0,
|
|
421
|
+
t.$slots.optionImg ? {
|
|
422
|
+
name: "optionImg",
|
|
423
|
+
fn: C(() => [
|
|
424
|
+
$(t.$slots, "optionImg", {}, void 0, !0)
|
|
425
|
+
]),
|
|
426
|
+
key: "3"
|
|
427
|
+
} : void 0,
|
|
428
|
+
t.$slots.optionTable ? {
|
|
429
|
+
name: "optionTable",
|
|
430
|
+
fn: C(() => [
|
|
431
|
+
$(t.$slots, "optionTable", {}, void 0, !0)
|
|
432
|
+
]),
|
|
433
|
+
key: "4"
|
|
434
|
+
} : void 0,
|
|
435
|
+
t.$slots.optionFullscreen ? {
|
|
436
|
+
name: "optionFullscreen",
|
|
437
|
+
fn: C(({ toggleFullscreen: l, isFullscreen: s }) => [
|
|
438
|
+
$(t.$slots, "optionFullscreen", W(j({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
|
|
439
|
+
]),
|
|
440
|
+
key: "5"
|
|
441
|
+
} : void 0,
|
|
442
|
+
t.$slots.optionAnnotator ? {
|
|
443
|
+
name: "optionAnnotator",
|
|
444
|
+
fn: C(({ toggleAnnotator: l, isAnnotator: s }) => [
|
|
445
|
+
$(t.$slots, "optionAnnotator", W(j({ toggleAnnotator: l, isAnnotator: s })), void 0, !0)
|
|
446
|
+
]),
|
|
447
|
+
key: "6"
|
|
448
|
+
} : void 0
|
|
449
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
|
|
450
|
+
J.value ? (o(), n("svg", {
|
|
451
|
+
key: 4,
|
|
452
|
+
ref_key: "svgRef",
|
|
453
|
+
ref: $e,
|
|
454
|
+
xmlns: r(It),
|
|
455
|
+
class: D({ "vue-data-ui-fullscreen--on": G.value, "vue-data-ui-fulscreen--off": !G.value }),
|
|
456
|
+
viewBox: `0 0 ${v.value.absoluteWidth} ${v.value.absoluteHeight}`,
|
|
457
|
+
style: Z(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};`)
|
|
458
|
+
}, [
|
|
459
|
+
Ct(r(lt)),
|
|
460
|
+
t.$slots["chart-background"] ? (o(), n("foreignObject", {
|
|
461
|
+
key: 0,
|
|
462
|
+
x: i.value.left,
|
|
463
|
+
y: i.value.top,
|
|
464
|
+
width: v.value.width,
|
|
465
|
+
height: v.value.height,
|
|
466
|
+
style: {
|
|
467
|
+
pointerEvents: "none"
|
|
468
|
+
}
|
|
469
|
+
}, [
|
|
470
|
+
$(t.$slots, "chart-background", {}, void 0, !0)
|
|
471
|
+
], 8, Wt)) : c("", !0),
|
|
472
|
+
_("defs", null, [
|
|
473
|
+
_("linearGradient", {
|
|
474
|
+
id: `hover_${T.value}`,
|
|
475
|
+
x1: "0%",
|
|
476
|
+
y1: "0%",
|
|
477
|
+
x2: "0%",
|
|
478
|
+
y2: "100%"
|
|
479
|
+
}, [
|
|
480
|
+
_("stop", {
|
|
481
|
+
offset: "0%",
|
|
482
|
+
"stop-color": r(q)(e.value.style.chart.backgroundColor, e.value.style.chart.layout.highlighter.opacity)
|
|
483
|
+
}, null, 8, Yt),
|
|
484
|
+
_("stop", {
|
|
485
|
+
offset: "100%",
|
|
486
|
+
"stop-color": r(q)(e.value.style.chart.layout.highlighter.color, e.value.style.chart.layout.highlighter.opacity)
|
|
487
|
+
}, null, 8, qt)
|
|
488
|
+
], 8, jt),
|
|
489
|
+
_("radialGradient", {
|
|
490
|
+
id: `focus_${T.value}`
|
|
491
|
+
}, [
|
|
492
|
+
_("stop", {
|
|
493
|
+
offset: "0%",
|
|
494
|
+
"stop-color": r(q)(r(ve)(e.value.style.chart.backgroundColor), 0)
|
|
495
|
+
}, null, 8, Kt),
|
|
496
|
+
_("stop", {
|
|
497
|
+
offset: "77%",
|
|
498
|
+
"stop-color": r(q)("#FFFFFF", 30)
|
|
499
|
+
}, null, 8, Qt),
|
|
500
|
+
_("stop", {
|
|
501
|
+
offset: "100%",
|
|
502
|
+
"stop-color": r(q)(r(ve)(e.value.style.chart.backgroundColor), 0)
|
|
503
|
+
}, null, 8, Zt)
|
|
504
|
+
], 8, Jt)
|
|
505
|
+
]),
|
|
506
|
+
e.value.style.chart.layout.grid.show ? (o(), n("g", el, [
|
|
507
|
+
_("line", {
|
|
508
|
+
x1: i.value.left,
|
|
509
|
+
x2: i.value.left,
|
|
510
|
+
y1: i.value.top,
|
|
511
|
+
y2: i.value.top + v.value.height,
|
|
512
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
513
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth,
|
|
514
|
+
"stroke-linecap": "round"
|
|
515
|
+
}, null, 8, tl),
|
|
516
|
+
_("line", {
|
|
517
|
+
x1: i.value.left,
|
|
518
|
+
x2: v.value.absoluteWidth - i.value.right,
|
|
519
|
+
y1: v.value.absoluteHeight - i.value.bottom,
|
|
520
|
+
y2: v.value.absoluteHeight - i.value.bottom,
|
|
521
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
522
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth,
|
|
523
|
+
"stroke-linecap": "round"
|
|
524
|
+
}, null, 8, ll),
|
|
525
|
+
e.value.style.chart.layout.grid.showVerticalLines ? (o(), n("g", al, [
|
|
526
|
+
(o(!0), n(A, null, L(d.value.end - d.value.start, (l, s) => (o(), n("line", {
|
|
527
|
+
x1: i.value.left + (s + 1) * w.value,
|
|
528
|
+
x2: i.value.left + (s + 1) * w.value,
|
|
529
|
+
y1: i.value.top,
|
|
530
|
+
y2: v.value.absoluteHeight - i.value.bottom,
|
|
531
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
532
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth,
|
|
533
|
+
"stroke-linecap": "round"
|
|
534
|
+
}, null, 8, ol))), 256))
|
|
535
|
+
])) : c("", !0)
|
|
536
|
+
])) : c("", !0),
|
|
537
|
+
e.value.style.chart.layout.grid.yAxis.dataLabels.show ? (o(), n("g", {
|
|
538
|
+
key: 2,
|
|
539
|
+
class: D({ "donut-opacity": !0, "donut-behind": g.value !== null })
|
|
540
|
+
}, [
|
|
541
|
+
(o(!0), n(A, null, L(ht.value, (l, s) => (o(), n("g", null, [
|
|
542
|
+
l.value >= H.value.min && l.value <= H.value.max ? (o(), n("line", {
|
|
543
|
+
key: 0,
|
|
544
|
+
x1: i.value.left,
|
|
545
|
+
x2: i.value.left - 5,
|
|
546
|
+
y1: l.y,
|
|
547
|
+
y2: l.y,
|
|
548
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
549
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth
|
|
550
|
+
}, null, 8, ul)) : c("", !0),
|
|
551
|
+
l.value >= H.value.min && l.value <= H.value.max ? (o(), n("text", {
|
|
552
|
+
key: 1,
|
|
553
|
+
x: i.value.left - 8 + e.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,
|
|
554
|
+
y: l.y + e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize / 3,
|
|
555
|
+
"font-size": e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,
|
|
556
|
+
"text-anchor": "end",
|
|
557
|
+
fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
|
|
558
|
+
"font-weight": e.value.style.chart.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
559
|
+
}, p(r(Nt)(l.value) ? r(he)(
|
|
560
|
+
e.value.style.chart.layout.dataLabels.formatter,
|
|
561
|
+
l.value,
|
|
562
|
+
r(le)({
|
|
563
|
+
p: e.value.style.chart.layout.dataLabels.prefix,
|
|
564
|
+
v: l.value,
|
|
565
|
+
s: e.value.style.chart.layout.dataLabels.suffix,
|
|
566
|
+
r: e.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue
|
|
567
|
+
}),
|
|
568
|
+
{ datapoint: l, seriesIndex: s }
|
|
569
|
+
) : ""), 9, nl)) : c("", !0)
|
|
570
|
+
]))), 256))
|
|
571
|
+
], 2)) : c("", !0),
|
|
572
|
+
e.value.style.chart.layout.grid.xAxis.dataLabels.show ? (o(), n("g", sl, [
|
|
573
|
+
(o(!0), n(A, null, L(d.value.end - d.value.start, (l, s) => (o(), n("g", null, [
|
|
574
|
+
e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast && (s === 0 || s === O.value - 1) || !e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast ? (o(), n("text", {
|
|
575
|
+
key: 0,
|
|
576
|
+
"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",
|
|
577
|
+
"font-size": e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
|
|
578
|
+
fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
|
|
579
|
+
transform: `translate(${i.value.left + w.value * s + w.value / 2}, ${e.value.style.chart.layout.grid.xAxis.dataLabels.offsetY + v.value.absoluteHeight - i.value.bottom + e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize * 2}), rotate(${e.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`
|
|
580
|
+
}, p(e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s) + Number(d.value.start)] ?? ""), 9, rl)) : c("", !0)
|
|
581
|
+
]))), 256))
|
|
582
|
+
])) : c("", !0),
|
|
583
|
+
(o(!0), n(A, null, L(k.value, (l, s) => (o(), n("g", null, [
|
|
584
|
+
e.value.style.chart.layout.line.show && s < k.value.length - 1 && ![l.subtotal, k.value[s + 1].subtotal].includes(null) ? (o(), n("line", {
|
|
585
|
+
key: 0,
|
|
586
|
+
class: D({ "donut-opacity": !0, "donut-behind": g.value !== null }),
|
|
587
|
+
x1: l.x,
|
|
588
|
+
y1: l.y,
|
|
589
|
+
x2: k.value[s + 1].x,
|
|
590
|
+
y2: k.value[s + 1].y,
|
|
591
|
+
stroke: e.value.style.chart.layout.line.stroke,
|
|
592
|
+
"stroke-width": e.value.style.chart.layout.line.strokeWidth,
|
|
593
|
+
"stroke-linecap": "round",
|
|
594
|
+
"stroke-linejoin": "round"
|
|
595
|
+
}, null, 10, il)) : c("", !0),
|
|
596
|
+
l.subtotal !== null ? (o(), n("g", cl, [
|
|
597
|
+
l.subtotal ? (o(), n("circle", {
|
|
598
|
+
key: 0,
|
|
599
|
+
cx: l.x,
|
|
600
|
+
cy: l.y,
|
|
601
|
+
r: l.activeRadius,
|
|
602
|
+
fill: e.value.style.chart.backgroundColor
|
|
603
|
+
}, null, 8, vl)) : c("", !0)
|
|
604
|
+
])) : c("", !0)
|
|
605
|
+
]))), 256)),
|
|
606
|
+
(o(!0), n(A, null, L(k.value, (l, s) => (o(), n("g", {
|
|
607
|
+
class: D({ "donut-opacity": !0, "donut-behind": s !== g.value && g.value !== null })
|
|
608
|
+
}, [
|
|
609
|
+
l.subtotal ? (o(), n("g", dl, [
|
|
610
|
+
g.value !== null && g.value === s ? (o(), n("g", hl, [
|
|
611
|
+
(o(!0), n(A, null, L(l.donutHover, (u) => (o(), n("g", null, [
|
|
612
|
+
He(u) ? (o(), n("path", {
|
|
613
|
+
key: 0,
|
|
614
|
+
d: r(Dt)(u, { x: u.center.endX, y: u.center.endY }, 12, 12, { x: l.x, y: l.y }, !1, 20),
|
|
615
|
+
stroke: u.color,
|
|
616
|
+
"stroke-width": "1",
|
|
617
|
+
"stroke-linecap": "round",
|
|
618
|
+
"stroke-linejoin": "round",
|
|
619
|
+
fill: "none"
|
|
620
|
+
}, null, 8, yl)) : c("", !0)
|
|
621
|
+
]))), 256)),
|
|
622
|
+
(o(!0), n(A, null, L(l.donutHover, (u, f) => (o(), n("g", null, [
|
|
623
|
+
He(u) ? (o(), n("text", {
|
|
624
|
+
key: 0,
|
|
625
|
+
"data-cy-hover-label": "",
|
|
626
|
+
"text-anchor": r(je)(u, !0, 0).anchor,
|
|
627
|
+
x: r(je)(u, !0, 9).x,
|
|
628
|
+
y: r(Pt)(u, 14, 10),
|
|
629
|
+
fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
|
|
630
|
+
"font-size": 8,
|
|
631
|
+
"font-weight": "bold"
|
|
632
|
+
}, p(u.name) + ": " + p(yt(u, l.donut)) + " (" + p(u.value === null ? "-" : De(u.value, u, f)) + ") ", 9, gl)) : c("", !0)
|
|
633
|
+
]))), 256)),
|
|
634
|
+
_("g", null, [
|
|
635
|
+
_("circle", {
|
|
636
|
+
cx: l.x,
|
|
637
|
+
cy: l.y,
|
|
638
|
+
r: l.hoverRadius,
|
|
639
|
+
fill: e.value.style.chart.backgroundColor
|
|
640
|
+
}, null, 8, fl)
|
|
641
|
+
])
|
|
642
|
+
])) : c("", !0)
|
|
643
|
+
])) : c("", !0)
|
|
644
|
+
], 2))), 256)),
|
|
645
|
+
(o(!0), n(A, null, L(k.value, (l, s) => (o(), n("g", {
|
|
646
|
+
class: D({ "donut-opacity": !0, "donut-behind": s !== g.value && g.value !== null })
|
|
647
|
+
}, [
|
|
648
|
+
l.subtotal !== null ? (o(), n("g", ml, [
|
|
649
|
+
l.subtotal === 0 ? (o(), n("circle", {
|
|
650
|
+
key: 0,
|
|
651
|
+
cx: l.x,
|
|
652
|
+
cy: l.y,
|
|
653
|
+
r: 3,
|
|
654
|
+
fill: e.value.style.chart.color
|
|
655
|
+
}, null, 8, bl)) : g.value !== null && g.value === s ? (o(), n("g", pl, [
|
|
656
|
+
(o(!0), n(A, null, L(l.donutHover, (u, f) => (o(), n("path", {
|
|
657
|
+
d: u.arcSlice,
|
|
658
|
+
fill: `${u.color}`,
|
|
659
|
+
"stroke-width": 1,
|
|
660
|
+
stroke: e.value.style.chart.backgroundColor
|
|
661
|
+
}, null, 8, xl))), 256))
|
|
662
|
+
])) : (o(), n("g", kl, [
|
|
663
|
+
(o(!0), n(A, null, L(l.donut, (u, f) => (o(), n("path", {
|
|
664
|
+
d: u.arcSlice,
|
|
665
|
+
fill: `${u.color}`,
|
|
666
|
+
"stroke-width": 0.5,
|
|
667
|
+
stroke: e.value.style.chart.backgroundColor
|
|
668
|
+
}, null, 8, Cl))), 256))
|
|
669
|
+
]))
|
|
670
|
+
])) : c("", !0)
|
|
671
|
+
], 2))), 256)),
|
|
672
|
+
(o(!0), n(A, null, L(k.value, (l, s) => (o(), n("g", {
|
|
673
|
+
class: D({ "donut-opacity": !0, "donut-behind": s !== g.value && g.value !== null || ae.value && s !== V.value.index })
|
|
674
|
+
}, [
|
|
675
|
+
l.subtotal !== null && e.value.style.chart.layout.dataLabels.show ? (o(), n("text", {
|
|
676
|
+
key: 0,
|
|
677
|
+
"text-anchor": "middle",
|
|
678
|
+
x: l.x,
|
|
679
|
+
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,
|
|
680
|
+
"font-size": e.value.style.chart.layout.dataLabels.fontSize,
|
|
681
|
+
"font-weight": "bold",
|
|
682
|
+
fill: e.value.style.chart.layout.dataLabels.color
|
|
683
|
+
}, p(De(l.subtotal, l, s)), 9, _l)) : c("", !0)
|
|
684
|
+
], 2))), 256)),
|
|
685
|
+
(o(!0), n(A, null, L(k.value, (l, s) => (o(), n("rect", {
|
|
686
|
+
x: i.value.left + s * w.value,
|
|
687
|
+
y: i.value.top,
|
|
688
|
+
width: w.value,
|
|
689
|
+
height: v.value.height,
|
|
690
|
+
fill: [g.value, X.value].includes(l.index) ? `url(#hover_${T.value})` : "transparent",
|
|
691
|
+
class: D({ "donut-hover": l.subtotal && [g.value, X.value].includes(l.index) }),
|
|
692
|
+
style: {
|
|
693
|
+
pointerEvents: "none"
|
|
694
|
+
}
|
|
695
|
+
}, null, 10, wl))), 256)),
|
|
696
|
+
(o(!0), n(A, null, L(k.value, (l, s) => (o(), n("rect", {
|
|
697
|
+
"data-cy-trap": "",
|
|
698
|
+
x: i.value.left + s * w.value,
|
|
699
|
+
y: i.value.top,
|
|
700
|
+
width: w.value,
|
|
701
|
+
height: v.value.height,
|
|
702
|
+
fill: "transparent",
|
|
703
|
+
onMouseenter: (u) => gt(l),
|
|
704
|
+
onMouseleave: Pe,
|
|
705
|
+
onClick: (u) => Fe(l, s),
|
|
706
|
+
class: D({ "donut-hover": g.value === l.index && l.subtotal })
|
|
707
|
+
}, null, 42, Sl))), 256)),
|
|
708
|
+
$(t.$slots, "svg", { svg: v.value }, void 0, !0)
|
|
709
|
+
], 14, Gt)) : c("", !0),
|
|
710
|
+
t.$slots.watermark ? (o(), n("div", $l, [
|
|
711
|
+
$(t.$slots, "watermark", W(j({ isPrinting: r(Le) || r(ze) })), void 0, !0)
|
|
712
|
+
])) : c("", !0),
|
|
713
|
+
J.value ? c("", !0) : (o(), N(r(ot), {
|
|
714
|
+
key: 6,
|
|
715
|
+
config: {
|
|
716
|
+
type: "donutEvolution",
|
|
717
|
+
style: {
|
|
718
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
719
|
+
donutEvolution: {
|
|
720
|
+
axis: {
|
|
721
|
+
color: "#CCCCCC"
|
|
722
|
+
},
|
|
723
|
+
donuts: {
|
|
724
|
+
color: "#CCCCCC"
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}, null, 8, ["config"])),
|
|
730
|
+
O.value > 1 && e.value.style.chart.zoom.show ? (o(), N(Mt, {
|
|
731
|
+
ref_key: "slicerComponent",
|
|
732
|
+
ref: E,
|
|
733
|
+
key: `slicer_${pe.value}`,
|
|
734
|
+
background: e.value.style.chart.zoom.color,
|
|
735
|
+
borderColor: e.value.style.chart.backgroundColor,
|
|
736
|
+
fontSize: e.value.style.chart.zoom.fontSize,
|
|
737
|
+
useResetSlot: e.value.style.chart.zoom.useResetSlot,
|
|
738
|
+
labelLeft: e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(d.value.start)] || "",
|
|
739
|
+
labelRight: e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(d.value.end) - 1] || "",
|
|
740
|
+
textColor: e.value.style.chart.color,
|
|
741
|
+
inputColor: e.value.style.chart.zoom.color,
|
|
742
|
+
selectColor: e.value.style.chart.zoom.highlightColor,
|
|
743
|
+
max: O.value,
|
|
744
|
+
min: 0,
|
|
745
|
+
valueStart: d.value.start,
|
|
746
|
+
valueEnd: d.value.end,
|
|
747
|
+
start: d.value.start,
|
|
748
|
+
"onUpdate:start": a[0] || (a[0] = (l) => d.value.start = l),
|
|
749
|
+
end: d.value.end,
|
|
750
|
+
"onUpdate:end": a[1] || (a[1] = (l) => d.value.end = l),
|
|
751
|
+
refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
|
|
752
|
+
refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : O.value,
|
|
753
|
+
enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
|
|
754
|
+
enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
|
|
755
|
+
onReset: ye
|
|
756
|
+
}, {
|
|
757
|
+
"reset-action": C(({ reset: l }) => [
|
|
758
|
+
$(t.$slots, "reset-action", W(j({ reset: l })), void 0, !0)
|
|
759
|
+
]),
|
|
760
|
+
_: 3
|
|
761
|
+
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : c("", !0),
|
|
762
|
+
e.value.style.chart.legend.show ? (o(), N(Rt, {
|
|
763
|
+
key: `legend_${Ce.value}`,
|
|
764
|
+
legendSet: Oe.value,
|
|
765
|
+
config: ft.value,
|
|
766
|
+
onClickMarker: a[2] || (a[2] = ({ legend: l }) => ne(l.uid))
|
|
767
|
+
}, {
|
|
768
|
+
item: C(({ legend: l, index: s }) => [
|
|
769
|
+
_("div", {
|
|
770
|
+
onClick: (u) => ne(l.uid),
|
|
771
|
+
style: Z(`opacity:${x.value.includes(l.uid) ? 0.5 : 1}`)
|
|
772
|
+
}, [
|
|
773
|
+
ce(p(l.name) + ": " + p(r(he)(
|
|
774
|
+
e.value.style.chart.layout.dataLabels.formatter,
|
|
775
|
+
l.value,
|
|
776
|
+
r(le)({
|
|
777
|
+
p: e.value.style.chart.layout.dataLabels.prefix,
|
|
778
|
+
v: l.value,
|
|
779
|
+
s: e.value.style.chart.layout.dataLabels.suffix,
|
|
780
|
+
r: e.value.style.chart.legend.roundingValue
|
|
781
|
+
}),
|
|
782
|
+
{ datapoint: l, seriesIndex: s }
|
|
783
|
+
)) + " ", 1),
|
|
784
|
+
x.value.includes(l.uid) ? (o(), n("span", zl, " ( - % ) ")) : (o(), n("span", Ll, " (" + p(isNaN(l.value / Ee.value) ? "-" : r(le)({
|
|
785
|
+
v: l.value / Ee.value * 100,
|
|
786
|
+
s: "%",
|
|
787
|
+
r: e.value.style.chart.legend.roundingPercentage
|
|
788
|
+
})) + ") ", 1))
|
|
789
|
+
], 12, Al)
|
|
790
|
+
]),
|
|
791
|
+
_: 1
|
|
792
|
+
}, 8, ["legendSet", "config"])) : c("", !0),
|
|
793
|
+
$(t.$slots, "legend", { legend: Oe.value }, void 0, !0),
|
|
794
|
+
t.$slots.source ? (o(), n("div", Il, [
|
|
795
|
+
$(t.$slots, "source", {}, void 0, !0)
|
|
796
|
+
], 512)) : c("", !0),
|
|
797
|
+
J.value ? (o(), N(r(Ze), {
|
|
798
|
+
key: 10,
|
|
799
|
+
hideDetails: "",
|
|
800
|
+
config: {
|
|
801
|
+
open: U.value.showTable,
|
|
802
|
+
maxHeight: 1e4,
|
|
803
|
+
body: {
|
|
804
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
805
|
+
color: e.value.style.chart.color
|
|
806
|
+
},
|
|
807
|
+
head: {
|
|
808
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
809
|
+
color: e.value.style.chart.color
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
}, {
|
|
813
|
+
content: C(() => [
|
|
814
|
+
(o(), N(r(tt), {
|
|
815
|
+
key: `table_${ke.value}`,
|
|
816
|
+
colNames: R.value.colNames,
|
|
817
|
+
head: R.value.head,
|
|
818
|
+
body: R.value.body,
|
|
819
|
+
config: R.value.config,
|
|
820
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
821
|
+
onClose: a[3] || (a[3] = (l) => U.value.showTable = !1)
|
|
822
|
+
}, {
|
|
823
|
+
th: C(({ th: l }) => [
|
|
824
|
+
ce(p(l.name ?? l), 1)
|
|
825
|
+
]),
|
|
826
|
+
td: C(({ td: l }) => [
|
|
827
|
+
l.value === null ? (o(), n("span", Nl, "-")) : (o(), n("b", Dl, 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)),
|
|
828
|
+
_("span", null, p(l.percentage && !isNaN(l.percentage) ? `(${Number(l.percentage.toFixed(e.value.table.td.roundingPercentage)).toLocaleString()}%)` : ""), 1)
|
|
829
|
+
]),
|
|
830
|
+
_: 1
|
|
831
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
832
|
+
]),
|
|
833
|
+
_: 1
|
|
834
|
+
}, 8, ["config"])) : c("", !0),
|
|
835
|
+
e.value.style.chart.dialog.show ? (o(), N(r(et), {
|
|
836
|
+
key: 11,
|
|
837
|
+
ref_key: "dialog",
|
|
838
|
+
ref: re,
|
|
839
|
+
onClose: a[4] || (a[4] = (l) => {
|
|
840
|
+
V.value = null, ae.value = !1, K.value = null, g.value = null, X.value = null;
|
|
841
|
+
}),
|
|
842
|
+
backgroundColor: e.value.style.chart.dialog.backgroundColor,
|
|
843
|
+
color: e.value.style.chart.dialog.color,
|
|
844
|
+
headerBg: e.value.style.chart.dialog.header.backgroundColor,
|
|
845
|
+
headerColor: e.value.style.chart.dialog.header.color
|
|
846
|
+
}, {
|
|
847
|
+
title: C(() => [
|
|
848
|
+
ce(p(e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(V.value.index) + Number(d.value.start)]), 1)
|
|
849
|
+
]),
|
|
850
|
+
default: C(() => [
|
|
851
|
+
V.value ? (o(), N(r(nt), {
|
|
852
|
+
key: 0,
|
|
853
|
+
config: Me.value,
|
|
854
|
+
dataset: Re.value
|
|
855
|
+
}, null, 8, ["config", "dataset"])) : c("", !0)
|
|
856
|
+
]),
|
|
857
|
+
_: 1
|
|
858
|
+
}, 8, ["backgroundColor", "color", "headerBg", "headerColor"])) : c("", !0)
|
|
859
|
+
], 46, Xt));
|
|
860
|
+
}
|
|
861
|
+
}, Xl = /* @__PURE__ */ Bt(Pl, [["__scopeId", "data-v-f6cdba4c"]]);
|
|
862
|
+
export {
|
|
863
|
+
Xl as default
|
|
864
|
+
};
|