vue-data-ui 3.0.0-next.9 → 3.0.1
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-DQoWnUfD.js} +1 -1
- package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-DEw6oieL.js} +4 -4
- package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-DEl03NUZ.js} +1 -1
- package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-CrivFZqC.js} +2 -2
- package/dist/{DataTable--paavNqF.js → DataTable-ClgCsiJA.js} +2 -2
- package/dist/{Legend-BZ06qU55.js → Legend-CMvJ6X5j.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-B2Wvbl3p.js} +3 -3
- package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CD5VH_Al.js} +3 -3
- package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3WRn-G2.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-Adi9i_-f.js} +43 -37
- package/dist/Slicer-t6e1t2iM.js +602 -0
- package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-B8OnBSvk.js} +7 -7
- package/dist/{Title-B2dA6-uH.js → Title-xTWR-Vil.js} +1 -1
- package/dist/{Tooltip-O_hCvqgF.js → Tooltip-BH3CiANh.js} +23 -19
- package/dist/{UserOptions-Bk03FRqW.js → UserOptions-CKKPgDLV.js} +2 -2
- package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-C4hj491O.js} +1 -1
- package/dist/{img-C_9wps3s.js → img-Vb4QHAHI.js} +1 -1
- package/dist/{index-CgShIRes.js → index-Dzc2Gi60.js} +2885 -2010
- package/dist/{pdf-CXdbjyRJ.js → pdf-ddpqw-dt.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-CN_Jh8Hr.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-CjnS13nF.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DBRh8ZvS.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-B7ztqj9-.js} +105 -100
- package/dist/vue-data-ui.js +26 -25
- package/dist/vue-ui-3d-bar-DUmYPtHl.js +1323 -0
- package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-CPk8wAuj.js} +3 -3
- package/dist/vue-ui-age-pyramid-Bv5HmeXj.js +835 -0
- package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-KXWlIhtd.js} +12 -12
- package/dist/vue-ui-bullet-B4N4mBk9.js +571 -0
- package/dist/vue-ui-candlestick-DENvPnUO.js +1000 -0
- package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-vC2bHBaY.js} +29 -29
- package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-2nS0StrY.js} +664 -536
- package/dist/vue-ui-chord-CyfS6vNM.js +1038 -0
- package/dist/vue-ui-circle-pack-C4JR-0fx.js +709 -0
- package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-BgeSDtQh.js} +2 -2
- package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-9DWUBJ-I.js} +64 -64
- package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-BQO7IBFA.js} +2 -2
- package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-C-ZJXJ74.js} +431 -422
- package/dist/vue-ui-donut-evolution-B870IrQA.js +1076 -0
- package/dist/vue-ui-dumbbell-Cfs2Uotx.js +1120 -0
- package/dist/vue-ui-flow-DnaUVVAD.js +841 -0
- package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-B9s-H5ZG.js} +16 -16
- package/dist/vue-ui-galaxy-BoJOczdh.js +680 -0
- package/dist/vue-ui-gauge-qjm4BqZR.js +791 -0
- package/dist/vue-ui-gizmo-fn7ZaMTI.js +210 -0
- package/dist/vue-ui-heatmap-CIBDKhh8.js +1078 -0
- package/dist/vue-ui-history-plot-bbNxldYG.js +1074 -0
- package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-BX-2jhLx.js} +26 -26
- package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-Bn1Bb8-J.js} +2 -2
- package/dist/vue-ui-molecule-DQ3qFtBq.js +656 -0
- package/dist/vue-ui-mood-radar-Cf-ehIo1.js +785 -0
- package/dist/vue-ui-nested-donuts-CWg5BEi-.js +1284 -0
- package/dist/vue-ui-onion-sHgQTYfa.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-Ki3ITp_s.js +916 -0
- package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-BIVqW7U7.js} +512 -459
- package/dist/vue-ui-quick-chart-C_hvHc1b.js +1762 -0
- package/dist/vue-ui-radar-RZUPyPwB.js +796 -0
- package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-BI8Vk7dO.js} +2 -2
- package/dist/vue-ui-relation-circle-TVMUEtxK.js +598 -0
- package/dist/vue-ui-ridgeline-DQeXHQG4.js +1157 -0
- package/dist/vue-ui-rings-BH81WmMS.js +728 -0
- package/dist/vue-ui-scatter-Cy7Tz_An.js +1178 -0
- package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-CF50qQxr.js} +13 -13
- package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-CrFXEbJs.js} +46 -46
- package/dist/vue-ui-spark-trend-DtHArnot.js +315 -0
- package/dist/vue-ui-sparkbar-CIOwFFgA.js +351 -0
- package/dist/vue-ui-sparkgauge-E0DdGotz.js +232 -0
- package/dist/vue-ui-sparkhistogram-Dm7WoyjY.js +380 -0
- package/dist/vue-ui-sparkline-DoW6DDKT.js +513 -0
- package/dist/vue-ui-sparkstackbar-BJnPUWY4.js +421 -0
- package/dist/vue-ui-stackbar-Du42smPs.js +1371 -0
- package/dist/vue-ui-strip-plot-DnenGI-d.js +916 -0
- package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BQOQVlHr.js} +17 -17
- package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-BzK4_gsP.js} +5 -5
- package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-B-IwcT8I.js} +19 -16
- package/dist/vue-ui-thermometer-06ao_Pj5.js +541 -0
- package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-CxQq4roK.js} +5 -5
- package/dist/vue-ui-tiremarks-CuTxkByj.js +406 -0
- package/dist/vue-ui-treemap-BgHhRpiV.js +1035 -0
- package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-CAcsUUCo.js} +104 -102
- package/dist/vue-ui-waffle-Ct3Upw3m.js +910 -0
- package/dist/vue-ui-wheel-oz06Kt-p.js +379 -0
- package/dist/vue-ui-word-cloud-BRy7fg4S.js +765 -0
- package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-CTV-YfFN.js} +364 -327
- package/dist/vue-ui-xy-DqCy9dpa.js +3808 -0
- package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-BZdhKUIp.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,406 @@
|
|
|
1
|
+
import { defineAsyncComponent as H, computed as f, ref as v, toRefs as xe, watch as ie, onMounted as Ae, createElementBlock as u, openBlock as r, unref as s, normalizeStyle as j, normalizeClass as X, createBlock as R, createCommentVNode as g, createSlots as Oe, withCtx as O, renderSlot as p, normalizeProps as M, guardReactiveProps as E, createVNode as Pe, Fragment as ce, renderList as ve, toDisplayString as Ie } from "vue";
|
|
2
|
+
import { u as ze, c as Se, t as Fe, b as Te, h as Ne, o as Re, f as Me, x as he, X as Ee, k as Le, i as Ue } from "./index-Dzc2Gi60.js";
|
|
3
|
+
import { t as Be, u as Ge } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as De, B as He } from "./useLoading-D7YHNtLX.js";
|
|
5
|
+
import { u as je } from "./usePrinter-DBRh8ZvS.js";
|
|
6
|
+
import { u as de } from "./useNestedProp-CjnS13nF.js";
|
|
7
|
+
import { u as Xe } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
+
import { u as Ve } from "./useChartAccessibility-9icAAmYg.js";
|
|
9
|
+
import qe from "./Title-xTWR-Vil.js";
|
|
10
|
+
import Ye from "./img-Vb4QHAHI.js";
|
|
11
|
+
import { _ as We } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
const Je = ["id"], Ke = ["xmlns", "viewBox"], Qe = ["width", "height"], Ze = { key: 1 }, et = ["d", "stroke-width", "stroke"], tt = { key: 2 }, at = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], lt = { key: 3 }, ot = ["x", "y", "height"], st = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], nt = {
|
|
13
|
+
key: 4,
|
|
14
|
+
class: "vue-data-ui-watermark"
|
|
15
|
+
}, rt = {
|
|
16
|
+
__name: "vue-ui-tiremarks",
|
|
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(fe, { expose: ye }) {
|
|
32
|
+
const ge = H(() => import("./PenAndPaper-D3WRn-G2.js")), pe = H(() => import("./UserOptions-CKKPgDLV.js")), me = H(() => import("./PackageVersion-CD5VH_Al.js")), { vue_ui_tiremarks: ke } = ze(), w = fe, be = f(() => !!w.dataset && Object.keys(w.dataset).length), L = v(Se()), C = v(null), we = v(null), V = v(null), q = v(null), Y = v(0), W = v(0), $ = v(null), P = v(null), e = v(G()), { loading: J, FINAL_DATASET: U } = De({
|
|
33
|
+
...xe(w),
|
|
34
|
+
FINAL_CONFIG: e,
|
|
35
|
+
prepareConfig: G,
|
|
36
|
+
skeletonDataset: { percentage: 50 },
|
|
37
|
+
skeletonConfig: Fe({
|
|
38
|
+
defaultConfig: e.value,
|
|
39
|
+
userConfig: {
|
|
40
|
+
userOptions: { show: !1 },
|
|
41
|
+
style: {
|
|
42
|
+
chart: {
|
|
43
|
+
backgroundColor: "#99999930",
|
|
44
|
+
animation: { use: !1 },
|
|
45
|
+
layout: {
|
|
46
|
+
activeColor: "#6A6A6A80",
|
|
47
|
+
inactiveColor: "#CACACA80",
|
|
48
|
+
ticks: {
|
|
49
|
+
gradient: { show: !1 }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
}), { userOptionsVisible: B, setUserOptionsVisibility: K, keepUserOptionState: Q } = Xe({ config: e.value }), { svgRef: Z } = Ve({ config: e.value.style.chart.title });
|
|
57
|
+
function G() {
|
|
58
|
+
const t = de({
|
|
59
|
+
userConfig: w.config,
|
|
60
|
+
defaultConfig: ke
|
|
61
|
+
});
|
|
62
|
+
return t.theme ? {
|
|
63
|
+
...de({
|
|
64
|
+
userConfig: Te.vue_ui_tiremarks[t.theme] || w.config,
|
|
65
|
+
defaultConfig: t
|
|
66
|
+
})
|
|
67
|
+
} : t;
|
|
68
|
+
}
|
|
69
|
+
ie(() => w.config, (t) => {
|
|
70
|
+
e.value = G(), B.value = !e.value.userOptions.showOnChartHover, S.value = e.value.style.chart.width, F.value = e.value.style.chart.height, se(), W.value += 1;
|
|
71
|
+
}, { deep: !0 });
|
|
72
|
+
const { isPrinting: ee, isImaging: te, generatePdf: ae, generateImage: le } = je({
|
|
73
|
+
elementId: L.value,
|
|
74
|
+
fileName: e.value.style.chart.title.text || "vue-ui-tiremarks",
|
|
75
|
+
options: e.value.userOptions.print
|
|
76
|
+
}), Ce = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), i = v(e.value.style.chart.animation.use ? 0 : Ne(U.value.percentage));
|
|
77
|
+
ie(() => U.value, (t) => {
|
|
78
|
+
e.value.style.chart.animation.use ? oe(t.percentage) : i.value = t.percentage || 0;
|
|
79
|
+
}, { deep: !0 }), Ae(() => {
|
|
80
|
+
se();
|
|
81
|
+
});
|
|
82
|
+
function oe(t) {
|
|
83
|
+
let l = e.value.style.chart.animation.speed;
|
|
84
|
+
const a = Math.abs(t - i.value) / (l * 120);
|
|
85
|
+
function o() {
|
|
86
|
+
i.value < t ? i.value = Math.min(i.value + a, t) : i.value > t && (i.value = Math.max(i.value - a, t)), i.value !== t && requestAnimationFrame(o);
|
|
87
|
+
}
|
|
88
|
+
o();
|
|
89
|
+
}
|
|
90
|
+
const _e = f(() => !!e.value.debug);
|
|
91
|
+
function se() {
|
|
92
|
+
if (Re(w.dataset) && Me({
|
|
93
|
+
componentName: "VueUiTiremarks",
|
|
94
|
+
type: "dataset",
|
|
95
|
+
debug: _e.value
|
|
96
|
+
}), e.value.responsive) {
|
|
97
|
+
const t = Be(() => {
|
|
98
|
+
const { width: l, height: a } = Ge({
|
|
99
|
+
chart: C.value,
|
|
100
|
+
title: e.value.style.chart.title.text ? V.value : null,
|
|
101
|
+
source: q.value
|
|
102
|
+
});
|
|
103
|
+
requestAnimationFrame(() => {
|
|
104
|
+
S.value = Math.max(0.1, l), F.value = Math.max(0.1, a - 12);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
$.value && (P.value && $.value.unobserve(P.value), $.value.disconnect()), $.value = new ResizeObserver(t), P.value = C.value.parentNode, $.value.observe(P.value);
|
|
108
|
+
}
|
|
109
|
+
oe(U.value.percentage || 0);
|
|
110
|
+
}
|
|
111
|
+
const I = f(() => e.value.style.chart.layout.display === "vertical"), c = f(() => {
|
|
112
|
+
const t = e.value.style.chart.percentage.show, l = {
|
|
113
|
+
top: t ? 48 : 12,
|
|
114
|
+
left: t ? 64 : 16,
|
|
115
|
+
right: t ? 64 : 16,
|
|
116
|
+
bottom: t ? 48 : 12
|
|
117
|
+
};
|
|
118
|
+
return I.value ? {
|
|
119
|
+
top: e.value.style.chart.percentage.verticalPosition === "top" ? l.top : 3,
|
|
120
|
+
left: 3,
|
|
121
|
+
right: 3,
|
|
122
|
+
bottom: e.value.style.chart.percentage.verticalPosition === "bottom" ? l.bottom : 3
|
|
123
|
+
} : {
|
|
124
|
+
top: 0,
|
|
125
|
+
bottom: 0,
|
|
126
|
+
left: e.value.style.chart.percentage.horizontalPosition === "left" ? l.left : 16,
|
|
127
|
+
right: e.value.style.chart.percentage.horizontalPosition === "right" ? l.right : 10
|
|
128
|
+
};
|
|
129
|
+
}), z = f(() => Object.values(c.value).reduce((t, l) => t + l, 0)), S = v(e.value.style.chart.width), F = v(e.value.style.chart.height), n = f(() => ({
|
|
130
|
+
height: F.value,
|
|
131
|
+
width: S.value
|
|
132
|
+
})), ne = f(() => ({
|
|
133
|
+
horizontal: {
|
|
134
|
+
x: y.value.x + (e.value.style.chart.percentage.horizontalPosition === "left" ? 6 : 3),
|
|
135
|
+
y: n.value.height / 2 - y.value.fontSize / 2
|
|
136
|
+
},
|
|
137
|
+
vertical: {
|
|
138
|
+
x: n.value.width / 2 - 20,
|
|
139
|
+
y: y.value.y - y.value.fontSize / 2
|
|
140
|
+
}
|
|
141
|
+
})[e.value.style.chart.layout.display]), h = f(() => I.value ? {
|
|
142
|
+
mark: (n.value.height - z.value) / 100 * 0.5,
|
|
143
|
+
space: (n.value.height - z.value) / 100 * 0.5
|
|
144
|
+
} : {
|
|
145
|
+
mark: (n.value.width - z.value) / 100 * 0.5,
|
|
146
|
+
space: (n.value.width - z.value) / 100 * 0.5
|
|
147
|
+
}), re = f(() => {
|
|
148
|
+
const t = [];
|
|
149
|
+
for (let a = 0; a < 100; a += 1) {
|
|
150
|
+
const o = e.value.style.chart.layout.ticks.gradient.show ? he(e.value.style.chart.layout.activeColor, a / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.activeColor;
|
|
151
|
+
if (I.value) {
|
|
152
|
+
const _ = e.value.style.chart.layout.crescendo ? (100 - a) * (n.value.width - c.value.left - c.value.right) / 100 / 3 : 0, d = c.value.left + 4 + _, m = n.value.width - c.value.right - 4 - _, k = n.value.height - c.value.bottom - a * h.value.mark - a * h.value.space - h.value.mark, b = n.value.height - c.value.bottom - a * h.value.mark - a * h.value.space - h.value.mark, x = (m - d) / e.value.style.chart.layout.curveAngleX, A = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100);
|
|
153
|
+
t.push({
|
|
154
|
+
x1: d,
|
|
155
|
+
x2: m,
|
|
156
|
+
y1: k,
|
|
157
|
+
y2: b,
|
|
158
|
+
curve: `M ${d} ${k} C ${d + x} ${k - A}, ${m - x} ${b - A}, ${m} ${b}`,
|
|
159
|
+
color: o
|
|
160
|
+
});
|
|
161
|
+
} else {
|
|
162
|
+
const _ = e.value.style.chart.layout.crescendo ? (100 - a) * (n.value.height - c.value.top - c.value.bottom) / 100 / 3 : 0, d = c.value.left + a * h.value.mark + a * h.value.space - h.value.mark, m = d, k = c.value.top + 4 + _, b = n.value.height - c.value.bottom - 4 - _, x = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100), A = (b - k) / e.value.style.chart.layout.curveAngleX;
|
|
163
|
+
t.push({
|
|
164
|
+
x1: d,
|
|
165
|
+
x2: m,
|
|
166
|
+
y1: k,
|
|
167
|
+
y2: b,
|
|
168
|
+
curve: `M ${d} ${k} C ${d + x} ${k + A}, ${m + x} ${b - A}, ${m} ${b}`,
|
|
169
|
+
color: o
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return t;
|
|
174
|
+
}), y = f(() => {
|
|
175
|
+
let t, l, a;
|
|
176
|
+
const o = e.value.style.chart.percentage.fontSize / 3;
|
|
177
|
+
return I.value ? e.value.style.chart.percentage.verticalPosition === "top" ? (t = n.value.width / 2, l = c.value.top / 2, a = "middle") : e.value.style.chart.percentage.verticalPosition === "bottom" && (t = n.value.width / 2, l = n.value.height - c.value.bottom / 2 + o, a = "middle") : e.value.style.chart.percentage.horizontalPosition === "left" ? (t = 4, l = n.value.height / 2 + o, a = "start") : e.value.style.chart.percentage.horizontalPosition === "right" && (t = n.value.width - c.value.right + 8, l = n.value.height / 2 + o, a = "start"), {
|
|
178
|
+
x: t,
|
|
179
|
+
y: l,
|
|
180
|
+
textAnchor: a,
|
|
181
|
+
bold: e.value.style.chart.percentage.bold,
|
|
182
|
+
fontSize: e.value.style.chart.percentage.fontSize,
|
|
183
|
+
fill: e.value.style.chart.percentage.color
|
|
184
|
+
};
|
|
185
|
+
}), T = v(!1);
|
|
186
|
+
function ue(t) {
|
|
187
|
+
T.value = t, Y.value += 1;
|
|
188
|
+
}
|
|
189
|
+
const N = v(!1);
|
|
190
|
+
function D() {
|
|
191
|
+
N.value = !N.value;
|
|
192
|
+
}
|
|
193
|
+
async function $e({ scale: t = 2 } = {}) {
|
|
194
|
+
if (!C.value) return;
|
|
195
|
+
const { width: l, height: a } = C.value.getBoundingClientRect(), o = l / a, { imageUri: _, base64: d } = await Ye({ domElement: C.value, base64: !0, img: !0, scale: t });
|
|
196
|
+
return {
|
|
197
|
+
imageUri: _,
|
|
198
|
+
base64: d,
|
|
199
|
+
title: e.value.style.chart.title.text,
|
|
200
|
+
width: l,
|
|
201
|
+
height: a,
|
|
202
|
+
aspectRatio: o
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
return ye({
|
|
206
|
+
getImage: $e,
|
|
207
|
+
generatePdf: ae,
|
|
208
|
+
generateImage: le,
|
|
209
|
+
toggleAnnotator: D,
|
|
210
|
+
toggleFullscreen: ue
|
|
211
|
+
}), (t, l) => (r(), u("div", {
|
|
212
|
+
ref_key: "tiremarksChart",
|
|
213
|
+
ref: C,
|
|
214
|
+
class: X(`vue-ui-tiremarks ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
215
|
+
style: j(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
216
|
+
id: L.value,
|
|
217
|
+
onMouseenter: l[0] || (l[0] = () => s(K)(!0)),
|
|
218
|
+
onMouseleave: l[1] || (l[1] = () => s(K)(!1))
|
|
219
|
+
}, [
|
|
220
|
+
e.value.userOptions.buttons.annotator ? (r(), R(s(ge), {
|
|
221
|
+
key: 0,
|
|
222
|
+
svgRef: s(Z),
|
|
223
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
224
|
+
color: e.value.style.chart.color,
|
|
225
|
+
active: N.value,
|
|
226
|
+
onClose: D
|
|
227
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
|
|
228
|
+
Ce.value ? (r(), u("div", {
|
|
229
|
+
key: 1,
|
|
230
|
+
ref_key: "noTitle",
|
|
231
|
+
ref: we,
|
|
232
|
+
class: "vue-data-ui-no-title-space",
|
|
233
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
234
|
+
}, null, 512)) : g("", !0),
|
|
235
|
+
e.value.style.chart.title.text ? (r(), u("div", {
|
|
236
|
+
key: 2,
|
|
237
|
+
ref_key: "chartTitle",
|
|
238
|
+
ref: V,
|
|
239
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
240
|
+
}, [
|
|
241
|
+
(r(), R(qe, {
|
|
242
|
+
key: `title_${W.value}`,
|
|
243
|
+
config: {
|
|
244
|
+
title: {
|
|
245
|
+
cy: "wheel-title",
|
|
246
|
+
...e.value.style.chart.title
|
|
247
|
+
},
|
|
248
|
+
subtitle: {
|
|
249
|
+
cy: "wheel-subtitle",
|
|
250
|
+
...e.value.style.chart.title.subtitle
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}, null, 8, ["config"]))
|
|
254
|
+
], 512)) : g("", !0),
|
|
255
|
+
e.value.userOptions.show && be.value && (s(Q) || s(B)) ? (r(), R(s(pe), {
|
|
256
|
+
ref: "details",
|
|
257
|
+
key: `user_options_${Y.value}`,
|
|
258
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
259
|
+
color: e.value.style.chart.color,
|
|
260
|
+
isPrinting: s(ee),
|
|
261
|
+
isImaging: s(te),
|
|
262
|
+
uid: L.value,
|
|
263
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
264
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
265
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
266
|
+
hasXls: !1,
|
|
267
|
+
isFullscreen: T.value,
|
|
268
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
269
|
+
chartElement: C.value,
|
|
270
|
+
position: e.value.userOptions.position,
|
|
271
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
272
|
+
isAnnotation: N.value,
|
|
273
|
+
callbacks: e.value.userOptions.callbacks,
|
|
274
|
+
printScale: e.value.userOptions.print.scale,
|
|
275
|
+
onToggleFullscreen: ue,
|
|
276
|
+
onGeneratePdf: s(ae),
|
|
277
|
+
onGenerateImage: s(le),
|
|
278
|
+
onToggleAnnotator: D,
|
|
279
|
+
style: j({
|
|
280
|
+
visibility: s(Q) ? s(B) ? "visible" : "hidden" : "visible"
|
|
281
|
+
})
|
|
282
|
+
}, Oe({ _: 2 }, [
|
|
283
|
+
t.$slots.menuIcon ? {
|
|
284
|
+
name: "menuIcon",
|
|
285
|
+
fn: O(({ isOpen: a, color: o }) => [
|
|
286
|
+
p(t.$slots, "menuIcon", M(E({ isOpen: a, color: o })), void 0, !0)
|
|
287
|
+
]),
|
|
288
|
+
key: "0"
|
|
289
|
+
} : void 0,
|
|
290
|
+
t.$slots.optionPdf ? {
|
|
291
|
+
name: "optionPdf",
|
|
292
|
+
fn: O(() => [
|
|
293
|
+
p(t.$slots, "optionPdf", {}, void 0, !0)
|
|
294
|
+
]),
|
|
295
|
+
key: "1"
|
|
296
|
+
} : void 0,
|
|
297
|
+
t.$slots.optionImg ? {
|
|
298
|
+
name: "optionImg",
|
|
299
|
+
fn: O(() => [
|
|
300
|
+
p(t.$slots, "optionImg", {}, void 0, !0)
|
|
301
|
+
]),
|
|
302
|
+
key: "2"
|
|
303
|
+
} : void 0,
|
|
304
|
+
t.$slots.optionFullscreen ? {
|
|
305
|
+
name: "optionFullscreen",
|
|
306
|
+
fn: O(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
307
|
+
p(t.$slots, "optionFullscreen", M(E({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
308
|
+
]),
|
|
309
|
+
key: "3"
|
|
310
|
+
} : void 0,
|
|
311
|
+
t.$slots.optionAnnotator ? {
|
|
312
|
+
name: "optionAnnotator",
|
|
313
|
+
fn: O(({ toggleAnnotator: a, isAnnotator: o }) => [
|
|
314
|
+
p(t.$slots, "optionAnnotator", M(E({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
|
|
315
|
+
]),
|
|
316
|
+
key: "4"
|
|
317
|
+
} : void 0
|
|
318
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
|
|
319
|
+
(r(), u("svg", {
|
|
320
|
+
ref_key: "svgRef",
|
|
321
|
+
ref: Z,
|
|
322
|
+
xmlns: s(Ee),
|
|
323
|
+
class: X({ "vue-data-ui-fullscreen--on": T.value, "vue-data-ui-fulscreen--off": !T.value }),
|
|
324
|
+
viewBox: `0 0 ${S.value} ${F.value}`,
|
|
325
|
+
style: j(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
326
|
+
}, [
|
|
327
|
+
Pe(s(me)),
|
|
328
|
+
t.$slots["chart-background"] ? (r(), u("foreignObject", {
|
|
329
|
+
key: 0,
|
|
330
|
+
x: 0,
|
|
331
|
+
y: 0,
|
|
332
|
+
width: n.value.width,
|
|
333
|
+
height: n.value.height,
|
|
334
|
+
style: {
|
|
335
|
+
pointerEvents: "none"
|
|
336
|
+
}
|
|
337
|
+
}, [
|
|
338
|
+
p(t.$slots, "chart-background", {}, void 0, !0)
|
|
339
|
+
], 8, Qe)) : g("", !0),
|
|
340
|
+
e.value.style.chart.layout.curved ? (r(), u("g", Ze, [
|
|
341
|
+
(r(!0), u(ce, null, ve(re.value, (a, o) => (r(), u("path", {
|
|
342
|
+
d: a.curve,
|
|
343
|
+
"stroke-width": h.value.mark,
|
|
344
|
+
stroke: i.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
345
|
+
"stroke-linecap": "round",
|
|
346
|
+
fill: "none",
|
|
347
|
+
class: X({ "vue-ui-tick-animated": e.value.style.chart.animation.use && o <= i.value })
|
|
348
|
+
}, null, 10, et))), 256))
|
|
349
|
+
])) : (r(), u("g", tt, [
|
|
350
|
+
(r(!0), u(ce, null, ve(re.value, (a, o) => (r(), u("line", {
|
|
351
|
+
x1: a.x1,
|
|
352
|
+
y1: a.y1,
|
|
353
|
+
x2: a.x2,
|
|
354
|
+
y2: a.y2,
|
|
355
|
+
"stroke-width": h.value.mark,
|
|
356
|
+
stroke: i.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
357
|
+
"stroke-linecap": "round"
|
|
358
|
+
}, null, 8, at))), 256))
|
|
359
|
+
])),
|
|
360
|
+
e.value.style.chart.percentage.show ? (r(), u("g", lt, [
|
|
361
|
+
s(J) ? (r(), u("rect", {
|
|
362
|
+
key: 0,
|
|
363
|
+
x: ne.value.x,
|
|
364
|
+
y: ne.value.y,
|
|
365
|
+
width: 40,
|
|
366
|
+
height: y.value.fontSize,
|
|
367
|
+
fill: "#6A6A6A80",
|
|
368
|
+
rx: 3
|
|
369
|
+
}, null, 8, ot)) : (r(), u("text", {
|
|
370
|
+
key: 1,
|
|
371
|
+
x: y.value.x,
|
|
372
|
+
y: y.value.y,
|
|
373
|
+
"font-size": y.value.fontSize,
|
|
374
|
+
fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ? s(he)(e.value.style.chart.layout.activeColor, i.value / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.percentage.color,
|
|
375
|
+
"font-weight": y.value.bold ? "bold" : "normal",
|
|
376
|
+
"text-anchor": y.value.textAnchor
|
|
377
|
+
}, Ie(s(Le)(
|
|
378
|
+
e.value.style.chart.percentage.formatter,
|
|
379
|
+
i.value,
|
|
380
|
+
s(Ue)({
|
|
381
|
+
v: i.value,
|
|
382
|
+
s: "%",
|
|
383
|
+
r: e.value.style.chart.percentage.rounding
|
|
384
|
+
})
|
|
385
|
+
)), 9, st))
|
|
386
|
+
])) : g("", !0),
|
|
387
|
+
p(t.$slots, "svg", { svg: n.value }, void 0, !0)
|
|
388
|
+
], 14, Ke)),
|
|
389
|
+
t.$slots.watermark ? (r(), u("div", nt, [
|
|
390
|
+
p(t.$slots, "watermark", M(E({ isPrinting: s(ee) || s(te) })), void 0, !0)
|
|
391
|
+
])) : g("", !0),
|
|
392
|
+
t.$slots.source ? (r(), u("div", {
|
|
393
|
+
key: 5,
|
|
394
|
+
ref_key: "source",
|
|
395
|
+
ref: q,
|
|
396
|
+
dir: "auto"
|
|
397
|
+
}, [
|
|
398
|
+
p(t.$slots, "source", {}, void 0, !0)
|
|
399
|
+
], 512)) : g("", !0),
|
|
400
|
+
s(J) ? (r(), R(He, { key: 6 })) : g("", !0)
|
|
401
|
+
], 46, Je));
|
|
402
|
+
}
|
|
403
|
+
}, kt = /* @__PURE__ */ We(rt, [["__scopeId", "data-v-758809ae"]]);
|
|
404
|
+
export {
|
|
405
|
+
kt as default
|
|
406
|
+
};
|