vue-data-ui 2.12.6 → 2.12.7-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-Bd9ZVBnX.js → Arrow-CmqjRRUl.js} +1 -1
- package/dist/BaseDraggableDialog-BMlyvt7E.js +180 -0
- package/dist/{BaseIcon-CNbwMh_-.js → BaseIcon-CZdMutjs.js} +1 -1
- package/dist/{ColorPicker-B_FoQwtO.js → ColorPicker-DvVKgyAl.js} +23 -24
- package/dist/{DataTable-Rajdtaf6.js → DataTable-Cv9CIz-a.js} +11 -11
- package/dist/{Legend-BxtDQCIv.js → Legend-DFunFf8i.js} +8 -8
- package/dist/NonSvgPenAndPaper-pVuHj6_A.js +467 -0
- package/dist/PackageVersion-CLY-udAA.js +10 -0
- package/dist/{PenAndPaper-BkP3J-Ft.js → PenAndPaper-B9na2mbr.js} +8 -10
- package/dist/RecursiveCircles-Dn3TGoL6.js +96 -0
- package/dist/RecursiveLabels-NTMB9w5C.js +49 -0
- package/dist/RecursiveLinks-ld_gDZH4.js +64 -0
- package/dist/{Shape-C69a0f29.js → Shape-D3w9qas1.js} +2 -2
- package/dist/{Slicer-7qFdY-bT.js → Slicer-ncY8krrM.js} +2 -2
- package/dist/SparkTooltip-CwThutH2.js +68 -0
- package/dist/{Title-CzaCeCOm.js → Title-B5qqUI3M.js} +2 -2
- package/dist/Tooltip-C9rxJ-Ru.js +149 -0
- package/dist/{usePrinter-C5bLp34h.js → UserOptions-Ddy6CuLC.js} +172 -231
- package/dist/{dom-to-png-Bm0D0yPL.js → dom-to-png-DDlooC9r.js} +1 -1
- package/dist/{img-BN9AzqUr.js → img-m9g7lR5d.js} +1 -1
- package/dist/{index-BFzQMJda.js → index-BiHmNd1-.js} +21 -21
- package/dist/{pdf-uTbs813M.js → pdf-BqM953uL.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/useChartAccessibility-9icAAmYg.js +12 -0
- package/dist/useMouse-AicQS8Vf.js +13 -0
- package/dist/{useNestedProp-v7KPpwuP.js → useNestedProp-tRqS0ZAM.js} +1 -1
- package/dist/{usePanZoom-CUkkqW81.js → usePanZoom-BQMvRXEQ.js} +16 -17
- package/dist/usePrinter-CRCbl1WG.js +53 -0
- package/dist/vClickOutside-C6WiFswA.js +13 -0
- package/dist/{vue-data-ui-D1k8FeRp.js → vue-data-ui-D9uTDt73.js} +63 -63
- package/dist/vue-data-ui.js +19 -19
- package/dist/{vue-ui-3d-bar-DoklA4DT.js → vue-ui-3d-bar-rtuSc8FS.js} +397 -402
- package/dist/{vue-ui-accordion-BUz4JIIX.js → vue-ui-accordion-CmCs2yR2.js} +3 -3
- package/dist/{vue-ui-age-pyramid-4kyBq-Dy.js → vue-ui-age-pyramid-BrzMSiyu.js} +215 -218
- package/dist/{vue-ui-annotator-Bq1ZeFfb.js → vue-ui-annotator-CYxmTpf6.js} +2 -2
- package/dist/{vue-ui-bullet-DU10avvA.js → vue-ui-bullet-D25qNQfb.js} +137 -140
- package/dist/{vue-ui-candlestick-BI1t3flz.js → vue-ui-candlestick-BuerNa-r.js} +265 -271
- package/dist/{vue-ui-carousel-table-VowLf_oc.js → vue-ui-carousel-table-aN0HLsOO.js} +137 -137
- package/dist/{vue-ui-chestnut-BHjV3d94.js → vue-ui-chestnut-oUj2ocsZ.js} +397 -400
- package/dist/{vue-ui-chord-CPr7r-2_.js → vue-ui-chord-C4evlXYB.js} +356 -365
- package/dist/vue-ui-circle-pack-CWrNiKTY.js +656 -0
- package/dist/{vue-ui-cursor-C9teAbVI.js → vue-ui-cursor-DgpSttlt.js} +2 -2
- package/dist/{vue-ui-dashboard-CwDYB8tP.js → vue-ui-dashboard-BN2ha1Eh.js} +62 -62
- package/dist/{vue-ui-digits-CHmkL0hn.js → vue-ui-digits-BhjAxXgm.js} +2 -2
- package/dist/vue-ui-donut-D3_z61HI.js +1291 -0
- package/dist/vue-ui-donut-evolution-oKtmZPx4.js +864 -0
- package/dist/{vue-ui-dumbbell-DTKLLd1N.js → vue-ui-dumbbell-C8Lokx-F.js} +265 -270
- package/dist/{vue-ui-flow-BLBhsU2n.js → vue-ui-flow-BVRkH0PS.js} +291 -300
- package/dist/{vue-ui-funnel-CIrWdeBk.js → vue-ui-funnel-DFxcmAB5.js} +216 -219
- package/dist/{vue-ui-galaxy-ByhKyIV4.js → vue-ui-galaxy-CGE0hlBC.js} +227 -235
- package/dist/{vue-ui-gauge-BbfBMpng.js → vue-ui-gauge-B48eMvOR.js} +240 -243
- package/dist/{vue-ui-gizmo-BM-_QfHM.js → vue-ui-gizmo-zTKNpjvv.js} +57 -58
- package/dist/{vue-ui-heatmap-BA4z4hsw.js → vue-ui-heatmap-UNfTt8SM.js} +239 -242
- package/dist/{vue-ui-history-plot-8vM_IUy8.js → vue-ui-history-plot-CbCWmvtg.js} +257 -262
- package/dist/{vue-ui-kpi-D57QLK6A.js → vue-ui-kpi-Drf_lrlh.js} +29 -30
- package/dist/{vue-ui-mini-loader-CR4c-xJQ.js → vue-ui-mini-loader-DU3G6BVs.js} +2 -2
- package/dist/vue-ui-molecule-B5MOXYEA.js +580 -0
- package/dist/{vue-ui-mood-radar-Brc9cxoD.js → vue-ui-mood-radar-CC_CVLvn.js} +180 -186
- package/dist/{vue-ui-nested-donuts-W3Z5F--L.js → vue-ui-nested-donuts-D_H962kk.js} +366 -374
- package/dist/{vue-ui-onion-BNBlGNlF.js → vue-ui-onion-P8k6T724.js} +252 -258
- package/dist/{vue-ui-parallel-coordinate-plot-B5G3jyvg.js → vue-ui-parallel-coordinate-plot-B5Los0vX.js} +296 -303
- package/dist/{vue-ui-quadrant-CUy9mVIA.js → vue-ui-quadrant-B3wzCTxK.js} +402 -409
- package/dist/{vue-ui-quick-chart-D4_8mRXU.js → vue-ui-quick-chart-oucj6hXk.js} +611 -616
- package/dist/{vue-ui-radar-BUk56jGL.js → vue-ui-radar-Cjqlyu6d.js} +270 -277
- package/dist/{vue-ui-rating-B9TQl5KP.js → vue-ui-rating-gryk_h_6.js} +2 -2
- package/dist/vue-ui-relation-circle-ielvWC-1.js +525 -0
- package/dist/{vue-ui-ridgeline-Cl06bGom.js → vue-ui-ridgeline-Dydqo68b.js} +321 -326
- package/dist/{vue-ui-rings-B6bpFlFp.js → vue-ui-rings-BRBXektJ.js} +262 -269
- package/dist/{vue-ui-scatter--WUuVw5G.js → vue-ui-scatter-Df-BM7Ts.js} +372 -379
- package/dist/{vue-ui-skeleton-B_YI7Yuc.js → vue-ui-skeleton-CbYQYRvD.js} +19 -19
- package/dist/{vue-ui-smiley-Bbam2fDz.js → vue-ui-smiley-BfHaQMaW.js} +2 -2
- package/dist/{vue-ui-spark-trend-DavXuwGt.js → vue-ui-spark-trend-z3fUChs_.js} +114 -117
- package/dist/{vue-ui-sparkbar-9N1FU9-J.js → vue-ui-sparkbar-ChtFIugH.js} +104 -106
- package/dist/{vue-ui-sparkgauge-_9ntq4EK.js → vue-ui-sparkgauge-DtpODCww.js} +72 -74
- package/dist/{vue-ui-sparkhistogram-BEzOV4HV.js → vue-ui-sparkhistogram-C3XnYiXI.js} +83 -86
- package/dist/vue-ui-sparkline-CoL8jiX8.js +459 -0
- package/dist/{vue-ui-sparkstackbar-BSWcs3v0.js → vue-ui-sparkstackbar-CYk3mZJH.js} +102 -105
- package/dist/{vue-ui-stackbar-gG5BLlAr.js → vue-ui-stackbar-D9LGbuG5.js} +433 -437
- package/dist/{vue-ui-strip-plot-BJouRmxh.js → vue-ui-strip-plot-C5r1Ee2R.js} +245 -252
- package/dist/{vue-ui-table-D9Ry8s4N.js → vue-ui-table-DBaT_TfA.js} +3 -3
- package/dist/{vue-ui-table-heatmap-Bizzpi31.js → vue-ui-table-heatmap-CYW4YfKN.js} +93 -94
- package/dist/{vue-ui-table-sparkline-Dg54Ovs2.js → vue-ui-table-sparkline-Di0MYR4p.js} +212 -212
- package/dist/{vue-ui-thermometer-6MSdF_Gm.js → vue-ui-thermometer-BF1btHY2.js} +154 -157
- package/dist/{vue-ui-timer-ByaKokk8.js → vue-ui-timer-D9FfRWN5.js} +180 -181
- package/dist/vue-ui-tiremarks-CQ0lk8fJ.js +341 -0
- package/dist/vue-ui-treemap-1Lx7YRtc.js +947 -0
- package/dist/{vue-ui-vertical-bar-CE4oBwBv.js → vue-ui-vertical-bar-DdVVQ1ED.js} +397 -403
- package/dist/{vue-ui-waffle-DNEEnY_G.js → vue-ui-waffle-BhnuPiRD.js} +317 -324
- package/dist/vue-ui-wheel-BIjJ0fg8.js +335 -0
- package/dist/vue-ui-word-cloud-3-r8HwO_.js +642 -0
- package/dist/{vue-ui-world-Brhq17TE.js → vue-ui-world-CPIGEswq.js} +430 -442
- package/dist/{vue-ui-xy-K2G7QQxG.js → vue-ui-xy-9e_epIN4.js} +845 -846
- package/dist/vue-ui-xy-canvas-DcGgQ7s4.js +1206 -0
- package/package.json +6 -6
- package/dist/BaseDraggableDialog-Bzwlfmy1.js +0 -186
- package/dist/PackageVersion-BjrblLPQ.js +0 -10
- package/dist/Tooltip-CWmRmhJr.js +0 -158
- package/dist/useChartAccessibility-BWojgys7.js +0 -13
- package/dist/vue-ui-circle-pack-D_jYpsuD.js +0 -659
- package/dist/vue-ui-donut-WRUDvvZa.js +0 -1292
- package/dist/vue-ui-donut-evolution-BQxV5D_L.js +0 -871
- package/dist/vue-ui-molecule-Bq69N7rC.js +0 -782
- package/dist/vue-ui-relation-circle-T6aTibIU.js +0 -528
- package/dist/vue-ui-sparkline-D__GCUAz.js +0 -519
- package/dist/vue-ui-tiremarks-Z8pjUT1g.js +0 -344
- package/dist/vue-ui-treemap-pRJ3be5l.js +0 -956
- package/dist/vue-ui-wheel-DWPYZxdT.js +0 -338
- package/dist/vue-ui-word-cloud-DAR7R8F8.js +0 -648
- package/dist/vue-ui-xy-canvas-ml44sPHS.js +0 -1673
|
@@ -1,519 +0,0 @@
|
|
|
1
|
-
import { toRef as ge, ref as g, computed as f, onMounted as ie, watch as q, createElementBlock as d, openBlock as n, normalizeStyle as z, renderSlot as M, nextTick as be, createCommentVNode as h, createBlock as ee, normalizeProps as te, guardReactiveProps as ae, createElementVNode as b, toDisplayString as P, unref as c, createVNode as me, Fragment as E, renderList as B, withCtx as ke, createTextVNode as xe } from "vue";
|
|
2
|
-
import { s as W, a3 as le, u as _e, c as we, a as $e, C as oe, a4 as G, o as Ne, e as ue, g as Le, w as F, a5 as Ce, a6 as Me, X as Se, U as se, T as Ie, a7 as re, i as X, f as j } from "./index-BFzQMJda.js";
|
|
3
|
-
import { u as ne } from "./useNestedProp-v7KPpwuP.js";
|
|
4
|
-
import Ve from "./vue-ui-skeleton-B_YI7Yuc.js";
|
|
5
|
-
import { t as Re, u as ze } from "./useResponsive-JZ9xq-JV.js";
|
|
6
|
-
import { _ as We } from "./PackageVersion-BjrblLPQ.js";
|
|
7
|
-
import { u as Ae } from "./useChartAccessibility-BWojgys7.js";
|
|
8
|
-
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
-
const Te = {
|
|
10
|
-
__name: "SparkTooltip",
|
|
11
|
-
props: {
|
|
12
|
-
svgRef: { type: Object },
|
|
13
|
-
x: { type: Number, required: !0 },
|
|
14
|
-
y: { type: Number, required: !0 },
|
|
15
|
-
prevX: { type: Number, required: !0 },
|
|
16
|
-
prevY: { type: Number, required: !0 },
|
|
17
|
-
offsetY: { type: Number, default: 0 },
|
|
18
|
-
background: { type: String },
|
|
19
|
-
backgroundOpacity: { type: Number, default: 100 },
|
|
20
|
-
borderRadius: { type: Number, default: 2 },
|
|
21
|
-
borderWidth: { type: Number, default: 0 },
|
|
22
|
-
borderColor: { type: String, default: "#FFFFFF" },
|
|
23
|
-
color: { type: String },
|
|
24
|
-
fontSize: { type: Number }
|
|
25
|
-
},
|
|
26
|
-
setup(m) {
|
|
27
|
-
const v = m, S = ge(v.svgRef), o = g(null), k = g(0), p = g(0), _ = g(!1), A = f(() => W(v.background, v.backgroundOpacity)), I = async () => {
|
|
28
|
-
if (!S.value || !o.value) return;
|
|
29
|
-
const e = le({
|
|
30
|
-
svgElement: S.value,
|
|
31
|
-
element: o.value,
|
|
32
|
-
x: v.x,
|
|
33
|
-
y: v.y,
|
|
34
|
-
offsetY: v.offsetY
|
|
35
|
-
}), w = le({
|
|
36
|
-
svgElement: S.value,
|
|
37
|
-
element: o.value,
|
|
38
|
-
x: v.prevX,
|
|
39
|
-
y: v.prevY,
|
|
40
|
-
offsetY: v.offsetY
|
|
41
|
-
});
|
|
42
|
-
!e || !w || (_.value = !1, k.value = w.top, p.value = w.left, await be(), setTimeout(() => {
|
|
43
|
-
_.value = !0, k.value = e.top, p.value = e.left;
|
|
44
|
-
}, 50));
|
|
45
|
-
};
|
|
46
|
-
return ie(I), q(
|
|
47
|
-
() => [v.x, v.y, v.prevX, v.prevY],
|
|
48
|
-
() => I(),
|
|
49
|
-
{ immediate: !0 }
|
|
50
|
-
), (e, w) => (n(), d("div", {
|
|
51
|
-
ref_key: "tooltipRef",
|
|
52
|
-
ref: o,
|
|
53
|
-
class: "vue-data-ui-spark-tooltip",
|
|
54
|
-
style: z({
|
|
55
|
-
position: "fixed",
|
|
56
|
-
top: `${k.value}px`,
|
|
57
|
-
left: `${p.value}px`,
|
|
58
|
-
pointerEvents: "none",
|
|
59
|
-
background: A.value,
|
|
60
|
-
color: v.color,
|
|
61
|
-
fontSize: `${v.fontSize}px`,
|
|
62
|
-
borderRadius: `${v.borderRadius}px`,
|
|
63
|
-
border: `${v.borderWidth}px solid ${v.borderColor}`,
|
|
64
|
-
transition: _.value ? "top 0.3s ease-out, left 0.3s ease-out" : "none"
|
|
65
|
-
})
|
|
66
|
-
}, [
|
|
67
|
-
M(e.$slots, "default", {}, void 0, !0)
|
|
68
|
-
], 4));
|
|
69
|
-
}
|
|
70
|
-
}, Pe = /* @__PURE__ */ de(Te, [["__scopeId", "data-v-c8e27542"]]), Fe = ["id"], Oe = ["xmlns", "viewBox"], Ye = ["width", "height"], De = ["id"], Ee = ["stop-color"], Be = ["stop-color"], Ge = ["id"], Xe = ["stop-color"], je = ["stop-color"], qe = ["id"], Ue = ["stop-color"], Ze = ["stop-color"], He = { key: 1 }, Je = ["d", "fill"], Ke = ["d", "fill"], Qe = ["d", "stroke", "stroke-width"], et = ["d", "stroke", "stroke-width"], tt = ["x", "y", "width", "height", "fill", "rx"], at = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], lt = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], ot = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ut = ["x", "y", "font-size", "font-weight", "fill"], st = ["x", "y", "height", "width", "onMouseenter", "onClick"], rt = {
|
|
71
|
-
__name: "vue-ui-sparkline",
|
|
72
|
-
props: {
|
|
73
|
-
config: {
|
|
74
|
-
type: Object,
|
|
75
|
-
default() {
|
|
76
|
-
return {};
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
dataset: {
|
|
80
|
-
type: Array,
|
|
81
|
-
default() {
|
|
82
|
-
return [];
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
showInfo: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: !0
|
|
88
|
-
},
|
|
89
|
-
selectedIndex: {
|
|
90
|
-
type: Number,
|
|
91
|
-
default: void 0
|
|
92
|
-
},
|
|
93
|
-
heightRatio: {
|
|
94
|
-
type: Number,
|
|
95
|
-
default: 1
|
|
96
|
-
},
|
|
97
|
-
forcedPadding: {
|
|
98
|
-
type: Number,
|
|
99
|
-
default: 30
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
emits: ["hoverIndex", "selectDatapoint"],
|
|
103
|
-
setup(m, { emit: v }) {
|
|
104
|
-
const { vue_ui_sparkline: S } = _e(), o = m, k = f(() => Array.isArray(o.dataset) && o.dataset.length > 0), p = g(we()), _ = g(null), A = g(null), I = g(null), e = f({
|
|
105
|
-
get: () => U(),
|
|
106
|
-
set: (t) => t
|
|
107
|
-
}), { svgRef: w } = Ae({ config: e.value.style.title });
|
|
108
|
-
function U() {
|
|
109
|
-
const t = ne({
|
|
110
|
-
userConfig: o.config,
|
|
111
|
-
defaultConfig: S
|
|
112
|
-
});
|
|
113
|
-
let l = {};
|
|
114
|
-
return t.theme ? l = {
|
|
115
|
-
...ne({
|
|
116
|
-
userConfig: $e.vue_ui_sparkline[t.theme] || o.config,
|
|
117
|
-
defaultConfig: t
|
|
118
|
-
})
|
|
119
|
-
} : l = t, o.config && oe(o.config, "style.scaleMin") ? l.style.scaleMin = o.config.style.scaleMin : l.style.scaleMin = null, o.config && oe(o.config, "style.scaleMax") ? l.style.scaleMax = o.config.style.scaleMax : l.style.scaleMax = null, l;
|
|
120
|
-
}
|
|
121
|
-
const T = f(() => G({
|
|
122
|
-
data: o.dataset,
|
|
123
|
-
threshold: e.value.downsample.threshold
|
|
124
|
-
}));
|
|
125
|
-
q(() => o.config, (t) => {
|
|
126
|
-
e.value = U(), H(), u.value.chartWidth = e.value.style.chartWidth;
|
|
127
|
-
}, { deep: !0 }), q(() => o.dataset, (t) => {
|
|
128
|
-
$.value = G({
|
|
129
|
-
data: o.dataset.map((l) => ({
|
|
130
|
-
...l,
|
|
131
|
-
value: [void 0].includes(l.value) ? null : l.value
|
|
132
|
-
})),
|
|
133
|
-
threshold: e.value.downsample.threshold
|
|
134
|
-
});
|
|
135
|
-
}, { deep: !0 });
|
|
136
|
-
const $ = g(ve());
|
|
137
|
-
function ve() {
|
|
138
|
-
return G({
|
|
139
|
-
data: o.dataset.map((t) => e.value.style.animation.show && o.dataset.length > 1 ? {
|
|
140
|
-
...t,
|
|
141
|
-
value: null
|
|
142
|
-
} : {
|
|
143
|
-
...t,
|
|
144
|
-
value: [void 0].includes(t.value) ? null : t.value
|
|
145
|
-
}),
|
|
146
|
-
threshold: e.value.downsample.threshold
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
const Z = g(null);
|
|
150
|
-
ie(() => {
|
|
151
|
-
if (H(), e.value.style.animation.show && o.dataset.length > 1) {
|
|
152
|
-
let a = function() {
|
|
153
|
-
l < T.value.length ? ($.value.push(T.value[l]), setTimeout(() => {
|
|
154
|
-
requestAnimationFrame(a);
|
|
155
|
-
}, t)) : $.value = T.value, l += 1;
|
|
156
|
-
};
|
|
157
|
-
$.value = [];
|
|
158
|
-
const t = e.value.style.animation.animationFrames / o.dataset.length;
|
|
159
|
-
let l = 0;
|
|
160
|
-
a();
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
function H() {
|
|
164
|
-
if (Ne(o.dataset) ? ue({
|
|
165
|
-
componentName: "VueUiSparkline",
|
|
166
|
-
type: "dataset"
|
|
167
|
-
}) : o.dataset.forEach((t, l) => {
|
|
168
|
-
Le({
|
|
169
|
-
datasetObject: t,
|
|
170
|
-
requiredAttributes: ["period", "value"]
|
|
171
|
-
}).forEach((a) => {
|
|
172
|
-
ue({
|
|
173
|
-
componentName: "VueUiSparkline",
|
|
174
|
-
type: "datasetSerieAttribute",
|
|
175
|
-
property: a,
|
|
176
|
-
index: l
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
}), e.value.responsive) {
|
|
180
|
-
const t = Re(() => {
|
|
181
|
-
const { width: l, height: a } = ze({
|
|
182
|
-
chart: _.value,
|
|
183
|
-
title: e.value.style.title.show && o.showInfo ? A.value : null,
|
|
184
|
-
source: I.value
|
|
185
|
-
});
|
|
186
|
-
requestAnimationFrame(() => {
|
|
187
|
-
u.value.width = l, u.value.height = a, u.value.chartWidth = e.value.style.chartWidth / 500 * l, u.value.padding = o.forcedPadding / 500 * l;
|
|
188
|
-
});
|
|
189
|
-
});
|
|
190
|
-
Z.value = new ResizeObserver(t), Z.value.observe(_.value.parentNode);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
const u = g({
|
|
194
|
-
height: 80 * o.heightRatio,
|
|
195
|
-
width: 500,
|
|
196
|
-
chartWidth: e.value.style.chartWidth,
|
|
197
|
-
padding: o.forcedPadding
|
|
198
|
-
}), O = v, s = f(() => {
|
|
199
|
-
const { top: t, right: l, bottom: a, left: r } = e.value.style.padding;
|
|
200
|
-
return {
|
|
201
|
-
top: t,
|
|
202
|
-
left: r,
|
|
203
|
-
right: u.value.width - l,
|
|
204
|
-
bottom: u.value.height - a,
|
|
205
|
-
start: o.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? u.value.width - u.value.chartWidth + r : u.value.padding + r,
|
|
206
|
-
width: o.showInfo && e.value.style.dataLabel.show ? u.value.chartWidth - r - l : u.value.width - u.value.padding - r - l,
|
|
207
|
-
height: u.value.height - t - a
|
|
208
|
-
};
|
|
209
|
-
}), Y = f(() => [null, void 0].includes(e.value.style.scaleMin) ? Math.min(...$.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0)) : e.value.style.scaleMin), ce = f(() => [null, void 0].includes(e.value.style.scaleMax) ? Math.max(...$.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0)) : e.value.style.scaleMax), V = f(() => {
|
|
210
|
-
const t = Y.value >= 0 ? 0 : Y.value;
|
|
211
|
-
return Math.abs(t);
|
|
212
|
-
}), J = f(() => ce.value + V.value), L = f(() => s.value.bottom - s.value.height * D(V.value));
|
|
213
|
-
function D(t) {
|
|
214
|
-
return isNaN(t / J.value) ? 0 : t / J.value;
|
|
215
|
-
}
|
|
216
|
-
const N = f(() => T.value.length - 1), y = f(() => $.value.map((t, l) => {
|
|
217
|
-
const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0, r = s.value.width / (N.value + 1) > u.padding ? u.padding : s.value.width / (N.value + 1);
|
|
218
|
-
return {
|
|
219
|
-
absoluteValue: a,
|
|
220
|
-
period: t.period,
|
|
221
|
-
plotValue: a + V.value,
|
|
222
|
-
toMax: D(a + V.value),
|
|
223
|
-
x: s.value.start + l * (r > s.value.width / 12 ? s.value.width / 12 : r),
|
|
224
|
-
y: s.value.bottom - s.value.height * D(a + V.value),
|
|
225
|
-
id: `plot_${p.value}_${l}`,
|
|
226
|
-
color: R.value ? e.value.style.bar.color : e.value.style.area.useGradient ? F(e.value.style.line.color, 0.05 * (1 - l / N.value)) : e.value.style.line.color,
|
|
227
|
-
width: r > s.value.width / 12 ? s.value.width / 12 : r
|
|
228
|
-
};
|
|
229
|
-
})), ye = f(() => {
|
|
230
|
-
const t = { x: y.value[0].x || 0, y: (u.value.height || 0) - 6 }, l = { x: y.value[y.value.length - 1].x || 0, y: (u.value.height || 0) - 6 }, a = [];
|
|
231
|
-
return y.value.forEach((r) => {
|
|
232
|
-
a.push(`${r.x || 0},${r.y || 0} `);
|
|
233
|
-
}), [t.x, t.y, ...a, l.x, l.y].toString();
|
|
234
|
-
}), i = g(void 0), C = g(void 0);
|
|
235
|
-
function fe(t, l) {
|
|
236
|
-
i.value = t, C.value || (C.value = t), O("hoverIndex", { index: l });
|
|
237
|
-
}
|
|
238
|
-
function he() {
|
|
239
|
-
C.value = i.value, i.value = void 0, O("hoverIndex", { index: void 0 });
|
|
240
|
-
}
|
|
241
|
-
const x = f(() => {
|
|
242
|
-
if (k.value) {
|
|
243
|
-
const t = y.value.map((a) => a.absoluteValue), l = t.reduce((a, r) => a + r, 0);
|
|
244
|
-
return {
|
|
245
|
-
latest: y.value[y.value.length - 1].absoluteValue,
|
|
246
|
-
sum: l,
|
|
247
|
-
average: l / y.value.length,
|
|
248
|
-
median: Me(t),
|
|
249
|
-
trend: Ce(y.value.map(({ x: a, y: r, absoluteValue: Q }) => ({
|
|
250
|
-
x: a,
|
|
251
|
-
y: r,
|
|
252
|
-
value: Q
|
|
253
|
-
}))).trend
|
|
254
|
-
};
|
|
255
|
-
} else
|
|
256
|
-
return {
|
|
257
|
-
latest: null,
|
|
258
|
-
sum: null,
|
|
259
|
-
average: null,
|
|
260
|
-
median: null,
|
|
261
|
-
trend: null
|
|
262
|
-
};
|
|
263
|
-
}), K = f(() => k.value ? e.value.style.dataLabel.valueType === "latest" ? x.value.latest : e.value.style.dataLabel.valueType === "sum" ? x.value.sum : e.value.style.dataLabel.valueType === "average" ? x.value.average : 0 : 0), R = f(() => e.value.type && e.value.type === "bar");
|
|
264
|
-
function pe(t, l) {
|
|
265
|
-
O("selectDatapoint", { datapoint: t, index: l });
|
|
266
|
-
}
|
|
267
|
-
return (t, l) => (n(), d("div", {
|
|
268
|
-
ref_key: "sparklineChart",
|
|
269
|
-
ref: _,
|
|
270
|
-
class: "vue-ui-sparkline",
|
|
271
|
-
id: p.value,
|
|
272
|
-
style: z(`width:100%;font-family:${e.value.style.fontFamily};`)
|
|
273
|
-
}, [
|
|
274
|
-
M(t.$slots, "before", te(ae({
|
|
275
|
-
selected: i.value,
|
|
276
|
-
latest: x.value.latest,
|
|
277
|
-
sum: x.value.sum,
|
|
278
|
-
average: x.value.average,
|
|
279
|
-
median: x.value.median,
|
|
280
|
-
trend: x.value.trend
|
|
281
|
-
})), void 0, !0),
|
|
282
|
-
e.value.style.title.show && m.showInfo ? (n(), d("div", {
|
|
283
|
-
key: 0,
|
|
284
|
-
ref_key: "chartTitle",
|
|
285
|
-
ref: A,
|
|
286
|
-
class: "vue-ui-sparkline-title",
|
|
287
|
-
style: z(`display:flex;align-items:center;width:100%;color:${e.value.style.title.color};background:${e.value.style.backgroundColor};justify-content:${e.value.style.title.textAlign === "left" ? "flex-start" : e.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${e.value.style.title.fontSize * 2}px;font-size:${e.value.style.title.fontSize}px;font-weight:${e.value.style.title.bold ? "bold" : "normal"};`)
|
|
288
|
-
}, [
|
|
289
|
-
b("span", {
|
|
290
|
-
style: z(`padding:${e.value.style.title.textAlign === "left" ? "0 0 0 12px" : e.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
|
|
291
|
-
}, P(i.value ? i.value.period : e.value.style.title.text), 5)
|
|
292
|
-
], 4)) : h("", !0),
|
|
293
|
-
k.value ? (n(), d("svg", {
|
|
294
|
-
key: 1,
|
|
295
|
-
ref_key: "svgRef",
|
|
296
|
-
ref: w,
|
|
297
|
-
xmlns: c(Se),
|
|
298
|
-
viewBox: `0 0 ${u.value.width} ${u.value.height}`,
|
|
299
|
-
style: z(`background:${e.value.style.backgroundColor};overflow:visible`),
|
|
300
|
-
onMouseleave: l[0] || (l[0] = (a) => C.value = void 0)
|
|
301
|
-
}, [
|
|
302
|
-
me(We),
|
|
303
|
-
t.$slots["chart-background"] ? (n(), d("foreignObject", {
|
|
304
|
-
key: 0,
|
|
305
|
-
x: 0,
|
|
306
|
-
y: 0,
|
|
307
|
-
width: u.value.width <= 0 ? 10 : u.value.width,
|
|
308
|
-
height: u.value.height <= 0 ? 10 : u.value.height,
|
|
309
|
-
style: {
|
|
310
|
-
pointerEvents: "none"
|
|
311
|
-
}
|
|
312
|
-
}, [
|
|
313
|
-
M(t.$slots, "chart-background", {}, void 0, !0)
|
|
314
|
-
], 8, Ye)) : h("", !0),
|
|
315
|
-
b("defs", null, [
|
|
316
|
-
b("linearGradient", {
|
|
317
|
-
x1: "0%",
|
|
318
|
-
y1: "0%",
|
|
319
|
-
x2: "100%",
|
|
320
|
-
y2: "0%",
|
|
321
|
-
id: `sparkline_gradient_${p.value}`
|
|
322
|
-
}, [
|
|
323
|
-
b("stop", {
|
|
324
|
-
offset: "0%",
|
|
325
|
-
"stop-color": c(W)(c(F)(e.value.style.area.color, 0.05), e.value.style.area.opacity)
|
|
326
|
-
}, null, 8, Ee),
|
|
327
|
-
b("stop", {
|
|
328
|
-
offset: "100%",
|
|
329
|
-
"stop-color": c(W)(e.value.style.area.color, e.value.style.area.opacity)
|
|
330
|
-
}, null, 8, Be)
|
|
331
|
-
], 8, De),
|
|
332
|
-
b("linearGradient", {
|
|
333
|
-
x2: "0%",
|
|
334
|
-
y2: "100%",
|
|
335
|
-
id: `sparkline_bar_gradient_pos_${p.value}`
|
|
336
|
-
}, [
|
|
337
|
-
b("stop", {
|
|
338
|
-
offset: "0%",
|
|
339
|
-
"stop-color": e.value.style.bar.color
|
|
340
|
-
}, null, 8, Xe),
|
|
341
|
-
b("stop", {
|
|
342
|
-
offset: "100%",
|
|
343
|
-
"stop-color": c(F)(e.value.style.bar.color, 0.05)
|
|
344
|
-
}, null, 8, je)
|
|
345
|
-
], 8, Ge),
|
|
346
|
-
b("linearGradient", {
|
|
347
|
-
x2: "0%",
|
|
348
|
-
y2: "100%",
|
|
349
|
-
id: `sparkline_bar_gradient_neg_${p.value}`
|
|
350
|
-
}, [
|
|
351
|
-
b("stop", {
|
|
352
|
-
offset: "0%",
|
|
353
|
-
"stop-color": c(F)(e.value.style.bar.color, 0.05)
|
|
354
|
-
}, null, 8, Ue),
|
|
355
|
-
b("stop", {
|
|
356
|
-
offset: "100%",
|
|
357
|
-
"stop-color": e.value.style.bar.color
|
|
358
|
-
}, null, 8, Ze)
|
|
359
|
-
], 8, qe)
|
|
360
|
-
]),
|
|
361
|
-
e.value.style.area.show && !R.value && y.value[0] ? (n(), d("g", He, [
|
|
362
|
-
e.value.style.line.smooth ? (n(), d("path", {
|
|
363
|
-
key: 0,
|
|
364
|
-
d: `M ${y.value[0].x},${s.value.bottom} ${c(se)(y.value)} L ${y.value.at(-1).x},${s.value.bottom} Z`,
|
|
365
|
-
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : c(W)(e.value.style.area.color, e.value.style.area.opacity)
|
|
366
|
-
}, null, 8, Je)) : (n(), d("path", {
|
|
367
|
-
key: 1,
|
|
368
|
-
d: `M${ye.value}Z`,
|
|
369
|
-
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : c(W)(e.value.style.area.color, e.value.style.area.opacity)
|
|
370
|
-
}, null, 8, Ke))
|
|
371
|
-
])) : h("", !0),
|
|
372
|
-
e.value.style.line.smooth && !R.value ? (n(), d("path", {
|
|
373
|
-
key: 2,
|
|
374
|
-
d: `M ${c(se)(y.value)}`,
|
|
375
|
-
stroke: e.value.style.line.color,
|
|
376
|
-
fill: "none",
|
|
377
|
-
"stroke-width": e.value.style.line.strokeWidth,
|
|
378
|
-
"stroke-linecap": "round"
|
|
379
|
-
}, null, 8, Qe)) : h("", !0),
|
|
380
|
-
!e.value.style.line.smooth && !R.value ? (n(), d("path", {
|
|
381
|
-
key: 3,
|
|
382
|
-
d: `M ${c(Ie)(y.value)}`,
|
|
383
|
-
stroke: e.value.style.line.color,
|
|
384
|
-
fill: "none",
|
|
385
|
-
"stroke-width": e.value.style.line.strokeWidth,
|
|
386
|
-
"stroke-linecap": "round"
|
|
387
|
-
}, null, 8, et)) : h("", !0),
|
|
388
|
-
(n(!0), d(E, null, B(y.value, (a, r) => (n(), d("g", null, [
|
|
389
|
-
R.value ? (n(), d("rect", {
|
|
390
|
-
key: 0,
|
|
391
|
-
x: a.x - a.width / 2,
|
|
392
|
-
y: isNaN(a.absoluteValue > 0 ? a.y : L.value) ? 0 : a.absoluteValue > 0 ? a.y : L.value,
|
|
393
|
-
width: a.width,
|
|
394
|
-
height: isNaN(Math.abs(a.y - L.value)) ? 0 : Math.abs(a.y - L.value),
|
|
395
|
-
fill: a.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${p.value})` : `url(#sparkline_bar_gradient_neg_${p.value})`,
|
|
396
|
-
rx: e.value.style.bar.borderRadius
|
|
397
|
-
}, null, 8, tt)) : h("", !0),
|
|
398
|
-
e.value.style.verticalIndicator.show && (i.value && a.id === i.value.id || m.selectedIndex === r) ? (n(), d("line", {
|
|
399
|
-
key: 1,
|
|
400
|
-
x1: a.x,
|
|
401
|
-
x2: a.x,
|
|
402
|
-
y1: s.value.top - 6,
|
|
403
|
-
y2: s.value.bottom,
|
|
404
|
-
stroke: e.value.style.verticalIndicator.color || a.color,
|
|
405
|
-
"stroke-width": e.value.style.verticalIndicator.strokeWidth,
|
|
406
|
-
"stroke-linecap": "round",
|
|
407
|
-
"stroke-dasharray": e.value.style.verticalIndicator.strokeDasharray || 0
|
|
408
|
-
}, null, 8, at)) : h("", !0)
|
|
409
|
-
]))), 256)),
|
|
410
|
-
Y.value < 0 ? (n(), d("line", {
|
|
411
|
-
key: 4,
|
|
412
|
-
x1: s.value.start,
|
|
413
|
-
x2: s.value.start + s.value.width - 16,
|
|
414
|
-
y1: c(re)(L.value, s.value.bottom),
|
|
415
|
-
y2: c(re)(L.value, s.value.bottom),
|
|
416
|
-
stroke: e.value.style.zeroLine.color,
|
|
417
|
-
"stroke-dasharray": e.value.style.zeroLine.strokeWidth * 2,
|
|
418
|
-
"stroke-width": e.value.style.zeroLine.strokeWidth,
|
|
419
|
-
"stroke-linecap": "round"
|
|
420
|
-
}, null, 8, lt)) : h("", !0),
|
|
421
|
-
e.value.style.plot.show ? (n(!0), d(E, { key: 5 }, B(y.value, (a, r) => (n(), d("g", null, [
|
|
422
|
-
i.value && a.id === i.value.id || m.selectedIndex === r || m.dataset.length === 1 ? (n(), d("circle", {
|
|
423
|
-
key: 0,
|
|
424
|
-
cx: a.x,
|
|
425
|
-
cy: a.y,
|
|
426
|
-
r: e.value.style.plot.radius,
|
|
427
|
-
fill: a.color,
|
|
428
|
-
stroke: e.value.style.plot.stroke,
|
|
429
|
-
"stroke-width": e.value.style.plot.strokeWidth
|
|
430
|
-
}, null, 8, ot)) : h("", !0)
|
|
431
|
-
]))), 256)) : h("", !0),
|
|
432
|
-
m.showInfo && e.value.style.dataLabel.show ? (n(), d("text", {
|
|
433
|
-
key: 6,
|
|
434
|
-
x: e.value.style.dataLabel.position === "left" ? 12 + e.value.style.dataLabel.offsetX : s.value.width + 12 + e.value.style.dataLabel.offsetX,
|
|
435
|
-
y: u.value.height / 2 + e.value.style.dataLabel.fontSize / 2.5 + e.value.style.dataLabel.offsetY,
|
|
436
|
-
"font-size": e.value.style.dataLabel.fontSize,
|
|
437
|
-
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal",
|
|
438
|
-
fill: e.value.style.dataLabel.color
|
|
439
|
-
}, P(i.value ? c(X)(
|
|
440
|
-
e.value.style.dataLabel.formatter,
|
|
441
|
-
i.value.absoluteValue,
|
|
442
|
-
c(j)({ p: e.value.style.dataLabel.prefix, v: i.value.absoluteValue, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue }),
|
|
443
|
-
{ datapoint: i.value }
|
|
444
|
-
) : c(X)(
|
|
445
|
-
e.value.style.dataLabel.formatter,
|
|
446
|
-
K.value,
|
|
447
|
-
c(j)({ p: e.value.style.dataLabel.prefix, v: K.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })
|
|
448
|
-
)), 9, ut)) : h("", !0),
|
|
449
|
-
(n(!0), d(E, null, B(y.value, (a, r) => (n(), d("rect", {
|
|
450
|
-
x: a.x - (s.value.width / (N.value + 1) > u.value.padding ? u.value.padding : s.value.width / (N.value + 1)) / 2,
|
|
451
|
-
y: s.value.top - 6,
|
|
452
|
-
height: s.value.height + 6,
|
|
453
|
-
width: s.value.width / (N.value + 1) > u.value.padding ? u.value.padding : s.value.width / (N.value + 1),
|
|
454
|
-
fill: "transparent",
|
|
455
|
-
onMouseenter: (Q) => fe(a, r),
|
|
456
|
-
onMouseleave: he,
|
|
457
|
-
onClick: () => pe(a, r)
|
|
458
|
-
}, null, 40, st))), 256)),
|
|
459
|
-
M(t.$slots, "svg", { svg: u.value }, void 0, !0)
|
|
460
|
-
], 44, Oe)) : h("", !0),
|
|
461
|
-
i.value && e.value.style.tooltip.show ? (n(), ee(Pe, {
|
|
462
|
-
key: 2,
|
|
463
|
-
x: i.value.x,
|
|
464
|
-
y: i.value.y,
|
|
465
|
-
prevX: C.value.x,
|
|
466
|
-
prevY: C.value.y,
|
|
467
|
-
offsetY: e.value.style.plot.radius * 3 + e.value.style.tooltip.offsetY,
|
|
468
|
-
svgRef: c(w),
|
|
469
|
-
background: e.value.style.tooltip.backgroundColor,
|
|
470
|
-
color: e.value.style.tooltip.color,
|
|
471
|
-
fontSize: e.value.style.tooltip.fontSize,
|
|
472
|
-
borderWidth: e.value.style.tooltip.borderWidth,
|
|
473
|
-
borderColor: e.value.style.tooltip.borderColor,
|
|
474
|
-
borderRadius: e.value.style.tooltip.borderRadius,
|
|
475
|
-
backgroundOpacity: e.value.style.tooltip.backgroundOpacity
|
|
476
|
-
}, {
|
|
477
|
-
default: ke(() => [
|
|
478
|
-
M(t.$slots, "tooltip", te(ae({ ...i.value })), () => [
|
|
479
|
-
xe(P(i.value.period) + ": " + P(c(X)(
|
|
480
|
-
e.value.style.dataLabel.formatter,
|
|
481
|
-
i.value.absoluteValue,
|
|
482
|
-
c(j)({
|
|
483
|
-
p: e.value.style.dataLabel.prefix,
|
|
484
|
-
v: i.value.absoluteValue,
|
|
485
|
-
s: e.value.style.dataLabel.suffix,
|
|
486
|
-
r: e.value.style.dataLabel.roundingValue
|
|
487
|
-
}),
|
|
488
|
-
{ datapoint: i.value }
|
|
489
|
-
)), 1)
|
|
490
|
-
], !0)
|
|
491
|
-
]),
|
|
492
|
-
_: 3
|
|
493
|
-
}, 8, ["x", "y", "prevX", "prevY", "offsetY", "svgRef", "background", "color", "fontSize", "borderWidth", "borderColor", "borderRadius", "backgroundOpacity"])) : h("", !0),
|
|
494
|
-
t.$slots.source ? (n(), d("div", {
|
|
495
|
-
key: 3,
|
|
496
|
-
ref_key: "source",
|
|
497
|
-
ref: I,
|
|
498
|
-
dir: "auto"
|
|
499
|
-
}, [
|
|
500
|
-
M(t.$slots, "source", {}, void 0, !0)
|
|
501
|
-
], 512)) : h("", !0),
|
|
502
|
-
k.value ? h("", !0) : (n(), ee(Ve, {
|
|
503
|
-
key: 4,
|
|
504
|
-
config: {
|
|
505
|
-
type: "sparkline",
|
|
506
|
-
style: {
|
|
507
|
-
backgroundColor: e.value.style.backgroundColor,
|
|
508
|
-
sparkline: {
|
|
509
|
-
color: "#CCCCCC"
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
}, null, 8, ["config"]))
|
|
514
|
-
], 12, Fe));
|
|
515
|
-
}
|
|
516
|
-
}, pt = /* @__PURE__ */ de(rt, [["__scopeId", "data-v-246ce941"]]);
|
|
517
|
-
export {
|
|
518
|
-
pt as default
|
|
519
|
-
};
|