vue-data-ui 3.5.2 → 3.7.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/README.md +36 -27
- package/dist/{Arrow-BGVin3AS.js → Arrow-CWYIBV-7.js} +1 -1
- package/dist/{BaseDraggableDialog-ymf2sfB8.js → BaseDraggableDialog-CRF94NJQ.js} +2 -2
- package/dist/{BaseIcon-BmMbm4d0.js → BaseIcon-CofSxalQ.js} +6 -5
- package/dist/{ColorPicker-ChuwChMo.js → ColorPicker-e1-OSGlQ.js} +10 -10
- package/dist/{DataTable-BT7VF2ua.js → DataTable-CHaOCmsE.js} +2 -2
- package/dist/{Legend-G6GMcdAc.js → Legend-Web3GjlR.js} +10 -10
- package/dist/{NonSvgPenAndPaper-DVgKKLIf.js → NonSvgPenAndPaper-CjYFLlns.js} +3 -3
- package/dist/{PackageVersion-Y7t79Jtq.js → PackageVersion-Bq_mtsqr.js} +1 -1
- package/dist/{PenAndPaper-SZQIAgkg.js → PenAndPaper-HCZQTkqi.js} +20 -20
- package/dist/{Shape-CNXKB8O0.js → Shape-DE6X_t31.js} +3 -3
- package/dist/{Slicer-D2wm0coO.js → Slicer-BFBBG6xv.js} +23 -23
- package/dist/{SlicerPreview-ij72TAs6.js → SlicerPreview-D76aSViW.js} +2 -2
- package/dist/{SparkTooltip-BEewz-_Q.js → SparkTooltip-B2rpVWE1.js} +6 -6
- package/dist/{Title-BzH_LEA3.js → Title-DfFUb9hd.js} +1 -1
- package/dist/{Tooltip-oWCO1HKy.js → Tooltip-WD0Ros6G.js} +1 -1
- package/dist/{UserOptions-CGnQt6Fd.js → UserOptions-B3I-s3Lw.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +3 -3
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +3 -3
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +3 -3
- package/dist/components/vue-ui-candlestick.js +3 -3
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +3 -3
- package/dist/components/vue-ui-chord.js +3 -3
- package/dist/components/vue-ui-circle-pack.js +3 -3
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +2 -2
- package/dist/components/vue-ui-donut.js +3 -3
- package/dist/components/vue-ui-dumbbell.js +3 -3
- package/dist/components/vue-ui-flow.js +3 -3
- package/dist/components/vue-ui-funnel.js +2 -2
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +3 -3
- package/dist/components/vue-ui-horizontal-bar.js +3 -3
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +3 -3
- package/dist/components/vue-ui-mood-radar.js +3 -3
- package/dist/components/vue-ui-nested-donuts.js +2 -2
- package/dist/components/vue-ui-onion.js +3 -3
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +3 -3
- package/dist/components/vue-ui-quick-chart.js +3 -3
- package/dist/components/vue-ui-radar.js +3 -3
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +3 -3
- package/dist/components/vue-ui-ridgeline.js +3 -3
- package/dist/components/vue-ui-rings.js +3 -3
- package/dist/components/vue-ui-scatter.js +3 -3
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +2 -2
- package/dist/components/vue-ui-sparkgauge.js +3 -3
- package/dist/components/vue-ui-sparkhistogram.js +3 -3
- package/dist/components/vue-ui-sparkline.js +3 -3
- package/dist/components/vue-ui-sparkstackbar.js +2 -2
- package/dist/components/vue-ui-stackbar.js +3 -3
- package/dist/components/vue-ui-stackline.js +5 -0
- package/dist/components/vue-ui-strip-plot.js +3 -3
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +2 -2
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +3 -3
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +2 -2
- package/dist/components/vue-ui-treemap.js +3 -3
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +2 -2
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +3 -3
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +3 -3
- package/dist/components/vue-ui-xy.js +3 -3
- package/dist/{dom-to-png--BNgrTZV.js → dom-to-png-CH2DfsJe.js} +1 -1
- package/dist/{img-BecE5qXd.js → img-DUzJeMlr.js} +1 -1
- package/dist/{lib-C_mNZmhD.js → lib-C5BH09_g.js} +111 -110
- package/dist/{pdf-DuG5j3Wv.js → pdf-BSWQncok.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +303 -9
- package/dist/types/vue-ui-stackline.d.ts +18 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-BhzfwQ_k.js → useAutoSizeLabelsInsideViewbox-DOALwU4q.js} +7 -7
- package/dist/{useNestedProp-CReNavA0.js → useNestedProp-CWo6bftQ.js} +535 -329
- package/dist/{usePrinter-DTzqpYKF.js → usePrinter-DCJzEiS8.js} +2 -2
- package/dist/useThemeCheck-DGJ31Vi5.js +32 -0
- package/dist/{useTimeLabels-BGFjWgrv.js → useTimeLabels-C5qMhpbe.js} +50 -49
- package/dist/{vue-data-ui-BRaq4hRp.js → vue-data-ui-ByLTJx5V.js} +79 -77
- package/dist/vue-data-ui.js +226 -204
- package/dist/{vue-ui-3d-bar-BB4ii8Nt.js → vue-ui-3d-bar-Dkds4k5N.js} +546 -517
- package/dist/{vue-ui-accordion-BmFTVF1a.js → vue-ui-accordion-DSdZUn2C.js} +3 -3
- package/dist/vue-ui-age-pyramid-C-fwZRYE.js +960 -0
- package/dist/{vue-ui-annotator-CcpaXBNK.js → vue-ui-annotator-DRaH8hXn.js} +7 -7
- package/dist/vue-ui-bullet-BKVJRjGh.js +657 -0
- package/dist/{vue-ui-candlestick-CMP7UL6z.js → vue-ui-candlestick-BKFWHU4O.js} +596 -561
- package/dist/{vue-ui-carousel-table-CzOcKsDj.js → vue-ui-carousel-table-VmPH6y2g.js} +48 -48
- package/dist/{vue-ui-chestnut-S787oASt.js → vue-ui-chestnut-DpMHe-OI.js} +534 -505
- package/dist/vue-ui-chord-Djdr0PY_.js +1182 -0
- package/dist/vue-ui-circle-pack-CyUqNJQt.js +832 -0
- package/dist/{vue-ui-cursor-C3yD_TUr.js → vue-ui-cursor-BMe8ZiV6.js} +2 -2
- package/dist/{vue-ui-dashboard-BfEcVRxQ.js → vue-ui-dashboard-eBXj-KCw.js} +140 -140
- package/dist/{vue-ui-digits-pRh179Gg.js → vue-ui-digits-D382I0-w.js} +2 -2
- package/dist/{vue-ui-donut-B_tEm4dT.js → vue-ui-donut-BLb0kj_P.js} +634 -602
- package/dist/vue-ui-donut-evolution-BqrldXpI.js +1243 -0
- package/dist/vue-ui-dumbbell-BuZT5a-d.js +1258 -0
- package/dist/vue-ui-flow-LLp6ntEP.js +1026 -0
- package/dist/vue-ui-funnel-pILUR-OG.js +743 -0
- package/dist/vue-ui-galaxy-X6yiw8kx.js +837 -0
- package/dist/vue-ui-gauge-DBh-vFb9.js +864 -0
- package/dist/{vue-ui-gizmo-BQzQlUJ8.js → vue-ui-gizmo-DtyEukIP.js} +3 -3
- package/dist/{vue-ui-heatmap-C9MhHWpp.js → vue-ui-heatmap-mkD6QkXo.js} +501 -466
- package/dist/vue-ui-history-plot-CyTaBaxA.js +1239 -0
- package/dist/{vue-ui-kpi-jcrPjW4C.js → vue-ui-kpi-CKMZDc3n.js} +3 -3
- package/dist/{vue-ui-mini-loader-DTM98mRN.js → vue-ui-mini-loader-BN72OfS0.js} +2 -2
- package/dist/vue-ui-molecule-UzQ3o5HW.js +782 -0
- package/dist/vue-ui-mood-radar-C2zkRLGy.js +930 -0
- package/dist/vue-ui-nested-donuts-B5OpvmJ9.js +1454 -0
- package/dist/vue-ui-onion-DbhIOGtF.js +944 -0
- package/dist/vue-ui-parallel-coordinate-plot-Dv_T4mWW.js +1080 -0
- package/dist/{vue-ui-quadrant-CeM23s0z.js → vue-ui-quadrant-CG6_CWsQ.js} +510 -481
- package/dist/{vue-ui-quick-chart-C0RMQzjC.js → vue-ui-quick-chart-DOeRhk7r.js} +795 -758
- package/dist/vue-ui-radar-DdHa9Hsh.js +1013 -0
- package/dist/{vue-ui-rating-tj97undO.js → vue-ui-rating-DtzmtJwF.js} +26 -26
- package/dist/vue-ui-relation-circle-B5lL4l9w.js +670 -0
- package/dist/vue-ui-ridgeline-3pk4Mlft.js +1302 -0
- package/dist/vue-ui-rings-DhyrjrZi.js +884 -0
- package/dist/vue-ui-scatter-DKCD70mi.js +1619 -0
- package/dist/{vue-ui-skeleton-87TORm6s.js → vue-ui-skeleton-CzzdmraB.js} +3 -3
- package/dist/{vue-ui-smiley-B74geHT3.js → vue-ui-smiley-OYyM-ukP.js} +2 -2
- package/dist/vue-ui-spark-trend-BMTcxeCT.js +364 -0
- package/dist/vue-ui-sparkbar-DVk1JiPL.js +381 -0
- package/dist/vue-ui-sparkgauge-Cq9Nw_xu.js +260 -0
- package/dist/vue-ui-sparkhistogram-PFHlCE_k.js +411 -0
- package/dist/vue-ui-sparkline-BHHwO_cV.js +549 -0
- package/dist/vue-ui-sparkstackbar-BosVkkiC.js +470 -0
- package/dist/vue-ui-stackbar-Djk5CPUy.js +1867 -0
- package/dist/vue-ui-stackline-mU4CSol9.js +1963 -0
- package/dist/{vue-ui-strip-plot-C1N2n39d.js → vue-ui-strip-plot-CZQSL0GK.js} +343 -314
- package/dist/{vue-ui-table-CcuoPHgI.js → vue-ui-table-DMM090pe.js} +5 -5
- package/dist/vue-ui-table-heatmap-vQEFrjCX.js +307 -0
- package/dist/{vue-ui-table-sparkline-BAxmZRff.js → vue-ui-table-sparkline-CQJc0mJY.js} +292 -263
- package/dist/vue-ui-thermometer-D1uxoVeZ.js +613 -0
- package/dist/{vue-ui-timer-BVsUQJz_.js → vue-ui-timer-jTnS3ES5.js} +25 -25
- package/dist/vue-ui-tiremarks-Bv-oIFVV.js +477 -0
- package/dist/vue-ui-treemap-B9MVtunp.js +1359 -0
- package/dist/{vue-ui-vertical-bar-B3gfBqD_.js → vue-ui-vertical-bar-BSbDj5qZ.js} +520 -485
- package/dist/{vue-ui-waffle-Bhlqo4xM.js → vue-ui-waffle-DIALVfvc.js} +376 -347
- package/dist/vue-ui-wheel-aUhrFpGk.js +690 -0
- package/dist/vue-ui-word-cloud-DZmMWsUu.js +904 -0
- package/dist/{vue-ui-world-C8KVyDim.js → vue-ui-world-CVLlgp2f.js} +57 -57
- package/dist/vue-ui-xy-Cy7mOurZ.js +3455 -0
- package/dist/vue-ui-xy-canvas-Cr13t9M5.js +1599 -0
- package/dist/vue_ui_vertical_bar-CELc39b8.js +18 -0
- package/package.json +5 -5
- package/dist/themes-AUNCOb2G.js +0 -53
- package/dist/vue-ui-age-pyramid-8bUepd28.js +0 -933
- package/dist/vue-ui-bullet-BvT4scFv.js +0 -630
- package/dist/vue-ui-chord-Dl9Y4mcz.js +0 -1153
- package/dist/vue-ui-circle-pack-CU09BzOV.js +0 -803
- package/dist/vue-ui-donut-evolution-DiGhMwMO.js +0 -1208
- package/dist/vue-ui-dumbbell-BlF3CLbN.js +0 -1231
- package/dist/vue-ui-flow-BQi5L8mJ.js +0 -991
- package/dist/vue-ui-funnel-CM_6Sare.js +0 -716
- package/dist/vue-ui-galaxy-BnZA62Li.js +0 -808
- package/dist/vue-ui-gauge-DAk72bez.js +0 -835
- package/dist/vue-ui-history-plot-BYQh3E8U.js +0 -1204
- package/dist/vue-ui-molecule-Bd1OXvl3.js +0 -753
- package/dist/vue-ui-mood-radar-DuoiTsYn.js +0 -903
- package/dist/vue-ui-nested-donuts-BTswQFjz.js +0 -1419
- package/dist/vue-ui-onion-D-1U2Qgl.js +0 -915
- package/dist/vue-ui-parallel-coordinate-plot-D-7VFHas.js +0 -1051
- package/dist/vue-ui-radar-BSfxyur3.js +0 -984
- package/dist/vue-ui-relation-circle-C7uV2mIj.js +0 -641
- package/dist/vue-ui-ridgeline-CYMfTlwI.js +0 -1273
- package/dist/vue-ui-rings-C96aj57d.js +0 -855
- package/dist/vue-ui-scatter-CtvOXUnx.js +0 -1590
- package/dist/vue-ui-spark-trend-6_Ibziyv.js +0 -337
- package/dist/vue-ui-sparkbar-BDCocMLI.js +0 -352
- package/dist/vue-ui-sparkgauge-CQ4Zk9-f.js +0 -233
- package/dist/vue-ui-sparkhistogram-BlTV9wfn.js +0 -384
- package/dist/vue-ui-sparkline-DWESyiqL.js +0 -514
- package/dist/vue-ui-sparkstackbar-DK_7X8mL.js +0 -441
- package/dist/vue-ui-stackbar-BWuw8ff4.js +0 -1827
- package/dist/vue-ui-table-heatmap-C9EMEM3Z.js +0 -282
- package/dist/vue-ui-thermometer-CDrM-WFq.js +0 -584
- package/dist/vue-ui-tiremarks-BQH2pNkG.js +0 -450
- package/dist/vue-ui-treemap-6WLoCHsH.js +0 -1330
- package/dist/vue-ui-wheel-CqHw1WuW.js +0 -663
- package/dist/vue-ui-word-cloud-CKuWZGLv.js +0 -875
- package/dist/vue-ui-xy-Cz2qIEfi.js +0 -3424
- package/dist/vue-ui-xy-canvas-y4h7gEFp.js +0 -1564
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as ce, ref as f, toRefs as he, computed as u, watch as G, nextTick as J, onMounted as ye, createElementBlock as r, openBlock as o, normalizeStyle as pe, createCommentVNode as h, createBlock as ge, unref as i, createVNode as me, createElementVNode as z, renderSlot as K, toDisplayString as Q } from "vue";
|
|
2
|
-
import { c as ke, t as be, u as Y, o as R, f as _e, x, ad as we, X as xe, s as Z, z as ee, d as te, a as $e } from "./lib-C_mNZmhD.js";
|
|
3
|
-
import { t as Le, u as Ce } from "./useResponsive-DfdjqQps.js";
|
|
4
|
-
import { u as Ae, a as le } from "./useNestedProp-CReNavA0.js";
|
|
5
|
-
import { u as Te, B as Ne } from "./BaseScanner-BgWxam9d.js";
|
|
6
|
-
import { u as Se } from "./useFitSvgText-2crs6Fv5.js";
|
|
7
|
-
import { t as ze } from "./themes-AUNCOb2G.js";
|
|
8
|
-
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
-
const Me = ["id"], Ie = ["xmlns", "viewBox"], je = ["width", "height"], Ee = ["id"], Be = ["stop-color"], Ve = ["stop-color"], De = { key: 1 }, Oe = ["d", "fill"], Ge = ["d", "fill"], Re = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], Ze = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], We = ["d"], He = ["fill", "d"], Ue = ["x", "y", "width", "height"], qe = ["x", "y", "fill", "font-size", "font-weight"], Pe = ["stroke", "cx", "cy", "fill"], Xe = ["x", "y", "font-size", "fill", "font-weight"], Je = {
|
|
10
|
-
__name: "vue-ui-spark-trend",
|
|
11
|
-
props: {
|
|
12
|
-
config: {
|
|
13
|
-
type: Object,
|
|
14
|
-
default() {
|
|
15
|
-
return {};
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
dataset: {
|
|
19
|
-
type: Array,
|
|
20
|
-
default() {
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
setup(ae) {
|
|
26
|
-
const ne = ce(() => import("./PackageVersion-Y7t79Jtq.js")), { vue_ui_spark_trend: ue } = Ae(), m = ae, F = f(null), W = f(null), H = f(null), $ = f(null), C = f(null), A = f(!1), y = f(null), L = f(ke()), e = f(j()), { loading: _, FINAL_DATASET: M, manualLoading: I } = Te({
|
|
27
|
-
...he(m),
|
|
28
|
-
FINAL_CONFIG: e,
|
|
29
|
-
prepareConfig: j,
|
|
30
|
-
skeletonDataset: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233],
|
|
31
|
-
skeletonConfig: be({
|
|
32
|
-
defaultConfig: e.value,
|
|
33
|
-
userConfig: {
|
|
34
|
-
style: {
|
|
35
|
-
animation: { show: !1 },
|
|
36
|
-
backgroundColor: "#99999930",
|
|
37
|
-
line: {
|
|
38
|
-
stroke: "#6A6A6A",
|
|
39
|
-
useColorTrend: !1
|
|
40
|
-
},
|
|
41
|
-
dataLabel: { show: !1, useColorTrend: !1, color: "#6A6A6A" }
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
});
|
|
46
|
-
function j() {
|
|
47
|
-
const t = le({
|
|
48
|
-
userConfig: m.config,
|
|
49
|
-
defaultConfig: ue
|
|
50
|
-
});
|
|
51
|
-
return t.theme ? {
|
|
52
|
-
...le({
|
|
53
|
-
userConfig: ze.vue_ui_spark_trend[t.theme] || m.config,
|
|
54
|
-
defaultConfig: t
|
|
55
|
-
})
|
|
56
|
-
} : t;
|
|
57
|
-
}
|
|
58
|
-
const p = u(() => Y({
|
|
59
|
-
data: M.value,
|
|
60
|
-
threshold: e.value.downsample.threshold
|
|
61
|
-
}));
|
|
62
|
-
G(() => m.config, (t) => {
|
|
63
|
-
e.value = j(), V.value = e.value.style.width, w.value = e.value.style.height, U();
|
|
64
|
-
}, { deep: !0 });
|
|
65
|
-
function E(t) {
|
|
66
|
-
return t.map((l) => x(l));
|
|
67
|
-
}
|
|
68
|
-
const b = f(Y({
|
|
69
|
-
data: M.value,
|
|
70
|
-
threshold: e.value.downsample.threshold
|
|
71
|
-
}).map((t) => e.value.style.animation.show || [void 0, 1 / 0, -1 / 0, null, NaN].includes(t) ? null : t));
|
|
72
|
-
G(p, (t) => {
|
|
73
|
-
y.value && (cancelAnimationFrame(y.value), y.value = null), e.value.style.animation.show ? b.value = Array(t.length).fill(null) : b.value = t.map(
|
|
74
|
-
(l) => ![void 0, 1 / 0, -1 / 0, null].includes(l) && !Number.isNaN(l) ? l : null
|
|
75
|
-
), B(), J(() => S(".vue-ui-sparktrend-progress-label", 6));
|
|
76
|
-
}, { deep: !0, immediate: !0 }), G(
|
|
77
|
-
() => JSON.stringify(m.dataset),
|
|
78
|
-
() => {
|
|
79
|
-
y.value && (cancelAnimationFrame(y.value), y.value = null), I.value = R(m.dataset);
|
|
80
|
-
const t = p.value;
|
|
81
|
-
b.value = e.value.style.animation.show ? Array(t.length).fill(null) : t.map((l) => Number.isFinite(l) ? l : null), B(), J(() => S(".vue-ui-sparktrend-progress-label", 6));
|
|
82
|
-
},
|
|
83
|
-
{ deep: !1, immediate: !0 }
|
|
84
|
-
);
|
|
85
|
-
function B() {
|
|
86
|
-
let l = 1e3 / e.value.style.animation.animationFrames, s = performance.now();
|
|
87
|
-
if (!_.value && e.value.style.animation.show && e.value.style.animation.animationFrames && M.value.length > 1) {
|
|
88
|
-
let k = function() {
|
|
89
|
-
A.value = !0;
|
|
90
|
-
let P = performance.now(), X = P - s;
|
|
91
|
-
X > l ? (s = P - X % l, c < p.value.length ? (b.value.push(p.value[c]), c += 1, y.value = requestAnimationFrame(k)) : (cancelAnimationFrame(y.value), b.value = E(p.value), A.value = !1, S(".vue-ui-sparktrend-progress-label", 6))) : y.value = requestAnimationFrame(k);
|
|
92
|
-
};
|
|
93
|
-
b.value = [];
|
|
94
|
-
let c = 0;
|
|
95
|
-
k();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
ye(() => {
|
|
99
|
-
U();
|
|
100
|
-
});
|
|
101
|
-
const se = u(() => e.value.debug);
|
|
102
|
-
function U() {
|
|
103
|
-
if (R(m.dataset) && (_e({
|
|
104
|
-
componentName: "VueUiSparkTrend",
|
|
105
|
-
type: "dataset",
|
|
106
|
-
debug: se.value
|
|
107
|
-
}), I.value = !0), R(m.dataset) || (I.value = !1), e.value.responsive) {
|
|
108
|
-
const t = Le(() => {
|
|
109
|
-
const { width: l, height: s } = Ce({
|
|
110
|
-
chart: F.value,
|
|
111
|
-
source: H.value
|
|
112
|
-
});
|
|
113
|
-
requestAnimationFrame(() => {
|
|
114
|
-
V.value = l, w.value = s;
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
$.value && (C.value && $.value.unobserve(C.value), $.value.disconnect()), $.value = new ResizeObserver(t), C.value = F.value.parentNode, $.value.observe(C.value);
|
|
118
|
-
}
|
|
119
|
-
B(), S(".vue-ui-sparktrend-progress-label", 6);
|
|
120
|
-
}
|
|
121
|
-
const V = f(e.value.style.width), w = f(e.value.style.height), v = u(() => ({
|
|
122
|
-
height: w.value,
|
|
123
|
-
width: V.value
|
|
124
|
-
})), n = u(() => ({
|
|
125
|
-
top: e.value.style.padding.top,
|
|
126
|
-
left: e.value.style.padding.left,
|
|
127
|
-
right: v.value.width - e.value.style.padding.right,
|
|
128
|
-
bottom: v.value.height - e.value.style.padding.bottom,
|
|
129
|
-
height: v.value.height - (e.value.style.padding.top + e.value.style.padding.bottom) - (e.value.style.dataLabel.show ? e.value.style.dataLabel.fontSize : 0),
|
|
130
|
-
width: v.value.width - (e.value.style.padding.left + e.value.style.padding.right)
|
|
131
|
-
})), D = u(() => {
|
|
132
|
-
const t = E(p.value).filter(Number.isFinite);
|
|
133
|
-
if (!t.length) return { max: 0, min: 0 };
|
|
134
|
-
let l = t[0], s = t[0];
|
|
135
|
-
for (let c = 1; c < t.length; c++) {
|
|
136
|
-
const k = t[c];
|
|
137
|
-
k > l && (l = k), k < s && (s = k);
|
|
138
|
-
}
|
|
139
|
-
return { max: l, min: s };
|
|
140
|
-
}), oe = u(() => {
|
|
141
|
-
const t = p.value, l = t.length ? t[t.length - 1] : "x";
|
|
142
|
-
return [
|
|
143
|
-
L.value,
|
|
144
|
-
t.length,
|
|
145
|
-
Number.isFinite(l) ? l : "x",
|
|
146
|
-
e.value.downsample.threshold,
|
|
147
|
-
e.value.style.line.smooth ? "s" : "l"
|
|
148
|
-
].join("-");
|
|
149
|
-
}), T = u(() => {
|
|
150
|
-
const t = D.value.min >= 0 ? 0 : D.value.min;
|
|
151
|
-
return Math.abs(t);
|
|
152
|
-
}), re = u(() => D.value.max + T.value);
|
|
153
|
-
function q(t) {
|
|
154
|
-
return t / re.value;
|
|
155
|
-
}
|
|
156
|
-
const ie = u(() => p.value.length), a = u(() => b.value.map((t, l) => {
|
|
157
|
-
const s = isNaN(t) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t) ? 0 : t || 0;
|
|
158
|
-
return {
|
|
159
|
-
value: x(t),
|
|
160
|
-
absoluteValue: x(s),
|
|
161
|
-
plotValue: x(s + T.value),
|
|
162
|
-
toMax: q(s + T.value),
|
|
163
|
-
x: n.value.left + x(l * (n.value.width / (ie.value - 1))) - e.value.style.padding.right,
|
|
164
|
-
y: n.value.bottom - x(n.value.height * q(s + T.value))
|
|
165
|
-
};
|
|
166
|
-
})), N = u(() => {
|
|
167
|
-
const t = E(p.value);
|
|
168
|
-
return e.value.style.trendLabel.trendType === "global" ? we(t) : e.value.style.trendLabel.trendType === "n-1" && t.length > 1 ? (t.at(-1) / t.at(-2) - 1) * 100 : e.value.style.trendLabel.trendType === "lastToFirst" ? (t.at(-1) / t[0] - 1) * 100 : 0;
|
|
169
|
-
}), O = u(() => A.value || N.value === 0 ? "neutral" : N.value > 0 ? "positive" : "negative"), g = u(() => e.value.style.arrow.colors[O.value]), ve = u(() => {
|
|
170
|
-
const t = { x: a.value[0].x, y: v.value.height - 6 }, l = { x: a.value[a.value.length - 1].x, y: v.value.height - 6 }, s = [];
|
|
171
|
-
return a.value.forEach((c) => {
|
|
172
|
-
s.push(`${c.x},${c.y} `);
|
|
173
|
-
}), [t.x, t.y, ...s, l.x, l.y].toString();
|
|
174
|
-
}), de = u(() => {
|
|
175
|
-
let t = [];
|
|
176
|
-
return a.value.forEach((l) => {
|
|
177
|
-
t.push(`${l.x},${l.y} `);
|
|
178
|
-
}), `M ${t.toString()}`;
|
|
179
|
-
}), d = u(() => w.value / 2 - e.value.style.trendLabel.fontSize), fe = u(() => n.value.left * 0.8), { fitText: S } = Se({
|
|
180
|
-
svgRef: W,
|
|
181
|
-
unitWidth: fe,
|
|
182
|
-
fontSize: e.value.style.trendLabel.fontSize
|
|
183
|
-
});
|
|
184
|
-
return (t, l) => (o(), r("div", {
|
|
185
|
-
ref_key: "sparkTrendChart",
|
|
186
|
-
ref: F,
|
|
187
|
-
class: "vue-data-ui-component vue-ui-spark-trend",
|
|
188
|
-
id: L.value,
|
|
189
|
-
style: pe(`width:100%;font-family:${e.value.style.fontFamily};background:${e.value.style.backgroundColor}`)
|
|
190
|
-
}, [
|
|
191
|
-
(o(), r("svg", {
|
|
192
|
-
key: oe.value,
|
|
193
|
-
ref_key: "svgRef",
|
|
194
|
-
ref: W,
|
|
195
|
-
xmlns: i(xe),
|
|
196
|
-
viewBox: `0 0 ${v.value.width} ${v.value.height}`,
|
|
197
|
-
style: "width:100%;background:transparent;overflow:visible"
|
|
198
|
-
}, [
|
|
199
|
-
me(i(ne)),
|
|
200
|
-
t.$slots["chart-background"] ? (o(), r("foreignObject", {
|
|
201
|
-
key: 0,
|
|
202
|
-
x: 0,
|
|
203
|
-
y: 0,
|
|
204
|
-
width: v.value.width <= 0 ? 10 : v.value.width,
|
|
205
|
-
height: v.value.height <= 0 ? 10 : v.value.height,
|
|
206
|
-
style: {
|
|
207
|
-
pointerEvents: "none"
|
|
208
|
-
}
|
|
209
|
-
}, [
|
|
210
|
-
K(t.$slots, "chart-background", {}, void 0, !0)
|
|
211
|
-
], 8, je)) : h("", !0),
|
|
212
|
-
z("defs", null, [
|
|
213
|
-
z("linearGradient", {
|
|
214
|
-
x1: "0%",
|
|
215
|
-
y1: "0%",
|
|
216
|
-
x2: "0%",
|
|
217
|
-
y2: "100%",
|
|
218
|
-
id: `pill_gradient_${L.value}`
|
|
219
|
-
}, [
|
|
220
|
-
z("stop", {
|
|
221
|
-
offset: "0%",
|
|
222
|
-
"stop-color": i(Z)(e.value.style.line.useColorTrend ? g.value : e.value.style.line.stroke, e.value.style.area.opacity)
|
|
223
|
-
}, null, 8, Be),
|
|
224
|
-
z("stop", {
|
|
225
|
-
offset: "100%",
|
|
226
|
-
"stop-color": e.value.style.backgroundColor
|
|
227
|
-
}, null, 8, Ve)
|
|
228
|
-
], 8, Ee)
|
|
229
|
-
]),
|
|
230
|
-
e.value.style.area.show && a.value[0] ? (o(), r("g", De, [
|
|
231
|
-
e.value.style.line.smooth ? (o(), r("path", {
|
|
232
|
-
key: 0,
|
|
233
|
-
d: `M ${a.value[0].x},${n.value.bottom} ${i(ee)(a.value)} L ${a.value.at(-1).x},${n.value.bottom} Z`,
|
|
234
|
-
fill: e.value.style.area.useGradient ? `url(#pill_gradient_${L.value})` : i(Z)(e.value.style.line.useColorTrend ? g.value : e.value.style.line.stroke, e.value.style.area.opacity),
|
|
235
|
-
stroke: "none"
|
|
236
|
-
}, null, 8, Oe)) : (o(), r("path", {
|
|
237
|
-
key: 1,
|
|
238
|
-
d: `M${ve.value}Z`,
|
|
239
|
-
fill: e.value.style.area.useGradient ? `url(#pill_gradient_${L.value})` : i(Z)(e.value.style.line.useColorTrend ? g.value : e.value.style.line.stroke, e.value.style.area.opacity),
|
|
240
|
-
stroke: "none"
|
|
241
|
-
}, null, 8, Ge))
|
|
242
|
-
])) : h("", !0),
|
|
243
|
-
e.value.style.line.smooth && a.value.length ? (o(), r("path", {
|
|
244
|
-
key: 2,
|
|
245
|
-
d: `M ${i(ee)(a.value)}`,
|
|
246
|
-
stroke: e.value.style.line.useColorTrend ? g.value : e.value.style.line.stroke,
|
|
247
|
-
fill: "none",
|
|
248
|
-
"stroke-width": e.value.style.line.strokeWidth,
|
|
249
|
-
"stroke-linecap": e.value.style.line.strokeLinecap,
|
|
250
|
-
"stroke-linejoin": e.value.style.line.strokeLinejoin
|
|
251
|
-
}, null, 8, Re)) : h("", !0),
|
|
252
|
-
!e.value.style.line.smooth && a.value.length ? (o(), r("path", {
|
|
253
|
-
key: 3,
|
|
254
|
-
d: de.value,
|
|
255
|
-
stroke: e.value.style.line.useColorTrend ? g.value : e.value.style.line.stroke,
|
|
256
|
-
fill: "none",
|
|
257
|
-
"stroke-width": e.value.style.line.strokeWidth,
|
|
258
|
-
"stroke-linecap": e.value.style.line.strokeLinecap,
|
|
259
|
-
"stroke-linejoin": e.value.style.line.strokeLinejoin
|
|
260
|
-
}, null, 8, Ze)) : h("", !0),
|
|
261
|
-
i(_) ? (o(), r("path", {
|
|
262
|
-
key: 4,
|
|
263
|
-
fill: "#6A6A6A",
|
|
264
|
-
d: `M ${n.value.left / 2 + 6}, ${d.value + 7} ${n.value.left / 2 - 7}, ${d.value} ${n.value.left / 2 - 7}, ${d.value + 14} Z`
|
|
265
|
-
}, null, 8, We)) : (o(), r("path", {
|
|
266
|
-
key: 5,
|
|
267
|
-
fill: g.value,
|
|
268
|
-
d: O.value === "positive" ? `M ${n.value.left / 2}, ${d.value} ${n.value.left / 2 - 7}, ${d.value + 12} ${n.value.left / 2 + 7}, ${d.value + 12} Z` : O.value === "negative" ? `M ${n.value.left / 2}, ${d.value + 12} ${n.value.left / 2 - 7}, ${d.value} ${n.value.left / 2 + 7}, ${d.value} Z` : `M ${n.value.left / 2 + 6}, ${d.value + 7} ${n.value.left / 2 - 7}, ${d.value} ${n.value.left / 2 - 7}, ${d.value + 14} Z`
|
|
269
|
-
}, null, 8, He)),
|
|
270
|
-
i(_) ? (o(), r("rect", {
|
|
271
|
-
key: 6,
|
|
272
|
-
x: n.value.left / 2 - e.value.style.trendLabel.fontSize - 2,
|
|
273
|
-
y: w.value / 2 + e.value.style.trendLabel.fontSize - 2,
|
|
274
|
-
width: e.value.style.trendLabel.fontSize * 2,
|
|
275
|
-
height: e.value.style.trendLabel.fontSize,
|
|
276
|
-
fill: "#6A6A6A80",
|
|
277
|
-
rx: "3"
|
|
278
|
-
}, null, 8, Ue)) : h("", !0),
|
|
279
|
-
!A.value && !i(_) ? (o(), r("text", {
|
|
280
|
-
key: 7,
|
|
281
|
-
class: "vue-ui-sparktrend-progress-label",
|
|
282
|
-
x: n.value.left / 2,
|
|
283
|
-
y: w.value / 2 + e.value.style.trendLabel.fontSize * 2,
|
|
284
|
-
"text-anchor": "middle",
|
|
285
|
-
fill: e.value.style.trendLabel.useColorTrend ? g.value : e.value.style.trendLabel.color,
|
|
286
|
-
"font-size": e.value.style.trendLabel.fontSize,
|
|
287
|
-
"font-weight": e.value.style.trendLabel.bold ? "bold" : "normal"
|
|
288
|
-
}, Q(i(te)({
|
|
289
|
-
p: N.value > 0 ? "+" : "",
|
|
290
|
-
v: N.value,
|
|
291
|
-
s: "%",
|
|
292
|
-
r: e.value.style.trendLabel.rounding
|
|
293
|
-
})), 9, qe)) : h("", !0),
|
|
294
|
-
a.value.length && a.value.at(-1).x !== void 0 ? (o(), r("circle", {
|
|
295
|
-
key: 8,
|
|
296
|
-
stroke: e.value.style.backgroundColor,
|
|
297
|
-
"stroke-width": 2,
|
|
298
|
-
cx: a.value.at(-1).x,
|
|
299
|
-
cy: a.value.at(-1).y,
|
|
300
|
-
r: 4,
|
|
301
|
-
fill: i(_) ? "#6A6A6A" : g.value
|
|
302
|
-
}, null, 8, Pe)) : h("", !0),
|
|
303
|
-
a.value.length && a.value.at(-1).x !== void 0 && e.value.style.dataLabel.show ? (o(), r("text", {
|
|
304
|
-
key: 9,
|
|
305
|
-
"text-anchor": "middle",
|
|
306
|
-
x: a.value.at(-1).x,
|
|
307
|
-
y: a.value.at(-1).y - e.value.style.dataLabel.fontSize / 1.5,
|
|
308
|
-
"font-size": e.value.style.dataLabel.fontSize,
|
|
309
|
-
fill: e.value.style.dataLabel.useColorTrend ? g.value : e.value.style.dataLabel.color,
|
|
310
|
-
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
|
|
311
|
-
}, Q(i($e)(
|
|
312
|
-
e.value.style.dataLabel.formatter,
|
|
313
|
-
a.value.at(-1).value,
|
|
314
|
-
i(te)({
|
|
315
|
-
p: e.value.style.dataLabel.prefix,
|
|
316
|
-
v: a.value.at(-1).value,
|
|
317
|
-
s: e.value.style.dataLabel.suffix,
|
|
318
|
-
r: e.value.style.dataLabel.rounding
|
|
319
|
-
}),
|
|
320
|
-
{ datapoint: a.value.at(-1) }
|
|
321
|
-
)), 9, Xe)) : h("", !0)
|
|
322
|
-
], 8, Ie)),
|
|
323
|
-
t.$slots.source ? (o(), r("div", {
|
|
324
|
-
key: 0,
|
|
325
|
-
ref_key: "source",
|
|
326
|
-
ref: H,
|
|
327
|
-
dir: "auto"
|
|
328
|
-
}, [
|
|
329
|
-
K(t.$slots, "source", {}, void 0, !0)
|
|
330
|
-
], 512)) : h("", !0),
|
|
331
|
-
i(_) ? (o(), ge(Ne, { key: 1 })) : h("", !0)
|
|
332
|
-
], 12, Me));
|
|
333
|
-
}
|
|
334
|
-
}, ut = /* @__PURE__ */ Fe(Je, [["__scopeId", "data-v-b0090f77"]]);
|
|
335
|
-
export {
|
|
336
|
-
ut as default
|
|
337
|
-
};
|
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as Z, useSlots as ee, onMounted as F, ref as x, toRefs as te, computed as w, watch as B, nextTick as le, createElementBlock as i, openBlock as s, normalizeStyle as d, unref as a, renderSlot as $, createCommentVNode as p, createBlock as ae, normalizeProps as oe, mergeProps as E, createElementVNode as v, toDisplayString as y, Fragment as M, renderList as ne, createVNode as se } from "vue";
|
|
2
|
-
import { c as ue, t as ie, b as re, p as _, e as ve, o as ce, f as P, g as de, h as pe, s as D, a as C, d as A, X as fe, i as ye } from "./lib-C_mNZmhD.js";
|
|
3
|
-
import { u as ge, a as V } from "./useNestedProp-CReNavA0.js";
|
|
4
|
-
import { t as me } from "./themes-AUNCOb2G.js";
|
|
5
|
-
import { u as he, B as xe } from "./BaseScanner-BgWxam9d.js";
|
|
6
|
-
const ke = ["onClick", "onMouseenter", "onMouseleave"], be = { key: 1 }, we = ["xmlns", "viewBox"], _e = ["id"], Ce = ["stop-color"], Ae = ["stop-color"], Se = ["height", "width", "fill", "rx"], $e = ["height", "width", "fill", "rx"], De = ["height", "width", "fill", "rx"], Ie = {
|
|
7
|
-
key: 2,
|
|
8
|
-
ref: "source",
|
|
9
|
-
dir: "auto"
|
|
10
|
-
}, Be = {
|
|
11
|
-
__name: "vue-ui-sparkbar",
|
|
12
|
-
props: {
|
|
13
|
-
config: {
|
|
14
|
-
type: Object,
|
|
15
|
-
default() {
|
|
16
|
-
return {};
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
dataset: {
|
|
20
|
-
type: Array,
|
|
21
|
-
default() {
|
|
22
|
-
return [];
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
/**
|
|
26
|
-
* Used in VueUiRadar's tooltip exclusively
|
|
27
|
-
*/
|
|
28
|
-
backgroundOpacity: {
|
|
29
|
-
type: Number,
|
|
30
|
-
default: null
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
emits: ["selectDatapoint"],
|
|
34
|
-
setup(O, { emit: j }) {
|
|
35
|
-
const U = Z(() => import("./PackageVersion-Y7t79Jtq.js")), { vue_ui_sparkbar: R } = ge(), f = O, W = ee();
|
|
36
|
-
F(() => {
|
|
37
|
-
W["chart-background"] && console.warn("VueUiSparkbar does not support the #chart-background slot.");
|
|
38
|
-
});
|
|
39
|
-
const I = x(ue()), e = x(S()), { loading: k, FINAL_DATASET: c } = he({
|
|
40
|
-
...te(f),
|
|
41
|
-
FINAL_CONFIG: e,
|
|
42
|
-
prepareConfig: S,
|
|
43
|
-
skeletonDataset: [
|
|
44
|
-
{ name: "_", value: 21, target: 25, color: "#808080" },
|
|
45
|
-
{ name: "_", value: 13, target: 25, color: "#ADADAD" },
|
|
46
|
-
{ name: "_", value: 8, target: 25, color: "#DBDBDB" }
|
|
47
|
-
],
|
|
48
|
-
skeletonConfig: ie({
|
|
49
|
-
defaultConfig: e.value,
|
|
50
|
-
userConfig: {
|
|
51
|
-
style: {
|
|
52
|
-
backgroundColor: "#99999930",
|
|
53
|
-
animation: { show: !1 },
|
|
54
|
-
layout: { independant: !0 },
|
|
55
|
-
gutter: {
|
|
56
|
-
backgroundColor: "#6A6A6A",
|
|
57
|
-
opacity: 50
|
|
58
|
-
},
|
|
59
|
-
bar: {
|
|
60
|
-
gradient: {
|
|
61
|
-
underlayerColor: "#6A6A6A"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
}), L = w(() => !!e.value.debug);
|
|
68
|
-
function S() {
|
|
69
|
-
const t = V({
|
|
70
|
-
userConfig: f.config,
|
|
71
|
-
defaultConfig: R
|
|
72
|
-
});
|
|
73
|
-
return t.theme ? {
|
|
74
|
-
...V({
|
|
75
|
-
userConfig: me.vue_ui_sparkbar[t.theme] || f.config,
|
|
76
|
-
defaultConfig: t
|
|
77
|
-
}),
|
|
78
|
-
customPalette: re[t.theme] || _
|
|
79
|
-
} : t;
|
|
80
|
-
}
|
|
81
|
-
B(() => f.config, (t) => {
|
|
82
|
-
e.value = S();
|
|
83
|
-
}, { deep: !0 });
|
|
84
|
-
const G = w(() => ve(e.value.customPalette)), g = x(c.value.map((t) => ({
|
|
85
|
-
...t,
|
|
86
|
-
value: e.value.style.animation.show ? 0 : t.value || 0,
|
|
87
|
-
formatter: t.formatter || null
|
|
88
|
-
}))), T = x(null);
|
|
89
|
-
F(async () => {
|
|
90
|
-
ce(f.dataset) && P({
|
|
91
|
-
componentName: "VueUiSparkbar",
|
|
92
|
-
type: "dataset",
|
|
93
|
-
debug: L.value
|
|
94
|
-
}), z();
|
|
95
|
-
});
|
|
96
|
-
function z() {
|
|
97
|
-
if (e.value.style.animation.show) {
|
|
98
|
-
let h = function() {
|
|
99
|
-
n += l / t, n < l ? (g.value = g.value.map((u, b) => ({
|
|
100
|
-
...u,
|
|
101
|
-
value: u.value += o[b]
|
|
102
|
-
})), T.value = requestAnimationFrame(h)) : g.value = c.value.map((u) => ({
|
|
103
|
-
...u,
|
|
104
|
-
value: u.value || 0,
|
|
105
|
-
formatter: u.formatter || null
|
|
106
|
-
}));
|
|
107
|
-
};
|
|
108
|
-
const t = e.value.style.animation.animationFrames, o = c.value.map((u, b) => u.value / t), l = c.value.map((u) => u.value || 0).reduce((u, b) => u + b, 0);
|
|
109
|
-
let n = 0;
|
|
110
|
-
h();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
B(() => c.value, async (t) => {
|
|
114
|
-
cancelAnimationFrame(T.value), g.value = c.value.map((o) => ({
|
|
115
|
-
...o,
|
|
116
|
-
value: e.value.style.animation.show ? 0 : o.value || 0,
|
|
117
|
-
formatter: o.formatter || null
|
|
118
|
-
})), le(z);
|
|
119
|
-
}, { deep: !0 });
|
|
120
|
-
const r = x({
|
|
121
|
-
width: 500,
|
|
122
|
-
height: 16
|
|
123
|
-
}), q = w(() => Math.max(...c.value.map((t) => t.value))), H = w(() => (c.value.forEach((t, o) => {
|
|
124
|
-
de({
|
|
125
|
-
datasetObject: t,
|
|
126
|
-
requiredAttributes: ["name", "value"]
|
|
127
|
-
}).forEach((l) => {
|
|
128
|
-
P({
|
|
129
|
-
componentName: "VueUiSparkbar",
|
|
130
|
-
type: "datasetSerieAttribute",
|
|
131
|
-
property: l,
|
|
132
|
-
index: o,
|
|
133
|
-
debug: L.value
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
}), g.value.map((t, o) => ({
|
|
137
|
-
...t,
|
|
138
|
-
value: t.value || 0,
|
|
139
|
-
color: pe(t.color) || G.value[o] || _[o] || _[o % _.length]
|
|
140
|
-
}))));
|
|
141
|
-
function X(t) {
|
|
142
|
-
return t / q.value;
|
|
143
|
-
}
|
|
144
|
-
function N(t) {
|
|
145
|
-
return e.value.style.layout.independant ? t.target ? t.value / t.target : e.value.style.layout.percentage ? t.value > 100 ? 1 : t.value / 100 : e.value.style.layout.target === 0 ? 1 : t.value / e.value.style.layout.target : X(t.value);
|
|
146
|
-
}
|
|
147
|
-
function m(t) {
|
|
148
|
-
return e.value.style.layout.independant && t.target || e.value.style.layout.target;
|
|
149
|
-
}
|
|
150
|
-
const J = j;
|
|
151
|
-
function K(t, o) {
|
|
152
|
-
J("selectDatapoint", { datapoint: t, index: o }), e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: o });
|
|
153
|
-
}
|
|
154
|
-
function Q(t, o) {
|
|
155
|
-
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: o });
|
|
156
|
-
}
|
|
157
|
-
function Y(t, o) {
|
|
158
|
-
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: o });
|
|
159
|
-
}
|
|
160
|
-
return (t, o) => (s(), i("div", {
|
|
161
|
-
class: "vue-data-ui-component vue-ui-sparkbar",
|
|
162
|
-
style: d({
|
|
163
|
-
width: "100%",
|
|
164
|
-
position: "relative",
|
|
165
|
-
fontFamily: e.value.style.fontFamily,
|
|
166
|
-
background: f.backgroundOpacity !== null ? a(D)(e.value.style.backgroundColor, f.backgroundOpacity) : e.value.style.backgroundColor
|
|
167
|
-
})
|
|
168
|
-
}, [
|
|
169
|
-
t.$slots.title ? $(t.$slots, "title", oe(E({ key: 0 }, { title: { ...t.title, title: e.value.style.title.text, subtitle: e.value.style.title.subtitle.text } }))) : p("", !0),
|
|
170
|
-
!t.$slots.title && e.value.style.title.text ? (s(), i("div", {
|
|
171
|
-
key: 1,
|
|
172
|
-
class: "vue-ui-sparkbar-title-container",
|
|
173
|
-
style: d({
|
|
174
|
-
background: e.value.style.title.backgroundColor,
|
|
175
|
-
margin: e.value.style.title.margin,
|
|
176
|
-
textAlign: e.value.style.title.textAlign
|
|
177
|
-
})
|
|
178
|
-
}, [
|
|
179
|
-
v("div", {
|
|
180
|
-
class: "vue-ui-sparkbar-title",
|
|
181
|
-
style: d({
|
|
182
|
-
fontSize: e.value.style.title.fontSize + "px",
|
|
183
|
-
color: e.value.style.title.color,
|
|
184
|
-
fontWeight: e.value.style.title.bold ? "bold" : "normal"
|
|
185
|
-
})
|
|
186
|
-
}, y(e.value.style.title.text), 5),
|
|
187
|
-
e.value.style.title.subtitle.text ? (s(), i("div", {
|
|
188
|
-
key: 0,
|
|
189
|
-
class: "vue-ui-sparkbar-subtitle",
|
|
190
|
-
style: d({
|
|
191
|
-
fontSize: e.value.style.title.subtitle.fontSize + "px",
|
|
192
|
-
color: e.value.style.title.subtitle.color,
|
|
193
|
-
fontWeight: e.value.style.title.subtitle.bold ? "bold" : "normal"
|
|
194
|
-
})
|
|
195
|
-
}, y(e.value.style.title.subtitle.text), 5)) : p("", !0)
|
|
196
|
-
], 4)) : p("", !0),
|
|
197
|
-
(s(!0), i(M, null, ne(H.value, (l, n) => (s(), i("div", {
|
|
198
|
-
style: d(`display:flex !important;${["left", "right"].includes(e.value.style.labels.name.position) ? `flex-direction: ${e.value.style.labels.name.position === "right" ? "row-reverse" : "row"} !important` : "flex-direction:column !important"};gap:${e.value.style.gap}px !important;align-items:center;${a(c).length > 0 && n !== a(c).length - 1 ? "margin-bottom:6px" : ""}`),
|
|
199
|
-
onClick: (h) => K(l, n),
|
|
200
|
-
onMouseenter: (h) => Q(l, n),
|
|
201
|
-
onMouseleave: (h) => Y(l, n)
|
|
202
|
-
}, [
|
|
203
|
-
a(k) ? p("", !0) : $(t.$slots, "data-label", E({
|
|
204
|
-
key: 0,
|
|
205
|
-
ref_for: !0
|
|
206
|
-
}, { bar: {
|
|
207
|
-
...l,
|
|
208
|
-
target: m(l),
|
|
209
|
-
valueLabel: a(C)(
|
|
210
|
-
l.formatter,
|
|
211
|
-
l.value,
|
|
212
|
-
a(A)({
|
|
213
|
-
p: l.prefix || "",
|
|
214
|
-
v: l.value,
|
|
215
|
-
s: l.suffix || "",
|
|
216
|
-
r: l.rounding || 0
|
|
217
|
-
}),
|
|
218
|
-
{ datapoint: l, seriesIndex: n }
|
|
219
|
-
),
|
|
220
|
-
targetLabel: a(C)(
|
|
221
|
-
l.formatter,
|
|
222
|
-
m(l),
|
|
223
|
-
a(A)({
|
|
224
|
-
p: l.prefix || "",
|
|
225
|
-
v: m(l),
|
|
226
|
-
s: l.suffix || "",
|
|
227
|
-
r: l.rounding || 0
|
|
228
|
-
}),
|
|
229
|
-
{ datapoint: l, seriesIndex: n }
|
|
230
|
-
)
|
|
231
|
-
} })),
|
|
232
|
-
!t.$slots["data-label"] || a(k) ? (s(), i("div", {
|
|
233
|
-
key: 1,
|
|
234
|
-
style: d({
|
|
235
|
-
display: "flex",
|
|
236
|
-
justifyContent: ["right", "top-right"].includes(e.value.style.labels.name.position) ? "flex-end" : ["top-center"].includes(e.value.style.labels.name.position) ? "center" : "flex-start",
|
|
237
|
-
alignItems: "center",
|
|
238
|
-
width: e.value.style.labels.name.width,
|
|
239
|
-
color: e.value.style.labels.name.color,
|
|
240
|
-
fontSize: e.value.style.labels.fontSize + "px",
|
|
241
|
-
fontWeight: e.value.style.labels.name.bold ? "bold" : "normal",
|
|
242
|
-
flexWrap: "wrap"
|
|
243
|
-
})
|
|
244
|
-
}, [
|
|
245
|
-
a(k) ? (s(), i("div", {
|
|
246
|
-
key: 0,
|
|
247
|
-
class: "vue-ui-sparkbar-skeleton-name",
|
|
248
|
-
style: d({
|
|
249
|
-
width: "60px",
|
|
250
|
-
height: e.value.style.labels.fontSize + "px",
|
|
251
|
-
borderRadius: e.value.style.labels.fontSize / 4 + "px",
|
|
252
|
-
display: "flex",
|
|
253
|
-
alignItems: "center",
|
|
254
|
-
justifyContent: "space-between",
|
|
255
|
-
marginTop: "5px"
|
|
256
|
-
})
|
|
257
|
-
}, [
|
|
258
|
-
v("div", {
|
|
259
|
-
style: d({ height: "100%", width: "40px", borderRadius: e.value.style.labels.fontSize / 4 + "px", backgroundColor: "#6A6A6A80" })
|
|
260
|
-
}, null, 4),
|
|
261
|
-
v("div", {
|
|
262
|
-
style: d({ height: "100%", width: "15px", borderRadius: e.value.style.labels.fontSize / 4 + "px", backgroundColor: "#6A6A6A80" })
|
|
263
|
-
}, null, 4)
|
|
264
|
-
], 4)) : (s(), i(M, { key: 1 }, [
|
|
265
|
-
v("span", null, y(l.name), 1),
|
|
266
|
-
e.value.style.labels.value.show ? (s(), i("span", {
|
|
267
|
-
key: 0,
|
|
268
|
-
style: d(`font-weight:${e.value.style.labels.value.bold ? "bold" : "normal"}`)
|
|
269
|
-
}, ": " + y(a(C)(
|
|
270
|
-
l.formatter,
|
|
271
|
-
l.value,
|
|
272
|
-
a(A)({
|
|
273
|
-
p: l.prefix || "",
|
|
274
|
-
v: l.value,
|
|
275
|
-
s: l.suffix || "",
|
|
276
|
-
r: l.rounding || 0
|
|
277
|
-
}),
|
|
278
|
-
{ datapoint: l, seriesIndex: n }
|
|
279
|
-
)), 5)) : p("", !0),
|
|
280
|
-
e.value.style.layout.showTargetValue ? (s(), i("span", be, y(" " + e.value.style.layout.targetValueText) + " " + y(a(C)(
|
|
281
|
-
l.formatter,
|
|
282
|
-
m(l),
|
|
283
|
-
a(A)({
|
|
284
|
-
p: l.prefix || "",
|
|
285
|
-
v: m(l),
|
|
286
|
-
s: l.suffix || "",
|
|
287
|
-
r: l.rounding || 0
|
|
288
|
-
}),
|
|
289
|
-
{ datapoint: l, seriesIndex: n }
|
|
290
|
-
)), 1)) : p("", !0)
|
|
291
|
-
], 64))
|
|
292
|
-
], 4)) : p("", !0),
|
|
293
|
-
(s(), i("svg", {
|
|
294
|
-
xmlns: a(fe),
|
|
295
|
-
viewBox: `0 0 ${r.value.width} ${r.value.height}`,
|
|
296
|
-
width: "100%"
|
|
297
|
-
}, [
|
|
298
|
-
se(a(U)),
|
|
299
|
-
v("defs", null, [
|
|
300
|
-
v("linearGradient", {
|
|
301
|
-
x1: "0%",
|
|
302
|
-
y1: "0%",
|
|
303
|
-
x2: "100%",
|
|
304
|
-
y2: "0%",
|
|
305
|
-
id: `sparkbar_gradient_${n}_${I.value}`
|
|
306
|
-
}, [
|
|
307
|
-
v("stop", {
|
|
308
|
-
offset: "0%",
|
|
309
|
-
"stop-color": a(D)(a(ye)(l.color, 0.03), 100 - e.value.style.bar.gradient.intensity)
|
|
310
|
-
}, null, 8, Ce),
|
|
311
|
-
v("stop", {
|
|
312
|
-
offset: "100%",
|
|
313
|
-
"stop-color": l.color
|
|
314
|
-
}, null, 8, Ae)
|
|
315
|
-
], 8, _e)
|
|
316
|
-
]),
|
|
317
|
-
v("rect", {
|
|
318
|
-
height: r.value.height,
|
|
319
|
-
width: r.value.width,
|
|
320
|
-
x: 0,
|
|
321
|
-
y: 0,
|
|
322
|
-
fill: a(D)(e.value.style.gutter.backgroundColor, e.value.style.gutter.opacity),
|
|
323
|
-
rx: r.value.height / 2
|
|
324
|
-
}, null, 8, Se),
|
|
325
|
-
v("rect", {
|
|
326
|
-
height: r.value.height,
|
|
327
|
-
width: r.value.width * N(l),
|
|
328
|
-
x: 0,
|
|
329
|
-
y: 0,
|
|
330
|
-
fill: e.value.style.bar.gradient.underlayerColor,
|
|
331
|
-
rx: r.value.height / 2
|
|
332
|
-
}, null, 8, $e),
|
|
333
|
-
v("rect", {
|
|
334
|
-
height: r.value.height,
|
|
335
|
-
width: r.value.width * N(l),
|
|
336
|
-
x: 0,
|
|
337
|
-
y: 0,
|
|
338
|
-
fill: e.value.style.bar.gradient.show ? `url(#sparkbar_gradient_${n}_${I.value})` : l.color,
|
|
339
|
-
rx: r.value.height / 2
|
|
340
|
-
}, null, 8, De)
|
|
341
|
-
], 8, we))
|
|
342
|
-
], 44, ke))), 256)),
|
|
343
|
-
t.$slots.source ? (s(), i("div", Ie, [
|
|
344
|
-
$(t.$slots, "source")
|
|
345
|
-
], 512)) : p("", !0),
|
|
346
|
-
a(k) ? (s(), ae(xe, { key: 3 })) : p("", !0)
|
|
347
|
-
], 4));
|
|
348
|
-
}
|
|
349
|
-
};
|
|
350
|
-
export {
|
|
351
|
-
Be as default
|
|
352
|
-
};
|