vue-data-ui 2.3.75 → 2.3.77
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-BTG7M25z.js → Arrow-Dj2zuGLq.js} +1 -1
- package/dist/{Arrow-CZK77NmC.cjs → Arrow-VCEIU9wi.cjs} +1 -1
- package/dist/{BaseIcon--PMhZ3f-.cjs → BaseIcon-CP535rdy.cjs} +1 -1
- package/dist/{BaseIcon-BAOfPaXs.js → BaseIcon-Cbr8np30.js} +1 -1
- package/dist/{DataTable-DjQzrklZ.cjs → DataTable-CeHw-cqZ.cjs} +1 -1
- package/dist/{DataTable-CQANRZju.js → DataTable-OAUXdIYA.js} +2 -2
- package/dist/{Legend-DX1kv21U.js → Legend-BVByqGqZ.js} +1 -1
- package/dist/{Legend-CtbPB0Bo.cjs → Legend-DfU44fjz.cjs} +1 -1
- package/dist/{Shape-CadGs1Am.cjs → Shape-B6cEKeIN.cjs} +1 -1
- package/dist/{Shape-kqcyauhC.js → Shape-Clmb3iTX.js} +1 -1
- package/dist/{Slicer-yaJs-izT.js → Slicer-BlRQsQu0.js} +12 -12
- package/dist/{Slicer-i_oECHxH.cjs → Slicer-Dt9iqvAA.cjs} +1 -1
- package/dist/{Title-XBiDFYKD.cjs → Title-D9lSjLTg.cjs} +1 -1
- package/dist/{Title-C26I_HC3.js → Title-gvR5aS6q.js} +1 -1
- package/dist/{Tooltip-CH8GmDCG.js → Tooltip-BGmkuAK4.js} +23 -23
- package/dist/Tooltip-C0PSN8vf.cjs +1 -0
- package/dist/{index-Cm4Iry5c.js → index-0KN57HdM.js} +1147 -1145
- package/dist/index-TabZg_HV.cjs +4 -0
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-w7AMWWmz.cjs → useNestedProp-CoLyVvV9.cjs} +1 -1
- package/dist/{useNestedProp-CurQIHTa.js → useNestedProp-NeGalTYk.js} +1 -1
- package/dist/{usePrinter-ZlHxdaEz.cjs → usePrinter--7sLxlpn.cjs} +1 -1
- package/dist/{usePrinter-B8RnF8_q.js → usePrinter-BvKYEc1z.js} +1 -1
- package/dist/{vue-data-ui-B7amrpT-.cjs → vue-data-ui-CNZP_Hk4.cjs} +1 -1
- package/dist/{vue-data-ui-Bj6kEIpq.js → vue-data-ui-Du0OReJH.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +9 -9
- package/dist/vue-ui-3d-bar-AUSKibZS.cjs +19 -0
- package/dist/{vue-ui-3d-bar-Bg9IgVVc.js → vue-ui-3d-bar-Dasj0J9j.js} +342 -342
- package/dist/{vue-ui-accordion-1WxrfiCH.cjs → vue-ui-accordion-0uSZBHsp.cjs} +1 -1
- package/dist/{vue-ui-accordion-Cb6XBCbu.js → vue-ui-accordion-CczyfFaC.js} +3 -3
- package/dist/vue-ui-age-pyramid-CjBr4CXC.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-BhwmnQru.js → vue-ui-age-pyramid-DZ7vnojR.js} +22 -22
- package/dist/{vue-ui-annotator-BiHQvMdW.js → vue-ui-annotator-BWwxpp_v.js} +39 -39
- package/dist/{vue-ui-annotator-B22cdlhA.cjs → vue-ui-annotator-CyYSiELS.cjs} +2 -2
- package/dist/{vue-ui-candlestick-D7DjdYyw.cjs → vue-ui-candlestick-B9oSgBPN.cjs} +2 -2
- package/dist/{vue-ui-candlestick-Cl9dyh4l.js → vue-ui-candlestick-Dr9aS-Ku.js} +34 -34
- package/dist/vue-ui-carousel-table-CjDze14W.cjs +1 -0
- package/dist/{vue-ui-carousel-table-QsONwqNz.js → vue-ui-carousel-table-D2LK5a9p.js} +83 -81
- package/dist/{vue-ui-chestnut-Drb01WMC.js → vue-ui-chestnut-DIqR-vZo.js} +291 -288
- package/dist/vue-ui-chestnut-RhZaDeRG.cjs +6 -0
- package/dist/vue-ui-cursor-7QhVReKN.cjs +1 -0
- package/dist/{vue-ui-cursor-BP04_XbB.js → vue-ui-cursor-BxHK0bB7.js} +20 -20
- package/dist/{vue-ui-dashboard-Z63RE1XS.cjs → vue-ui-dashboard-DO-zVgDu.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BWdx5gjZ.js → vue-ui-dashboard-fYKECIc7.js} +2 -2
- package/dist/{vue-ui-digits-DUhkLcmd.js → vue-ui-digits-B8hAl2RW.js} +2 -2
- package/dist/{vue-ui-digits-CBQaHW6a.cjs → vue-ui-digits-CSsB4Zlr.cjs} +1 -1
- package/dist/{vue-ui-donut-DRPSwmGr.js → vue-ui-donut-D5DTvWXB.js} +60 -60
- package/dist/vue-ui-donut-D8evqk7g.cjs +1 -0
- package/dist/vue-ui-donut-evolution-BUdWXb-N.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-gRXAyxq8.js → vue-ui-donut-evolution-CPTiiUY6.js} +106 -106
- package/dist/{vue-ui-dumbbell-CQo5jqSK.js → vue-ui-dumbbell-CfeTfNTU.js} +17 -17
- package/dist/{vue-ui-dumbbell-DLfZcrXq.cjs → vue-ui-dumbbell-Fm-Bqc5W.cjs} +1 -1
- package/dist/{vue-ui-flow-BlX2-eEC.cjs → vue-ui-flow-24WIcZVL.cjs} +1 -1
- package/dist/{vue-ui-flow-BQ3UbMUb.js → vue-ui-flow-B2WWQo6P.js} +28 -28
- package/dist/{vue-ui-galaxy-Cax5o6Yl.cjs → vue-ui-galaxy-DkRizJxm.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BHWugUKG.js → vue-ui-galaxy-yfpv7Hky.js} +22 -22
- package/dist/vue-ui-gauge-BkB7BlNM.cjs +1 -0
- package/dist/{vue-ui-gauge-DG6_kvKh.js → vue-ui-gauge-CRVB3wlV.js} +99 -108
- package/dist/{vue-ui-gizmo-bV148qAf.js → vue-ui-gizmo-DJYOx_YH.js} +2 -2
- package/dist/{vue-ui-gizmo-D9Vh9Rmr.cjs → vue-ui-gizmo-Zyo15xm3.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BZZUvnMa.js → vue-ui-heatmap-C6fDCc7O.js} +17 -17
- package/dist/{vue-ui-heatmap-B_ELXKKV.cjs → vue-ui-heatmap-uynT8kN9.cjs} +1 -1
- package/dist/{vue-ui-kpi-C5v7qQvZ.js → vue-ui-kpi-CGC4h9uF.js} +3 -3
- package/dist/{vue-ui-kpi-CwVAvTB2.cjs → vue-ui-kpi-CqEEFb04.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BdKizX_J.js → vue-ui-mini-loader-2A0YUUIB.js} +2 -2
- package/dist/{vue-ui-mini-loader-DZNY-3rr.cjs → vue-ui-mini-loader-ku9X16tx.cjs} +1 -1
- package/dist/{vue-ui-molecule-bva6OvPc.cjs → vue-ui-molecule-Bv1IBx1L.cjs} +1 -1
- package/dist/{vue-ui-molecule-MKyrhqqm.js → vue-ui-molecule-CwcUmg-k.js} +33 -33
- package/dist/vue-ui-mood-radar-Bf5g118s.cjs +1 -0
- package/dist/{vue-ui-mood-radar-BNIFFvq0.js → vue-ui-mood-radar-V04waMIM.js} +129 -132
- package/dist/{vue-ui-nested-donuts-CxdZC6JF.cjs → vue-ui-nested-donuts-DgVrAToy.cjs} +2 -2
- package/dist/{vue-ui-nested-donuts-BDAlZrMF.js → vue-ui-nested-donuts-DoFALZtp.js} +98 -98
- package/dist/{vue-ui-onion-Df7YcsVR.cjs → vue-ui-onion-BdZC2qt8.cjs} +1 -1
- package/dist/{vue-ui-onion-CFa4VD-w.js → vue-ui-onion-_GaJ78t_.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-D7Q2zfcR.cjs → vue-ui-parallel-coordinate-plot-BHYr1iqZ.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DmqYXT-U.js → vue-ui-parallel-coordinate-plot-Eh0gXDVG.js} +24 -24
- package/dist/vue-ui-quadrant-BEhnCog2.cjs +1 -0
- package/dist/{vue-ui-quadrant-D5jHkq9g.js → vue-ui-quadrant-C4LHosyR.js} +35 -35
- package/dist/{vue-ui-quick-chart-BjXXSx7V.js → vue-ui-quick-chart-IqY67olA.js} +69 -69
- package/dist/{vue-ui-quick-chart-Dt9AsEU6.cjs → vue-ui-quick-chart-YFEmJP_6.cjs} +1 -1
- package/dist/{vue-ui-radar-CW8EKW4o.js → vue-ui-radar-BSsDvnVt.js} +39 -39
- package/dist/{vue-ui-radar-2EuZr7i2.cjs → vue-ui-radar-Cel3ZnfN.cjs} +1 -1
- package/dist/{vue-ui-rating-eSWsmJUU.js → vue-ui-rating-Bb1xXC_r.js} +6 -6
- package/dist/{vue-ui-rating-DrtLvVA0.cjs → vue-ui-rating-D-qBEM1w.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DiUCpEqa.js → vue-ui-relation-circle-CSqi6DqF.js} +29 -29
- package/dist/vue-ui-relation-circle-fb8g1ms8.cjs +1 -0
- package/dist/{vue-ui-rings-CHq-a5ZS.cjs → vue-ui-rings-Bgb538Wa.cjs} +2 -2
- package/dist/{vue-ui-rings-BxhLbyG0.js → vue-ui-rings-ezoy9PIq.js} +31 -31
- package/dist/vue-ui-scatter-B7z6AOLU.cjs +1 -0
- package/dist/{vue-ui-scatter-DQchX_mM.js → vue-ui-scatter-Ci5l--xS.js} +95 -95
- package/dist/{vue-ui-screenshot-CLa9vMzM.js → vue-ui-screenshot-C2X1am1d.js} +4 -4
- package/dist/{vue-ui-screenshot-SLSIpqx2.cjs → vue-ui-screenshot-DLXQWgeo.cjs} +1 -1
- package/dist/vue-ui-skeleton-CYeXVNFu.cjs +41 -0
- package/dist/{vue-ui-skeleton-C1oUnz7R.js → vue-ui-skeleton-dgMXr8k9.js} +96 -96
- package/dist/{vue-ui-smiley-Daw8fPDy.cjs → vue-ui-smiley-CDhXPYa7.cjs} +1 -1
- package/dist/{vue-ui-smiley-CmWHSt1S.js → vue-ui-smiley-DXb5VqXk.js} +2 -2
- package/dist/vue-ui-spark-trend-1hcgCu8H.cjs +1 -0
- package/dist/{vue-ui-spark-trend-CO69Dg31.js → vue-ui-spark-trend-Bv1-LLRs.js} +21 -21
- package/dist/vue-ui-sparkbar-CWdFQTkx.cjs +1 -0
- package/dist/{vue-ui-sparkbar-BRlqpe4e.js → vue-ui-sparkbar-CbmzVXcW.js} +10 -10
- package/dist/{vue-ui-sparkgauge-CbuFESsM.js → vue-ui-sparkgauge-CHODK9jn.js} +8 -8
- package/dist/{vue-ui-sparkgauge-CCxKzDjT.cjs → vue-ui-sparkgauge-r7VEpPtv.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B4-hrDHz.js → vue-ui-sparkhistogram-CKiO1LGI.js} +111 -101
- package/dist/vue-ui-sparkhistogram-Do5qTT2U.cjs +1 -0
- package/dist/vue-ui-sparkline-Bw3dw-vW.cjs +1 -0
- package/dist/{vue-ui-sparkline-DlXNmG6M.js → vue-ui-sparkline-DLU7hK0K.js} +34 -34
- package/dist/{vue-ui-sparkstackbar-J1YowQmP.js → vue-ui-sparkstackbar-B3TQVHlU.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-CDmZeXnq.cjs → vue-ui-sparkstackbar-CD-HZ4Rq.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CXGWukoJ.cjs → vue-ui-stackbar-2WJh-QtY.cjs} +2 -2
- package/dist/{vue-ui-stackbar-CKIDqkkY.js → vue-ui-stackbar-BnIeIS12.js} +202 -200
- package/dist/{vue-ui-strip-plot-JVLwIy0j.js → vue-ui-strip-plot-CddHmHSX.js} +26 -26
- package/dist/{vue-ui-strip-plot-CvmoRcYN.cjs → vue-ui-strip-plot-DyL8FH29.cjs} +1 -1
- package/dist/{vue-ui-table-BSi_cHh7.js → vue-ui-table-BZ6yonvx.js} +1 -1
- package/dist/{vue-ui-table-Dqi64VE7.cjs → vue-ui-table-_Sxgp6iC.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CfvW3rcm.js → vue-ui-table-heatmap-CYOgunS2.js} +24 -24
- package/dist/{vue-ui-table-heatmap-BwghEh5t.cjs → vue-ui-table-heatmap-DGWhBhp0.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Y6Lrrzxy.js → vue-ui-table-sparkline-D33NLyyx.js} +26 -26
- package/dist/{vue-ui-table-sparkline-bIy3kkHB.cjs → vue-ui-table-sparkline-IVMQG6tp.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DDtxYr7w.cjs → vue-ui-thermometer-8XDaKLt5.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BPTs7Nxc.js → vue-ui-thermometer-DMwZ2O16.js} +40 -40
- package/dist/{vue-ui-timer-DRSSYxOX.cjs → vue-ui-timer-B3_-DhDj.cjs} +1 -1
- package/dist/{vue-ui-timer-CkB7eZaE.js → vue-ui-timer-D59VSia6.js} +8 -8
- package/dist/{vue-ui-tiremarks-BbOaoY8S.js → vue-ui-tiremarks-Bczw28td.js} +18 -18
- package/dist/{vue-ui-tiremarks-Bttwg3-p.cjs → vue-ui-tiremarks-Br_jF9bH.cjs} +1 -1
- package/dist/{vue-ui-treemap-CoaK3wBl.js → vue-ui-treemap-DGJNw2WX.js} +29 -29
- package/dist/{vue-ui-treemap-Chq0WQPe.cjs → vue-ui-treemap-DLHdaXss.cjs} +1 -1
- package/dist/vue-ui-vertical-bar-BGYrmyAK.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-BA43_uHV.js → vue-ui-vertical-bar-De0N4Ggo.js} +14 -14
- package/dist/{vue-ui-waffle-NBjY0mko.cjs → vue-ui-waffle-CJPVEDgC.cjs} +1 -1
- package/dist/{vue-ui-waffle-BoEf8CcG.js → vue-ui-waffle-CnXLf5xd.js} +84 -84
- package/dist/{vue-ui-wheel-Bgo2jpj0.js → vue-ui-wheel-Bciq0JM9.js} +24 -24
- package/dist/{vue-ui-wheel-t5bI4a-P.cjs → vue-ui-wheel-CAKYmn0b.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DPW_-Hzz.cjs → vue-ui-word-cloud-4ooTRM2O.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-Jd9_JUyi.js → vue-ui-word-cloud-CWm6r9Zf.js} +19 -19
- package/dist/{vue-ui-xy-BMBYAC4z.js → vue-ui-xy-B5nBhYgd.js} +351 -350
- package/dist/vue-ui-xy-Ch5hDEec.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-LOsQ_DM-.js → vue-ui-xy-canvas-CzLTSmDS.js} +18 -18
- package/dist/vue-ui-xy-canvas-d-EE9_dN.cjs +9 -0
- package/package.json +1 -1
- package/dist/Tooltip-DxtWkIt5.cjs +0 -1
- package/dist/index-DYUBiaGS.cjs +0 -4
- package/dist/vue-ui-3d-bar-BAz41kL7.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CHNvRXx8.cjs +0 -1
- package/dist/vue-ui-carousel-table-Do5cYRqN.cjs +0 -1
- package/dist/vue-ui-chestnut-CyE8MafY.cjs +0 -6
- package/dist/vue-ui-cursor-DZeTQBKz.cjs +0 -1
- package/dist/vue-ui-donut-D2YJYgOB.cjs +0 -1
- package/dist/vue-ui-donut-evolution-jAMVgNHQ.cjs +0 -1
- package/dist/vue-ui-gauge-DpGcv_00.cjs +0 -1
- package/dist/vue-ui-mood-radar-CzQOAyNI.cjs +0 -1
- package/dist/vue-ui-quadrant-ZqhcVYf5.cjs +0 -1
- package/dist/vue-ui-relation-circle-C60OTe88.cjs +0 -1
- package/dist/vue-ui-scatter-DZUZUbnk.cjs +0 -1
- package/dist/vue-ui-skeleton-ClpTCY1x.cjs +0 -41
- package/dist/vue-ui-spark-trend-DmDlv8ie.cjs +0 -1
- package/dist/vue-ui-sparkbar-BUGdi0BY.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-XtqX10_t.cjs +0 -1
- package/dist/vue-ui-sparkline-BZTEi9YC.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BLIUt-HT.cjs +0 -4
- package/dist/vue-ui-xy-CBHEBcZK.cjs +0 -3
- package/dist/vue-ui-xy-canvas-D5FqRF4p.cjs +0 -9
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useCssVars as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import { _ as ue } from "./Shape-
|
|
5
|
-
import ie from "./vue-ui-skeleton-
|
|
1
|
+
import { useCssVars as J, computed as _, onMounted as K, ref as D, watch as Q, openBlock as a, createElementBlock as o, normalizeStyle as $, createElementVNode as y, createTextVNode as Z, toDisplayString as g, unref as r, createCommentVNode as p, Fragment as h, renderList as f, normalizeClass as N, createBlock as I } from "vue";
|
|
2
|
+
import { u as ee, o as te, e as H, g as le, c as ae, t as oe, s as b, i as V, f as E, X as se, w as z } from "./index-0KN57HdM.js";
|
|
3
|
+
import { u as F } from "./useNestedProp-NeGalTYk.js";
|
|
4
|
+
import { _ as ue } from "./Shape-Clmb3iTX.js";
|
|
5
|
+
import ie from "./vue-ui-skeleton-dgMXr8k9.js";
|
|
6
6
|
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"], he = ["stop-color"], fe = ["id"], ge = ["stop-color"], pe = ["stop-color"], be = ["id"], me = ["stop-color"], _e = ["stop-color"], xe = { key: 0 }, ke = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"],
|
|
7
|
+
const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"], he = ["stop-color"], fe = ["id"], ge = ["stop-color"], pe = ["stop-color"], be = ["id"], me = ["stop-color"], _e = ["stop-color"], xe = { key: 0 }, ke = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], we = { key: 1 }, $e = ["x", "y", "font-size", "font-weight", "fill"], Ce = ["x", "y", "font-size", "fill"], Le = ["x", "y", "font-size", "fill"], ze = ["height", "width", "x", "onMouseover", "stroke", "stroke-width", "rx", "stroke-dasharray", "onClick"], Se = {
|
|
8
8
|
__name: "vue-ui-sparkhistogram",
|
|
9
9
|
props: {
|
|
10
10
|
config: {
|
|
@@ -21,21 +21,21 @@ const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
emits: ["selectDatapoint"],
|
|
24
|
-
setup(
|
|
25
|
-
const v =
|
|
26
|
-
|
|
27
|
-
"
|
|
24
|
+
setup(W, { emit: B }) {
|
|
25
|
+
const v = W;
|
|
26
|
+
J((l) => ({
|
|
27
|
+
"7d1c0c30": G.value
|
|
28
28
|
}));
|
|
29
|
-
const { vue_ui_sparkhistogram:
|
|
30
|
-
|
|
29
|
+
const { vue_ui_sparkhistogram: O } = ee(), S = _(() => !!v.dataset && v.dataset.length);
|
|
30
|
+
K(() => {
|
|
31
31
|
M();
|
|
32
32
|
});
|
|
33
33
|
function M() {
|
|
34
|
-
|
|
34
|
+
te(v.dataset) ? H({
|
|
35
35
|
componentName: "VueUiSparkHistogram",
|
|
36
36
|
type: "dataset"
|
|
37
|
-
}) : v.dataset.forEach((l,
|
|
38
|
-
|
|
37
|
+
}) : v.dataset.forEach((l, i) => {
|
|
38
|
+
le({
|
|
39
39
|
datasetObject: l,
|
|
40
40
|
requiredAttributes: ["value"]
|
|
41
41
|
}).forEach((t) => {
|
|
@@ -43,107 +43,107 @@ const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
43
43
|
componentName: "VueUiSparkHistogram",
|
|
44
44
|
type: "datasetSerieAttribute",
|
|
45
45
|
property: t,
|
|
46
|
-
index:
|
|
46
|
+
index: i
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
const m =
|
|
52
|
-
get: () =>
|
|
51
|
+
const m = D(ae()), e = _({
|
|
52
|
+
get: () => A(),
|
|
53
53
|
set: (l) => l
|
|
54
54
|
});
|
|
55
|
-
function
|
|
56
|
-
const l =
|
|
55
|
+
function A() {
|
|
56
|
+
const l = F({
|
|
57
57
|
userConfig: v.config,
|
|
58
|
-
defaultConfig:
|
|
58
|
+
defaultConfig: O
|
|
59
59
|
});
|
|
60
60
|
return l.theme ? {
|
|
61
|
-
...
|
|
62
|
-
userConfig:
|
|
61
|
+
...F({
|
|
62
|
+
userConfig: oe.vue_ui_sparkhistogram[l.theme] || v.config,
|
|
63
63
|
defaultConfig: l
|
|
64
64
|
})
|
|
65
65
|
} : l;
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
e.value =
|
|
67
|
+
Q(() => v.config, (l) => {
|
|
68
|
+
e.value = A(), M();
|
|
69
69
|
}, { deep: !0 });
|
|
70
|
-
const
|
|
71
|
-
const l = e.value.style.layout.height,
|
|
70
|
+
const d = _(() => {
|
|
71
|
+
const l = e.value.style.layout.height, i = e.value.style.layout.width, t = e.value.style.layout.padding.top, s = l - e.value.style.layout.padding.bottom, c = e.value.style.layout.padding.left, x = i - e.value.style.layout.padding.right, k = t + (l - t - e.value.style.layout.padding.bottom) / 2, C = l - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom, w = i - e.value.style.layout.padding.left - e.value.style.layout.padding.right;
|
|
72
72
|
return {
|
|
73
73
|
bottom: s,
|
|
74
74
|
centerY: k,
|
|
75
75
|
drawingHeight: C,
|
|
76
|
-
drawingWidth:
|
|
76
|
+
drawingWidth: w,
|
|
77
77
|
height: l,
|
|
78
|
-
left:
|
|
78
|
+
left: c,
|
|
79
79
|
right: x,
|
|
80
80
|
top: t,
|
|
81
|
-
width:
|
|
81
|
+
width: i
|
|
82
82
|
};
|
|
83
|
-
}),
|
|
84
|
-
function
|
|
85
|
-
return Math.abs(l) /
|
|
83
|
+
}), U = _(() => Math.max(...v.dataset.map((l) => Math.abs(l.value || 0))));
|
|
84
|
+
function X(l) {
|
|
85
|
+
return Math.abs(l) / U.value;
|
|
86
86
|
}
|
|
87
|
-
const n = _(() => v.dataset.map((l,
|
|
88
|
-
const t =
|
|
87
|
+
const n = _(() => v.dataset.map((l, i) => {
|
|
88
|
+
const t = X(l.value || 0), s = d.value.drawingHeight * t, c = d.value.drawingWidth / v.dataset.length, x = c * (e.value.style.bars.gap / 100), k = c - x, C = d.value.centerY - s / 2, w = d.value.left + (x / 2 + i * c), Y = d.value.left + i * c, L = typeof l.intensity > "u" ? 100 : Math.round(l.intensity * 100), q = l.color ? l.color : l.value >= 0 ? b(e.value.style.bars.colors.positive, L) : b(e.value.style.bars.colors.negative, L), R = l.color ? l.color : l.value >= 0 ? e.value.style.bars.colors.positive : e.value.style.bars.colors.negative, T = l.color ? `url(#gradient_datapoint_${i}_${m.value})` : l.value >= 0 ? `url(#gradient_positive_${i}_${m.value})` : `url(#gradient_negative_${i}_${m.value})`, P = w + k / 2;
|
|
89
89
|
return {
|
|
90
90
|
...l,
|
|
91
|
-
color:
|
|
92
|
-
gradient:
|
|
91
|
+
color: q,
|
|
92
|
+
gradient: T,
|
|
93
93
|
height: s,
|
|
94
94
|
intensity: L,
|
|
95
95
|
proportion: t,
|
|
96
|
-
stroke:
|
|
97
|
-
textAnchor:
|
|
98
|
-
trapX:
|
|
99
|
-
unitWidth:
|
|
96
|
+
stroke: R,
|
|
97
|
+
textAnchor: P,
|
|
98
|
+
trapX: Y,
|
|
99
|
+
unitWidth: c,
|
|
100
100
|
width: k,
|
|
101
|
-
x:
|
|
101
|
+
x: w,
|
|
102
102
|
y: C
|
|
103
103
|
};
|
|
104
|
-
})),
|
|
105
|
-
function
|
|
106
|
-
|
|
104
|
+
})), u = D(null);
|
|
105
|
+
function j(l, i) {
|
|
106
|
+
B("selectDatapoint", { datapoint: l, index: i });
|
|
107
107
|
}
|
|
108
|
-
const
|
|
109
|
-
return (l,
|
|
110
|
-
style:
|
|
111
|
-
onMouseleave:
|
|
108
|
+
const G = _(() => `${e.value.style.animation.speedMs}ms`);
|
|
109
|
+
return (l, i) => (a(), o("div", {
|
|
110
|
+
style: $(`width:100%;background:${e.value.style.backgroundColor};font-family:${e.value.style.fontFamily}`),
|
|
111
|
+
onMouseleave: i[1] || (i[1] = (t) => u.value = null)
|
|
112
112
|
}, [
|
|
113
113
|
e.value.style.title.text ? (a(), o("div", {
|
|
114
114
|
key: 0,
|
|
115
|
-
style:
|
|
115
|
+
style: $(`width:calc(100% - 12px);background:${e.value.style.backgroundColor};margin:0 auto;margin:${e.value.style.title.margin};padding: 0 6px;text-align:${e.value.style.title.textAlign}`)
|
|
116
116
|
}, [
|
|
117
|
-
|
|
118
|
-
style:
|
|
117
|
+
y("div", {
|
|
118
|
+
style: $(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
|
|
119
119
|
}, [
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
Z(g(e.value.style.title.text) + " ", 1),
|
|
121
|
+
u.value !== null ? (a(), o("span", re, "- " + g(n.value[u.value].timeLabel || "") + " " + g(r(V)(
|
|
122
122
|
e.value.style.labels.value.formatter,
|
|
123
|
-
n.value[
|
|
124
|
-
r(
|
|
123
|
+
n.value[u.value].value,
|
|
124
|
+
r(E)({
|
|
125
125
|
p: e.value.style.labels.value.prefix,
|
|
126
|
-
v: n.value[
|
|
126
|
+
v: n.value[u.value].value,
|
|
127
127
|
s: e.value.style.labels.value.suffix,
|
|
128
128
|
r: e.value.style.labels.value.rounding
|
|
129
129
|
}),
|
|
130
|
-
{ datapoint: n.value[
|
|
130
|
+
{ datapoint: n.value[u.value], seriesIndex: u.value }
|
|
131
131
|
)), 1)) : p("", !0),
|
|
132
|
-
![void 0, null].includes(
|
|
132
|
+
![void 0, null].includes(u.value) && ![null, void 0].includes(n.value[u.value].valueLabel) ? (a(), o("span", ve, "(" + g(n.value[u.value].valueLabel || 0) + ")", 1)) : p("", !0)
|
|
133
133
|
], 4),
|
|
134
134
|
e.value.style.title.subtitle.text ? (a(), o("div", {
|
|
135
135
|
key: 0,
|
|
136
|
-
style:
|
|
137
|
-
},
|
|
136
|
+
style: $(`font-size:${e.value.style.title.subtitle.fontSize}px;color:${e.value.style.title.subtitle.color};font-weight:${e.value.style.title.subtitle.bold ? "bold" : "normal"}`)
|
|
137
|
+
}, g(e.value.style.title.subtitle.text), 5)) : p("", !0)
|
|
138
138
|
], 4)) : p("", !0),
|
|
139
139
|
S.value ? (a(), o("svg", {
|
|
140
140
|
key: 1,
|
|
141
141
|
xmlns: r(se),
|
|
142
|
-
viewBox: `0 0 ${
|
|
142
|
+
viewBox: `0 0 ${d.value.width} ${d.value.height}`,
|
|
143
143
|
style: { overflow: "visible" }
|
|
144
144
|
}, [
|
|
145
|
-
|
|
146
|
-
(a(!0), o(
|
|
145
|
+
y("defs", null, [
|
|
146
|
+
(a(!0), o(h, null, f(n.value, (t, s) => (a(), o("radialGradient", {
|
|
147
147
|
id: `gradient_positive_${s}_${m.value}`,
|
|
148
148
|
cy: "50%",
|
|
149
149
|
cx: "50%",
|
|
@@ -151,16 +151,16 @@ const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
151
151
|
fx: "50%",
|
|
152
152
|
fy: "50%"
|
|
153
153
|
}, [
|
|
154
|
-
|
|
154
|
+
y("stop", {
|
|
155
155
|
offset: "0%",
|
|
156
|
-
"stop-color":
|
|
156
|
+
"stop-color": r(b)(r(z)(e.value.style.bars.colors.positive, 0.05), t.intensity)
|
|
157
157
|
}, null, 8, ye),
|
|
158
|
-
|
|
158
|
+
y("stop", {
|
|
159
159
|
offset: "100%",
|
|
160
|
-
"stop-color":
|
|
160
|
+
"stop-color": r(b)(e.value.style.bars.colors.positive, t.intensity)
|
|
161
161
|
}, null, 8, he)
|
|
162
162
|
], 8, ce))), 256)),
|
|
163
|
-
(a(!0), o(
|
|
163
|
+
(a(!0), o(h, null, f(n.value, (t, s) => (a(), o("radialGradient", {
|
|
164
164
|
id: `gradient_negative_${s}_${m.value}`,
|
|
165
165
|
cy: "50%",
|
|
166
166
|
cx: "50%",
|
|
@@ -168,16 +168,16 @@ const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
168
168
|
fx: "50%",
|
|
169
169
|
fy: "50%"
|
|
170
170
|
}, [
|
|
171
|
-
|
|
171
|
+
y("stop", {
|
|
172
172
|
offset: "0%",
|
|
173
|
-
"stop-color":
|
|
173
|
+
"stop-color": r(b)(r(z)(e.value.style.bars.colors.negative, 0.05), t.intensity)
|
|
174
174
|
}, null, 8, ge),
|
|
175
|
-
|
|
175
|
+
y("stop", {
|
|
176
176
|
offset: "100%",
|
|
177
|
-
"stop-color":
|
|
177
|
+
"stop-color": r(b)(e.value.style.bars.colors.negative, t.intensity)
|
|
178
178
|
}, null, 8, pe)
|
|
179
179
|
], 8, fe))), 256)),
|
|
180
|
-
(a(!0), o(
|
|
180
|
+
(a(!0), o(h, null, f(n.value, (t, s) => (a(), o("radialGradient", {
|
|
181
181
|
id: `gradient_datapoint_${s}_${m.value}`,
|
|
182
182
|
cy: "50%",
|
|
183
183
|
cx: "50%",
|
|
@@ -185,18 +185,18 @@ const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
185
185
|
fx: "50%",
|
|
186
186
|
fy: "50%"
|
|
187
187
|
}, [
|
|
188
|
-
|
|
188
|
+
y("stop", {
|
|
189
189
|
offset: "0%",
|
|
190
|
-
"stop-color":
|
|
190
|
+
"stop-color": r(b)(r(z)(t.color, 0.05), t.intensity)
|
|
191
191
|
}, null, 8, me),
|
|
192
|
-
|
|
192
|
+
y("stop", {
|
|
193
193
|
offset: "100%",
|
|
194
|
-
"stop-color":
|
|
194
|
+
"stop-color": r(b)(t.color, t.intensity)
|
|
195
195
|
}, null, 8, _e)
|
|
196
196
|
], 8, be))), 256))
|
|
197
197
|
]),
|
|
198
198
|
!e.value.style.bars.shape || e.value.style.bars.shape === "square" ? (a(), o("g", xe, [
|
|
199
|
-
(a(!0), o(
|
|
199
|
+
(a(!0), o(h, null, f(n.value, (t, s) => (a(), o("rect", {
|
|
200
200
|
x: t.x,
|
|
201
201
|
y: t.y,
|
|
202
202
|
height: t.height,
|
|
@@ -205,26 +205,36 @@ const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
205
205
|
stroke: t.stroke,
|
|
206
206
|
"stroke-width": e.value.style.bars.strokeWidth,
|
|
207
207
|
rx: `${e.value.style.bars.borderRadius * t.proportion / 12}%`,
|
|
208
|
-
class:
|
|
208
|
+
class: N({ "vue-ui-sparkhistogram-shape": e.value.style.animation.show })
|
|
209
209
|
}, null, 10, ke))), 256))
|
|
210
|
-
])) : (a(), o("g",
|
|
211
|
-
(a(!0), o(
|
|
210
|
+
])) : (a(), o("g", we, [
|
|
211
|
+
(a(!0), o(h, null, f(n.value, (t, s) => (a(), I(ue, {
|
|
212
212
|
plot: { x: t.x + t.width / 2, y: t.y + t.height / 2 },
|
|
213
213
|
color: e.value.style.bars.colors.gradient.show ? t.gradient : t.color,
|
|
214
214
|
shape: e.value.style.bars.shape,
|
|
215
215
|
radius: t.height * 0.4,
|
|
216
|
-
class:
|
|
216
|
+
class: N({ "vue-ui-sparkhistogram-shape": e.value.style.animation.show })
|
|
217
217
|
}, null, 8, ["plot", "color", "shape", "radius", "class"]))), 256))
|
|
218
218
|
])),
|
|
219
|
-
(a(!0), o(
|
|
219
|
+
(a(!0), o(h, null, f(n.value, (t, s) => (a(), o("text", {
|
|
220
220
|
"text-anchor": "middle",
|
|
221
221
|
x: t.textAnchor,
|
|
222
222
|
y: t.y - e.value.style.labels.value.fontSize / 3 + e.value.style.labels.value.offsetY,
|
|
223
223
|
"font-size": e.value.style.labels.value.fontSize,
|
|
224
224
|
"font-weight": e.value.style.labels.value.bold ? "bold" : "normal",
|
|
225
225
|
fill: e.value.style.labels.value.color
|
|
226
|
-
},
|
|
227
|
-
|
|
226
|
+
}, g(r(V)(
|
|
227
|
+
e.value.style.labels.value.formatter,
|
|
228
|
+
t.value,
|
|
229
|
+
r(E)({
|
|
230
|
+
p: e.value.style.labels.value.prefix,
|
|
231
|
+
v: t.value,
|
|
232
|
+
s: e.value.style.labels.value.suffix,
|
|
233
|
+
r: e.value.style.labels.value.rounding
|
|
234
|
+
}),
|
|
235
|
+
{ datapoint: n.value[u.value], seriesIndex: u.value }
|
|
236
|
+
)), 9, $e))), 256)),
|
|
237
|
+
(a(!0), o(h, null, f(n.value, (t, s) => (a(), o("g", null, [
|
|
228
238
|
t.valueLabel ? (a(), o("text", {
|
|
229
239
|
key: 0,
|
|
230
240
|
x: t.textAnchor,
|
|
@@ -232,36 +242,36 @@ const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
232
242
|
"font-size": e.value.style.labels.valueLabel.fontSize,
|
|
233
243
|
"text-anchor": "middle",
|
|
234
244
|
fill: e.value.style.labels.valueLabel.color
|
|
235
|
-
},
|
|
245
|
+
}, g(t.valueLabel), 9, Ce)) : p("", !0)
|
|
236
246
|
]))), 256)),
|
|
237
|
-
(a(!0), o(
|
|
247
|
+
(a(!0), o(h, null, f(n.value, (t, s) => (a(), o("g", null, [
|
|
238
248
|
t.timeLabel ? (a(), o("text", {
|
|
239
249
|
key: 0,
|
|
240
250
|
x: t.textAnchor,
|
|
241
|
-
y:
|
|
251
|
+
y: d.value.height - e.value.style.labels.timeLabel.fontSize / 2,
|
|
242
252
|
"font-size": e.value.style.labels.timeLabel.fontSize,
|
|
243
253
|
fill: e.value.style.labels.timeLabel.color,
|
|
244
254
|
"text-anchor": "middle"
|
|
245
|
-
},
|
|
255
|
+
}, g(t.timeLabel), 9, Le)) : p("", !0)
|
|
246
256
|
]))), 256)),
|
|
247
|
-
(a(!0), o(
|
|
248
|
-
|
|
249
|
-
height:
|
|
257
|
+
(a(!0), o(h, null, f(n.value, (t, s) => (a(), o("g", null, [
|
|
258
|
+
y("rect", {
|
|
259
|
+
height: d.value.height,
|
|
250
260
|
width: t.unitWidth,
|
|
251
261
|
fill: "transparent",
|
|
252
262
|
x: t.trapX,
|
|
253
263
|
y: 0,
|
|
254
|
-
onMouseover: (
|
|
255
|
-
onMouseleave:
|
|
256
|
-
stroke:
|
|
257
|
-
"stroke-width":
|
|
264
|
+
onMouseover: (c) => u.value = s,
|
|
265
|
+
onMouseleave: i[0] || (i[0] = (c) => u.value = null),
|
|
266
|
+
stroke: u.value !== null && u.value === s ? e.value.style.selector.stroke : "",
|
|
267
|
+
"stroke-width": u.value !== null && u.value === s ? e.value.style.selector.strokeWidth : 0,
|
|
258
268
|
rx: e.value.style.selector.borderRadius,
|
|
259
269
|
"stroke-dasharray": e.value.style.selector.strokeDasharray,
|
|
260
|
-
onClick: () =>
|
|
270
|
+
onClick: () => j(t, s)
|
|
261
271
|
}, null, 40, ze)
|
|
262
272
|
]))), 256))
|
|
263
273
|
], 8, de)) : p("", !0),
|
|
264
|
-
S.value ? p("", !0) : (a(),
|
|
274
|
+
S.value ? p("", !0) : (a(), I(ie, {
|
|
265
275
|
key: 2,
|
|
266
276
|
config: {
|
|
267
277
|
type: "sparkHistogram",
|
|
@@ -275,7 +285,7 @@ const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
275
285
|
}, null, 8, ["config"]))
|
|
276
286
|
], 36));
|
|
277
287
|
}
|
|
278
|
-
},
|
|
288
|
+
}, Ve = /* @__PURE__ */ ne(Se, [["__scopeId", "data-v-7e016c13"]]);
|
|
279
289
|
export {
|
|
280
|
-
|
|
290
|
+
Ve as default
|
|
281
291
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-TabZg_HV.cjs"),_=require("./useNestedProp-CoLyVvV9.cjs"),F=require("./Shape-B6cEKeIN.cjs"),M=require("./vue-ui-skeleton-CYeXVNFu.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A={key:0},H={key:1},q=["xmlns","viewBox"],I=["id"],U=["stop-color"],W=["stop-color"],j=["id"],P=["stop-color"],G=["stop-color"],T=["id"],X=["stop-color"],Y=["stop-color"],R={key:0},J=["x","y","height","width","fill","stroke","stroke-width","rx"],K={key:1},Q=["x","y","font-size","font-weight","fill"],Z=["x","y","font-size","fill"],ee=["x","y","font-size","fill"],te=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],le={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(x,{emit:B}){const i=x;e.useCssVars(o=>({"7d1c0c30":L.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),h=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(i.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):i.dataset.forEach((o,r)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:r})})})}const v=e.ref(a.createUid()),t=e.computed({get:()=>b(),set:o=>o});function b(){const o=_.useNestedProp({userConfig:i.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||i.config,defaultConfig:o})}:o}e.watch(()=>i.config,o=>{t.value=b(),k()},{deep:!0});const c=e.computed(()=>{const o=t.value.style.layout.height,r=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=r-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=r-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:r}}),w=e.computed(()=>Math.max(...i.dataset.map(o=>Math.abs(o.value||0))));function C(o){return Math.abs(o)/w.value}const u=e.computed(()=>i.dataset.map((o,r)=>{const l=C(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/i.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+r*d),S=c.value.left+r*d,f=typeof o.intensity>"u"?100:Math.round(o.intensity*100),N=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,f):a.setOpacity(t.value.style.bars.colors.negative,f),V=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,z=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,D=m+p/2;return{...o,color:N,gradient:z,height:s,intensity:f,proportion:l,stroke:V,textAnchor:D,trapX:S,unitWidth:d,width:p,x:m,y:g}})),n=e.ref(null);function $(o,r){B("selectDatapoint",{datapoint:o,index:r})}const L=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:r[1]||(r[1]=l=>n.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),n.value!==null?(e.openBlock(),e.createElementBlock("span",A,"- "+e.toDisplayString(u.value[n.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,u.value[n.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:u.value[n.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:u.value[n.value],seriesIndex:n.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(n.value)&&![null,void 0].includes(u.value[n.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",H,"("+e.toDisplayString(u.value[n.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),h.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(u.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.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05),l.intensity)},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,W)],8,I))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05),l.intensity)},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,G)],8,j))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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.setOpacity)(e.unref(a.shiftHue)(l.color,.05),l.intensity)},null,8,X),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,Y)],8,T))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,J))),256))])):(e.openBlock(),e.createElementBlock("g",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(l,s)=>(e.openBlock(),e.createBlock(F._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(u.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(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,l.value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:l.value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:u.value[n.value],seriesIndex:n.value})),9,Q))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,Z)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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,ee)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.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=>n.value=s,onMouseleave:r[0]||(r[0]=d=>n.value=null),stroke:n.value!==null&&n.value===s?t.value.style.selector.stroke:"","stroke-width":n.value!==null&&n.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>$(l,s)},null,40,te)]))),256))],8,q)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},oe=O._export_sfc(le,[["__scopeId","data-v-7e016c13"]]);exports.default=oe;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-TabZg_HV.cjs"),I=require("./useNestedProp-CoLyVvV9.cjs"),q=require("./vue-ui-skeleton-CYeXVNFu.cjs"),S=require("./useResponsive-B3TrDDIG.cjs"),G=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["id"],R=["xmlns","viewBox"],H=["id"],U=["stop-color"],X=["stop-color"],Z=["id"],Y=["stop-color"],J=["stop-color"],K=["id"],Q=["stop-color"],ee=["stop-color"],te={key:0},le=["d","fill"],ae=["d","fill"],oe=["d","stroke","stroke-width"],ne=["x1","x2","y1","y2","stroke","stroke-width"],ue=["x","y","width","height","fill","rx"],re=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],se=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],ie=["cx","cy","r","fill","stroke","stroke-width"],de=["x","y","font-size","font-weight","fill"],ce=["x","y","height","width","onMouseenter","onClick"],ve={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0}},emits:["hoverIndex","selectDatapoint"],setup(f,{emit:_}){const i=f,{vue_ui_sparkline:M}=u.useConfig(),g=e.computed(()=>!!i.dataset&&i.dataset.length),v=e.ref(u.createUid()),x=e.ref(null),B=e.ref(null),t=e.computed({get:()=>L(),set:l=>l});function L(){const l=I.useNestedProp({userConfig:i.config,defaultConfig:M});return l.theme?{...I.useNestedProp({userConfig:u.themes.vue_ui_sparkline[l.theme]||i.config,defaultConfig:l})}:l}e.watch(()=>i.config,l=>{t.value=L(),V(),o.value.chartWidth=t.value.style.chartWidth},{deep:!0}),e.watch(()=>i.dataset,l=>{p.value=i.dataset.map(n=>({...n,value:[void 0].includes(n.value)?null:n.value}))},{deep:!0});const p=e.ref(z());function z(){return i.dataset.map(l=>t.value.style.animation.show?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value})}const C=e.ref(null);e.onMounted(()=>{if(V(),t.value.style.animation.show&&i.dataset.length>1){let a=function(){n<i.dataset.length?(p.value.push(i.dataset[n]),setTimeout(()=>{requestAnimationFrame(a)},l)):p.value=i.dataset,n+=1};p.value=[];const l=t.value.style.animation.animationFrames/i.dataset.length;let n=0;a()}});function V(){if(u.objectIsEmpty(i.dataset)?u.error({componentName:"VueUiSparkline",type:"dataset"}):i.dataset.forEach((l,n)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{u.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.responsive){const l=S.throttle(()=>{const{width:n,height:a}=S.useResponsive({chart:x.value,title:t.value.style.title.show&&i.showInfo?B.value:null});o.value.width=n,o.value.height=a,o.value.chartWidth=t.value.style.chartWidth/500*n,o.value.padding=.06*n});C.value=new ResizeObserver(l),C.value.observe(x.value.parentNode)}}const o=e.ref({height:80,width:500,chartWidth:t.value.style.chartWidth,padding:30}),P=e.ref(6),r=e.computed(()=>({top:12,left:0,right:o.value.width,bottom:o.value.height-3,start:i.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?o.value.width-o.value.chartWidth:o.value.padding,width:i.showInfo&&t.value.style.dataLabel.show?o.value.chartWidth:o.value.width-o.value.padding,height:o.value.height-12})),w=e.computed(()=>Math.min(...p.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),D=e.computed(()=>Math.max(...p.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),m=e.computed(()=>{const l=w.value>=0?0:w.value;return Math.abs(l)}),W=e.computed(()=>D.value+m.value+P.value),b=e.computed(()=>r.value.bottom-r.value.height*N(m.value));function N(l){return l/W.value}const h=e.computed(()=>i.dataset.length-1),s=e.computed(()=>p.value.map((l,n)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0;return{absoluteValue:a,period:l.period,plotValue:a+m.value,toMax:N(a+m.value),x:r.value.start+n*(r.value.width/(h.value+1)>o.padding?o.padding:r.value.width/(h.value+1)),y:r.value.bottom-r.value.height*N(a+m.value),id:`plot_${v.value}_${n}`,color:k.value?t.value.style.bar.color:t.value.style.area.useGradient?u.shiftHue(t.value.style.line.color,.05*(1-n/h.value)):t.value.style.line.color,width:r.value.width/(h.value+1)>o.padding?o.padding:r.value.width/(h.value+1)}})),A=e.computed(()=>{const l={x:s.value[0].x,y:o.value.height-6},n={x:s.value[s.value.length-1].x,y:o.value.height-6},a=[];return s.value.forEach(d=>{a.push(`${d.x},${d.y} `)}),[l.x,l.y,...a,n.x,n.y].toString()}),c=e.ref(void 0);function O(l,n){c.value=l,_("hoverIndex",{index:n})}function F(){c.value=void 0,_("hoverIndex",{index:void 0})}const y=e.computed(()=>{if(g.value){const l=s.value.map(a=>a.absoluteValue),n=l.reduce((a,d)=>a+d,0);return{latest:s.value[s.value.length-1].absoluteValue,sum:n,average:n/s.value.length,median:u.calcMedian(l),trend:u.calcLinearProgression(s.value.map(({x:a,y:d,absoluteValue:$})=>({x:a,y:d,value:$}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),E=e.computed(()=>g.value?t.value.style.dataLabel.valueType==="latest"?y.value.latest:t.value.style.dataLabel.valueType==="sum"?y.value.sum:t.value.style.dataLabel.valueType==="average"?y.value.average:0:0),k=e.computed(()=>t.value.type&&t.value.type==="bar");function T(l,n){_("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:x,class:"vue-ui-sparkline",id:v.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily}`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:c.value,latest:y.value.latest,sum:y.value.sum,average:y.value.average,median:y.value.median,trend:y.value.trend})),void 0,!0),t.value.style.title.show&&f.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:B,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(c.value?c.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(u.setOpacity)(e.unref(u.shiftHue)(t.value.style.area.color,.05),t.value.style.area.opacity)},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(u.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,X)],8,H),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(u.shiftHue)(t.value.style.bar.color,.05)},null,8,J)],8,Z),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(u.shiftHue)(t.value.style.bar.color,.05)},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,ee)],8,K)]),t.value.style.area.show&&!k.value&&s.value[0]?(e.openBlock(),e.createElementBlock("g",te,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${s.value[0].x},${r.value.bottom} ${e.unref(u.createSmoothPath)(s.value)} L ${s.value.at(-1).x},${r.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(u.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,le)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${A.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(u.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ae))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(u.createSmoothPath)(s.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,oe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("g",null,[d<s.value.length-1&&!t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:s.value[d+1].x,y1:a.y,y2:s.value[d+1].y,stroke:a.color,"stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"geometricPrecision"},null,8,ne)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x-a.width/2,y:a.absoluteValue>0?a.y:b.value,width:a.width,height:Math.abs(a.y-b.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,ue)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(c.value&&a.id===c.value.id||f.selectedIndex===d)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:r.value.top-6,y2:r.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,re)):e.createCommentVNode("",!0)]))),256)),w.value<0?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.start,x2:r.value.start+r.value.width-16,y1:b.value,y2:b.value,stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,se)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&a.id===c.value.id||f.selectedIndex===d?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,ie)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),f.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:r.value.width+12+t.value.style.dataLabel.offsetX,y:o.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(c.value?e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,c.value.absoluteValue,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:c.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:c.value}):e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,E.value,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:E.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,de)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(r.value.width/(h.value+1)>o.value.padding?o.value.padding:r.value.width/(h.value+1))/2,y:r.value.top-6,height:r.value.height+6,width:r.value.width/(h.value+1)>o.value.padding?o.value.padding:r.value.width/(h.value+1),fill:"transparent",onMouseenter:$=>O(a,d),onMouseleave:F,onClick:()=>T(a,d)},null,40,ce))),256)),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],12,R)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(q.default,{key:2,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,j))}},he=G._export_sfc(ve,[["__scopeId","data-v-27d92a0d"]]);exports.default=he;
|