vue-data-ui 3.0.0-next.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -30
- package/dist/{Arrow-B6OlqyCG.js → Arrow-r2f8Bpd-.js} +1 -1
- package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
- package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-CXtL10fo.js} +1 -1
- package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-H91bBsqM.js} +2 -2
- package/dist/{DataTable--paavNqF.js → DataTable-BSSXpM7w.js} +2 -2
- package/dist/{Legend-BZ06qU55.js → Legend-BUk0WvWJ.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
- package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CJ6Vd7V5.js} +3 -3
- package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3zudcNI.js} +32 -32
- package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
- package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
- package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
- package/dist/{Shape-Mr1eIp_G.js → Shape-BRzOzubn.js} +43 -37
- package/dist/Slicer-MID8pgT3.js +602 -0
- package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-DATI1fGZ.js} +7 -7
- package/dist/{Title-B2dA6-uH.js → Title-BGu6gEd2.js} +1 -1
- package/dist/{Tooltip-O_hCvqgF.js → Tooltip-Bh2zYSoM.js} +23 -19
- package/dist/{UserOptions-Bk03FRqW.js → UserOptions-Ck8fz9f4.js} +2 -2
- package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-DhIh24Ti.js} +1 -1
- package/dist/{img-C_9wps3s.js → img-DrR839Ot.js} +1 -1
- package/dist/{index-CgShIRes.js → index-BtNwOUja.js} +2885 -2010
- package/dist/{pdf-CXdbjyRJ.js → pdf-DoShrdT5.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +753 -65
- package/dist/types/vue-data-ui.d.ts +753 -65
- package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-f2H3m6Yj.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DUNjpQNe.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
- package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-D7QVxNhO.js} +105 -100
- package/dist/vue-data-ui.js +26 -25
- package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
- package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-BKUrAowe.js} +3 -3
- package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
- package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
- package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
- package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
- package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
- package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
- package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
- package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
- package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
- package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
- package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-zKn3uhGN.js} +2 -2
- package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-BtnIwS_E.js} +431 -422
- package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
- package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
- package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
- package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
- package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
- package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
- package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
- package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
- package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
- package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
- package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
- package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
- package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
- package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
- package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
- package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
- package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
- package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
- package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-Bh35aujf.js} +2 -2
- package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
- package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
- package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
- package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
- package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
- package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
- package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
- package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
- package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
- package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
- package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
- package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
- package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
- package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
- package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BXOLZXuz.js} +17 -17
- package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
- package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
- package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
- package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
- package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
- package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
- package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-C-i2dRnU.js} +104 -102
- package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
- package/dist/vue-ui-wheel-waZf462K.js +379 -0
- package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
- package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-Cx4uuwTY.js} +364 -327
- package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
- package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
- package/package.json +4 -4
- package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
- package/dist/Slicer-3t0HimeE.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-BC4Ciblw.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
- package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
- package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
- package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
- package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
- package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
- package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
- package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
- package/dist/vue-ui-flow-MvORTthN.js +0 -765
- package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
- package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
- package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
- package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
- package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
- package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
- package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
- package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
- package/dist/vue-ui-onion-DXLokGec.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
- package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
- package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
- package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
- package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
- package/dist/vue-ui-rings-Duay-EmS.js +0 -685
- package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
- package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
- package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
- package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
- package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
- package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
- package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
- package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
- package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
- package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
- package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
- package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
- package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
- package/dist/vue-ui-wheel-tydUATi8.js +0 -352
- package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
- package/dist/vue-ui-xy--HToGdle.js +0 -2982
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { defineAsyncComponent as N, computed as y, ref as v, toRefs as Ce, watch as ae, shallowRef as le, onMounted as Ae, onBeforeUnmount as _e, createElementBlock as c, openBlock as o, unref as l, normalizeStyle as R, createBlock as O, createCommentVNode as h, createSlots as Oe, withCtx as b, renderSlot as d, normalizeProps as I, guardReactiveProps as $, normalizeClass as U, createVNode as Ie, Fragment as ne, renderList as se, toDisplayString as $e } from "vue";
|
|
2
|
+
import { u as xe, c as Pe, t as Se, b as Fe, o as ze, f as Te, x as oe, m as Me, X as Ne, k as Re, h as ue, i as Ue } from "./index-BtNwOUja.js";
|
|
3
|
+
import { t as Be, u as Ee } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as ie } from "./useNestedProp-f2H3m6Yj.js";
|
|
5
|
+
import { u as Le } from "./usePrinter-DUNjpQNe.js";
|
|
6
|
+
import { u as Xe } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
+
import { u as De } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
+
import Ge from "./Title-BGu6gEd2.js";
|
|
9
|
+
import Ye from "./img-DrR839Ot.js";
|
|
10
|
+
import { u as je, B as He } from "./useLoading-D7YHNtLX.js";
|
|
11
|
+
import { _ as We } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
const qe = ["id"], Ve = ["xmlns", "viewBox"], Je = ["width", "height"], Ke = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], Qe = ["d", "fill"], Ze = ["cx", "cy", "r", "stroke", "stroke-width"], et = { key: 4 }, tt = ["x", "y", "height"], at = ["x", "y", "font-size", "fill", "font-weight"], lt = {
|
|
13
|
+
key: 4,
|
|
14
|
+
class: "vue-data-ui-watermark"
|
|
15
|
+
}, nt = {
|
|
16
|
+
__name: "vue-ui-wheel",
|
|
17
|
+
props: {
|
|
18
|
+
config: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default() {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
dataset: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default() {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setup(re, { expose: ce }) {
|
|
32
|
+
const ve = N(() => import("./PenAndPaper-D3zudcNI.js")), he = N(() => import("./UserOptions-Ck8fz9f4.js")), de = N(() => import("./PackageVersion-CJ6Vd7V5.js")), { vue_ui_wheel: fe } = xe(), g = re, ye = y(() => !!g.dataset && Object.keys(g.dataset).length), x = v(Pe()), ge = v(null), B = v(0), p = v(null), E = v(null), L = v(null), X = v(null), D = v(0), e = v(F()), { loading: G, FINAL_DATASET: P } = je({
|
|
33
|
+
...Ce(g),
|
|
34
|
+
FINAL_CONFIG: e,
|
|
35
|
+
prepareConfig: F,
|
|
36
|
+
skeletonDataset: { percentage: 50 },
|
|
37
|
+
skeletonConfig: Se({
|
|
38
|
+
defaultConfig: e.value,
|
|
39
|
+
userConfig: {
|
|
40
|
+
userOptions: { show: !1 },
|
|
41
|
+
style: {
|
|
42
|
+
chart: {
|
|
43
|
+
backgroundColor: "#99999930",
|
|
44
|
+
animation: { use: !1 },
|
|
45
|
+
layout: {
|
|
46
|
+
wheel: {
|
|
47
|
+
ticks: {
|
|
48
|
+
activeColor: "#6A6A6A80",
|
|
49
|
+
inactiveColor: "#CACACA80"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
innerCircle: {
|
|
53
|
+
stroke: "#CACACA80"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
}), { userOptionsVisible: S, setUserOptionsVisibility: Y, keepUserOptionState: j } = Xe({ config: e.value }), { svgRef: H } = De({ config: e.value.style.chart.title });
|
|
61
|
+
function F() {
|
|
62
|
+
const t = ie({
|
|
63
|
+
userConfig: g.config,
|
|
64
|
+
defaultConfig: fe
|
|
65
|
+
});
|
|
66
|
+
return t.theme ? {
|
|
67
|
+
...ie({
|
|
68
|
+
userConfig: Fe.vue_ui_wheel[t.theme] || g.config,
|
|
69
|
+
defaultConfig: t
|
|
70
|
+
})
|
|
71
|
+
} : t;
|
|
72
|
+
}
|
|
73
|
+
ae(() => g.config, (t) => {
|
|
74
|
+
e.value = F(), S.value = !e.value.userOptions.showOnChartHover, Q(), D.value += 1;
|
|
75
|
+
}, { deep: !0 });
|
|
76
|
+
const { isPrinting: W, isImaging: q, generatePdf: V, generateImage: J } = Le({
|
|
77
|
+
elementId: x.value,
|
|
78
|
+
fileName: e.value.style.chart.title.text || "vue-ui-wheel",
|
|
79
|
+
options: e.value.userOptions.print
|
|
80
|
+
}), pe = y(() => e.value.userOptions.show && !e.value.style.chart.title.text), s = v({
|
|
81
|
+
size: 360,
|
|
82
|
+
height: 360,
|
|
83
|
+
width: 360
|
|
84
|
+
}), k = v(e.value.style.chart.layout.percentage.fontSize), u = y(() => ({
|
|
85
|
+
radius: Math.min(s.value.width, s.value.height) * 0.9 / 2,
|
|
86
|
+
centerX: s.value.width / 2,
|
|
87
|
+
centerY: s.value.height / 2
|
|
88
|
+
}));
|
|
89
|
+
function K(t, n = 1) {
|
|
90
|
+
return {
|
|
91
|
+
x: u.value.centerX + u.value.radius * Math.cos(29.85 + t * Math.PI / 180) * n,
|
|
92
|
+
y: u.value.centerY + u.value.radius * Math.sin(29.85 + t * Math.PI / 180) * n
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const r = v(e.value.style.chart.animation.use ? 0 : P.value.percentage || 0);
|
|
96
|
+
ae(() => P.value, (t) => {
|
|
97
|
+
e.value.style.chart.animation.use ? Z(t.percentage) : r.value = t.percentage || 0;
|
|
98
|
+
}, { deep: !0 });
|
|
99
|
+
const f = le(null), m = le(null);
|
|
100
|
+
Ae(() => {
|
|
101
|
+
Q();
|
|
102
|
+
});
|
|
103
|
+
const me = y(() => !!e.value.debug);
|
|
104
|
+
function Q() {
|
|
105
|
+
if (ze(g.dataset) && Te({
|
|
106
|
+
componentName: "VueUiWheel",
|
|
107
|
+
type: "dataset",
|
|
108
|
+
debug: me.value
|
|
109
|
+
}), e.value.responsive) {
|
|
110
|
+
const t = Be(() => {
|
|
111
|
+
const { width: n, height: a } = Ee({
|
|
112
|
+
chart: p.value,
|
|
113
|
+
title: e.value.style.chart.title.text ? E.value : null,
|
|
114
|
+
source: L.value,
|
|
115
|
+
noTitle: X.value
|
|
116
|
+
});
|
|
117
|
+
requestAnimationFrame(() => {
|
|
118
|
+
s.value.width = n, s.value.height = a, k.value = e.value.style.chart.layout.percentage.fontSize / 360 * Math.min(n, a);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
f.value && (m.value && f.value.unobserve(m.value), f.value.disconnect()), f.value = new ResizeObserver(t), m.value = p.value.parentNode, f.value.observe(m.value);
|
|
122
|
+
}
|
|
123
|
+
Z(P.value.percentage || 0);
|
|
124
|
+
}
|
|
125
|
+
_e(() => {
|
|
126
|
+
f.value && (m.value && f.value.unobserve(m.value), f.value.disconnect());
|
|
127
|
+
});
|
|
128
|
+
function Z(t) {
|
|
129
|
+
let n = e.value.style.chart.animation.speed;
|
|
130
|
+
const a = Math.abs(t - r.value) / (n * 120);
|
|
131
|
+
function i() {
|
|
132
|
+
r.value < t ? r.value = Math.min(r.value + a, t) : r.value > t && (r.value = Math.max(r.value - a, t)), r.value !== t && requestAnimationFrame(i);
|
|
133
|
+
}
|
|
134
|
+
i();
|
|
135
|
+
}
|
|
136
|
+
const w = y(() => Math.max(100, e.value.style.chart.layout.wheel.ticks.quantity)), C = y(() => 100 / w.value), ee = y(() => {
|
|
137
|
+
const t = [];
|
|
138
|
+
for (let n = 0; n < w.value; n += 1) {
|
|
139
|
+
const a = r.value > n * C.value ? e.value.style.chart.layout.wheel.ticks.activeColor : e.value.style.chart.layout.wheel.ticks.inactiveColor, { x: i, y: T } = K(s.value.size / w.value * n), { x: M, y: be } = K(s.value.size / w.value * n, e.value.style.chart.layout.wheel.ticks.sizeRatio);
|
|
140
|
+
t.push({
|
|
141
|
+
x1: i,
|
|
142
|
+
y1: T,
|
|
143
|
+
x2: M,
|
|
144
|
+
y2: be,
|
|
145
|
+
color: e.value.style.chart.layout.wheel.ticks.gradient.show ? oe(a, n * C.value / w.value * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : a
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
return t;
|
|
149
|
+
}), ke = y(() => Me({ series: ee.value.map((t) => ({
|
|
150
|
+
name: "",
|
|
151
|
+
value: 1,
|
|
152
|
+
color: t.color
|
|
153
|
+
})) }, u.value.centerX, u.value.centerY, u.value.radius, u.value.radius, 1.99999, 2, 1, 360, 105.25, u.value.radius * (1 - e.value.style.chart.layout.wheel.ticks.sizeRatio))), A = v(!1);
|
|
154
|
+
function te(t) {
|
|
155
|
+
A.value = t, B.value += 1;
|
|
156
|
+
}
|
|
157
|
+
const _ = v(!1);
|
|
158
|
+
function z() {
|
|
159
|
+
_.value = !_.value;
|
|
160
|
+
}
|
|
161
|
+
async function we({ scale: t = 2 } = {}) {
|
|
162
|
+
if (!p.value) return;
|
|
163
|
+
const { width: n, height: a } = p.value.getBoundingClientRect(), i = n / a, { imageUri: T, base64: M } = await Ye({ domElement: p.value, base64: !0, img: !0, scale: t });
|
|
164
|
+
return {
|
|
165
|
+
imageUri: T,
|
|
166
|
+
base64: M,
|
|
167
|
+
title: e.value.style.chart.title.text,
|
|
168
|
+
width: n,
|
|
169
|
+
height: a,
|
|
170
|
+
aspectRatio: i
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
return ce({
|
|
174
|
+
getImage: we,
|
|
175
|
+
generatePdf: V,
|
|
176
|
+
generateImage: J,
|
|
177
|
+
toggleAnnotator: z,
|
|
178
|
+
toggleFullscreen: te
|
|
179
|
+
}), (t, n) => (o(), c("div", {
|
|
180
|
+
class: "vue-ui-wheel",
|
|
181
|
+
ref_key: "wheelChart",
|
|
182
|
+
ref: p,
|
|
183
|
+
id: x.value,
|
|
184
|
+
style: R(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
|
|
185
|
+
onMouseenter: n[0] || (n[0] = () => l(Y)(!0)),
|
|
186
|
+
onMouseleave: n[1] || (n[1] = () => l(Y)(!1))
|
|
187
|
+
}, [
|
|
188
|
+
e.value.userOptions.buttons.annotator ? (o(), O(l(ve), {
|
|
189
|
+
key: 0,
|
|
190
|
+
svgRef: l(H),
|
|
191
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
192
|
+
color: e.value.style.chart.color,
|
|
193
|
+
active: _.value,
|
|
194
|
+
onClose: z
|
|
195
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : h("", !0),
|
|
196
|
+
pe.value ? (o(), c("div", {
|
|
197
|
+
key: 1,
|
|
198
|
+
ref_key: "noTitle",
|
|
199
|
+
ref: X,
|
|
200
|
+
class: "vue-data-ui-no-title-space",
|
|
201
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
202
|
+
}, null, 512)) : h("", !0),
|
|
203
|
+
e.value.style.chart.title.text ? (o(), c("div", {
|
|
204
|
+
key: 2,
|
|
205
|
+
ref_key: "chartTitle",
|
|
206
|
+
ref: E,
|
|
207
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
208
|
+
}, [
|
|
209
|
+
(o(), O(Ge, {
|
|
210
|
+
key: `title_${D.value}`,
|
|
211
|
+
config: {
|
|
212
|
+
title: {
|
|
213
|
+
cy: "wheel-title",
|
|
214
|
+
...e.value.style.chart.title
|
|
215
|
+
},
|
|
216
|
+
subtitle: {
|
|
217
|
+
cy: "wheel-subtitle",
|
|
218
|
+
...e.value.style.chart.title.subtitle
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}, null, 8, ["config"]))
|
|
222
|
+
], 512)) : h("", !0),
|
|
223
|
+
e.value.userOptions.show && ye.value && (l(j) || l(S)) ? (o(), O(l(he), {
|
|
224
|
+
ref_key: "details",
|
|
225
|
+
ref: ge,
|
|
226
|
+
key: `user_options_${B.value}`,
|
|
227
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
228
|
+
color: e.value.style.chart.color,
|
|
229
|
+
isPrinting: l(W),
|
|
230
|
+
isImaging: l(q),
|
|
231
|
+
uid: x.value,
|
|
232
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
233
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
234
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
235
|
+
hasXls: !1,
|
|
236
|
+
isFullscreen: A.value,
|
|
237
|
+
position: e.value.userOptions.position,
|
|
238
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
239
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
240
|
+
isAnnotation: _.value,
|
|
241
|
+
chartElement: p.value,
|
|
242
|
+
callbacks: e.value.userOptions.callbacks,
|
|
243
|
+
printScale: e.value.userOptions.print.scale,
|
|
244
|
+
onToggleFullscreen: te,
|
|
245
|
+
onGeneratePdf: l(V),
|
|
246
|
+
onGenerateImage: l(J),
|
|
247
|
+
onToggleAnnotator: z,
|
|
248
|
+
style: R({
|
|
249
|
+
visibility: l(j) ? l(S) ? "visible" : "hidden" : "visible"
|
|
250
|
+
})
|
|
251
|
+
}, Oe({ _: 2 }, [
|
|
252
|
+
t.$slots.menuIcon ? {
|
|
253
|
+
name: "menuIcon",
|
|
254
|
+
fn: b(({ isOpen: a, color: i }) => [
|
|
255
|
+
d(t.$slots, "menuIcon", I($({ isOpen: a, color: i })), void 0, !0)
|
|
256
|
+
]),
|
|
257
|
+
key: "0"
|
|
258
|
+
} : void 0,
|
|
259
|
+
t.$slots.optionPdf ? {
|
|
260
|
+
name: "optionPdf",
|
|
261
|
+
fn: b(() => [
|
|
262
|
+
d(t.$slots, "optionPdf", {}, void 0, !0)
|
|
263
|
+
]),
|
|
264
|
+
key: "1"
|
|
265
|
+
} : void 0,
|
|
266
|
+
t.$slots.optionImg ? {
|
|
267
|
+
name: "optionImg",
|
|
268
|
+
fn: b(() => [
|
|
269
|
+
d(t.$slots, "optionImg", {}, void 0, !0)
|
|
270
|
+
]),
|
|
271
|
+
key: "2"
|
|
272
|
+
} : void 0,
|
|
273
|
+
t.$slots.optionFullscreen ? {
|
|
274
|
+
name: "optionFullscreen",
|
|
275
|
+
fn: b(({ toggleFullscreen: a, isFullscreen: i }) => [
|
|
276
|
+
d(t.$slots, "optionFullscreen", I($({ toggleFullscreen: a, isFullscreen: i })), void 0, !0)
|
|
277
|
+
]),
|
|
278
|
+
key: "3"
|
|
279
|
+
} : void 0,
|
|
280
|
+
t.$slots.optionAnnotator ? {
|
|
281
|
+
name: "optionAnnotator",
|
|
282
|
+
fn: b(({ toggleAnnotator: a, isAnnotator: i }) => [
|
|
283
|
+
d(t.$slots, "optionAnnotator", I($({ toggleAnnotator: a, isAnnotator: i })), void 0, !0)
|
|
284
|
+
]),
|
|
285
|
+
key: "4"
|
|
286
|
+
} : void 0
|
|
287
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "position", "titles", "hasAnnotator", "isAnnotation", "chartElement", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : h("", !0),
|
|
288
|
+
(o(), c("svg", {
|
|
289
|
+
ref_key: "svgRef",
|
|
290
|
+
ref: H,
|
|
291
|
+
xmlns: l(Ne),
|
|
292
|
+
class: U({ "vue-data-ui-fullscreen--on": A.value, "vue-data-ui-fulscreen--off": !A.value }),
|
|
293
|
+
viewBox: `0 0 ${s.value.width <= 0 ? 10 : s.value.width} ${s.value.height <= 0 ? 10 : s.value.height}`,
|
|
294
|
+
style: R(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
295
|
+
}, [
|
|
296
|
+
Ie(l(de)),
|
|
297
|
+
t.$slots["chart-background"] ? (o(), c("foreignObject", {
|
|
298
|
+
key: 0,
|
|
299
|
+
x: 0,
|
|
300
|
+
y: 0,
|
|
301
|
+
width: s.value.width <= 0 ? 10 : s.value.width,
|
|
302
|
+
height: s.value.height <= 0 ? 10 : s.value.height,
|
|
303
|
+
style: {
|
|
304
|
+
pointerEvents: "none"
|
|
305
|
+
}
|
|
306
|
+
}, [
|
|
307
|
+
d(t.$slots, "chart-background", {}, void 0, !0)
|
|
308
|
+
], 8, Je)) : h("", !0),
|
|
309
|
+
e.value.style.chart.layout.wheel.ticks.type === "classic" ? (o(!0), c(ne, { key: 1 }, se(ee.value, (a, i) => (o(), c("line", {
|
|
310
|
+
x1: a.x1,
|
|
311
|
+
x2: a.x2,
|
|
312
|
+
y1: a.y1,
|
|
313
|
+
y2: a.y2,
|
|
314
|
+
stroke: a.color,
|
|
315
|
+
"stroke-width": e.value.style.chart.layout.wheel.ticks.strokeWidth / 360 * Math.min(s.value.width, s.value.height),
|
|
316
|
+
"stroke-linecap": e.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt",
|
|
317
|
+
class: U({ "vue-ui-tick-animated": e.value.style.chart.animation.use && i * C.value <= r.value })
|
|
318
|
+
}, null, 10, Ke))), 256)) : (o(!0), c(ne, { key: 2 }, se(ke.value, (a, i) => (o(), c("path", {
|
|
319
|
+
d: a.arcSlice,
|
|
320
|
+
fill: a.color,
|
|
321
|
+
class: U({ "vue-ui-tick-animated": e.value.style.chart.animation.use && i * C.value <= r.value })
|
|
322
|
+
}, null, 10, Qe))), 256)),
|
|
323
|
+
e.value.style.chart.layout.innerCircle.show ? (o(), c("circle", {
|
|
324
|
+
key: 3,
|
|
325
|
+
cx: u.value.centerX,
|
|
326
|
+
cy: u.value.centerY,
|
|
327
|
+
r: u.value.radius * 0.8 <= 0 ? 1e-4 : u.value.radius * 0.8,
|
|
328
|
+
stroke: e.value.style.chart.layout.innerCircle.stroke,
|
|
329
|
+
"stroke-width": e.value.style.chart.layout.innerCircle.strokeWidth,
|
|
330
|
+
fill: "none"
|
|
331
|
+
}, null, 8, Ze)) : h("", !0),
|
|
332
|
+
e.value.style.chart.layout.percentage.show ? (o(), c("g", et, [
|
|
333
|
+
l(G) ? (o(), c("rect", {
|
|
334
|
+
key: 0,
|
|
335
|
+
x: u.value.centerX - 40,
|
|
336
|
+
y: u.value.centerY - k.value / 2,
|
|
337
|
+
width: 80,
|
|
338
|
+
height: k.value,
|
|
339
|
+
fill: "#6A6A6A80",
|
|
340
|
+
rx: "3"
|
|
341
|
+
}, null, 8, tt)) : (o(), c("text", {
|
|
342
|
+
key: 1,
|
|
343
|
+
x: u.value.centerX,
|
|
344
|
+
y: u.value.centerY + k.value / 3,
|
|
345
|
+
"font-size": k.value,
|
|
346
|
+
fill: e.value.style.chart.layout.wheel.ticks.gradient.show ? l(oe)(e.value.style.chart.layout.wheel.ticks.activeColor, r.value / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.wheel.ticks.activeColor,
|
|
347
|
+
"text-anchor": "middle",
|
|
348
|
+
"font-weight": e.value.style.chart.layout.percentage.bold ? "bold" : "normal",
|
|
349
|
+
style: { "font-variant-numeric": "tabluar-nums" }
|
|
350
|
+
}, $e(l(Re)(
|
|
351
|
+
e.value.style.chart.layout.percentage.formatter,
|
|
352
|
+
l(ue)(r.value),
|
|
353
|
+
l(Ue)({
|
|
354
|
+
v: l(ue)(r.value),
|
|
355
|
+
s: "%",
|
|
356
|
+
r: e.value.style.chart.layout.percentage.rounding
|
|
357
|
+
})
|
|
358
|
+
)), 9, at))
|
|
359
|
+
])) : h("", !0),
|
|
360
|
+
d(t.$slots, "svg", { svg: s.value }, void 0, !0)
|
|
361
|
+
], 14, Ve)),
|
|
362
|
+
t.$slots.watermark ? (o(), c("div", lt, [
|
|
363
|
+
d(t.$slots, "watermark", I($({ isPrinting: l(W) || l(q) })), void 0, !0)
|
|
364
|
+
])) : h("", !0),
|
|
365
|
+
t.$slots.source ? (o(), c("div", {
|
|
366
|
+
key: 5,
|
|
367
|
+
ref_key: "source",
|
|
368
|
+
ref: L,
|
|
369
|
+
dir: "auto"
|
|
370
|
+
}, [
|
|
371
|
+
d(t.$slots, "source", {}, void 0, !0)
|
|
372
|
+
], 512)) : h("", !0),
|
|
373
|
+
l(G) ? (o(), O(He, { key: 6 })) : h("", !0)
|
|
374
|
+
], 44, qe));
|
|
375
|
+
}
|
|
376
|
+
}, gt = /* @__PURE__ */ We(nt, [["__scopeId", "data-v-11683b00"]]);
|
|
377
|
+
export {
|
|
378
|
+
gt as default
|
|
379
|
+
};
|