vue-data-ui 3.0.0-next.7 → 3.0.0-next.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-Bl8urcli.js → Arrow-fzydFjfE.js} +1 -1
- package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-BwazM8ka.js} +2 -2
- package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BnbvQjs5.js} +1 -1
- package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-DR1Yr4kR.js} +2 -2
- package/dist/{DataTable-mQ6Wd-rR.js → DataTable-CKpA_OA_.js} +2 -2
- package/dist/{Legend-B2hrDh4G.js → Legend-ChXhJNzd.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-CPOpM7Os.js} +3 -3
- package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-CBHvscRY.js} +1 -1
- package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-BCcfYvgR.js} +3 -3
- package/dist/{Shape-C2qH26wh.js → Shape-C1rNfsMY.js} +43 -37
- package/dist/Slicer-D8a4Wv1q.js +602 -0
- package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-BUdf02cs.js} +1 -1
- package/dist/{Title-B7Xb3YuE.js → Title-feqCv0Si.js} +1 -1
- package/dist/{Tooltip-BidRoM5E.js → Tooltip-DQbksria.js} +23 -19
- package/dist/{UserOptions-0tvMM8PF.js → UserOptions-CGnAZpYs.js} +2 -2
- package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-DTPmkDTK.js} +1 -1
- package/dist/{img-D72yZNUg.js → img-_RMhslMZ.js} +1 -1
- package/dist/{index-Cg-RjxqH.js → index-CnY41r21.js} +2103 -1411
- package/dist/{pdf-DgX01_wu.js → pdf-C02XBmhm.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +600 -22
- package/dist/types/vue-data-ui.d.ts +600 -22
- package/dist/useAutoSizeLabelsInsideViewbox-DVYZBwNc.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-DtUATNAU.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-BUzmyQf9.js → usePrinter-CJ1uZx0D.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-DDBabVWX.js} +105 -100
- package/dist/vue-data-ui.js +23 -22
- package/dist/vue-ui-3d-bar-CtPXePUa.js +1323 -0
- package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-CnLY8CrQ.js} +3 -3
- package/dist/vue-ui-age-pyramid-CvrNLE47.js +834 -0
- package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-NuSwWka4.js} +2 -2
- package/dist/vue-ui-bullet-CpIVgkPB.js +571 -0
- package/dist/vue-ui-candlestick-DGWKUeJp.js +999 -0
- package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DWbQS8F3.js} +29 -29
- package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-K4-oOYff.js} +5 -5
- package/dist/vue-ui-chord-DqmP8yTR.js +1038 -0
- package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-D_ufubH5.js} +24 -24
- package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-B0tP4woK.js} +2 -2
- package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-D_7qyx3P.js} +62 -62
- package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-pUQErY07.js} +2 -2
- package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-Dl__PVfq.js} +320 -308
- package/dist/vue-ui-donut-evolution-BCGGTZZI.js +1075 -0
- package/dist/vue-ui-dumbbell-KzCa3k9g.js +1119 -0
- package/dist/vue-ui-flow-B1AOqk14.js +841 -0
- package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-DCl9v71X.js} +16 -16
- package/dist/{vue-ui-galaxy-Cn6vHbaw.js → vue-ui-galaxy-0rAzDHe5.js} +60 -58
- package/dist/vue-ui-gauge-Cg4qAOEf.js +791 -0
- package/dist/vue-ui-gizmo-CQmMkODw.js +210 -0
- package/dist/vue-ui-heatmap-CgkgUDI0.js +1078 -0
- package/dist/vue-ui-history-plot-CYvkTszV.js +1073 -0
- package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-BDuOZbc2.js} +26 -26
- package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-BZaU_YD-.js} +2 -2
- package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-HYjHgVuN.js} +53 -51
- package/dist/vue-ui-mood-radar-4pYtL93A.js +785 -0
- package/dist/vue-ui-nested-donuts-BVbvVm19.js +1286 -0
- package/dist/vue-ui-onion-DQg97Dwm.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-KQ4FTUda.js +915 -0
- package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-D8OU7TFs.js} +512 -459
- package/dist/vue-ui-quick-chart-BOKDoHdK.js +1761 -0
- package/dist/vue-ui-radar-2hTf-Qrf.js +796 -0
- package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-QriKDSO7.js} +2 -2
- package/dist/vue-ui-relation-circle-DqLiKEHw.js +598 -0
- package/dist/vue-ui-ridgeline-CvFlsavM.js +1153 -0
- package/dist/vue-ui-rings-B2ges9Ud.js +728 -0
- package/dist/vue-ui-scatter-DQJeFlv4.js +1178 -0
- package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-Bghm5obp.js} +3 -3
- package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-C3SkDNoz.js} +26 -26
- package/dist/vue-ui-spark-trend-dd8h3N7H.js +315 -0
- package/dist/vue-ui-sparkbar-BTj8M7fY.js +351 -0
- package/dist/vue-ui-sparkgauge-BBQAo-W1.js +232 -0
- package/dist/vue-ui-sparkhistogram-C4ZEcb8S.js +380 -0
- package/dist/vue-ui-sparkline-Bm3GpqJx.js +489 -0
- package/dist/vue-ui-sparkstackbar-Dde4iayd.js +421 -0
- package/dist/vue-ui-stackbar-DPvfNjwH.js +1370 -0
- package/dist/vue-ui-strip-plot-iZIN9U90.js +915 -0
- package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-C4EoviSd.js} +11 -11
- package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-D-eqO3LU.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-CD7IH49g.js} +14 -14
- package/dist/vue-ui-thermometer-BKEFH2Xt.js +541 -0
- package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-hhKj1gPp.js} +5 -5
- package/dist/vue-ui-tiremarks-CmNwCnVC.js +406 -0
- package/dist/vue-ui-treemap-BL7T8x_B.js +1035 -0
- package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-CGn_OX3P.js} +71 -69
- package/dist/vue-ui-waffle-qfT-wDhI.js +910 -0
- package/dist/vue-ui-wheel-B8J8C3AN.js +379 -0
- package/dist/vue-ui-word-cloud-B6oHFfEK.js +765 -0
- package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-BEv_oTrC.js} +11 -9
- package/dist/vue-ui-xy-DPBrciAR.js +3771 -0
- package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-BXT3mXj5.js} +265 -264
- package/package.json +1 -1
- package/dist/Slicer-BD8Z8VCW.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-C_G5E08Y.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
- package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
- package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
- package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
- package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
- package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
- package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
- package/dist/vue-ui-flow-D_L_xssL.js +0 -765
- package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
- package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
- package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
- package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
- package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
- package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
- package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
- package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
- package/dist/vue-ui-radar-98mXFZe-.js +0 -741
- package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
- package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
- package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
- package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
- package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
- package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
- package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
- package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
- package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
- package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
- package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
- package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
- package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
- package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
- package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
- package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
- package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
- package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
- package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as A, computed as s, onMounted as N, ref as M, watch as S, createElementBlock as r, openBlock as n, normalizeStyle as y, createCommentVNode as v, createBlock as R, toDisplayString as g, unref as i, createVNode as U, createElementVNode as d, renderSlot as z, normalizeClass as q } from "vue";
|
|
2
|
-
import { u as O } from "./useNestedProp-C_G5E08Y.js";
|
|
3
|
-
import { u as T, o as V, e as j, g as X, c as H, a as Y, P as J, X as K, i as Q, v as m, f as W } from "./index-Cg-RjxqH.js";
|
|
4
|
-
import { u as Z } from "./useChartAccessibility-9icAAmYg.js";
|
|
5
|
-
const ee = ["xmlns", "viewBox"], te = ["width", "height"], ae = ["id"], le = ["stop-color"], oe = ["stop-color"], se = ["d", "stroke", "stroke-linecap"], ue = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], ne = ["x", "y", "font-size", "fill", "font-weight"], ie = {
|
|
6
|
-
key: 4,
|
|
7
|
-
ref: "source",
|
|
8
|
-
dir: "auto"
|
|
9
|
-
}, fe = {
|
|
10
|
-
__name: "vue-ui-sparkgauge",
|
|
11
|
-
props: {
|
|
12
|
-
config: {
|
|
13
|
-
type: Object,
|
|
14
|
-
default() {
|
|
15
|
-
return {};
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
dataset: {
|
|
19
|
-
type: Object,
|
|
20
|
-
default() {
|
|
21
|
-
return {};
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
setup(E) {
|
|
26
|
-
const F = A(() => import("./PackageVersion-CeEYZfaH.js")), B = A(() => import("./vue-ui-skeleton-CUOhCY4p.js")), { vue_ui_sparkgauge: D } = T(), a = E, p = s(() => !!a.dataset && Object.keys(a.dataset).length);
|
|
27
|
-
N(() => {
|
|
28
|
-
h();
|
|
29
|
-
});
|
|
30
|
-
function h() {
|
|
31
|
-
V(a.dataset) ? j({
|
|
32
|
-
componentName: "VueUiSparkgauge",
|
|
33
|
-
type: "dataset"
|
|
34
|
-
}) : X({
|
|
35
|
-
datasetObject: a.dataset,
|
|
36
|
-
requiredAttributes: ["value", "min", "max"]
|
|
37
|
-
}).forEach((t) => {
|
|
38
|
-
j({
|
|
39
|
-
componentName: "VueUiSparkgauge",
|
|
40
|
-
type: "datasetAttribute",
|
|
41
|
-
property: t
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
const k = M(H()), e = s({
|
|
46
|
-
get: () => b(),
|
|
47
|
-
set: (t) => t
|
|
48
|
-
}), { svgRef: G } = Z({ config: { text: a.dataset.title } });
|
|
49
|
-
function b() {
|
|
50
|
-
const t = O({
|
|
51
|
-
userConfig: a.config,
|
|
52
|
-
defaultConfig: D
|
|
53
|
-
});
|
|
54
|
-
return t.theme ? {
|
|
55
|
-
...O({
|
|
56
|
-
userConfig: Y.vue_ui_sparkgauge[t.theme] || a.config,
|
|
57
|
-
defaultConfig: t
|
|
58
|
-
})
|
|
59
|
-
} : t;
|
|
60
|
-
}
|
|
61
|
-
S(() => a.config, (t) => {
|
|
62
|
-
e.value = b(), h();
|
|
63
|
-
}, { deep: !0 });
|
|
64
|
-
const u = s(() => ({
|
|
65
|
-
height: e.value.style.height,
|
|
66
|
-
width: 128,
|
|
67
|
-
base: e.value.style.basePosition
|
|
68
|
-
})), o = s(() => {
|
|
69
|
-
const t = a.dataset.min ?? 0, c = a.dataset.max ?? 0, P = c - t;
|
|
70
|
-
return {
|
|
71
|
-
min: t,
|
|
72
|
-
max: c,
|
|
73
|
-
diff: P
|
|
74
|
-
};
|
|
75
|
-
}), l = M(e.value.style.animation.show ? o.value.min : a.dataset.value);
|
|
76
|
-
S(() => a.dataset.value, () => {
|
|
77
|
-
C(a.dataset.value || 0);
|
|
78
|
-
});
|
|
79
|
-
const _ = s(() => l.value > o.value.max ? o.value.max : l.value < o.value.min ? o.value.min : l.value), x = s(() => o.value.diff / e.value.style.animation.speedMs);
|
|
80
|
-
N(() => {
|
|
81
|
-
C(a.dataset.value || 0);
|
|
82
|
-
});
|
|
83
|
-
function C(t) {
|
|
84
|
-
function c() {
|
|
85
|
-
l.value < t ? l.value = Math.min(l.value + x.value, t) : l.value > t && (l.value = Math.max(l.value - x.value, t)), l.value !== t && requestAnimationFrame(c);
|
|
86
|
-
}
|
|
87
|
-
c();
|
|
88
|
-
}
|
|
89
|
-
const f = s(() => a.dataset.title ?? ""), $ = s(() => l.value >= 0 ? (_.value - o.value.min) / o.value.diff : (Math.abs(o.value.min) - Math.abs(_.value)) / o.value.diff), w = s(() => J(e.value.style.colors.min, e.value.style.colors.max, o.value.min, o.value.max, l.value)), L = s(() => e.value.style.dataLabel.autoColor ? w.value : e.value.style.dataLabel.color), I = s(() => e.value.style.track.autoColor ? w.value : e.value.style.track.color);
|
|
90
|
-
return (t, c) => (n(), r("div", {
|
|
91
|
-
class: "vue-ui-sparkgauge",
|
|
92
|
-
style: y(`font-family:${e.value.style.fontFamily};width: 100%; background:${e.value.style.background}`)
|
|
93
|
-
}, [
|
|
94
|
-
e.value.style.title.show && f.value && e.value.style.title.position === "top" ? (n(), r("div", {
|
|
95
|
-
key: 0,
|
|
96
|
-
class: "vue-data-ui-sparkgauge-label",
|
|
97
|
-
style: y(`font-size:${e.value.style.title.fontSize}px;text-align:${e.value.style.title.textAlign};font-weight:${e.value.style.title.bold ? "bold" : "normal"};color:${e.value.style.title.color}`)
|
|
98
|
-
}, g(f.value), 5)) : v("", !0),
|
|
99
|
-
p.value ? (n(), r("svg", {
|
|
100
|
-
key: 1,
|
|
101
|
-
ref_key: "svgRef",
|
|
102
|
-
ref: G,
|
|
103
|
-
xmlns: i(K),
|
|
104
|
-
viewBox: `0 0 ${u.value.width} ${u.value.height}`,
|
|
105
|
-
style: "overflow: visible; background:transparent; width:100%;"
|
|
106
|
-
}, [
|
|
107
|
-
U(i(F)),
|
|
108
|
-
t.$slots["chart-background"] ? (n(), r("foreignObject", {
|
|
109
|
-
key: 0,
|
|
110
|
-
x: 0,
|
|
111
|
-
y: 0,
|
|
112
|
-
width: u.value.width,
|
|
113
|
-
height: u.value.height,
|
|
114
|
-
style: {
|
|
115
|
-
pointerEvents: "none"
|
|
116
|
-
}
|
|
117
|
-
}, [
|
|
118
|
-
z(t.$slots, "chart-background")
|
|
119
|
-
], 8, te)) : v("", !0),
|
|
120
|
-
d("defs", null, [
|
|
121
|
-
d("linearGradient", {
|
|
122
|
-
id: `gradient_${k.value}`,
|
|
123
|
-
x1: "-10%",
|
|
124
|
-
y1: "100%",
|
|
125
|
-
x2: "110%",
|
|
126
|
-
y2: "100%"
|
|
127
|
-
}, [
|
|
128
|
-
d("stop", {
|
|
129
|
-
offset: "0%",
|
|
130
|
-
"stop-color": e.value.style.colors.min
|
|
131
|
-
}, null, 8, le),
|
|
132
|
-
d("stop", {
|
|
133
|
-
offset: "100%",
|
|
134
|
-
"stop-color": e.value.style.colors.max
|
|
135
|
-
}, null, 8, oe)
|
|
136
|
-
], 8, ae)
|
|
137
|
-
]),
|
|
138
|
-
d("path", {
|
|
139
|
-
d: `M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,
|
|
140
|
-
stroke: e.value.style.gutter.color,
|
|
141
|
-
"stroke-width": 8,
|
|
142
|
-
"stroke-linecap": e.value.style.gutter.strokeLinecap,
|
|
143
|
-
fill: "none"
|
|
144
|
-
}, null, 8, se),
|
|
145
|
-
$.value !== 0 ? (n(), r("path", {
|
|
146
|
-
key: 1,
|
|
147
|
-
d: `M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,
|
|
148
|
-
stroke: e.value.style.colors.showGradient ? `url(#gradient_${k.value})` : I.value,
|
|
149
|
-
"stroke-width": 8,
|
|
150
|
-
"stroke-linecap": e.value.style.track.strokeLinecap,
|
|
151
|
-
fill: "none",
|
|
152
|
-
"stroke-dasharray": 169.5,
|
|
153
|
-
"stroke-dashoffset": 169.5 - 169.5 * $.value,
|
|
154
|
-
class: q({ "vue-ui-sparkgauge-track": e.value.style.animation.show }),
|
|
155
|
-
style: y(e.value.style.animation.show ? `animation: vue-ui-sparkgauge-animation ${e.value.style.animation.speedMs}ms ease-in;` : "")
|
|
156
|
-
}, null, 14, ue)) : v("", !0),
|
|
157
|
-
d("text", {
|
|
158
|
-
"text-anchor": "middle",
|
|
159
|
-
x: u.value.width / 2,
|
|
160
|
-
y: u.value.base + 6 + e.value.style.dataLabel.offsetY,
|
|
161
|
-
"font-size": e.value.style.dataLabel.fontSize,
|
|
162
|
-
fill: L.value,
|
|
163
|
-
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
|
|
164
|
-
}, g(i(Q)(
|
|
165
|
-
e.value.style.dataLabel.formatter,
|
|
166
|
-
i(m)(l.value),
|
|
167
|
-
i(W)({
|
|
168
|
-
p: e.value.style.dataLabel.prefix,
|
|
169
|
-
v: i(m)(l.value),
|
|
170
|
-
s: e.value.style.dataLabel.suffix,
|
|
171
|
-
r: e.value.style.dataLabel.rounding
|
|
172
|
-
}),
|
|
173
|
-
{ datapoint: i(m)(l.value), color: L.value }
|
|
174
|
-
)), 9, ne)
|
|
175
|
-
], 8, ee)) : v("", !0),
|
|
176
|
-
p.value ? v("", !0) : (n(), R(i(B), {
|
|
177
|
-
key: 2,
|
|
178
|
-
config: {
|
|
179
|
-
type: "gauge",
|
|
180
|
-
style: {
|
|
181
|
-
backgroundColor: e.value.style.background,
|
|
182
|
-
gauge: {
|
|
183
|
-
color: "#CCCCCC"
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}, null, 8, ["config"])),
|
|
188
|
-
e.value.style.title.show && f.value && e.value.style.title.position === "bottom" ? (n(), r("div", {
|
|
189
|
-
key: 3,
|
|
190
|
-
class: "vue-data-ui-sparkgauge-label",
|
|
191
|
-
style: y(`font-size:${e.value.style.title.fontSize}px;text-align:${e.value.style.title.textAlign};font-weight:${e.value.style.title.bold ? "bold" : "normal"};font-weight:${e.value.style.title.bold ? "bold" : "normal"};color:${e.value.style.title.color}`)
|
|
192
|
-
}, g(f.value), 5)) : v("", !0),
|
|
193
|
-
t.$slots.source ? (n(), r("div", ie, [
|
|
194
|
-
z(t.$slots, "source")
|
|
195
|
-
], 512)) : v("", !0)
|
|
196
|
-
], 4));
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
export {
|
|
200
|
-
fe as default
|
|
201
|
-
};
|
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
import { useCssVars as le, computed as _, defineAsyncComponent as N, onMounted as ae, ref as D, watch as se, createElementBlock as s, openBlock as a, normalizeStyle as $, createCommentVNode as c, createBlock as V, createElementVNode as h, createTextVNode as oe, toDisplayString as p, unref as n, createVNode as ie, renderSlot as I, Fragment as f, renderList as g, normalizeClass as E } from "vue";
|
|
2
|
-
import { u as ue, o as re, e as H, g as ne, c as ve, a as de, s as b, i as F, f as O, X as ce, w as z } from "./index-Cg-RjxqH.js";
|
|
3
|
-
import { u as W } from "./useNestedProp-C_G5E08Y.js";
|
|
4
|
-
import { u as ye } from "./useChartAccessibility-9icAAmYg.js";
|
|
5
|
-
import { _ as he } from "./Shape-C2qH26wh.js";
|
|
6
|
-
import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const ge = { key: 0 }, pe = { key: 1 }, be = ["xmlns", "viewBox"], me = ["width", "height"], _e = ["id"], xe = ["stop-color"], ke = ["stop-color"], we = ["id"], $e = ["stop-color"], Ce = ["stop-color"], Le = ["id"], ze = ["stop-color"], Se = ["stop-color"], Ae = { key: 1 }, Me = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], Ne = { key: 2 }, De = ["x", "y", "font-size", "font-weight", "fill"], Ve = ["x", "y", "font-size", "fill"], Ie = ["x", "y", "font-size", "fill"], Ee = ["height", "width", "x", "onMouseover", "stroke", "stroke-width", "rx", "stroke-dasharray", "onClick"], He = {
|
|
8
|
-
key: 2,
|
|
9
|
-
ref: "source",
|
|
10
|
-
dir: "auto"
|
|
11
|
-
}, Fe = {
|
|
12
|
-
__name: "vue-ui-sparkhistogram",
|
|
13
|
-
props: {
|
|
14
|
-
config: {
|
|
15
|
-
type: Object,
|
|
16
|
-
default() {
|
|
17
|
-
return {};
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
dataset: {
|
|
21
|
-
type: Array,
|
|
22
|
-
default() {
|
|
23
|
-
return [];
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
emits: ["selectDatapoint"],
|
|
28
|
-
setup(B, { emit: U }) {
|
|
29
|
-
le((l) => ({
|
|
30
|
-
"2d6ebc7a": J.value
|
|
31
|
-
}));
|
|
32
|
-
const j = N(() => import("./PackageVersion-CeEYZfaH.js")), R = N(() => import("./vue-ui-skeleton-CUOhCY4p.js")), { vue_ui_sparkhistogram: X } = ue(), d = B, S = _(() => !!d.dataset && d.dataset.length);
|
|
33
|
-
ae(() => {
|
|
34
|
-
A();
|
|
35
|
-
});
|
|
36
|
-
function A() {
|
|
37
|
-
re(d.dataset) ? H({
|
|
38
|
-
componentName: "VueUiSparkHistogram",
|
|
39
|
-
type: "dataset"
|
|
40
|
-
}) : d.dataset.forEach((l, u) => {
|
|
41
|
-
ne({
|
|
42
|
-
datasetObject: l,
|
|
43
|
-
requiredAttributes: ["value"]
|
|
44
|
-
}).forEach((t) => {
|
|
45
|
-
H({
|
|
46
|
-
componentName: "VueUiSparkHistogram",
|
|
47
|
-
type: "datasetSerieAttribute",
|
|
48
|
-
property: t,
|
|
49
|
-
index: u
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
const m = D(ve()), e = _({
|
|
55
|
-
get: () => M(),
|
|
56
|
-
set: (l) => l
|
|
57
|
-
}), { svgRef: G } = ye({ config: e.value.style.title });
|
|
58
|
-
function M() {
|
|
59
|
-
const l = W({
|
|
60
|
-
userConfig: d.config,
|
|
61
|
-
defaultConfig: X
|
|
62
|
-
});
|
|
63
|
-
return l.theme ? {
|
|
64
|
-
...W({
|
|
65
|
-
userConfig: de.vue_ui_sparkhistogram[l.theme] || d.config,
|
|
66
|
-
defaultConfig: l
|
|
67
|
-
})
|
|
68
|
-
} : l;
|
|
69
|
-
}
|
|
70
|
-
se(() => d.config, (l) => {
|
|
71
|
-
e.value = M(), A();
|
|
72
|
-
}, { deep: !0 });
|
|
73
|
-
const v = _(() => {
|
|
74
|
-
const l = e.value.style.layout.height, u = e.value.style.layout.width, t = e.value.style.layout.padding.top, o = l - e.value.style.layout.padding.bottom, y = e.value.style.layout.padding.left, x = u - e.value.style.layout.padding.right, k = t + (l - t - e.value.style.layout.padding.bottom) / 2, C = l - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom, w = u - e.value.style.layout.padding.left - e.value.style.layout.padding.right;
|
|
75
|
-
return {
|
|
76
|
-
bottom: o,
|
|
77
|
-
centerY: k,
|
|
78
|
-
drawingHeight: C,
|
|
79
|
-
drawingWidth: w,
|
|
80
|
-
height: l,
|
|
81
|
-
left: y,
|
|
82
|
-
right: x,
|
|
83
|
-
top: t,
|
|
84
|
-
width: u
|
|
85
|
-
};
|
|
86
|
-
}), Y = _(() => Math.max(...d.dataset.map((l) => Math.abs(l.value || 0))));
|
|
87
|
-
function q(l) {
|
|
88
|
-
return Math.abs(l) / Y.value;
|
|
89
|
-
}
|
|
90
|
-
const r = _(() => d.dataset.map((l, u) => {
|
|
91
|
-
const t = q(l.value || 0), o = v.value.drawingHeight * t, y = v.value.drawingWidth / d.dataset.length, x = y * (e.value.style.bars.gap / 100), k = y - x, C = v.value.centerY - o / 2, w = v.value.left + (x / 2 + u * y), K = v.value.left + u * y, L = typeof l.intensity > "u" ? 100 : Math.round(l.intensity * 100), Q = l.color ? l.color : l.value >= 0 ? b(e.value.style.bars.colors.positive, L) : b(e.value.style.bars.colors.negative, L), Z = l.color ? l.color : l.value >= 0 ? e.value.style.bars.colors.positive : e.value.style.bars.colors.negative, ee = l.color ? `url(#gradient_datapoint_${u}_${m.value})` : l.value >= 0 ? `url(#gradient_positive_${u}_${m.value})` : `url(#gradient_negative_${u}_${m.value})`, te = w + k / 2;
|
|
92
|
-
return {
|
|
93
|
-
...l,
|
|
94
|
-
color: Q,
|
|
95
|
-
gradient: ee,
|
|
96
|
-
height: o,
|
|
97
|
-
intensity: L,
|
|
98
|
-
proportion: t,
|
|
99
|
-
stroke: Z,
|
|
100
|
-
textAnchor: te,
|
|
101
|
-
trapX: K,
|
|
102
|
-
unitWidth: y,
|
|
103
|
-
width: k,
|
|
104
|
-
x: w,
|
|
105
|
-
y: C
|
|
106
|
-
};
|
|
107
|
-
})), i = D(null), P = U;
|
|
108
|
-
function T(l, u) {
|
|
109
|
-
P("selectDatapoint", { datapoint: l, index: u });
|
|
110
|
-
}
|
|
111
|
-
const J = _(() => `${e.value.style.animation.speedMs}ms`);
|
|
112
|
-
return (l, u) => (a(), s("div", {
|
|
113
|
-
class: "vue-ui-spark-histogram",
|
|
114
|
-
style: $(`width:100%;background:${e.value.style.backgroundColor};font-family:${e.value.style.fontFamily}`),
|
|
115
|
-
onMouseleave: u[1] || (u[1] = (t) => i.value = null)
|
|
116
|
-
}, [
|
|
117
|
-
e.value.style.title.text ? (a(), s("div", {
|
|
118
|
-
key: 0,
|
|
119
|
-
style: $(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${e.value.style.title.margin};padding: 0 6px;text-align:${e.value.style.title.textAlign}`)
|
|
120
|
-
}, [
|
|
121
|
-
h("div", {
|
|
122
|
-
style: $(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
|
|
123
|
-
}, [
|
|
124
|
-
oe(p(e.value.style.title.text) + " ", 1),
|
|
125
|
-
i.value !== null ? (a(), s("span", ge, "- " + p(r.value[i.value].timeLabel || "") + " " + p(n(F)(
|
|
126
|
-
e.value.style.labels.value.formatter,
|
|
127
|
-
r.value[i.value].value,
|
|
128
|
-
n(O)({
|
|
129
|
-
p: e.value.style.labels.value.prefix,
|
|
130
|
-
v: r.value[i.value].value,
|
|
131
|
-
s: e.value.style.labels.value.suffix,
|
|
132
|
-
r: e.value.style.labels.value.rounding
|
|
133
|
-
}),
|
|
134
|
-
{ datapoint: r.value[i.value], seriesIndex: i.value }
|
|
135
|
-
)), 1)) : c("", !0),
|
|
136
|
-
![void 0, null].includes(i.value) && ![null, void 0].includes(r.value[i.value].valueLabel) ? (a(), s("span", pe, "(" + p(r.value[i.value].valueLabel || 0) + ")", 1)) : c("", !0)
|
|
137
|
-
], 4),
|
|
138
|
-
e.value.style.title.subtitle.text ? (a(), s("div", {
|
|
139
|
-
key: 0,
|
|
140
|
-
style: $(`font-size:${e.value.style.title.subtitle.fontSize}px;color:${e.value.style.title.subtitle.color};font-weight:${e.value.style.title.subtitle.bold ? "bold" : "normal"}`)
|
|
141
|
-
}, p(e.value.style.title.subtitle.text), 5)) : c("", !0)
|
|
142
|
-
], 4)) : c("", !0),
|
|
143
|
-
S.value ? (a(), s("svg", {
|
|
144
|
-
key: 1,
|
|
145
|
-
ref_key: "svgRef",
|
|
146
|
-
ref: G,
|
|
147
|
-
xmlns: n(ce),
|
|
148
|
-
viewBox: `0 0 ${v.value.width} ${v.value.height}`,
|
|
149
|
-
style: { overflow: "visible" }
|
|
150
|
-
}, [
|
|
151
|
-
ie(n(j)),
|
|
152
|
-
l.$slots["chart-background"] ? (a(), s("foreignObject", {
|
|
153
|
-
key: 0,
|
|
154
|
-
x: 0,
|
|
155
|
-
y: 0,
|
|
156
|
-
width: v.value.width,
|
|
157
|
-
height: v.value.height,
|
|
158
|
-
style: {
|
|
159
|
-
pointerEvents: "none"
|
|
160
|
-
}
|
|
161
|
-
}, [
|
|
162
|
-
I(l.$slots, "chart-background", {}, void 0, !0)
|
|
163
|
-
], 8, me)) : c("", !0),
|
|
164
|
-
h("defs", null, [
|
|
165
|
-
(a(!0), s(f, null, g(r.value, (t, o) => (a(), s("radialGradient", {
|
|
166
|
-
id: `gradient_positive_${o}_${m.value}`,
|
|
167
|
-
cy: "50%",
|
|
168
|
-
cx: "50%",
|
|
169
|
-
r: "50%",
|
|
170
|
-
fx: "50%",
|
|
171
|
-
fy: "50%"
|
|
172
|
-
}, [
|
|
173
|
-
h("stop", {
|
|
174
|
-
offset: "0%",
|
|
175
|
-
"stop-color": n(b)(n(z)(e.value.style.bars.colors.positive, 0.05), t.intensity)
|
|
176
|
-
}, null, 8, xe),
|
|
177
|
-
h("stop", {
|
|
178
|
-
offset: "100%",
|
|
179
|
-
"stop-color": n(b)(e.value.style.bars.colors.positive, t.intensity)
|
|
180
|
-
}, null, 8, ke)
|
|
181
|
-
], 8, _e))), 256)),
|
|
182
|
-
(a(!0), s(f, null, g(r.value, (t, o) => (a(), s("radialGradient", {
|
|
183
|
-
id: `gradient_negative_${o}_${m.value}`,
|
|
184
|
-
cy: "50%",
|
|
185
|
-
cx: "50%",
|
|
186
|
-
r: "50%",
|
|
187
|
-
fx: "50%",
|
|
188
|
-
fy: "50%"
|
|
189
|
-
}, [
|
|
190
|
-
h("stop", {
|
|
191
|
-
offset: "0%",
|
|
192
|
-
"stop-color": n(b)(n(z)(e.value.style.bars.colors.negative, 0.05), t.intensity)
|
|
193
|
-
}, null, 8, $e),
|
|
194
|
-
h("stop", {
|
|
195
|
-
offset: "100%",
|
|
196
|
-
"stop-color": n(b)(e.value.style.bars.colors.negative, t.intensity)
|
|
197
|
-
}, null, 8, Ce)
|
|
198
|
-
], 8, we))), 256)),
|
|
199
|
-
(a(!0), s(f, null, g(r.value, (t, o) => (a(), s("radialGradient", {
|
|
200
|
-
id: `gradient_datapoint_${o}_${m.value}`,
|
|
201
|
-
cy: "50%",
|
|
202
|
-
cx: "50%",
|
|
203
|
-
r: "50%",
|
|
204
|
-
fx: "50%",
|
|
205
|
-
fy: "50%"
|
|
206
|
-
}, [
|
|
207
|
-
h("stop", {
|
|
208
|
-
offset: "0%",
|
|
209
|
-
"stop-color": n(b)(n(z)(t.color, 0.05), t.intensity)
|
|
210
|
-
}, null, 8, ze),
|
|
211
|
-
h("stop", {
|
|
212
|
-
offset: "100%",
|
|
213
|
-
"stop-color": n(b)(t.color, t.intensity)
|
|
214
|
-
}, null, 8, Se)
|
|
215
|
-
], 8, Le))), 256))
|
|
216
|
-
]),
|
|
217
|
-
!e.value.style.bars.shape || e.value.style.bars.shape === "square" ? (a(), s("g", Ae, [
|
|
218
|
-
(a(!0), s(f, null, g(r.value, (t, o) => (a(), s("rect", {
|
|
219
|
-
x: t.x,
|
|
220
|
-
y: t.y,
|
|
221
|
-
height: t.height,
|
|
222
|
-
width: t.width,
|
|
223
|
-
fill: e.value.style.bars.colors.gradient.show ? t.gradient : t.color,
|
|
224
|
-
stroke: t.stroke,
|
|
225
|
-
"stroke-width": e.value.style.bars.strokeWidth,
|
|
226
|
-
rx: `${e.value.style.bars.borderRadius * t.proportion / 12}%`,
|
|
227
|
-
class: E({ "vue-ui-sparkhistogram-shape": e.value.style.animation.show })
|
|
228
|
-
}, null, 10, Me))), 256))
|
|
229
|
-
])) : (a(), s("g", Ne, [
|
|
230
|
-
(a(!0), s(f, null, g(r.value, (t, o) => (a(), V(he, {
|
|
231
|
-
plot: { x: t.x + t.width / 2, y: t.y + t.height / 2 },
|
|
232
|
-
color: e.value.style.bars.colors.gradient.show ? t.gradient : t.color,
|
|
233
|
-
shape: e.value.style.bars.shape,
|
|
234
|
-
radius: t.height * 0.4,
|
|
235
|
-
class: E({ "vue-ui-sparkhistogram-shape": e.value.style.animation.show })
|
|
236
|
-
}, null, 8, ["plot", "color", "shape", "radius", "class"]))), 256))
|
|
237
|
-
])),
|
|
238
|
-
(a(!0), s(f, null, g(r.value, (t, o) => (a(), s("text", {
|
|
239
|
-
"text-anchor": "middle",
|
|
240
|
-
x: t.textAnchor,
|
|
241
|
-
y: t.y - e.value.style.labels.value.fontSize / 3 + e.value.style.labels.value.offsetY,
|
|
242
|
-
"font-size": e.value.style.labels.value.fontSize,
|
|
243
|
-
"font-weight": e.value.style.labels.value.bold ? "bold" : "normal",
|
|
244
|
-
fill: e.value.style.labels.value.color
|
|
245
|
-
}, p(n(F)(
|
|
246
|
-
e.value.style.labels.value.formatter,
|
|
247
|
-
t.value,
|
|
248
|
-
n(O)({
|
|
249
|
-
p: e.value.style.labels.value.prefix,
|
|
250
|
-
v: t.value,
|
|
251
|
-
s: e.value.style.labels.value.suffix,
|
|
252
|
-
r: e.value.style.labels.value.rounding
|
|
253
|
-
}),
|
|
254
|
-
{ datapoint: r.value[i.value], seriesIndex: i.value }
|
|
255
|
-
)), 9, De))), 256)),
|
|
256
|
-
(a(!0), s(f, null, g(r.value, (t, o) => (a(), s("g", null, [
|
|
257
|
-
t.valueLabel ? (a(), s("text", {
|
|
258
|
-
key: 0,
|
|
259
|
-
x: t.textAnchor,
|
|
260
|
-
y: t.y + t.height + e.value.style.labels.valueLabel.fontSize,
|
|
261
|
-
"font-size": e.value.style.labels.valueLabel.fontSize,
|
|
262
|
-
"text-anchor": "middle",
|
|
263
|
-
fill: e.value.style.labels.valueLabel.color
|
|
264
|
-
}, p(t.valueLabel), 9, Ve)) : c("", !0)
|
|
265
|
-
]))), 256)),
|
|
266
|
-
(a(!0), s(f, null, g(r.value, (t, o) => (a(), s("g", null, [
|
|
267
|
-
t.timeLabel ? (a(), s("text", {
|
|
268
|
-
key: 0,
|
|
269
|
-
x: t.textAnchor,
|
|
270
|
-
y: v.value.height - e.value.style.labels.timeLabel.fontSize / 2,
|
|
271
|
-
"font-size": e.value.style.labels.timeLabel.fontSize,
|
|
272
|
-
fill: e.value.style.labels.timeLabel.color,
|
|
273
|
-
"text-anchor": "middle"
|
|
274
|
-
}, p(t.timeLabel), 9, Ie)) : c("", !0)
|
|
275
|
-
]))), 256)),
|
|
276
|
-
(a(!0), s(f, null, g(r.value, (t, o) => (a(), s("g", null, [
|
|
277
|
-
h("rect", {
|
|
278
|
-
height: v.value.height,
|
|
279
|
-
width: t.unitWidth,
|
|
280
|
-
fill: "transparent",
|
|
281
|
-
x: t.trapX,
|
|
282
|
-
y: 0,
|
|
283
|
-
onMouseover: (y) => i.value = o,
|
|
284
|
-
onMouseleave: u[0] || (u[0] = (y) => i.value = null),
|
|
285
|
-
stroke: i.value !== null && i.value === o ? e.value.style.selector.stroke : "",
|
|
286
|
-
"stroke-width": i.value !== null && i.value === o ? e.value.style.selector.strokeWidth : 0,
|
|
287
|
-
rx: e.value.style.selector.borderRadius,
|
|
288
|
-
"stroke-dasharray": e.value.style.selector.strokeDasharray,
|
|
289
|
-
onClick: () => T(t, o)
|
|
290
|
-
}, null, 40, Ee)
|
|
291
|
-
]))), 256))
|
|
292
|
-
], 8, be)) : c("", !0),
|
|
293
|
-
l.$slots.source ? (a(), s("div", He, [
|
|
294
|
-
I(l.$slots, "source", {}, void 0, !0)
|
|
295
|
-
], 512)) : c("", !0),
|
|
296
|
-
S.value ? c("", !0) : (a(), V(n(R), {
|
|
297
|
-
key: 3,
|
|
298
|
-
config: {
|
|
299
|
-
type: "sparkHistogram",
|
|
300
|
-
style: {
|
|
301
|
-
backgroundColor: e.value.style.backgroundColor,
|
|
302
|
-
sparkHistogram: {
|
|
303
|
-
color: "#CCCCCC"
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}, null, 8, ["config"]))
|
|
308
|
-
], 36));
|
|
309
|
-
}
|
|
310
|
-
}, Xe = /* @__PURE__ */ fe(Fe, [["__scopeId", "data-v-4d2045fb"]]);
|
|
311
|
-
export {
|
|
312
|
-
Xe as default
|
|
313
|
-
};
|