vue-data-ui 2.3.74 → 2.3.76
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-DK6F5Fq3.cjs → Arrow-D7M4-bW7.cjs} +1 -1
- package/dist/{Arrow-CYCrAySW.js → Arrow-DY9RKUmG.js} +1 -1
- package/dist/{BaseIcon-DBHVtm3A.cjs → BaseIcon-DB7Apwv_.cjs} +1 -1
- package/dist/{BaseIcon-kBIAYqUO.js → BaseIcon-rwm-10Hu.js} +1 -1
- package/dist/{DataTable-BNFSPjhv.cjs → DataTable-CsNozyz7.cjs} +1 -1
- package/dist/{DataTable-CKdV-L0e.js → DataTable-e2fnfjXV.js} +2 -2
- package/dist/{Legend-Cj7T-DqJ.js → Legend-5cQ0xZjK.js} +1 -1
- package/dist/{Legend-Do2kcWFT.cjs → Legend-DgFd-O0m.cjs} +1 -1
- package/dist/{Shape-Bo8ZjViG.js → Shape-CiTElr_0.js} +1 -1
- package/dist/{Shape-DRDUAe_o.cjs → Shape-yPECDLiP.cjs} +1 -1
- package/dist/{Slicer-D8jHSP7U.cjs → Slicer-DaZgCKV7.cjs} +1 -1
- package/dist/{Slicer-4nGKvUYF.js → Slicer-DwBBu3kB.js} +2 -2
- package/dist/{Title-D5cATWsL.cjs → Title-3EduyW4p.cjs} +1 -1
- package/dist/{Title-DZjnxQdN.js → Title-gUz6GDA3.js} +1 -1
- package/dist/{Tooltip-B8yLaegk.cjs → Tooltip-DScSrYXJ.cjs} +1 -1
- package/dist/{Tooltip--kgFEVZs.js → Tooltip-DfSM1mNP.js} +1 -1
- package/dist/{index-D_32ZGWd.cjs → index-BTgtr0F8.cjs} +1 -1
- package/dist/{index-C8SH0f2u.js → index-CaV1s-yZ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BvvH633N.cjs → useNestedProp-CisbRRo_.cjs} +1 -1
- package/dist/{useNestedProp-lS_T5lM3.js → useNestedProp-tWCzZrLx.js} +1 -1
- package/dist/{usePrinter-BouFNHWR.cjs → usePrinter-DzTaA1eh.cjs} +1 -1
- package/dist/{usePrinter-Dj50NAxo.js → usePrinter-rvJyT65A.js} +1 -1
- package/dist/{vue-data-ui-v_BbbLtJ.cjs → vue-data-ui-BGkWRPUY.cjs} +1 -1
- package/dist/{vue-data-ui-DoXqU7xC.js → vue-data-ui-BO89gTtq.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CnoPOJHm.js → vue-ui-3d-bar-CcTMIHiB.js} +499 -486
- package/dist/vue-ui-3d-bar-DzmcGuqh.cjs +19 -0
- package/dist/{vue-ui-accordion-Cka6b_Up.cjs → vue-ui-accordion-7e4Myhcg.cjs} +1 -1
- package/dist/{vue-ui-accordion-YHleIgkV.js → vue-ui-accordion-CpzGQ63y.js} +3 -3
- package/dist/vue-ui-age-pyramid-C7qr9EwB.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CENg8fDg.js → vue-ui-age-pyramid-D71ZLkVV.js} +182 -169
- package/dist/{vue-ui-annotator-VJOLUkqJ.js → vue-ui-annotator-B8Iu6cYt.js} +1 -1
- package/dist/{vue-ui-annotator-ByYg6QMs.cjs → vue-ui-annotator-BKQrweqm.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CHsGD3bx.js → vue-ui-candlestick-Bx4QVkY0.js} +295 -279
- package/dist/vue-ui-candlestick-DAc1FQ-i.cjs +2 -0
- package/dist/vue-ui-carousel-table-uFRqkghO.cjs +1 -0
- package/dist/{vue-ui-carousel-table-RAtX3VBu.js → vue-ui-carousel-table-xuQG6bcH.js} +146 -129
- package/dist/{vue-ui-chestnut-B5GQX0J_.js → vue-ui-chestnut-Bo6rDcU7.js} +215 -204
- package/dist/vue-ui-chestnut-DJkm72oD.cjs +6 -0
- package/dist/{vue-ui-cursor-DnZqLj21.cjs → vue-ui-cursor-BQbeuW-k.cjs} +1 -1
- package/dist/{vue-ui-cursor-CMm7XSSG.js → vue-ui-cursor-C0KOqEOq.js} +2 -2
- package/dist/{vue-ui-dashboard-DgEQJnLr.cjs → vue-ui-dashboard-0Hsjx-bO.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Ck_5L3eu.js → vue-ui-dashboard-BT71xS7P.js} +2 -2
- package/dist/{vue-ui-digits--ULH35um.js → vue-ui-digits-BRqpKYvD.js} +2 -2
- package/dist/{vue-ui-digits-UvwUdi6U.cjs → vue-ui-digits-C2ReH6w0.cjs} +1 -1
- package/dist/{vue-ui-donut-QQ1fWWvc.js → vue-ui-donut-NQW-3prf.js} +376 -362
- package/dist/vue-ui-donut-evolution-DOe-cwLi.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-Cx8kBB_7.js → vue-ui-donut-evolution-jbXQQGTc.js} +270 -255
- package/dist/vue-ui-donut-v81suIOX.cjs +1 -0
- package/dist/vue-ui-dumbbell-DXQSg6wa.cjs +9 -0
- package/dist/{vue-ui-dumbbell-BYvwHpU8.js → vue-ui-dumbbell-Dyz8xdtC.js} +232 -213
- package/dist/vue-ui-flow-BL3JWW1m.js +481 -0
- package/dist/vue-ui-flow-UqSNwH9d.cjs +1 -0
- package/dist/vue-ui-galaxy-DTQWGvRH.cjs +1 -0
- package/dist/{vue-ui-galaxy-B0L57aec.js → vue-ui-galaxy-Dx9nsOuM.js} +175 -162
- package/dist/vue-ui-gauge-BUB7H0qA.cjs +1 -0
- package/dist/vue-ui-gauge-CLaKGi0-.js +500 -0
- package/dist/vue-ui-gizmo-Kitfqu0J.cjs +1 -0
- package/dist/{vue-ui-gizmo-D2RfM55X.js → vue-ui-gizmo-of-4s5HG.js} +66 -53
- package/dist/{vue-ui-heatmap-DKM0DH41.js → vue-ui-heatmap-BIzjOMXO.js} +157 -143
- package/dist/vue-ui-heatmap-DUw2350O.cjs +1 -0
- package/dist/vue-ui-kpi-By3YPwgo.js +98 -0
- package/dist/vue-ui-kpi-DyL2Hcz-.cjs +1 -0
- package/dist/{vue-ui-mini-loader-CLP19Txv.cjs → vue-ui-mini-loader-C048-8Kd.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-MywnWlYI.js → vue-ui-mini-loader-DnK3V2z2.js} +2 -2
- package/dist/{vue-ui-molecule-CLI9iTRE.js → vue-ui-molecule-BfhbIqa5.js} +177 -167
- package/dist/vue-ui-molecule-D-ahly6R.cjs +1 -0
- package/dist/vue-ui-mood-radar-DD8R9BpJ.cjs +1 -0
- package/dist/{vue-ui-mood-radar-O30wZo9a.js → vue-ui-mood-radar-DXxEKr3x.js} +172 -161
- package/dist/{vue-ui-nested-donuts-D8o4TqTt.js → vue-ui-nested-donuts-BdUdHFd-.js} +377 -364
- package/dist/vue-ui-nested-donuts-C7qM_FRw.cjs +17 -0
- package/dist/{vue-ui-onion-Hmcke6xB.js → vue-ui-onion-D0vF5jBt.js} +191 -177
- package/dist/vue-ui-onion-DX3gofXZ.cjs +5 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CyChE3NP.js → vue-ui-parallel-coordinate-plot-CTZY-pY8.js} +298 -284
- package/dist/vue-ui-parallel-coordinate-plot-DEx5kFYd.cjs +8 -0
- package/dist/{vue-ui-quadrant-DimTQdAj.js → vue-ui-quadrant-ByY8GP3y.js} +347 -334
- package/dist/vue-ui-quadrant-CgApzie6.cjs +1 -0
- package/dist/{vue-ui-quick-chart-DxJvENid.js → vue-ui-quick-chart-DTxJ__7j.js} +483 -469
- package/dist/vue-ui-quick-chart-DWZEgUJF.cjs +15 -0
- package/dist/{vue-ui-radar-D_FieunT.js → vue-ui-radar-5UBmAU6W.js} +202 -189
- package/dist/vue-ui-radar-DEED0rTz.cjs +1 -0
- package/dist/{vue-ui-rating-BHW2Onru.cjs → vue-ui-rating-Ce_Ewqtl.cjs} +1 -1
- package/dist/{vue-ui-rating-DF1BpH4E.js → vue-ui-rating-Dr6jquxh.js} +2 -2
- package/dist/vue-ui-relation-circle-BU8i2miI.js +322 -0
- package/dist/vue-ui-relation-circle-CRcQ6Zcy.cjs +1 -0
- package/dist/{vue-ui-rings-BqS-iece.js → vue-ui-rings-Ctl3Jywh.js} +203 -189
- package/dist/vue-ui-rings-OQ8a1Ruw.cjs +2 -0
- package/dist/vue-ui-scatter-B8StSjt8.cjs +1 -0
- package/dist/{vue-ui-scatter-Dns49Nht.js → vue-ui-scatter-BwJ_koWT.js} +284 -270
- package/dist/{vue-ui-screenshot-5Gsnd0Wr.js → vue-ui-screenshot-BS3L5vhN.js} +1 -1
- package/dist/{vue-ui-screenshot---q062Kd.cjs → vue-ui-screenshot-bAVk3EPl.cjs} +1 -1
- package/dist/{vue-ui-skeleton-fVPw-oIR.cjs → vue-ui-skeleton-CMQzFTs9.cjs} +1 -1
- package/dist/{vue-ui-skeleton-B4eWLjH3.js → vue-ui-skeleton-CvFX_ExX.js} +2 -2
- package/dist/{vue-ui-smiley-B8Tyunn3.js → vue-ui-smiley-CGYZpNt9.js} +2 -2
- package/dist/{vue-ui-smiley-YfHmv0rQ.cjs → vue-ui-smiley-sF8QIso1.cjs} +1 -1
- package/dist/vue-ui-spark-trend-B4XSSKl9.js +263 -0
- package/dist/vue-ui-spark-trend-CdIoxaqb.cjs +1 -0
- package/dist/{vue-ui-sparkbar-9DBvdYn7.js → vue-ui-sparkbar-BbsJGDMZ.js} +95 -87
- package/dist/vue-ui-sparkbar-C3i1K7hi.cjs +1 -0
- package/dist/vue-ui-sparkgauge-BKyQoI7C.cjs +1 -0
- package/dist/vue-ui-sparkgauge-D4w_i_QJ.js +178 -0
- package/dist/{vue-ui-sparkhistogram-BBUVmco4.js → vue-ui-sparkhistogram-CYybrW-6.js} +79 -68
- package/dist/vue-ui-sparkhistogram-CvTYEmbz.cjs +1 -0
- package/dist/vue-ui-sparkline-CDowaDRS.cjs +1 -0
- package/dist/{vue-ui-sparkline-CeqNV6Re.js → vue-ui-sparkline-DjN1SVdO.js} +142 -123
- package/dist/{vue-ui-sparkstackbar-C3GMC1eW.js → vue-ui-sparkstackbar-BLMhJxaN.js} +120 -104
- package/dist/vue-ui-sparkstackbar-BZ2bESBi.cjs +1 -0
- package/dist/{vue-ui-stackbar-DyGPrFxi.js → vue-ui-stackbar-BTKOHUYc.js} +235 -222
- package/dist/vue-ui-stackbar-DRHaJFR8.cjs +6 -0
- package/dist/vue-ui-strip-plot-DxQxFbWg.cjs +1 -0
- package/dist/{vue-ui-strip-plot-y1AnVJmq.js → vue-ui-strip-plot-o6GTsGAT.js} +246 -232
- package/dist/{vue-ui-table-xWvAQS-s.cjs → vue-ui-table-BFIj1Rgh.cjs} +1 -1
- package/dist/{vue-ui-table-B4kfykAO.js → vue-ui-table-CnquiTpr.js} +1 -1
- package/dist/vue-ui-table-heatmap-CCGK12Fa.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-YZRSzwRM.js → vue-ui-table-heatmap-CZRIwv-Q.js} +106 -95
- package/dist/{vue-ui-table-sparkline-C0v2r4Kf.js → vue-ui-table-sparkline-B3zEeq6Z.js} +151 -138
- package/dist/vue-ui-table-sparkline-DYmgfHz4.cjs +1 -0
- package/dist/{vue-ui-thermometer-D5qurIy7.js → vue-ui-thermometer-BopiohUh.js} +116 -104
- package/dist/vue-ui-thermometer-CzPRBt6c.cjs +1 -0
- package/dist/vue-ui-timer-Bonw69Lt.cjs +64 -0
- package/dist/{vue-ui-timer-VWjovnKL.js → vue-ui-timer-C7WkW8hK.js} +191 -176
- package/dist/{vue-ui-tiremarks-jH6cdQOJ.js → vue-ui-tiremarks-BurRtFv4.js} +115 -103
- package/dist/vue-ui-tiremarks-DkIGfq8t.cjs +1 -0
- package/dist/vue-ui-treemap-CalhJmnp.cjs +1 -0
- package/dist/{vue-ui-treemap-BCc5sQLB.js → vue-ui-treemap-DWy4voIr.js} +251 -237
- package/dist/{vue-ui-vertical-bar-2In_g5iC.js → vue-ui-vertical-bar-CJW1YhtY.js} +314 -299
- package/dist/vue-ui-vertical-bar-rwWp-sai.cjs +4 -0
- package/dist/{vue-ui-waffle-OzU830VX.js → vue-ui-waffle-DB7X6nTS.js} +285 -265
- package/dist/vue-ui-waffle-faQMBYNx.cjs +1 -0
- package/dist/vue-ui-wheel-BzjbGP6a.cjs +1 -0
- package/dist/vue-ui-wheel-CryKap2E.js +255 -0
- package/dist/vue-ui-word-cloud-COqUkvei.js +512 -0
- package/dist/vue-ui-word-cloud-DJN9I4q4.cjs +1 -0
- package/dist/vue-ui-xy-BmA0tspd.cjs +3 -0
- package/dist/{vue-ui-xy-DuJtYXKl.js → vue-ui-xy-b1Z_HPsx.js} +300 -274
- package/dist/{vue-ui-xy-canvas-CKibMJHh.js → vue-ui-xy-canvas-BgbLnY5B.js} +345 -327
- package/dist/vue-ui-xy-canvas-DOM2Kq_s.cjs +9 -0
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-CwCEoPX-.cjs +0 -19
- package/dist/vue-ui-age-pyramid-GqCNpd_h.cjs +0 -1
- package/dist/vue-ui-candlestick-TdNVq_FX.cjs +0 -2
- package/dist/vue-ui-carousel-table-yXUSFk2u.cjs +0 -1
- package/dist/vue-ui-chestnut-EJj-dQSY.cjs +0 -6
- package/dist/vue-ui-donut-BqUBysA_.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BXtEnop4.cjs +0 -1
- package/dist/vue-ui-dumbbell-CjIh7KTm.cjs +0 -9
- package/dist/vue-ui-flow-hp0Hpuhn.js +0 -469
- package/dist/vue-ui-flow-u29zqSQj.cjs +0 -1
- package/dist/vue-ui-galaxy-DE1HbBi-.cjs +0 -1
- package/dist/vue-ui-gauge-B_IZrsfj.cjs +0 -1
- package/dist/vue-ui-gauge-CPyyn7cL.js +0 -488
- package/dist/vue-ui-gizmo-DR4gacOL.cjs +0 -1
- package/dist/vue-ui-heatmap-DMB_eUpA.cjs +0 -1
- package/dist/vue-ui-kpi-BAxAY13T.js +0 -84
- package/dist/vue-ui-kpi-BD21xshi.cjs +0 -1
- package/dist/vue-ui-molecule-BNsWckH-.cjs +0 -1
- package/dist/vue-ui-mood-radar-BsWE1f8R.cjs +0 -1
- package/dist/vue-ui-nested-donuts-CYyUtXs2.cjs +0 -17
- package/dist/vue-ui-onion-D7TXJu5w.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BqZB7xKn.cjs +0 -8
- package/dist/vue-ui-quadrant-BPDTvxlT.cjs +0 -1
- package/dist/vue-ui-quick-chart-C_-ut0if.cjs +0 -15
- package/dist/vue-ui-radar-C5Kq19hg.cjs +0 -1
- package/dist/vue-ui-relation-circle-4kIYttRI.js +0 -310
- package/dist/vue-ui-relation-circle-DHMHHsqY.cjs +0 -1
- package/dist/vue-ui-rings-BqPS8NKl.cjs +0 -2
- package/dist/vue-ui-scatter-BLVcdf3d.cjs +0 -1
- package/dist/vue-ui-spark-trend-Dpv6am0Z.cjs +0 -1
- package/dist/vue-ui-spark-trend-Em9OqYyG.js +0 -251
- package/dist/vue-ui-sparkbar-BuSuwQYl.cjs +0 -1
- package/dist/vue-ui-sparkgauge-BN5feBzp.js +0 -167
- package/dist/vue-ui-sparkgauge-DKtUZMv1.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-BmuusW02.cjs +0 -1
- package/dist/vue-ui-sparkline-Blzv-tIQ.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-D__WDEMv.cjs +0 -1
- package/dist/vue-ui-stackbar-DFqJ5K_q.cjs +0 -6
- package/dist/vue-ui-strip-plot-z9fjJ6Dj.cjs +0 -1
- package/dist/vue-ui-table-heatmap-CGKecjtm.cjs +0 -1
- package/dist/vue-ui-table-sparkline-CHFZG3Tg.cjs +0 -1
- package/dist/vue-ui-thermometer-DoOxxVW1.cjs +0 -1
- package/dist/vue-ui-timer-D63zHe-I.cjs +0 -64
- package/dist/vue-ui-tiremarks-Cp8YEmXh.cjs +0 -1
- package/dist/vue-ui-treemap-DJrdEFW5.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BfJJqN_z.cjs +0 -4
- package/dist/vue-ui-waffle-A2gmRbq0.cjs +0 -1
- package/dist/vue-ui-wheel-C9QXzWu1.js +0 -242
- package/dist/vue-ui-wheel-DGSh9VKq.cjs +0 -1
- package/dist/vue-ui-word-cloud-C2ZaVlfO.js +0 -498
- package/dist/vue-ui-word-cloud-DPFB1MYk.cjs +0 -1
- package/dist/vue-ui-xy-C-2-aijE.cjs +0 -3
- package/dist/vue-ui-xy-canvas-D7wf3xab.cjs +0 -9
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useCssVars as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import { _ as
|
|
5
|
-
import
|
|
6
|
-
import { _ as
|
|
7
|
-
const
|
|
1
|
+
import { useCssVars as T, computed as _, onMounted as P, ref as A, watch as J, openBlock as a, createElementBlock as o, normalizeStyle as w, createElementVNode as h, createTextVNode as K, toDisplayString as d, unref as r, createCommentVNode as p, Fragment as f, renderList as g, normalizeClass as D, createBlock as F } from "vue";
|
|
2
|
+
import { u as Q, o as Z, e as H, g as ee, c as te, t as le, w as b, i as ae, f as oe, X as se, v as z } from "./index-CaV1s-yZ.js";
|
|
3
|
+
import { u as I } from "./useNestedProp-tWCzZrLx.js";
|
|
4
|
+
import { _ as ue } from "./Shape-CiTElr_0.js";
|
|
5
|
+
import ie from "./vue-ui-skeleton-CvFX_ExX.js";
|
|
6
|
+
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const re = { key: 0 }, ve = { key: 1 }, de = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"], he = ["stop-color"], fe = ["id"], ge = ["stop-color"], pe = ["stop-color"], be = ["id"], me = ["stop-color"], _e = ["stop-color"], xe = { key: 0 }, ke = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], $e = { key: 1 }, we = ["x", "y", "font-size", "font-weight", "fill"], Ce = ["x", "y", "font-size", "fill"], Le = ["x", "y", "font-size", "fill"], ze = ["height", "width", "x", "onMouseover", "stroke", "stroke-width", "rx", "stroke-dasharray", "onClick"], Se = {
|
|
8
8
|
__name: "vue-ui-sparkhistogram",
|
|
9
9
|
props: {
|
|
10
10
|
config: {
|
|
@@ -21,22 +21,25 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
emits: ["selectDatapoint"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
"
|
|
24
|
+
setup(V, { emit: E }) {
|
|
25
|
+
const v = V;
|
|
26
|
+
T((l) => ({
|
|
27
|
+
"627459c9": X.value
|
|
28
28
|
}));
|
|
29
|
-
const { vue_ui_sparkhistogram:
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const { vue_ui_sparkhistogram: W } = Q(), S = _(() => !!v.dataset && v.dataset.length);
|
|
30
|
+
P(() => {
|
|
31
|
+
M();
|
|
32
|
+
});
|
|
33
|
+
function M() {
|
|
34
|
+
Z(v.dataset) ? H({
|
|
32
35
|
componentName: "VueUiSparkHistogram",
|
|
33
36
|
type: "dataset"
|
|
34
|
-
}) :
|
|
35
|
-
|
|
37
|
+
}) : v.dataset.forEach((l, u) => {
|
|
38
|
+
ee({
|
|
36
39
|
datasetObject: l,
|
|
37
40
|
requiredAttributes: ["value"]
|
|
38
41
|
}).forEach((t) => {
|
|
39
|
-
|
|
42
|
+
H({
|
|
40
43
|
componentName: "VueUiSparkHistogram",
|
|
41
44
|
type: "datasetSerieAttribute",
|
|
42
45
|
property: t,
|
|
@@ -44,19 +47,27 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
44
47
|
});
|
|
45
48
|
});
|
|
46
49
|
});
|
|
50
|
+
}
|
|
51
|
+
const m = A(te()), e = _({
|
|
52
|
+
get: () => N(),
|
|
53
|
+
set: (l) => l
|
|
47
54
|
});
|
|
48
|
-
|
|
49
|
-
const l =
|
|
50
|
-
userConfig:
|
|
51
|
-
defaultConfig:
|
|
55
|
+
function N() {
|
|
56
|
+
const l = I({
|
|
57
|
+
userConfig: v.config,
|
|
58
|
+
defaultConfig: W
|
|
52
59
|
});
|
|
53
60
|
return l.theme ? {
|
|
54
|
-
...
|
|
55
|
-
userConfig:
|
|
61
|
+
...I({
|
|
62
|
+
userConfig: le.vue_ui_sparkhistogram[l.theme] || v.config,
|
|
56
63
|
defaultConfig: l
|
|
57
64
|
})
|
|
58
65
|
} : l;
|
|
59
|
-
}
|
|
66
|
+
}
|
|
67
|
+
J(() => v.config, (l) => {
|
|
68
|
+
e.value = N(), M();
|
|
69
|
+
}, { deep: !0 });
|
|
70
|
+
const c = _(() => {
|
|
60
71
|
const l = e.value.style.layout.height, u = e.value.style.layout.width, t = e.value.style.layout.padding.top, s = l - e.value.style.layout.padding.bottom, y = e.value.style.layout.padding.left, x = u - e.value.style.layout.padding.right, k = t + (l - t - e.value.style.layout.padding.bottom) / 2, C = l - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom, $ = u - e.value.style.layout.padding.left - e.value.style.layout.padding.right;
|
|
61
72
|
return {
|
|
62
73
|
bottom: s,
|
|
@@ -69,32 +80,32 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
69
80
|
top: t,
|
|
70
81
|
width: u
|
|
71
82
|
};
|
|
72
|
-
}),
|
|
73
|
-
function
|
|
74
|
-
return Math.abs(l) /
|
|
83
|
+
}), B = _(() => Math.max(...v.dataset.map((l) => Math.abs(l.value || 0))));
|
|
84
|
+
function U(l) {
|
|
85
|
+
return Math.abs(l) / B.value;
|
|
75
86
|
}
|
|
76
|
-
const n = _(() =>
|
|
77
|
-
const t =
|
|
87
|
+
const n = _(() => v.dataset.map((l, u) => {
|
|
88
|
+
const t = U(l.value || 0), s = c.value.drawingHeight * t, y = c.value.drawingWidth / v.dataset.length, x = y * (e.value.style.bars.gap / 100), k = y - x, C = c.value.centerY - s / 2, $ = c.value.left + (x / 2 + u * y), j = c.value.left + u * y, L = typeof l.intensity > "u" ? 100 : Math.round(l.intensity * 100), G = l.color ? l.color : l.value >= 0 ? `${e.value.style.bars.colors.positive}${b[L]}` : `${e.value.style.bars.colors.negative}${b[L]}`, Y = l.color ? l.color : l.value >= 0 ? e.value.style.bars.colors.positive : e.value.style.bars.colors.negative, q = l.color ? `url(#gradient_datapoint_${u}_${m.value})` : l.value >= 0 ? `url(#gradient_positive_${u}_${m.value})` : `url(#gradient_negative_${u}_${m.value})`, R = $ + k / 2;
|
|
78
89
|
return {
|
|
79
90
|
...l,
|
|
80
|
-
color:
|
|
81
|
-
gradient:
|
|
91
|
+
color: G,
|
|
92
|
+
gradient: q,
|
|
82
93
|
height: s,
|
|
83
94
|
intensity: L,
|
|
84
95
|
proportion: t,
|
|
85
|
-
stroke:
|
|
86
|
-
textAnchor:
|
|
87
|
-
trapX:
|
|
96
|
+
stroke: Y,
|
|
97
|
+
textAnchor: R,
|
|
98
|
+
trapX: j,
|
|
88
99
|
unitWidth: y,
|
|
89
100
|
width: k,
|
|
90
101
|
x: $,
|
|
91
102
|
y: C
|
|
92
103
|
};
|
|
93
|
-
})), i =
|
|
94
|
-
function
|
|
95
|
-
|
|
104
|
+
})), i = A(null);
|
|
105
|
+
function O(l, u) {
|
|
106
|
+
E("selectDatapoint", { datapoint: l, index: u });
|
|
96
107
|
}
|
|
97
|
-
const
|
|
108
|
+
const X = _(() => `${e.value.style.animation.speedMs}ms`);
|
|
98
109
|
return (l, u) => (a(), o("div", {
|
|
99
110
|
style: w(`width:100%;background:${e.value.style.backgroundColor};font-family:${e.value.style.fontFamily}`),
|
|
100
111
|
onMouseleave: u[1] || (u[1] = (t) => i.value = null)
|
|
@@ -106,11 +117,11 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
106
117
|
h("div", {
|
|
107
118
|
style: w(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
|
|
108
119
|
}, [
|
|
109
|
-
|
|
110
|
-
i.value !== null ? (a(), o("span",
|
|
120
|
+
K(d(e.value.style.title.text) + " ", 1),
|
|
121
|
+
i.value !== null ? (a(), o("span", re, "- " + d(n.value[i.value].timeLabel || "") + " " + d(r(ae)(
|
|
111
122
|
e.value.style.labels.value.formatter,
|
|
112
123
|
n.value[i.value].value,
|
|
113
|
-
r(
|
|
124
|
+
r(oe)({
|
|
114
125
|
p: e.value.style.labels.value.prefix,
|
|
115
126
|
v: n.value[i.value].value,
|
|
116
127
|
s: e.value.style.labels.value.suffix,
|
|
@@ -118,16 +129,16 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
118
129
|
}),
|
|
119
130
|
{ datapoint: n.value[i.value], seriesIndex: i.value }
|
|
120
131
|
)), 1)) : p("", !0),
|
|
121
|
-
![void 0, null].includes(i.value) && ![null, void 0].includes(n.value[i.value].valueLabel) ? (a(), o("span",
|
|
132
|
+
![void 0, null].includes(i.value) && ![null, void 0].includes(n.value[i.value].valueLabel) ? (a(), o("span", ve, "(" + d(n.value[i.value].valueLabel || 0) + ")", 1)) : p("", !0)
|
|
122
133
|
], 4),
|
|
123
134
|
e.value.style.title.subtitle.text ? (a(), o("div", {
|
|
124
135
|
key: 0,
|
|
125
136
|
style: w(`font-size:${e.value.style.title.subtitle.fontSize}px;color:${e.value.style.title.subtitle.color};font-weight:${e.value.style.title.subtitle.bold ? "bold" : "normal"}`)
|
|
126
|
-
},
|
|
137
|
+
}, d(e.value.style.title.subtitle.text), 5)) : p("", !0)
|
|
127
138
|
], 4)) : p("", !0),
|
|
128
139
|
S.value ? (a(), o("svg", {
|
|
129
140
|
key: 1,
|
|
130
|
-
xmlns: r(
|
|
141
|
+
xmlns: r(se),
|
|
131
142
|
viewBox: `0 0 ${c.value.width} ${c.value.height}`,
|
|
132
143
|
style: { overflow: "visible" }
|
|
133
144
|
}, [
|
|
@@ -143,12 +154,12 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
143
154
|
h("stop", {
|
|
144
155
|
offset: "0%",
|
|
145
156
|
"stop-color": `${r(z)(e.value.style.bars.colors.positive, 0.05)}${r(b)[t.intensity]}`
|
|
146
|
-
}, null, 8,
|
|
157
|
+
}, null, 8, ye),
|
|
147
158
|
h("stop", {
|
|
148
159
|
offset: "100%",
|
|
149
160
|
"stop-color": `${e.value.style.bars.colors.positive}${r(b)[t.intensity]}`
|
|
150
|
-
}, null, 8,
|
|
151
|
-
], 8,
|
|
161
|
+
}, null, 8, he)
|
|
162
|
+
], 8, ce))), 256)),
|
|
152
163
|
(a(!0), o(f, null, g(n.value, (t, s) => (a(), o("radialGradient", {
|
|
153
164
|
id: `gradient_negative_${s}_${m.value}`,
|
|
154
165
|
cy: "50%",
|
|
@@ -160,12 +171,12 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
160
171
|
h("stop", {
|
|
161
172
|
offset: "0%",
|
|
162
173
|
"stop-color": `${r(z)(e.value.style.bars.colors.negative, 0.05)}${r(b)[t.intensity]}`
|
|
163
|
-
}, null, 8,
|
|
174
|
+
}, null, 8, ge),
|
|
164
175
|
h("stop", {
|
|
165
176
|
offset: "100%",
|
|
166
177
|
"stop-color": `${e.value.style.bars.colors.negative}${r(b)[t.intensity]}`
|
|
167
|
-
}, null, 8,
|
|
168
|
-
], 8,
|
|
178
|
+
}, null, 8, pe)
|
|
179
|
+
], 8, fe))), 256)),
|
|
169
180
|
(a(!0), o(f, null, g(n.value, (t, s) => (a(), o("radialGradient", {
|
|
170
181
|
id: `gradient_datapoint_${s}_${m.value}`,
|
|
171
182
|
cy: "50%",
|
|
@@ -177,14 +188,14 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
177
188
|
h("stop", {
|
|
178
189
|
offset: "0%",
|
|
179
190
|
"stop-color": `${r(z)(t.color, 0.05)}${r(b)[t.intensity]}`
|
|
180
|
-
}, null, 8,
|
|
191
|
+
}, null, 8, me),
|
|
181
192
|
h("stop", {
|
|
182
193
|
offset: "100%",
|
|
183
194
|
"stop-color": `${t.color}${r(b)[t.intensity]}`
|
|
184
|
-
}, null, 8,
|
|
185
|
-
], 8,
|
|
195
|
+
}, null, 8, _e)
|
|
196
|
+
], 8, be))), 256))
|
|
186
197
|
]),
|
|
187
|
-
!e.value.style.bars.shape || e.value.style.bars.shape === "square" ? (a(), o("g",
|
|
198
|
+
!e.value.style.bars.shape || e.value.style.bars.shape === "square" ? (a(), o("g", xe, [
|
|
188
199
|
(a(!0), o(f, null, g(n.value, (t, s) => (a(), o("rect", {
|
|
189
200
|
x: t.x,
|
|
190
201
|
y: t.y,
|
|
@@ -194,15 +205,15 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
194
205
|
stroke: t.stroke,
|
|
195
206
|
"stroke-width": e.value.style.bars.strokeWidth,
|
|
196
207
|
rx: `${e.value.style.bars.borderRadius * t.proportion / 12}%`,
|
|
197
|
-
class:
|
|
198
|
-
}, null, 10,
|
|
199
|
-
])) : (a(), o("g",
|
|
200
|
-
(a(!0), o(f, null, g(n.value, (t, s) => (a(),
|
|
208
|
+
class: D({ "vue-ui-sparkhistogram-shape": e.value.style.animation.show })
|
|
209
|
+
}, null, 10, ke))), 256))
|
|
210
|
+
])) : (a(), o("g", $e, [
|
|
211
|
+
(a(!0), o(f, null, g(n.value, (t, s) => (a(), F(ue, {
|
|
201
212
|
plot: { x: t.x + t.width / 2, y: t.y + t.height / 2 },
|
|
202
213
|
color: e.value.style.bars.colors.gradient.show ? t.gradient : t.color,
|
|
203
214
|
shape: e.value.style.bars.shape,
|
|
204
215
|
radius: t.height * 0.4,
|
|
205
|
-
class:
|
|
216
|
+
class: D({ "vue-ui-sparkhistogram-shape": e.value.style.animation.show })
|
|
206
217
|
}, null, 8, ["plot", "color", "shape", "radius", "class"]))), 256))
|
|
207
218
|
])),
|
|
208
219
|
(a(!0), o(f, null, g(n.value, (t, s) => (a(), o("text", {
|
|
@@ -212,7 +223,7 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
212
223
|
"font-size": e.value.style.labels.value.fontSize,
|
|
213
224
|
"font-weight": e.value.style.labels.value.bold ? "bold" : "normal",
|
|
214
225
|
fill: e.value.style.labels.value.color
|
|
215
|
-
},
|
|
226
|
+
}, d(e.value.style.labels.value.prefix) + d(isNaN(t.value) ? "" : Number(t.value.toFixed(e.value.style.labels.value.rounding)).toLocaleString()) + d(e.value.style.labels.value.suffix), 9, we))), 256)),
|
|
216
227
|
(a(!0), o(f, null, g(n.value, (t, s) => (a(), o("g", null, [
|
|
217
228
|
t.valueLabel ? (a(), o("text", {
|
|
218
229
|
key: 0,
|
|
@@ -221,7 +232,7 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
221
232
|
"font-size": e.value.style.labels.valueLabel.fontSize,
|
|
222
233
|
"text-anchor": "middle",
|
|
223
234
|
fill: e.value.style.labels.valueLabel.color
|
|
224
|
-
},
|
|
235
|
+
}, d(t.valueLabel), 9, Ce)) : p("", !0)
|
|
225
236
|
]))), 256)),
|
|
226
237
|
(a(!0), o(f, null, g(n.value, (t, s) => (a(), o("g", null, [
|
|
227
238
|
t.timeLabel ? (a(), o("text", {
|
|
@@ -231,7 +242,7 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
231
242
|
"font-size": e.value.style.labels.timeLabel.fontSize,
|
|
232
243
|
fill: e.value.style.labels.timeLabel.color,
|
|
233
244
|
"text-anchor": "middle"
|
|
234
|
-
},
|
|
245
|
+
}, d(t.timeLabel), 9, Le)) : p("", !0)
|
|
235
246
|
]))), 256)),
|
|
236
247
|
(a(!0), o(f, null, g(n.value, (t, s) => (a(), o("g", null, [
|
|
237
248
|
h("rect", {
|
|
@@ -246,11 +257,11 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
246
257
|
"stroke-width": i.value !== null && i.value === s ? e.value.style.selector.strokeWidth : 0,
|
|
247
258
|
rx: e.value.style.selector.borderRadius,
|
|
248
259
|
"stroke-dasharray": e.value.style.selector.strokeDasharray,
|
|
249
|
-
onClick: () =>
|
|
250
|
-
}, null, 40,
|
|
260
|
+
onClick: () => O(t, s)
|
|
261
|
+
}, null, 40, ze)
|
|
251
262
|
]))), 256))
|
|
252
|
-
], 8,
|
|
253
|
-
S.value ? p("", !0) : (a(),
|
|
263
|
+
], 8, de)) : p("", !0),
|
|
264
|
+
S.value ? p("", !0) : (a(), F(ie, {
|
|
254
265
|
key: 2,
|
|
255
266
|
config: {
|
|
256
267
|
type: "sparkHistogram",
|
|
@@ -264,7 +275,7 @@ const ue = { key: 0 }, ie = { key: 1 }, ne = ["xmlns", "viewBox"], re = ["id"],
|
|
|
264
275
|
}, null, 8, ["config"]))
|
|
265
276
|
], 36));
|
|
266
277
|
}
|
|
267
|
-
},
|
|
278
|
+
}, Ie = /* @__PURE__ */ ne(Se, [["__scopeId", "data-v-7a469df4"]]);
|
|
268
279
|
export {
|
|
269
|
-
|
|
280
|
+
Ie as default
|
|
270
281
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BTgtr0F8.cjs"),_=require("./useNestedProp-CisbRRo_.cjs"),F=require("./Shape-yPECDLiP.cjs"),M=require("./vue-ui-skeleton-CMQzFTs9.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H={key:0},q={key:1},I=["xmlns","viewBox"],U=["id"],W=["stop-color"],O=["stop-color"],j=["id"],P=["stop-color"],G=["stop-color"],T=["id"],X=["stop-color"],Y=["stop-color"],R={key:0},J=["x","y","height","width","fill","stroke","stroke-width","rx"],K={key:1},Q=["x","y","font-size","font-weight","fill"],Z=["x","y","font-size","fill"],ee=["x","y","font-size","fill"],te=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],le={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(x,{emit:B}){const u=x;e.useCssVars(o=>({"627459c9":S.value}));const{vue_ui_sparkhistogram:$}=a.useConfig(),h=e.computed(()=>!!u.dataset&&u.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):u.dataset.forEach((o,s)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:s})})})}const v=e.ref(a.createUid()),t=e.computed({get:()=>b(),set:o=>o});function b(){const o=_.useNestedProp({userConfig:u.config,defaultConfig:$});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||u.config,defaultConfig:o})}:o}e.watch(()=>u.config,o=>{t.value=b(),k()},{deep:!0});const c=e.computed(()=>{const o=t.value.style.layout.height,s=t.value.style.layout.width,l=t.value.style.layout.padding.top,n=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=s-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,g=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=s-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:n,centerY:p,drawingHeight:g,drawingWidth:m,height:o,left:d,right:y,top:l,width:s}}),E=e.computed(()=>Math.max(...u.dataset.map(o=>Math.abs(o.value||0))));function w(o){return Math.abs(o)/E.value}const i=e.computed(()=>u.dataset.map((o,s)=>{const l=w(o.value||0),n=c.value.drawingHeight*l,d=c.value.drawingWidth/u.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,g=c.value.centerY-n/2,m=c.value.left+(y/2+s*d),N=c.value.left+s*d,f=typeof o.intensity>"u"?100:Math.round(o.intensity*100),L=o.color?o.color:o.value>=0?`${t.value.style.bars.colors.positive}${a.opacity[f]}`:`${t.value.style.bars.colors.negative}${a.opacity[f]}`,V=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,z=o.color?`url(#gradient_datapoint_${s}_${v.value})`:o.value>=0?`url(#gradient_positive_${s}_${v.value})`:`url(#gradient_negative_${s}_${v.value})`,D=m+p/2;return{...o,color:L,gradient:z,height:n,intensity:f,proportion:l,stroke:V,textAnchor:D,trapX:N,unitWidth:d,width:p,x:m,y:g}})),r=e.ref(null);function C(o,s){B("selectDatapoint",{datapoint:o,index:s})}const S=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,s)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:s[1]||(s[1]=l=>r.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),r.value!==null?(e.openBlock(),e.createElementBlock("span",H,"- "+e.toDisplayString(i.value[r.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[r.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[r.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[r.value],seriesIndex:r.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(r.value)&&![null,void 0].includes(i.value[r.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",q,"("+e.toDisplayString(i.value[r.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${n}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.positive}${e.unref(a.opacity)[l.intensity]}`},null,8,O)],8,U))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${n}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.bars.colors.negative}${e.unref(a.opacity)[l.intensity]}`},null,8,G)],8,j))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${n}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(l.color,.05)}${e.unref(a.opacity)[l.intensity]}`},null,8,X),e.createElementVNode("stop",{offset:"100%","stop-color":`${l.color}${e.unref(a.opacity)[l.intensity]}`},null,8,Y)],8,T))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,J))),256))])):(e.openBlock(),e.createElementBlock("g",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createBlock(F._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(t.value.style.labels.value.prefix)+e.toDisplayString(isNaN(l.value)?"":Number(l.value.toFixed(t.value.style.labels.value.rounding)).toLocaleString())+e.toDisplayString(t.value.style.labels.value.suffix),9,Q))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,Z)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:c.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,ee)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:c.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>r.value=n,onMouseleave:s[0]||(s[0]=d=>r.value=null),stroke:r.value!==null&&r.value===n?t.value.style.selector.stroke:"","stroke-width":r.value!==null&&r.value===n?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>C(l,n)},null,40,te)]))),256))],8,I)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},oe=A._export_sfc(le,[["__scopeId","data-v-7a469df4"]]);exports.default=oe;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BTgtr0F8.cjs"),I=require("./useNestedProp-CisbRRo_.cjs"),G=require("./vue-ui-skeleton-CMQzFTs9.cjs"),S=require("./useResponsive-B3TrDDIG.cjs"),O=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["id"],R=["xmlns","viewBox"],H=["id"],U=["stop-color"],X=["stop-color"],Z=["id"],Y=["stop-color"],J=["stop-color"],K=["id"],Q=["stop-color"],ee=["stop-color"],te={key:0},le=["d","fill"],ae=["d","fill"],oe=["d","stroke","stroke-width"],ne=["x1","x2","y1","y2","stroke","stroke-width"],ue=["x","y","width","height","fill","rx"],re=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],se=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],ie=["cx","cy","r","fill","stroke","stroke-width"],de=["x","y","font-size","font-weight","fill"],ce=["x","y","height","width","onMouseenter","onClick"],ve={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0}},emits:["hoverIndex","selectDatapoint"],setup(f,{emit:_}){const i=f,{vue_ui_sparkline:M}=u.useConfig(),g=e.computed(()=>!!i.dataset&&i.dataset.length),v=e.ref(u.createUid()),x=e.ref(null),B=e.ref(null),t=e.computed({get:()=>L(),set:l=>l});function L(){const l=I.useNestedProp({userConfig:i.config,defaultConfig:M});return l.theme?{...I.useNestedProp({userConfig:u.themes.vue_ui_sparkline[l.theme]||i.config,defaultConfig:l})}:l}e.watch(()=>i.config,l=>{t.value=L(),C(),o.value.chartWidth=t.value.style.chartWidth},{deep:!0}),e.watch(()=>i.dataset,l=>{p.value=i.dataset.map(n=>({...n,value:[void 0].includes(n.value)?null:n.value}))},{deep:!0});const p=e.ref(z());function z(){return i.dataset.map(l=>t.value.style.animation.show?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value})}const $=e.ref(null);e.onMounted(()=>{if(C(),t.value.style.animation.show&&i.dataset.length>1){let a=function(){n<i.dataset.length?(p.value.push(i.dataset[n]),setTimeout(()=>{requestAnimationFrame(a)},l)):p.value=i.dataset,n+=1};p.value=[];const l=t.value.style.animation.animationFrames/i.dataset.length;let n=0;a()}});function C(){if(u.objectIsEmpty(i.dataset)?u.error({componentName:"VueUiSparkline",type:"dataset"}):i.dataset.forEach((l,n)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{u.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.responsive){const l=S.throttle(()=>{const{width:n,height:a}=S.useResponsive({chart:x.value,title:t.value.style.title.show&&i.showInfo?B.value:null});o.value.width=n,o.value.height=a,o.value.chartWidth=t.value.style.chartWidth/500*n,o.value.padding=.06*n});$.value=new ResizeObserver(l),$.value.observe(x.value.parentNode)}}const o=e.ref({height:80,width:500,chartWidth:t.value.style.chartWidth,padding:30}),P=e.ref(6),r=e.computed(()=>({top:12,left:0,right:o.value.width,bottom:o.value.height-3,start:i.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?o.value.width-o.value.chartWidth:o.value.padding,width:i.showInfo&&t.value.style.dataLabel.show?o.value.chartWidth:o.value.width-o.value.padding,height:o.value.height-12})),w=e.computed(()=>Math.min(...p.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),D=e.computed(()=>Math.max(...p.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),m=e.computed(()=>{const l=w.value>=0?0:w.value;return Math.abs(l)}),W=e.computed(()=>D.value+m.value+P.value),b=e.computed(()=>r.value.bottom-r.value.height*N(m.value));function N(l){return l/W.value}const h=e.computed(()=>i.dataset.length-1),s=e.computed(()=>p.value.map((l,n)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0;return{absoluteValue:a,period:l.period,plotValue:a+m.value,toMax:N(a+m.value),x:r.value.start+n*(r.value.width/(h.value+1)>o.padding?o.padding:r.value.width/(h.value+1)),y:r.value.bottom-r.value.height*N(a+m.value),id:`plot_${v.value}_${n}`,color:k.value?t.value.style.bar.color:t.value.style.area.useGradient?u.shiftHue(t.value.style.line.color,.05*(1-n/h.value)):t.value.style.line.color,width:r.value.width/(h.value+1)>o.padding?o.padding:r.value.width/(h.value+1)}})),A=e.computed(()=>{const l={x:s.value[0].x,y:o.value.height-6},n={x:s.value[s.value.length-1].x,y:o.value.height-6},a=[];return s.value.forEach(d=>{a.push(`${d.x},${d.y} `)}),[l.x,l.y,...a,n.x,n.y].toString()}),c=e.ref(void 0);function F(l,n){c.value=l,_("hoverIndex",{index:n})}function T(){c.value=void 0,_("hoverIndex",{index:void 0})}const y=e.computed(()=>{if(g.value){const l=s.value.map(a=>a.absoluteValue),n=l.reduce((a,d)=>a+d,0);return{latest:s.value[s.value.length-1].absoluteValue,sum:n,average:n/s.value.length,median:u.calcMedian(l),trend:u.calcLinearProgression(s.value.map(({x:a,y:d,absoluteValue:E})=>({x:a,y:d,value:E}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),V=e.computed(()=>g.value?t.value.style.dataLabel.valueType==="latest"?y.value.latest:t.value.style.dataLabel.valueType==="sum"?y.value.sum:t.value.style.dataLabel.valueType==="average"?y.value.average:0:0),k=e.computed(()=>t.value.type&&t.value.type==="bar");function q(l,n){_("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:x,class:"vue-ui-sparkline",id:v.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily}`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:c.value,latest:y.value.latest,sum:y.value.sum,average:y.value.average,median:y.value.median,trend:y.value.trend})),void 0,!0),t.value.style.title.show&&f.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:B,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(c.value?c.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(u.shiftHue)(t.value.style.area.color,.05)}${e.unref(u.opacity)[t.value.style.area.opacity]}`},null,8,U),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.area.color+e.unref(u.opacity)[t.value.style.area.opacity]},null,8,X)],8,H),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.bar.color,.05)}`},null,8,J)],8,Z),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(u.shiftHue)(t.value.style.bar.color,.05)}`},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,ee)],8,K)]),t.value.style.area.show&&!k.value&&s.value[0]?(e.openBlock(),e.createElementBlock("g",te,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${s.value[0].x},${r.value.bottom} ${e.unref(u.createSmoothPath)(s.value)} L ${s.value.at(-1).x},${r.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(u.opacity)[t.value.style.area.opacity]}`},null,8,le)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${A.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:`${t.value.style.area.color}${e.unref(u.opacity)[t.value.style.area.opacity]}`},null,8,ae))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(u.createSmoothPath)(s.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,oe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("g",null,[d<s.value.length-1&&!t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:s.value[d+1].x,y1:a.y,y2:s.value[d+1].y,stroke:a.color,"stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"geometricPrecision"},null,8,ne)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x-a.width/2,y:a.absoluteValue>0?a.y:b.value,width:a.width,height:Math.abs(a.y-b.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,ue)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(c.value&&a.id===c.value.id||f.selectedIndex===d)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:r.value.top-6,y2:r.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,re)):e.createCommentVNode("",!0)]))),256)),w.value<0?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.start,x2:r.value.start+r.value.width-16,y1:b.value,y2:b.value,stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,se)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&a.id===c.value.id||f.selectedIndex===d?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,ie)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),f.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:r.value.width+12+t.value.style.dataLabel.offsetX,y:o.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(c.value?e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,c.value.absoluteValue,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:c.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:c.value}):e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,V.value,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:V.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,de)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(r.value.width/(h.value+1)>o.value.padding?o.value.padding:r.value.width/(h.value+1))/2,y:r.value.top-6,height:r.value.height+6,width:r.value.width/(h.value+1)>o.value.padding?o.value.padding:r.value.width/(h.value+1),fill:"transparent",onMouseenter:E=>F(a,d),onMouseleave:T,onClick:()=>q(a,d)},null,40,ce))),256)),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],12,R)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(G.default,{key:2,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,j))}},he=O._export_sfc(ve,[["__scopeId","data-v-f99c381b"]]);exports.default=he;
|