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,450 @@
|
|
|
1
|
+
import { defineAsyncComponent as j, computed as d, ref as h, toRefs as Ie, watch as ce, onMounted as ze, createElementBlock as u, openBlock as r, unref as n, normalizeStyle as X, normalizeClass as V, createBlock as M, createCommentVNode as k, withCtx as f, renderSlot as i, normalizeProps as b, guardReactiveProps as w, createSlots as Fe, createVNode as Te, Fragment as ve, renderList as he, toDisplayString as Ne } from "vue";
|
|
2
|
+
import { c as Re, t as Ee, x as Me, o as Le, f as Ue, i as de, X as Be, a as Ge, d as De } from "./lib-C_mNZmhD.js";
|
|
3
|
+
import { t as He, u as je } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Xe, a as fe } from "./useNestedProp-CReNavA0.js";
|
|
5
|
+
import { u as Ve, B as qe } from "./BaseScanner-BgWxam9d.js";
|
|
6
|
+
import { u as Ye } from "./usePrinter-DTzqpYKF.js";
|
|
7
|
+
import { u as We } from "./useSvgExport-DrjCWun4.js";
|
|
8
|
+
import { u as Je } from "./useUserOptionState-BIvW1Kz7.js";
|
|
9
|
+
import { u as Ke } from "./useChartAccessibility-9icAAmYg.js";
|
|
10
|
+
import { t as Qe } from "./themes-AUNCOb2G.js";
|
|
11
|
+
import Ze from "./Title-BzH_LEA3.js";
|
|
12
|
+
import et from "./img-BecE5qXd.js";
|
|
13
|
+
import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const at = ["id"], ot = ["xmlns", "viewBox"], lt = ["width", "height"], nt = { key: 1 }, st = ["d", "stroke-width", "stroke"], rt = { key: 2 }, ut = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], it = { key: 3 }, ct = ["x", "y", "height"], vt = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], ht = {
|
|
15
|
+
key: 4,
|
|
16
|
+
class: "vue-data-ui-watermark"
|
|
17
|
+
}, dt = {
|
|
18
|
+
__name: "vue-ui-tiremarks",
|
|
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: pe }) {
|
|
34
|
+
const ye = j(() => import("./PenAndPaper-SZQIAgkg.js")), me = j(() => import("./UserOptions-CGnQt6Fd.js")), ke = j(() => import("./PackageVersion-Y7t79Jtq.js")), { vue_ui_tiremarks: be } = Xe(), A = ge, we = d(() => !!A.dataset && Object.keys(A.dataset).length), L = h(Re()), x = h(null), Ce = h(null), q = h(null), Y = h(null), W = h(0), J = h(0), O = h(null), I = h(null), e = h(D()), { loading: K, FINAL_DATASET: U } = Ve({
|
|
35
|
+
...Ie(A),
|
|
36
|
+
FINAL_CONFIG: e,
|
|
37
|
+
prepareConfig: D,
|
|
38
|
+
skeletonDataset: { percentage: 50 },
|
|
39
|
+
skeletonConfig: Ee({
|
|
40
|
+
defaultConfig: e.value,
|
|
41
|
+
userConfig: {
|
|
42
|
+
userOptions: { show: !1 },
|
|
43
|
+
style: {
|
|
44
|
+
chart: {
|
|
45
|
+
backgroundColor: "#99999930",
|
|
46
|
+
animation: { use: !1 },
|
|
47
|
+
layout: {
|
|
48
|
+
activeColor: "#6A6A6A80",
|
|
49
|
+
inactiveColor: "#CACACA80",
|
|
50
|
+
ticks: {
|
|
51
|
+
gradient: { show: !1 }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
}), { userOptionsVisible: B, setUserOptionsVisibility: Q, keepUserOptionState: Z } = Je({ config: e.value }), { svgRef: G } = Ke({ config: e.value.style.chart.title });
|
|
59
|
+
function D() {
|
|
60
|
+
const t = fe({
|
|
61
|
+
userConfig: A.config,
|
|
62
|
+
defaultConfig: be
|
|
63
|
+
});
|
|
64
|
+
return t.theme ? {
|
|
65
|
+
...fe({
|
|
66
|
+
userConfig: Qe.vue_ui_tiremarks[t.theme] || A.config,
|
|
67
|
+
defaultConfig: t
|
|
68
|
+
})
|
|
69
|
+
} : t;
|
|
70
|
+
}
|
|
71
|
+
ce(() => A.config, (t) => {
|
|
72
|
+
e.value = D(), B.value = !e.value.userOptions.showOnChartHover, T.value = e.value.style.chart.width, N.value = e.value.style.chart.height, ne(), J.value += 1;
|
|
73
|
+
}, { deep: !0 });
|
|
74
|
+
const { isPrinting: ee, isImaging: te, generatePdf: ae, generateImage: oe } = Ye({
|
|
75
|
+
elementId: L.value,
|
|
76
|
+
fileName: e.value.style.chart.title.text || "vue-ui-tiremarks",
|
|
77
|
+
options: e.value.userOptions.print
|
|
78
|
+
}), $e = d(() => e.value.userOptions.show && !e.value.style.chart.title.text), c = h(e.value.style.chart.animation.use ? 0 : Me(U.value.percentage));
|
|
79
|
+
ce(() => U.value, (t) => {
|
|
80
|
+
e.value.style.chart.animation.use ? le(t.percentage) : c.value = t.percentage || 0;
|
|
81
|
+
}, { deep: !0 }), ze(() => {
|
|
82
|
+
ne();
|
|
83
|
+
});
|
|
84
|
+
function le(t) {
|
|
85
|
+
let o = e.value.style.chart.animation.speed;
|
|
86
|
+
const a = Math.abs(t - c.value) / (o * 120);
|
|
87
|
+
function l() {
|
|
88
|
+
c.value < t ? c.value = Math.min(c.value + a, t) : c.value > t && (c.value = Math.max(c.value - a, t)), c.value !== t && requestAnimationFrame(l);
|
|
89
|
+
}
|
|
90
|
+
l();
|
|
91
|
+
}
|
|
92
|
+
const _e = d(() => !!e.value.debug);
|
|
93
|
+
function ne() {
|
|
94
|
+
if (Le(A.dataset) && Ue({
|
|
95
|
+
componentName: "VueUiTiremarks",
|
|
96
|
+
type: "dataset",
|
|
97
|
+
debug: _e.value
|
|
98
|
+
}), e.value.responsive) {
|
|
99
|
+
const t = He(() => {
|
|
100
|
+
const { width: o, height: a } = je({
|
|
101
|
+
chart: x.value,
|
|
102
|
+
title: e.value.style.chart.title.text ? q.value : null,
|
|
103
|
+
source: Y.value
|
|
104
|
+
});
|
|
105
|
+
requestAnimationFrame(() => {
|
|
106
|
+
T.value = Math.max(0.1, o), N.value = Math.max(0.1, a - 12);
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
O.value && (I.value && O.value.unobserve(I.value), O.value.disconnect()), O.value = new ResizeObserver(t), I.value = x.value.parentNode, O.value.observe(I.value);
|
|
110
|
+
}
|
|
111
|
+
le(U.value.percentage || 0);
|
|
112
|
+
}
|
|
113
|
+
const z = d(() => e.value.style.chart.layout.display === "vertical"), v = d(() => {
|
|
114
|
+
const t = e.value.style.chart.percentage.show, o = {
|
|
115
|
+
top: t ? 48 : 12,
|
|
116
|
+
left: t ? 64 : 16,
|
|
117
|
+
right: t ? 64 : 16,
|
|
118
|
+
bottom: t ? 48 : 12
|
|
119
|
+
};
|
|
120
|
+
return z.value ? {
|
|
121
|
+
top: e.value.style.chart.percentage.verticalPosition === "top" ? o.top : 3,
|
|
122
|
+
left: 3,
|
|
123
|
+
right: 3,
|
|
124
|
+
bottom: e.value.style.chart.percentage.verticalPosition === "bottom" ? o.bottom : 3
|
|
125
|
+
} : {
|
|
126
|
+
top: 0,
|
|
127
|
+
bottom: 0,
|
|
128
|
+
left: e.value.style.chart.percentage.horizontalPosition === "left" ? o.left : 16,
|
|
129
|
+
right: e.value.style.chart.percentage.horizontalPosition === "right" ? o.right : 10
|
|
130
|
+
};
|
|
131
|
+
}), F = d(() => Object.values(v.value).reduce((t, o) => t + o, 0)), T = h(e.value.style.chart.width), N = h(e.value.style.chart.height), s = d(() => ({
|
|
132
|
+
height: N.value,
|
|
133
|
+
width: T.value
|
|
134
|
+
})), se = d(() => ({
|
|
135
|
+
horizontal: {
|
|
136
|
+
x: y.value.x + (e.value.style.chart.percentage.horizontalPosition === "left" ? 6 : 3),
|
|
137
|
+
y: s.value.height / 2 - y.value.fontSize / 2
|
|
138
|
+
},
|
|
139
|
+
vertical: {
|
|
140
|
+
x: s.value.width / 2 - 20,
|
|
141
|
+
y: y.value.y - y.value.fontSize / 2
|
|
142
|
+
}
|
|
143
|
+
})[e.value.style.chart.layout.display]), g = d(() => z.value ? {
|
|
144
|
+
mark: (s.value.height - F.value) / 100 * 0.5,
|
|
145
|
+
space: (s.value.height - F.value) / 100 * 0.5
|
|
146
|
+
} : {
|
|
147
|
+
mark: (s.value.width - F.value) / 100 * 0.5,
|
|
148
|
+
space: (s.value.width - F.value) / 100 * 0.5
|
|
149
|
+
}), re = d(() => {
|
|
150
|
+
const t = [];
|
|
151
|
+
for (let a = 0; a < 100; a += 1) {
|
|
152
|
+
const l = e.value.style.chart.layout.ticks.gradient.show ? de(e.value.style.chart.layout.activeColor, a / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.activeColor;
|
|
153
|
+
if (z.value) {
|
|
154
|
+
const m = e.value.style.chart.layout.crescendo ? (100 - a) * (s.value.width - v.value.left - v.value.right) / 100 / 3 : 0, p = v.value.left + 4 + m, C = s.value.width - v.value.right - 4 - m, $ = s.value.height - v.value.bottom - a * g.value.mark - a * g.value.space - g.value.mark, _ = s.value.height - v.value.bottom - a * g.value.mark - a * g.value.space - g.value.mark, S = (C - p) / e.value.style.chart.layout.curveAngleX, P = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100);
|
|
155
|
+
t.push({
|
|
156
|
+
x1: p,
|
|
157
|
+
x2: C,
|
|
158
|
+
y1: $,
|
|
159
|
+
y2: _,
|
|
160
|
+
curve: `M ${p} ${$} C ${p + S} ${$ - P}, ${C - S} ${_ - P}, ${C} ${_}`,
|
|
161
|
+
color: l
|
|
162
|
+
});
|
|
163
|
+
} else {
|
|
164
|
+
const m = e.value.style.chart.layout.crescendo ? (100 - a) * (s.value.height - v.value.top - v.value.bottom) / 100 / 3 : 0, p = v.value.left + a * g.value.mark + a * g.value.space - g.value.mark, C = p, $ = v.value.top + 4 + m, _ = s.value.height - v.value.bottom - 4 - m, S = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100), P = (_ - $) / e.value.style.chart.layout.curveAngleX;
|
|
165
|
+
t.push({
|
|
166
|
+
x1: p,
|
|
167
|
+
x2: C,
|
|
168
|
+
y1: $,
|
|
169
|
+
y2: _,
|
|
170
|
+
curve: `M ${p} ${$} C ${p + S} ${$ + P}, ${C + S} ${_ - P}, ${C} ${_}`,
|
|
171
|
+
color: l
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return t;
|
|
176
|
+
}), y = d(() => {
|
|
177
|
+
let t, o, a;
|
|
178
|
+
const l = e.value.style.chart.percentage.fontSize / 3;
|
|
179
|
+
return z.value ? e.value.style.chart.percentage.verticalPosition === "top" ? (t = s.value.width / 2, o = v.value.top / 2, a = "middle") : e.value.style.chart.percentage.verticalPosition === "bottom" && (t = s.value.width / 2, o = s.value.height - v.value.bottom / 2 + l, a = "middle") : e.value.style.chart.percentage.horizontalPosition === "left" ? (t = 4, o = s.value.height / 2 + l, a = "start") : e.value.style.chart.percentage.horizontalPosition === "right" && (t = s.value.width - v.value.right + 8, o = s.value.height / 2 + l, a = "start"), {
|
|
180
|
+
x: t,
|
|
181
|
+
y: o,
|
|
182
|
+
textAnchor: a,
|
|
183
|
+
bold: e.value.style.chart.percentage.bold,
|
|
184
|
+
fontSize: e.value.style.chart.percentage.fontSize,
|
|
185
|
+
fill: e.value.style.chart.percentage.color
|
|
186
|
+
};
|
|
187
|
+
}), R = h(!1);
|
|
188
|
+
function ue(t) {
|
|
189
|
+
R.value = t, W.value += 1;
|
|
190
|
+
}
|
|
191
|
+
const E = h(!1);
|
|
192
|
+
function H() {
|
|
193
|
+
E.value = !E.value;
|
|
194
|
+
}
|
|
195
|
+
async function Ae({ scale: t = 2 } = {}) {
|
|
196
|
+
if (!x.value) return;
|
|
197
|
+
const { width: o, height: a } = x.value.getBoundingClientRect(), l = o / a, { imageUri: m, base64: p } = await et({ domElement: x.value, base64: !0, img: !0, scale: t });
|
|
198
|
+
return {
|
|
199
|
+
imageUri: m,
|
|
200
|
+
base64: p,
|
|
201
|
+
title: e.value.style.chart.title.text,
|
|
202
|
+
width: o,
|
|
203
|
+
height: a,
|
|
204
|
+
aspectRatio: l
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
const xe = d(() => e.value.style.chart.backgroundColor), Oe = d(() => e.value.style.chart.title), { exportSvg: Se, getSvg: Pe } = We({
|
|
208
|
+
svg: G,
|
|
209
|
+
title: Oe,
|
|
210
|
+
backgroundColor: xe
|
|
211
|
+
});
|
|
212
|
+
async function ie({ isCb: t }) {
|
|
213
|
+
if (t) {
|
|
214
|
+
const { blob: o, url: a, text: l, dataUrl: m } = await Pe();
|
|
215
|
+
e.value.userOptions.callbacks.svg({ blob: o, url: a, text: l, dataUrl: m });
|
|
216
|
+
} else
|
|
217
|
+
Se();
|
|
218
|
+
}
|
|
219
|
+
return pe({
|
|
220
|
+
getImage: Ae,
|
|
221
|
+
generatePdf: ae,
|
|
222
|
+
generateImage: oe,
|
|
223
|
+
generateSvg: ie,
|
|
224
|
+
toggleAnnotator: H,
|
|
225
|
+
toggleFullscreen: ue
|
|
226
|
+
}), (t, o) => (r(), u("div", {
|
|
227
|
+
ref_key: "tiremarksChart",
|
|
228
|
+
ref: x,
|
|
229
|
+
class: V(`vue-data-ui-component vue-ui-tiremarks ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
230
|
+
style: X(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
231
|
+
id: L.value,
|
|
232
|
+
onMouseenter: o[0] || (o[0] = () => n(Q)(!0)),
|
|
233
|
+
onMouseleave: o[1] || (o[1] = () => n(Q)(!1))
|
|
234
|
+
}, [
|
|
235
|
+
e.value.userOptions.buttons.annotator ? (r(), M(n(ye), {
|
|
236
|
+
key: 0,
|
|
237
|
+
svgRef: n(G),
|
|
238
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
239
|
+
color: e.value.style.chart.color,
|
|
240
|
+
active: E.value,
|
|
241
|
+
onClose: H
|
|
242
|
+
}, {
|
|
243
|
+
"annotator-action-close": f(() => [
|
|
244
|
+
i(t.$slots, "annotator-action-close", {}, void 0, !0)
|
|
245
|
+
]),
|
|
246
|
+
"annotator-action-color": f(({ color: a }) => [
|
|
247
|
+
i(t.$slots, "annotator-action-color", b(w({ color: a })), void 0, !0)
|
|
248
|
+
]),
|
|
249
|
+
"annotator-action-draw": f(({ mode: a }) => [
|
|
250
|
+
i(t.$slots, "annotator-action-draw", b(w({ mode: a })), void 0, !0)
|
|
251
|
+
]),
|
|
252
|
+
"annotator-action-undo": f(({ disabled: a }) => [
|
|
253
|
+
i(t.$slots, "annotator-action-undo", b(w({ disabled: a })), void 0, !0)
|
|
254
|
+
]),
|
|
255
|
+
"annotator-action-redo": f(({ disabled: a }) => [
|
|
256
|
+
i(t.$slots, "annotator-action-redo", b(w({ disabled: a })), void 0, !0)
|
|
257
|
+
]),
|
|
258
|
+
"annotator-action-delete": f(({ disabled: a }) => [
|
|
259
|
+
i(t.$slots, "annotator-action-delete", b(w({ disabled: a })), void 0, !0)
|
|
260
|
+
]),
|
|
261
|
+
_: 3
|
|
262
|
+
}, 8, ["svgRef", "backgroundColor", "color", "active"])) : k("", !0),
|
|
263
|
+
$e.value ? (r(), u("div", {
|
|
264
|
+
key: 1,
|
|
265
|
+
ref_key: "noTitle",
|
|
266
|
+
ref: Ce,
|
|
267
|
+
class: "vue-data-ui-no-title-space",
|
|
268
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
269
|
+
}, null, 512)) : k("", !0),
|
|
270
|
+
e.value.style.chart.title.text ? (r(), u("div", {
|
|
271
|
+
key: 2,
|
|
272
|
+
ref_key: "chartTitle",
|
|
273
|
+
ref: q,
|
|
274
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
275
|
+
}, [
|
|
276
|
+
(r(), M(Ze, {
|
|
277
|
+
key: `title_${J.value}`,
|
|
278
|
+
config: {
|
|
279
|
+
title: {
|
|
280
|
+
cy: "wheel-title",
|
|
281
|
+
...e.value.style.chart.title
|
|
282
|
+
},
|
|
283
|
+
subtitle: {
|
|
284
|
+
cy: "wheel-subtitle",
|
|
285
|
+
...e.value.style.chart.title.subtitle
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}, null, 8, ["config"]))
|
|
289
|
+
], 512)) : k("", !0),
|
|
290
|
+
e.value.userOptions.show && we.value && (n(Z) || n(B)) ? (r(), M(n(me), {
|
|
291
|
+
ref: "details",
|
|
292
|
+
key: `user_options_${W.value}`,
|
|
293
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
294
|
+
color: e.value.style.chart.color,
|
|
295
|
+
isPrinting: n(ee),
|
|
296
|
+
isImaging: n(te),
|
|
297
|
+
uid: L.value,
|
|
298
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
299
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
300
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
301
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
302
|
+
hasXls: !1,
|
|
303
|
+
isFullscreen: R.value,
|
|
304
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
305
|
+
chartElement: x.value,
|
|
306
|
+
position: e.value.userOptions.position,
|
|
307
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
308
|
+
isAnnotation: E.value,
|
|
309
|
+
callbacks: e.value.userOptions.callbacks,
|
|
310
|
+
printScale: e.value.userOptions.print.scale,
|
|
311
|
+
onToggleFullscreen: ue,
|
|
312
|
+
onGeneratePdf: n(ae),
|
|
313
|
+
onGenerateImage: n(oe),
|
|
314
|
+
onGenerateSvg: ie,
|
|
315
|
+
onToggleAnnotator: H,
|
|
316
|
+
style: X({
|
|
317
|
+
visibility: n(Z) ? n(B) ? "visible" : "hidden" : "visible"
|
|
318
|
+
})
|
|
319
|
+
}, Fe({ _: 2 }, [
|
|
320
|
+
t.$slots.menuIcon ? {
|
|
321
|
+
name: "menuIcon",
|
|
322
|
+
fn: f(({ isOpen: a, color: l }) => [
|
|
323
|
+
i(t.$slots, "menuIcon", b(w({ isOpen: a, color: l })), void 0, !0)
|
|
324
|
+
]),
|
|
325
|
+
key: "0"
|
|
326
|
+
} : void 0,
|
|
327
|
+
t.$slots.optionPdf ? {
|
|
328
|
+
name: "optionPdf",
|
|
329
|
+
fn: f(() => [
|
|
330
|
+
i(t.$slots, "optionPdf", {}, void 0, !0)
|
|
331
|
+
]),
|
|
332
|
+
key: "1"
|
|
333
|
+
} : void 0,
|
|
334
|
+
t.$slots.optionImg ? {
|
|
335
|
+
name: "optionImg",
|
|
336
|
+
fn: f(() => [
|
|
337
|
+
i(t.$slots, "optionImg", {}, void 0, !0)
|
|
338
|
+
]),
|
|
339
|
+
key: "2"
|
|
340
|
+
} : void 0,
|
|
341
|
+
t.$slots.optionSvg ? {
|
|
342
|
+
name: "optionSvg",
|
|
343
|
+
fn: f(() => [
|
|
344
|
+
i(t.$slots, "optionSvg", {}, void 0, !0)
|
|
345
|
+
]),
|
|
346
|
+
key: "3"
|
|
347
|
+
} : void 0,
|
|
348
|
+
t.$slots.optionFullscreen ? {
|
|
349
|
+
name: "optionFullscreen",
|
|
350
|
+
fn: f(({ toggleFullscreen: a, isFullscreen: l }) => [
|
|
351
|
+
i(t.$slots, "optionFullscreen", b(w({ toggleFullscreen: a, isFullscreen: l })), void 0, !0)
|
|
352
|
+
]),
|
|
353
|
+
key: "4"
|
|
354
|
+
} : void 0,
|
|
355
|
+
t.$slots.optionAnnotator ? {
|
|
356
|
+
name: "optionAnnotator",
|
|
357
|
+
fn: f(({ toggleAnnotator: a, isAnnotator: l }) => [
|
|
358
|
+
i(t.$slots, "optionAnnotator", b(w({ toggleAnnotator: a, isAnnotator: l })), void 0, !0)
|
|
359
|
+
]),
|
|
360
|
+
key: "5"
|
|
361
|
+
} : void 0
|
|
362
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasSvg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : k("", !0),
|
|
363
|
+
(r(), u("svg", {
|
|
364
|
+
ref_key: "svgRef",
|
|
365
|
+
ref: G,
|
|
366
|
+
xmlns: n(Be),
|
|
367
|
+
class: V({ "vue-data-ui-fullscreen--on": R.value, "vue-data-ui-fulscreen--off": !R.value }),
|
|
368
|
+
viewBox: `0 0 ${T.value} ${N.value}`,
|
|
369
|
+
style: X(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
370
|
+
}, [
|
|
371
|
+
Te(n(ke)),
|
|
372
|
+
t.$slots["chart-background"] ? (r(), u("foreignObject", {
|
|
373
|
+
key: 0,
|
|
374
|
+
x: 0,
|
|
375
|
+
y: 0,
|
|
376
|
+
width: s.value.width,
|
|
377
|
+
height: s.value.height,
|
|
378
|
+
style: {
|
|
379
|
+
pointerEvents: "none"
|
|
380
|
+
}
|
|
381
|
+
}, [
|
|
382
|
+
i(t.$slots, "chart-background", {}, void 0, !0)
|
|
383
|
+
], 8, lt)) : k("", !0),
|
|
384
|
+
e.value.style.chart.layout.curved ? (r(), u("g", nt, [
|
|
385
|
+
(r(!0), u(ve, null, he(re.value, (a, l) => (r(), u("path", {
|
|
386
|
+
d: a.curve,
|
|
387
|
+
"stroke-width": g.value.mark,
|
|
388
|
+
stroke: c.value >= l ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
389
|
+
"stroke-linecap": "round",
|
|
390
|
+
fill: "none",
|
|
391
|
+
class: V({ "vue-ui-tick-animated": e.value.style.chart.animation.use && l <= c.value })
|
|
392
|
+
}, null, 10, st))), 256))
|
|
393
|
+
])) : (r(), u("g", rt, [
|
|
394
|
+
(r(!0), u(ve, null, he(re.value, (a, l) => (r(), u("line", {
|
|
395
|
+
x1: a.x1,
|
|
396
|
+
y1: a.y1,
|
|
397
|
+
x2: a.x2,
|
|
398
|
+
y2: a.y2,
|
|
399
|
+
"stroke-width": g.value.mark,
|
|
400
|
+
stroke: c.value >= l ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
401
|
+
"stroke-linecap": "round"
|
|
402
|
+
}, null, 8, ut))), 256))
|
|
403
|
+
])),
|
|
404
|
+
e.value.style.chart.percentage.show ? (r(), u("g", it, [
|
|
405
|
+
n(K) ? (r(), u("rect", {
|
|
406
|
+
key: 0,
|
|
407
|
+
x: se.value.x,
|
|
408
|
+
y: se.value.y,
|
|
409
|
+
width: 40,
|
|
410
|
+
height: y.value.fontSize,
|
|
411
|
+
fill: "#6A6A6A80",
|
|
412
|
+
rx: 3
|
|
413
|
+
}, null, 8, ct)) : (r(), u("text", {
|
|
414
|
+
key: 1,
|
|
415
|
+
x: y.value.x,
|
|
416
|
+
y: y.value.y,
|
|
417
|
+
"font-size": y.value.fontSize,
|
|
418
|
+
fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ? n(de)(e.value.style.chart.layout.activeColor, c.value / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.percentage.color,
|
|
419
|
+
"font-weight": y.value.bold ? "bold" : "normal",
|
|
420
|
+
"text-anchor": y.value.textAnchor
|
|
421
|
+
}, Ne(n(Ge)(
|
|
422
|
+
e.value.style.chart.percentage.formatter,
|
|
423
|
+
c.value,
|
|
424
|
+
n(De)({
|
|
425
|
+
v: c.value,
|
|
426
|
+
s: "%",
|
|
427
|
+
r: e.value.style.chart.percentage.rounding
|
|
428
|
+
})
|
|
429
|
+
)), 9, vt))
|
|
430
|
+
])) : k("", !0),
|
|
431
|
+
i(t.$slots, "svg", { svg: s.value }, void 0, !0)
|
|
432
|
+
], 14, ot)),
|
|
433
|
+
t.$slots.watermark ? (r(), u("div", ht, [
|
|
434
|
+
i(t.$slots, "watermark", b(w({ isPrinting: n(ee) || n(te) })), void 0, !0)
|
|
435
|
+
])) : k("", !0),
|
|
436
|
+
t.$slots.source ? (r(), u("div", {
|
|
437
|
+
key: 5,
|
|
438
|
+
ref_key: "source",
|
|
439
|
+
ref: Y,
|
|
440
|
+
dir: "auto"
|
|
441
|
+
}, [
|
|
442
|
+
i(t.$slots, "source", {}, void 0, !0)
|
|
443
|
+
], 512)) : k("", !0),
|
|
444
|
+
n(K) ? (r(), M(qe, { key: 6 })) : k("", !0)
|
|
445
|
+
], 46, at));
|
|
446
|
+
}
|
|
447
|
+
}, Ot = /* @__PURE__ */ tt(dt, [["__scopeId", "data-v-2df69f7c"]]);
|
|
448
|
+
export {
|
|
449
|
+
Ot as default
|
|
450
|
+
};
|