vue-data-ui 2.3.61 → 2.3.63
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-B5nYwPUt.js → Arrow-CBx1Hj4I.js} +1 -1
- package/dist/{Arrow-Dv_tprAO.cjs → Arrow-fP0md3L3.cjs} +1 -1
- package/dist/{BaseIcon-DUPLRuLO.js → BaseIcon-CS18qRiy.js} +1 -1
- package/dist/{BaseIcon-aPcCSO_Z.cjs → BaseIcon-O8jJvy48.cjs} +1 -1
- package/dist/{DataTable-NUzEZXWt.js → DataTable-BGJ2mVxG.js} +2 -2
- package/dist/{DataTable-B6xCb-DR.cjs → DataTable-CSEiZDAb.cjs} +1 -1
- package/dist/{Legend-ePmJ_YIA.cjs → Legend-DuuSl2rJ.cjs} +1 -1
- package/dist/{Legend-C3tseguI.js → Legend-UWyvC57K.js} +1 -1
- package/dist/{Shape-DAe5uqIA.cjs → Shape-Dsx4SQVn.cjs} +1 -1
- package/dist/{Shape-BPcWPP9D.js → Shape-HfEpP-Tk.js} +1 -1
- package/dist/{Slicer-CmHwU6if.js → Slicer-Bk3Rt85L.js} +9 -9
- package/dist/{Slicer-BJs52Jle.cjs → Slicer-Cf74aFVz.cjs} +1 -1
- package/dist/{Title-BAQrVaNA.js → Title-CPZstF2C.js} +1 -1
- package/dist/{Title-B_p983os.cjs → Title-PZ6S96pU.cjs} +1 -1
- package/dist/{Tooltip-C2dhDgoh.cjs → Tooltip-BoIYPSX3.cjs} +1 -1
- package/dist/{Tooltip-B73tTE2v.js → Tooltip-CBmmiqKr.js} +5 -5
- package/dist/{index-CwG--L4Z.js → index-C_05i_JG.js} +578 -526
- package/dist/{index-nPEJmXmf.cjs → index-NNZeHOBS.cjs} +4 -4
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-TbnnNrH2.cjs → useNestedProp-CPsbJAGj.cjs} +1 -1
- package/dist/{useNestedProp-BqwYEJGM.js → useNestedProp-DLnT0Wtg.js} +1 -1
- package/dist/{usePrinter-D012Olnq.cjs → usePrinter-BLbY8qGZ.cjs} +1 -1
- package/dist/{usePrinter-Do9tGYem.js → usePrinter-DOhlzlnx.js} +1 -1
- package/dist/{vue-data-ui-DQAJDvpX.cjs → vue-data-ui-D5aG0WkE.cjs} +1 -1
- package/dist/{vue-data-ui-ORLyt-v3.js → vue-data-ui-vqnxkVKv.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +7 -7
- package/dist/{vue-ui-3d-bar-BRbooRg3.cjs → vue-ui-3d-bar-Cez69HMH.cjs} +1 -1
- package/dist/{vue-ui-3d-bar--ztApFzW.js → vue-ui-3d-bar-b7Pu7sfL.js} +7 -7
- package/dist/{vue-ui-accordion-CHL4xuW4.cjs → vue-ui-accordion-CcdyvXrp.cjs} +1 -1
- package/dist/{vue-ui-accordion-Be_wWB1T.js → vue-ui-accordion-rGJVvi_V.js} +3 -3
- package/dist/vue-ui-age-pyramid-B6LKyKjc.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-DLIladXC.js → vue-ui-age-pyramid-CH1Vj2R6.js} +226 -226
- package/dist/{vue-ui-annotator-CS2d8F8x.cjs → vue-ui-annotator-BfmMNM_X.cjs} +1 -1
- package/dist/{vue-ui-annotator-Bxrjl1nz.js → vue-ui-annotator-CTio5IiK.js} +1 -1
- package/dist/{vue-ui-candlestick-BppLVU6c.js → vue-ui-candlestick-C4kT9W0j.js} +158 -158
- package/dist/{vue-ui-candlestick-tumv-lhv.cjs → vue-ui-candlestick-DvX9Jxoi.cjs} +2 -2
- package/dist/{vue-ui-carousel-table-BsFNypM6.cjs → vue-ui-carousel-table-CMs7scX3.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BnOsmGVc.js → vue-ui-carousel-table-Df2HHk0v.js} +4 -4
- package/dist/{vue-ui-chestnut-DFb7M_SC.js → vue-ui-chestnut-BKTnDElg.js} +65 -64
- package/dist/{vue-ui-chestnut-tK8ebPQM.cjs → vue-ui-chestnut-CCw8h0_m.cjs} +3 -3
- package/dist/{vue-ui-cursor-D-eRMlWI.cjs → vue-ui-cursor-C-8bpiuy.cjs} +1 -1
- package/dist/{vue-ui-cursor-CYk61ZVK.js → vue-ui-cursor-DOOlFN5D.js} +2 -2
- package/dist/{vue-ui-dashboard-Cbk74q7K.cjs → vue-ui-dashboard-B_h8KxOx.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BomFWtsP.js → vue-ui-dashboard-D7U1UkAh.js} +2 -2
- package/dist/{vue-ui-digits-Ch9quA4D.js → vue-ui-digits-DmxQgABv.js} +2 -2
- package/dist/{vue-ui-digits-DWJOvgi2.cjs → vue-ui-digits-DoQoNGGx.cjs} +1 -1
- package/dist/{vue-ui-donut-BIMgi_Qw.cjs → vue-ui-donut-DdnwGXq6.cjs} +1 -1
- package/dist/vue-ui-donut-evolution-DsRAZLMN.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-ClNciLi2.js → vue-ui-donut-evolution-uPCTV6E6.js} +95 -95
- package/dist/{vue-ui-donut-Ctzc7e6_.js → vue-ui-donut-t5zf9Lm5.js} +42 -42
- package/dist/{vue-ui-dumbbell-IBrAHdlc.js → vue-ui-dumbbell-BCdxqHVR.js} +109 -107
- package/dist/vue-ui-dumbbell-D1Ak2pEE.cjs +9 -0
- package/dist/vue-ui-flow-CLqm5nkx.cjs +1 -0
- package/dist/vue-ui-flow-J1SmdKkh.js +469 -0
- package/dist/vue-ui-galaxy-CSXbhXBe.cjs +1 -0
- package/dist/{vue-ui-galaxy-BBKU6WqV.js → vue-ui-galaxy-DNMbyKNg.js} +91 -91
- package/dist/{vue-ui-gauge-CDpN6D_X.js → vue-ui-gauge-CC_9cSwj.js} +84 -84
- package/dist/vue-ui-gauge-O3ntKI31.cjs +1 -0
- package/dist/{vue-ui-gizmo-BS-olrbu.js → vue-ui-gizmo-C5vGMHUU.js} +2 -2
- package/dist/{vue-ui-gizmo-Dyi4DWSA.cjs → vue-ui-gizmo-qrJt0nH6.cjs} +1 -1
- package/dist/vue-ui-heatmap-BjimHnMb.cjs +1 -0
- package/dist/{vue-ui-heatmap-Bonl3GBj.js → vue-ui-heatmap-ByxLZuR5.js} +257 -239
- package/dist/{vue-ui-kpi-MeC195T8.js → vue-ui-kpi-DdNQlVCe.js} +3 -3
- package/dist/{vue-ui-kpi-ChD3Gh4P.cjs → vue-ui-kpi-eyxMedig.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-NiTij5XQ.cjs → vue-ui-mini-loader-B5ykH9BF.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-l2G4D7lJ.js → vue-ui-mini-loader-C05VGcNr.js} +2 -2
- package/dist/{vue-ui-molecule-C1dO-Ony.js → vue-ui-molecule-DI0oHPT5.js} +20 -20
- package/dist/{vue-ui-molecule-pXZ3aWlr.cjs → vue-ui-molecule-LZ1SRkgK.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C3Gv4iYr.cjs → vue-ui-mood-radar-BJqk2oK_.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BVpJ3O4m.js → vue-ui-mood-radar-DIDqiVMf.js} +9 -9
- package/dist/{vue-ui-nested-donuts-Dmeqsml8.js → vue-ui-nested-donuts-BkSiryoB.js} +120 -120
- package/dist/{vue-ui-nested-donuts-Cwk0M7SE.cjs → vue-ui-nested-donuts-Nggnu_iK.cjs} +2 -2
- package/dist/{vue-ui-onion-BmJO696O.cjs → vue-ui-onion-B29Cxru2.cjs} +1 -1
- package/dist/{vue-ui-onion-Ogj_rMlX.js → vue-ui-onion-xiubSG3j.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-BBBuJdGN.js → vue-ui-parallel-coordinate-plot-DjmOGHVx.js} +69 -69
- package/dist/{vue-ui-parallel-coordinate-plot-Cqm7uMBs.cjs → vue-ui-parallel-coordinate-plot-DqrkSOo6.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BJtgJ_lu.js → vue-ui-quadrant-Cc79ggIy.js} +36 -36
- package/dist/{vue-ui-quadrant-DcqQwIsD.cjs → vue-ui-quadrant-Df_2X-ca.cjs} +1 -1
- package/dist/vue-ui-quick-chart-BnBGXd4d.cjs +15 -0
- package/dist/{vue-ui-quick-chart-D7dCfDSL.js → vue-ui-quick-chart-t_cPx4OT.js} +549 -515
- package/dist/{vue-ui-radar-BMxzhMFJ.js → vue-ui-radar-C3qEonKT.js} +59 -59
- package/dist/vue-ui-radar-D3W9B9JE.cjs +1 -0
- package/dist/{vue-ui-rating-DSgHml7s.js → vue-ui-rating-DffL7w-I.js} +9 -9
- package/dist/{vue-ui-rating-buop0ul0.cjs → vue-ui-rating-aOa6zIr5.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BACMnvv8.cjs → vue-ui-relation-circle-BZ7r7Unx.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CdHbZK0u.js → vue-ui-relation-circle-D0zUfd3f.js} +5 -5
- package/dist/vue-ui-rings-BjWAtE4x.cjs +2 -0
- package/dist/{vue-ui-rings-BBnzxfo2.js → vue-ui-rings-PHbuqfoT.js} +188 -185
- package/dist/{vue-ui-scatter-sF3c5eqM.cjs → vue-ui-scatter-DMJ77QYr.cjs} +1 -1
- package/dist/{vue-ui-scatter-DYXhTzch.js → vue-ui-scatter-DuCnr2yB.js} +378 -375
- package/dist/{vue-ui-screenshot-D-6YvKkW.cjs → vue-ui-screenshot-DBuA631a.cjs} +1 -1
- package/dist/{vue-ui-screenshot-B4WOalT6.js → vue-ui-screenshot-DbwRrmHv.js} +6 -6
- package/dist/{vue-ui-skeleton-D6wHGzmu.cjs → vue-ui-skeleton-CI4t8LHn.cjs} +1 -1
- package/dist/{vue-ui-skeleton-ClzVF3vm.js → vue-ui-skeleton-CcJR2m18.js} +23 -23
- package/dist/{vue-ui-smiley-B1cqwAN5.js → vue-ui-smiley-2rJFSSZS.js} +2 -2
- package/dist/{vue-ui-smiley-CoVnFdkD.cjs → vue-ui-smiley-C7KBm0fz.cjs} +1 -1
- package/dist/vue-ui-spark-trend-DY_sfo6o.js +251 -0
- package/dist/vue-ui-spark-trend-VH2nwGJf.cjs +1 -0
- package/dist/{vue-ui-sparkbar-BOzSGZak.js → vue-ui-sparkbar-B0O77PcV.js} +3 -3
- package/dist/{vue-ui-sparkbar-CpIfPtyd.cjs → vue-ui-sparkbar-Bs8ZQem1.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-4hk6ZJwJ.js → vue-ui-sparkgauge-B5KqrHQZ.js} +64 -64
- package/dist/vue-ui-sparkgauge-Cd7b4u0z.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-VCAQZfgG.cjs → vue-ui-sparkhistogram-CEWCLohQ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-8degKlMU.js → vue-ui-sparkhistogram-DwRPeG7H.js} +4 -4
- package/dist/{vue-ui-sparkline-DsUwWV4z.cjs → vue-ui-sparkline-CuFtIMpq.cjs} +1 -1
- package/dist/{vue-ui-sparkline-uBkd9kR2.js → vue-ui-sparkline-W5bZnpQo.js} +25 -25
- package/dist/{vue-ui-sparkstackbar-Cpq2lHcl.js → vue-ui-sparkstackbar-9hBQZ0lZ.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DyNfMGkM.cjs → vue-ui-sparkstackbar-TyVFUMtT.cjs} +1 -1
- package/dist/{vue-ui-stackbar-lr_qudpY.js → vue-ui-stackbar-BlkgM0nD.js} +35 -35
- package/dist/{vue-ui-stackbar-jQe7BneA.cjs → vue-ui-stackbar-CwVcupxt.cjs} +1 -1
- package/dist/vue-ui-strip-plot-C1GfRjXJ.cjs +1 -0
- package/dist/{vue-ui-strip-plot-DwvlcnHB.js → vue-ui-strip-plot-CBfqkkY6.js} +76 -75
- package/dist/{vue-ui-table-Dhj4_z9d.js → vue-ui-table-B8cvvLk8.js} +1 -1
- package/dist/{vue-ui-table-D5ybohqp.cjs → vue-ui-table-CmguTt4I.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CChLZdxj.cjs → vue-ui-table-heatmap-DMnh8-b1.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BY65DeiH.js → vue-ui-table-heatmap-wVWltZ2x.js} +26 -26
- package/dist/{vue-ui-table-sparkline-CvMETVJ1.js → vue-ui-table-sparkline-_POawNEL.js} +13 -13
- package/dist/{vue-ui-table-sparkline-Cmy6PcPI.cjs → vue-ui-table-sparkline-wtIFAc20.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BIN2ofrh.js → vue-ui-thermometer-CFJqd-VY.js} +116 -116
- package/dist/vue-ui-thermometer-D6SnFJb1.cjs +1 -0
- package/dist/{vue-ui-timer-DBcOT10h.cjs → vue-ui-timer-194y0LUC.cjs} +1 -1
- package/dist/{vue-ui-timer-DoSqphvk.js → vue-ui-timer-D8dgDAfe.js} +4 -4
- package/dist/vue-ui-tiremarks-BM28JsxE.cjs +1 -0
- package/dist/{vue-ui-tiremarks-DRTLsMWt.js → vue-ui-tiremarks-CH1BFqbO.js} +71 -71
- package/dist/vue-ui-treemap-BIpIg3Qa.cjs +1 -0
- package/dist/{vue-ui-treemap-D8-D_wfq.js → vue-ui-treemap-DHsoVY5n.js} +89 -82
- package/dist/{vue-ui-vertical-bar-zUaXmUpB.js → vue-ui-vertical-bar-DNODBoSo.js} +246 -242
- package/dist/vue-ui-vertical-bar-Du8ikoWM.cjs +4 -0
- package/dist/{vue-ui-waffle-CztGir7e.js → vue-ui-waffle-C8hMAeMl.js} +44 -44
- package/dist/{vue-ui-waffle-RCqpPcSF.cjs → vue-ui-waffle-_Bi9MRx8.cjs} +1 -1
- package/dist/{vue-ui-wheel-CBqL8FKG.cjs → vue-ui-wheel-BZxcRGJX.cjs} +1 -1
- package/dist/{vue-ui-wheel-BQ2a-ZyV.js → vue-ui-wheel-CmZKsfKj.js} +5 -5
- package/dist/{vue-ui-word-cloud-CKUGIGnW.js → vue-ui-word-cloud-fLf-x06l.js} +68 -65
- package/dist/vue-ui-word-cloud-nHVG2yid.cjs +1 -0
- package/dist/{vue-ui-xy-Dsa2tfKS.js → vue-ui-xy-CPln5bGQ.js} +82 -82
- package/dist/vue-ui-xy-canvas-Z1tJJV5-.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-JeNqaB_p.js → vue-ui-xy-canvas-k30CEsKi.js} +122 -121
- package/dist/vue-ui-xy-qxQy2sOl.cjs +3 -0
- package/package.json +1 -1
- package/dist/vue-ui-age-pyramid-BILMRRi1.cjs +0 -1
- package/dist/vue-ui-donut-evolution-K7LUkN6q.cjs +0 -1
- package/dist/vue-ui-dumbbell-HVpK20XO.cjs +0 -9
- package/dist/vue-ui-flow-CiXnGdNb.js +0 -465
- package/dist/vue-ui-flow-ClV2yd8Y.cjs +0 -1
- package/dist/vue-ui-galaxy-CMCXCWDA.cjs +0 -1
- package/dist/vue-ui-gauge-DwCGaX1h.cjs +0 -1
- package/dist/vue-ui-heatmap-WFNo-GFX.cjs +0 -1
- package/dist/vue-ui-quick-chart-D9zFHA0L.cjs +0 -15
- package/dist/vue-ui-radar-D8ik0Fqr.cjs +0 -1
- package/dist/vue-ui-rings-Dn5opKNy.cjs +0 -2
- package/dist/vue-ui-spark-trend-DnO4DW0n.cjs +0 -1
- package/dist/vue-ui-spark-trend-HioE2zeC.js +0 -251
- package/dist/vue-ui-sparkgauge-C2_I0tyO.cjs +0 -1
- package/dist/vue-ui-strip-plot-BMKaWqD4.cjs +0 -1
- package/dist/vue-ui-thermometer-Bfp-FwRE.cjs +0 -1
- package/dist/vue-ui-tiremarks-BeBJHz2R.cjs +0 -1
- package/dist/vue-ui-treemap-DqBukSj6.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BM3aaSuB.cjs +0 -4
- package/dist/vue-ui-word-cloud-BbnU0d3E.cjs +0 -1
- package/dist/vue-ui-xy-BU0fCkSk.cjs +0 -3
- package/dist/vue-ui-xy-canvas-IaIARWWS.cjs +0 -9
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { computed as u, ref as g, onMounted as X, openBlock as n, createElementBlock as i, normalizeStyle as A, createBlock as C, unref as c, createElementVNode as m, createCommentVNode as d, toDisplayString as I } from "vue";
|
|
2
|
+
import { u as Z, c as R, t as H, o as J, e as K, s as y, T as Q, X as Y, w as N, P as B, f as V, i as ee } from "./index-C_05i_JG.js";
|
|
3
|
+
import { u as D } from "./useNestedProp-DLnT0Wtg.js";
|
|
4
|
+
import M from "./BaseIcon-CS18qRiy.js";
|
|
5
|
+
import te from "./vue-ui-skeleton-CcJR2m18.js";
|
|
6
|
+
import { _ as ae } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const le = ["id"], oe = ["xmlns", "viewBox"], ne = ["id"], se = ["stop-color"], ue = ["stop-color"], re = { key: 0 }, ie = ["d", "fill"], ve = ["d", "fill"], de = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], ce = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], ye = ["height", "width", "x"], he = { style: { width: "100%" } }, fe = ["x", "y", "fill", "font-size", "font-weight"], pe = ["stroke", "cx", "cy", "fill"], ge = ["x", "y", "font-size", "fill", "font-weight"], me = {
|
|
8
|
+
__name: "vue-ui-spark-trend",
|
|
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
|
+
},
|
|
23
|
+
setup(E) {
|
|
24
|
+
const s = E, { vue_ui_spark_trend: G } = Z(), O = u(() => !!s.dataset && s.dataset.length), k = g(R()), e = u(() => {
|
|
25
|
+
const t = D({
|
|
26
|
+
userConfig: s.config,
|
|
27
|
+
defaultConfig: G
|
|
28
|
+
});
|
|
29
|
+
return t.theme ? {
|
|
30
|
+
...D({
|
|
31
|
+
userConfig: H.vue_ui_spark_trend[t.theme] || s.config,
|
|
32
|
+
defaultConfig: t
|
|
33
|
+
})
|
|
34
|
+
} : t;
|
|
35
|
+
});
|
|
36
|
+
function L(t) {
|
|
37
|
+
return t.map((l) => y(l));
|
|
38
|
+
}
|
|
39
|
+
const _ = g(s.dataset.map((t) => e.value.style.animation.show || [void 0].includes(t) ? null : t)), p = g(!1), $ = g(null);
|
|
40
|
+
X(() => {
|
|
41
|
+
J(s.dataset) && K({
|
|
42
|
+
componentName: "VueUiSparkTrend",
|
|
43
|
+
type: "dataset"
|
|
44
|
+
});
|
|
45
|
+
let l = 1e3 / e.value.style.animation.animationFrames, v = performance.now();
|
|
46
|
+
if (e.value.style.animation.show && e.value.style.animation.animationFrames && s.dataset.length > 1) {
|
|
47
|
+
let z = function() {
|
|
48
|
+
p.value = !0;
|
|
49
|
+
let F = performance.now(), j = F - v;
|
|
50
|
+
j > l ? (v = F - j % l, f < s.dataset.length ? (_.value.push(s.dataset[f]), f += 1, $.value = requestAnimationFrame(z)) : (cancelAnimationFrame($.value), _.value = L(s.dataset), p.value = !1)) : $.value = requestAnimationFrame(z);
|
|
51
|
+
};
|
|
52
|
+
_.value = [];
|
|
53
|
+
let f = 0;
|
|
54
|
+
z();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
const o = g({
|
|
58
|
+
height: 80,
|
|
59
|
+
width: 300
|
|
60
|
+
}), h = u(() => ({
|
|
61
|
+
top: e.value.style.padding.top,
|
|
62
|
+
left: e.value.style.padding.left,
|
|
63
|
+
right: o.value.width - e.value.style.padding.right,
|
|
64
|
+
bottom: o.value.height - e.value.style.padding.bottom,
|
|
65
|
+
height: o.value.height - (e.value.style.padding.top + e.value.style.padding.bottom) - (e.value.style.dataLabel.show ? e.value.style.dataLabel.fontSize : 0),
|
|
66
|
+
width: o.value.width - (e.value.style.padding.left + e.value.style.padding.right)
|
|
67
|
+
})), T = u(() => {
|
|
68
|
+
const t = L(s.dataset);
|
|
69
|
+
return {
|
|
70
|
+
max: Math.max(...t.map((l) => y(l))),
|
|
71
|
+
min: Math.min(...t.map((l) => y(l)))
|
|
72
|
+
};
|
|
73
|
+
}), b = u(() => {
|
|
74
|
+
const t = T.value.min >= 0 ? 0 : T.value.min;
|
|
75
|
+
return Math.abs(t);
|
|
76
|
+
}), U = u(() => T.value.max + b.value);
|
|
77
|
+
function S(t) {
|
|
78
|
+
return t / U.value;
|
|
79
|
+
}
|
|
80
|
+
const P = u(() => s.dataset.length), a = u(() => _.value.map((t, l) => {
|
|
81
|
+
const v = isNaN(t) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t) ? 0 : t || 0;
|
|
82
|
+
return {
|
|
83
|
+
value: y(t),
|
|
84
|
+
absoluteValue: y(v),
|
|
85
|
+
plotValue: y(v + b.value),
|
|
86
|
+
toMax: S(v + b.value),
|
|
87
|
+
x: h.value.left + y(l * (h.value.width / (P.value - 1))) - e.value.style.padding.right,
|
|
88
|
+
y: h.value.bottom - y(h.value.height * S(v + b.value))
|
|
89
|
+
};
|
|
90
|
+
})), x = u(() => {
|
|
91
|
+
const t = L(s.dataset);
|
|
92
|
+
return e.value.style.trendLabel.trendType === "global" ? Q(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;
|
|
93
|
+
}), w = u(() => p.value || x.value === 0 ? "neutral" : x.value > 0 ? "positive" : "negative"), r = u(() => e.value.style.arrow.colors[w.value]), q = u(() => {
|
|
94
|
+
const t = { x: a.value[0].x, y: o.value.height - 6 }, l = { x: a.value[a.value.length - 1].x, y: o.value.height - 6 }, v = [];
|
|
95
|
+
return a.value.forEach((f) => {
|
|
96
|
+
v.push(`${f.x},${f.y} `);
|
|
97
|
+
}), [t.x, t.y, ...v, l.x, l.y].toString();
|
|
98
|
+
}), W = u(() => {
|
|
99
|
+
let t = [];
|
|
100
|
+
return a.value.forEach((l) => {
|
|
101
|
+
t.push(`${l.x},${l.y} `);
|
|
102
|
+
}), `M ${t.toString()}`;
|
|
103
|
+
});
|
|
104
|
+
return (t, l) => (n(), i("div", {
|
|
105
|
+
class: "vue-ui-spark-trend",
|
|
106
|
+
id: k.value,
|
|
107
|
+
style: A(`width:100%;font-family:${e.value.style.fontFamily};backgroundColor:${e.value.style.backgroundColor}`)
|
|
108
|
+
}, [
|
|
109
|
+
O.value ? (n(), i("svg", {
|
|
110
|
+
key: 1,
|
|
111
|
+
xmlns: c(Y),
|
|
112
|
+
viewBox: `0 0 ${o.value.width} ${o.value.height}`,
|
|
113
|
+
style: A(`width:100%;background:${e.value.style.backgroundColor};overflow:visible`)
|
|
114
|
+
}, [
|
|
115
|
+
m("defs", null, [
|
|
116
|
+
m("linearGradient", {
|
|
117
|
+
x1: "0%",
|
|
118
|
+
y1: "0%",
|
|
119
|
+
x2: "0%",
|
|
120
|
+
y2: "100%",
|
|
121
|
+
id: `pill_gradient_${k.value}`
|
|
122
|
+
}, [
|
|
123
|
+
m("stop", {
|
|
124
|
+
offset: "0%",
|
|
125
|
+
"stop-color": (e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke) + c(N)[e.value.style.area.opacity]
|
|
126
|
+
}, null, 8, se),
|
|
127
|
+
m("stop", {
|
|
128
|
+
offset: "100%",
|
|
129
|
+
"stop-color": e.value.style.backgroundColor
|
|
130
|
+
}, null, 8, ue)
|
|
131
|
+
], 8, ne)
|
|
132
|
+
]),
|
|
133
|
+
e.value.style.area.show && a.value[0] ? (n(), i("g", re, [
|
|
134
|
+
e.value.style.line.smooth ? (n(), i("path", {
|
|
135
|
+
key: 0,
|
|
136
|
+
d: `M ${a.value[0].x},${h.value.bottom} ${c(B)(a.value)} L ${a.value.at(-1).x},${h.value.bottom} Z`,
|
|
137
|
+
fill: e.value.style.area.useGradient ? `url(#pill_gradient_${k.value})` : `${e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke}${c(N)[e.value.style.area.opacity]}`,
|
|
138
|
+
stroke: "none"
|
|
139
|
+
}, null, 8, ie)) : (n(), i("path", {
|
|
140
|
+
key: 1,
|
|
141
|
+
d: `M${q.value}Z`,
|
|
142
|
+
fill: e.value.style.area.useGradient ? `url(#pill_gradient_${k.value})` : `${e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke}${c(N)[e.value.style.area.opacity]}`,
|
|
143
|
+
stroke: "none"
|
|
144
|
+
}, null, 8, ve))
|
|
145
|
+
])) : d("", !0),
|
|
146
|
+
e.value.style.line.smooth && a.value.length ? (n(), i("path", {
|
|
147
|
+
key: 1,
|
|
148
|
+
d: `M ${c(B)(a.value)}`,
|
|
149
|
+
stroke: e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke,
|
|
150
|
+
fill: "none",
|
|
151
|
+
"stroke-width": e.value.style.line.strokeWidth,
|
|
152
|
+
"stroke-linecap": e.value.style.line.strokeLinecap,
|
|
153
|
+
"stroke-linejoin": e.value.style.line.strokeLinejoin
|
|
154
|
+
}, null, 8, de)) : d("", !0),
|
|
155
|
+
!e.value.style.line.smooth && a.value.length ? (n(), i("path", {
|
|
156
|
+
key: 2,
|
|
157
|
+
d: W.value,
|
|
158
|
+
stroke: e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke,
|
|
159
|
+
fill: "none",
|
|
160
|
+
"stroke-width": e.value.style.line.strokeWidth,
|
|
161
|
+
"stroke-linecap": e.value.style.line.strokeLinecap,
|
|
162
|
+
"stroke-linejoin": e.value.style.line.strokeLinejoin
|
|
163
|
+
}, null, 8, ce)) : d("", !0),
|
|
164
|
+
p.value ? d("", !0) : (n(), i("foreignObject", {
|
|
165
|
+
key: 3,
|
|
166
|
+
height: o.value.height / 2,
|
|
167
|
+
width: o.value.height / 2,
|
|
168
|
+
x: o.value.height / 5,
|
|
169
|
+
y: 8
|
|
170
|
+
}, [
|
|
171
|
+
m("div", he, [
|
|
172
|
+
w.value === "positive" ? (n(), C(M, {
|
|
173
|
+
key: 0,
|
|
174
|
+
stroke: r.value,
|
|
175
|
+
name: "arrowTop",
|
|
176
|
+
size: o.value.height / 2
|
|
177
|
+
}, null, 8, ["stroke", "size"])) : d("", !0),
|
|
178
|
+
w.value === "negative" ? (n(), C(M, {
|
|
179
|
+
key: 1,
|
|
180
|
+
stroke: r.value,
|
|
181
|
+
name: "arrowBottom",
|
|
182
|
+
size: o.value.height / 2
|
|
183
|
+
}, null, 8, ["stroke", "size"])) : d("", !0),
|
|
184
|
+
w.value === "neutral" ? (n(), C(M, {
|
|
185
|
+
key: 2,
|
|
186
|
+
stroke: r.value,
|
|
187
|
+
name: "arrowRight",
|
|
188
|
+
size: o.value.height / 2
|
|
189
|
+
}, null, 8, ["stroke", "size"])) : d("", !0)
|
|
190
|
+
])
|
|
191
|
+
], 8, ye)),
|
|
192
|
+
p.value ? d("", !0) : (n(), i("text", {
|
|
193
|
+
key: 4,
|
|
194
|
+
x: o.value.height / 2 - o.value.height / 20,
|
|
195
|
+
y: h.value.bottom,
|
|
196
|
+
"text-anchor": "middle",
|
|
197
|
+
fill: e.value.style.trendLabel.useColorTrend ? r.value : e.value.style.trendLabel.color,
|
|
198
|
+
"font-size": e.value.style.trendLabel.fontSize,
|
|
199
|
+
"font-weight": e.value.style.trendLabel.bold ? "bold" : "normal"
|
|
200
|
+
}, I(c(V)({
|
|
201
|
+
p: x.value > 0 ? "+" : "",
|
|
202
|
+
v: x.value,
|
|
203
|
+
s: "%",
|
|
204
|
+
r: e.value.style.trendLabel.rounding
|
|
205
|
+
})), 9, fe)),
|
|
206
|
+
a.value.length && a.value.at(-1).x !== void 0 ? (n(), i("circle", {
|
|
207
|
+
key: 5,
|
|
208
|
+
stroke: e.value.style.backgroundColor,
|
|
209
|
+
"stroke-width": 2,
|
|
210
|
+
cx: a.value.at(-1).x,
|
|
211
|
+
cy: a.value.at(-1).y,
|
|
212
|
+
r: 4,
|
|
213
|
+
fill: r.value
|
|
214
|
+
}, null, 8, pe)) : d("", !0),
|
|
215
|
+
a.value.length && a.value.at(-1).x !== void 0 && e.value.style.dataLabel.show ? (n(), i("text", {
|
|
216
|
+
key: 6,
|
|
217
|
+
"text-anchor": "middle",
|
|
218
|
+
x: a.value.at(-1).x,
|
|
219
|
+
y: a.value.at(-1).y - e.value.style.dataLabel.fontSize / 1.5,
|
|
220
|
+
"font-size": e.value.style.dataLabel.fontSize,
|
|
221
|
+
fill: e.value.style.dataLabel.useColorTrend ? r.value : e.value.style.dataLabel.color,
|
|
222
|
+
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
|
|
223
|
+
}, I(c(ee)(
|
|
224
|
+
e.value.style.dataLabel.formatter,
|
|
225
|
+
a.value.at(-1).value,
|
|
226
|
+
c(V)({
|
|
227
|
+
p: e.value.style.dataLabel.prefix,
|
|
228
|
+
v: a.value.at(-1).value,
|
|
229
|
+
s: e.value.style.dataLabel.suffix,
|
|
230
|
+
r: e.value.style.dataLabel.rounding
|
|
231
|
+
}),
|
|
232
|
+
{ datapoint: a.value.at(-1) }
|
|
233
|
+
)), 9, ge)) : d("", !0)
|
|
234
|
+
], 12, oe)) : (n(), C(te, {
|
|
235
|
+
key: 0,
|
|
236
|
+
config: {
|
|
237
|
+
type: "sparkline",
|
|
238
|
+
style: {
|
|
239
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
240
|
+
sparkline: {
|
|
241
|
+
color: "#CCCCCC"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}, null, 8, ["config"]))
|
|
246
|
+
], 12, le));
|
|
247
|
+
}
|
|
248
|
+
}, Le = /* @__PURE__ */ ae(me, [["__scopeId", "data-v-fa45a70f"]]);
|
|
249
|
+
export {
|
|
250
|
+
Le as default
|
|
251
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-NNZeHOBS.cjs"),B=require("./useNestedProp-CPsbJAGj.cjs"),x=require("./BaseIcon-O8jJvy48.cjs"),M=require("./vue-ui-skeleton-CI4t8LHn.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["id"],q=["xmlns","viewBox"],A=["id"],I=["stop-color"],D=["stop-color"],P={key:0},G=["d","fill"],O=["d","fill"],U=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],W=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],Z=["height","width","x"],H={style:{width:"100%"}},R=["x","y","fill","font-size","font-weight"],X=["stroke","cx","cy","fill"],J=["x","y","font-size","fill","font-weight"],K={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L){const r=L,{vue_ui_spark_trend:$}=o.useConfig(),V=e.computed(()=>!!r.dataset&&r.dataset.length),h=e.ref(o.createUid()),t=e.computed(()=>{const l=B.useNestedProp({userConfig:r.config,defaultConfig:$});return l.theme?{...B.useNestedProp({userConfig:o.themes.vue_ui_spark_trend[l.theme]||r.config,defaultConfig:l})}:l});function k(l){return l.map(n=>o.checkNaN(n))}const y=e.ref(r.dataset.map(l=>t.value.style.animation.show||[void 0].includes(l)?null:l)),v=e.ref(!1),g=e.ref(null);e.onMounted(()=>{o.objectIsEmpty(r.dataset)&&o.error({componentName:"VueUiSparkTrend",type:"dataset"});let n=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&r.dataset.length>1){let b=function(){v.value=!0;let C=performance.now(),w=C-i;w>n?(i=C-w%n,d<r.dataset.length?(y.value.push(r.dataset[d]),d+=1,g.value=requestAnimationFrame(b)):(cancelAnimationFrame(g.value),y.value=k(r.dataset),v.value=!1)):g.value=requestAnimationFrame(b)};y.value=[];let d=0;b()}});const u=e.ref({height:80,width:300}),c=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:u.value.width-t.value.style.padding.right,bottom:u.value.height-t.value.style.padding.bottom,height:u.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:u.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),_=e.computed(()=>{const l=k(r.dataset);return{max:Math.max(...l.map(n=>o.checkNaN(n))),min:Math.min(...l.map(n=>o.checkNaN(n)))}}),p=e.computed(()=>{const l=_.value.min>=0?0:_.value.min;return Math.abs(l)}),E=e.computed(()=>_.value.max+p.value);function N(l){return l/E.value}const S=e.computed(()=>r.dataset.length),a=e.computed(()=>y.value.map((l,n)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:o.checkNaN(l),absoluteValue:o.checkNaN(i),plotValue:o.checkNaN(i+p.value),toMax:N(i+p.value),x:c.value.left+o.checkNaN(n*(c.value.width/(S.value-1)))-t.value.style.padding.right,y:c.value.bottom-o.checkNaN(c.value.height*N(i+p.value))}})),m=e.computed(()=>{const l=k(r.dataset);return t.value.style.trendLabel.trendType==="global"?o.calcTrend(l):t.value.style.trendLabel.trendType==="n-1"&&l.length>1?(l.at(-1)/l.at(-2)-1)*100:t.value.style.trendLabel.trendType==="lastToFirst"?(l.at(-1)/l[0]-1)*100:0}),f=e.computed(()=>v.value||m.value===0?"neutral":m.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[f.value]),T=e.computed(()=>{const l={x:a.value[0].x,y:u.value.height-6},n={x:a.value[a.value.length-1].x,y:u.value.height-6},i=[];return a.value.forEach(d=>{i.push(`${d.x},${d.y} `)}),[l.x,l.y,...i,n.x,n.y].toString()}),z=e.computed(()=>{let l=[];return a.value.forEach(n=>{l.push(`${n.x},${n.y} `)}),`M ${l.toString()}`});return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:h.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};backgroundColor:${t.value.style.backgroundColor}`)},[V.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke)+e.unref(o.opacity)[t.value.style.area.opacity]},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,D)],8,A)]),t.value.style.area.show&&a.value[0]?(e.openBlock(),e.createElementBlock("g",P,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.value[0].x},${c.value.bottom} ${e.unref(o.createSmoothPath)(a.value)} L ${a.value.at(-1).x},${c.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${h.value})`:`${t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke}${e.unref(o.opacity)[t.value.style.area.opacity]}`,stroke:"none"},null,8,G)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${T.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${h.value})`:`${t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke}${e.unref(o.opacity)[t.value.style.area.opacity]}`,stroke:"none"},null,8,O))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(o.createSmoothPath)(a.value)}`,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,U)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:z.value,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,W)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:3,height:u.value.height/2,width:u.value.height/2,x:u.value.height/5,y:8},[e.createElementVNode("div",H,[f.value==="positive"?(e.openBlock(),e.createBlock(x.default,{key:0,stroke:s.value,name:"arrowTop",size:u.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),f.value==="negative"?(e.openBlock(),e.createBlock(x.default,{key:1,stroke:s.value,name:"arrowBottom",size:u.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),f.value==="neutral"?(e.openBlock(),e.createBlock(x.default,{key:2,stroke:s.value,name:"arrowRight",size:u.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,Z)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:4,x:u.value.height/2-u.value.height/20,y:c.value.bottom,"text-anchor":"middle",fill:t.value.style.trendLabel.useColorTrend?s.value:t.value.style.trendLabel.color,"font-size":t.value.style.trendLabel.fontSize,"font-weight":t.value.style.trendLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(o.dataLabel)({p:m.value>0?"+":"",v:m.value,s:"%",r:t.value.style.trendLabel.rounding})),9,R)),a.value.length&&a.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:5,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:a.value.at(-1).x,cy:a.value.at(-1).y,r:4,fill:s.value},null,8,X)):e.createCommentVNode("",!0),a.value.length&&a.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,"text-anchor":"middle",x:a.value.at(-1).x,y:a.value.at(-1).y-t.value.style.dataLabel.fontSize/1.5,"font-size":t.value.style.dataLabel.fontSize,fill:t.value.style.dataLabel.useColorTrend?s.value:t.value.style.dataLabel.color,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.dataLabel.formatter,a.value.at(-1).value,e.unref(o.dataLabel)({p:t.value.style.dataLabel.prefix,v:a.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:a.value.at(-1)})),9,J)):e.createCommentVNode("",!0)],12,q)):(e.openBlock(),e.createBlock(M.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,j))}},Q=F._export_sfc(K,[["__scopeId","data-v-fa45a70f"]]);exports.default=Q;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as g, ref as x, onMounted as G, watch as W, nextTick as q, openBlock as r, createElementBlock as v, normalizeStyle as y, unref as s, renderSlot as I, normalizeProps as P, mergeProps as H, createCommentVNode as d, createElementVNode as c, toDisplayString as p, Fragment as z, renderList as X, guardReactiveProps as R, createBlock as J } from "vue";
|
|
2
|
-
import { u as K, c as Q, t as Y, a as Z, p as k, b as ee, o as te, e as L, g as le, d as ae,
|
|
3
|
-
import { u as T } from "./useNestedProp-
|
|
4
|
-
import ue from "./vue-ui-skeleton-
|
|
2
|
+
import { u as K, c as Q, t as Y, a as Z, p as k, b as ee, o as te, e as L, g as le, d as ae, w as _, i as w, f as b, X as oe, v as se } from "./index-C_05i_JG.js";
|
|
3
|
+
import { u as T } from "./useNestedProp-DLnT0Wtg.js";
|
|
4
|
+
import ue from "./vue-ui-skeleton-CcJR2m18.js";
|
|
5
5
|
const ie = ["onClick"], ne = { key: 1 }, re = ["xmlns", "viewBox"], ve = ["id"], ce = ["stop-color"], de = ["stop-color"], ye = ["height", "width", "fill", "rx"], pe = ["height", "width", "fill", "rx"], fe = ["height", "width", "fill", "rx"], ke = {
|
|
6
6
|
__name: "vue-ui-sparkbar",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-NNZeHOBS.cjs"),x=require("./useNestedProp-CPsbJAGj.cjs"),E=require("./vue-ui-skeleton-CI4t8LHn.cjs"),V=["onClick"],$={key:1},D=["xmlns","viewBox"],z=["id"],L=["stop-color"],P=["stop-color"],A=["height","width","fill","rx"],F=["height","width","fill","rx"],I=["height","width","fill","rx"],T={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:100}},emits:["selectDatapoint"],setup(p,{emit:b}){const n=p,{vue_ui_sparkbar:C}=o.useConfig(),v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed(()=>{const l=x.useNestedProp({userConfig:n.config,defaultConfig:C});return l.theme?{...x.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),S=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0,formatter:l.formatter||null}))),f=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),g()});function g(){if(t.value.style.animation.show){let k=function(){s+=a/l,s<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),f.value=requestAnimationFrame(k)):c.value=n.dataset.map(u=>({...u,value:u.value||0,formatter:u.formatter||null}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,m)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,m)=>u+m,0);let s=0;k()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(f.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(g)},{deep:!0});const i=e.ref({width:500,height:16}),w=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),N=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||S.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function _(l){return l/w.value}function h(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:_(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function B(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:t.value.style.backgroundColor+e.unref(o.opacity)[n.backgroundOpacity]})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(a,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${p.dataset.length>0&&s!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>B(a,s)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({bar:{...a,target:d(a),valueLabel:e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s}),targetLabel:e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})}}))),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",$,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,width:"100%"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${s}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(o.shiftHue)(a.color,.03)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,L),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,P)],8,z)]),e.createElementVNode("rect",{height:i.value.height,width:i.value.width,x:0,y:0,fill:`${t.value.style.gutter.backgroundColor}${e.unref(o.opacity)[t.value.style.gutter.opacity]}`,rx:i.value.height/2},null,8,A),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*h(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:i.value.height/2},null,8,F),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*h(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${s}_${y.value})`:a.color,rx:i.value.height/2},null,8,I)],8,D))],12,V)):e.createCommentVNode("",!0)],64))),256)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=T;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computed as s, onMounted as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { computed as s, onMounted as C, ref as y, watch as O, openBlock as n, createElementBlock as v, normalizeStyle as c, toDisplayString as g, createCommentVNode as d, unref as i, createElementVNode as r, normalizeClass as j, createBlock as B } from "vue";
|
|
2
|
+
import { u as D, o as E, e as L, g as G, c as I, t as U, L as V, X as q, i as P, s as p, f as T } from "./index-C_05i_JG.js";
|
|
3
|
+
import { u as A } from "./useNestedProp-DLnT0Wtg.js";
|
|
4
|
+
import X from "./vue-ui-skeleton-CcJR2m18.js";
|
|
5
|
+
const H = ["xmlns", "viewBox"], R = ["id"], Y = ["stop-color"], J = ["stop-color"], K = ["d", "stroke", "stroke-linecap"], Q = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], W = ["x", "y", "font-size", "fill", "font-weight"], le = {
|
|
6
6
|
__name: "vue-ui-sparkgauge",
|
|
7
7
|
props: {
|
|
8
8
|
config: {
|
|
@@ -18,31 +18,31 @@ const X = ["xmlns", "viewBox"], H = ["id"], J = ["stop-color"], R = ["stop-color
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const t =
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
setup(N) {
|
|
22
|
+
const t = N, { vue_ui_sparkgauge: S } = D(), b = s(() => !!t.dataset && Object.keys(t.dataset).length);
|
|
23
|
+
C(() => {
|
|
24
|
+
E(t.dataset) ? L({
|
|
25
25
|
componentName: "VueUiSparkgauge",
|
|
26
26
|
type: "dataset"
|
|
27
|
-
}) :
|
|
27
|
+
}) : G({
|
|
28
28
|
datasetObject: t.dataset,
|
|
29
29
|
requiredAttributes: ["value", "min", "max"]
|
|
30
30
|
}).forEach((o) => {
|
|
31
|
-
|
|
31
|
+
L({
|
|
32
32
|
componentName: "VueUiSparkgauge",
|
|
33
33
|
type: "datasetAttribute",
|
|
34
34
|
property: o
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
|
-
const
|
|
39
|
-
const o =
|
|
38
|
+
const h = y(I()), e = s(() => {
|
|
39
|
+
const o = A({
|
|
40
40
|
userConfig: t.config,
|
|
41
41
|
defaultConfig: S
|
|
42
42
|
});
|
|
43
43
|
return o.theme ? {
|
|
44
|
-
...
|
|
45
|
-
userConfig:
|
|
44
|
+
...A({
|
|
45
|
+
userConfig: U.vue_ui_sparkgauge[o.theme] || t.config,
|
|
46
46
|
defaultConfig: o
|
|
47
47
|
})
|
|
48
48
|
} : o;
|
|
@@ -51,98 +51,98 @@ const X = ["xmlns", "viewBox"], H = ["id"], J = ["stop-color"], R = ["stop-color
|
|
|
51
51
|
width: 128,
|
|
52
52
|
base: e.value.style.basePosition
|
|
53
53
|
})), a = s(() => {
|
|
54
|
-
const o = t.dataset.min ?? 0,
|
|
54
|
+
const o = t.dataset.min ?? 0, m = t.dataset.max ?? 0, F = m - o;
|
|
55
55
|
return {
|
|
56
56
|
min: o,
|
|
57
|
-
max:
|
|
58
|
-
diff:
|
|
57
|
+
max: m,
|
|
58
|
+
diff: F
|
|
59
59
|
};
|
|
60
|
-
}), l =
|
|
61
|
-
|
|
62
|
-
l.value =
|
|
60
|
+
}), l = y(e.value.style.animation.show ? a.value.min : t.dataset.value);
|
|
61
|
+
O(() => t.dataset.value, () => {
|
|
62
|
+
l.value = y(e.value.style.animation.show ? a.value.min : t.dataset.value), x();
|
|
63
63
|
});
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
const k = s(() => l.value > a.value.max ? a.value.max : l.value < a.value.min ? a.value.min : l.value), z = s(() => a.value.diff / e.value.style.animation.speedMs);
|
|
65
|
+
C(() => {
|
|
66
|
+
x();
|
|
67
67
|
});
|
|
68
|
-
function
|
|
68
|
+
function x() {
|
|
69
69
|
function o() {
|
|
70
70
|
l.value += z.value, l.value < t.dataset.value ? requestAnimationFrame(o) : l.value = t.dataset.value;
|
|
71
71
|
}
|
|
72
72
|
e.value.style.animation.show && (l.value = a.value.min, o());
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
return (o,
|
|
76
|
-
style:
|
|
74
|
+
const f = s(() => t.dataset.title ?? ""), _ = s(() => l.value >= 0 ? (k.value - a.value.min) / a.value.diff : (Math.abs(a.value.min) - Math.abs(k.value)) / a.value.diff), $ = s(() => V(e.value.style.colors.min, e.value.style.colors.max, a.value.min, a.value.max, l.value)), w = s(() => e.value.style.dataLabel.autoColor ? $.value : e.value.style.dataLabel.color), M = s(() => e.value.style.track.autoColor ? $.value : e.value.style.track.color);
|
|
75
|
+
return (o, m) => (n(), v("div", {
|
|
76
|
+
style: c(`font-family:${e.value.style.fontFamily};width: 100%; background:${e.value.style.background}`)
|
|
77
77
|
}, [
|
|
78
|
-
e.value.style.title.show &&
|
|
78
|
+
e.value.style.title.show && f.value && e.value.style.title.position === "top" ? (n(), v("div", {
|
|
79
79
|
key: 0,
|
|
80
80
|
class: "vue-data-ui-sparkgauge-label",
|
|
81
|
-
style:
|
|
82
|
-
},
|
|
83
|
-
|
|
81
|
+
style: c(`font-size:${e.value.style.title.fontSize}px;text-align:${e.value.style.title.textAlign};font-weight:${e.value.style.title.bold ? "bold" : "normal"};color:${e.value.style.title.color}`)
|
|
82
|
+
}, g(f.value), 5)) : d("", !0),
|
|
83
|
+
b.value ? (n(), v("svg", {
|
|
84
84
|
key: 1,
|
|
85
|
-
xmlns:
|
|
85
|
+
xmlns: i(q),
|
|
86
86
|
viewBox: `0 0 ${u.value.width} ${u.value.height}`,
|
|
87
|
-
style:
|
|
87
|
+
style: c(`overflow: visible; background:${e.value.style.background}; width:100%;`)
|
|
88
88
|
}, [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
id: `gradient_${
|
|
89
|
+
r("defs", null, [
|
|
90
|
+
r("linearGradient", {
|
|
91
|
+
id: `gradient_${h.value}`,
|
|
92
92
|
x1: "-10%",
|
|
93
93
|
y1: "100%",
|
|
94
94
|
x2: "110%",
|
|
95
95
|
y2: "100%"
|
|
96
96
|
}, [
|
|
97
|
-
|
|
97
|
+
r("stop", {
|
|
98
98
|
offset: "0%",
|
|
99
99
|
"stop-color": e.value.style.colors.min
|
|
100
|
-
}, null, 8,
|
|
101
|
-
|
|
100
|
+
}, null, 8, Y),
|
|
101
|
+
r("stop", {
|
|
102
102
|
offset: "100%",
|
|
103
103
|
"stop-color": e.value.style.colors.max
|
|
104
|
-
}, null, 8,
|
|
105
|
-
], 8,
|
|
104
|
+
}, null, 8, J)
|
|
105
|
+
], 8, R)
|
|
106
106
|
]),
|
|
107
|
-
|
|
107
|
+
r("path", {
|
|
108
108
|
d: `M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,
|
|
109
109
|
stroke: e.value.style.gutter.color,
|
|
110
110
|
"stroke-width": 8,
|
|
111
111
|
"stroke-linecap": e.value.style.gutter.strokeLinecap,
|
|
112
112
|
fill: "none"
|
|
113
|
-
}, null, 8,
|
|
114
|
-
|
|
113
|
+
}, null, 8, K),
|
|
114
|
+
_.value !== 0 ? (n(), v("path", {
|
|
115
115
|
key: 0,
|
|
116
116
|
d: `M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,
|
|
117
|
-
stroke: e.value.style.colors.showGradient ? `url(#gradient_${
|
|
117
|
+
stroke: e.value.style.colors.showGradient ? `url(#gradient_${h.value})` : M.value,
|
|
118
118
|
"stroke-width": 8,
|
|
119
119
|
"stroke-linecap": e.value.style.track.strokeLinecap,
|
|
120
120
|
fill: "none",
|
|
121
121
|
"stroke-dasharray": 169.5,
|
|
122
|
-
"stroke-dashoffset": 169.5 - 169.5 *
|
|
123
|
-
class:
|
|
124
|
-
style:
|
|
125
|
-
}, null, 14,
|
|
126
|
-
|
|
122
|
+
"stroke-dashoffset": 169.5 - 169.5 * _.value,
|
|
123
|
+
class: j({ "vue-ui-sparkgauge-track": e.value.style.animation.show }),
|
|
124
|
+
style: c(e.value.style.animation.show ? `animation: vue-ui-sparkgauge-animation ${e.value.style.animation.speedMs}ms ease-in;` : "")
|
|
125
|
+
}, null, 14, Q)) : d("", !0),
|
|
126
|
+
r("text", {
|
|
127
127
|
"text-anchor": "middle",
|
|
128
128
|
x: u.value.width / 2,
|
|
129
129
|
y: u.value.base + 6 + e.value.style.dataLabel.offsetY,
|
|
130
130
|
"font-size": e.value.style.dataLabel.fontSize,
|
|
131
|
-
fill:
|
|
131
|
+
fill: w.value,
|
|
132
132
|
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
|
|
133
|
-
},
|
|
133
|
+
}, g(i(P)(
|
|
134
134
|
e.value.style.dataLabel.formatter,
|
|
135
|
-
l.value,
|
|
136
|
-
|
|
135
|
+
i(p)(l.value),
|
|
136
|
+
i(T)({
|
|
137
137
|
p: e.value.style.dataLabel.prefix,
|
|
138
|
-
v: l.value,
|
|
138
|
+
v: i(p)(l.value),
|
|
139
139
|
s: e.value.style.dataLabel.suffix,
|
|
140
140
|
r: e.value.style.dataLabel.rounding
|
|
141
141
|
}),
|
|
142
|
-
{ datapoint: l.value, color:
|
|
143
|
-
)), 9,
|
|
144
|
-
], 12,
|
|
145
|
-
|
|
142
|
+
{ datapoint: i(p)(l.value), color: w.value }
|
|
143
|
+
)), 9, W)
|
|
144
|
+
], 12, H)) : d("", !0),
|
|
145
|
+
b.value ? d("", !0) : (n(), B(X, {
|
|
146
146
|
key: 2,
|
|
147
147
|
config: {
|
|
148
148
|
type: "gauge",
|
|
@@ -154,14 +154,14 @@ const X = ["xmlns", "viewBox"], H = ["id"], J = ["stop-color"], R = ["stop-color
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
}, null, 8, ["config"])),
|
|
157
|
-
e.value.style.title.show &&
|
|
157
|
+
e.value.style.title.show && f.value && e.value.style.title.position === "bottom" ? (n(), v("div", {
|
|
158
158
|
key: 3,
|
|
159
159
|
class: "vue-data-ui-sparkgauge-label",
|
|
160
|
-
style:
|
|
161
|
-
},
|
|
160
|
+
style: c(`font-size:${e.value.style.title.fontSize}px;text-align:${e.value.style.title.textAlign};font-weight:${e.value.style.title.bold ? "bold" : "normal"};font-weight:${e.value.style.title.bold ? "bold" : "normal"};color:${e.value.style.title.color}`)
|
|
161
|
+
}, g(f.value), 5)) : d("", !0)
|
|
162
162
|
], 4));
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
165
|
export {
|
|
166
|
-
|
|
166
|
+
le as default
|
|
167
167
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-NNZeHOBS.cjs"),g=require("./useNestedProp-CPsbJAGj.cjs"),C=require("./vue-ui-skeleton-CI4t8LHn.cjs"),N=["xmlns","viewBox"],$=["id"],w=["stop-color"],S=["stop-color"],L=["d","stroke","stroke-linecap"],B=["d","stroke","stroke-linecap","stroke-dashoffset"],E=["x","y","font-size","fill","font-weight"],z={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(k){const a=k,{vue_ui_sparkgauge:b}=o.useConfig(),c=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{o.objectIsEmpty(a.dataset)?o.error({componentName:"VueUiSparkgauge",type:"dataset"}):o.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","min","max"]}).forEach(u=>{o.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:u})})});const v=e.ref(o.createUid()),t=e.computed(()=>{const u=g.useNestedProp({userConfig:a.config,defaultConfig:b});return u.theme?{...g.useNestedProp({userConfig:o.themes.vue_ui_sparkgauge[u.theme]||a.config,defaultConfig:u})}:u}),n=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),l=e.computed(()=>{const u=a.dataset.min??0,i=a.dataset.max??0,_=i-u;return{min:u,max:i,diff:_}}),s=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value);e.watch(()=>a.dataset.value,()=>{s.value=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value),m()});const d=e.computed(()=>s.value>l.value.max?l.value.max:s.value<l.value.min?l.value.min:s.value),h=e.computed(()=>l.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{m()});function m(){function u(){s.value+=h.value,s.value<a.dataset.value?requestAnimationFrame(u):s.value=a.dataset.value}t.value.style.animation.show&&(s.value=l.value.min,u())}const r=e.computed(()=>a.dataset.title??""),f=e.computed(()=>s.value>=0?(d.value-l.value.min)/l.value.diff:(Math.abs(l.value.min)-Math.abs(d.value))/l.value.diff),y=e.computed(()=>o.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,l.value.min,l.value.max,s.value)),p=e.computed(()=>t.value.style.dataLabel.autoColor?y.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?y.value:t.value.style.track.color);return(u,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&r.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(r.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`overflow: visible; background:${t.value.style.background}; width:100%;`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,w),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,S)],8,$)]),e.createElementVNode("path",{d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,L),f.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:x.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*f.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,B)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:n.value.width/2,y:n.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:p.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(o.checkNaN)(s.value),e.unref(o.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(o.checkNaN)(s.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(o.checkNaN)(s.value),color:p.value})),9,E)],12,N)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&r.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(r.value),5)):e.createCommentVNode("",!0)],4))}};exports.default=z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-nPEJmXmf.cjs"),k=require("./useNestedProp-TbnnNrH2.cjs"),z=require("./Shape-DAe5uqIA.cjs"),D=require("./vue-ui-skeleton-D6wHGzmu.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0},A={key:1},H=["xmlns","viewBox"],q=["id"],I=["stop-color"],U=["stop-color"],W=["id"],O=["stop-color"],j=["stop-color"],P=["id"],G=["stop-color"],T=["stop-color"],X={key:0},Y=["x","y","height","width","fill","stroke","stroke-width","rx"],R={key:1},J=["x","y","font-size","font-weight","fill"],K=["x","y","font-size","fill"],Q=["x","y","font-size","fill"],Z=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],ee={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(b,{emit:_}){const u=b;e.useCssVars(o=>({"07c89730":w.value}));const{vue_ui_sparkhistogram:x}=a.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length);e.onMounted(()=>{a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):u.dataset.forEach((o,n)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:n})})})});const v=e.ref(a.createUid()),t=e.computed(()=>{const o=k.useNestedProp({userConfig:u.config,defaultConfig:x});return o.theme?{...k.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||u.config,defaultConfig:o})}:o}),c=e.computed(()=>{const o=t.value.style.layout.height,n=t.value.style.layout.width,l=t.value.style.layout.padding.top,s=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=n-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,g=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=n-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:n}}),B=e.computed(()=>Math.max(...u.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/B.value}const i=e.computed(()=>u.dataset.map((o,n)=>{const l=$(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/u.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=c.value.centerY-s/2,m=c.value.left+(y/2+n*d),S=c.value.left+n*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),C=o.color?o.color:o.value>=0?`${t.value.style.bars.colors.positive}${a.opacity[h]}`:`${t.value.style.bars.colors.negative}${a.opacity[h]}`,N=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,L=o.color?`url(#gradient_datapoint_${n}_${v.value})`:o.value>=0?`url(#gradient_positive_${n}_${v.value})`:`url(#gradient_negative_${n}_${v.value})`,V=m+p/2;return{...o,color:C,gradient:L,height:s,intensity:h,proportion:l,stroke:N,textAnchor:V,trapX:S,unitWidth:d,width:p,x:m,y:g}})),r=e.ref(null);function E(o,n){_("selectDatapoint",{datapoint:o,index:n})}const w=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:n[1]||(n[1]=l=>r.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),r.value!==null?(e.openBlock(),e.createElementBlock("span",M,"- "+e.toDisplayString(i.value[r.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[r.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[r.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[r.value],seriesIndex:r.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(r.value)&&![null,void 0].includes(i.value[r.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",A,"("+e.toDisplayString(i.value[r.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.positive}${e.unref(a.opacity)[l.intensity]}`},null,8,U)],8,q))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.negative}${e.unref(a.opacity)[l.intensity]}`},null,8,j)],8,W))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(l.color,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":`${l.color}${e.unref(a.opacity)[l.intensity]}`},null,8,T)],8,P))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,Y))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(z._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(t.value.style.labels.value.prefix)+e.toDisplayString(isNaN(l.value)?"":Number(l.value.toFixed(t.value.style.labels.value.rounding)).toLocaleString())+e.toDisplayString(t.value.style.labels.value.suffix),9,J))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,K)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:c.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,Q)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:c.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>r.value=s,onMouseleave:n[0]||(n[0]=d=>r.value=null),stroke:r.value!==null&&r.value===s?t.value.style.selector.stroke:"","stroke-width":r.value!==null&&r.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>E(l,s)},null,40,Z)]))),256))],8,H)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},te=F._export_sfc(ee,[["__scopeId","data-v-27ede5f8"]]);exports.default=te;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-NNZeHOBS.cjs"),k=require("./useNestedProp-CPsbJAGj.cjs"),z=require("./Shape-Dsx4SQVn.cjs"),D=require("./vue-ui-skeleton-CI4t8LHn.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0},A={key:1},H=["xmlns","viewBox"],q=["id"],I=["stop-color"],U=["stop-color"],W=["id"],O=["stop-color"],j=["stop-color"],P=["id"],G=["stop-color"],T=["stop-color"],X={key:0},Y=["x","y","height","width","fill","stroke","stroke-width","rx"],R={key:1},J=["x","y","font-size","font-weight","fill"],K=["x","y","font-size","fill"],Q=["x","y","font-size","fill"],Z=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],ee={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(b,{emit:_}){const u=b;e.useCssVars(o=>({"07c89730":w.value}));const{vue_ui_sparkhistogram:x}=a.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length);e.onMounted(()=>{a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):u.dataset.forEach((o,n)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:n})})})});const v=e.ref(a.createUid()),t=e.computed(()=>{const o=k.useNestedProp({userConfig:u.config,defaultConfig:x});return o.theme?{...k.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||u.config,defaultConfig:o})}:o}),c=e.computed(()=>{const o=t.value.style.layout.height,n=t.value.style.layout.width,l=t.value.style.layout.padding.top,s=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=n-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,g=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=n-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:n}}),B=e.computed(()=>Math.max(...u.dataset.map(o=>Math.abs(o.value||0))));function $(o){return Math.abs(o)/B.value}const i=e.computed(()=>u.dataset.map((o,n)=>{const l=$(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/u.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=c.value.centerY-s/2,m=c.value.left+(y/2+n*d),S=c.value.left+n*d,h=typeof o.intensity>"u"?100:Math.round(o.intensity*100),C=o.color?o.color:o.value>=0?`${t.value.style.bars.colors.positive}${a.opacity[h]}`:`${t.value.style.bars.colors.negative}${a.opacity[h]}`,N=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,L=o.color?`url(#gradient_datapoint_${n}_${v.value})`:o.value>=0?`url(#gradient_positive_${n}_${v.value})`:`url(#gradient_negative_${n}_${v.value})`,V=m+p/2;return{...o,color:C,gradient:L,height:s,intensity:h,proportion:l,stroke:N,textAnchor:V,trapX:S,unitWidth:d,width:p,x:m,y:g}})),r=e.ref(null);function E(o,n){_("selectDatapoint",{datapoint:o,index:n})}const w=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:n[1]||(n[1]=l=>r.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),r.value!==null?(e.openBlock(),e.createElementBlock("span",M,"- "+e.toDisplayString(i.value[r.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[r.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[r.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[r.value],seriesIndex:r.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(r.value)&&![null,void 0].includes(i.value[r.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",A,"("+e.toDisplayString(i.value[r.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.positive}${e.unref(a.opacity)[l.intensity]}`},null,8,U)],8,q))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,O),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.negative}${e.unref(a.opacity)[l.intensity]}`},null,8,j)],8,W))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(l.color,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":`${l.color}${e.unref(a.opacity)[l.intensity]}`},null,8,T)],8,P))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,Y))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(z._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(t.value.style.labels.value.prefix)+e.toDisplayString(isNaN(l.value)?"":Number(l.value.toFixed(t.value.style.labels.value.rounding)).toLocaleString())+e.toDisplayString(t.value.style.labels.value.suffix),9,J))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,K)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:c.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,Q)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:c.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>r.value=s,onMouseleave:n[0]||(n[0]=d=>r.value=null),stroke:r.value!==null&&r.value===s?t.value.style.selector.stroke:"","stroke-width":r.value!==null&&r.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>E(l,s)},null,40,Z)]))),256))],8,H)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},te=F._export_sfc(ee,[["__scopeId","data-v-27ede5f8"]]);exports.default=te;
|