vue-data-ui 2.4.61 → 2.4.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-C4JCfYUu.cjs → Arrow-BpZBF7Ak.cjs} +1 -1
- package/dist/{Arrow-NyYxjtAV.js → Arrow-nOy23OOV.js} +1 -1
- package/dist/{BaseIcon-a81b_5b0.js → BaseIcon-CrqNvGTs.js} +1 -1
- package/dist/{BaseIcon-B1zKYJGk.cjs → BaseIcon-rzIvDo2Q.cjs} +1 -1
- package/dist/{DataTable-CcW8SHH2.js → DataTable-BBh7_ttv.js} +2 -2
- package/dist/{DataTable-BVwnM0tQ.cjs → DataTable-CCJGHIVo.cjs} +1 -1
- package/dist/{Legend-fpW6iFgA.cjs → Legend-CqilK5CI.cjs} +1 -1
- package/dist/{Legend-Cq1rcFzv.js → Legend-WOejx9sp.js} +1 -1
- package/dist/{PackageVersion-LRbiiLp0.js → PackageVersion-dR8EUy_P.js} +1 -1
- package/dist/{PackageVersion-B7-YDa6h.cjs → PackageVersion-eZ5Dmuid.cjs} +1 -1
- package/dist/{PenAndPaper-BCjJ-td_.js → PenAndPaper-CrXlqi9I.js} +3 -3
- package/dist/{PenAndPaper-JkRknDt7.cjs → PenAndPaper-D_w2N2qM.cjs} +1 -1
- package/dist/{Shape-hFNcMth4.js → Shape-CwmKWYzq.js} +1 -1
- package/dist/{Shape-QZcWXoYb.cjs → Shape-qkkvCKyp.cjs} +1 -1
- package/dist/Slicer-DvdU-uf8.js +484 -0
- package/dist/Slicer-oNEtv1s3.cjs +1 -0
- package/dist/{Title-CQVviDIQ.cjs → Title-CoNtoGH9.cjs} +1 -1
- package/dist/{Title-Zm0LCGPS.js → Title-obqvTiXP.js} +1 -1
- package/dist/{Tooltip-CoahRzyE.js → Tooltip-BK-ACGDE.js} +1 -1
- package/dist/{Tooltip-DZ1uTqBW.cjs → Tooltip-Dz4wVJkz.cjs} +1 -1
- package/dist/index-ChOY3hT9.cjs +9 -0
- package/dist/{index-CG_OTzik.js → index-Z_vzxZTo.js} +8 -3
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +5 -0
- package/dist/types/vue-data-ui.d.ts +5 -0
- package/dist/{useNestedProp-BZZvruew.js → useNestedProp-Buhi5uyL.js} +1 -1
- package/dist/{useNestedProp--db71Vbu.cjs → useNestedProp-CA8PjFJH.cjs} +1 -1
- package/dist/{usePrinter-CxBwzZkb.js → usePrinter-Ck0oiMlt.js} +1 -1
- package/dist/{usePrinter-D0LQ1CyY.cjs → usePrinter-c3c7_uAW.cjs} +1 -1
- package/dist/{vue-data-ui-C4A5zIHI.js → vue-data-ui-BGng_wXI.js} +60 -60
- package/dist/{vue-data-ui-CUyuYhwT.cjs → vue-data-ui-CihfnXFF.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DAh8koX4.js → vue-ui-3d-bar-B7k4LzL1.js} +9 -9
- package/dist/{vue-ui-3d-bar-DKiYqw0u.cjs → vue-ui-3d-bar-BsxFEhMN.cjs} +1 -1
- package/dist/{vue-ui-accordion-C2IbGLRv.js → vue-ui-accordion-CV2-8b1O.js} +3 -3
- package/dist/{vue-ui-accordion-B7VpkrPR.cjs → vue-ui-accordion-CZ8AlriN.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-me4GgQNb.js → vue-ui-age-pyramid-Bc4DaLIy.js} +10 -10
- package/dist/{vue-ui-age-pyramid-BmqvzA-d.cjs → vue-ui-age-pyramid-C1crnKk7.cjs} +1 -1
- package/dist/{vue-ui-annotator-XOzj9Bpg.js → vue-ui-annotator-DLbAn_Mz.js} +1 -1
- package/dist/{vue-ui-annotator-Bg9Juc1l.cjs → vue-ui-annotator-DNKcAaEh.cjs} +1 -1
- package/dist/{vue-ui-bullet-BsHk8Y0E.cjs → vue-ui-bullet-CEO3AsWC.cjs} +1 -1
- package/dist/{vue-ui-bullet-D1ElgM95.js → vue-ui-bullet-ClODxNrk.js} +8 -8
- package/dist/{vue-ui-candlestick-Ba4yv9ZM.cjs → vue-ui-candlestick-B00zQB4B.cjs} +2 -2
- package/dist/{vue-ui-candlestick-DLhwvS6l.js → vue-ui-candlestick-DI7t6jqz.js} +75 -73
- package/dist/{vue-ui-carousel-table-cEaGm232.js → vue-ui-carousel-table-5jXlkslq.js} +4 -4
- package/dist/{vue-ui-carousel-table-DSoV6GBf.cjs → vue-ui-carousel-table-Bm2D_0pZ.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DCURZY6w.js → vue-ui-chestnut-CRZsXRUH.js} +8 -8
- package/dist/{vue-ui-chestnut-D6D5Zr4r.cjs → vue-ui-chestnut-DP6-Gie6.cjs} +1 -1
- package/dist/{vue-ui-cursor-CqDpaKei.cjs → vue-ui-cursor-BGe0gZK8.cjs} +1 -1
- package/dist/{vue-ui-cursor-B9eASI3M.js → vue-ui-cursor-DA8bsmEc.js} +2 -2
- package/dist/{vue-ui-dashboard-B2rw-G-R.js → vue-ui-dashboard-BZD-6Pz7.js} +43 -43
- package/dist/vue-ui-dashboard-D2v4oSiB.cjs +1 -0
- package/dist/{vue-ui-digits-BAG_spWA.js → vue-ui-digits-CKvrL9Wc.js} +2 -2
- package/dist/{vue-ui-digits-CagcmtFs.cjs → vue-ui-digits-DC8ZuHOj.cjs} +1 -1
- package/dist/{vue-ui-donut-5jgX6ZLE.cjs → vue-ui-donut-D5mDCNky.cjs} +1 -1
- package/dist/{vue-ui-donut-BJl5Isgy.js → vue-ui-donut-DDayabSz.js} +11 -11
- package/dist/{vue-ui-donut-evolution-CnqdY8LW.cjs → vue-ui-donut-evolution-AlCGLfzy.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DMhkt7mf.js → vue-ui-donut-evolution-CBsxmrTO.js} +127 -125
- package/dist/{vue-ui-dumbbell-Be0B-LgS.cjs → vue-ui-dumbbell-B9cELz3z.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-Dg3mYtw3.js → vue-ui-dumbbell-DB7jNjQP.js} +10 -10
- package/dist/{vue-ui-flow-BKyhoEjt.cjs → vue-ui-flow-CCM51fzQ.cjs} +1 -1
- package/dist/{vue-ui-flow-Cq8-bQr_.js → vue-ui-flow-Cw1Vfk_e.js} +9 -9
- package/dist/{vue-ui-funnel-DFk4PKvj.cjs → vue-ui-funnel--4JhwVwW.cjs} +1 -1
- package/dist/{vue-ui-funnel-DHFbd45-.js → vue-ui-funnel-CU72MuGg.js} +9 -9
- package/dist/{vue-ui-galaxy-Y1gaT5UE.cjs → vue-ui-galaxy-BJrkygeR.cjs} +1 -1
- package/dist/{vue-ui-galaxy-rYHDLCt9.js → vue-ui-galaxy-BKInqdOk.js} +11 -11
- package/dist/{vue-ui-gauge-Ba14Ybvo.js → vue-ui-gauge-DBPB11Eo.js} +7 -7
- package/dist/{vue-ui-gauge-Bmuasq4t.cjs → vue-ui-gauge-Uo_1rs0Z.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CuMablqV.js → vue-ui-gizmo-BSDdKP_q.js} +3 -3
- package/dist/{vue-ui-gizmo-CF11m0cq.cjs → vue-ui-gizmo-D7hHruEs.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BekQJ_O8.cjs → vue-ui-heatmap-CysVyR78.cjs} +1 -1
- package/dist/{vue-ui-heatmap-B0Ry1OTW.js → vue-ui-heatmap-DhoDd6I_.js} +10 -10
- package/dist/{vue-ui-history-plot-DkJdYX5N.js → vue-ui-history-plot-C1IcR5tn.js} +11 -11
- package/dist/{vue-ui-history-plot-BTVojhgQ.cjs → vue-ui-history-plot-D97p0C8E.cjs} +1 -1
- package/dist/{vue-ui-kpi-BQwuGH5_.js → vue-ui-kpi-C43FJnkn.js} +3 -3
- package/dist/{vue-ui-kpi-BLreWPBQ.cjs → vue-ui-kpi-Cu2PoWud.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C-61eqcR.cjs → vue-ui-mini-loader-Bdr0862F.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DOGNwMhX.js → vue-ui-mini-loader-DgPnsWaW.js} +2 -2
- package/dist/{vue-ui-molecule-BRM8s9SD.cjs → vue-ui-molecule-CEJzQ7RY.cjs} +1 -1
- package/dist/{vue-ui-molecule-DHBRDC8t.js → vue-ui-molecule-CvxtHapj.js} +11 -11
- package/dist/{vue-ui-mood-radar-dfN44AZx.js → vue-ui-mood-radar-B6EmzBGf.js} +11 -11
- package/dist/{vue-ui-mood-radar-MXQgj0yp.cjs → vue-ui-mood-radar-DIn_Oars.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-C-nDnw6v.js → vue-ui-nested-donuts-D4pAkaZH.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BAtJgYOg.cjs → vue-ui-nested-donuts-c2pJF_ex.cjs} +1 -1
- package/dist/{vue-ui-onion-D8OvxeHr.js → vue-ui-onion-98XPhnVF.js} +11 -11
- package/dist/{vue-ui-onion-EO8dPufp.cjs → vue-ui-onion-DHOhnx2s.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Cxl3bY0H.cjs → vue-ui-parallel-coordinate-plot-CrVVxflg.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-3BNXcNsy.js → vue-ui-parallel-coordinate-plot-DLOtv_NO.js} +12 -12
- package/dist/{vue-ui-quadrant-BOReLkSm.js → vue-ui-quadrant-DWM3zE7x.js} +12 -12
- package/dist/{vue-ui-quadrant-DiU08Q5X.cjs → vue-ui-quadrant-DbDQtcxz.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-D4UZCrzj.js → vue-ui-quick-chart-CFVAisN4.js} +214 -212
- package/dist/{vue-ui-quick-chart-BRERkFkI.cjs → vue-ui-quick-chart-DP0hSesI.cjs} +3 -3
- package/dist/{vue-ui-radar-DduWN5dL.cjs → vue-ui-radar-CDhwXWfs.cjs} +1 -1
- package/dist/{vue-ui-radar-C2ePOuIW.js → vue-ui-radar-CNBN5GF9.js} +12 -12
- package/dist/{vue-ui-rating-BYfD1N57.js → vue-ui-rating-CEfg8aGb.js} +2 -2
- package/dist/{vue-ui-rating-BtzMW1EB.cjs → vue-ui-rating-cHW6zh7i.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BKjs6DR1.js → vue-ui-relation-circle-92LvehQf.js} +7 -7
- package/dist/{vue-ui-relation-circle-DhLvWetz.cjs → vue-ui-relation-circle-olDAN0lU.cjs} +1 -1
- package/dist/{vue-ui-rings-BNwvxf2K.js → vue-ui-rings-Bp0WLW4E.js} +11 -11
- package/dist/{vue-ui-rings-CzZyxYeS.cjs → vue-ui-rings-BwvTmRCE.cjs} +1 -1
- package/dist/{vue-ui-scatter-thYwTZhC.js → vue-ui-scatter-6wDrQ5fP.js} +12 -12
- package/dist/{vue-ui-scatter-D3Cl-rFL.cjs → vue-ui-scatter-BvdgtUHX.cjs} +1 -1
- package/dist/{vue-ui-screenshot-9y8wYnc3.js → vue-ui-screenshot-CIAlcAvq.js} +1 -1
- package/dist/{vue-ui-screenshot-DFHP0ThC.cjs → vue-ui-screenshot-ChB7VFUO.cjs} +1 -1
- package/dist/{vue-ui-skeleton-B6hyEcxy.js → vue-ui-skeleton-BMRe3SzB.js} +3 -3
- package/dist/{vue-ui-skeleton-D56sSIBO.cjs → vue-ui-skeleton-DlnPFtb4.cjs} +1 -1
- package/dist/{vue-ui-smiley-B-4Fqh2J.js → vue-ui-smiley-CN5FWJ1G.js} +2 -2
- package/dist/{vue-ui-smiley-BsWAahKv.cjs → vue-ui-smiley-DkrQ5gDD.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-MAq0VlUq.cjs → vue-ui-spark-trend-BlOdnAb4.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DJcpI-ZY.js → vue-ui-spark-trend-MNkadB41.js} +5 -5
- package/dist/{vue-ui-sparkbar-DZqE8qN3.js → vue-ui-sparkbar-CBPO2mUa.js} +4 -4
- package/dist/{vue-ui-sparkbar-DMlzP8ZM.cjs → vue-ui-sparkbar-ChTbwY11.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CvOP9U7-.cjs → vue-ui-sparkgauge-B7yvQfZW.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-B-kRhMYK.js → vue-ui-sparkgauge-VLkIev3p.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-EOeboT7_.js → vue-ui-sparkhistogram-DbOxX4Ks.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-DjUvwlYU.cjs → vue-ui-sparkhistogram-mYU6RAK_.cjs} +1 -1
- package/dist/vue-ui-sparkline-DO496Tk5.cjs +1 -0
- package/dist/{vue-ui-sparkline-BgB5km-f.js → vue-ui-sparkline-D_-31O2S.js} +117 -114
- package/dist/{vue-ui-sparkstackbar-DSTz24kS.cjs → vue-ui-sparkstackbar-KaFMlIAL.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DGihKtGC.js → vue-ui-sparkstackbar-gW7rpJmQ.js} +5 -5
- package/dist/{vue-ui-stackbar-m-5t4Otk.cjs → vue-ui-stackbar-CYHsSzEK.cjs} +2 -2
- package/dist/{vue-ui-stackbar-DrJ3au6w.js → vue-ui-stackbar-vIyS6oag.js} +80 -78
- package/dist/{vue-ui-strip-plot-4uC5MD3e.js → vue-ui-strip-plot-4o1zAxG_.js} +11 -11
- package/dist/{vue-ui-strip-plot-Yy2DIoMg.cjs → vue-ui-strip-plot-MlP5pDNx.cjs} +1 -1
- package/dist/{vue-ui-table-DCe_BTaV.cjs → vue-ui-table-B0PFrkLI.cjs} +1 -1
- package/dist/{vue-ui-table-DN498EB2.js → vue-ui-table-DWNrd7zM.js} +1 -1
- package/dist/{vue-ui-table-heatmap-PvopeKyW.cjs → vue-ui-table-heatmap-4k74Ux7O.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CMVmFTPi.js → vue-ui-table-heatmap-BSKCS8Lq.js} +4 -4
- package/dist/{vue-ui-table-sparkline-DpXxi6al.js → vue-ui-table-sparkline-BrImSTh0.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BtUV0t4I.cjs → vue-ui-table-sparkline-DCCogh2-.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CB38vNj3.js → vue-ui-thermometer-DHEoT4yB.js} +7 -7
- package/dist/{vue-ui-thermometer-B9YyPrvt.cjs → vue-ui-thermometer-DswmMXiU.cjs} +1 -1
- package/dist/{vue-ui-timer-BmFFjMb9.js → vue-ui-timer-BNFihNgK.js} +5 -5
- package/dist/{vue-ui-timer-D6GsFvTy.cjs → vue-ui-timer-Tv94CYqL.cjs} +1 -1
- package/dist/{vue-ui-tiremarks--CrAFWU2.cjs → vue-ui-tiremarks-B2kuKLe-.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CJ2y_2T1.js → vue-ui-tiremarks-DzaUfiET.js} +7 -7
- package/dist/{vue-ui-treemap-HpoEGWKV.cjs → vue-ui-treemap-Dmt3RPF2.cjs} +1 -1
- package/dist/{vue-ui-treemap-Z3t2YGoE.js → vue-ui-treemap-qKZJcEYe.js} +11 -11
- package/dist/{vue-ui-vertical-bar-B_x2w4L8.js → vue-ui-vertical-bar-CMXtevyE.js} +11 -11
- package/dist/{vue-ui-vertical-bar-LdxXCg3W.cjs → vue-ui-vertical-bar-CQ_qEJ_O.cjs} +1 -1
- package/dist/{vue-ui-waffle-BKrNIOiM.js → vue-ui-waffle-DjJoezg-.js} +11 -11
- package/dist/{vue-ui-waffle-BDkOv8M4.cjs → vue-ui-waffle-fWQvVbAH.cjs} +1 -1
- package/dist/{vue-ui-wheel-DgzJQSl_.cjs → vue-ui-wheel-2qIHyZe1.cjs} +1 -1
- package/dist/{vue-ui-wheel-BCs1b_hk.js → vue-ui-wheel-DOrWSWt6.js} +7 -7
- package/dist/{vue-ui-word-cloud-BHm3q6eZ.cjs → vue-ui-word-cloud-Tgg5jCE6.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CO47t4OJ.js → vue-ui-word-cloud-UPPKGsXt.js} +10 -10
- package/dist/{vue-ui-xy-c7YLqedj.cjs → vue-ui-xy-CMde0Kq-.cjs} +3 -3
- package/dist/{vue-ui-xy-canvas-CY1JxJvm.cjs → vue-ui-xy-canvas-Dm3YUQ3g.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-Q6mKl1B-.js → vue-ui-xy-canvas-paHHRtqs.js} +227 -225
- package/dist/{vue-ui-xy-RDecyidx.js → vue-ui-xy-zCJv-Vao.js} +35 -33
- package/package.json +1 -1
- package/dist/Slicer-DGn72_0M.js +0 -423
- package/dist/Slicer-DMYxCNLb.cjs +0 -1
- package/dist/index-V6tl1xgQ.cjs +0 -9
- package/dist/vue-ui-dashboard-Q-ILTgqP.cjs +0 -1
- package/dist/vue-ui-sparkline-BS_ZXXei.cjs +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { computed as v, ref as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as K } from "./useNestedProp-
|
|
4
|
-
import
|
|
5
|
-
import { t as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
const
|
|
1
|
+
import { computed as v, ref as k, watch as U, onMounted as ne, openBlock as r, createElementBlock as i, normalizeStyle as C, renderSlot as M, normalizeProps as re, guardReactiveProps as ie, createElementVNode as f, toDisplayString as X, createCommentVNode as c, unref as h, createVNode as de, Fragment as D, renderList as P, createBlock as ve } from "vue";
|
|
2
|
+
import { u as ce, c as he, t as ye, C as Z, _ as T, o as fe, e as q, g as pe, w as I, $ as ge, a0 as me, X as ke, s as V, R as H, i as Y, f as J } from "./index-Z_vzxZTo.js";
|
|
3
|
+
import { u as K } from "./useNestedProp-Buhi5uyL.js";
|
|
4
|
+
import be from "./vue-ui-skeleton-BMRe3SzB.js";
|
|
5
|
+
import { t as _e, u as xe } from "./useResponsive-CoxXLe23.js";
|
|
6
|
+
import { _ as we } from "./PackageVersion-dR8EUy_P.js";
|
|
7
|
+
import { _ as $e } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const Le = ["id"], Ne = ["xmlns", "viewBox"], Ce = ["width", "height"], Me = ["id"], Ie = ["stop-color"], Ve = ["stop-color"], ze = ["id"], Se = ["stop-color"], We = ["stop-color"], Ae = ["id"], De = ["stop-color"], Pe = ["stop-color"], Te = { key: 1 }, Oe = ["d", "fill"], Be = ["d", "fill"], Ee = ["d", "stroke", "stroke-width"], Fe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ge = ["x", "y", "width", "height", "fill", "rx"], Re = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], je = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Ue = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Xe = ["x", "y", "font-size", "font-weight", "fill"], Ze = ["x", "y", "height", "width", "onMouseenter", "onClick"], qe = {
|
|
9
9
|
__name: "vue-ui-sparkline",
|
|
10
10
|
props: {
|
|
11
11
|
config: {
|
|
@@ -38,8 +38,8 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
emits: ["hoverIndex", "selectDatapoint"],
|
|
41
|
-
setup(_, { emit:
|
|
42
|
-
const s = _, { vue_ui_sparkline: Q } =
|
|
41
|
+
setup(_, { emit: z }) {
|
|
42
|
+
const s = _, { vue_ui_sparkline: Q } = ce(), $ = v(() => !!s.dataset && s.dataset.length), p = k(he()), S = k(null), O = k(null), B = k(null), e = v({
|
|
43
43
|
get: () => E(),
|
|
44
44
|
set: (t) => t
|
|
45
45
|
});
|
|
@@ -51,7 +51,7 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
51
51
|
let l = {};
|
|
52
52
|
return t.theme ? l = {
|
|
53
53
|
...K({
|
|
54
|
-
userConfig:
|
|
54
|
+
userConfig: ye.vue_ui_sparkline[t.theme] || s.config,
|
|
55
55
|
defaultConfig: t
|
|
56
56
|
})
|
|
57
57
|
} : l = t, s.config && Z(s.config, "style.scaleMin") ? l.style.scaleMin = s.config.style.scaleMin : l.style.scaleMin = null, s.config && Z(s.config, "style.scaleMax") ? l.style.scaleMax = s.config.style.scaleMax : l.style.scaleMax = null, l;
|
|
@@ -71,7 +71,7 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
71
71
|
threshold: e.value.downsample.threshold
|
|
72
72
|
});
|
|
73
73
|
}, { deep: !0 });
|
|
74
|
-
const b =
|
|
74
|
+
const b = k(ee());
|
|
75
75
|
function ee() {
|
|
76
76
|
return T({
|
|
77
77
|
data: s.dataset.map((t) => e.value.style.animation.show ? {
|
|
@@ -84,8 +84,8 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
84
84
|
threshold: e.value.downsample.threshold
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
const F =
|
|
88
|
-
|
|
87
|
+
const F = k(null);
|
|
88
|
+
ne(() => {
|
|
89
89
|
if (G(), e.value.style.animation.show && s.dataset.length > 1) {
|
|
90
90
|
let a = function() {
|
|
91
91
|
l < L.value.length ? (b.value.push(L.value[l]), setTimeout(() => {
|
|
@@ -99,11 +99,11 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
function G() {
|
|
102
|
-
if (
|
|
102
|
+
if (fe(s.dataset) ? q({
|
|
103
103
|
componentName: "VueUiSparkline",
|
|
104
104
|
type: "dataset"
|
|
105
105
|
}) : s.dataset.forEach((t, l) => {
|
|
106
|
-
|
|
106
|
+
pe({
|
|
107
107
|
datasetObject: t,
|
|
108
108
|
requiredAttributes: ["period", "value"]
|
|
109
109
|
}).forEach((a) => {
|
|
@@ -115,73 +115,76 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
117
|
}), e.value.responsive) {
|
|
118
|
-
const t =
|
|
119
|
-
const { width: l, height: a } =
|
|
120
|
-
chart:
|
|
118
|
+
const t = _e(() => {
|
|
119
|
+
const { width: l, height: a } = xe({
|
|
120
|
+
chart: S.value,
|
|
121
121
|
title: e.value.style.title.show && s.showInfo ? O.value : null,
|
|
122
122
|
source: B.value
|
|
123
123
|
});
|
|
124
124
|
u.value.width = l, u.value.height = a, u.value.chartWidth = e.value.style.chartWidth / 500 * l, u.value.padding = s.forcedPadding / 500 * l;
|
|
125
125
|
});
|
|
126
|
-
F.value = new ResizeObserver(t), F.value.observe(
|
|
126
|
+
F.value = new ResizeObserver(t), F.value.observe(S.value.parentNode);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
const u =
|
|
129
|
+
const u = k({
|
|
130
130
|
height: 80 * s.heightRatio,
|
|
131
131
|
width: 500,
|
|
132
132
|
chartWidth: e.value.style.chartWidth,
|
|
133
133
|
padding: s.forcedPadding
|
|
134
|
-
}),
|
|
135
|
-
top:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
134
|
+
}), o = v(() => {
|
|
135
|
+
const { top: t, right: l, bottom: a, left: n } = e.value.style.padding;
|
|
136
|
+
return {
|
|
137
|
+
top: t,
|
|
138
|
+
left: n,
|
|
139
|
+
right: u.value.width - l,
|
|
140
|
+
bottom: u.value.height - a,
|
|
141
|
+
start: s.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? u.value.width - u.value.chartWidth + n : u.value.padding + n,
|
|
142
|
+
width: s.showInfo && e.value.style.dataLabel.show ? u.value.chartWidth - n - l : u.value.width - u.value.padding - n - l,
|
|
143
|
+
height: u.value.height - t - a
|
|
144
|
+
};
|
|
145
|
+
}), W = v(() => [null, void 0].includes(e.value.style.scaleMin) ? Math.min(...b.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0)) : e.value.style.scaleMin), te = v(() => [null, void 0].includes(e.value.style.scaleMax) ? Math.max(...b.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0)) : e.value.style.scaleMax), x = v(() => {
|
|
146
|
+
const t = W.value >= 0 ? 0 : W.value;
|
|
144
147
|
return Math.abs(t);
|
|
145
|
-
}),
|
|
146
|
-
function
|
|
147
|
-
return t /
|
|
148
|
+
}), ae = v(() => te.value + x.value), N = v(() => o.value.bottom - o.value.height * A(x.value));
|
|
149
|
+
function A(t) {
|
|
150
|
+
return t / ae.value;
|
|
148
151
|
}
|
|
149
|
-
const g = v(() => L.value.length - 1),
|
|
152
|
+
const g = v(() => L.value.length - 1), d = v(() => b.value.map((t, l) => {
|
|
150
153
|
const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0;
|
|
151
154
|
return {
|
|
152
155
|
absoluteValue: a,
|
|
153
156
|
period: t.period,
|
|
154
157
|
plotValue: a + x.value,
|
|
155
|
-
toMax:
|
|
158
|
+
toMax: A(a + x.value),
|
|
156
159
|
x: o.value.start + l * (o.value.width / (g.value + 1) > u.padding ? u.padding : o.value.width / (g.value + 1)),
|
|
157
|
-
y: o.value.bottom - o.value.height *
|
|
160
|
+
y: o.value.bottom - o.value.height * A(a + x.value),
|
|
158
161
|
id: `plot_${p.value}_${l}`,
|
|
159
162
|
color: w.value ? e.value.style.bar.color : e.value.style.area.useGradient ? I(e.value.style.line.color, 0.05 * (1 - l / g.value)) : e.value.style.line.color,
|
|
160
163
|
width: o.value.width / (g.value + 1) > u.padding ? u.padding : o.value.width / (g.value + 1)
|
|
161
164
|
};
|
|
162
|
-
})),
|
|
163
|
-
const t = { x:
|
|
164
|
-
return
|
|
165
|
-
a.push(`${
|
|
165
|
+
})), le = v(() => {
|
|
166
|
+
const t = { x: d.value[0].x, y: u.value.height - 6 }, l = { x: d.value[d.value.length - 1].x, y: u.value.height - 6 }, a = [];
|
|
167
|
+
return d.value.forEach((n) => {
|
|
168
|
+
a.push(`${n.x},${n.y} `);
|
|
166
169
|
}), [t.x, t.y, ...a, l.x, l.y].toString();
|
|
167
|
-
}), y =
|
|
168
|
-
function
|
|
169
|
-
y.value = t,
|
|
170
|
+
}), y = k(void 0);
|
|
171
|
+
function ue(t, l) {
|
|
172
|
+
y.value = t, z("hoverIndex", { index: l });
|
|
170
173
|
}
|
|
171
|
-
function
|
|
172
|
-
y.value = void 0,
|
|
174
|
+
function se() {
|
|
175
|
+
y.value = void 0, z("hoverIndex", { index: void 0 });
|
|
173
176
|
}
|
|
174
|
-
const
|
|
177
|
+
const m = v(() => {
|
|
175
178
|
if ($.value) {
|
|
176
|
-
const t =
|
|
179
|
+
const t = d.value.map((a) => a.absoluteValue), l = t.reduce((a, n) => a + n, 0);
|
|
177
180
|
return {
|
|
178
|
-
latest:
|
|
181
|
+
latest: d.value[d.value.length - 1].absoluteValue,
|
|
179
182
|
sum: l,
|
|
180
|
-
average: l /
|
|
181
|
-
median:
|
|
182
|
-
trend:
|
|
183
|
+
average: l / d.value.length,
|
|
184
|
+
median: ge(t),
|
|
185
|
+
trend: me(d.value.map(({ x: a, y: n, absoluteValue: j }) => ({
|
|
183
186
|
x: a,
|
|
184
|
-
y:
|
|
187
|
+
y: n,
|
|
185
188
|
value: j
|
|
186
189
|
}))).trend
|
|
187
190
|
};
|
|
@@ -193,26 +196,26 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
193
196
|
median: null,
|
|
194
197
|
trend: null
|
|
195
198
|
};
|
|
196
|
-
}), R = v(() => $.value ? e.value.style.dataLabel.valueType === "latest" ?
|
|
197
|
-
function
|
|
198
|
-
|
|
199
|
+
}), R = v(() => $.value ? e.value.style.dataLabel.valueType === "latest" ? m.value.latest : e.value.style.dataLabel.valueType === "sum" ? m.value.sum : e.value.style.dataLabel.valueType === "average" ? m.value.average : 0 : 0), w = v(() => e.value.type && e.value.type === "bar");
|
|
200
|
+
function oe(t, l) {
|
|
201
|
+
z("selectDatapoint", { datapoint: t, index: l });
|
|
199
202
|
}
|
|
200
|
-
return (t, l) => (
|
|
203
|
+
return (t, l) => (r(), i("div", {
|
|
201
204
|
ref_key: "sparklineChart",
|
|
202
|
-
ref:
|
|
205
|
+
ref: S,
|
|
203
206
|
class: "vue-ui-sparkline",
|
|
204
207
|
id: p.value,
|
|
205
208
|
style: C(`width:100%;font-family:${e.value.style.fontFamily};`)
|
|
206
209
|
}, [
|
|
207
|
-
M(t.$slots, "before", ie(
|
|
210
|
+
M(t.$slots, "before", re(ie({
|
|
208
211
|
selected: y.value,
|
|
209
|
-
latest:
|
|
210
|
-
sum:
|
|
211
|
-
average:
|
|
212
|
-
median:
|
|
213
|
-
trend:
|
|
212
|
+
latest: m.value.latest,
|
|
213
|
+
sum: m.value.sum,
|
|
214
|
+
average: m.value.average,
|
|
215
|
+
median: m.value.median,
|
|
216
|
+
trend: m.value.trend
|
|
214
217
|
})), void 0, !0),
|
|
215
|
-
e.value.style.title.show && _.showInfo ? (
|
|
218
|
+
e.value.style.title.show && _.showInfo ? (r(), i("div", {
|
|
216
219
|
key: 0,
|
|
217
220
|
ref_key: "chartTitle",
|
|
218
221
|
ref: O,
|
|
@@ -223,14 +226,14 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
223
226
|
style: C(`padding:${e.value.style.title.textAlign === "left" ? "0 0 0 12px" : e.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
|
|
224
227
|
}, X(y.value ? y.value.period : e.value.style.title.text), 5)
|
|
225
228
|
], 4)) : c("", !0),
|
|
226
|
-
$.value ? (
|
|
229
|
+
$.value ? (r(), i("svg", {
|
|
227
230
|
key: 1,
|
|
228
|
-
xmlns: h(
|
|
231
|
+
xmlns: h(ke),
|
|
229
232
|
viewBox: `0 0 ${u.value.width} ${u.value.height}`,
|
|
230
|
-
style: C(`background:${e.value.style.backgroundColor};overflow:
|
|
233
|
+
style: C(`background:${e.value.style.backgroundColor};overflow:visible`)
|
|
231
234
|
}, [
|
|
232
|
-
|
|
233
|
-
t.$slots["chart-background"] ? (
|
|
235
|
+
de(we),
|
|
236
|
+
t.$slots["chart-background"] ? (r(), i("foreignObject", {
|
|
234
237
|
key: 0,
|
|
235
238
|
x: 0,
|
|
236
239
|
y: 0,
|
|
@@ -241,7 +244,7 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
241
244
|
}
|
|
242
245
|
}, [
|
|
243
246
|
M(t.$slots, "chart-background", {}, void 0, !0)
|
|
244
|
-
], 8,
|
|
247
|
+
], 8, Ce)) : c("", !0),
|
|
245
248
|
f("defs", null, [
|
|
246
249
|
f("linearGradient", {
|
|
247
250
|
x1: "0%",
|
|
@@ -252,13 +255,13 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
252
255
|
}, [
|
|
253
256
|
f("stop", {
|
|
254
257
|
offset: "0%",
|
|
255
|
-
"stop-color": h(
|
|
256
|
-
}, null, 8,
|
|
258
|
+
"stop-color": h(V)(h(I)(e.value.style.area.color, 0.05), e.value.style.area.opacity)
|
|
259
|
+
}, null, 8, Ie),
|
|
257
260
|
f("stop", {
|
|
258
261
|
offset: "100%",
|
|
259
|
-
"stop-color": h(
|
|
262
|
+
"stop-color": h(V)(e.value.style.area.color, e.value.style.area.opacity)
|
|
260
263
|
}, null, 8, Ve)
|
|
261
|
-
], 8,
|
|
264
|
+
], 8, Me),
|
|
262
265
|
f("linearGradient", {
|
|
263
266
|
x2: "0%",
|
|
264
267
|
y2: "100%",
|
|
@@ -285,42 +288,42 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
285
288
|
f("stop", {
|
|
286
289
|
offset: "100%",
|
|
287
290
|
"stop-color": e.value.style.bar.color
|
|
288
|
-
}, null, 8,
|
|
291
|
+
}, null, 8, Pe)
|
|
289
292
|
], 8, Ae)
|
|
290
293
|
]),
|
|
291
|
-
e.value.style.area.show && !w.value &&
|
|
292
|
-
e.value.style.line.smooth ? (
|
|
294
|
+
e.value.style.area.show && !w.value && d.value[0] ? (r(), i("g", Te, [
|
|
295
|
+
e.value.style.line.smooth ? (r(), i("path", {
|
|
293
296
|
key: 0,
|
|
294
|
-
d: `M ${
|
|
295
|
-
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : h(
|
|
296
|
-
}, null, 8,
|
|
297
|
+
d: `M ${d.value[0].x},${o.value.bottom} ${h(H)(d.value)} L ${d.value.at(-1).x},${o.value.bottom} Z`,
|
|
298
|
+
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : h(V)(e.value.style.area.color, e.value.style.area.opacity)
|
|
299
|
+
}, null, 8, Oe)) : (r(), i("path", {
|
|
297
300
|
key: 1,
|
|
298
|
-
d: `M${
|
|
299
|
-
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : h(
|
|
300
|
-
}, null, 8,
|
|
301
|
+
d: `M${le.value}Z`,
|
|
302
|
+
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : h(V)(e.value.style.area.color, e.value.style.area.opacity)
|
|
303
|
+
}, null, 8, Be))
|
|
301
304
|
])) : c("", !0),
|
|
302
|
-
e.value.style.line.smooth && !w.value ? (
|
|
305
|
+
e.value.style.line.smooth && !w.value ? (r(), i("path", {
|
|
303
306
|
key: 2,
|
|
304
|
-
d: `M ${h(H)(
|
|
307
|
+
d: `M ${h(H)(d.value)}`,
|
|
305
308
|
stroke: e.value.style.line.color,
|
|
306
309
|
fill: "none",
|
|
307
310
|
"stroke-width": e.value.style.line.strokeWidth,
|
|
308
311
|
"stroke-linecap": "round"
|
|
309
|
-
}, null, 8,
|
|
310
|
-
(
|
|
311
|
-
|
|
312
|
+
}, null, 8, Ee)) : c("", !0),
|
|
313
|
+
(r(!0), i(D, null, P(d.value, (a, n) => (r(), i("g", null, [
|
|
314
|
+
n < d.value.length - 1 && !e.value.style.line.smooth && !w.value ? (r(), i("line", {
|
|
312
315
|
key: 0,
|
|
313
316
|
x1: a.x,
|
|
314
|
-
x2:
|
|
317
|
+
x2: d.value[n + 1].x,
|
|
315
318
|
y1: a.y,
|
|
316
|
-
y2:
|
|
319
|
+
y2: d.value[n + 1].y,
|
|
317
320
|
stroke: a.color,
|
|
318
321
|
"stroke-width": e.value.style.line.strokeWidth,
|
|
319
322
|
"stroke-linecap": "round",
|
|
320
323
|
"stroke-linejoin": "round",
|
|
321
324
|
"shape-rendering": "geometricPrecision"
|
|
322
|
-
}, null, 8,
|
|
323
|
-
w.value ? (
|
|
325
|
+
}, null, 8, Fe)) : c("", !0),
|
|
326
|
+
w.value ? (r(), i("rect", {
|
|
324
327
|
key: 1,
|
|
325
328
|
x: a.x - a.width / 2,
|
|
326
329
|
y: a.absoluteValue > 0 ? a.y : N.value,
|
|
@@ -328,8 +331,8 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
328
331
|
height: Math.abs(a.y - N.value),
|
|
329
332
|
fill: a.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${p.value})` : `url(#sparkline_bar_gradient_neg_${p.value})`,
|
|
330
333
|
rx: e.value.style.bar.borderRadius
|
|
331
|
-
}, null, 8,
|
|
332
|
-
e.value.style.verticalIndicator.show && (y.value && a.id === y.value.id || _.selectedIndex ===
|
|
334
|
+
}, null, 8, Ge)) : c("", !0),
|
|
335
|
+
e.value.style.verticalIndicator.show && (y.value && a.id === y.value.id || _.selectedIndex === n) ? (r(), i("line", {
|
|
333
336
|
key: 2,
|
|
334
337
|
x1: a.x,
|
|
335
338
|
x2: a.x,
|
|
@@ -339,9 +342,9 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
339
342
|
"stroke-width": e.value.style.verticalIndicator.strokeWidth,
|
|
340
343
|
"stroke-linecap": "round",
|
|
341
344
|
"stroke-dasharray": e.value.style.verticalIndicator.strokeDasharray || 0
|
|
342
|
-
}, null, 8,
|
|
345
|
+
}, null, 8, Re)) : c("", !0)
|
|
343
346
|
]))), 256)),
|
|
344
|
-
|
|
347
|
+
W.value < 0 ? (r(), i("line", {
|
|
345
348
|
key: 3,
|
|
346
349
|
x1: o.value.start,
|
|
347
350
|
x2: o.value.start + o.value.width - 16,
|
|
@@ -351,9 +354,9 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
351
354
|
"stroke-dasharray": e.value.style.zeroLine.strokeWidth * 2,
|
|
352
355
|
"stroke-width": e.value.style.zeroLine.strokeWidth,
|
|
353
356
|
"stroke-linecap": "round"
|
|
354
|
-
}, null, 8,
|
|
355
|
-
e.value.style.plot.show ? (
|
|
356
|
-
y.value && a.id === y.value.id || _.selectedIndex ===
|
|
357
|
+
}, null, 8, je)) : c("", !0),
|
|
358
|
+
e.value.style.plot.show ? (r(!0), i(D, { key: 4 }, P(d.value, (a, n) => (r(), i("g", null, [
|
|
359
|
+
y.value && a.id === y.value.id || _.selectedIndex === n ? (r(), i("circle", {
|
|
357
360
|
key: 0,
|
|
358
361
|
cx: a.x,
|
|
359
362
|
cy: a.y,
|
|
@@ -361,9 +364,9 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
361
364
|
fill: a.color,
|
|
362
365
|
stroke: e.value.style.plot.stroke,
|
|
363
366
|
"stroke-width": e.value.style.plot.strokeWidth
|
|
364
|
-
}, null, 8,
|
|
367
|
+
}, null, 8, Ue)) : c("", !0)
|
|
365
368
|
]))), 256)) : c("", !0),
|
|
366
|
-
_.showInfo && e.value.style.dataLabel.show ? (
|
|
369
|
+
_.showInfo && e.value.style.dataLabel.show ? (r(), i("text", {
|
|
367
370
|
key: 5,
|
|
368
371
|
x: e.value.style.dataLabel.position === "left" ? 12 + e.value.style.dataLabel.offsetX : o.value.width + 12 + e.value.style.dataLabel.offsetX,
|
|
369
372
|
y: u.value.height / 2 + e.value.style.dataLabel.fontSize / 2.5 + e.value.style.dataLabel.offsetY,
|
|
@@ -379,20 +382,20 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
379
382
|
e.value.style.dataLabel.formatter,
|
|
380
383
|
R.value,
|
|
381
384
|
h(J)({ p: e.value.style.dataLabel.prefix, v: R.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })
|
|
382
|
-
)), 9,
|
|
383
|
-
(
|
|
385
|
+
)), 9, Xe)) : c("", !0),
|
|
386
|
+
(r(!0), i(D, null, P(d.value, (a, n) => (r(), i("rect", {
|
|
384
387
|
x: a.x - (o.value.width / (g.value + 1) > u.value.padding ? u.value.padding : o.value.width / (g.value + 1)) / 2,
|
|
385
388
|
y: o.value.top - 6,
|
|
386
389
|
height: o.value.height + 6,
|
|
387
390
|
width: o.value.width / (g.value + 1) > u.value.padding ? u.value.padding : o.value.width / (g.value + 1),
|
|
388
391
|
fill: "transparent",
|
|
389
|
-
onMouseenter: (j) =>
|
|
390
|
-
onMouseleave:
|
|
391
|
-
onClick: () =>
|
|
392
|
-
}, null, 40,
|
|
392
|
+
onMouseenter: (j) => ue(a, n),
|
|
393
|
+
onMouseleave: se,
|
|
394
|
+
onClick: () => oe(a, n)
|
|
395
|
+
}, null, 40, Ze))), 256)),
|
|
393
396
|
M(t.$slots, "svg", { svg: u.value }, void 0, !0)
|
|
394
|
-
], 12,
|
|
395
|
-
t.$slots.source ? (
|
|
397
|
+
], 12, Ne)) : c("", !0),
|
|
398
|
+
t.$slots.source ? (r(), i("div", {
|
|
396
399
|
key: 2,
|
|
397
400
|
ref_key: "source",
|
|
398
401
|
ref: B,
|
|
@@ -400,7 +403,7 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
400
403
|
}, [
|
|
401
404
|
M(t.$slots, "source", {}, void 0, !0)
|
|
402
405
|
], 512)) : c("", !0),
|
|
403
|
-
$.value ? c("", !0) : (
|
|
406
|
+
$.value ? c("", !0) : (r(), ve(be, {
|
|
404
407
|
key: 3,
|
|
405
408
|
config: {
|
|
406
409
|
type: "sparkline",
|
|
@@ -412,9 +415,9 @@ const Ne = ["id"], Ce = ["xmlns", "viewBox"], Me = ["width", "height"], Ie = ["i
|
|
|
412
415
|
}
|
|
413
416
|
}
|
|
414
417
|
}, null, 8, ["config"]))
|
|
415
|
-
], 12,
|
|
418
|
+
], 12, Le));
|
|
416
419
|
}
|
|
417
|
-
},
|
|
420
|
+
}, at = /* @__PURE__ */ $e(qe, [["__scopeId", "data-v-792e1bb5"]]);
|
|
418
421
|
export {
|
|
419
|
-
|
|
422
|
+
at as default
|
|
420
423
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-V6tl1xgQ.cjs"),V=require("./useNestedProp--db71Vbu.cjs"),q=require("./vue-ui-skeleton-D56sSIBO.cjs"),O=require("./PackageVersion-B7-YDa6h.cjs"),U=require("./Tooltip-DZ1uTqBW.cjs"),M=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["xmlns","viewBox"],H=["id"],I=["stop-color"],R=["stop-color"],W=["stop-color"],Y={id:"stackPill",clipPathUnits:"objectBoundingBox"},G=["fill"],X={key:0,"clip-path":"url(#stackPill)"},J=["x","width","height","fill"],K=["x","width","height","fill","stroke"],Q=["onClick","x","width","height","onMouseenter"],Z=["width","height","rx"],ee=["onClick"],te={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},le=["height","width"],oe=["fill"],ae={key:4,ref:"source",dir:"auto"},re={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(P,{emit:D}){const u=P,{vue_ui_sparkstackbar:L}=a.useConfig(),F=e.useSlots();e.onMounted(()=>{F["chart-background"]&&console.warn("VueUiSparkStackbar does not support the #chart-background slot.")});const x=e.computed(()=>!!u.dataset&&u.dataset.length),B=e.ref(null),S=e.ref(a.createUid()),b=e.ref(!1),_=e.ref(""),t=e.computed({get:()=>$(),set:l=>l});function $(){const l=V.useNestedProp({userConfig:u.config,defaultConfig:L});return l.theme?{...V.useNestedProp({userConfig:a.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}e.watch(()=>u.config,l=>{t.value=$(),E()},{deep:!0}),e.watch(()=>u.dataset,l=>{v.value=u.dataset.map((n,o)=>({...n,color:n.color?a.convertColorToHex(n.color):f.value[o]||a.palette[o]||a.palette[o%a.palette.length]}))},{deep:!0});const f=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),v=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?a.convertColorToHex(l.color):f.value[n]||a.palette[n]||a.palette[n%a.palette.length]}))),g=e.ref(!0);e.onMounted(()=>{if(E(),t.value.style.animation.show){let p=function(){r+=o/l,r<o?(v.value=v.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?a.convertColorToHex(s.color):f.value[i]||a.palette[i]||a.palette[i%a.palette.length]})),requestAnimationFrame(p)):(g.value=!1,v.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?a.convertColorToHex(s.color):f.value[i]||a.palette[i]||a.palette[i%a.palette.length],id:a.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),o=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;g.value=!0,p()}});function E(){a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{a.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(o=>{a.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:o,index:n})})})}const c=e.ref({width:500,height:16}),d=e.ref([]),N=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!d.value.includes(n)).reduce((l,n)=>l+n,0)),y=e.computed(()=>v.value.map((l,n)=>{const o=l.value||0,r=o/N.value,p=isNaN(r)?0:r,s=p*c.value.width;return{...l,value:o,proportion:p,width:s,proportionLabel:a.dataLabel({v:p*100,s:"%",r:t.value.style.legend.percentage.rounding})}})),C=e.computed(()=>y.value.filter((l,n)=>!d.value.includes(n)));function T(l){d.value.includes(l)?d.value=d.value.filter(n=>n!==l):d.value.length<v.value.length-1&&d.value.push(l)}const h=e.computed(()=>{let l=0;const n=[];for(let o=0;o<C.value.length;o+=1)n.push({...C.value[o],start:l}),l+=C.value[o].width;return n});function z(l,n){D("selectDatapoint",{datapoint:l,index:n})}const w=e.ref(null),k=e.ref(!1),m=e.ref(null);function A({datapoint:l,seriesIndex:n}){if(!t.value.style.tooltip.show)return;w.value={datapoint:l,seriesIndex:n,config:t.value,series:y.value},b.value=!0,m.value=n;const o=t.value.style.tooltip.customFormat;if(a.isFunction(o))try{const r=o({seriesIndex:n,datapoint:l,series:y.value,config:t.value});typeof r=="string"&&(_.value=r,k.value=!0)}catch{console.warn("Custom format cannot be applied."),k.value=!1}if(!k.value){let r="";r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,r+=`<b>${l.proportionLabel}</b>`,r+=`<span>(${a.applyDataLabel(t.value.style.legend.value.formatter,l.value,a.dataLabel({p:t.value.style.legend.value.prefix,v:l.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:l,seriesIndex:n})})</span>`,_.value=`<div>${r}</div>`}}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparkstackbarChart",ref:B,style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;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.toDisplayString(t.value.style.title.text),5),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),x.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),width:"100%",viewBox:`0 0 ${c.value.width} ${c.value.height}`},[e.createVNode(O._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${S.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,I),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(o.color,.05),100-t.value.style.bar.gradient.intensity)},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,W)],8,H))),128)),e.createElementVNode("clipPath",Y,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,G)])]),N.value>0?(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_underlayer_${r}`,x:o.start,y:0,width:o.width,height:c.value.height,fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!g.value}),style:e.normalizeStyle({opacity:m.value!==null&&t.value.style.tooltip.show?m.value===r?1:.5:1})},null,14,J))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,x:o.start,y:0,width:o.width,height:c.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${S.value})`:o.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!g.value}),style:e.normalizeStyle({opacity:m.value!==null&&t.value.style.tooltip.show?m.value===r?1:.5:1})},null,14,K))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_trap_${r}`,onClick:()=>z(o,r),x:o.start,y:0,width:o.width,height:c.value.height,fill:"transparent",stroke:"none",class:e.normalizeClass({animated:!g.value}),onMouseenter:()=>A({datapoint:o,seriesIndex:r}),onMouseleave:n[0]||(n[0]=p=>{b.value=!1,m.value=null})},null,42,Q))),128))])):(e.openBlock(),e.createElementBlock("rect",{key:1,x:2,y:1,width:c.value.width-4,height:c.value.height-2,stroke:"#CCCCCC","stroke-width":"2",fill:"transparent",rx:(c.value.height-4)/2},null,8,Z))],8,j)):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(q.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:transparent;margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(o,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":d.value.includes(r)}),onClick:p=>{T(r),z(o,r)}},[e.createElementVNode("div",te,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:o.color},null,8,oe)],8,le)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(o.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(d.value.includes(r)?" - ":o.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.legend.value.formatter,o.value,e.unref(a.dataLabel)({p:t.value.style.legend.value.prefix,v:o.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:o,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,ee))),256))],4)):e.createCommentVNode("",!0),e.createVNode(U._sfc_main,{show:b.value&&t.value.style.tooltip.show,parent:B.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,fontSize:t.value.style.tooltip.fontSize,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,content:_.value,isCustom:k.value,offsetY:-124+t.value.style.tooltip.offsetY,blockShiftY:!0},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...w.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...w.value})),void 0,!0)]),_:3},8,["show","parent","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","content","isCustom","offsetY"]),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ae,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],4))}},ne=M._export_sfc(re,[["__scopeId","data-v-72244c73"]]);exports.default=ne;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-ChOY3hT9.cjs"),V=require("./useNestedProp-CA8PjFJH.cjs"),q=require("./vue-ui-skeleton-DlnPFtb4.cjs"),O=require("./PackageVersion-eZ5Dmuid.cjs"),U=require("./Tooltip-Dz4wVJkz.cjs"),M=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["xmlns","viewBox"],H=["id"],I=["stop-color"],R=["stop-color"],W=["stop-color"],Y={id:"stackPill",clipPathUnits:"objectBoundingBox"},G=["fill"],X={key:0,"clip-path":"url(#stackPill)"},J=["x","width","height","fill"],K=["x","width","height","fill","stroke"],Q=["onClick","x","width","height","onMouseenter"],Z=["width","height","rx"],ee=["onClick"],te={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},le=["height","width"],oe=["fill"],ae={key:4,ref:"source",dir:"auto"},re={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(P,{emit:D}){const u=P,{vue_ui_sparkstackbar:L}=a.useConfig(),F=e.useSlots();e.onMounted(()=>{F["chart-background"]&&console.warn("VueUiSparkStackbar does not support the #chart-background slot.")});const x=e.computed(()=>!!u.dataset&&u.dataset.length),B=e.ref(null),S=e.ref(a.createUid()),b=e.ref(!1),_=e.ref(""),t=e.computed({get:()=>$(),set:l=>l});function $(){const l=V.useNestedProp({userConfig:u.config,defaultConfig:L});return l.theme?{...V.useNestedProp({userConfig:a.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}e.watch(()=>u.config,l=>{t.value=$(),E()},{deep:!0}),e.watch(()=>u.dataset,l=>{v.value=u.dataset.map((n,o)=>({...n,color:n.color?a.convertColorToHex(n.color):f.value[o]||a.palette[o]||a.palette[o%a.palette.length]}))},{deep:!0});const f=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),v=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?a.convertColorToHex(l.color):f.value[n]||a.palette[n]||a.palette[n%a.palette.length]}))),g=e.ref(!0);e.onMounted(()=>{if(E(),t.value.style.animation.show){let p=function(){r+=o/l,r<o?(v.value=v.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?a.convertColorToHex(s.color):f.value[i]||a.palette[i]||a.palette[i%a.palette.length]})),requestAnimationFrame(p)):(g.value=!1,v.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?a.convertColorToHex(s.color):f.value[i]||a.palette[i]||a.palette[i%a.palette.length],id:a.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),o=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;g.value=!0,p()}});function E(){a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{a.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(o=>{a.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:o,index:n})})})}const c=e.ref({width:500,height:16}),d=e.ref([]),N=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!d.value.includes(n)).reduce((l,n)=>l+n,0)),y=e.computed(()=>v.value.map((l,n)=>{const o=l.value||0,r=o/N.value,p=isNaN(r)?0:r,s=p*c.value.width;return{...l,value:o,proportion:p,width:s,proportionLabel:a.dataLabel({v:p*100,s:"%",r:t.value.style.legend.percentage.rounding})}})),C=e.computed(()=>y.value.filter((l,n)=>!d.value.includes(n)));function T(l){d.value.includes(l)?d.value=d.value.filter(n=>n!==l):d.value.length<v.value.length-1&&d.value.push(l)}const h=e.computed(()=>{let l=0;const n=[];for(let o=0;o<C.value.length;o+=1)n.push({...C.value[o],start:l}),l+=C.value[o].width;return n});function z(l,n){D("selectDatapoint",{datapoint:l,index:n})}const w=e.ref(null),k=e.ref(!1),m=e.ref(null);function A({datapoint:l,seriesIndex:n}){if(!t.value.style.tooltip.show)return;w.value={datapoint:l,seriesIndex:n,config:t.value,series:y.value},b.value=!0,m.value=n;const o=t.value.style.tooltip.customFormat;if(a.isFunction(o))try{const r=o({seriesIndex:n,datapoint:l,series:y.value,config:t.value});typeof r=="string"&&(_.value=r,k.value=!0)}catch{console.warn("Custom format cannot be applied."),k.value=!1}if(!k.value){let r="";r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,r+=`<b>${l.proportionLabel}</b>`,r+=`<span>(${a.applyDataLabel(t.value.style.legend.value.formatter,l.value,a.dataLabel({p:t.value.style.legend.value.prefix,v:l.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:l,seriesIndex:n})})</span>`,_.value=`<div>${r}</div>`}}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparkstackbarChart",ref:B,style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;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.toDisplayString(t.value.style.title.text),5),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),x.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),width:"100%",viewBox:`0 0 ${c.value.width} ${c.value.height}`},[e.createVNode(O._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${S.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,I),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(o.color,.05),100-t.value.style.bar.gradient.intensity)},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,W)],8,H))),128)),e.createElementVNode("clipPath",Y,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,G)])]),N.value>0?(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_underlayer_${r}`,x:o.start,y:0,width:o.width,height:c.value.height,fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!g.value}),style:e.normalizeStyle({opacity:m.value!==null&&t.value.style.tooltip.show?m.value===r?1:.5:1})},null,14,J))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,x:o.start,y:0,width:o.width,height:c.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${S.value})`:o.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!g.value}),style:e.normalizeStyle({opacity:m.value!==null&&t.value.style.tooltip.show?m.value===r?1:.5:1})},null,14,K))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_trap_${r}`,onClick:()=>z(o,r),x:o.start,y:0,width:o.width,height:c.value.height,fill:"transparent",stroke:"none",class:e.normalizeClass({animated:!g.value}),onMouseenter:()=>A({datapoint:o,seriesIndex:r}),onMouseleave:n[0]||(n[0]=p=>{b.value=!1,m.value=null})},null,42,Q))),128))])):(e.openBlock(),e.createElementBlock("rect",{key:1,x:2,y:1,width:c.value.width-4,height:c.value.height-2,stroke:"#CCCCCC","stroke-width":"2",fill:"transparent",rx:(c.value.height-4)/2},null,8,Z))],8,j)):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(q.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:transparent;margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(o,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":d.value.includes(r)}),onClick:p=>{T(r),z(o,r)}},[e.createElementVNode("div",te,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:o.color},null,8,oe)],8,le)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(o.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(d.value.includes(r)?" - ":o.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.legend.value.formatter,o.value,e.unref(a.dataLabel)({p:t.value.style.legend.value.prefix,v:o.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:o,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,ee))),256))],4)):e.createCommentVNode("",!0),e.createVNode(U._sfc_main,{show:b.value&&t.value.style.tooltip.show,parent:B.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,fontSize:t.value.style.tooltip.fontSize,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,content:_.value,isCustom:k.value,offsetY:-124+t.value.style.tooltip.offsetY,blockShiftY:!0},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...w.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...w.value})),void 0,!0)]),_:3},8,["show","parent","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","content","isCustom","offsetY"]),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ae,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],4))}},ne=M._export_sfc(re,[["__scopeId","data-v-72244c73"]]);exports.default=ne;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useSlots as ne, onMounted as Y, computed as m, ref as d, watch as G, openBlock as s, createElementBlock as r, normalizeStyle as v, createElementVNode as p, toDisplayString as w, createCommentVNode as y, unref as C, createVNode as q, Fragment as x, renderList as $, normalizeClass as F, createBlock as ue, withCtx as H, renderSlot as U, normalizeProps as X, guardReactiveProps as J } from "vue";
|
|
2
|
-
import { u as ie, c as K, t as ce, a as de, p as i, d as N, b as ve, o as pe, e as Q, g as ge, f as V, X as fe, s as he, w as ye, i as Z, x as me } from "./index-
|
|
3
|
-
import { u as ee } from "./useNestedProp-
|
|
4
|
-
import ke from "./vue-ui-skeleton-
|
|
5
|
-
import { _ as be } from "./PackageVersion-
|
|
6
|
-
import { _ as _e } from "./Tooltip-
|
|
2
|
+
import { u as ie, c as K, t as ce, a as de, p as i, d as N, b as ve, o as pe, e as Q, g as ge, f as V, X as fe, s as he, w as ye, i as Z, x as me } from "./index-Z_vzxZTo.js";
|
|
3
|
+
import { u as ee } from "./useNestedProp-Buhi5uyL.js";
|
|
4
|
+
import ke from "./vue-ui-skeleton-BMRe3SzB.js";
|
|
5
|
+
import { _ as be } from "./PackageVersion-dR8EUy_P.js";
|
|
6
|
+
import { _ as _e } from "./Tooltip-BK-ACGDE.js";
|
|
7
7
|
import { _ as we } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const Ce = ["xmlns", "viewBox"], xe = ["id"], $e = ["stop-color"], Se = ["stop-color"], ze = ["stop-color"], Pe = {
|
|
9
9
|
id: "stackPill",
|