vue-data-ui 3.0.0-next.7 → 3.0.0-next.71
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-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
- package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
- package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
- package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
- package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
- package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
- package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
- package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
- package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
- package/dist/Slicer-DYuvPkEM.js +602 -0
- package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
- package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
- package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
- package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
- package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
- package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
- package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
- package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +610 -22
- package/dist/types/vue-data-ui.d.ts +610 -22
- package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-D-8c0o4p.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
- package/dist/vue-data-ui.js +23 -22
- package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
- package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
- package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
- package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
- package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
- package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
- package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
- package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
- package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
- package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
- package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
- package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
- package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
- package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
- package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
- package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
- package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
- package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
- package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
- package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
- package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
- package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
- package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
- package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
- package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
- package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
- package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
- package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
- package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
- package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
- package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
- package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
- package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
- package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
- package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
- package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
- package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
- package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
- package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
- package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
- package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
- package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
- package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
- package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
- package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
- package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
- package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
- package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
- package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
- package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
- package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
- package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
- package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
- package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
- package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
- package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
- package/dist/vue-ui-wheel-De1spwLh.js +379 -0
- package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
- package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
- package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
- package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
- package/package.json +1 -1
- package/dist/Slicer-BD8Z8VCW.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-C_G5E08Y.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
- package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
- package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
- package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
- package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
- package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
- package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
- package/dist/vue-ui-flow-D_L_xssL.js +0 -765
- package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
- package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
- package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
- package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
- package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
- package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
- package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
- package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
- package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
- package/dist/vue-ui-radar-98mXFZe-.js +0 -741
- package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
- package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
- package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
- package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
- package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
- package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
- package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
- package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
- package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
- package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
- package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
- package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
- package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
- package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
- package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
- package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
- package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
- package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
- package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
|
@@ -0,0 +1,776 @@
|
|
|
1
|
+
import { defineAsyncComponent as M, computed as d, ref as r, toRefs as vt, watch as X, shallowRef as Re, onMounted as dt, onBeforeUnmount as ht, createElementBlock as i, openBlock as u, unref as s, normalizeStyle as A, normalizeClass as G, createBlock as I, createCommentVNode as g, createElementVNode as L, createVNode as ze, createSlots as ft, withCtx as p, renderSlot as h, normalizeProps as R, guardReactiveProps as z, Fragment as B, renderList as V, toDisplayString as N, createTextVNode as pt, nextTick as Ne } from "vue";
|
|
2
|
+
import { u as gt, c as mt, t as yt, a as bt, p as De, b as kt, d as wt, o as Le, f as ne, e as Ct, X as $t, i as Y, k as se, y as Be, v as xt, w as Tt, z as Ot } from "./index-DKpp7RIH.js";
|
|
3
|
+
import { t as _t, u as At } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Ve } from "./useNestedProp-D-8c0o4p.js";
|
|
5
|
+
import { u as It } from "./usePrinter-NUeckmCX.js";
|
|
6
|
+
import { u as St } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
+
import { u as Pt } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
+
import Ft from "./Title-VLWyIYrj.js";
|
|
9
|
+
import Mt from "./Legend-DiGLrlzP.js";
|
|
10
|
+
import Rt from "./img-DD_2wgY3.js";
|
|
11
|
+
import { u as zt, B as Nt } from "./useLoading-D7YHNtLX.js";
|
|
12
|
+
import { u as Dt } from "./useAutoSizeLabelsInsideViewbox-Qhry5WvH.js";
|
|
13
|
+
import { _ as Lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const Bt = ["id"], Vt = ["xmlns", "viewBox"], Yt = ["width", "height"], Et = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Ut = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Xt = ["id"], Gt = ["stdDeviation"], Ht = ["filter"], Wt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], jt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter", "onMouseleave", "onClick"], qt = { key: 2 }, Jt = ["onMouseenter", "onMouseleave", "onClick"], Kt = ["x", "y", "font-size", "fill", "font-weight"], Qt = {
|
|
15
|
+
key: 4,
|
|
16
|
+
class: "vue-data-ui-watermark"
|
|
17
|
+
}, Zt = ["onClick"], ea = ["innerHTML"], ta = {
|
|
18
|
+
__name: "vue-ui-onion",
|
|
19
|
+
props: {
|
|
20
|
+
config: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default() {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
dataset: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default() {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: ["selectLegend"],
|
|
34
|
+
setup(Ye, { expose: Ee, emit: Ue }) {
|
|
35
|
+
const Xe = M(() => import("./vue-ui-accordion-Cpovz3RE.js")), Ge = M(() => import("./DataTable-B3yakHEM.js")), He = M(() => import("./PackageVersion-6s4eI8W7.js")), We = M(() => import("./PenAndPaper-JoUN7Ink.js")), je = M(() => import("./Tooltip-BS5naLS2.js")), qe = M(() => import("./UserOptions-BV_xM-sB.js")), { vue_ui_onion: Je } = gt(), w = Ye, ue = d(() => !!w.dataset && w.dataset.length), S = r(mt()), Ke = r(null), re = r(0), H = r(!1), W = r(""), y = r([]), x = r(null), ie = r(null), ce = r(null), ve = r(null), de = r(null), he = r(0), fe = r(0), pe = r(0), C = r(!1), e = r(K()), { loading: b, FINAL_DATASET: ge, manualLoading: j } = zt({
|
|
36
|
+
...vt(w),
|
|
37
|
+
FINAL_CONFIG: e,
|
|
38
|
+
prepareConfig: K,
|
|
39
|
+
callback: () => {
|
|
40
|
+
Promise.resolve().then(async () => {
|
|
41
|
+
await Ne(), Te();
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
skeletonDataset: [
|
|
45
|
+
{ name: "_", percentage: 50, value: 1, color: "#DBDBDB" },
|
|
46
|
+
{ name: "_", percentage: 50, value: 1, color: "#C4C4C4" },
|
|
47
|
+
{ name: "_", percentage: 50, value: 1, color: "#ADADAD" },
|
|
48
|
+
{ name: "_", percentage: 50, value: 1, color: "#969696" }
|
|
49
|
+
],
|
|
50
|
+
skeletonConfig: yt({
|
|
51
|
+
defaultConfig: e.value,
|
|
52
|
+
userConfig: {
|
|
53
|
+
userOptions: { show: !1 },
|
|
54
|
+
table: { show: !1 },
|
|
55
|
+
style: {
|
|
56
|
+
chart: {
|
|
57
|
+
backgroundColor: "#99999930",
|
|
58
|
+
layout: {
|
|
59
|
+
gutter: {
|
|
60
|
+
color: "#99999950"
|
|
61
|
+
},
|
|
62
|
+
labels: { show: !1 }
|
|
63
|
+
},
|
|
64
|
+
legend: {
|
|
65
|
+
backgroundColor: "transparent"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
}), { userOptionsVisible: q, setUserOptionsVisibility: me, keepUserOptionState: ye } = St({ config: e.value }), { svgRef: J } = Pt({ config: e.value.style.chart.title });
|
|
72
|
+
function K() {
|
|
73
|
+
const t = Ve({
|
|
74
|
+
userConfig: w.config,
|
|
75
|
+
defaultConfig: Je
|
|
76
|
+
});
|
|
77
|
+
return t.theme ? {
|
|
78
|
+
...Ve({
|
|
79
|
+
userConfig: kt.vue_ui_onion[t.theme] || w.config,
|
|
80
|
+
defaultConfig: t
|
|
81
|
+
}),
|
|
82
|
+
customPalette: bt[t.theme] || De
|
|
83
|
+
} : t;
|
|
84
|
+
}
|
|
85
|
+
X(() => w.config, (t) => {
|
|
86
|
+
b.value || (e.value = K()), q.value = !e.value.userOptions.showOnChartHover, xe(), he.value += 1, fe.value += 1, pe.value += 1, m.value.showTable = e.value.table.show, m.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
87
|
+
}, { deep: !0 });
|
|
88
|
+
const { isPrinting: be, isImaging: ke, generatePdf: we, generateImage: Ce } = It({
|
|
89
|
+
elementId: `vue-ui-onion_${S.value}`,
|
|
90
|
+
fileName: e.value.style.chart.title.text || "vue-ui-onion",
|
|
91
|
+
options: e.value.userOptions.print
|
|
92
|
+
}), Qe = d(() => e.value.userOptions.show && !e.value.style.chart.title.text), Ze = d(() => wt(e.value.customPalette)), m = r({
|
|
93
|
+
showTable: e.value.table.show,
|
|
94
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
95
|
+
});
|
|
96
|
+
X(e, () => {
|
|
97
|
+
m.value = {
|
|
98
|
+
showTable: e.value.table.show,
|
|
99
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
100
|
+
};
|
|
101
|
+
}, { immediate: !0 });
|
|
102
|
+
const n = r({
|
|
103
|
+
height: 512,
|
|
104
|
+
width: 512,
|
|
105
|
+
padding: {
|
|
106
|
+
top: 64,
|
|
107
|
+
left: 64,
|
|
108
|
+
right: 64,
|
|
109
|
+
bottom: 64
|
|
110
|
+
},
|
|
111
|
+
minRadius: 64
|
|
112
|
+
}), T = Re(null), P = Re(null);
|
|
113
|
+
dt(() => {
|
|
114
|
+
xe();
|
|
115
|
+
});
|
|
116
|
+
const et = d({
|
|
117
|
+
get: () => e.value.style.chart.layout.labels.fontSize,
|
|
118
|
+
set: (t) => t
|
|
119
|
+
}), { autoSizeLabels: $e } = Dt({
|
|
120
|
+
svgRef: J,
|
|
121
|
+
fontSize: e.value.style.chart.layout.labels.fontSize,
|
|
122
|
+
minFontSize: e.value.style.chart.layout.labels.minFontSize,
|
|
123
|
+
sizeRef: et,
|
|
124
|
+
labelClass: ".vue-ui-onion-label"
|
|
125
|
+
}), tt = d(() => e.value.debug);
|
|
126
|
+
let Q = null;
|
|
127
|
+
function xe() {
|
|
128
|
+
if (Le(w.dataset) && (ne({
|
|
129
|
+
componentName: "VueUiOnion",
|
|
130
|
+
type: "dataset",
|
|
131
|
+
debug: tt.value
|
|
132
|
+
}), j.value = !0), Le(w.dataset) || (j.value = e.value.loading), e.value.responsive) {
|
|
133
|
+
const o = _t(() => {
|
|
134
|
+
Q && clearTimeout(Q), C.value = !0;
|
|
135
|
+
let { width: a, height: l } = At({
|
|
136
|
+
chart: x.value,
|
|
137
|
+
title: e.value.style.chart.title.text ? ie.value : null,
|
|
138
|
+
legend: e.value.style.chart.legend.show ? ce.value : null,
|
|
139
|
+
source: ve.value,
|
|
140
|
+
noTitle: de.value
|
|
141
|
+
});
|
|
142
|
+
l -= 12, requestAnimationFrame(async () => {
|
|
143
|
+
n.value.width = a, n.value.height = l, n.value.padding.top = Math.max(a, l) * 0.125, n.value.padding.right = Math.max(a, l) * 0.125, n.value.padding.bottom = Math.max(a, l) * 0.125, n.value.padding.left = Math.max(a, l) * 0.125, n.value.minRadius = Math.min(a, l) * 0.125, Q = setTimeout(() => {
|
|
144
|
+
C.value = !1, $e();
|
|
145
|
+
}, 0);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
T.value && (P.value && T.value.unobserve(P.value), T.value.disconnect()), T.value = new ResizeObserver(o), P.value = x.value.parentNode, T.value.observe(P.value);
|
|
149
|
+
}
|
|
150
|
+
requestAnimationFrame($e);
|
|
151
|
+
}
|
|
152
|
+
ht(() => {
|
|
153
|
+
T.value && (P.value && T.value.unobserve(P.value), T.value.disconnect());
|
|
154
|
+
});
|
|
155
|
+
const c = d(() => ({
|
|
156
|
+
top: n.value.padding.top,
|
|
157
|
+
left: n.value.padding.left,
|
|
158
|
+
right: n.value.width - n.value.padding.right,
|
|
159
|
+
bottom: n.value.height - n.value.padding.bottom,
|
|
160
|
+
centerX: n.value.width / 2,
|
|
161
|
+
centerY: n.value.height / 2,
|
|
162
|
+
width: n.value.width - n.value.padding.right - n.value.padding.left,
|
|
163
|
+
height: n.value.height - n.value.padding.bottom - n.value.padding.top,
|
|
164
|
+
minRadius: n.value.minRadius,
|
|
165
|
+
maxRadius: Math.min(n.value.width, n.value.height) - n.value.padding.top * 2
|
|
166
|
+
})), f = d(() => (ge.value.forEach((t, o) => {
|
|
167
|
+
[null, void 0].includes(t.name) && ne({
|
|
168
|
+
componentName: "VueUiOnion",
|
|
169
|
+
type: "datasetSerieAttribute",
|
|
170
|
+
property: "name",
|
|
171
|
+
index: o
|
|
172
|
+
}), [void 0].includes(t.percentage) && ne({
|
|
173
|
+
componentName: "VueUiOnion",
|
|
174
|
+
type: "datasetSerieAttribute",
|
|
175
|
+
property: "percentage",
|
|
176
|
+
index: o
|
|
177
|
+
});
|
|
178
|
+
}), ge.value.map((t, o) => {
|
|
179
|
+
const a = `onion_serie_${o}_${S.value}`;
|
|
180
|
+
return {
|
|
181
|
+
...t,
|
|
182
|
+
percentage: t.percentage || 0,
|
|
183
|
+
targetPercentage: t.percentage || 0,
|
|
184
|
+
color: Ct(t.color) || Ze.value[o] || De[o],
|
|
185
|
+
id: a,
|
|
186
|
+
shape: "circle",
|
|
187
|
+
opacity: y.value.includes(a) ? 0.5 : 1,
|
|
188
|
+
absoluteIndex: o,
|
|
189
|
+
segregate: () => Oe(a),
|
|
190
|
+
isSegregated: y.value.includes(a)
|
|
191
|
+
};
|
|
192
|
+
}))), D = r(f.value), at = d(() => e.value.useStartAnimation), lt = r(null), ot = d(() => Math.max(...f.value.map((t) => t.percentage))), Z = r(!1);
|
|
193
|
+
X(() => f.value, Te, { immediate: !0, deep: !0 }), X(() => w.dataset, (t) => {
|
|
194
|
+
Array.isArray(t) && t.length > 0 && (j.value = !1);
|
|
195
|
+
}, { deep: !0 });
|
|
196
|
+
function Te() {
|
|
197
|
+
if (at.value && !Z.value && !b.value) {
|
|
198
|
+
let o = function() {
|
|
199
|
+
t >= ot.value ? (cancelAnimationFrame(lt.value), D.value = f.value, Z.value = !0) : (D.value = f.value.map((a) => ({
|
|
200
|
+
...a,
|
|
201
|
+
percentage: t < a.targetPercentage ? t : a.targetPercentage
|
|
202
|
+
})), t += 1, requestAnimationFrame(o), Z.value = !0);
|
|
203
|
+
};
|
|
204
|
+
D.value = f.value.map((a) => ({
|
|
205
|
+
...a,
|
|
206
|
+
percentage: 0
|
|
207
|
+
}));
|
|
208
|
+
let t = 0;
|
|
209
|
+
o();
|
|
210
|
+
} else
|
|
211
|
+
D.value = f.value;
|
|
212
|
+
}
|
|
213
|
+
const nt = d(() => ({
|
|
214
|
+
cy: "onion-div-legend",
|
|
215
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
216
|
+
color: e.value.style.chart.legend.color,
|
|
217
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
218
|
+
paddingBottom: 12,
|
|
219
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
220
|
+
})), st = d(() => f.value.filter((t) => !y.value.includes(t.id)).length), _ = d(() => {
|
|
221
|
+
const t = Math.min(c.value.width, c.value.height) / 2 / f.value.length;
|
|
222
|
+
return {
|
|
223
|
+
gutter: (t > e.value.style.chart.layout.maxThickness ? e.value.style.chart.layout.maxThickness : t) * e.value.style.chart.layout.gutter.width,
|
|
224
|
+
track: (t > e.value.style.chart.layout.maxThickness ? e.value.style.chart.layout.maxThickness : t) * e.value.style.chart.layout.track.width
|
|
225
|
+
};
|
|
226
|
+
}), $ = d(() => D.value.filter((t) => !y.value.includes(t.id)).map((t, o) => {
|
|
227
|
+
const a = (c.value.maxRadius - _.value.track) / st.value / 2 * (1 + o), l = c.value.centerY - a;
|
|
228
|
+
return {
|
|
229
|
+
percentage: t.percentage || 0,
|
|
230
|
+
...t,
|
|
231
|
+
labelY: l,
|
|
232
|
+
radius: a,
|
|
233
|
+
path: ut(a, t.percentage || 0)
|
|
234
|
+
};
|
|
235
|
+
}));
|
|
236
|
+
function ut(t, o) {
|
|
237
|
+
const a = 2 * Math.PI * t, l = a * 0.75, v = `${l} ${a}`, k = l * (1 - o / 100);
|
|
238
|
+
return {
|
|
239
|
+
bgDashArray: `${l} ${a}`,
|
|
240
|
+
bgDashOffset: 0,
|
|
241
|
+
dashArray: v,
|
|
242
|
+
dashOffset: k,
|
|
243
|
+
fullOffset: 0,
|
|
244
|
+
active: `
|
|
245
|
+
M ${c.value.centerX},${c.value.centerY - t}
|
|
246
|
+
A ${t},${t} 0 1 1
|
|
247
|
+
${c.value.centerX + t * Math.cos(Math.PI * 3 / 4)},${c.value.centerY + t * Math.sin(Math.PI * 3 / 4)}
|
|
248
|
+
`.trim()
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
const rt = Ue;
|
|
252
|
+
function Oe(t) {
|
|
253
|
+
y.value.includes(t) ? y.value = y.value.filter((o) => o !== t) : y.value.push(t), rt("selectLegend", $.value);
|
|
254
|
+
}
|
|
255
|
+
function it() {
|
|
256
|
+
return $.value;
|
|
257
|
+
}
|
|
258
|
+
const ee = d(() => {
|
|
259
|
+
const t = [e.value.table.translations.serie, e.value.table.translations.percentage, e.value.table.translations.value], o = $.value.map((a) => [
|
|
260
|
+
a.name,
|
|
261
|
+
a.percentage,
|
|
262
|
+
a.value
|
|
263
|
+
]);
|
|
264
|
+
return { head: t, body: o };
|
|
265
|
+
}), E = d(() => {
|
|
266
|
+
const t = ee.value.head, o = $.value.map((l) => [
|
|
267
|
+
`<span style="color:${l.color}">⬤</span> ${l.name}`,
|
|
268
|
+
`${Number(l.percentage ?? 0).toFixed(e.value.table.td.roundingPercentage).toLocaleString()}%`,
|
|
269
|
+
`${l.prefix || ""}${[null, void 0, NaN, "NaN"].includes(l.value) ? "-" : l.value.toFixed(e.value.table.td.roundingValue).toLocaleString()}${l.suffix || ""}`
|
|
270
|
+
]), a = {
|
|
271
|
+
th: {
|
|
272
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
273
|
+
color: e.value.table.th.color,
|
|
274
|
+
outline: e.value.table.th.outline
|
|
275
|
+
},
|
|
276
|
+
td: {
|
|
277
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
278
|
+
color: e.value.table.td.color,
|
|
279
|
+
outline: e.value.table.td.outline
|
|
280
|
+
},
|
|
281
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
282
|
+
};
|
|
283
|
+
return { head: t, body: o, config: a, colNames: t };
|
|
284
|
+
});
|
|
285
|
+
function _e(t = null) {
|
|
286
|
+
Ne(() => {
|
|
287
|
+
const o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = ee.value.head, l = ee.value.body, v = o.concat([a]).concat(l), k = xt(v);
|
|
288
|
+
t ? t(k) : Tt({ csvContent: k, title: e.value.style.chart.title.text || "vue-ui-onion" });
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
const O = r(void 0), F = r(!1);
|
|
292
|
+
function Ae(t) {
|
|
293
|
+
F.value = t, re.value += 1;
|
|
294
|
+
}
|
|
295
|
+
function Ie({ datapoint: t }) {
|
|
296
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.absoluteIndex });
|
|
297
|
+
}
|
|
298
|
+
function Se({ datapoint: t }) {
|
|
299
|
+
O.value = void 0, H.value = !1, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: t.absoluteIndex });
|
|
300
|
+
}
|
|
301
|
+
const te = r(null);
|
|
302
|
+
function Pe({ datapoint: t, seriesIndex: o, show: a = !0 }) {
|
|
303
|
+
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: t.absoluteIndex });
|
|
304
|
+
const l = t.absoluteIndex;
|
|
305
|
+
O.value = o, te.value = {
|
|
306
|
+
datapoint: t,
|
|
307
|
+
seriesIndex: l,
|
|
308
|
+
series: f.value,
|
|
309
|
+
config: e.value
|
|
310
|
+
}, H.value = a;
|
|
311
|
+
let v = "";
|
|
312
|
+
const k = e.value.style.chart.tooltip.customFormat;
|
|
313
|
+
if (Be(k) && Ot(() => k({
|
|
314
|
+
seriesIndex: l,
|
|
315
|
+
datapoint: t,
|
|
316
|
+
series: f.value,
|
|
317
|
+
config: e.value
|
|
318
|
+
})))
|
|
319
|
+
W.value = k({
|
|
320
|
+
seriesIndex: l,
|
|
321
|
+
datapoint: t,
|
|
322
|
+
series: f.value,
|
|
323
|
+
config: e.value
|
|
324
|
+
});
|
|
325
|
+
else {
|
|
326
|
+
const le = e.value.style.chart.tooltip.showPercentage, oe = e.value.style.chart.tooltip.showValue;
|
|
327
|
+
v += `<div style="width: 100%; border-bottom: 1px solid ${e.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;align-items:center"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg><span></span>${t.name}</span></div>`, v += `<div style="width:100%;text-align:left;"><b>${le ? Y({ p: "", v: t.percentage, s: "%", r: e.value.style.chart.tooltip.roundingPercentage }) : ""}</b> ${le && oe ? "(" : ""}${oe ? se(
|
|
328
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
329
|
+
t.value,
|
|
330
|
+
Y({
|
|
331
|
+
p: t.prefix || "",
|
|
332
|
+
v: t.value,
|
|
333
|
+
s: t.suffix || "",
|
|
334
|
+
r: e.value.style.chart.tooltip.roundingValue
|
|
335
|
+
}),
|
|
336
|
+
{ datapoint: t, seriesIndex: o }
|
|
337
|
+
) : ""}${le && oe ? ")" : ""}</div>`, W.value = `<div>${v}</div>`;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function Fe() {
|
|
341
|
+
m.value.showTable = !m.value.showTable;
|
|
342
|
+
}
|
|
343
|
+
function Me() {
|
|
344
|
+
m.value.showTooltip = !m.value.showTooltip;
|
|
345
|
+
}
|
|
346
|
+
const U = r(!1);
|
|
347
|
+
function ae() {
|
|
348
|
+
U.value = !U.value;
|
|
349
|
+
}
|
|
350
|
+
async function ct({ scale: t = 2 } = {}) {
|
|
351
|
+
if (!x.value) return;
|
|
352
|
+
const { width: o, height: a } = x.value.getBoundingClientRect(), l = o / a, { imageUri: v, base64: k } = await Rt({ domElement: x.value, base64: !0, img: !0, scale: t });
|
|
353
|
+
return {
|
|
354
|
+
imageUri: v,
|
|
355
|
+
base64: k,
|
|
356
|
+
title: e.value.style.chart.title.text,
|
|
357
|
+
width: o,
|
|
358
|
+
height: a,
|
|
359
|
+
aspectRatio: l
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
return Ee({
|
|
363
|
+
getData: it,
|
|
364
|
+
getImage: ct,
|
|
365
|
+
generatePdf: we,
|
|
366
|
+
generateCsv: _e,
|
|
367
|
+
generateImage: Ce,
|
|
368
|
+
toggleTable: Fe,
|
|
369
|
+
toggleTooltip: Me,
|
|
370
|
+
toggleAnnotator: ae,
|
|
371
|
+
toggleFullscreen: Ae
|
|
372
|
+
}), (t, o) => (u(), i("div", {
|
|
373
|
+
class: G(`vue-ui-onion ${F.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
374
|
+
ref_key: "onionChart",
|
|
375
|
+
ref: x,
|
|
376
|
+
id: `vue-ui-onion_${S.value}`,
|
|
377
|
+
style: A(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
378
|
+
onMouseenter: o[2] || (o[2] = () => s(me)(!0)),
|
|
379
|
+
onMouseleave: o[3] || (o[3] = () => s(me)(!1))
|
|
380
|
+
}, [
|
|
381
|
+
e.value.userOptions.buttons.annotator ? (u(), I(s(We), {
|
|
382
|
+
key: 0,
|
|
383
|
+
svgRef: s(J),
|
|
384
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
385
|
+
color: e.value.style.chart.color,
|
|
386
|
+
active: U.value,
|
|
387
|
+
onClose: ae
|
|
388
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
|
|
389
|
+
Qe.value ? (u(), i("div", {
|
|
390
|
+
key: 1,
|
|
391
|
+
ref_key: "noTitle",
|
|
392
|
+
ref: de,
|
|
393
|
+
class: "vue-data-ui-no-title-space",
|
|
394
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
395
|
+
}, null, 512)) : g("", !0),
|
|
396
|
+
e.value.style.chart.title.text ? (u(), i("div", {
|
|
397
|
+
key: 2,
|
|
398
|
+
ref_key: "chartTitle",
|
|
399
|
+
ref: ie,
|
|
400
|
+
style: "width:100%;background:transparent"
|
|
401
|
+
}, [
|
|
402
|
+
(u(), I(Ft, {
|
|
403
|
+
key: `title_${he.value}`,
|
|
404
|
+
config: {
|
|
405
|
+
title: {
|
|
406
|
+
cy: "onion-div-title",
|
|
407
|
+
...e.value.style.chart.title
|
|
408
|
+
},
|
|
409
|
+
subtitle: {
|
|
410
|
+
cy: "onion-div-subtitle",
|
|
411
|
+
...e.value.style.chart.title.subtitle
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}, null, 8, ["config"]))
|
|
415
|
+
], 512)) : g("", !0),
|
|
416
|
+
e.value.userOptions.show && ue.value && (s(ye) || s(q)) ? (u(), I(s(qe), {
|
|
417
|
+
ref_key: "details",
|
|
418
|
+
ref: Ke,
|
|
419
|
+
key: `user_options${re.value}`,
|
|
420
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
421
|
+
color: e.value.style.chart.color,
|
|
422
|
+
isImaging: s(ke),
|
|
423
|
+
isPrinting: s(be),
|
|
424
|
+
uid: S.value,
|
|
425
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
426
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
427
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
428
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
429
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
430
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
431
|
+
isFullscreen: F.value,
|
|
432
|
+
isTooltip: m.value.showTooltip,
|
|
433
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
434
|
+
chartElement: x.value,
|
|
435
|
+
position: e.value.userOptions.position,
|
|
436
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
437
|
+
isAnnotation: U.value,
|
|
438
|
+
callbacks: e.value.userOptions.callbacks,
|
|
439
|
+
printScale: e.value.userOptions.print.scale,
|
|
440
|
+
onToggleFullscreen: Ae,
|
|
441
|
+
onGeneratePdf: s(we),
|
|
442
|
+
onGenerateCsv: _e,
|
|
443
|
+
onGenerateImage: s(Ce),
|
|
444
|
+
onToggleTable: Fe,
|
|
445
|
+
onToggleTooltip: Me,
|
|
446
|
+
onToggleAnnotator: ae,
|
|
447
|
+
style: A({
|
|
448
|
+
visibility: s(ye) ? s(q) ? "visible" : "hidden" : "visible"
|
|
449
|
+
})
|
|
450
|
+
}, ft({ _: 2 }, [
|
|
451
|
+
t.$slots.menuIcon ? {
|
|
452
|
+
name: "menuIcon",
|
|
453
|
+
fn: p(({ isOpen: a, color: l }) => [
|
|
454
|
+
h(t.$slots, "menuIcon", R(z({ isOpen: a, color: l })), void 0, !0)
|
|
455
|
+
]),
|
|
456
|
+
key: "0"
|
|
457
|
+
} : void 0,
|
|
458
|
+
t.$slots.optionTooltip ? {
|
|
459
|
+
name: "optionTooltip",
|
|
460
|
+
fn: p(() => [
|
|
461
|
+
h(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
462
|
+
]),
|
|
463
|
+
key: "1"
|
|
464
|
+
} : void 0,
|
|
465
|
+
t.$slots.optionPdf ? {
|
|
466
|
+
name: "optionPdf",
|
|
467
|
+
fn: p(() => [
|
|
468
|
+
h(t.$slots, "optionPdf", {}, void 0, !0)
|
|
469
|
+
]),
|
|
470
|
+
key: "2"
|
|
471
|
+
} : void 0,
|
|
472
|
+
t.$slots.optionCsv ? {
|
|
473
|
+
name: "optionCsv",
|
|
474
|
+
fn: p(() => [
|
|
475
|
+
h(t.$slots, "optionCsv", {}, void 0, !0)
|
|
476
|
+
]),
|
|
477
|
+
key: "3"
|
|
478
|
+
} : void 0,
|
|
479
|
+
t.$slots.optionImg ? {
|
|
480
|
+
name: "optionImg",
|
|
481
|
+
fn: p(() => [
|
|
482
|
+
h(t.$slots, "optionImg", {}, void 0, !0)
|
|
483
|
+
]),
|
|
484
|
+
key: "4"
|
|
485
|
+
} : void 0,
|
|
486
|
+
t.$slots.optionTable ? {
|
|
487
|
+
name: "optionTable",
|
|
488
|
+
fn: p(() => [
|
|
489
|
+
h(t.$slots, "optionTable", {}, void 0, !0)
|
|
490
|
+
]),
|
|
491
|
+
key: "5"
|
|
492
|
+
} : void 0,
|
|
493
|
+
t.$slots.optionFullscreen ? {
|
|
494
|
+
name: "optionFullscreen",
|
|
495
|
+
fn: p(({ toggleFullscreen: a, isFullscreen: l }) => [
|
|
496
|
+
h(t.$slots, "optionFullscreen", R(z({ toggleFullscreen: a, isFullscreen: l })), void 0, !0)
|
|
497
|
+
]),
|
|
498
|
+
key: "6"
|
|
499
|
+
} : void 0,
|
|
500
|
+
t.$slots.optionAnnotator ? {
|
|
501
|
+
name: "optionAnnotator",
|
|
502
|
+
fn: p(({ toggleAnnotator: a, isAnnotator: l }) => [
|
|
503
|
+
h(t.$slots, "optionAnnotator", R(z({ toggleAnnotator: a, isAnnotator: l })), void 0, !0)
|
|
504
|
+
]),
|
|
505
|
+
key: "7"
|
|
506
|
+
} : void 0
|
|
507
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
|
|
508
|
+
(u(), i("svg", {
|
|
509
|
+
ref_key: "svgRef",
|
|
510
|
+
ref: J,
|
|
511
|
+
xmlns: s($t),
|
|
512
|
+
class: G({ "vue-data-ui-fullscreen--on": F.value, "vue-data-ui-fulscreen--off": !F.value, resizing: C.value }),
|
|
513
|
+
viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
|
|
514
|
+
style: A(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
515
|
+
}, [
|
|
516
|
+
ze(s(He)),
|
|
517
|
+
t.$slots["chart-background"] ? (u(), i("foreignObject", {
|
|
518
|
+
key: 0,
|
|
519
|
+
x: 0,
|
|
520
|
+
y: 0,
|
|
521
|
+
width: n.value.width <= 0 ? 10 : n.value.width,
|
|
522
|
+
height: n.value.height <= 0 ? 10 : n.value.height,
|
|
523
|
+
style: {
|
|
524
|
+
pointerEvents: "none"
|
|
525
|
+
}
|
|
526
|
+
}, [
|
|
527
|
+
h(t.$slots, "chart-background", {}, void 0, !0)
|
|
528
|
+
], 8, Yt)) : g("", !0),
|
|
529
|
+
(u(!0), i(B, null, V($.value, (a, l) => (u(), i("circle", {
|
|
530
|
+
cx: c.value.centerX,
|
|
531
|
+
cy: c.value.centerY,
|
|
532
|
+
r: a.radius <= 0 ? 1e-4 : a.radius,
|
|
533
|
+
stroke: e.value.style.chart.layout.gutter.color,
|
|
534
|
+
"stroke-width": _.value.gutter,
|
|
535
|
+
fill: "none",
|
|
536
|
+
"stroke-dasharray": a.path.bgDashArray,
|
|
537
|
+
"stroke-dashoffset": a.path.fullOffset,
|
|
538
|
+
"stroke-linecap": "round",
|
|
539
|
+
class: G({ "vue-ui-onion-path": !0, "vue-ui-onion-blur": e.value.useBlurOnHover && ![null, void 0].includes(O.value) && O.value !== l }),
|
|
540
|
+
style: A({
|
|
541
|
+
transform: "rotate(-90deg)",
|
|
542
|
+
transformOrigin: "50% 50%",
|
|
543
|
+
transition: C.value || s(b) ? "none" : "all 0.3s ease-in-out !important",
|
|
544
|
+
animation: C.value || s(b) ? "none" : "xyAnimation 0.5s ease-in"
|
|
545
|
+
})
|
|
546
|
+
}, null, 14, Et))), 256)),
|
|
547
|
+
(u(!0), i(B, null, V($.value, (a, l) => (u(), i("circle", {
|
|
548
|
+
cx: c.value.centerX,
|
|
549
|
+
cy: c.value.centerY,
|
|
550
|
+
r: a.radius < 0 ? 1e-4 : a.radius,
|
|
551
|
+
stroke: `${a.color}`,
|
|
552
|
+
"stroke-width": _.value.track,
|
|
553
|
+
fill: "none",
|
|
554
|
+
"stroke-dasharray": a.path.dashArray,
|
|
555
|
+
"stroke-dashoffset": a.path.dashOffset,
|
|
556
|
+
class: G({ "vue-ui-onion-path": !0, "vue-ui-onion-blur": e.value.useBlurOnHover && ![null, void 0].includes(O.value) && O.value !== l }),
|
|
557
|
+
"stroke-linecap": "round",
|
|
558
|
+
style: A({
|
|
559
|
+
transform: "rotate(-90deg)",
|
|
560
|
+
transformOrigin: "50% 50%",
|
|
561
|
+
transition: C.value || s(b) ? "none" : "all 0.3s ease-in-out !important",
|
|
562
|
+
animation: C.value || s(b) ? "none" : "xyAnimation 0.5s ease-in"
|
|
563
|
+
})
|
|
564
|
+
}, null, 14, Ut))), 256)),
|
|
565
|
+
L("defs", null, [
|
|
566
|
+
L("filter", {
|
|
567
|
+
id: `blur_${S.value}`,
|
|
568
|
+
x: "-50%",
|
|
569
|
+
y: "-50%",
|
|
570
|
+
width: "200%",
|
|
571
|
+
height: "200%"
|
|
572
|
+
}, [
|
|
573
|
+
L("feGaussianBlur", {
|
|
574
|
+
in: "SourceGraphic",
|
|
575
|
+
stdDeviation: 100 / e.value.style.chart.gradientIntensity
|
|
576
|
+
}, null, 8, Gt)
|
|
577
|
+
], 8, Xt)
|
|
578
|
+
]),
|
|
579
|
+
e.value.style.chart.useGradient ? (u(), i("g", {
|
|
580
|
+
key: 1,
|
|
581
|
+
filter: `url(#blur_${S.value})`
|
|
582
|
+
}, [
|
|
583
|
+
(u(!0), i(B, null, V($.value, (a, l) => (u(), i("circle", {
|
|
584
|
+
cx: c.value.centerX,
|
|
585
|
+
cy: c.value.centerY,
|
|
586
|
+
r: a.radius <= 0 ? 1e-4 : a.radius,
|
|
587
|
+
stroke: "white",
|
|
588
|
+
"stroke-width": _.value.track / 3,
|
|
589
|
+
fill: "none",
|
|
590
|
+
"stroke-linecap": "round",
|
|
591
|
+
"stroke-dasharray": a.path.dashArray,
|
|
592
|
+
"stroke-dashoffset": a.path.dashOffset,
|
|
593
|
+
style: A({
|
|
594
|
+
transform: "rotate(-90deg)",
|
|
595
|
+
transformOrigin: "50% 50%",
|
|
596
|
+
transition: C.value || s(b) ? "none" : "all 0.3s ease-in-out !important",
|
|
597
|
+
animation: C.value || s(b) ? "none" : "xyAnimation 0.5s ease-in"
|
|
598
|
+
})
|
|
599
|
+
}, null, 12, Wt))), 256))
|
|
600
|
+
], 8, Ht)) : g("", !0),
|
|
601
|
+
(u(!0), i(B, null, V($.value, (a, l) => (u(), i("circle", {
|
|
602
|
+
cx: c.value.centerX,
|
|
603
|
+
cy: c.value.centerY,
|
|
604
|
+
r: a.radius <= 0 ? 1e-4 : a.radius,
|
|
605
|
+
stroke: "transparent",
|
|
606
|
+
"stroke-width": Math.max(_.value.track, _.value.gutter),
|
|
607
|
+
fill: "none",
|
|
608
|
+
"stroke-dasharray": a.path.bgDashArray,
|
|
609
|
+
"stroke-dashoffset": a.path.fullOffset,
|
|
610
|
+
"stroke-linecap": "round",
|
|
611
|
+
class: "vue-ui-onion-path",
|
|
612
|
+
style: {
|
|
613
|
+
transform: "rotate(-90deg)",
|
|
614
|
+
transformOrigin: "50% 50%"
|
|
615
|
+
},
|
|
616
|
+
onMouseenter: (v) => Pe({
|
|
617
|
+
datapoint: a,
|
|
618
|
+
show: !0,
|
|
619
|
+
seriesIndex: l
|
|
620
|
+
}),
|
|
621
|
+
onMouseleave: (v) => Se({ datapoint: a }),
|
|
622
|
+
onClick: (v) => Ie({ datapoint: a })
|
|
623
|
+
}, null, 40, jt))), 256)),
|
|
624
|
+
e.value.style.chart.layout.labels.show ? (u(), i("g", qt, [
|
|
625
|
+
(u(!0), i(B, null, V($.value, (a, l) => (u(), i("g", {
|
|
626
|
+
onMouseenter: (v) => Pe({
|
|
627
|
+
datapoint: a,
|
|
628
|
+
show: !0,
|
|
629
|
+
seriesIndex: l
|
|
630
|
+
}),
|
|
631
|
+
onMouseleave: (v) => Se({ datapoint: a }),
|
|
632
|
+
onClick: (v) => Ie({ datapoint: a })
|
|
633
|
+
}, [
|
|
634
|
+
y.value.includes(a.id) ? g("", !0) : (u(), i("text", {
|
|
635
|
+
key: 0,
|
|
636
|
+
class: "vue-ui-onion-label",
|
|
637
|
+
x: n.value.width / 2 - _.value.gutter * 0.8 + e.value.style.chart.layout.labels.offsetX,
|
|
638
|
+
y: a.labelY + e.value.style.chart.layout.labels.offsetY,
|
|
639
|
+
"text-anchor": "end",
|
|
640
|
+
"font-size": e.value.style.chart.layout.labels.fontSize,
|
|
641
|
+
fill: e.value.useBlurOnHover && ![null, void 0].includes(O.value) && O.value === l ? a.color : e.value.style.chart.layout.labels.color,
|
|
642
|
+
"font-weight": e.value.style.chart.layout.labels.bold ? "bold" : "normal"
|
|
643
|
+
}, N(a.name ? a.name + ": " : "") + " " + N(e.value.style.chart.layout.labels.percentage.show ? s(Y)({
|
|
644
|
+
v: a.percentage,
|
|
645
|
+
s: "%",
|
|
646
|
+
r: e.value.style.chart.layout.labels.roundingPercentage
|
|
647
|
+
}) : "") + " " + N(!e.value.style.chart.layout.labels.percentage.show && e.value.style.chart.layout.labels.value.show ? `: ${s(se)(
|
|
648
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
649
|
+
a.value,
|
|
650
|
+
s(Y)({
|
|
651
|
+
p: a.prefix || "",
|
|
652
|
+
v: a.value || 0,
|
|
653
|
+
s: a.suffix || "",
|
|
654
|
+
r: e.value.style.chart.layout.labels.roundingValue
|
|
655
|
+
}),
|
|
656
|
+
{ datapoint: a, seriesIndex: l }
|
|
657
|
+
)}` : `${e.value.style.chart.layout.labels.value.show && a.value ? `(${s(se)(
|
|
658
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
659
|
+
a.value,
|
|
660
|
+
s(Y)({
|
|
661
|
+
p: a.prefix || "",
|
|
662
|
+
v: a.value || 0,
|
|
663
|
+
s: a.suffix || "",
|
|
664
|
+
r: e.value.style.chart.layout.labels.roundingValue
|
|
665
|
+
}),
|
|
666
|
+
{ datapoint: a, seriesIndex: l }
|
|
667
|
+
)})` : ""}`), 9, Kt))
|
|
668
|
+
], 40, Jt))), 256))
|
|
669
|
+
])) : g("", !0),
|
|
670
|
+
h(t.$slots, "svg", { svg: n.value }, void 0, !0)
|
|
671
|
+
], 14, Vt)),
|
|
672
|
+
t.$slots.watermark ? (u(), i("div", Qt, [
|
|
673
|
+
h(t.$slots, "watermark", R(z({ isPrinting: s(be) || s(ke) })), void 0, !0)
|
|
674
|
+
])) : g("", !0),
|
|
675
|
+
L("div", {
|
|
676
|
+
ref_key: "chartLegend",
|
|
677
|
+
ref: ce
|
|
678
|
+
}, [
|
|
679
|
+
e.value.style.chart.legend.show ? (u(), I(Mt, {
|
|
680
|
+
key: `legend_${pe.value}`,
|
|
681
|
+
legendSet: f.value,
|
|
682
|
+
config: nt.value,
|
|
683
|
+
onClickMarker: o[0] || (o[0] = ({ legend: a }) => Oe(a.id))
|
|
684
|
+
}, {
|
|
685
|
+
item: p(({ legend: a }) => [
|
|
686
|
+
s(b) ? g("", !0) : (u(), i("div", {
|
|
687
|
+
key: 0,
|
|
688
|
+
"data-cy-legend-item": "",
|
|
689
|
+
onClick: (l) => a.segregate(),
|
|
690
|
+
style: A(`opacity:${y.value.includes(a.id) ? 0.5 : 1}`)
|
|
691
|
+
}, N(a.name ? a.name + ": " : "") + " " + N((a.percentage || 0).toFixed(e.value.style.chart.legend.roundingPercentage)) + "% ", 13, Zt))
|
|
692
|
+
]),
|
|
693
|
+
_: 1
|
|
694
|
+
}, 8, ["legendSet", "config"])) : h(t.$slots, "legend", {
|
|
695
|
+
key: 1,
|
|
696
|
+
legend: f.value
|
|
697
|
+
}, void 0, !0)
|
|
698
|
+
], 512),
|
|
699
|
+
t.$slots.source ? (u(), i("div", {
|
|
700
|
+
key: 5,
|
|
701
|
+
ref_key: "source",
|
|
702
|
+
ref: ve,
|
|
703
|
+
dir: "auto"
|
|
704
|
+
}, [
|
|
705
|
+
h(t.$slots, "source", {}, void 0, !0)
|
|
706
|
+
], 512)) : g("", !0),
|
|
707
|
+
ze(s(je), {
|
|
708
|
+
show: m.value.showTooltip && H.value,
|
|
709
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
710
|
+
color: e.value.style.chart.tooltip.color,
|
|
711
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
712
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
713
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
714
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
715
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
716
|
+
position: e.value.style.chart.tooltip.position,
|
|
717
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
718
|
+
parent: x.value,
|
|
719
|
+
content: W.value,
|
|
720
|
+
isFullscreen: F.value,
|
|
721
|
+
isCustom: s(Be)(e.value.style.chart.tooltip.customFormat),
|
|
722
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
723
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter
|
|
724
|
+
}, {
|
|
725
|
+
"tooltip-before": p(() => [
|
|
726
|
+
h(t.$slots, "tooltip-before", R(z({ ...te.value })), void 0, !0)
|
|
727
|
+
]),
|
|
728
|
+
"tooltip-after": p(() => [
|
|
729
|
+
h(t.$slots, "tooltip-after", R(z({ ...te.value })), void 0, !0)
|
|
730
|
+
]),
|
|
731
|
+
_: 3
|
|
732
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
|
|
733
|
+
ue.value ? (u(), I(s(Xe), {
|
|
734
|
+
key: 6,
|
|
735
|
+
hideDetails: "",
|
|
736
|
+
config: {
|
|
737
|
+
open: m.value.showTable,
|
|
738
|
+
maxHeight: 1e4,
|
|
739
|
+
head: {
|
|
740
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
741
|
+
color: e.value.style.chart.color
|
|
742
|
+
},
|
|
743
|
+
body: {
|
|
744
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
745
|
+
color: e.value.style.chart.color
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}, {
|
|
749
|
+
content: p(() => [
|
|
750
|
+
(u(), I(s(Ge), {
|
|
751
|
+
key: `table_${fe.value}`,
|
|
752
|
+
colNames: E.value.colNames,
|
|
753
|
+
head: E.value.head,
|
|
754
|
+
body: E.value.body,
|
|
755
|
+
config: E.value.config,
|
|
756
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
757
|
+
onClose: o[1] || (o[1] = (a) => m.value.showTable = !1)
|
|
758
|
+
}, {
|
|
759
|
+
th: p(({ th: a }) => [
|
|
760
|
+
pt(N(a), 1)
|
|
761
|
+
]),
|
|
762
|
+
td: p(({ td: a }) => [
|
|
763
|
+
L("div", { innerHTML: a }, null, 8, ea)
|
|
764
|
+
]),
|
|
765
|
+
_: 1
|
|
766
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
767
|
+
]),
|
|
768
|
+
_: 1
|
|
769
|
+
}, 8, ["config"])) : g("", !0),
|
|
770
|
+
s(b) ? (u(), I(Nt, { key: 7 })) : g("", !0)
|
|
771
|
+
], 46, Bt));
|
|
772
|
+
}
|
|
773
|
+
}, pa = /* @__PURE__ */ Lt(ta, [["__scopeId", "data-v-4cb88669"]]);
|
|
774
|
+
export {
|
|
775
|
+
pa as default
|
|
776
|
+
};
|