vue-data-ui 3.5.0 → 3.5.2
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 +26 -0
- package/dist/{ColorPicker-J5wOPCeB.js → ColorPicker-ChuwChMo.js} +58 -56
- package/dist/{NonSvgPenAndPaper-C7TRn0_3.js → NonSvgPenAndPaper-DVgKKLIf.js} +1 -1
- package/dist/{PackageVersion-Cyx_s25h.js → PackageVersion-Y7t79Jtq.js} +1 -1
- package/dist/PenAndPaper-SZQIAgkg.js +388 -0
- package/dist/{Title-l36lOBMx.js → Title-BzH_LEA3.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +17 -8
- package/dist/{useNestedProp-BjZe1Y85.js → useNestedProp-CReNavA0.js} +23 -9
- package/dist/{vue-data-ui-DxgRqCAo.js → vue-data-ui-BRaq4hRp.js} +63 -63
- package/dist/vue-data-ui.js +64 -64
- package/dist/{vue-ui-3d-bar-DmNJp8SY.js → vue-ui-3d-bar-BB4ii8Nt.js} +454 -434
- package/dist/{vue-ui-accordion-CZ0thhxa.js → vue-ui-accordion-BmFTVF1a.js} +1 -1
- package/dist/{vue-ui-age-pyramid-CPAP3sNY.js → vue-ui-age-pyramid-8bUepd28.js} +180 -160
- package/dist/{vue-ui-annotator-BylDgUVb.js → vue-ui-annotator-CcpaXBNK.js} +3 -3
- package/dist/{vue-ui-bullet-Ce6uvCQJ.js → vue-ui-bullet-BvT4scFv.js} +190 -170
- package/dist/{vue-ui-candlestick-DewevWV_.js → vue-ui-candlestick-CMP7UL6z.js} +201 -181
- package/dist/{vue-ui-carousel-table-Dv1CDfE5.js → vue-ui-carousel-table-CzOcKsDj.js} +2 -2
- package/dist/{vue-ui-chestnut-D9sdFZ4E.js → vue-ui-chestnut-S787oASt.js} +375 -355
- package/dist/vue-ui-chord-Dl9Y4mcz.js +1153 -0
- package/dist/{vue-ui-circle-pack-Be74QB_0.js → vue-ui-circle-pack-CU09BzOV.js} +289 -269
- package/dist/{vue-ui-cursor-ik59bfC4.js → vue-ui-cursor-C3yD_TUr.js} +1 -1
- package/dist/vue-ui-dashboard-BfEcVRxQ.js +432 -0
- package/dist/{vue-ui-digits-ByNNcWXi.js → vue-ui-digits-pRh179Gg.js} +1 -1
- package/dist/{vue-ui-donut-BRGFcgxS.js → vue-ui-donut-B_tEm4dT.js} +462 -442
- package/dist/{vue-ui-donut-evolution-DJ0C-7jH.js → vue-ui-donut-evolution-DiGhMwMO.js} +293 -273
- package/dist/{vue-ui-dumbbell-iQJ0BUhm.js → vue-ui-dumbbell-BlF3CLbN.js} +210 -190
- package/dist/{vue-ui-flow-CTYFoib3.js → vue-ui-flow-BQi5L8mJ.js} +339 -319
- package/dist/{vue-ui-funnel-CG55Xcdy.js → vue-ui-funnel-CM_6Sare.js} +218 -198
- package/dist/{vue-ui-galaxy-BQrxjKZJ.js → vue-ui-galaxy-BnZA62Li.js} +201 -181
- package/dist/{vue-ui-gauge-Tc-0NI0Y.js → vue-ui-gauge-DAk72bez.js} +311 -291
- package/dist/{vue-ui-gizmo-P8h-gnLd.js → vue-ui-gizmo-BQzQlUJ8.js} +2 -2
- package/dist/{vue-ui-heatmap-BZimPzsL.js → vue-ui-heatmap-C9MhHWpp.js} +303 -283
- package/dist/{vue-ui-history-plot-BVzbuqYY.js → vue-ui-history-plot-BYQh3E8U.js} +229 -209
- package/dist/{vue-ui-kpi-BGGff8LM.js → vue-ui-kpi-jcrPjW4C.js} +2 -2
- package/dist/{vue-ui-mini-loader-CSF-7TJL.js → vue-ui-mini-loader-DTM98mRN.js} +1 -1
- package/dist/{vue-ui-molecule-BALqwB8c.js → vue-ui-molecule-Bd1OXvl3.js} +156 -136
- package/dist/{vue-ui-mood-radar-QJ5nlZby.js → vue-ui-mood-radar-DuoiTsYn.js} +266 -246
- package/dist/{vue-ui-nested-donuts-CmUabkkQ.js → vue-ui-nested-donuts-BTswQFjz.js} +506 -486
- package/dist/{vue-ui-onion-DAOCf3f8.js → vue-ui-onion-D-1U2Qgl.js} +220 -200
- package/dist/{vue-ui-parallel-coordinate-plot-D8jTuFjq.js → vue-ui-parallel-coordinate-plot-D-7VFHas.js} +235 -215
- package/dist/{vue-ui-quadrant-CO52mSRY.js → vue-ui-quadrant-CeM23s0z.js} +463 -443
- package/dist/{vue-ui-quick-chart-DEaVSldE.js → vue-ui-quick-chart-C0RMQzjC.js} +288 -268
- package/dist/{vue-ui-radar-C5V4hhbW.js → vue-ui-radar-BSfxyur3.js} +331 -311
- package/dist/{vue-ui-rating-CiMoFM_c.js → vue-ui-rating-tj97undO.js} +1 -1
- package/dist/{vue-ui-relation-circle-CbMM0Jka.js → vue-ui-relation-circle-C7uV2mIj.js} +228 -208
- package/dist/{vue-ui-ridgeline-CXCIRDq6.js → vue-ui-ridgeline-CYMfTlwI.js} +242 -222
- package/dist/{vue-ui-rings-BpUcyqo7.js → vue-ui-rings-C96aj57d.js} +189 -169
- package/dist/{vue-ui-scatter--Dxe-hfO.js → vue-ui-scatter-CtvOXUnx.js} +275 -255
- package/dist/{vue-ui-skeleton-BWq-VDzg.js → vue-ui-skeleton-87TORm6s.js} +2 -2
- package/dist/{vue-ui-smiley-sGFRbn31.js → vue-ui-smiley-B74geHT3.js} +1 -1
- package/dist/{vue-ui-spark-trend-T4J_YOa_.js → vue-ui-spark-trend-6_Ibziyv.js} +2 -2
- package/dist/{vue-ui-sparkbar-DnKP55Vu.js → vue-ui-sparkbar-BDCocMLI.js} +2 -2
- package/dist/{vue-ui-sparkgauge-BDQLP-zi.js → vue-ui-sparkgauge-CQ4Zk9-f.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-Dm7QXrA-.js → vue-ui-sparkhistogram-BlTV9wfn.js} +143 -140
- package/dist/{vue-ui-sparkline-tXGDLHRy.js → vue-ui-sparkline-DWESyiqL.js} +2 -2
- package/dist/{vue-ui-sparkstackbar-M53Nt07M.js → vue-ui-sparkstackbar-DK_7X8mL.js} +2 -2
- package/dist/vue-ui-stackbar-BWuw8ff4.js +1827 -0
- package/dist/{vue-ui-strip-plot-BX9i3wMn.js → vue-ui-strip-plot-C1N2n39d.js} +245 -225
- package/dist/{vue-ui-table-7r02N9R9.js → vue-ui-table-CcuoPHgI.js} +3 -3
- package/dist/{vue-ui-table-heatmap-BqCEBoUf.js → vue-ui-table-heatmap-C9EMEM3Z.js} +1 -1
- package/dist/{vue-ui-table-sparkline-DZaAh10E.js → vue-ui-table-sparkline-BAxmZRff.js} +2 -2
- package/dist/vue-ui-thermometer-CDrM-WFq.js +584 -0
- package/dist/{vue-ui-timer-Ds-MJoW2.js → vue-ui-timer-BVsUQJz_.js} +3 -3
- package/dist/vue-ui-tiremarks-BQH2pNkG.js +450 -0
- package/dist/{vue-ui-treemap-BEvl8hiw.js → vue-ui-treemap-6WLoCHsH.js} +453 -433
- package/dist/{vue-ui-vertical-bar-D8dtM8sw.js → vue-ui-vertical-bar-B3gfBqD_.js} +323 -303
- package/dist/{vue-ui-waffle-B3q-2SCR.js → vue-ui-waffle-Bhlqo4xM.js} +219 -199
- package/dist/vue-ui-wheel-CqHw1WuW.js +663 -0
- package/dist/{vue-ui-word-cloud-ChT7uLbN.js → vue-ui-word-cloud-CKuWZGLv.js} +248 -228
- package/dist/{vue-ui-world-CdP4g_3_.js → vue-ui-world-C8KVyDim.js} +287 -267
- package/dist/{vue-ui-xy-B68qQ-gX.js → vue-ui-xy-Cz2qIEfi.js} +389 -369
- package/dist/{vue-ui-xy-canvas-DDngEA1s.js → vue-ui-xy-canvas-y4h7gEFp.js} +4 -4
- package/package.json +4 -4
- package/dist/PenAndPaper-DSvu9dwa.js +0 -373
- package/dist/vue-ui-chord-BG4dxKNA.js +0 -1133
- package/dist/vue-ui-dashboard-C4BLwHey.js +0 -412
- package/dist/vue-ui-stackbar-CkBOjryQ.js +0 -1724
- package/dist/vue-ui-thermometer-CFPt3MOv.js +0 -564
- package/dist/vue-ui-tiremarks-2eIQ6vxu.js +0 -430
- package/dist/vue-ui-wheel-BpirIgAG.js +0 -643
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
import { useCssVars as At, computed as g, defineAsyncComponent as fe, ref as S, toRefs as It, watch as Ue, shallowRef as Be, onMounted as _t, onBeforeUnmount as Rt, createElementBlock as n, openBlock as s, unref as c, normalizeStyle as ge, normalizeClass as O, createBlock as ne, createCommentVNode as P, withCtx as I, renderSlot as w, normalizeProps as W, guardReactiveProps as T, createSlots as Pt, createVNode as zt, Fragment as _, renderList as D, createElementVNode as Ot, toDisplayString as Wt } from "vue";
|
|
2
|
+
import { c as Tt, t as Dt, o as Ft, f as Xt, i as K, T as Nt, X as Lt, S as Ee, a as Ut, x as je, d as Bt } from "./lib-C_mNZmhD.js";
|
|
3
|
+
import { t as Et, u as jt } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Yt, a as Ye } from "./useNestedProp-CReNavA0.js";
|
|
5
|
+
import { u as Gt, B as Ht } from "./BaseScanner-BgWxam9d.js";
|
|
6
|
+
import { u as Vt } from "./usePrinter-DTzqpYKF.js";
|
|
7
|
+
import { u as qt } from "./useSvgExport-DrjCWun4.js";
|
|
8
|
+
import { u as Zt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
9
|
+
import { u as Jt } from "./useChartAccessibility-9icAAmYg.js";
|
|
10
|
+
import Kt from "./img-BecE5qXd.js";
|
|
11
|
+
import Qt from "./Title-BzH_LEA3.js";
|
|
12
|
+
import { t as ea } from "./themes-AUNCOb2G.js";
|
|
13
|
+
import { _ as ta } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const aa = ["id"], la = ["xmlns", "viewBox"], oa = ["x", "y", "width", "height"], sa = ["d", "stroke", "stroke-width"], na = ["cx", "cy", "r", "stroke", "stroke-width"], ua = { key: 0 }, ra = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-linecap"], ia = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-linecap"], ca = { key: 1 }, ha = ["d", "fill", "stroke", "stroke-width"], va = ["d", "fill", "stroke", "stroke-width"], da = ["d", "fill", "stroke", "stroke-width"], ya = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], ka = ["d", "fill", "stroke", "stroke-width"], fa = { key: 5 }, ga = ["x", "y", "height"], pa = ["x", "y", "font-size", "fill", "font-weight", "stroke", "stroke-width"], ma = {
|
|
15
|
+
key: 4,
|
|
16
|
+
class: "vue-data-ui-watermark"
|
|
17
|
+
}, wa = {
|
|
18
|
+
__name: "vue-ui-wheel",
|
|
19
|
+
props: {
|
|
20
|
+
config: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default() {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
dataset: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default() {
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
setup(Ge, { expose: He }) {
|
|
34
|
+
At((a) => ({
|
|
35
|
+
v59b527f3: ut.value,
|
|
36
|
+
ea3c8bce: rt.value,
|
|
37
|
+
ea3cc6a8: it.value
|
|
38
|
+
}));
|
|
39
|
+
const Ve = fe(() => import("./PenAndPaper-SZQIAgkg.js")), qe = fe(() => import("./UserOptions-CGnQt6Fd.js")), Ze = fe(() => import("./PackageVersion-Y7t79Jtq.js")), { vue_ui_wheel: Je } = Yt(), L = Ge, Ke = g(() => !!L.dataset && Object.keys(L.dataset).length), ue = S(Tt()), Qe = S(null), pe = S(0), U = S(null), me = S(null), we = S(null), be = S(null), xe = S(0), e = S(he()), { loading: Me, FINAL_DATASET: re } = Gt({
|
|
40
|
+
...It(L),
|
|
41
|
+
FINAL_CONFIG: e,
|
|
42
|
+
prepareConfig: he,
|
|
43
|
+
skeletonDataset: { percentage: 50 },
|
|
44
|
+
skeletonConfig: Dt({
|
|
45
|
+
defaultConfig: e.value,
|
|
46
|
+
userConfig: {
|
|
47
|
+
userOptions: { show: !1 },
|
|
48
|
+
style: {
|
|
49
|
+
chart: {
|
|
50
|
+
backgroundColor: "#99999930",
|
|
51
|
+
animation: { use: !1 },
|
|
52
|
+
layout: {
|
|
53
|
+
wheel: {
|
|
54
|
+
ticks: {
|
|
55
|
+
activeColor: "#6A6A6A80",
|
|
56
|
+
inactiveColor: "#CACACA80"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
innerCircle: {
|
|
60
|
+
stroke: "#CACACA80"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
}), { userOptionsVisible: ie, setUserOptionsVisibility: Ce, keepUserOptionState: $e } = Zt({ config: e.value }), { svgRef: ce } = Jt({ config: e.value.style.chart.title });
|
|
68
|
+
function he() {
|
|
69
|
+
const a = Ye({
|
|
70
|
+
userConfig: L.config,
|
|
71
|
+
defaultConfig: Je
|
|
72
|
+
});
|
|
73
|
+
return a.theme ? {
|
|
74
|
+
...Ye({
|
|
75
|
+
userConfig: ea.vue_ui_wheel[a.theme] || L.config,
|
|
76
|
+
defaultConfig: a
|
|
77
|
+
})
|
|
78
|
+
} : a;
|
|
79
|
+
}
|
|
80
|
+
Ue(() => L.config, (a) => {
|
|
81
|
+
e.value = he(), ie.value = !e.value.userOptions.showOnChartHover, Pe(), xe.value += 1;
|
|
82
|
+
}, { deep: !0 });
|
|
83
|
+
const { isPrinting: Se, isImaging: Ae, generatePdf: Ie, generateImage: _e } = Vt({
|
|
84
|
+
elementId: ue.value,
|
|
85
|
+
fileName: e.value.style.chart.title.text || "vue-ui-wheel",
|
|
86
|
+
options: e.value.userOptions.print
|
|
87
|
+
}), et = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), u = S({
|
|
88
|
+
size: 360,
|
|
89
|
+
height: 360,
|
|
90
|
+
width: 360
|
|
91
|
+
}), G = S(e.value.style.chart.layout.percentage.fontSize), i = g(() => ({
|
|
92
|
+
radius: Math.min(u.value.width, u.value.height) * 0.9 / 2 * e.value.style.chart.layout.wheel.radiusRatio,
|
|
93
|
+
centerX: u.value.width / 2,
|
|
94
|
+
centerY: u.value.height / 2
|
|
95
|
+
}));
|
|
96
|
+
function Re(a, o = 1) {
|
|
97
|
+
return {
|
|
98
|
+
x: i.value.centerX + i.value.radius * Math.cos(29.85 + a * Math.PI / 180) * o,
|
|
99
|
+
y: i.value.centerY + i.value.radius * Math.sin(29.85 + a * Math.PI / 180) * o
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const d = S(e.value.style.chart.animation.use ? 0 : re.value.percentage || 0);
|
|
103
|
+
Ue(() => re.value, (a) => {
|
|
104
|
+
e.value.style.chart.animation.use ? De(a.percentage) : d.value = a.percentage || 0;
|
|
105
|
+
}, { deep: !0 });
|
|
106
|
+
const F = Be(null), E = Be(null);
|
|
107
|
+
_t(() => {
|
|
108
|
+
Pe();
|
|
109
|
+
});
|
|
110
|
+
const tt = g(() => !!e.value.debug);
|
|
111
|
+
function Pe() {
|
|
112
|
+
if (Ft(L.dataset) && Xt({
|
|
113
|
+
componentName: "VueUiWheel",
|
|
114
|
+
type: "dataset",
|
|
115
|
+
debug: tt.value
|
|
116
|
+
}), e.value.responsive) {
|
|
117
|
+
const a = Et(() => {
|
|
118
|
+
const { width: o, height: t } = jt({
|
|
119
|
+
chart: U.value,
|
|
120
|
+
title: e.value.style.chart.title.text ? me.value : null,
|
|
121
|
+
source: we.value,
|
|
122
|
+
noTitle: be.value
|
|
123
|
+
});
|
|
124
|
+
requestAnimationFrame(() => {
|
|
125
|
+
u.value.width = o, u.value.height = t, G.value = e.value.style.chart.layout.percentage.fontSize / 360 * Math.min(o, t);
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
F.value && (E.value && F.value.unobserve(E.value), F.value.disconnect()), F.value = new ResizeObserver(a), E.value = U.value.parentNode, F.value.observe(E.value);
|
|
129
|
+
}
|
|
130
|
+
De(re.value.percentage || 0);
|
|
131
|
+
}
|
|
132
|
+
Rt(() => {
|
|
133
|
+
F.value && (E.value && F.value.unobserve(E.value), F.value.disconnect());
|
|
134
|
+
});
|
|
135
|
+
function Q([a, o, t], l) {
|
|
136
|
+
const r = Math.cos(l), v = Math.sin(l);
|
|
137
|
+
return [a, o * r - t * v, o * v + t * r];
|
|
138
|
+
}
|
|
139
|
+
function ee([a, o, t], l) {
|
|
140
|
+
const r = l / (l - t);
|
|
141
|
+
return [a * r, o * r, t, r];
|
|
142
|
+
}
|
|
143
|
+
function ze(a, o) {
|
|
144
|
+
const t = a.replace("#", ""), l = parseInt(t.substring(0, 2), 16), r = parseInt(t.substring(2, 4), 16), v = parseInt(t.substring(4, 6), 16), y = 1 - Math.min(1, Math.max(0, e.value.style.chart.layout.wheel.ticks.shadeColorRatio3d)) * o, k = Math.max(0, Math.min(255, Math.round(l * y))), M = Math.max(0, Math.min(255, Math.round(r * y))), C = Math.max(0, Math.min(255, Math.round(v * y)));
|
|
145
|
+
return `#${k.toString(16).padStart(2, "0")}${M.toString(16).padStart(2, "0")}${C.toString(16).padStart(2, "0")}`;
|
|
146
|
+
}
|
|
147
|
+
function at({
|
|
148
|
+
cx: a,
|
|
149
|
+
cy: o,
|
|
150
|
+
radius: t,
|
|
151
|
+
innerRatio: l = 0.8,
|
|
152
|
+
count: r = 120,
|
|
153
|
+
startDeg: v = 0,
|
|
154
|
+
axDeg: b = 50,
|
|
155
|
+
f: y = 520,
|
|
156
|
+
baseStroke: k = 5,
|
|
157
|
+
activeColor: M,
|
|
158
|
+
inactiveColor: C,
|
|
159
|
+
getActive: A
|
|
160
|
+
}) {
|
|
161
|
+
const h = b * Math.PI / 180, p = t, $ = t * l, x = [];
|
|
162
|
+
for (let m = 0; m < r; m += 1) {
|
|
163
|
+
const f = (m / r * 360 + v) * Math.PI / 180, z = a + p * Math.cos(f), Y = o + p * Math.sin(f), B = a + $ * Math.cos(f), H = o + $ * Math.sin(f), V = [z - a, Y - o, 0], q = [B - a, H - o, 0], [oe, Le, Z] = Q(V, h), [ye, ke, J] = Q(q, h), [se, yt, , kt] = ee([oe, Le, Z], y), [ft, gt, , ba] = ee([ye, ke, J], y), pt = a + se, mt = o + yt, wt = a + ft, bt = o + gt, xt = (Math.max(Z, J) - -p * Math.sin(h)) / (2 * p * Math.sin(h) || 1), Mt = A ? A(m) : !0, Ct = e.value.style.chart.layout.wheel.ticks.gradient.show ? K(M, m * R.value / N.value * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : M, $t = ze(Mt ? Ct : C, xt), St = Math.max(1.25, k * kt * (Math.min(u.value.width, u.value.height) / 360));
|
|
164
|
+
x.push({ i: m, x1: pt, y1: mt, x2: wt, y2: bt, stroke: St, color: $t, z: Math.max(Z, J) });
|
|
165
|
+
}
|
|
166
|
+
return x.sort((m, f) => m.z - f.z), x;
|
|
167
|
+
}
|
|
168
|
+
const Oe = g(() => {
|
|
169
|
+
if (!e.value.layout === "3d") return null;
|
|
170
|
+
const a = N.value, o = e.value.style.chart.layout.wheel.ticks.gradient.show ? K(e.value.style.chart.layout.wheel.ticks.activeColor, 0) : e.value.style.chart.layout.wheel.ticks.activeColor, t = e.value.style.chart.layout.wheel.ticks.inactiveColor, l = e.value.style.chart.layout.wheel.ticks.strokeWidth;
|
|
171
|
+
return at({
|
|
172
|
+
cx: i.value.centerX,
|
|
173
|
+
cy: i.value.centerY,
|
|
174
|
+
radius: i.value.radius,
|
|
175
|
+
innerRatio: e.value.style.chart.layout.wheel.ticks.sizeRatio,
|
|
176
|
+
count: a,
|
|
177
|
+
startDeg: -90,
|
|
178
|
+
axDeg: e.value.style.chart.layout.wheel.tiltAngle3d,
|
|
179
|
+
f: Math.min(u.value.width, u.value.height) * 1.45,
|
|
180
|
+
baseStroke: l,
|
|
181
|
+
activeColor: o,
|
|
182
|
+
inactiveColor: t,
|
|
183
|
+
getActive: (r) => d.value > r * R.value
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
function We({ cx: a, cy: o, r: t, count: l = 180, startDeg: r = -90, axDeg: v = 50, f: b }) {
|
|
187
|
+
const y = v * Math.PI / 180, k = [];
|
|
188
|
+
let M = 0;
|
|
189
|
+
for (let h = 0; h < l; h += 1) {
|
|
190
|
+
const p = (h / l * 360 + r) * Math.PI / 180, $ = [t * Math.cos(p), t * Math.sin(p), 0], [x, m, f] = Q($, y), [z, Y, , B] = ee([x, m, f], b);
|
|
191
|
+
M += B, k.push([a + z, o + Y]);
|
|
192
|
+
}
|
|
193
|
+
let C = `M ${k[0][0]} ${k[0][1]}`;
|
|
194
|
+
for (let h = 1; h < k.length; h += 1)
|
|
195
|
+
C += ` L ${k[h][0]} ${k[h][1]}`;
|
|
196
|
+
C += " Z";
|
|
197
|
+
const A = M / l;
|
|
198
|
+
return { d: C, avgScale: A, pts: k };
|
|
199
|
+
}
|
|
200
|
+
const X = g(() => {
|
|
201
|
+
if (e.value.layout !== "3d") return null;
|
|
202
|
+
const a = Math.min(u.value.width, u.value.height) * 1.45, o = e.value.style.chart.layout.wheel.tiltAngle3d, t = i.value.radius, { pts: l, avgScale: r } = (() => {
|
|
203
|
+
const $ = t, x = o, { avgScale: m, pts: f } = We({
|
|
204
|
+
cx: i.value.centerX,
|
|
205
|
+
cy: i.value.centerY,
|
|
206
|
+
r: $,
|
|
207
|
+
startDeg: -90,
|
|
208
|
+
axDeg: x,
|
|
209
|
+
f: a
|
|
210
|
+
});
|
|
211
|
+
return { pts: f, avgScale: m };
|
|
212
|
+
})();
|
|
213
|
+
let v = 1 / 0, b = 1 / 0, y = -1 / 0, k = -1 / 0;
|
|
214
|
+
for (const [$, x] of l)
|
|
215
|
+
$ < v && (v = $), x < b && (b = x), $ > y && (y = $), x > k && (k = x);
|
|
216
|
+
const M = e.value.style.chart.layout.wheel.ticks.strokeWidth / 360 * Math.min(u.value.width, u.value.height), C = e.value.style.chart.layout.innerCircle.strokeWidth || 0, A = 0.5 * Math.max(M, C * (r || 1)), h = Math.max(0, Number(e.value.style.chart.layout.wheel.ticks.depth3d) || 0), p = A;
|
|
217
|
+
return {
|
|
218
|
+
x: v - p,
|
|
219
|
+
y: b - h - p,
|
|
220
|
+
w: y - v + 2 * p,
|
|
221
|
+
h: k - (b - h) + 2 * p
|
|
222
|
+
};
|
|
223
|
+
});
|
|
224
|
+
function lt(a) {
|
|
225
|
+
const o = Math.min(u.value.width, u.value.height) * 1.45, { d: t, avgScale: l } = We({
|
|
226
|
+
cx: i.value.centerX,
|
|
227
|
+
cy: i.value.centerY,
|
|
228
|
+
r: a,
|
|
229
|
+
startDeg: -90,
|
|
230
|
+
axDeg: e.value.style.chart.layout.wheel.tiltAngle3d,
|
|
231
|
+
f: o
|
|
232
|
+
}), v = (e.value.style.chart.layout.innerCircle.strokeWidth || 1) * l;
|
|
233
|
+
return {
|
|
234
|
+
d: t,
|
|
235
|
+
stroke: e.value.style.chart.layout.innerCircle.stroke,
|
|
236
|
+
strokeWidth: v
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
const Te = g(() => lt(Math.max(0, i.value.radius * 0.8 * e.value.style.chart.layout.innerCircle.radiusRatio)));
|
|
240
|
+
function te({ cx: a, cy: o, r: t, aRad: l, ax: r, f: v }) {
|
|
241
|
+
const b = [t * Math.cos(l), t * Math.sin(l), 0], [y, k, M] = Q(b, r), [C, A, , h] = ee([y, k, M], v);
|
|
242
|
+
return { x: a + C, y: o + A, z: M, s: h };
|
|
243
|
+
}
|
|
244
|
+
function ot({
|
|
245
|
+
cx: a,
|
|
246
|
+
cy: o,
|
|
247
|
+
radius: t,
|
|
248
|
+
innerRatio: l = 0.8,
|
|
249
|
+
count: r = 120,
|
|
250
|
+
startDeg: v = -87,
|
|
251
|
+
axDeg: b = 45,
|
|
252
|
+
f: y = 600,
|
|
253
|
+
activeColor: k,
|
|
254
|
+
inactiveColor: M,
|
|
255
|
+
getActive: C,
|
|
256
|
+
Y: A = 0
|
|
257
|
+
}) {
|
|
258
|
+
const h = b * Math.PI / 180, p = t, $ = t * l, x = 2 * Math.PI / r, m = [];
|
|
259
|
+
for (let f = 0; f < r; f += 1) {
|
|
260
|
+
const z = v * Math.PI / 180 + x * f, Y = z + x * Math.min(1, e.value.style.chart.layout.wheel.ticks.spacingRatio3d), B = te({ cx: a, cy: o + A, r: p, aRad: z, ax: h, f: y }), H = te({ cx: a, cy: o + A, r: p, aRad: Y, ax: h, f: y }), V = te({ cx: a, cy: o + A, r: $, aRad: Y, ax: h, f: y }), q = te({ cx: a, cy: o + A, r: $, aRad: z, ax: h, f: y }), oe = (B.z + H.z + q.z + V.z) / 4, Z = (C ? C(f) : !0) ? e.value.style.chart.layout.wheel.ticks.gradient.show ? K(
|
|
261
|
+
e.value.style.chart.layout.wheel.ticks.activeColor,
|
|
262
|
+
f * (100 / r) / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)
|
|
263
|
+
) : k : M, ye = (() => {
|
|
264
|
+
const se = p * Math.sin(h) || 1;
|
|
265
|
+
return (oe - -se) / (2 * se);
|
|
266
|
+
})(), ke = ze(Z, ye), J = `M ${B.x} ${B.y} L ${H.x} ${H.y} L ${V.x} ${V.y} L ${q.x} ${q.y} Z`;
|
|
267
|
+
m.push({ i: f, d: J, fill: ke, z: oe });
|
|
268
|
+
}
|
|
269
|
+
return m.sort((f, z) => f.z - z.z), m;
|
|
270
|
+
}
|
|
271
|
+
const ve = g(() => {
|
|
272
|
+
if (e.value.layout !== "3d") return null;
|
|
273
|
+
const a = N.value;
|
|
274
|
+
return (o) => ot({
|
|
275
|
+
cx: i.value.centerX,
|
|
276
|
+
cy: i.value.centerY,
|
|
277
|
+
radius: i.value.radius,
|
|
278
|
+
innerRatio: e.value.style.chart.layout.wheel.ticks.sizeRatio,
|
|
279
|
+
count: a,
|
|
280
|
+
startDeg: -90,
|
|
281
|
+
axDeg: e.value.style.chart.layout.wheel.tiltAngle3d,
|
|
282
|
+
f: Math.min(u.value.width, u.value.height) * 1.45,
|
|
283
|
+
activeColor: e.value.style.chart.layout.wheel.ticks.activeColor,
|
|
284
|
+
inactiveColor: e.value.style.chart.layout.wheel.ticks.inactiveColor,
|
|
285
|
+
getActive: (t) => d.value > t * (100 / a),
|
|
286
|
+
Y: o
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
function De(a) {
|
|
290
|
+
let o = e.value.style.chart.animation.speed;
|
|
291
|
+
const t = Math.abs(a - d.value) / (o * 120);
|
|
292
|
+
function l() {
|
|
293
|
+
d.value < a ? d.value = Math.min(d.value + t, a) : d.value > a && (d.value = Math.max(d.value - t, a)), d.value !== a && requestAnimationFrame(l);
|
|
294
|
+
}
|
|
295
|
+
l();
|
|
296
|
+
}
|
|
297
|
+
const N = g(() => (e.value.debug && e.value.style.chart.layout.wheel.ticks.quantity < 12 && console.warn("VueUiWheel - The min number of ticks is 12"), e.value.debug && e.value.style.chart.layout.wheel.ticks.quantity > 200 && console.warn("VueUiWheel - The max number of ticks is 200"), Math.max(12, Math.min(e.value.style.chart.layout.wheel.ticks.quantity, 200)))), R = g(() => 100 / N.value), Fe = g(() => {
|
|
298
|
+
const a = [];
|
|
299
|
+
for (let o = 0; o < N.value; o += 1) {
|
|
300
|
+
const t = d.value > o * R.value ? e.value.style.chart.layout.wheel.ticks.activeColor : e.value.style.chart.layout.wheel.ticks.inactiveColor, { x: l, y: r } = Re(u.value.size / N.value * o), { x: v, y: b } = Re(u.value.size / N.value * o, e.value.style.chart.layout.wheel.ticks.sizeRatio);
|
|
301
|
+
a.push({
|
|
302
|
+
x1: l,
|
|
303
|
+
y1: r,
|
|
304
|
+
x2: v,
|
|
305
|
+
y2: b,
|
|
306
|
+
color: e.value.style.chart.layout.wheel.ticks.gradient.show ? K(t, o * R.value / N.value * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : t
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
return a;
|
|
310
|
+
}), st = g(() => Nt({ series: Fe.value.map((a) => ({
|
|
311
|
+
name: "",
|
|
312
|
+
value: 1,
|
|
313
|
+
color: a.color
|
|
314
|
+
})) }, i.value.centerX, i.value.centerY, i.value.radius, i.value.radius, 1.99999, 2, 1, 360, 105.25, i.value.radius * (1 - e.value.style.chart.layout.wheel.ticks.sizeRatio))), ae = S(!1);
|
|
315
|
+
function Xe(a) {
|
|
316
|
+
ae.value = a, pe.value += 1;
|
|
317
|
+
}
|
|
318
|
+
const le = S(!1);
|
|
319
|
+
function de() {
|
|
320
|
+
le.value = !le.value;
|
|
321
|
+
}
|
|
322
|
+
async function nt({ scale: a = 2 } = {}) {
|
|
323
|
+
if (!U.value) return;
|
|
324
|
+
const { width: o, height: t } = U.value.getBoundingClientRect(), l = o / t, { imageUri: r, base64: v } = await Kt({ domElement: U.value, base64: !0, img: !0, scale: a });
|
|
325
|
+
return {
|
|
326
|
+
imageUri: r,
|
|
327
|
+
base64: v,
|
|
328
|
+
title: e.value.style.chart.title.text,
|
|
329
|
+
width: o,
|
|
330
|
+
height: t,
|
|
331
|
+
aspectRatio: l
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
const ut = g(() => e.value.style.chart.layout.wheel.ticks.strokeWidth * 2), rt = g(() => e.value.style.chart.layout.wheel.ticks.strokeWidth * 2 * 0.75), it = g(() => e.value.style.chart.layout.wheel.ticks.strokeWidth), j = g(() => Math.max(1, Math.min(20, e.value.style.chart.layout.wheel.ticks.depth3d))), ct = g(() => e.value.style.chart.backgroundColor), ht = g(() => e.value.style.chart.title), { exportSvg: vt, getSvg: dt } = qt({
|
|
335
|
+
svg: ce,
|
|
336
|
+
title: ht,
|
|
337
|
+
backgroundColor: ct,
|
|
338
|
+
stretchTitle: !0
|
|
339
|
+
});
|
|
340
|
+
async function Ne({ isCb: a }) {
|
|
341
|
+
if (a) {
|
|
342
|
+
const { blob: o, url: t, text: l, dataUrl: r } = await dt();
|
|
343
|
+
e.value.userOptions.callbacks.svg({ blob: o, url: t, text: l, dataUrl: r });
|
|
344
|
+
} else
|
|
345
|
+
vt();
|
|
346
|
+
}
|
|
347
|
+
return He({
|
|
348
|
+
getImage: nt,
|
|
349
|
+
generatePdf: Ie,
|
|
350
|
+
generateImage: _e,
|
|
351
|
+
generateSvg: Ne,
|
|
352
|
+
toggleAnnotator: de,
|
|
353
|
+
toggleFullscreen: Xe
|
|
354
|
+
}), (a, o) => (s(), n("div", {
|
|
355
|
+
class: O(["vue-ui-wheel", { "vue-data-ui-component": !0, "vue-ui-wheel-3d-wrap": e.value.layout === "3d" }]),
|
|
356
|
+
ref_key: "wheelChart",
|
|
357
|
+
ref: U,
|
|
358
|
+
id: ue.value,
|
|
359
|
+
style: ge(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
|
|
360
|
+
onMouseenter: o[0] || (o[0] = () => c(Ce)(!0)),
|
|
361
|
+
onMouseleave: o[1] || (o[1] = () => c(Ce)(!1))
|
|
362
|
+
}, [
|
|
363
|
+
e.value.userOptions.buttons.annotator ? (s(), ne(c(Ve), {
|
|
364
|
+
key: 0,
|
|
365
|
+
svgRef: c(ce),
|
|
366
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
367
|
+
color: e.value.style.chart.color,
|
|
368
|
+
active: le.value,
|
|
369
|
+
onClose: de
|
|
370
|
+
}, {
|
|
371
|
+
"annotator-action-close": I(() => [
|
|
372
|
+
w(a.$slots, "annotator-action-close", {}, void 0, !0)
|
|
373
|
+
]),
|
|
374
|
+
"annotator-action-color": I(({ color: t }) => [
|
|
375
|
+
w(a.$slots, "annotator-action-color", W(T({ color: t })), void 0, !0)
|
|
376
|
+
]),
|
|
377
|
+
"annotator-action-draw": I(({ mode: t }) => [
|
|
378
|
+
w(a.$slots, "annotator-action-draw", W(T({ mode: t })), void 0, !0)
|
|
379
|
+
]),
|
|
380
|
+
"annotator-action-undo": I(({ disabled: t }) => [
|
|
381
|
+
w(a.$slots, "annotator-action-undo", W(T({ disabled: t })), void 0, !0)
|
|
382
|
+
]),
|
|
383
|
+
"annotator-action-redo": I(({ disabled: t }) => [
|
|
384
|
+
w(a.$slots, "annotator-action-redo", W(T({ disabled: t })), void 0, !0)
|
|
385
|
+
]),
|
|
386
|
+
"annotator-action-delete": I(({ disabled: t }) => [
|
|
387
|
+
w(a.$slots, "annotator-action-delete", W(T({ disabled: t })), void 0, !0)
|
|
388
|
+
]),
|
|
389
|
+
_: 3
|
|
390
|
+
}, 8, ["svgRef", "backgroundColor", "color", "active"])) : P("", !0),
|
|
391
|
+
et.value ? (s(), n("div", {
|
|
392
|
+
key: 1,
|
|
393
|
+
ref_key: "noTitle",
|
|
394
|
+
ref: be,
|
|
395
|
+
class: "vue-data-ui-no-title-space",
|
|
396
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
397
|
+
}, null, 512)) : P("", !0),
|
|
398
|
+
e.value.style.chart.title.text ? (s(), n("div", {
|
|
399
|
+
key: 2,
|
|
400
|
+
ref_key: "chartTitle",
|
|
401
|
+
ref: me,
|
|
402
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
403
|
+
}, [
|
|
404
|
+
(s(), ne(Qt, {
|
|
405
|
+
key: `title_${xe.value}`,
|
|
406
|
+
config: {
|
|
407
|
+
title: {
|
|
408
|
+
cy: "wheel-title",
|
|
409
|
+
...e.value.style.chart.title
|
|
410
|
+
},
|
|
411
|
+
subtitle: {
|
|
412
|
+
cy: "wheel-subtitle",
|
|
413
|
+
...e.value.style.chart.title.subtitle
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}, null, 8, ["config"]))
|
|
417
|
+
], 512)) : P("", !0),
|
|
418
|
+
e.value.userOptions.show && Ke.value && (c($e) || c(ie)) ? (s(), ne(c(qe), {
|
|
419
|
+
ref_key: "details",
|
|
420
|
+
ref: Qe,
|
|
421
|
+
key: `user_options_${pe.value}`,
|
|
422
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
423
|
+
color: e.value.style.chart.color,
|
|
424
|
+
isPrinting: c(Se),
|
|
425
|
+
isImaging: c(Ae),
|
|
426
|
+
uid: ue.value,
|
|
427
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
428
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
429
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
430
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
431
|
+
hasXls: !1,
|
|
432
|
+
isFullscreen: ae.value,
|
|
433
|
+
position: e.value.userOptions.position,
|
|
434
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
435
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
436
|
+
isAnnotation: le.value,
|
|
437
|
+
chartElement: U.value,
|
|
438
|
+
callbacks: e.value.userOptions.callbacks,
|
|
439
|
+
printScale: e.value.userOptions.print.scale,
|
|
440
|
+
onToggleFullscreen: Xe,
|
|
441
|
+
onGeneratePdf: c(Ie),
|
|
442
|
+
onGenerateImage: c(_e),
|
|
443
|
+
onGenerateSvg: Ne,
|
|
444
|
+
onToggleAnnotator: de,
|
|
445
|
+
style: ge({
|
|
446
|
+
visibility: c($e) ? c(ie) ? "visible" : "hidden" : "visible"
|
|
447
|
+
})
|
|
448
|
+
}, Pt({ _: 2 }, [
|
|
449
|
+
a.$slots.menuIcon ? {
|
|
450
|
+
name: "menuIcon",
|
|
451
|
+
fn: I(({ isOpen: t, color: l }) => [
|
|
452
|
+
w(a.$slots, "menuIcon", W(T({ isOpen: t, color: l })), void 0, !0)
|
|
453
|
+
]),
|
|
454
|
+
key: "0"
|
|
455
|
+
} : void 0,
|
|
456
|
+
a.$slots.optionPdf ? {
|
|
457
|
+
name: "optionPdf",
|
|
458
|
+
fn: I(() => [
|
|
459
|
+
w(a.$slots, "optionPdf", {}, void 0, !0)
|
|
460
|
+
]),
|
|
461
|
+
key: "1"
|
|
462
|
+
} : void 0,
|
|
463
|
+
a.$slots.optionImg ? {
|
|
464
|
+
name: "optionImg",
|
|
465
|
+
fn: I(() => [
|
|
466
|
+
w(a.$slots, "optionImg", {}, void 0, !0)
|
|
467
|
+
]),
|
|
468
|
+
key: "2"
|
|
469
|
+
} : void 0,
|
|
470
|
+
a.$slots.optionSvg ? {
|
|
471
|
+
name: "optionSvg",
|
|
472
|
+
fn: I(() => [
|
|
473
|
+
w(a.$slots, "optionSvg", {}, void 0, !0)
|
|
474
|
+
]),
|
|
475
|
+
key: "3"
|
|
476
|
+
} : void 0,
|
|
477
|
+
a.$slots.optionFullscreen ? {
|
|
478
|
+
name: "optionFullscreen",
|
|
479
|
+
fn: I(({ toggleFullscreen: t, isFullscreen: l }) => [
|
|
480
|
+
w(a.$slots, "optionFullscreen", W(T({ toggleFullscreen: t, isFullscreen: l })), void 0, !0)
|
|
481
|
+
]),
|
|
482
|
+
key: "4"
|
|
483
|
+
} : void 0,
|
|
484
|
+
a.$slots.optionAnnotator ? {
|
|
485
|
+
name: "optionAnnotator",
|
|
486
|
+
fn: I(({ toggleAnnotator: t, isAnnotator: l }) => [
|
|
487
|
+
w(a.$slots, "optionAnnotator", W(T({ toggleAnnotator: t, isAnnotator: l })), void 0, !0)
|
|
488
|
+
]),
|
|
489
|
+
key: "5"
|
|
490
|
+
} : void 0
|
|
491
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasSvg", "hasFullscreen", "isFullscreen", "position", "titles", "hasAnnotator", "isAnnotation", "chartElement", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : P("", !0),
|
|
492
|
+
(s(), n("svg", {
|
|
493
|
+
ref_key: "svgRef",
|
|
494
|
+
ref: ce,
|
|
495
|
+
xmlns: c(Lt),
|
|
496
|
+
class: O({ "vue-data-ui-fullscreen--on": ae.value, "vue-data-ui-fulscreen--off": !ae.value, "vue-ui-wheel-3d-svg": e.value.layout === "3d" }),
|
|
497
|
+
viewBox: e.value.layout === "3d" && !e.value.responsive ? `${X.value?.x - 10} ${X.value?.y ?? 0} ${X.value?.w + 20} ${X.value?.h ?? Math.max(10, u.value.height)}` : `0 0 ${Math.max(10, u.value.width)} ${Math.max(10, u.value.height)}`,
|
|
498
|
+
style: ge(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
499
|
+
}, [
|
|
500
|
+
zt(c(Ze)),
|
|
501
|
+
a.$slots["chart-background"] ? (s(), n("foreignObject", {
|
|
502
|
+
key: 0,
|
|
503
|
+
x: e.value.layout === "3d" && !e.value.responsive ? X.value?.x - 10 : 0,
|
|
504
|
+
y: e.value.layout === "3d" && !e.value.responsive ? X.value?.y ?? 0 : 0,
|
|
505
|
+
width: e.value.layout === "3d" && !e.value.responsive ? X.value?.w + 20 : Math.max(10, u.value.width),
|
|
506
|
+
height: e.value.layout === "3d" && !e.value.responsive ? X.value?.h ?? Math.max(10, u.value.height) : Math.max(10, u.value.height),
|
|
507
|
+
style: {
|
|
508
|
+
pointerEvents: "none"
|
|
509
|
+
}
|
|
510
|
+
}, [
|
|
511
|
+
w(a.$slots, "chart-background", {}, void 0, !0)
|
|
512
|
+
], 8, oa)) : P("", !0),
|
|
513
|
+
e.value.layout === "3d" && Te.value ? (s(), n("path", {
|
|
514
|
+
key: 1,
|
|
515
|
+
class: "vue-ui-wheel-inner-circle",
|
|
516
|
+
d: Te.value.d,
|
|
517
|
+
stroke: e.value.style.chart.layout.innerCircle.stroke,
|
|
518
|
+
"stroke-width": e.value.style.chart.layout.innerCircle.strokeWidth,
|
|
519
|
+
fill: "none"
|
|
520
|
+
}, null, 8, sa)) : e.value.style.chart.layout.innerCircle.show ? (s(), n("circle", {
|
|
521
|
+
key: 2,
|
|
522
|
+
class: "vue-ui-wheel-inner-circle",
|
|
523
|
+
cx: i.value.centerX,
|
|
524
|
+
cy: i.value.centerY,
|
|
525
|
+
r: Math.max(0, i.value.radius * e.value.style.chart.layout.innerCircle.radiusRatio * 0.8),
|
|
526
|
+
stroke: e.value.style.chart.layout.innerCircle.stroke,
|
|
527
|
+
"stroke-width": e.value.style.chart.layout.innerCircle.strokeWidth,
|
|
528
|
+
fill: "none"
|
|
529
|
+
}, null, 8, na)) : P("", !0),
|
|
530
|
+
e.value.layout === "3d" ? (s(), n(_, { key: 3 }, [
|
|
531
|
+
e.value.style.chart.layout.wheel.ticks.type === "classic" ? (s(), n("g", ua, [
|
|
532
|
+
(s(!0), n(_, null, D(j.value, (t) => (s(), n("g", null, [
|
|
533
|
+
(s(!0), n(_, null, D(Oe.value || [], (l) => (s(), n("line", {
|
|
534
|
+
key: l.i,
|
|
535
|
+
x1: l.x1,
|
|
536
|
+
y1: l.y1 - t,
|
|
537
|
+
x2: l.x2,
|
|
538
|
+
y2: l.y2 - t,
|
|
539
|
+
stroke: c(Ee)(l.color, 0.25 * t / 5),
|
|
540
|
+
"stroke-width": e.value.style.chart.layout.wheel.ticks.strokeWidth / 360 * Math.min(u.value.width, u.value.height),
|
|
541
|
+
"stroke-linecap": e.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt",
|
|
542
|
+
class: O({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated": e.value.style.chart.animation.use && l.i * R.value <= d.value })
|
|
543
|
+
}, null, 10, ra))), 128))
|
|
544
|
+
]))), 256)),
|
|
545
|
+
(s(!0), n(_, null, D(Oe.value || [], (t) => (s(), n("line", {
|
|
546
|
+
key: t.i,
|
|
547
|
+
x1: t.x1,
|
|
548
|
+
y1: t.y1 - j.value,
|
|
549
|
+
x2: t.x2,
|
|
550
|
+
y2: t.y2 - j.value,
|
|
551
|
+
stroke: t.color,
|
|
552
|
+
"stroke-width": e.value.style.chart.layout.wheel.ticks.strokeWidth / 360 * Math.min(u.value.width, u.value.height),
|
|
553
|
+
"stroke-linecap": e.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt",
|
|
554
|
+
class: O({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated": e.value.style.chart.animation.use && t.i * R.value <= d.value })
|
|
555
|
+
}, null, 10, ia))), 128))
|
|
556
|
+
])) : (s(), n("g", ca, [
|
|
557
|
+
(s(!0), n(_, null, D(j.value, (t) => (s(), n("g", null, [
|
|
558
|
+
(s(!0), n(_, null, D(ve.value(-t) || [], (l) => (s(), n("path", {
|
|
559
|
+
key: l.i,
|
|
560
|
+
d: l.d,
|
|
561
|
+
fill: e.value.style.chart.layout.wheel.ticks.inactiveColor,
|
|
562
|
+
stroke: e.value.style.chart.layout.wheel.ticks.stroke,
|
|
563
|
+
"stroke-width": e.value.style.chart.layout.wheel.ticks.strokeWidth,
|
|
564
|
+
"stroke-linecap": "round",
|
|
565
|
+
"stroke-linejoin": "round",
|
|
566
|
+
class: "vue-ui-wheel-tick"
|
|
567
|
+
}, null, 8, ha))), 128)),
|
|
568
|
+
(s(!0), n(_, null, D(ve.value(-t) || [], (l) => (s(), n("path", {
|
|
569
|
+
key: l.i,
|
|
570
|
+
d: l.d,
|
|
571
|
+
fill: c(Ee)(l.fill, 0.5 * t / j.value),
|
|
572
|
+
stroke: e.value.style.chart.layout.wheel.ticks.stroke,
|
|
573
|
+
"stroke-width": e.value.style.chart.layout.wheel.ticks.strokeWidth,
|
|
574
|
+
"stroke-linecap": "round",
|
|
575
|
+
"stroke-linejoin": "round",
|
|
576
|
+
class: O({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated-3d": e.value.style.chart.animation.use && l.i * R.value <= d.value })
|
|
577
|
+
}, null, 10, va))), 128))
|
|
578
|
+
]))), 256)),
|
|
579
|
+
Ot("g", null, [
|
|
580
|
+
(s(!0), n(_, null, D(ve.value(-j.value) || [], (t) => (s(), n("path", {
|
|
581
|
+
key: t.i,
|
|
582
|
+
d: t.d,
|
|
583
|
+
fill: t.fill,
|
|
584
|
+
stroke: e.value.style.chart.layout.wheel.ticks.stroke,
|
|
585
|
+
"stroke-width": e.value.style.chart.layout.wheel.ticks.strokeWidth,
|
|
586
|
+
"stroke-linecap": "round",
|
|
587
|
+
"stroke-linejoin": "round",
|
|
588
|
+
class: O({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated-3d": e.value.style.chart.animation.use && t.i * R.value <= d.value })
|
|
589
|
+
}, null, 10, da))), 128))
|
|
590
|
+
])
|
|
591
|
+
]))
|
|
592
|
+
], 64)) : (s(), n(_, { key: 4 }, [
|
|
593
|
+
e.value.style.chart.layout.wheel.ticks.type === "classic" ? (s(!0), n(_, { key: 0 }, D(Fe.value, (t, l) => (s(), n("line", {
|
|
594
|
+
x1: t.x1,
|
|
595
|
+
x2: t.x2,
|
|
596
|
+
y1: t.y1,
|
|
597
|
+
y2: t.y2,
|
|
598
|
+
stroke: t.color,
|
|
599
|
+
"stroke-width": e.value.style.chart.layout.wheel.ticks.strokeWidth / 360 * Math.min(u.value.width, u.value.height),
|
|
600
|
+
"stroke-linecap": e.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt",
|
|
601
|
+
class: O({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated": e.value.style.chart.animation.use && l * R.value <= d.value })
|
|
602
|
+
}, null, 10, ya))), 256)) : (s(!0), n(_, { key: 1 }, D(st.value, (t, l) => (s(), n("path", {
|
|
603
|
+
d: t.arcSlice,
|
|
604
|
+
fill: t.color,
|
|
605
|
+
class: O({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated": e.value.style.chart.animation.use && l * R.value <= d.value }),
|
|
606
|
+
stroke: e.value.style.chart.layout.wheel.ticks.stroke,
|
|
607
|
+
"stroke-width": e.value.style.chart.layout.wheel.ticks.strokeWidth
|
|
608
|
+
}, null, 10, ka))), 256))
|
|
609
|
+
], 64)),
|
|
610
|
+
e.value.style.chart.layout.percentage.show ? (s(), n("g", fa, [
|
|
611
|
+
c(Me) ? (s(), n("rect", {
|
|
612
|
+
key: 0,
|
|
613
|
+
x: i.value.centerX - 40,
|
|
614
|
+
y: i.value.centerY - G.value / 2,
|
|
615
|
+
width: 80,
|
|
616
|
+
height: G.value,
|
|
617
|
+
fill: "#6A6A6A80",
|
|
618
|
+
rx: "3"
|
|
619
|
+
}, null, 8, ga)) : (s(), n("text", {
|
|
620
|
+
key: 1,
|
|
621
|
+
x: i.value.centerX + e.value.style.chart.layout.percentage.offsetX,
|
|
622
|
+
y: i.value.centerY + G.value / 3 + e.value.style.chart.layout.percentage.offsetY,
|
|
623
|
+
"font-size": G.value,
|
|
624
|
+
fill: e.value.style.chart.layout.wheel.ticks.gradient.show ? c(K)(e.value.style.chart.layout.wheel.ticks.activeColor, d.value / 100 * (e.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.wheel.ticks.activeColor,
|
|
625
|
+
"text-anchor": "middle",
|
|
626
|
+
"font-weight": e.value.style.chart.layout.percentage.bold ? "bold" : "normal",
|
|
627
|
+
style: { "font-variant-numeric": "tabluar-nums" },
|
|
628
|
+
stroke: e.value.style.chart.layout.percentage.stroke,
|
|
629
|
+
"stroke-width": e.value.style.chart.layout.percentage.strokeWidth,
|
|
630
|
+
"stroke-linecap": "round",
|
|
631
|
+
"stroke-linejoin": "round",
|
|
632
|
+
"paint-order": "stroke fill",
|
|
633
|
+
class: O({ "vue-ui-wheel-label": e.value.layout === "3d" })
|
|
634
|
+
}, Wt(c(Ut)(
|
|
635
|
+
e.value.style.chart.layout.percentage.formatter,
|
|
636
|
+
c(je)(d.value),
|
|
637
|
+
c(Bt)({
|
|
638
|
+
v: c(je)(d.value),
|
|
639
|
+
s: "%",
|
|
640
|
+
r: e.value.style.chart.layout.percentage.rounding
|
|
641
|
+
})
|
|
642
|
+
)), 11, pa))
|
|
643
|
+
])) : P("", !0),
|
|
644
|
+
w(a.$slots, "svg", { svg: u.value }, void 0, !0)
|
|
645
|
+
], 14, la)),
|
|
646
|
+
a.$slots.watermark ? (s(), n("div", ma, [
|
|
647
|
+
w(a.$slots, "watermark", W(T({ isPrinting: c(Se) || c(Ae) })), void 0, !0)
|
|
648
|
+
])) : P("", !0),
|
|
649
|
+
a.$slots.source ? (s(), n("div", {
|
|
650
|
+
key: 5,
|
|
651
|
+
ref_key: "source",
|
|
652
|
+
ref: we,
|
|
653
|
+
dir: "auto"
|
|
654
|
+
}, [
|
|
655
|
+
w(a.$slots, "source", {}, void 0, !0)
|
|
656
|
+
], 512)) : P("", !0),
|
|
657
|
+
c(Me) ? (s(), ne(Ht, { key: 6 })) : P("", !0)
|
|
658
|
+
], 46, aa));
|
|
659
|
+
}
|
|
660
|
+
}, Da = /* @__PURE__ */ ta(wa, [["__scopeId", "data-v-8521c072"]]);
|
|
661
|
+
export {
|
|
662
|
+
Da as default
|
|
663
|
+
};
|