vue-data-ui 3.0.0-next.9 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -30
- package/dist/{Arrow-B6OlqyCG.js → Arrow-DQoWnUfD.js} +1 -1
- package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-DEw6oieL.js} +4 -4
- package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-DEl03NUZ.js} +1 -1
- package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-CrivFZqC.js} +2 -2
- package/dist/{DataTable--paavNqF.js → DataTable-ClgCsiJA.js} +2 -2
- package/dist/{Legend-BZ06qU55.js → Legend-CMvJ6X5j.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-B2Wvbl3p.js} +3 -3
- package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CD5VH_Al.js} +3 -3
- package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3WRn-G2.js} +32 -32
- package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
- package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
- package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
- package/dist/{Shape-Mr1eIp_G.js → Shape-Adi9i_-f.js} +43 -37
- package/dist/Slicer-t6e1t2iM.js +602 -0
- package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-B8OnBSvk.js} +7 -7
- package/dist/{Title-B2dA6-uH.js → Title-xTWR-Vil.js} +1 -1
- package/dist/{Tooltip-O_hCvqgF.js → Tooltip-BH3CiANh.js} +23 -19
- package/dist/{UserOptions-Bk03FRqW.js → UserOptions-CKKPgDLV.js} +2 -2
- package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-C4hj491O.js} +1 -1
- package/dist/{img-C_9wps3s.js → img-Vb4QHAHI.js} +1 -1
- package/dist/{index-CgShIRes.js → index-Dzc2Gi60.js} +2885 -2010
- package/dist/{pdf-CXdbjyRJ.js → pdf-ddpqw-dt.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +753 -65
- package/dist/types/vue-data-ui.d.ts +753 -65
- package/dist/useAutoSizeLabelsInsideViewbox-CN_Jh8Hr.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-CjnS13nF.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DBRh8ZvS.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
- package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-B7ztqj9-.js} +105 -100
- package/dist/vue-data-ui.js +26 -25
- package/dist/vue-ui-3d-bar-DUmYPtHl.js +1323 -0
- package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-CPk8wAuj.js} +3 -3
- package/dist/vue-ui-age-pyramid-Bv5HmeXj.js +835 -0
- package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-KXWlIhtd.js} +12 -12
- package/dist/vue-ui-bullet-B4N4mBk9.js +571 -0
- package/dist/vue-ui-candlestick-DENvPnUO.js +1000 -0
- package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-vC2bHBaY.js} +29 -29
- package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-2nS0StrY.js} +664 -536
- package/dist/vue-ui-chord-CyfS6vNM.js +1038 -0
- package/dist/vue-ui-circle-pack-C4JR-0fx.js +709 -0
- package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-BgeSDtQh.js} +2 -2
- package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-9DWUBJ-I.js} +64 -64
- package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-BQO7IBFA.js} +2 -2
- package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-C-ZJXJ74.js} +431 -422
- package/dist/vue-ui-donut-evolution-B870IrQA.js +1076 -0
- package/dist/vue-ui-dumbbell-Cfs2Uotx.js +1120 -0
- package/dist/vue-ui-flow-DnaUVVAD.js +841 -0
- package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-B9s-H5ZG.js} +16 -16
- package/dist/vue-ui-galaxy-BoJOczdh.js +680 -0
- package/dist/vue-ui-gauge-qjm4BqZR.js +791 -0
- package/dist/vue-ui-gizmo-fn7ZaMTI.js +210 -0
- package/dist/vue-ui-heatmap-CIBDKhh8.js +1078 -0
- package/dist/vue-ui-history-plot-bbNxldYG.js +1074 -0
- package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-BX-2jhLx.js} +26 -26
- package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-Bn1Bb8-J.js} +2 -2
- package/dist/vue-ui-molecule-DQ3qFtBq.js +656 -0
- package/dist/vue-ui-mood-radar-Cf-ehIo1.js +785 -0
- package/dist/vue-ui-nested-donuts-CWg5BEi-.js +1284 -0
- package/dist/vue-ui-onion-sHgQTYfa.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-Ki3ITp_s.js +916 -0
- package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-BIVqW7U7.js} +512 -459
- package/dist/vue-ui-quick-chart-C_hvHc1b.js +1762 -0
- package/dist/vue-ui-radar-RZUPyPwB.js +796 -0
- package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-BI8Vk7dO.js} +2 -2
- package/dist/vue-ui-relation-circle-TVMUEtxK.js +598 -0
- package/dist/vue-ui-ridgeline-DQeXHQG4.js +1157 -0
- package/dist/vue-ui-rings-BH81WmMS.js +728 -0
- package/dist/vue-ui-scatter-Cy7Tz_An.js +1178 -0
- package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-CF50qQxr.js} +13 -13
- package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-CrFXEbJs.js} +46 -46
- package/dist/vue-ui-spark-trend-DtHArnot.js +315 -0
- package/dist/vue-ui-sparkbar-CIOwFFgA.js +351 -0
- package/dist/vue-ui-sparkgauge-E0DdGotz.js +232 -0
- package/dist/vue-ui-sparkhistogram-Dm7WoyjY.js +380 -0
- package/dist/vue-ui-sparkline-DoW6DDKT.js +513 -0
- package/dist/vue-ui-sparkstackbar-BJnPUWY4.js +421 -0
- package/dist/vue-ui-stackbar-Du42smPs.js +1371 -0
- package/dist/vue-ui-strip-plot-DnenGI-d.js +916 -0
- package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BQOQVlHr.js} +17 -17
- package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-BzK4_gsP.js} +5 -5
- package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-B-IwcT8I.js} +19 -16
- package/dist/vue-ui-thermometer-06ao_Pj5.js +541 -0
- package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-CxQq4roK.js} +5 -5
- package/dist/vue-ui-tiremarks-CuTxkByj.js +406 -0
- package/dist/vue-ui-treemap-BgHhRpiV.js +1035 -0
- package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-CAcsUUCo.js} +104 -102
- package/dist/vue-ui-waffle-Ct3Upw3m.js +910 -0
- package/dist/vue-ui-wheel-oz06Kt-p.js +379 -0
- package/dist/vue-ui-word-cloud-BRy7fg4S.js +765 -0
- package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-CTV-YfFN.js} +364 -327
- package/dist/vue-ui-xy-DqCy9dpa.js +3808 -0
- package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-BZdhKUIp.js} +265 -264
- package/package.json +4 -4
- package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
- package/dist/Slicer-3t0HimeE.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-BC4Ciblw.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
- package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
- package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
- package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
- package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
- package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
- package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
- package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
- package/dist/vue-ui-flow-MvORTthN.js +0 -765
- package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
- package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
- package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
- package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
- package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
- package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
- package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
- package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
- package/dist/vue-ui-onion-DXLokGec.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
- package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
- package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
- package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
- package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
- package/dist/vue-ui-rings-Duay-EmS.js +0 -685
- package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
- package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
- package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
- package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
- package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
- package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
- package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
- package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
- package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
- package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
- package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
- package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
- package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
- package/dist/vue-ui-wheel-tydUATi8.js +0 -352
- package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
- package/dist/vue-ui-xy--HToGdle.js +0 -2982
|
@@ -1,459 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as T, computed as h, ref as m, watch as Q, shallowRef as ee, onMounted as ke, onBeforeUnmount as xe, createElementBlock as v, openBlock as n, normalizeStyle as S, renderSlot as M, createCommentVNode as y, createBlock as te, normalizeProps as ae, guardReactiveProps as le, createElementVNode as f, toDisplayString as z, unref as i, createVNode as _e, Fragment as B, renderList as E, withCtx as we, createTextVNode as Le } from "vue";
|
|
2
|
-
import { u as $e, c as Ne, a as Ce, C as ue, a7 as F, o as Me, e as oe, g as Ie, w as A, a8 as Ve, a9 as Se, X as ze, s as W, V as se, U as Ae, aa as re, i as G, f as U } from "./index-CgShIRes.js";
|
|
3
|
-
import { u as ne } from "./useNestedProp-BC4Ciblw.js";
|
|
4
|
-
import { t as We, u as Pe } from "./useResponsive-DfdjqQps.js";
|
|
5
|
-
import { u as Re } from "./useChartAccessibility-9icAAmYg.js";
|
|
6
|
-
import { _ as De } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const Oe = ["id"], Te = ["xmlns", "viewBox"], Be = ["width", "height"], Ee = ["id"], Fe = ["stop-color"], Ge = ["stop-color"], Ue = ["id"], je = ["stop-color"], Xe = ["stop-color"], Ye = ["id"], qe = ["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"], ut = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ot = ["x", "y", "font-size", "font-weight", "fill"], st = ["x", "y", "height", "width", "onMouseenter", "onClick"], rt = {
|
|
8
|
-
__name: "vue-ui-sparkline",
|
|
9
|
-
props: {
|
|
10
|
-
config: {
|
|
11
|
-
type: Object,
|
|
12
|
-
default() {
|
|
13
|
-
return {};
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
dataset: {
|
|
17
|
-
type: Array,
|
|
18
|
-
default() {
|
|
19
|
-
return [];
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
showInfo: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: !0
|
|
25
|
-
},
|
|
26
|
-
selectedIndex: {
|
|
27
|
-
type: Number,
|
|
28
|
-
default: void 0
|
|
29
|
-
},
|
|
30
|
-
heightRatio: {
|
|
31
|
-
type: Number,
|
|
32
|
-
default: 1
|
|
33
|
-
},
|
|
34
|
-
forcedPadding: {
|
|
35
|
-
type: Number,
|
|
36
|
-
default: 30
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
emits: ["hoverIndex", "selectDatapoint"],
|
|
40
|
-
setup(_, { emit: ie }) {
|
|
41
|
-
const de = T(() => import("./vue-ui-skeleton-BsBaCvoE.js")), ve = T(() => import("./PackageVersion-2QvaZf9_.js")), ce = T(() => import("./SparkTooltip-Czhz446b.js")), { vue_ui_sparkline: he } = $e(), s = _, I = h(() => Array.isArray(s.dataset) && s.dataset.length > 0), p = m(Ne()), P = m(null), j = m(null), X = m(null), e = h({
|
|
42
|
-
get: () => q(),
|
|
43
|
-
set: (t) => t
|
|
44
|
-
}), { svgRef: Y } = Re({ config: e.value.style.title });
|
|
45
|
-
function q() {
|
|
46
|
-
const t = ne({
|
|
47
|
-
userConfig: s.config,
|
|
48
|
-
defaultConfig: he
|
|
49
|
-
});
|
|
50
|
-
let l = {};
|
|
51
|
-
return t.theme ? l = {
|
|
52
|
-
...ne({
|
|
53
|
-
userConfig: Ce.vue_ui_sparkline[t.theme] || s.config,
|
|
54
|
-
defaultConfig: t
|
|
55
|
-
})
|
|
56
|
-
} : l = t, s.config && ue(s.config, "style.scaleMin") ? l.style.scaleMin = s.config.style.scaleMin : l.style.scaleMin = null, s.config && ue(s.config, "style.scaleMax") ? l.style.scaleMax = s.config.style.scaleMax : l.style.scaleMax = null, l;
|
|
57
|
-
}
|
|
58
|
-
const V = h(() => F({
|
|
59
|
-
data: s.dataset,
|
|
60
|
-
threshold: e.value.downsample.threshold
|
|
61
|
-
}));
|
|
62
|
-
Q(() => s.config, (t) => {
|
|
63
|
-
e.value = q(), Z(), u.value.chartWidth = e.value.style.chartWidth;
|
|
64
|
-
}, { deep: !0 }), Q(() => s.dataset, (t) => {
|
|
65
|
-
k.value = F({
|
|
66
|
-
data: s.dataset.map((l) => ({
|
|
67
|
-
...l,
|
|
68
|
-
value: [void 0].includes(l.value) ? null : l.value
|
|
69
|
-
})),
|
|
70
|
-
threshold: e.value.downsample.threshold
|
|
71
|
-
});
|
|
72
|
-
}, { deep: !0 });
|
|
73
|
-
const k = m(ye());
|
|
74
|
-
function ye() {
|
|
75
|
-
return F({
|
|
76
|
-
data: s.dataset.map((t) => e.value.style.animation.show && s.dataset.length > 1 ? {
|
|
77
|
-
...t,
|
|
78
|
-
value: null
|
|
79
|
-
} : {
|
|
80
|
-
...t,
|
|
81
|
-
value: [void 0].includes(t.value) ? null : t.value
|
|
82
|
-
}),
|
|
83
|
-
threshold: e.value.downsample.threshold
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
const g = ee(null), w = ee(null);
|
|
87
|
-
ke(() => {
|
|
88
|
-
if (Z(), e.value.style.animation.show && s.dataset.length > 1) {
|
|
89
|
-
let a = function() {
|
|
90
|
-
l < V.value.length ? (k.value.push(V.value[l]), setTimeout(() => {
|
|
91
|
-
requestAnimationFrame(a);
|
|
92
|
-
}, t)) : k.value = V.value, l += 1;
|
|
93
|
-
};
|
|
94
|
-
k.value = [];
|
|
95
|
-
const t = e.value.style.animation.animationFrames / s.dataset.length;
|
|
96
|
-
let l = 0;
|
|
97
|
-
a();
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
function Z() {
|
|
101
|
-
if (Me(s.dataset) ? oe({
|
|
102
|
-
componentName: "VueUiSparkline",
|
|
103
|
-
type: "dataset"
|
|
104
|
-
}) : s.dataset.forEach((t, l) => {
|
|
105
|
-
Ie({
|
|
106
|
-
datasetObject: t,
|
|
107
|
-
requiredAttributes: ["period", "value"]
|
|
108
|
-
}).forEach((a) => {
|
|
109
|
-
oe({
|
|
110
|
-
componentName: "VueUiSparkline",
|
|
111
|
-
type: "datasetSerieAttribute",
|
|
112
|
-
property: a,
|
|
113
|
-
index: l
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
}), e.value.responsive) {
|
|
117
|
-
const t = We(() => {
|
|
118
|
-
const { width: l, height: a } = Pe({
|
|
119
|
-
chart: P.value,
|
|
120
|
-
title: e.value.style.title.show && s.showInfo ? j.value : null,
|
|
121
|
-
source: X.value
|
|
122
|
-
});
|
|
123
|
-
requestAnimationFrame(() => {
|
|
124
|
-
u.value.width = l, u.value.height = a, u.value.chartWidth = e.value.style.chartWidth / 500 * l, u.value.padding = s.forcedPadding / 500 * l;
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
g.value && (w.value && g.value.unobserve(w.value), g.value.disconnect()), g.value = new ResizeObserver(t), w.value = P.value.parentNode, g.value.observe(w.value);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
xe(() => {
|
|
131
|
-
g.value && (w.value && g.value.unobserve(w.value), g.value.disconnect());
|
|
132
|
-
});
|
|
133
|
-
const u = m({
|
|
134
|
-
height: 80 * s.heightRatio,
|
|
135
|
-
width: 500,
|
|
136
|
-
chartWidth: e.value.style.chartWidth,
|
|
137
|
-
padding: s.forcedPadding
|
|
138
|
-
}), R = ie, o = h(() => {
|
|
139
|
-
const { top: t, right: l, bottom: a, left: r } = e.value.style.padding;
|
|
140
|
-
return {
|
|
141
|
-
top: t,
|
|
142
|
-
left: r,
|
|
143
|
-
right: u.value.width - l,
|
|
144
|
-
bottom: u.value.height - a,
|
|
145
|
-
start: s.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? u.value.width - u.value.chartWidth + r : u.value.padding + r,
|
|
146
|
-
width: s.showInfo && e.value.style.dataLabel.show ? u.value.chartWidth - r - l : u.value.width - u.value.padding - r - l,
|
|
147
|
-
height: u.value.height - t - a
|
|
148
|
-
};
|
|
149
|
-
}), D = h(() => [null, void 0].includes(e.value.style.scaleMin) ? Math.min(...k.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), fe = h(() => [null, void 0].includes(e.value.style.scaleMax) ? Math.max(...k.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), N = h(() => {
|
|
150
|
-
const t = D.value >= 0 ? 0 : D.value;
|
|
151
|
-
return Math.abs(t);
|
|
152
|
-
}), H = h(() => fe.value + N.value), L = h(() => o.value.bottom - o.value.height * O(N.value));
|
|
153
|
-
function O(t) {
|
|
154
|
-
return isNaN(t / H.value) ? 0 : t / H.value;
|
|
155
|
-
}
|
|
156
|
-
const x = h(() => V.value.length - 1), c = h(() => k.value.map((t, l) => {
|
|
157
|
-
const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0, r = o.value.width / (x.value + 1) > u.padding ? u.padding : o.value.width / (x.value + 1);
|
|
158
|
-
return {
|
|
159
|
-
absoluteValue: a,
|
|
160
|
-
period: t.period,
|
|
161
|
-
plotValue: a + N.value,
|
|
162
|
-
toMax: O(a + N.value),
|
|
163
|
-
x: o.value.start + l * (r > o.value.width / 12 ? o.value.width / 12 : r),
|
|
164
|
-
y: o.value.bottom - o.value.height * O(a + N.value),
|
|
165
|
-
id: `plot_${p.value}_${l}`,
|
|
166
|
-
color: C.value ? e.value.style.bar.color : e.value.style.area.useGradient ? A(e.value.style.line.color, 0.05 * (1 - l / x.value)) : e.value.style.line.color,
|
|
167
|
-
width: r > o.value.width / 12 ? o.value.width / 12 : r
|
|
168
|
-
};
|
|
169
|
-
})), pe = h(() => {
|
|
170
|
-
const t = { x: c.value[0].x || 0, y: (u.value.height || 0) - 6 }, l = { x: c.value[c.value.length - 1].x || 0, y: (u.value.height || 0) - 6 }, a = [];
|
|
171
|
-
return c.value.forEach((r) => {
|
|
172
|
-
a.push(`${r.x || 0},${r.y || 0} `);
|
|
173
|
-
}), [t.x, t.y, ...a, l.x, l.y].toString();
|
|
174
|
-
}), d = m(void 0), $ = m(void 0);
|
|
175
|
-
function ge(t, l) {
|
|
176
|
-
d.value = t, $.value || ($.value = t), R("hoverIndex", { index: l });
|
|
177
|
-
}
|
|
178
|
-
function be() {
|
|
179
|
-
$.value = d.value, d.value = void 0, R("hoverIndex", { index: void 0 });
|
|
180
|
-
}
|
|
181
|
-
const b = h(() => {
|
|
182
|
-
if (I.value) {
|
|
183
|
-
const t = c.value.map((a) => a.absoluteValue), l = t.reduce((a, r) => a + r, 0);
|
|
184
|
-
return {
|
|
185
|
-
latest: c.value[c.value.length - 1].absoluteValue,
|
|
186
|
-
sum: l,
|
|
187
|
-
average: l / c.value.length,
|
|
188
|
-
median: Se(t),
|
|
189
|
-
trend: Ve(c.value.map(({ x: a, y: r, absoluteValue: K }) => ({
|
|
190
|
-
x: a,
|
|
191
|
-
y: r,
|
|
192
|
-
value: K
|
|
193
|
-
}))).trend
|
|
194
|
-
};
|
|
195
|
-
} else
|
|
196
|
-
return {
|
|
197
|
-
latest: null,
|
|
198
|
-
sum: null,
|
|
199
|
-
average: null,
|
|
200
|
-
median: null,
|
|
201
|
-
trend: null
|
|
202
|
-
};
|
|
203
|
-
}), J = h(() => I.value ? e.value.style.dataLabel.valueType === "latest" ? b.value.latest : e.value.style.dataLabel.valueType === "sum" ? b.value.sum : e.value.style.dataLabel.valueType === "average" ? b.value.average : 0 : 0), C = h(() => e.value.type && e.value.type === "bar");
|
|
204
|
-
function me(t, l) {
|
|
205
|
-
R("selectDatapoint", { datapoint: t, index: l });
|
|
206
|
-
}
|
|
207
|
-
return (t, l) => (n(), v("div", {
|
|
208
|
-
ref_key: "sparklineChart",
|
|
209
|
-
ref: P,
|
|
210
|
-
class: "vue-ui-sparkline",
|
|
211
|
-
id: p.value,
|
|
212
|
-
style: S(`width:100%;font-family:${e.value.style.fontFamily};`)
|
|
213
|
-
}, [
|
|
214
|
-
M(t.$slots, "before", ae(le({
|
|
215
|
-
selected: d.value,
|
|
216
|
-
latest: b.value.latest,
|
|
217
|
-
sum: b.value.sum,
|
|
218
|
-
average: b.value.average,
|
|
219
|
-
median: b.value.median,
|
|
220
|
-
trend: b.value.trend
|
|
221
|
-
})), void 0, !0),
|
|
222
|
-
e.value.style.title.show && _.showInfo ? (n(), v("div", {
|
|
223
|
-
key: 0,
|
|
224
|
-
ref_key: "chartTitle",
|
|
225
|
-
ref: j,
|
|
226
|
-
class: "vue-ui-sparkline-title",
|
|
227
|
-
style: S(`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"};`)
|
|
228
|
-
}, [
|
|
229
|
-
f("span", {
|
|
230
|
-
style: S(`padding:${e.value.style.title.textAlign === "left" ? "0 0 0 12px" : e.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
|
|
231
|
-
}, z(d.value ? d.value.period : e.value.style.title.text), 5)
|
|
232
|
-
], 4)) : y("", !0),
|
|
233
|
-
I.value ? (n(), v("svg", {
|
|
234
|
-
key: 1,
|
|
235
|
-
ref_key: "svgRef",
|
|
236
|
-
ref: Y,
|
|
237
|
-
xmlns: i(ze),
|
|
238
|
-
viewBox: `0 0 ${u.value.width} ${u.value.height}`,
|
|
239
|
-
style: S(`background:${e.value.style.backgroundColor};overflow:visible`),
|
|
240
|
-
onMouseleave: l[0] || (l[0] = (a) => $.value = void 0)
|
|
241
|
-
}, [
|
|
242
|
-
_e(i(ve)),
|
|
243
|
-
t.$slots["chart-background"] ? (n(), v("foreignObject", {
|
|
244
|
-
key: 0,
|
|
245
|
-
x: 0,
|
|
246
|
-
y: 0,
|
|
247
|
-
width: u.value.width <= 0 ? 10 : u.value.width,
|
|
248
|
-
height: u.value.height <= 0 ? 10 : u.value.height,
|
|
249
|
-
style: {
|
|
250
|
-
pointerEvents: "none"
|
|
251
|
-
}
|
|
252
|
-
}, [
|
|
253
|
-
M(t.$slots, "chart-background", {}, void 0, !0)
|
|
254
|
-
], 8, Be)) : y("", !0),
|
|
255
|
-
f("defs", null, [
|
|
256
|
-
f("linearGradient", {
|
|
257
|
-
x1: "0%",
|
|
258
|
-
y1: "0%",
|
|
259
|
-
x2: "100%",
|
|
260
|
-
y2: "0%",
|
|
261
|
-
id: `sparkline_gradient_${p.value}`
|
|
262
|
-
}, [
|
|
263
|
-
f("stop", {
|
|
264
|
-
offset: "0%",
|
|
265
|
-
"stop-color": i(W)(i(A)(e.value.style.area.color, 0.05), e.value.style.area.opacity)
|
|
266
|
-
}, null, 8, Fe),
|
|
267
|
-
f("stop", {
|
|
268
|
-
offset: "100%",
|
|
269
|
-
"stop-color": i(W)(e.value.style.area.color, e.value.style.area.opacity)
|
|
270
|
-
}, null, 8, Ge)
|
|
271
|
-
], 8, Ee),
|
|
272
|
-
f("linearGradient", {
|
|
273
|
-
x2: "0%",
|
|
274
|
-
y2: "100%",
|
|
275
|
-
id: `sparkline_bar_gradient_pos_${p.value}`
|
|
276
|
-
}, [
|
|
277
|
-
f("stop", {
|
|
278
|
-
offset: "0%",
|
|
279
|
-
"stop-color": e.value.style.bar.color
|
|
280
|
-
}, null, 8, je),
|
|
281
|
-
f("stop", {
|
|
282
|
-
offset: "100%",
|
|
283
|
-
"stop-color": i(A)(e.value.style.bar.color, 0.05)
|
|
284
|
-
}, null, 8, Xe)
|
|
285
|
-
], 8, Ue),
|
|
286
|
-
f("linearGradient", {
|
|
287
|
-
x2: "0%",
|
|
288
|
-
y2: "100%",
|
|
289
|
-
id: `sparkline_bar_gradient_neg_${p.value}`
|
|
290
|
-
}, [
|
|
291
|
-
f("stop", {
|
|
292
|
-
offset: "0%",
|
|
293
|
-
"stop-color": i(A)(e.value.style.bar.color, 0.05)
|
|
294
|
-
}, null, 8, qe),
|
|
295
|
-
f("stop", {
|
|
296
|
-
offset: "100%",
|
|
297
|
-
"stop-color": e.value.style.bar.color
|
|
298
|
-
}, null, 8, Ze)
|
|
299
|
-
], 8, Ye)
|
|
300
|
-
]),
|
|
301
|
-
e.value.style.area.show && !C.value && c.value[0] ? (n(), v("g", He, [
|
|
302
|
-
e.value.style.line.smooth ? (n(), v("path", {
|
|
303
|
-
key: 0,
|
|
304
|
-
d: `M ${c.value[0].x},${o.value.bottom} ${i(se)(c.value)} L ${c.value.at(-1).x},${o.value.bottom} Z`,
|
|
305
|
-
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : i(W)(e.value.style.area.color, e.value.style.area.opacity)
|
|
306
|
-
}, null, 8, Je)) : (n(), v("path", {
|
|
307
|
-
key: 1,
|
|
308
|
-
d: `M${pe.value}Z`,
|
|
309
|
-
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : i(W)(e.value.style.area.color, e.value.style.area.opacity)
|
|
310
|
-
}, null, 8, Ke))
|
|
311
|
-
])) : y("", !0),
|
|
312
|
-
e.value.style.line.smooth && !C.value ? (n(), v("path", {
|
|
313
|
-
key: 2,
|
|
314
|
-
d: `M ${i(se)(c.value)}`,
|
|
315
|
-
stroke: e.value.style.line.color,
|
|
316
|
-
fill: "none",
|
|
317
|
-
"stroke-width": e.value.style.line.strokeWidth,
|
|
318
|
-
"stroke-linecap": "round"
|
|
319
|
-
}, null, 8, Qe)) : y("", !0),
|
|
320
|
-
!e.value.style.line.smooth && !C.value ? (n(), v("path", {
|
|
321
|
-
key: 3,
|
|
322
|
-
d: `M ${i(Ae)(c.value)}`,
|
|
323
|
-
stroke: e.value.style.line.color,
|
|
324
|
-
fill: "none",
|
|
325
|
-
"stroke-width": e.value.style.line.strokeWidth,
|
|
326
|
-
"stroke-linecap": "round"
|
|
327
|
-
}, null, 8, et)) : y("", !0),
|
|
328
|
-
(n(!0), v(B, null, E(c.value, (a, r) => (n(), v("g", null, [
|
|
329
|
-
C.value ? (n(), v("rect", {
|
|
330
|
-
key: 0,
|
|
331
|
-
x: a.x - a.width / 2,
|
|
332
|
-
y: isNaN(a.absoluteValue > 0 ? a.y : L.value) ? 0 : a.absoluteValue > 0 ? a.y : L.value,
|
|
333
|
-
width: a.width,
|
|
334
|
-
height: isNaN(Math.abs(a.y - L.value)) ? 0 : Math.abs(a.y - L.value),
|
|
335
|
-
fill: a.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${p.value})` : `url(#sparkline_bar_gradient_neg_${p.value})`,
|
|
336
|
-
rx: e.value.style.bar.borderRadius
|
|
337
|
-
}, null, 8, tt)) : y("", !0),
|
|
338
|
-
e.value.style.verticalIndicator.show && (d.value && a.id === d.value.id || _.selectedIndex === r) ? (n(), v("line", {
|
|
339
|
-
key: 1,
|
|
340
|
-
x1: a.x,
|
|
341
|
-
x2: a.x,
|
|
342
|
-
y1: o.value.top - 6,
|
|
343
|
-
y2: o.value.bottom,
|
|
344
|
-
stroke: e.value.style.verticalIndicator.color || a.color,
|
|
345
|
-
"stroke-width": e.value.style.verticalIndicator.strokeWidth,
|
|
346
|
-
"stroke-linecap": "round",
|
|
347
|
-
"stroke-dasharray": e.value.style.verticalIndicator.strokeDasharray || 0
|
|
348
|
-
}, null, 8, at)) : y("", !0)
|
|
349
|
-
]))), 256)),
|
|
350
|
-
D.value < 0 ? (n(), v("line", {
|
|
351
|
-
key: 4,
|
|
352
|
-
x1: o.value.start,
|
|
353
|
-
x2: o.value.start + o.value.width - 16,
|
|
354
|
-
y1: i(re)(L.value, o.value.bottom),
|
|
355
|
-
y2: i(re)(L.value, o.value.bottom),
|
|
356
|
-
stroke: e.value.style.zeroLine.color,
|
|
357
|
-
"stroke-dasharray": e.value.style.zeroLine.strokeWidth * 2,
|
|
358
|
-
"stroke-width": e.value.style.zeroLine.strokeWidth,
|
|
359
|
-
"stroke-linecap": "round"
|
|
360
|
-
}, null, 8, lt)) : y("", !0),
|
|
361
|
-
e.value.style.plot.show ? (n(!0), v(B, { key: 5 }, E(c.value, (a, r) => (n(), v("g", null, [
|
|
362
|
-
d.value && a.id === d.value.id || _.selectedIndex === r || _.dataset.length === 1 ? (n(), v("circle", {
|
|
363
|
-
key: 0,
|
|
364
|
-
cx: a.x,
|
|
365
|
-
cy: a.y,
|
|
366
|
-
r: e.value.style.plot.radius,
|
|
367
|
-
fill: a.color,
|
|
368
|
-
stroke: e.value.style.plot.stroke,
|
|
369
|
-
"stroke-width": e.value.style.plot.strokeWidth
|
|
370
|
-
}, null, 8, ut)) : y("", !0)
|
|
371
|
-
]))), 256)) : y("", !0),
|
|
372
|
-
_.showInfo && e.value.style.dataLabel.show ? (n(), v("text", {
|
|
373
|
-
key: 6,
|
|
374
|
-
x: e.value.style.dataLabel.position === "left" ? 12 + e.value.style.dataLabel.offsetX : o.value.width + 12 + e.value.style.dataLabel.offsetX,
|
|
375
|
-
y: u.value.height / 2 + e.value.style.dataLabel.fontSize / 2.5 + e.value.style.dataLabel.offsetY,
|
|
376
|
-
"font-size": e.value.style.dataLabel.fontSize,
|
|
377
|
-
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal",
|
|
378
|
-
fill: e.value.style.dataLabel.color
|
|
379
|
-
}, z(d.value ? i(G)(
|
|
380
|
-
e.value.style.dataLabel.formatter,
|
|
381
|
-
d.value.absoluteValue,
|
|
382
|
-
i(U)({ p: e.value.style.dataLabel.prefix, v: d.value.absoluteValue, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue }),
|
|
383
|
-
{ datapoint: d.value }
|
|
384
|
-
) : i(G)(
|
|
385
|
-
e.value.style.dataLabel.formatter,
|
|
386
|
-
J.value,
|
|
387
|
-
i(U)({ p: e.value.style.dataLabel.prefix, v: J.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })
|
|
388
|
-
)), 9, ot)) : y("", !0),
|
|
389
|
-
(n(!0), v(B, null, E(c.value, (a, r) => (n(), v("rect", {
|
|
390
|
-
x: a.x - (o.value.width / (x.value + 1) > u.value.padding ? u.value.padding : o.value.width / (x.value + 1)) / 2,
|
|
391
|
-
y: o.value.top - 6,
|
|
392
|
-
height: o.value.height + 6,
|
|
393
|
-
width: o.value.width / (x.value + 1) > u.value.padding ? u.value.padding : o.value.width / (x.value + 1),
|
|
394
|
-
fill: "transparent",
|
|
395
|
-
onMouseenter: (K) => ge(a, r),
|
|
396
|
-
onMouseleave: be,
|
|
397
|
-
onClick: () => me(a, r)
|
|
398
|
-
}, null, 40, st))), 256)),
|
|
399
|
-
M(t.$slots, "svg", { svg: u.value }, void 0, !0)
|
|
400
|
-
], 44, Te)) : y("", !0),
|
|
401
|
-
d.value && e.value.style.tooltip.show ? (n(), te(i(ce), {
|
|
402
|
-
key: 2,
|
|
403
|
-
x: d.value.x,
|
|
404
|
-
y: d.value.y,
|
|
405
|
-
prevX: $.value.x,
|
|
406
|
-
prevY: $.value.y,
|
|
407
|
-
offsetY: e.value.style.plot.radius * 3 + e.value.style.tooltip.offsetY,
|
|
408
|
-
svgRef: i(Y),
|
|
409
|
-
background: e.value.style.tooltip.backgroundColor,
|
|
410
|
-
color: e.value.style.tooltip.color,
|
|
411
|
-
fontSize: e.value.style.tooltip.fontSize,
|
|
412
|
-
borderWidth: e.value.style.tooltip.borderWidth,
|
|
413
|
-
borderColor: e.value.style.tooltip.borderColor,
|
|
414
|
-
borderRadius: e.value.style.tooltip.borderRadius,
|
|
415
|
-
backgroundOpacity: e.value.style.tooltip.backgroundOpacity
|
|
416
|
-
}, {
|
|
417
|
-
default: we(() => [
|
|
418
|
-
M(t.$slots, "tooltip", ae(le({ ...d.value })), () => [
|
|
419
|
-
Le(z(d.value.period) + ": " + z(i(G)(
|
|
420
|
-
e.value.style.dataLabel.formatter,
|
|
421
|
-
d.value.absoluteValue,
|
|
422
|
-
i(U)({
|
|
423
|
-
p: e.value.style.dataLabel.prefix,
|
|
424
|
-
v: d.value.absoluteValue,
|
|
425
|
-
s: e.value.style.dataLabel.suffix,
|
|
426
|
-
r: e.value.style.dataLabel.roundingValue
|
|
427
|
-
}),
|
|
428
|
-
{ datapoint: d.value }
|
|
429
|
-
)), 1)
|
|
430
|
-
], !0)
|
|
431
|
-
]),
|
|
432
|
-
_: 3
|
|
433
|
-
}, 8, ["x", "y", "prevX", "prevY", "offsetY", "svgRef", "background", "color", "fontSize", "borderWidth", "borderColor", "borderRadius", "backgroundOpacity"])) : y("", !0),
|
|
434
|
-
t.$slots.source ? (n(), v("div", {
|
|
435
|
-
key: 3,
|
|
436
|
-
ref_key: "source",
|
|
437
|
-
ref: X,
|
|
438
|
-
dir: "auto"
|
|
439
|
-
}, [
|
|
440
|
-
M(t.$slots, "source", {}, void 0, !0)
|
|
441
|
-
], 512)) : y("", !0),
|
|
442
|
-
I.value ? y("", !0) : (n(), te(i(de), {
|
|
443
|
-
key: 4,
|
|
444
|
-
config: {
|
|
445
|
-
type: "sparkline",
|
|
446
|
-
style: {
|
|
447
|
-
backgroundColor: e.value.style.backgroundColor,
|
|
448
|
-
sparkline: {
|
|
449
|
-
color: "#CCCCCC"
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
}, null, 8, ["config"]))
|
|
454
|
-
], 12, Oe));
|
|
455
|
-
}
|
|
456
|
-
}, yt = /* @__PURE__ */ De(rt, [["__scopeId", "data-v-3966b3be"]]);
|
|
457
|
-
export {
|
|
458
|
-
yt as default
|
|
459
|
-
};
|