vue-data-ui 2.6.5 → 2.6.7
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-DfGZcZu4.js → Arrow-BxUmDF04.js} +1 -1
- package/dist/{Arrow-CyeGXbbD.cjs → Arrow-PPbxds1Q.cjs} +1 -1
- package/dist/{BaseIcon-B5DvqSYe.cjs → BaseIcon-BmVwfJg2.cjs} +1 -1
- package/dist/{BaseIcon-BzuvxztF.js → BaseIcon-CDx9pxUG.js} +1 -1
- package/dist/{DataTable-zpYtivMM.cjs → DataTable-Cv_TVAas.cjs} +1 -1
- package/dist/{DataTable-BCCBpyhr.js → DataTable-TjJIVFlL.js} +2 -2
- package/dist/{Legend-CJkkmRNE.cjs → Legend-DunrYGuw.cjs} +1 -1
- package/dist/{Legend-CyJrN721.js → Legend-NKGwxkI7.js} +2 -2
- package/dist/{PackageVersion-Dv25_ZxF.cjs → PackageVersion-DJKkRuOD.cjs} +1 -1
- package/dist/{PackageVersion-PZr4BkQ5.js → PackageVersion-QRvxRYPv.js} +1 -1
- package/dist/{PenAndPaper-Cniu2YEX.js → PenAndPaper-CxC1lWGK.js} +3 -3
- package/dist/{PenAndPaper-Cx3_Liuv.cjs → PenAndPaper-MTTJ3Gd9.cjs} +1 -1
- package/dist/{Shape-BXTmpde5.js → Shape-58uyOuYc.js} +26 -23
- package/dist/Shape-D_1vUjCL.cjs +1 -0
- package/dist/{Slicer-DzKrIvL0.cjs → Slicer-BGEieXKn.cjs} +1 -1
- package/dist/{Slicer-D3tEQT9Z.js → Slicer-C7ormJRw.js} +2 -2
- package/dist/{Title-CXBc1TH6.js → Title-BI8etrRU.js} +1 -1
- package/dist/{Title-DdUtciJN.cjs → Title-Dk92HYMu.cjs} +1 -1
- package/dist/Tooltip-ClMeqejQ.cjs +1 -0
- package/dist/{Tooltip-C9lPh5bN.js → Tooltip-Cxc8c50d.js} +23 -20
- package/dist/{index-DLCyjPV0.js → index-9EeNZMz1.js} +6 -1
- package/dist/index-DEnRHTzk.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +89 -62
- package/dist/types/vue-data-ui.d.ts +89 -62
- package/dist/useChartAccessibility-BWojgys7.js +13 -0
- package/dist/useChartAccessibility-Cm7nkzTG.cjs +1 -0
- package/dist/{useNestedProp-BdTohsDJ.cjs → useNestedProp-BNT60LxO.cjs} +1 -1
- package/dist/{useNestedProp-q86V3_LA.js → useNestedProp-df_bKQEI.js} +1 -1
- package/dist/{usePrinter-CPqTP09H.cjs → usePrinter-dyVny55M.cjs} +1 -1
- package/dist/{usePrinter-CpHZjw3G.js → usePrinter-ngrh00Ym.js} +1 -1
- package/dist/{vue-data-ui-CR9Dof80.cjs → vue-data-ui-BYX-I7HQ.cjs} +1 -1
- package/dist/{vue-data-ui-CzqznXmA.js → vue-data-ui-CDD7JcMs.js} +61 -61
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DvHdA_uo.js → vue-ui-3d-bar-BArLjlrc.js} +171 -168
- package/dist/vue-ui-3d-bar-DegdXf_S.cjs +19 -0
- package/dist/{vue-ui-accordion-FM16tlk7.cjs → vue-ui-accordion-D2qxHGzp.cjs} +1 -1
- package/dist/{vue-ui-accordion-DR2qjfsa.js → vue-ui-accordion-Qo8JxnIN.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BoXxK9_W.js → vue-ui-age-pyramid-Biz02m7c.js} +85 -82
- package/dist/vue-ui-age-pyramid-kpaaJ2Gx.cjs +1 -0
- package/dist/{vue-ui-annotator-5tI8NuFh.cjs → vue-ui-annotator-By6XNYm0.cjs} +1 -1
- package/dist/{vue-ui-annotator-D4kCCpAK.js → vue-ui-annotator-MXs48Lua.js} +1 -1
- package/dist/{vue-ui-bullet-X3Xa_OZ6.js → vue-ui-bullet-CtBs_r3I.js} +92 -89
- package/dist/vue-ui-bullet-Dkz6vX0T.cjs +34 -0
- package/dist/vue-ui-candlestick-DiEUIuW8.cjs +2 -0
- package/dist/{vue-ui-candlestick-BTW5toA5.js → vue-ui-candlestick-gPztmuJE.js} +155 -152
- package/dist/{vue-ui-carousel-table-Cmnwv9Y3.cjs → vue-ui-carousel-table-CYeXP21y.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-D7s_SrJR.js → vue-ui-carousel-table-D9ckYNKZ.js} +4 -4
- package/dist/{vue-ui-chestnut-DN9EZShg.js → vue-ui-chestnut-DWjn-jcN.js} +186 -183
- package/dist/vue-ui-chestnut-oZtRERnV.cjs +6 -0
- package/dist/{vue-ui-circle-pack-ts3rurGX.js → vue-ui-circle-pack-Bz5yVvAM.js} +99 -96
- package/dist/vue-ui-circle-pack-DCJ6N00S.cjs +1 -0
- package/dist/{vue-ui-cursor-SW96fYT3.js → vue-ui-cursor-BrrVDy1u.js} +2 -2
- package/dist/{vue-ui-cursor-CpWkrHpR.cjs → vue-ui-cursor-DZhRygRy.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BZcfgajg.js → vue-ui-dashboard-DEmGN8Js.js} +2 -2
- package/dist/{vue-ui-dashboard-Buh9xBz-.cjs → vue-ui-dashboard-o8Ju_cXW.cjs} +1 -1
- package/dist/{vue-ui-digits-rB78vJRR.cjs → vue-ui-digits-CgyYdrQ5.cjs} +1 -1
- package/dist/{vue-ui-digits-C00yOT24.js → vue-ui-digits-DbOrROu7.js} +2 -2
- package/dist/vue-ui-donut-9pWaRwf3.cjs +1 -0
- package/dist/{vue-ui-donut-BkGR2Q-_.js → vue-ui-donut-CP5uWglM.js} +158 -156
- package/dist/{vue-ui-donut-evolution-B7WrjiTO.js → vue-ui-donut-evolution-BAMD1wQ5.js} +133 -131
- package/dist/vue-ui-donut-evolution-Ci_gIrkO.cjs +1 -0
- package/dist/{vue-ui-dumbbell-gQadUH53.js → vue-ui-dumbbell-CFYd-Ypn.js} +125 -122
- package/dist/vue-ui-dumbbell-DUNYoZxT.cjs +9 -0
- package/dist/{vue-ui-flow-CqSTZbgP.js → vue-ui-flow-CdvGWFzv.js} +96 -93
- package/dist/vue-ui-flow-W89ofPB-.cjs +1 -0
- package/dist/{vue-ui-funnel-Jr9TMTsq.js → vue-ui-funnel-DYutKyoz.js} +88 -85
- package/dist/vue-ui-funnel-RvdVrhFu.cjs +1 -0
- package/dist/{vue-ui-galaxy-BrQ10tPo.js → vue-ui-galaxy-BCBRlYS1.js} +123 -120
- package/dist/vue-ui-galaxy-Djdx-ca8.cjs +1 -0
- package/dist/{vue-ui-gauge-DOMio6Mv.js → vue-ui-gauge-BNAAZt4F.js} +86 -83
- package/dist/vue-ui-gauge-BVVmf09x.cjs +1 -0
- package/dist/{vue-ui-gizmo-SKS1idHb.js → vue-ui-gizmo-BFQ_KgLX.js} +3 -3
- package/dist/{vue-ui-gizmo-C3NimqVM.cjs → vue-ui-gizmo-Ceh0oFY3.cjs} +1 -1
- package/dist/vue-ui-heatmap-CiZpI-tA.cjs +1 -0
- package/dist/{vue-ui-heatmap-l4vCjb6f.js → vue-ui-heatmap-Ct3qaBv7.js} +109 -106
- package/dist/vue-ui-history-plot-Ci8Y2EFg.cjs +1 -0
- package/dist/{vue-ui-history-plot-B05tJML1.js → vue-ui-history-plot-shn74MJ6.js} +130 -127
- package/dist/{vue-ui-kpi-DF4U5E1w.js → vue-ui-kpi-B_pV-2JJ.js} +3 -3
- package/dist/{vue-ui-kpi-DQJr571M.cjs → vue-ui-kpi-DfYrbxlX.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BMARnOW4.js → vue-ui-mini-loader-BFnWQs5p.js} +2 -2
- package/dist/{vue-ui-mini-loader-BZkVKkqn.cjs → vue-ui-mini-loader-LIqf62jk.cjs} +1 -1
- package/dist/vue-ui-molecule-D8YuYTKv.cjs +1 -0
- package/dist/{vue-ui-molecule-C1ycekVJ.js → vue-ui-molecule-DNz1m8XZ.js} +147 -144
- package/dist/{vue-ui-mood-radar-_Kd-Lhpm.js → vue-ui-mood-radar-DiYB_zhM.js} +97 -94
- package/dist/vue-ui-mood-radar-uvH7qUHy.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-DIwRSn-O.js → vue-ui-nested-donuts-9hn-g4ir.js} +99 -96
- package/dist/vue-ui-nested-donuts-C7ikDjp7.cjs +17 -0
- package/dist/vue-ui-onion-5Rqvd4Fw.cjs +5 -0
- package/dist/{vue-ui-onion-Dqb0gwGl.js → vue-ui-onion-DCWfNTNu.js} +105 -102
- package/dist/{vue-ui-parallel-coordinate-plot-De-tYNNy.js → vue-ui-parallel-coordinate-plot-CaPFL9_1.js} +97 -94
- package/dist/vue-ui-parallel-coordinate-plot-tlgTbaNX.cjs +8 -0
- package/dist/vue-ui-quadrant-B0Sw5NGo.cjs +1 -0
- package/dist/{vue-ui-quadrant-BQ5maxJq.js → vue-ui-quadrant-BoQZ375K.js} +155 -153
- package/dist/vue-ui-quick-chart-D3zV1d7t.cjs +15 -0
- package/dist/{vue-ui-quick-chart-DF_510YT.js → vue-ui-quick-chart-vfMN8F1q.js} +164 -161
- package/dist/{vue-ui-radar-DDHd0AYs.js → vue-ui-radar-CAuu6wkh.js} +129 -127
- package/dist/vue-ui-radar-CNMJCAwo.cjs +1 -0
- package/dist/{vue-ui-rating-Chi3OOtp.js → vue-ui-rating-Bm0HZ3du.js} +2 -2
- package/dist/{vue-ui-rating-D9kQcY2a.cjs → vue-ui-rating-dsRDRL98.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CV1xQOok.js → vue-ui-relation-circle-5OZMN9jR.js} +127 -124
- package/dist/vue-ui-relation-circle-iD7BufNH.cjs +1 -0
- package/dist/{vue-ui-rings-D2ezwyae.js → vue-ui-rings-COefBaQT.js} +114 -112
- package/dist/vue-ui-rings-DC4WG4sK.cjs +2 -0
- package/dist/vue-ui-scatter-5ny76dmi.cjs +1 -0
- package/dist/{vue-ui-scatter-BxbUYPk1.js → vue-ui-scatter-DhO83TZZ.js} +157 -154
- package/dist/{vue-ui-screenshot-Bc7Lv1i8.cjs → vue-ui-screenshot-DABH_phE.cjs} +1 -1
- package/dist/{vue-ui-screenshot-cxDgcXJB.js → vue-ui-screenshot-brillPo5.js} +1 -1
- package/dist/{vue-ui-skeleton-D6ojufhb.js → vue-ui-skeleton-BmJiYGtE.js} +3 -3
- package/dist/{vue-ui-skeleton-DvdPnQbR.cjs → vue-ui-skeleton-_DN0U6W6.cjs} +1 -1
- package/dist/{vue-ui-smiley-DEJ6S-We.cjs → vue-ui-smiley-CW6714mb.cjs} +1 -1
- package/dist/{vue-ui-smiley-9nGRDSn7.js → vue-ui-smiley-D9NRimij.js} +2 -2
- package/dist/{vue-ui-spark-trend-DiNeAGXR.js → vue-ui-spark-trend-BKZj03CQ.js} +5 -5
- package/dist/{vue-ui-spark-trend-BosbwgVe.cjs → vue-ui-spark-trend-expbkxgR.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DNf_Majv.js → vue-ui-sparkbar-CYRORE5i.js} +4 -4
- package/dist/{vue-ui-sparkbar-DGFKrcg0.cjs → vue-ui-sparkbar-Cr9FtevP.cjs} +1 -1
- package/dist/vue-ui-sparkgauge-BHXFhvTv.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-D89HjxSK.js → vue-ui-sparkgauge-JV4tYB7P.js} +56 -53
- package/dist/{vue-ui-sparkhistogram-CU1_P6AJ.js → vue-ui-sparkhistogram-DKINHX2q.js} +93 -90
- package/dist/vue-ui-sparkhistogram-T4a3DDck.cjs +1 -0
- package/dist/{vue-ui-sparkline-C2McLmh5.js → vue-ui-sparkline-CbRTHtig.js} +109 -106
- package/dist/vue-ui-sparkline-Dc6Sf3n8.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-Cu4aG9PB.js → vue-ui-sparkstackbar-6u9-2nG4.js} +59 -56
- package/dist/vue-ui-sparkstackbar-CV5SkdsP.cjs +1 -0
- package/dist/{vue-ui-stackbar-6m5CpvNM.js → vue-ui-stackbar-CUppObfj.js} +136 -133
- package/dist/vue-ui-stackbar-CXB-nd71.cjs +6 -0
- package/dist/vue-ui-strip-plot-6IXF_U6-.cjs +1 -0
- package/dist/{vue-ui-strip-plot-DlZ2Eez4.js → vue-ui-strip-plot-doaNZAW4.js} +127 -124
- package/dist/{vue-ui-table-U0_3I0fu.js → vue-ui-table-CZsNuDR5.js} +1 -1
- package/dist/{vue-ui-table-BjhcV9qB.cjs → vue-ui-table-S66UCskD.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Bfqytiv5.cjs → vue-ui-table-heatmap-BU9UU15H.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BrGkCaOG.js → vue-ui-table-heatmap-CjohHqDV.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CXlnp8E3.cjs → vue-ui-table-sparkline-CHFFTD0a.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-C1wNBDqO.js → vue-ui-table-sparkline-ab2rwdKB.js} +5 -5
- package/dist/{vue-ui-thermometer-Bx2abW1B.js → vue-ui-thermometer-C72mHwUi.js} +84 -81
- package/dist/vue-ui-thermometer-Ccd6RGh8.cjs +1 -0
- package/dist/vue-ui-timer-C8Fn2B0b.cjs +64 -0
- package/dist/{vue-ui-timer-3UkgrtEj.js → vue-ui-timer-D-LNi6lz.js} +183 -180
- package/dist/{vue-ui-tiremarks-C_xuD4De.js → vue-ui-tiremarks-Bo8EWsJ8.js} +59 -56
- package/dist/vue-ui-tiremarks-SOzvMOz4.cjs +1 -0
- package/dist/vue-ui-treemap-BqTTQrVh.cjs +1 -0
- package/dist/{vue-ui-treemap-BjDSR72h.js → vue-ui-treemap-uj94elVB.js} +123 -120
- package/dist/{vue-ui-vertical-bar-DUhOoSNl.js → vue-ui-vertical-bar-BUTOw-DK.js} +108 -106
- package/dist/vue-ui-vertical-bar-C4Sxun4Q.cjs +4 -0
- package/dist/{vue-ui-waffle-Dpox5n5s.js → vue-ui-waffle-CTWA1frT.js} +107 -104
- package/dist/vue-ui-waffle-DYWGRKdT.cjs +1 -0
- package/dist/vue-ui-wheel-8K72ZKda.js +330 -0
- package/dist/vue-ui-wheel-Cz5-0klT.cjs +1 -0
- package/dist/{vue-ui-word-cloud-u5S86-Ft.js → vue-ui-word-cloud-CSwBPDB8.js} +97 -94
- package/dist/vue-ui-word-cloud-D39riLZb.cjs +1 -0
- package/dist/vue-ui-xy-BbWXjajH.cjs +3 -0
- package/dist/{vue-ui-xy-0nBQDwL2.js → vue-ui-xy-DpDKutd7.js} +65 -58
- package/dist/{vue-ui-xy-canvas-yQlThVu7.cjs → vue-ui-xy-canvas-BCj0SCqe.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DI7LiD4U.js → vue-ui-xy-canvas-BQm9gah4.js} +82 -81
- package/package.json +1 -1
- package/dist/Shape-GAZUIBfN.cjs +0 -1
- package/dist/Tooltip-BlGVq6xj.cjs +0 -1
- package/dist/index-DSGAenF3.cjs +0 -9
- package/dist/vue-ui-3d-bar-vvpkf_bv.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CMMnrI3R.cjs +0 -1
- package/dist/vue-ui-bullet-nXPlud-q.cjs +0 -34
- package/dist/vue-ui-candlestick-B6T0LhEG.cjs +0 -2
- package/dist/vue-ui-chestnut-D8Gq_i77.cjs +0 -6
- package/dist/vue-ui-circle-pack-DCz3OWlu.cjs +0 -1
- package/dist/vue-ui-donut-BpgK-I9o.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BVJCDPQ2.cjs +0 -1
- package/dist/vue-ui-dumbbell-DRcemHVG.cjs +0 -9
- package/dist/vue-ui-flow-DdQsK5DR.cjs +0 -1
- package/dist/vue-ui-funnel-Bq4yoTfd.cjs +0 -1
- package/dist/vue-ui-galaxy-ia1UNlpc.cjs +0 -1
- package/dist/vue-ui-gauge-C3FbYOSi.cjs +0 -1
- package/dist/vue-ui-heatmap-BCau2Z3U.cjs +0 -1
- package/dist/vue-ui-history-plot-DL7VjOd0.cjs +0 -1
- package/dist/vue-ui-molecule-B5XDGmLx.cjs +0 -1
- package/dist/vue-ui-mood-radar-DyMCJKFb.cjs +0 -1
- package/dist/vue-ui-nested-donuts-B4Am-r6T.cjs +0 -17
- package/dist/vue-ui-onion-YeBdJrdx.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-CoecETlm.cjs +0 -8
- package/dist/vue-ui-quadrant-Btzq3qNJ.cjs +0 -1
- package/dist/vue-ui-quick-chart-5cWjffLJ.cjs +0 -15
- package/dist/vue-ui-radar-t22bqFiQ.cjs +0 -1
- package/dist/vue-ui-relation-circle-CWgGPxDJ.cjs +0 -1
- package/dist/vue-ui-rings-CiLJkRwa.cjs +0 -2
- package/dist/vue-ui-scatter-B24gGA8q.cjs +0 -1
- package/dist/vue-ui-sparkgauge-DwK7dzdJ.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-DKoI6_TT.cjs +0 -1
- package/dist/vue-ui-sparkline-Bp7GMRrA.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-Dayxdcr7.cjs +0 -1
- package/dist/vue-ui-stackbar-C21xTVy9.cjs +0 -6
- package/dist/vue-ui-strip-plot-DAo8FMup.cjs +0 -1
- package/dist/vue-ui-thermometer-CBdAwYdC.cjs +0 -1
- package/dist/vue-ui-timer-CRDQbqJ_.cjs +0 -64
- package/dist/vue-ui-tiremarks-C78mfaBr.cjs +0 -1
- package/dist/vue-ui-treemap-CP__1pdb.cjs +0 -1
- package/dist/vue-ui-vertical-bar-DTB8r4LH.cjs +0 -4
- package/dist/vue-ui-waffle-CrVyCF7k.cjs +0 -1
- package/dist/vue-ui-wheel-DV2zgr4d.cjs +0 -1
- package/dist/vue-ui-wheel-ykD8OULJ.js +0 -319
- package/dist/vue-ui-word-cloud-DBkAo2uX.cjs +0 -1
- package/dist/vue-ui-xy-mEVVQr_U.cjs +0 -3
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { computed as c, ref as m, watch as X, onMounted as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as ee } from "./useNestedProp-
|
|
4
|
-
import
|
|
5
|
-
import { t as
|
|
6
|
-
import { _ as
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { computed as c, ref as m, watch as X, onMounted as de, createElementBlock as i, openBlock as n, normalizeStyle as M, renderSlot as C, createCommentVNode as h, createBlock as ve, normalizeProps as ce, guardReactiveProps as he, createElementVNode as f, toDisplayString as q, unref as v, createVNode as ye, Fragment as D, renderList as P } from "vue";
|
|
2
|
+
import { u as fe, c as pe, a as ge, C as Z, a0 as R, o as me, e as H, g as be, w as I, a1 as ke, a2 as _e, X as we, s as V, S as Y, R as xe, a3 as J, i as K, f as Q } from "./index-9EeNZMz1.js";
|
|
3
|
+
import { u as ee } from "./useNestedProp-df_bKQEI.js";
|
|
4
|
+
import $e from "./vue-ui-skeleton-BmJiYGtE.js";
|
|
5
|
+
import { t as Ne, u as Le } from "./useResponsive-BWapHhVH.js";
|
|
6
|
+
import { _ as Me } from "./PackageVersion-QRvxRYPv.js";
|
|
7
|
+
import { u as Ce } from "./useChartAccessibility-BWojgys7.js";
|
|
8
|
+
import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
const Ve = ["id"], Ae = ["xmlns", "viewBox"], Se = ["width", "height"], ze = ["id"], We = ["stop-color"], De = ["stop-color"], Pe = ["id"], Re = ["stop-color"], Te = ["stop-color"], Fe = ["id"], Oe = ["stop-color"], Be = ["stop-color"], Ee = { key: 1 }, Ge = ["d", "fill"], je = ["d", "fill"], Ue = ["d", "stroke", "stroke-width"], Xe = ["d", "stroke", "stroke-width"], qe = ["x", "y", "width", "height", "fill", "rx"], Ze = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], He = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Ye = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Je = ["x", "y", "font-size", "font-weight", "fill"], Ke = ["x", "y", "height", "width", "onMouseenter", "onClick"], Qe = {
|
|
9
10
|
__name: "vue-ui-sparkline",
|
|
10
11
|
props: {
|
|
11
12
|
config: {
|
|
@@ -39,11 +40,11 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
39
40
|
},
|
|
40
41
|
emits: ["hoverIndex", "selectDatapoint"],
|
|
41
42
|
setup(_, { emit: te }) {
|
|
42
|
-
const { vue_ui_sparkline: ae } =
|
|
43
|
-
get: () =>
|
|
43
|
+
const { vue_ui_sparkline: ae } = fe(), o = _, N = c(() => Array.isArray(o.dataset) && o.dataset.length > 0), p = m(pe()), A = m(null), T = m(null), F = m(null), e = c({
|
|
44
|
+
get: () => O(),
|
|
44
45
|
set: (t) => t
|
|
45
|
-
});
|
|
46
|
-
function
|
|
46
|
+
}), { svgRef: le } = Ce({ config: e.value.style.title });
|
|
47
|
+
function O() {
|
|
47
48
|
const t = ee({
|
|
48
49
|
userConfig: o.config,
|
|
49
50
|
defaultConfig: ae
|
|
@@ -51,19 +52,19 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
51
52
|
let l = {};
|
|
52
53
|
return t.theme ? l = {
|
|
53
54
|
...ee({
|
|
54
|
-
userConfig:
|
|
55
|
+
userConfig: ge.vue_ui_sparkline[t.theme] || o.config,
|
|
55
56
|
defaultConfig: t
|
|
56
57
|
})
|
|
57
58
|
} : l = t, o.config && Z(o.config, "style.scaleMin") ? l.style.scaleMin = o.config.style.scaleMin : l.style.scaleMin = null, o.config && Z(o.config, "style.scaleMax") ? l.style.scaleMax = o.config.style.scaleMax : l.style.scaleMax = null, l;
|
|
58
59
|
}
|
|
59
|
-
const L = c(() =>
|
|
60
|
+
const L = c(() => R({
|
|
60
61
|
data: o.dataset,
|
|
61
62
|
threshold: e.value.downsample.threshold
|
|
62
63
|
}));
|
|
63
64
|
X(() => o.config, (t) => {
|
|
64
|
-
e.value =
|
|
65
|
+
e.value = O(), E(), s.value.chartWidth = e.value.style.chartWidth;
|
|
65
66
|
}, { deep: !0 }), X(() => o.dataset, (t) => {
|
|
66
|
-
b.value =
|
|
67
|
+
b.value = R({
|
|
67
68
|
data: o.dataset.map((l) => ({
|
|
68
69
|
...l,
|
|
69
70
|
value: [void 0].includes(l.value) ? null : l.value
|
|
@@ -71,9 +72,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
71
72
|
threshold: e.value.downsample.threshold
|
|
72
73
|
});
|
|
73
74
|
}, { deep: !0 });
|
|
74
|
-
const b = m(
|
|
75
|
-
function
|
|
76
|
-
return
|
|
75
|
+
const b = m(se());
|
|
76
|
+
function se() {
|
|
77
|
+
return R({
|
|
77
78
|
data: o.dataset.map((t) => e.value.style.animation.show && o.dataset.length > 1 ? {
|
|
78
79
|
...t,
|
|
79
80
|
value: null
|
|
@@ -84,9 +85,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
84
85
|
threshold: e.value.downsample.threshold
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
if (
|
|
88
|
+
const B = m(null);
|
|
89
|
+
de(() => {
|
|
90
|
+
if (E(), e.value.style.animation.show && o.dataset.length > 1) {
|
|
90
91
|
let a = function() {
|
|
91
92
|
l < L.value.length ? (b.value.push(L.value[l]), setTimeout(() => {
|
|
92
93
|
requestAnimationFrame(a);
|
|
@@ -98,12 +99,12 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
98
99
|
a();
|
|
99
100
|
}
|
|
100
101
|
});
|
|
101
|
-
function
|
|
102
|
-
if (
|
|
102
|
+
function E() {
|
|
103
|
+
if (me(o.dataset) ? H({
|
|
103
104
|
componentName: "VueUiSparkline",
|
|
104
105
|
type: "dataset"
|
|
105
106
|
}) : o.dataset.forEach((t, l) => {
|
|
106
|
-
|
|
107
|
+
be({
|
|
107
108
|
datasetObject: t,
|
|
108
109
|
requiredAttributes: ["period", "value"]
|
|
109
110
|
}).forEach((a) => {
|
|
@@ -115,17 +116,17 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
115
116
|
});
|
|
116
117
|
});
|
|
117
118
|
}), e.value.responsive) {
|
|
118
|
-
const t =
|
|
119
|
-
const { width: l, height: a } =
|
|
120
|
-
chart:
|
|
121
|
-
title: e.value.style.title.show && o.showInfo ?
|
|
122
|
-
source:
|
|
119
|
+
const t = Ne(() => {
|
|
120
|
+
const { width: l, height: a } = Le({
|
|
121
|
+
chart: A.value,
|
|
122
|
+
title: e.value.style.title.show && o.showInfo ? T.value : null,
|
|
123
|
+
source: F.value
|
|
123
124
|
});
|
|
124
125
|
requestAnimationFrame(() => {
|
|
125
126
|
s.value.width = l, s.value.height = a, s.value.chartWidth = e.value.style.chartWidth / 500 * l, s.value.padding = o.forcedPadding / 500 * l;
|
|
126
127
|
});
|
|
127
128
|
});
|
|
128
|
-
|
|
129
|
+
B.value = new ResizeObserver(t), B.value.observe(A.value.parentNode);
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
132
|
const s = m({
|
|
@@ -133,60 +134,60 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
133
134
|
width: 500,
|
|
134
135
|
chartWidth: e.value.style.chartWidth,
|
|
135
136
|
padding: o.forcedPadding
|
|
136
|
-
}),
|
|
137
|
-
const { top: t, right: l, bottom: a, left:
|
|
137
|
+
}), S = te, u = c(() => {
|
|
138
|
+
const { top: t, right: l, bottom: a, left: r } = e.value.style.padding;
|
|
138
139
|
return {
|
|
139
140
|
top: t,
|
|
140
|
-
left:
|
|
141
|
+
left: r,
|
|
141
142
|
right: s.value.width - l,
|
|
142
143
|
bottom: s.value.height - a,
|
|
143
|
-
start: o.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? s.value.width - s.value.chartWidth +
|
|
144
|
-
width: o.showInfo && e.value.style.dataLabel.show ? s.value.chartWidth -
|
|
144
|
+
start: o.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? s.value.width - s.value.chartWidth + r : s.value.padding + r,
|
|
145
|
+
width: o.showInfo && e.value.style.dataLabel.show ? s.value.chartWidth - r - l : s.value.width - s.value.padding - r - l,
|
|
145
146
|
height: s.value.height - t - a
|
|
146
147
|
};
|
|
147
|
-
}), z = c(() => [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),
|
|
148
|
+
}), z = c(() => [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), ue = c(() => [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 = c(() => {
|
|
148
149
|
const t = z.value >= 0 ? 0 : z.value;
|
|
149
150
|
return Math.abs(t);
|
|
150
|
-
}),
|
|
151
|
+
}), G = c(() => ue.value + x.value), w = c(() => u.value.bottom - u.value.height * W(x.value));
|
|
151
152
|
function W(t) {
|
|
152
|
-
return isNaN(t /
|
|
153
|
+
return isNaN(t / G.value) ? 0 : t / G.value;
|
|
153
154
|
}
|
|
154
155
|
const k = c(() => L.value.length - 1), d = c(() => b.value.map((t, l) => {
|
|
155
|
-
const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0,
|
|
156
|
+
const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0, r = u.value.width / (k.value + 1) > s.padding ? s.padding : u.value.width / (k.value + 1);
|
|
156
157
|
return {
|
|
157
158
|
absoluteValue: a,
|
|
158
159
|
period: t.period,
|
|
159
160
|
plotValue: a + x.value,
|
|
160
161
|
toMax: W(a + x.value),
|
|
161
|
-
x: u.value.start + l * (
|
|
162
|
+
x: u.value.start + l * (r > u.value.width / 12 ? u.value.width / 12 : r),
|
|
162
163
|
y: u.value.bottom - u.value.height * W(a + x.value),
|
|
163
164
|
id: `plot_${p.value}_${l}`,
|
|
164
165
|
color: $.value ? e.value.style.bar.color : e.value.style.area.useGradient ? I(e.value.style.line.color, 0.05 * (1 - l / k.value)) : e.value.style.line.color,
|
|
165
|
-
width:
|
|
166
|
+
width: r > u.value.width / 12 ? u.value.width / 12 : r
|
|
166
167
|
};
|
|
167
|
-
})),
|
|
168
|
+
})), oe = c(() => {
|
|
168
169
|
const t = { x: d.value[0].x || 0, y: (s.value.height || 0) - 6 }, l = { x: d.value[d.value.length - 1].x || 0, y: (s.value.height || 0) - 6 }, a = [];
|
|
169
|
-
return d.value.forEach((
|
|
170
|
-
a.push(`${
|
|
170
|
+
return d.value.forEach((r) => {
|
|
171
|
+
a.push(`${r.x || 0},${r.y || 0} `);
|
|
171
172
|
}), [t.x, t.y, ...a, l.x, l.y].toString();
|
|
172
173
|
}), y = m(void 0);
|
|
173
|
-
function
|
|
174
|
-
y.value = t,
|
|
174
|
+
function re(t, l) {
|
|
175
|
+
y.value = t, S("hoverIndex", { index: l });
|
|
175
176
|
}
|
|
176
177
|
function ne() {
|
|
177
|
-
y.value = void 0,
|
|
178
|
+
y.value = void 0, S("hoverIndex", { index: void 0 });
|
|
178
179
|
}
|
|
179
180
|
const g = c(() => {
|
|
180
181
|
if (N.value) {
|
|
181
|
-
const t = d.value.map((a) => a.absoluteValue), l = t.reduce((a,
|
|
182
|
+
const t = d.value.map((a) => a.absoluteValue), l = t.reduce((a, r) => a + r, 0);
|
|
182
183
|
return {
|
|
183
184
|
latest: d.value[d.value.length - 1].absoluteValue,
|
|
184
185
|
sum: l,
|
|
185
186
|
average: l / d.value.length,
|
|
186
|
-
median:
|
|
187
|
-
trend:
|
|
187
|
+
median: _e(t),
|
|
188
|
+
trend: ke(d.value.map(({ x: a, y: r, absoluteValue: U }) => ({
|
|
188
189
|
x: a,
|
|
189
|
-
y:
|
|
190
|
+
y: r,
|
|
190
191
|
value: U
|
|
191
192
|
}))).trend
|
|
192
193
|
};
|
|
@@ -199,17 +200,17 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
199
200
|
trend: null
|
|
200
201
|
};
|
|
201
202
|
}), j = c(() => N.value ? e.value.style.dataLabel.valueType === "latest" ? g.value.latest : e.value.style.dataLabel.valueType === "sum" ? g.value.sum : e.value.style.dataLabel.valueType === "average" ? g.value.average : 0 : 0), $ = c(() => e.value.type && e.value.type === "bar");
|
|
202
|
-
function
|
|
203
|
-
|
|
203
|
+
function ie(t, l) {
|
|
204
|
+
S("selectDatapoint", { datapoint: t, index: l });
|
|
204
205
|
}
|
|
205
|
-
return (t, l) => (
|
|
206
|
+
return (t, l) => (n(), i("div", {
|
|
206
207
|
ref_key: "sparklineChart",
|
|
207
|
-
ref:
|
|
208
|
+
ref: A,
|
|
208
209
|
class: "vue-ui-sparkline",
|
|
209
210
|
id: p.value,
|
|
210
211
|
style: M(`width:100%;font-family:${e.value.style.fontFamily};`)
|
|
211
212
|
}, [
|
|
212
|
-
C(t.$slots, "before",
|
|
213
|
+
C(t.$slots, "before", ce(he({
|
|
213
214
|
selected: y.value,
|
|
214
215
|
latest: g.value.latest,
|
|
215
216
|
sum: g.value.sum,
|
|
@@ -217,10 +218,10 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
217
218
|
median: g.value.median,
|
|
218
219
|
trend: g.value.trend
|
|
219
220
|
})), void 0, !0),
|
|
220
|
-
e.value.style.title.show && _.showInfo ? (
|
|
221
|
+
e.value.style.title.show && _.showInfo ? (n(), i("div", {
|
|
221
222
|
key: 0,
|
|
222
223
|
ref_key: "chartTitle",
|
|
223
|
-
ref:
|
|
224
|
+
ref: T,
|
|
224
225
|
class: "vue-ui-sparkline-title",
|
|
225
226
|
style: M(`display:flex;align-items:center;width:100%;color:${e.value.style.title.color};background:${e.value.style.backgroundColor};justify-content:${e.value.style.title.textAlign === "left" ? "flex-start" : e.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${e.value.style.title.fontSize * 2}px;font-size:${e.value.style.title.fontSize}px;font-weight:${e.value.style.title.bold ? "bold" : "normal"};`)
|
|
226
227
|
}, [
|
|
@@ -228,14 +229,16 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
228
229
|
style: M(`padding:${e.value.style.title.textAlign === "left" ? "0 0 0 12px" : e.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
|
|
229
230
|
}, q(y.value ? y.value.period : e.value.style.title.text), 5)
|
|
230
231
|
], 4)) : h("", !0),
|
|
231
|
-
N.value ? (
|
|
232
|
+
N.value ? (n(), i("svg", {
|
|
232
233
|
key: 1,
|
|
233
|
-
|
|
234
|
+
ref_key: "svgRef",
|
|
235
|
+
ref: le,
|
|
236
|
+
xmlns: v(we),
|
|
234
237
|
viewBox: `0 0 ${s.value.width} ${s.value.height}`,
|
|
235
238
|
style: M(`background:${e.value.style.backgroundColor};overflow:visible`)
|
|
236
239
|
}, [
|
|
237
|
-
|
|
238
|
-
t.$slots["chart-background"] ? (
|
|
240
|
+
ye(Me),
|
|
241
|
+
t.$slots["chart-background"] ? (n(), i("foreignObject", {
|
|
239
242
|
key: 0,
|
|
240
243
|
x: 0,
|
|
241
244
|
y: 0,
|
|
@@ -246,7 +249,7 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
246
249
|
}
|
|
247
250
|
}, [
|
|
248
251
|
C(t.$slots, "chart-background", {}, void 0, !0)
|
|
249
|
-
], 8,
|
|
252
|
+
], 8, Se)) : h("", !0),
|
|
250
253
|
f("defs", null, [
|
|
251
254
|
f("linearGradient", {
|
|
252
255
|
x1: "0%",
|
|
@@ -258,12 +261,12 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
258
261
|
f("stop", {
|
|
259
262
|
offset: "0%",
|
|
260
263
|
"stop-color": v(V)(v(I)(e.value.style.area.color, 0.05), e.value.style.area.opacity)
|
|
261
|
-
}, null, 8,
|
|
264
|
+
}, null, 8, We),
|
|
262
265
|
f("stop", {
|
|
263
266
|
offset: "100%",
|
|
264
267
|
"stop-color": v(V)(e.value.style.area.color, e.value.style.area.opacity)
|
|
265
|
-
}, null, 8,
|
|
266
|
-
], 8,
|
|
268
|
+
}, null, 8, De)
|
|
269
|
+
], 8, ze),
|
|
267
270
|
f("linearGradient", {
|
|
268
271
|
x2: "0%",
|
|
269
272
|
y2: "100%",
|
|
@@ -272,12 +275,12 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
272
275
|
f("stop", {
|
|
273
276
|
offset: "0%",
|
|
274
277
|
"stop-color": e.value.style.bar.color
|
|
275
|
-
}, null, 8,
|
|
278
|
+
}, null, 8, Re),
|
|
276
279
|
f("stop", {
|
|
277
280
|
offset: "100%",
|
|
278
281
|
"stop-color": v(I)(e.value.style.bar.color, 0.05)
|
|
279
|
-
}, null, 8,
|
|
280
|
-
], 8,
|
|
282
|
+
}, null, 8, Te)
|
|
283
|
+
], 8, Pe),
|
|
281
284
|
f("linearGradient", {
|
|
282
285
|
x2: "0%",
|
|
283
286
|
y2: "100%",
|
|
@@ -286,42 +289,42 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
286
289
|
f("stop", {
|
|
287
290
|
offset: "0%",
|
|
288
291
|
"stop-color": v(I)(e.value.style.bar.color, 0.05)
|
|
289
|
-
}, null, 8,
|
|
292
|
+
}, null, 8, Oe),
|
|
290
293
|
f("stop", {
|
|
291
294
|
offset: "100%",
|
|
292
295
|
"stop-color": e.value.style.bar.color
|
|
293
|
-
}, null, 8,
|
|
294
|
-
], 8,
|
|
296
|
+
}, null, 8, Be)
|
|
297
|
+
], 8, Fe)
|
|
295
298
|
]),
|
|
296
|
-
e.value.style.area.show && !$.value && d.value[0] ? (
|
|
297
|
-
e.value.style.line.smooth ? (
|
|
299
|
+
e.value.style.area.show && !$.value && d.value[0] ? (n(), i("g", Ee, [
|
|
300
|
+
e.value.style.line.smooth ? (n(), i("path", {
|
|
298
301
|
key: 0,
|
|
299
302
|
d: `M ${d.value[0].x},${u.value.bottom} ${v(Y)(d.value)} L ${d.value.at(-1).x},${u.value.bottom} Z`,
|
|
300
303
|
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : v(V)(e.value.style.area.color, e.value.style.area.opacity)
|
|
301
|
-
}, null, 8,
|
|
304
|
+
}, null, 8, Ge)) : (n(), i("path", {
|
|
302
305
|
key: 1,
|
|
303
|
-
d: `M${
|
|
306
|
+
d: `M${oe.value}Z`,
|
|
304
307
|
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : v(V)(e.value.style.area.color, e.value.style.area.opacity)
|
|
305
|
-
}, null, 8,
|
|
308
|
+
}, null, 8, je))
|
|
306
309
|
])) : h("", !0),
|
|
307
|
-
e.value.style.line.smooth && !$.value ? (
|
|
310
|
+
e.value.style.line.smooth && !$.value ? (n(), i("path", {
|
|
308
311
|
key: 2,
|
|
309
312
|
d: `M ${v(Y)(d.value)}`,
|
|
310
313
|
stroke: e.value.style.line.color,
|
|
311
314
|
fill: "none",
|
|
312
315
|
"stroke-width": e.value.style.line.strokeWidth,
|
|
313
316
|
"stroke-linecap": "round"
|
|
314
|
-
}, null, 8,
|
|
315
|
-
!e.value.style.line.smooth && !$.value ? (
|
|
317
|
+
}, null, 8, Ue)) : h("", !0),
|
|
318
|
+
!e.value.style.line.smooth && !$.value ? (n(), i("path", {
|
|
316
319
|
key: 3,
|
|
317
|
-
d: `M ${v(
|
|
320
|
+
d: `M ${v(xe)(d.value)}`,
|
|
318
321
|
stroke: e.value.style.line.color,
|
|
319
322
|
fill: "none",
|
|
320
323
|
"stroke-width": e.value.style.line.strokeWidth,
|
|
321
324
|
"stroke-linecap": "round"
|
|
322
|
-
}, null, 8,
|
|
323
|
-
(
|
|
324
|
-
$.value ? (
|
|
325
|
+
}, null, 8, Xe)) : h("", !0),
|
|
326
|
+
(n(!0), i(D, null, P(d.value, (a, r) => (n(), i("g", null, [
|
|
327
|
+
$.value ? (n(), i("rect", {
|
|
325
328
|
key: 0,
|
|
326
329
|
x: a.x - a.width / 2,
|
|
327
330
|
y: isNaN(a.absoluteValue > 0 ? a.y : w.value) ? 0 : a.absoluteValue > 0 ? a.y : w.value,
|
|
@@ -329,8 +332,8 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
329
332
|
height: isNaN(Math.abs(a.y - w.value)) ? 0 : Math.abs(a.y - w.value),
|
|
330
333
|
fill: a.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${p.value})` : `url(#sparkline_bar_gradient_neg_${p.value})`,
|
|
331
334
|
rx: e.value.style.bar.borderRadius
|
|
332
|
-
}, null, 8,
|
|
333
|
-
e.value.style.verticalIndicator.show && (y.value && a.id === y.value.id || _.selectedIndex ===
|
|
335
|
+
}, null, 8, qe)) : h("", !0),
|
|
336
|
+
e.value.style.verticalIndicator.show && (y.value && a.id === y.value.id || _.selectedIndex === r) ? (n(), i("line", {
|
|
334
337
|
key: 1,
|
|
335
338
|
x1: a.x,
|
|
336
339
|
x2: a.x,
|
|
@@ -340,9 +343,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
340
343
|
"stroke-width": e.value.style.verticalIndicator.strokeWidth,
|
|
341
344
|
"stroke-linecap": "round",
|
|
342
345
|
"stroke-dasharray": e.value.style.verticalIndicator.strokeDasharray || 0
|
|
343
|
-
}, null, 8,
|
|
346
|
+
}, null, 8, Ze)) : h("", !0)
|
|
344
347
|
]))), 256)),
|
|
345
|
-
z.value < 0 ? (
|
|
348
|
+
z.value < 0 ? (n(), i("line", {
|
|
346
349
|
key: 4,
|
|
347
350
|
x1: u.value.start,
|
|
348
351
|
x2: u.value.start + u.value.width - 16,
|
|
@@ -352,9 +355,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
352
355
|
"stroke-dasharray": e.value.style.zeroLine.strokeWidth * 2,
|
|
353
356
|
"stroke-width": e.value.style.zeroLine.strokeWidth,
|
|
354
357
|
"stroke-linecap": "round"
|
|
355
|
-
}, null, 8,
|
|
356
|
-
e.value.style.plot.show ? (
|
|
357
|
-
y.value && a.id === y.value.id || _.selectedIndex ===
|
|
358
|
+
}, null, 8, He)) : h("", !0),
|
|
359
|
+
e.value.style.plot.show ? (n(!0), i(D, { key: 5 }, P(d.value, (a, r) => (n(), i("g", null, [
|
|
360
|
+
y.value && a.id === y.value.id || _.selectedIndex === r || _.dataset.length === 1 ? (n(), i("circle", {
|
|
358
361
|
key: 0,
|
|
359
362
|
cx: a.x,
|
|
360
363
|
cy: a.y,
|
|
@@ -362,9 +365,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
362
365
|
fill: a.color,
|
|
363
366
|
stroke: e.value.style.plot.stroke,
|
|
364
367
|
"stroke-width": e.value.style.plot.strokeWidth
|
|
365
|
-
}, null, 8,
|
|
368
|
+
}, null, 8, Ye)) : h("", !0)
|
|
366
369
|
]))), 256)) : h("", !0),
|
|
367
|
-
_.showInfo && e.value.style.dataLabel.show ? (
|
|
370
|
+
_.showInfo && e.value.style.dataLabel.show ? (n(), i("text", {
|
|
368
371
|
key: 6,
|
|
369
372
|
x: e.value.style.dataLabel.position === "left" ? 12 + e.value.style.dataLabel.offsetX : u.value.width + 12 + e.value.style.dataLabel.offsetX,
|
|
370
373
|
y: s.value.height / 2 + e.value.style.dataLabel.fontSize / 2.5 + e.value.style.dataLabel.offsetY,
|
|
@@ -380,28 +383,28 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
380
383
|
e.value.style.dataLabel.formatter,
|
|
381
384
|
j.value,
|
|
382
385
|
v(Q)({ p: e.value.style.dataLabel.prefix, v: j.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })
|
|
383
|
-
)), 9,
|
|
384
|
-
(
|
|
386
|
+
)), 9, Je)) : h("", !0),
|
|
387
|
+
(n(!0), i(D, null, P(d.value, (a, r) => (n(), i("rect", {
|
|
385
388
|
x: a.x - (u.value.width / (k.value + 1) > s.value.padding ? s.value.padding : u.value.width / (k.value + 1)) / 2,
|
|
386
389
|
y: u.value.top - 6,
|
|
387
390
|
height: u.value.height + 6,
|
|
388
391
|
width: u.value.width / (k.value + 1) > s.value.padding ? s.value.padding : u.value.width / (k.value + 1),
|
|
389
392
|
fill: "transparent",
|
|
390
|
-
onMouseenter: (U) =>
|
|
393
|
+
onMouseenter: (U) => re(a, r),
|
|
391
394
|
onMouseleave: ne,
|
|
392
|
-
onClick: () =>
|
|
393
|
-
}, null, 40,
|
|
395
|
+
onClick: () => ie(a, r)
|
|
396
|
+
}, null, 40, Ke))), 256)),
|
|
394
397
|
C(t.$slots, "svg", { svg: s.value }, void 0, !0)
|
|
395
|
-
], 12,
|
|
396
|
-
t.$slots.source ? (
|
|
398
|
+
], 12, Ae)) : h("", !0),
|
|
399
|
+
t.$slots.source ? (n(), i("div", {
|
|
397
400
|
key: 2,
|
|
398
401
|
ref_key: "source",
|
|
399
|
-
ref:
|
|
402
|
+
ref: F,
|
|
400
403
|
dir: "auto"
|
|
401
404
|
}, [
|
|
402
405
|
C(t.$slots, "source", {}, void 0, !0)
|
|
403
406
|
], 512)) : h("", !0),
|
|
404
|
-
N.value ? h("", !0) : (
|
|
407
|
+
N.value ? h("", !0) : (n(), ve($e, {
|
|
405
408
|
key: 3,
|
|
406
409
|
config: {
|
|
407
410
|
type: "sparkline",
|
|
@@ -413,9 +416,9 @@ const Ce = ["id"], Ie = ["xmlns", "viewBox"], Ve = ["width", "height"], Se = ["i
|
|
|
413
416
|
}
|
|
414
417
|
}
|
|
415
418
|
}, null, 8, ["config"]))
|
|
416
|
-
], 12,
|
|
419
|
+
], 12, Ve));
|
|
417
420
|
}
|
|
418
|
-
},
|
|
421
|
+
}, nt = /* @__PURE__ */ Ie(Qe, [["__scopeId", "data-v-e4d46f5e"]]);
|
|
419
422
|
export {
|
|
420
|
-
|
|
423
|
+
nt as default
|
|
421
424
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DEnRHTzk.cjs"),A=require("./useNestedProp-BNT60LxO.cjs"),G=require("./vue-ui-skeleton-_DN0U6W6.cjs"),P=require("./useResponsive-YQYQrAZ_.cjs"),H=require("./PackageVersion-DJKkRuOD.cjs"),U=require("./useChartAccessibility-Cm7nkzTG.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z=["id"],Y=["xmlns","viewBox"],J=["width","height"],K=["id"],Q=["stop-color"],ee=["stop-color"],te=["id"],le=["stop-color"],ae=["stop-color"],oe=["id"],re=["stop-color"],ne=["stop-color"],ue={key:1},se=["d","fill"],ie=["d","fill"],de=["d","stroke","stroke-width"],ce=["d","stroke","stroke-width"],ve=["x","y","width","height","fill","rx"],he=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ye=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],fe=["cx","cy","r","fill","stroke","stroke-width"],pe=["x","y","font-size","font-weight","fill"],me=["x","y","height","width","onMouseenter","onClick"],ge={__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},heightRatio:{type:Number,default:1},forcedPadding:{type:Number,default:30}},emits:["hoverIndex","selectDatapoint"],setup(p,{emit:z}){const{vue_ui_sparkline:D}=r.useConfig(),s=p,b=e.computed(()=>Array.isArray(s.dataset)&&s.dataset.length>0),v=e.ref(r.createUid()),x=e.ref(null),V=e.ref(null),C=e.ref(null),t=e.computed({get:()=>L(),set:l=>l}),{svgRef:O}=U.useChartAccessibility({config:t.value.style.title});function L(){const l=A.useNestedProp({userConfig:s.config,defaultConfig:D});let o={};return l.theme?o={...A.useNestedProp({userConfig:r.themes.vue_ui_sparkline[l.theme]||s.config,defaultConfig:l})}:o=l,s.config&&r.hasDeepProperty(s.config,"style.scaleMin")?o.style.scaleMin=s.config.style.scaleMin:o.style.scaleMin=null,s.config&&r.hasDeepProperty(s.config,"style.scaleMax")?o.style.scaleMax=s.config.style.scaleMax:o.style.scaleMax=null,o}const _=e.computed(()=>r.largestTriangleThreeBucketsArrayObjects({data:s.dataset,threshold:t.value.downsample.threshold}));e.watch(()=>s.config,l=>{t.value=L(),$(),n.value.chartWidth=t.value.style.chartWidth},{deep:!0}),e.watch(()=>s.dataset,l=>{y.value=r.largestTriangleThreeBucketsArrayObjects({data:s.dataset.map(o=>({...o,value:[void 0].includes(o.value)?null:o.value})),threshold:t.value.downsample.threshold})},{deep:!0});const y=e.ref(T());function T(){return r.largestTriangleThreeBucketsArrayObjects({data:s.dataset.map(l=>t.value.style.animation.show&&s.dataset.length>1?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value}),threshold:t.value.downsample.threshold})}const E=e.ref(null);e.onMounted(()=>{if($(),t.value.style.animation.show&&s.dataset.length>1){let a=function(){o<_.value.length?(y.value.push(_.value[o]),setTimeout(()=>{requestAnimationFrame(a)},l)):y.value=_.value,o+=1};y.value=[];const l=t.value.style.animation.animationFrames/s.dataset.length;let o=0;a()}});function $(){if(r.objectIsEmpty(s.dataset)?r.error({componentName:"VueUiSparkline",type:"dataset"}):s.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{r.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=P.throttle(()=>{const{width:o,height:a}=P.useResponsive({chart:x.value,title:t.value.style.title.show&&s.showInfo?V.value:null,source:C.value});requestAnimationFrame(()=>{n.value.width=o,n.value.height=a,n.value.chartWidth=t.value.style.chartWidth/500*o,n.value.padding=s.forcedPadding/500*o})});E.value=new ResizeObserver(l),E.value.observe(x.value.parentNode)}}const n=e.ref({height:80*s.heightRatio,width:500,chartWidth:t.value.style.chartWidth,padding:s.forcedPadding}),w=z,u=e.computed(()=>{const{top:l,right:o,bottom:a,left:i}=t.value.style.padding;return{top:l,left:i,right:n.value.width-o,bottom:n.value.height-a,start:s.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?n.value.width-n.value.chartWidth+i:n.value.padding+i,width:s.showInfo&&t.value.style.dataLabel.show?n.value.chartWidth-i-o:n.value.width-n.value.padding-i-o,height:n.value.height-l-a}}),N=e.computed(()=>[null,void 0].includes(t.value.style.scaleMin)?Math.min(...y.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMin),W=e.computed(()=>[null,void 0].includes(t.value.style.scaleMax)?Math.max(...y.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0)):t.value.style.scaleMax),g=e.computed(()=>{const l=N.value>=0?0:N.value;return Math.abs(l)}),M=e.computed(()=>W.value+g.value),m=e.computed(()=>u.value.bottom-u.value.height*B(g.value));function B(l){return isNaN(l/M.value)?0:l/M.value}const f=e.computed(()=>_.value.length-1),d=e.computed(()=>y.value.map((l,o)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0,i=u.value.width/(f.value+1)>n.padding?n.padding:u.value.width/(f.value+1);return{absoluteValue:a,period:l.period,plotValue:a+g.value,toMax:B(a+g.value),x:u.value.start+o*(i>u.value.width/12?u.value.width/12:i),y:u.value.bottom-u.value.height*B(a+g.value),id:`plot_${v.value}_${o}`,color:k.value?t.value.style.bar.color:t.value.style.area.useGradient?r.shiftHue(t.value.style.line.color,.05*(1-o/f.value)):t.value.style.line.color,width:i>u.value.width/12?u.value.width/12:i}})),q=e.computed(()=>{const l={x:d.value[0].x||0,y:(n.value.height||0)-6},o={x:d.value[d.value.length-1].x||0,y:(n.value.height||0)-6},a=[];return d.value.forEach(i=>{a.push(`${i.x||0},${i.y||0} `)}),[l.x,l.y,...a,o.x,o.y].toString()}),c=e.ref(void 0);function F(l,o){c.value=l,w("hoverIndex",{index:o})}function R(){c.value=void 0,w("hoverIndex",{index:void 0})}const h=e.computed(()=>{if(b.value){const l=d.value.map(a=>a.absoluteValue),o=l.reduce((a,i)=>a+i,0);return{latest:d.value[d.value.length-1].absoluteValue,sum:o,average:o/d.value.length,median:r.calcMedian(l),trend:r.calcLinearProgression(d.value.map(({x:a,y:i,absoluteValue:S})=>({x:a,y:i,value:S}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),I=e.computed(()=>b.value?t.value.style.dataLabel.valueType==="latest"?h.value.latest:t.value.style.dataLabel.valueType==="sum"?h.value.sum:t.value.style.dataLabel.valueType==="average"?h.value.average:0:0),k=e.computed(()=>t.value.type&&t.value.type==="bar");function j(l,o){w("selectDatapoint",{datapoint:l,index:o})}return(l,o)=>(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:h.value.latest,sum:h.value.sum,average:h.value.average,median:h.value.median,trend:h.value.trend})),void 0,!0),t.value.style.title.show&&p.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,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),b.value?(e.openBlock(),e.createElementBlock("svg",{key:1,ref_key:"svgRef",ref:O,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createVNode(H._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,J)):e.createCommentVNode("",!0),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(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.area.color,.05),t.value.style.area.opacity)},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ee)],8,K),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,le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,ae)],8,te),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.shiftHue)(t.value.style.bar.color,.05)},null,8,re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,ne)],8,oe)]),t.value.style.area.show&&!k.value&&d.value[0]?(e.openBlock(),e.createElementBlock("g",ue,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${d.value[0].x},${u.value.bottom} ${e.unref(r.createSmoothPath)(d.value)} L ${d.value.at(-1).x},${u.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,se)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${q.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(r.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ie))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${e.unref(r.createSmoothPath)(d.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,de)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${e.unref(r.createStraightPath)(d.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,ce)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[k.value?(e.openBlock(),e.createElementBlock("rect",{key:0,x:a.x-a.width/2,y:isNaN(a.absoluteValue>0?a.y:m.value)?0:a.absoluteValue>0?a.y:m.value,width:a.width,height:isNaN(Math.abs(a.y-m.value))?0:Math.abs(a.y-m.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,ve)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(c.value&&a.id===c.value.id||p.selectedIndex===i)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:a.x,x2:a.x,y1:u.value.top-6,y2:u.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,he)):e.createCommentVNode("",!0)]))),256)),N.value<0?(e.openBlock(),e.createElementBlock("line",{key:4,x1:u.value.start,x2:u.value.start+u.value.width-16,y1:e.unref(r.forceValidValue)(m.value,u.value.bottom),y2:e.unref(r.forceValidValue)(m.value,u.value.bottom),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,ye)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&a.id===c.value.id||p.selectedIndex===i||p.dataset.length===1?(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,fe)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),p.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:u.value.width+12+t.value.style.dataLabel.offsetX,y:n.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(r.applyDataLabel)(t.value.style.dataLabel.formatter,c.value.absoluteValue,e.unref(r.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(r.applyDataLabel)(t.value.style.dataLabel.formatter,I.value,e.unref(r.dataLabel)({p:t.value.style.dataLabel.prefix,v:I.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,pe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,i)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(u.value.width/(f.value+1)>n.value.padding?n.value.padding:u.value.width/(f.value+1))/2,y:u.value.top-6,height:u.value.height+6,width:u.value.width/(f.value+1)>n.value.padding?n.value.padding:u.value.width/(f.value+1),fill:"transparent",onMouseenter:S=>F(a,i),onMouseleave:R,onClick:()=>j(a,i)},null,40,me))),256)),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],12,Y)):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"source",ref:C,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(G.default,{key:3,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,Z))}},ke=X._export_sfc(ge,[["__scopeId","data-v-e4d46f5e"]]);exports.default=ke;
|