vue-data-ui 2.3.25 → 2.3.27
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/README.md +13 -7
- package/dist/{Arrow-01eXaB81.cjs → Arrow-HROOtfWV.cjs} +1 -1
- package/dist/{Arrow-zObQ2VxA.js → Arrow-O38M_J_k.js} +1 -1
- package/dist/{BaseIcon-BkdELEYE.cjs → BaseIcon-CiO8gP9x.cjs} +1 -1
- package/dist/{BaseIcon-CHBghp3_.js → BaseIcon-D8FXGup9.js} +4 -3
- package/dist/{DataTable-D_2ZW2eI.cjs → DataTable-C6HTLT7L.cjs} +1 -1
- package/dist/{DataTable-Dytj5HQM.js → DataTable-EqeVt-K-.js} +2 -2
- package/dist/{Legend-Ct8LnAy4.js → Legend-8eVERYMn.js} +1 -1
- package/dist/{Legend-tvvMRnbi.cjs → Legend-C_lBCmBu.cjs} +1 -1
- package/dist/{Shape-dvRttq7z.cjs → Shape-D8RdmYWq.cjs} +1 -1
- package/dist/{Shape-qo5jcJq9.js → Shape-DvcgW6uK.js} +1 -1
- package/dist/{Slicer-DcjEg-ZZ.cjs → Slicer-BvYL7yVK.cjs} +1 -1
- package/dist/{Slicer-BNgHaM2_.js → Slicer-CH_5wnFM.js} +1 -1
- package/dist/{Title-CSQdI1EY.cjs → Title-B9iq63n1.cjs} +1 -1
- package/dist/{Title-BcNPXpKX.js → Title-C3Ez1ceq.js} +1 -1
- package/dist/{Tooltip-etzDGo1Y.js → Tooltip-7SRMoiu-.js} +1 -1
- package/dist/{Tooltip-B-laoopT.cjs → Tooltip-DcDEanxk.cjs} +1 -1
- package/dist/documentation/installation.md +3 -2
- package/dist/index-BQOxn6SH.cjs +4 -0
- package/dist/{index-BE6fhUyH.js → index-DiWO-_ca.js} +874 -537
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +169 -33
- package/dist/types/vue-data-ui.d.ts +169 -33
- package/dist/{useNestedProp-B_z4-n52.cjs → useNestedProp-BtqgWTf9.cjs} +1 -1
- package/dist/{useNestedProp-BcjRW6BJ.js → useNestedProp-DNX5EefQ.js} +1 -1
- package/dist/{usePrinter-CdIphKpF.js → usePrinter-BD40aUzH.js} +1 -1
- package/dist/{usePrinter-hyuaFHQj.cjs → usePrinter-Q1J--baX.cjs} +1 -1
- package/dist/{vue-data-ui-DH3---6Y.js → vue-data-ui-GHpxkf8a.js} +64 -62
- package/dist/vue-data-ui-yd5q4Ura.cjs +9 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +37 -36
- package/dist/{vue-ui-3d-bar-CPpeRsrz.js → vue-ui-3d-bar-CAmoj5dT.js} +7 -7
- package/dist/{vue-ui-3d-bar-ddx9_3_T.cjs → vue-ui-3d-bar-DkJ4c3HQ.cjs} +1 -1
- package/dist/{vue-ui-accordion-Dmz7RUKz.js → vue-ui-accordion-CiNdgRO9.js} +3 -3
- package/dist/{vue-ui-accordion-CvZhABQM.cjs → vue-ui-accordion-ogVvFfQy.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DiOdrFIV.js → vue-ui-age-pyramid-BrTpbEha.js} +8 -8
- package/dist/{vue-ui-age-pyramid-BieAbkr7.cjs → vue-ui-age-pyramid-CkKVbbl8.cjs} +1 -1
- package/dist/{vue-ui-annotator-KClMRKPi.js → vue-ui-annotator-B9IqZ-Hy.js} +1 -1
- package/dist/{vue-ui-annotator-CugE3IpZ.cjs → vue-ui-annotator-QbetAXoj.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DErkX5mF.cjs → vue-ui-candlestick-BvRwlc3d.cjs} +1 -1
- package/dist/{vue-ui-candlestick-D9MajMEG.js → vue-ui-candlestick-XjjwFaDO.js} +9 -9
- package/dist/{vue-ui-carousel-table-CsCEcaWp.cjs → vue-ui-carousel-table-DtxcnSEp.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-CLwi79Ly.js → vue-ui-carousel-table-KYENY5gp.js} +4 -4
- package/dist/{vue-ui-chestnut-BTvQSTQi.cjs → vue-ui-chestnut-C7gFvKLJ.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BnmDdakJ.js → vue-ui-chestnut-DfIcguJd.js} +6 -6
- package/dist/{vue-ui-cursor-KjKhIKTP.js → vue-ui-cursor-C4pJe90O.js} +2 -2
- package/dist/{vue-ui-cursor-Dj8pAXbc.cjs → vue-ui-cursor-COS_MXr8.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Dm-rDSRt.js → vue-ui-dashboard-B_NUnxEF.js} +2 -2
- package/dist/{vue-ui-dashboard-BTpiCLaT.cjs → vue-ui-dashboard-DNOjWStr.cjs} +1 -1
- package/dist/{vue-ui-digits-BVVOQfoO.cjs → vue-ui-digits-Vx5prxaT.cjs} +1 -1
- package/dist/{vue-ui-digits-WgEKLYdq.js → vue-ui-digits-uufqLbRt.js} +2 -2
- package/dist/{vue-ui-donut-BjHWw_Mw.js → vue-ui-donut-C33U3e8H.js} +9 -9
- package/dist/{vue-ui-donut-DvDqj2od.cjs → vue-ui-donut-CeHnjIGu.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CWBsLGUw.js → vue-ui-donut-evolution-IzfAVo5I.js} +9 -9
- package/dist/{vue-ui-donut-evolution-C0TW-uGR.cjs → vue-ui-donut-evolution-hHfvz1Yd.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BlsLMdW8.js → vue-ui-dumbbell-KvrVLLw6.js} +8 -8
- package/dist/{vue-ui-dumbbell-Uhw6rKrw.cjs → vue-ui-dumbbell-z_Ck4W33.cjs} +1 -1
- package/dist/{vue-ui-flow-KijZNPzD.js → vue-ui-flow-BjMikE9b.js} +7 -7
- package/dist/{vue-ui-flow-fnDs0_mH.cjs → vue-ui-flow-Dg4dkrcd.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BBiGsB2G.cjs → vue-ui-galaxy-B8EoId23.cjs} +1 -1
- package/dist/{vue-ui-galaxy-_y9H-beS.js → vue-ui-galaxy-BdgveN18.js} +9 -9
- package/dist/{vue-ui-gauge-CGgQqTqT.js → vue-ui-gauge-D01FLnNz.js} +5 -5
- package/dist/{vue-ui-gauge-Bv4YKgIj.cjs → vue-ui-gauge-D8pokfoA.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DFWR7qEg.cjs → vue-ui-gizmo-8lKc8m8b.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DjAFk58g.js → vue-ui-gizmo-Cp-EftjP.js} +2 -2
- package/dist/{vue-ui-heatmap-D1AMro3o.js → vue-ui-heatmap-BEsvmj5R.js} +8 -8
- package/dist/{vue-ui-heatmap-B5McL3SD.cjs → vue-ui-heatmap-DvpvKq3Q.cjs} +1 -1
- package/dist/{vue-ui-kpi-BW2na3Yu.js → vue-ui-kpi-D6rVKouk.js} +2 -2
- package/dist/{vue-ui-kpi-Bb7xdAFU.cjs → vue-ui-kpi-PWurAGxE.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-22dagCEY.cjs → vue-ui-mini-loader-BsypWozL.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-CKZ-PEf5.js → vue-ui-mini-loader-YV68i0nk.js} +2 -2
- package/dist/{vue-ui-molecule-BK8HPWvg.js → vue-ui-molecule-BWYCf3Km.js} +9 -9
- package/dist/{vue-ui-molecule-CWpBfXyk.cjs → vue-ui-molecule-Bx3fXHnw.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BZE6rvtb.cjs → vue-ui-mood-radar-C6devC4e.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CXq465Aj.js → vue-ui-mood-radar-DsZozq6x.js} +9 -9
- package/dist/{vue-ui-nested-donuts-Ca-b8_P3.cjs → vue-ui-nested-donuts-BtT3VsSf.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BSYKxbNL.js → vue-ui-nested-donuts-qaViBhR3.js} +9 -9
- package/dist/{vue-ui-onion-CMv38G-g.js → vue-ui-onion-0iFsjuLM.js} +9 -9
- package/dist/{vue-ui-onion-DvRn35KQ.cjs → vue-ui-onion-9ATTDUpw.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-C50SGcJo.cjs → vue-ui-parallel-coordinate-plot-BkZOKTIS.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DBZUno5l.js → vue-ui-parallel-coordinate-plot-DxDFs1Lb.js} +10 -10
- package/dist/{vue-ui-quadrant-CJo9jqLm.cjs → vue-ui-quadrant-DD4H_Dhk.cjs} +1 -1
- package/dist/{vue-ui-quadrant-C-jh3Grv.js → vue-ui-quadrant-Tw7SKMbQ.js} +10 -10
- package/dist/{vue-ui-quick-chart-BvTLEmD_.js → vue-ui-quick-chart-CpFHKtpm.js} +6 -6
- package/dist/{vue-ui-quick-chart-BJ6lIxf6.cjs → vue-ui-quick-chart-D1udOl47.cjs} +1 -1
- package/dist/{vue-ui-radar-CWgrIgHA.cjs → vue-ui-radar-CZmJDj3q.cjs} +1 -1
- package/dist/{vue-ui-radar-Kh4Qt05I.js → vue-ui-radar-D5FV2IDm.js} +10 -10
- package/dist/{vue-ui-rating-DJsfvOxZ.cjs → vue-ui-rating-DTWIh_CV.cjs} +1 -1
- package/dist/{vue-ui-rating-D7AkYGtK.js → vue-ui-rating-Dds9tjxd.js} +2 -2
- package/dist/{vue-ui-relation-circle-CXQ9FHnG.js → vue-ui-relation-circle-B2p8F7-L.js} +5 -5
- package/dist/{vue-ui-relation-circle-DRquG6N9.cjs → vue-ui-relation-circle-Cu9lKkX3.cjs} +1 -1
- package/dist/{vue-ui-rings-BuuiGgkQ.js → vue-ui-rings-BKzCFSx-.js} +9 -9
- package/dist/{vue-ui-rings-DAuDNTak.cjs → vue-ui-rings-DN7XmhKZ.cjs} +1 -1
- package/dist/{vue-ui-scatter-Ba_1vbfG.js → vue-ui-scatter-CwV9l1P7.js} +10 -10
- package/dist/{vue-ui-scatter-Db1WHHMt.cjs → vue-ui-scatter-DJlC5mz4.cjs} +1 -1
- package/dist/{vue-ui-screenshot-rDwd1nNP.js → vue-ui-screenshot-Bo6i-aRF.js} +1 -1
- package/dist/{vue-ui-screenshot-BgvHfkel.cjs → vue-ui-screenshot-CnPWz57l.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Df1qBO2k.cjs → vue-ui-skeleton-CcrGR_Vh.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DZk__alb.js → vue-ui-skeleton-CeNL0kH-.js} +2 -2
- package/dist/{vue-ui-smiley-KQFOL39h.cjs → vue-ui-smiley-BBcmwq4z.cjs} +1 -1
- package/dist/{vue-ui-smiley-BPebp5hG.js → vue-ui-smiley-BGMzw-SW.js} +2 -2
- package/dist/{vue-ui-spark-trend-CSdQHPuY.js → vue-ui-spark-trend-CSC9zmt7.js} +4 -4
- package/dist/{vue-ui-spark-trend-Cr2Coq5M.cjs → vue-ui-spark-trend-DlvTlA9z.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-EhBZgeio.js → vue-ui-sparkbar-0CNZluKs.js} +3 -3
- package/dist/{vue-ui-sparkbar-BIdS6UA_.cjs → vue-ui-sparkbar-Di-BPkJ0.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DFlQ-olI.cjs → vue-ui-sparkgauge-B5g5nxUh.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DTUDMW-e.js → vue-ui-sparkgauge-DJPt0cLe.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-_zChXZnF.cjs → vue-ui-sparkhistogram-BhkYmR4U.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CJZN2ZKW.js → vue-ui-sparkhistogram-DpvQcFls.js} +4 -4
- package/dist/{vue-ui-sparkline-IWbHN7-r.cjs → vue-ui-sparkline-Bw3y-88R.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B0OAXqfq.js → vue-ui-sparkline-CDSg9rhl.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-C6tBsD3M.cjs → vue-ui-sparkstackbar-Ckcir2dk.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-wPYlidft.js → vue-ui-sparkstackbar-DveNwcVx.js} +3 -3
- package/dist/vue-ui-stackbar-CZUsUeZ_.js +750 -0
- package/dist/vue-ui-stackbar-jNWFgXiA.cjs +15 -0
- package/dist/{vue-ui-strip-plot-BAcR2Zug.cjs → vue-ui-strip-plot-CzHFNhr3.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Bm0JThi4.js → vue-ui-strip-plot-lVVqtsNc.js} +9 -9
- package/dist/{vue-ui-table-6ZR-bgMx.js → vue-ui-table-8hNkBy1z.js} +1 -1
- package/dist/{vue-ui-table-heatmap-bJUl4rY6.js → vue-ui-table-heatmap-BAPA4nvf.js} +4 -4
- package/dist/{vue-ui-table-heatmap-B2Xe1T4D.cjs → vue-ui-table-heatmap-HgHQKSax.cjs} +1 -1
- package/dist/{vue-ui-table-B0FlP2RX.cjs → vue-ui-table-qtBWpg0m.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Dxinc_iR.js → vue-ui-table-sparkline-DZY_23mg.js} +5 -5
- package/dist/{vue-ui-table-sparkline-DgZQmNaq.cjs → vue-ui-table-sparkline-Q8y6tloS.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BN1harXD.cjs → vue-ui-thermometer-Cbu9jVvC.cjs} +1 -1
- package/dist/{vue-ui-thermometer-Nb1pgJ04.js → vue-ui-thermometer-CcH1qmLq.js} +5 -5
- package/dist/{vue-ui-timer-_44ECu7b.cjs → vue-ui-timer-C52mSn4m.cjs} +1 -1
- package/dist/{vue-ui-timer-C17OoYkC.js → vue-ui-timer-DJfYr02u.js} +4 -4
- package/dist/{vue-ui-tiremarks-lbnWHaOP.js → vue-ui-tiremarks-CcLcd5oA.js} +5 -5
- package/dist/{vue-ui-tiremarks-BSMuOb-Z.cjs → vue-ui-tiremarks-dNuNMt_R.cjs} +1 -1
- package/dist/{vue-ui-treemap-CbdnMlBb.js → vue-ui-treemap-BOz94BVK.js} +9 -9
- package/dist/{vue-ui-treemap-DinP2PhP.cjs → vue-ui-treemap-orjA7Y0U.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-B7cKvp6J.cjs → vue-ui-vertical-bar-BHIt5cjc.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-B9HnpW6M.js → vue-ui-vertical-bar-BquCm_UG.js} +9 -9
- package/dist/{vue-ui-waffle-70I35yZY.js → vue-ui-waffle-CNlp7RTS.js} +254 -250
- package/dist/vue-ui-waffle-Dv8pXiYm.cjs +1 -0
- package/dist/{vue-ui-wheel-DZbEyD4l.cjs → vue-ui-wheel-BVjbh4oM.cjs} +1 -1
- package/dist/{vue-ui-wheel-C8YTOjwd.js → vue-ui-wheel-DMRiVkhu.js} +5 -5
- package/dist/{vue-ui-word-cloud-Don3Oz-A.js → vue-ui-word-cloud-CHRE8f_k.js} +6 -6
- package/dist/{vue-ui-word-cloud-DkJyoTg9.cjs → vue-ui-word-cloud-CZum_IjT.cjs} +1 -1
- package/dist/{vue-ui-xy-DkBLRZ6y.cjs → vue-ui-xy-BOoG4xg8.cjs} +1 -1
- package/dist/{vue-ui-xy-XJp90Tih.js → vue-ui-xy-CsFr8tix.js} +12 -12
- package/dist/{vue-ui-xy-canvas-Do2LgfMo.cjs → vue-ui-xy-canvas-BHa3-phi.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CsPcJxOA.js → vue-ui-xy-canvas-Bb2Z3E-7.js} +10 -10
- package/package.json +2 -1
- package/dist/index-BFH7X8WG.cjs +0 -4
- package/dist/vue-data-ui-dbgbgXfB.cjs +0 -9
- package/dist/vue-ui-waffle-BaqQnh1w.cjs +0 -1
|
@@ -0,0 +1,750 @@
|
|
|
1
|
+
import { computed as y, ref as h, onMounted as xe, openBlock as u, createElementBlock as i, normalizeClass as ke, normalizeStyle as A, renderSlot as p, createVNode as Q, createCommentVNode as d, createBlock as I, unref as C, createSlots as Ae, withCtx as m, normalizeProps as M, guardReactiveProps as O, Fragment as x, renderList as $, createElementVNode as R, toDisplayString as z, createTextVNode as Ie } from "vue";
|
|
2
|
+
import { u as He, c as we, o as Ee, e as Ce, g as Be, t as Ue, a as We, p as G, b as Ge, d as Xe, Z as Ye, z as j, X as Je, l as qe, C as Ze, f as H, r as Ke, v as $e, w as Qe, n as je, q as et } from "./index-DiWO-_ca.js";
|
|
3
|
+
import { u as Le } from "./useNestedProp-DNX5EefQ.js";
|
|
4
|
+
import { t as tt, u as at } from "./useResponsive-NZB-WLRF.js";
|
|
5
|
+
import { u as lt, U as ot } from "./usePrinter-BD40aUzH.js";
|
|
6
|
+
import { S as rt } from "./Slicer-CH_5wnFM.js";
|
|
7
|
+
import { _ as st } from "./Tooltip-7SRMoiu-.js";
|
|
8
|
+
import { _ as ut } from "./Title-C3Ez1ceq.js";
|
|
9
|
+
import { L as it } from "./Legend-8eVERYMn.js";
|
|
10
|
+
import nt from "./vue-ui-accordion-CiNdgRO9.js";
|
|
11
|
+
import { D as ct } from "./DataTable-EqeVt-K-.js";
|
|
12
|
+
import vt from "./vue-ui-skeleton-CeNL0kH-.js";
|
|
13
|
+
import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const ht = ["id"], gt = ["xmlns", "viewBox"], yt = { key: 0 }, bt = ["id"], ft = ["stop-color"], pt = ["stop-color"], mt = ["stop-color"], xt = ["x1", "x2", "y1", "y2", "stroke"], kt = ["x1", "x2", "y1", "y2", "stroke"], wt = ["d", "fill", "stroke", "stroke-width"], Ct = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], $t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Lt = ["x", "y", "font-size", "fill", "font-weight"], _t = ["transform", "font-size", "fill", "font-weight"], St = ["x", "y", "font-size", "fill", "font-weight"], Tt = { key: 0 }, zt = ["x", "y", "font-size", "font-weight", "fill"], Nt = ["x1", "x2", "y1", "y2", "stroke"], Rt = ["x", "y", "font-size", "font-weight", "fill"], Pt = ["text-anchor", "font-size", "font-weight", "fill", "transform"], Ft = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], Mt = {
|
|
15
|
+
key: 3,
|
|
16
|
+
class: "vue-data-ui-watermark"
|
|
17
|
+
}, Ot = ["onClick"], Dt = ["innerHTML"], Vt = {
|
|
18
|
+
__name: "vue-ui-stackbar",
|
|
19
|
+
props: {
|
|
20
|
+
config: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default() {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
dataset: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default() {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: ["selectDatapoint", "selectLegend"],
|
|
34
|
+
setup(ee, { expose: _e, emit: te }) {
|
|
35
|
+
const _ = ee, { vue_ui_stackbar: Se } = He(), P = y({
|
|
36
|
+
get() {
|
|
37
|
+
return !!_.dataset && _.dataset.length;
|
|
38
|
+
},
|
|
39
|
+
set(a) {
|
|
40
|
+
return a;
|
|
41
|
+
}
|
|
42
|
+
}), D = h(null), X = h(we()), Y = h(!1), ae = h(null), J = h(""), L = h([]), le = h(0), oe = h(null), re = h(null), se = h(null), ue = h(0), q = h(!1), Z = h(null);
|
|
43
|
+
xe(() => {
|
|
44
|
+
Ee(_.dataset) ? Ce({
|
|
45
|
+
componentName: "VueUiStackbar",
|
|
46
|
+
type: "dataset"
|
|
47
|
+
}) : _.dataset.forEach((a, l) => {
|
|
48
|
+
Be({
|
|
49
|
+
datasetObject: a,
|
|
50
|
+
requiredAttributes: ["name", "series"]
|
|
51
|
+
}).forEach((t) => {
|
|
52
|
+
P.value = !1, Ce({
|
|
53
|
+
componentName: "VueUiStackbar",
|
|
54
|
+
type: "datasetSerieAttribute",
|
|
55
|
+
property: t,
|
|
56
|
+
index: l
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
const e = y(() => {
|
|
62
|
+
const a = Le({
|
|
63
|
+
userConfig: _.config,
|
|
64
|
+
defaultConfig: Se
|
|
65
|
+
});
|
|
66
|
+
return a.theme ? {
|
|
67
|
+
...Le({
|
|
68
|
+
userConfig: Ue.vue_ui_stackbar[a.theme] || _.config,
|
|
69
|
+
defaultConfig: a
|
|
70
|
+
}),
|
|
71
|
+
customPalette: We[a.theme] || G
|
|
72
|
+
} : a;
|
|
73
|
+
}), w = h({
|
|
74
|
+
dataLabels: {
|
|
75
|
+
show: e.value.style.chart.bars.dataLabels.show
|
|
76
|
+
},
|
|
77
|
+
showTable: e.value.table.show,
|
|
78
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
79
|
+
}), { isPrinting: ie, isImaging: ne, generatePdf: ce, generateImage: ve } = lt({
|
|
80
|
+
elementId: `stackbar_${X.value}`,
|
|
81
|
+
fileName: e.value.style.chart.title.text || "vue-ui-stackbar"
|
|
82
|
+
}), E = h({
|
|
83
|
+
width: e.value.style.chart.width,
|
|
84
|
+
height: e.value.style.chart.height,
|
|
85
|
+
paddingRatio: {
|
|
86
|
+
top: e.value.style.chart.padding.top / e.value.style.chart.height,
|
|
87
|
+
right: e.value.style.chart.padding.right / e.value.style.chart.width,
|
|
88
|
+
bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
|
|
89
|
+
left: e.value.style.chart.padding.left / e.value.style.chart.width
|
|
90
|
+
}
|
|
91
|
+
}), Te = y(() => Ge(e.value.customPalette)), de = h(null);
|
|
92
|
+
xe(() => {
|
|
93
|
+
if (e.value.responsive) {
|
|
94
|
+
const a = tt(() => {
|
|
95
|
+
const { width: l, height: t } = at({
|
|
96
|
+
chart: D.value,
|
|
97
|
+
title: e.value.style.chart.title.text ? oe.value : null,
|
|
98
|
+
legend: e.value.style.chart.legend.show ? re.value : null,
|
|
99
|
+
slicer: e.value.style.chart.zoom.show && B.value > 1 ? se.value : null
|
|
100
|
+
});
|
|
101
|
+
E.value.width = l, E.value.height = t;
|
|
102
|
+
});
|
|
103
|
+
de.value = new ResizeObserver(a), de.value.observe(D.value.parentNode);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
const s = y(() => {
|
|
107
|
+
const { height: a, width: l } = E.value, { right: t } = E.value.paddingRatio, r = e.value.style.chart.padding.top, o = l - l * t, n = a - e.value.style.chart.padding.bottom, g = e.value.style.chart.padding.left, f = l - g - l * t, k = a - r - e.value.style.chart.padding.bottom;
|
|
108
|
+
return {
|
|
109
|
+
chartHeight: a,
|
|
110
|
+
chartWidth: l,
|
|
111
|
+
top: r,
|
|
112
|
+
right: o,
|
|
113
|
+
bottom: n,
|
|
114
|
+
left: g,
|
|
115
|
+
width: f,
|
|
116
|
+
height: k
|
|
117
|
+
};
|
|
118
|
+
}), F = y(() => _.dataset.map((a, l) => {
|
|
119
|
+
const t = Xe(a.color) || Te.value[l] || G[l] || G[l % G.length];
|
|
120
|
+
return {
|
|
121
|
+
...a,
|
|
122
|
+
absoluteIndex: l,
|
|
123
|
+
id: we(),
|
|
124
|
+
color: t
|
|
125
|
+
};
|
|
126
|
+
})), B = y(() => Math.max(...F.value.filter((a) => !L.value.includes(a.id)).map((a) => a.series.length))), c = h({
|
|
127
|
+
start: 0,
|
|
128
|
+
end: Math.max(..._.dataset.map((a) => a.series.length))
|
|
129
|
+
});
|
|
130
|
+
function ze() {
|
|
131
|
+
c.value = {
|
|
132
|
+
start: 0,
|
|
133
|
+
end: Math.max(..._.dataset.map((a) => a.series.length))
|
|
134
|
+
}, ue.value += 1;
|
|
135
|
+
}
|
|
136
|
+
const b = y(() => {
|
|
137
|
+
const a = s.value.width / (c.value.end - c.value.start);
|
|
138
|
+
return a <= 0 ? 0 : a;
|
|
139
|
+
}), N = y(() => Ye(F.value.filter((a) => !L.value.includes(a.id))).slice(c.value.start, c.value.end)), K = y(() => {
|
|
140
|
+
const a = Math.max(...N.value), l = j(0, a, e.value.style.chart.grid.scale.ticks);
|
|
141
|
+
return l.ticks.map((t) => ({
|
|
142
|
+
y: s.value.bottom - s.value.height * (t / l.max),
|
|
143
|
+
x: s.value.left - 8,
|
|
144
|
+
value: t
|
|
145
|
+
}));
|
|
146
|
+
}), U = y(() => e.value.style.chart.grid.x.timeLabels.values.slice(c.value.start, c.value.end)), v = y(() => {
|
|
147
|
+
if (!P.value) return [];
|
|
148
|
+
let a = Array(B.value).fill(0);
|
|
149
|
+
const l = s.value.height, t = Math.max(...N.value), o = j(0, t, e.value.style.chart.grid.scale.ticks).max;
|
|
150
|
+
return F.value.filter((n) => !L.value.includes(n.id)).map((n) => {
|
|
151
|
+
const g = n.series.slice(c.value.start, c.value.end);
|
|
152
|
+
return {
|
|
153
|
+
...n,
|
|
154
|
+
proportions: g.map((f, k) => e.value.style.chart.bars.distributed ? (f || 0) / N.value[k] : (f || 0) / o),
|
|
155
|
+
series: g,
|
|
156
|
+
x: g.map((f, k) => s.value.left + b.value * k + b.value * e.value.style.chart.bars.gapRatio / 4),
|
|
157
|
+
y: g.map((f, k) => {
|
|
158
|
+
const S = e.value.style.chart.bars.distributed ? (f || 0) / N.value[k] : (f || 0) / o, V = l * S, T = l - V - a[k];
|
|
159
|
+
return a[k] += V, T + s.value.top;
|
|
160
|
+
}),
|
|
161
|
+
height: g.map((f, k) => {
|
|
162
|
+
const S = e.value.style.chart.bars.distributed ? (f || 0) / N.value[k] : (f || 0) / o;
|
|
163
|
+
return l * S <= 0 ? 0 : l * S;
|
|
164
|
+
})
|
|
165
|
+
};
|
|
166
|
+
});
|
|
167
|
+
}), Ne = y(() => {
|
|
168
|
+
const a = Math.max(...N.value), t = j(0, a, e.value.style.chart.grid.scale.ticks).max;
|
|
169
|
+
return N.value.map((r, o) => ({
|
|
170
|
+
value: r,
|
|
171
|
+
y: (1 - r / t) * s.value.height
|
|
172
|
+
}));
|
|
173
|
+
});
|
|
174
|
+
function he(a) {
|
|
175
|
+
return H({
|
|
176
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
177
|
+
v: a,
|
|
178
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
179
|
+
r: e.value.style.chart.bars.dataLabels.rounding
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function Re(a) {
|
|
183
|
+
return H({
|
|
184
|
+
v: a,
|
|
185
|
+
s: "%",
|
|
186
|
+
r: e.value.style.chart.bars.dataLabels.rounding
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function Pe(a) {
|
|
190
|
+
const l = JSON.parse(JSON.stringify(v.value)).map((t) => ({
|
|
191
|
+
name: t.name,
|
|
192
|
+
value: t.series[a] === 0 ? 0 : t.series[a] || null,
|
|
193
|
+
proportion: t.proportions[a] || null,
|
|
194
|
+
color: t.color,
|
|
195
|
+
id: t.id
|
|
196
|
+
}));
|
|
197
|
+
te("selectDatapoint", { datapoint: l, period: U.value[a] });
|
|
198
|
+
}
|
|
199
|
+
function Fe(a) {
|
|
200
|
+
Z.value = a, Y.value = !0;
|
|
201
|
+
const l = e.value.style.chart.tooltip.customFormat, t = JSON.parse(JSON.stringify(v.value)).map((o) => ({
|
|
202
|
+
name: o.name,
|
|
203
|
+
value: o.series[a] === 0 ? 0 : o.series[a] || null,
|
|
204
|
+
proportion: o.proportions[a] || null,
|
|
205
|
+
color: o.color,
|
|
206
|
+
id: o.id
|
|
207
|
+
})), r = t.map((o) => o.value).reduce((o, n) => o + n, 0);
|
|
208
|
+
if ($e(l) && Qe(() => l({
|
|
209
|
+
seriesIndex: a,
|
|
210
|
+
datapoint: t,
|
|
211
|
+
series: v.value,
|
|
212
|
+
config: e.value
|
|
213
|
+
})))
|
|
214
|
+
J.value = l({
|
|
215
|
+
seriesIndex: a,
|
|
216
|
+
datapoint: t,
|
|
217
|
+
series: v.value,
|
|
218
|
+
config: e.value
|
|
219
|
+
});
|
|
220
|
+
else {
|
|
221
|
+
const {
|
|
222
|
+
showValue: o,
|
|
223
|
+
showPercentage: n,
|
|
224
|
+
borderColor: g,
|
|
225
|
+
roundingValue: f,
|
|
226
|
+
roundingPercentage: k
|
|
227
|
+
} = e.value.style.chart.tooltip;
|
|
228
|
+
let S = "";
|
|
229
|
+
U.value[a] && (S += `<div style="width:100%;text-align:center;border-bottom:1px solid ${g};padding-bottom:6px;margin-bottom:3px;">${U.value[a]}</div>`);
|
|
230
|
+
const V = [
|
|
231
|
+
o && n ? "(" : "",
|
|
232
|
+
o && n ? ")" : ""
|
|
233
|
+
];
|
|
234
|
+
t.reverse().forEach((T) => {
|
|
235
|
+
S += `
|
|
236
|
+
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
237
|
+
<svg viewBox="0 0 12 12" height="14" width="14"><rect rx="1" x="0" y="0" height="12" width="12" stroke="none" fill="${e.value.style.chart.bars.gradient.show ? `url(#gradient_${T.id})` : T.color}"/></svg>
|
|
238
|
+
${T.name}${o || n ? ":" : ""} ${o ? H({
|
|
239
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
240
|
+
v: T.value,
|
|
241
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
242
|
+
r: f
|
|
243
|
+
}) : ""} ${V[0]}${n ? H({
|
|
244
|
+
v: isNaN(T.value / r) ? 0 : T.value / r * 100,
|
|
245
|
+
s: "%",
|
|
246
|
+
r: k
|
|
247
|
+
}) : ""}${V[1]}
|
|
248
|
+
</div>
|
|
249
|
+
`;
|
|
250
|
+
}), J.value = `<div>${S}</div>`;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
function Me(a) {
|
|
254
|
+
q.value = a, le.value += 1;
|
|
255
|
+
}
|
|
256
|
+
function ge() {
|
|
257
|
+
w.value.showTable = !w.value.showTable;
|
|
258
|
+
}
|
|
259
|
+
function ye() {
|
|
260
|
+
w.value.dataLabels.show = !w.value.dataLabels.show;
|
|
261
|
+
}
|
|
262
|
+
function be() {
|
|
263
|
+
w.value.showTooltip = !w.value.showTooltip;
|
|
264
|
+
}
|
|
265
|
+
function Oe() {
|
|
266
|
+
return v.value;
|
|
267
|
+
}
|
|
268
|
+
const fe = y(() => {
|
|
269
|
+
if (v.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
|
|
270
|
+
const a = v.value.map(({ name: t, color: r }) => ({
|
|
271
|
+
label: t,
|
|
272
|
+
color: r
|
|
273
|
+
})), l = [];
|
|
274
|
+
for (let t = c.value.start; t < c.value.end; t += 1) {
|
|
275
|
+
const r = [e.value.style.chart.grid.x.timeLabels.values[t] || t + 1];
|
|
276
|
+
F.value.forEach((o) => {
|
|
277
|
+
r.push(Number((o.series[t] || 0).toFixed(e.value.table.td.roundingValue)));
|
|
278
|
+
}), l.push(r);
|
|
279
|
+
}
|
|
280
|
+
return { head: a, body: l };
|
|
281
|
+
});
|
|
282
|
+
function pe() {
|
|
283
|
+
const a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], l = ["", ...fe.value.head.map((n) => n.label)], t = fe.value.body, r = a.concat([l]).concat(t), o = je(r);
|
|
284
|
+
et({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-stackbar" });
|
|
285
|
+
}
|
|
286
|
+
const W = y(() => {
|
|
287
|
+
const a = [""].concat(v.value.map((o) => o.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');
|
|
288
|
+
let l = [];
|
|
289
|
+
for (let o = 0; o < B.value; o += 1) {
|
|
290
|
+
const n = v.value.map((g) => g.series[o] ?? 0).reduce((g, f) => g + f, 0);
|
|
291
|
+
l.push([e.value.style.chart.grid.x.timeLabels.values.slice(c.value.start, c.value.end)[o] ?? o + 1].concat(v.value.map((g) => (g.series[o] ?? 0).toFixed(e.value.table.rounding))).concat((n ?? 0).toFixed(e.value.table.rounding)));
|
|
292
|
+
}
|
|
293
|
+
const t = {
|
|
294
|
+
th: {
|
|
295
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
296
|
+
color: e.value.table.th.color,
|
|
297
|
+
outline: e.value.table.th.outline
|
|
298
|
+
},
|
|
299
|
+
td: {
|
|
300
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
301
|
+
color: e.value.table.td.color,
|
|
302
|
+
outline: e.value.table.td.outline
|
|
303
|
+
},
|
|
304
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
305
|
+
}, r = [e.value.table.columnNames.period].concat(v.value.map((o) => o.name)).concat(e.value.table.columnNames.total);
|
|
306
|
+
return { head: a, body: l.slice(0, c.value.end - c.value.start), config: t, colNames: r };
|
|
307
|
+
});
|
|
308
|
+
function De(a, l) {
|
|
309
|
+
if (te("selectLegend", v.value.find((t) => t.absoluteIndex === a)), L.value.includes(l.id))
|
|
310
|
+
L.value = L.value.filter((t) => t !== l.id);
|
|
311
|
+
else {
|
|
312
|
+
if (L.value.length === F.value.length - 1) return;
|
|
313
|
+
L.value.push(l.id);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
const me = y(() => F.value.map((a, l) => ({
|
|
317
|
+
...a,
|
|
318
|
+
shape: "square"
|
|
319
|
+
})).map((a) => ({
|
|
320
|
+
...a,
|
|
321
|
+
opacity: L.value.includes(a.id) ? 0.5 : 1,
|
|
322
|
+
segregate: () => De(a.absoluteIndex, a),
|
|
323
|
+
isSegregated: L.value.includes(a.id)
|
|
324
|
+
}))), Ve = y(() => ({
|
|
325
|
+
cy: "stackbar-legend",
|
|
326
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
327
|
+
color: e.value.style.chart.legend.color,
|
|
328
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
329
|
+
paddingBottom: 12,
|
|
330
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
331
|
+
}));
|
|
332
|
+
return _e({
|
|
333
|
+
getData: Oe,
|
|
334
|
+
generatePdf: ce,
|
|
335
|
+
generateCsv: pe,
|
|
336
|
+
generateImage: ve,
|
|
337
|
+
toggleTable: ge,
|
|
338
|
+
toggleLabels: ye,
|
|
339
|
+
toggleTooltip: be
|
|
340
|
+
}), (a, l) => (u(), i("div", {
|
|
341
|
+
id: `stackbar_${X.value}`,
|
|
342
|
+
ref_key: "stackbarChart",
|
|
343
|
+
ref: D,
|
|
344
|
+
class: ke({ "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": q.value }),
|
|
345
|
+
style: A(`background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`)
|
|
346
|
+
}, [
|
|
347
|
+
p(a.$slots, "userConfig", {}, void 0, !0),
|
|
348
|
+
e.value.style.chart.title.text ? (u(), i("div", {
|
|
349
|
+
key: 0,
|
|
350
|
+
ref_key: "chartTitle",
|
|
351
|
+
ref: oe,
|
|
352
|
+
style: A(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:24px`)
|
|
353
|
+
}, [
|
|
354
|
+
Q(ut, {
|
|
355
|
+
config: {
|
|
356
|
+
title: {
|
|
357
|
+
cy: "stackbar-title",
|
|
358
|
+
...e.value.style.chart.title
|
|
359
|
+
},
|
|
360
|
+
subtitle: {
|
|
361
|
+
cy: "stackbar-subtitle",
|
|
362
|
+
...e.value.style.chart.title.subtitle
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}, null, 8, ["config"])
|
|
366
|
+
], 4)) : d("", !0),
|
|
367
|
+
e.value.userOptions.show && P.value ? (u(), I(ot, {
|
|
368
|
+
ref: "details",
|
|
369
|
+
key: `user_option_${le.value}`,
|
|
370
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
371
|
+
color: e.value.style.chart.color,
|
|
372
|
+
isPrinting: C(ie),
|
|
373
|
+
isImaging: C(ne),
|
|
374
|
+
uid: X.value,
|
|
375
|
+
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
376
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
377
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
378
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
379
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
380
|
+
hasLabel: e.value.userOptions.buttons.labels,
|
|
381
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
382
|
+
isFullscreen: q.value,
|
|
383
|
+
chartElement: D.value,
|
|
384
|
+
isTooltip: w.value.showTooltip,
|
|
385
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
386
|
+
onToggleFullscreen: Me,
|
|
387
|
+
onGeneratePdf: C(ce),
|
|
388
|
+
onGenerateCsv: pe,
|
|
389
|
+
onGenerateImage: C(ve),
|
|
390
|
+
onToggleTable: ge,
|
|
391
|
+
onToggleLabels: ye,
|
|
392
|
+
onToggleTooltip: be
|
|
393
|
+
}, Ae({ _: 2 }, [
|
|
394
|
+
a.$slots.optionTooltip ? {
|
|
395
|
+
name: "optionTooltip",
|
|
396
|
+
fn: m(() => [
|
|
397
|
+
p(a.$slots, "optionTooltip", {}, void 0, !0)
|
|
398
|
+
]),
|
|
399
|
+
key: "0"
|
|
400
|
+
} : void 0,
|
|
401
|
+
a.$slots.optionPdf ? {
|
|
402
|
+
name: "optionPdf",
|
|
403
|
+
fn: m(() => [
|
|
404
|
+
p(a.$slots, "optionPdf", {}, void 0, !0)
|
|
405
|
+
]),
|
|
406
|
+
key: "1"
|
|
407
|
+
} : void 0,
|
|
408
|
+
a.$slots.optionCsv ? {
|
|
409
|
+
name: "optionCsv",
|
|
410
|
+
fn: m(() => [
|
|
411
|
+
p(a.$slots, "optionCsv", {}, void 0, !0)
|
|
412
|
+
]),
|
|
413
|
+
key: "2"
|
|
414
|
+
} : void 0,
|
|
415
|
+
a.$slots.optionImg ? {
|
|
416
|
+
name: "optionImg",
|
|
417
|
+
fn: m(() => [
|
|
418
|
+
p(a.$slots, "optionImg", {}, void 0, !0)
|
|
419
|
+
]),
|
|
420
|
+
key: "3"
|
|
421
|
+
} : void 0,
|
|
422
|
+
a.$slots.optionTable ? {
|
|
423
|
+
name: "optionTable",
|
|
424
|
+
fn: m(() => [
|
|
425
|
+
p(a.$slots, "optionTable", {}, void 0, !0)
|
|
426
|
+
]),
|
|
427
|
+
key: "4"
|
|
428
|
+
} : void 0,
|
|
429
|
+
a.$slots.optionLabels ? {
|
|
430
|
+
name: "optionLabels",
|
|
431
|
+
fn: m(() => [
|
|
432
|
+
p(a.$slots, "optionLabels", {}, void 0, !0)
|
|
433
|
+
]),
|
|
434
|
+
key: "5"
|
|
435
|
+
} : void 0,
|
|
436
|
+
a.$slots.optionFullscreen ? {
|
|
437
|
+
name: "optionFullscreen",
|
|
438
|
+
fn: m(({ toggleFullscreen: t, isFullscreen: r }) => [
|
|
439
|
+
p(a.$slots, "optionFullscreen", M(O({ toggleFullscreen: t, isFullscreen: r })), void 0, !0)
|
|
440
|
+
]),
|
|
441
|
+
key: "6"
|
|
442
|
+
} : void 0
|
|
443
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "isTooltip", "titles", "onGeneratePdf", "onGenerateImage"])) : d("", !0),
|
|
444
|
+
P.value ? (u(), i("svg", {
|
|
445
|
+
key: 2,
|
|
446
|
+
xmlns: C(Je),
|
|
447
|
+
viewBox: `0 0 ${s.value.chartWidth <= 0 ? 10 : s.value.chartWidth} ${s.value.chartHeight <= 0 ? 10 : s.value.chartHeight}`,
|
|
448
|
+
style: A(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
449
|
+
}, [
|
|
450
|
+
e.value.style.chart.bars.gradient.show ? (u(), i("defs", yt, [
|
|
451
|
+
(u(!0), i(x, null, $(v.value, (t, r) => (u(), i("linearGradient", {
|
|
452
|
+
id: `gradient_${t.id}`,
|
|
453
|
+
x1: "0%",
|
|
454
|
+
y1: "0%",
|
|
455
|
+
x2: "0%",
|
|
456
|
+
y2: "100%"
|
|
457
|
+
}, [
|
|
458
|
+
R("stop", {
|
|
459
|
+
offset: "0%",
|
|
460
|
+
"stop-color": t.color
|
|
461
|
+
}, null, 8, ft),
|
|
462
|
+
R("stop", {
|
|
463
|
+
offset: "61.8%",
|
|
464
|
+
"stop-color": C(qe)(t.color, e.value.style.chart.bars.gradient.intensity / 100)
|
|
465
|
+
}, null, 8, pt),
|
|
466
|
+
R("stop", {
|
|
467
|
+
offset: "100%",
|
|
468
|
+
"stop-color": t.color
|
|
469
|
+
}, null, 8, mt)
|
|
470
|
+
], 8, bt))), 256))
|
|
471
|
+
])) : d("", !0),
|
|
472
|
+
e.value.style.chart.grid.x.showHorizontalLines ? (u(!0), i(x, { key: 1 }, $(K.value, (t, r) => (u(), i("line", {
|
|
473
|
+
x1: s.value.left,
|
|
474
|
+
x2: s.value.right,
|
|
475
|
+
y1: t.y,
|
|
476
|
+
y2: t.y,
|
|
477
|
+
stroke: e.value.style.chart.grid.x.axisColor,
|
|
478
|
+
"stroke-width": 1
|
|
479
|
+
}, null, 8, xt))), 256)) : d("", !0),
|
|
480
|
+
e.value.style.chart.grid.y.showVerticalLines ? (u(!0), i(x, { key: 2 }, $(c.value.end - c.value.start + 1, (t, r) => (u(), i("line", {
|
|
481
|
+
x1: s.value.left + b.value * r,
|
|
482
|
+
x2: s.value.left + b.value * r,
|
|
483
|
+
y1: s.value.top,
|
|
484
|
+
y2: s.value.bottom,
|
|
485
|
+
stroke: e.value.style.chart.grid.y.axisColor,
|
|
486
|
+
"stroke-width": 1
|
|
487
|
+
}, null, 8, kt))), 256)) : d("", !0),
|
|
488
|
+
(u(!0), i(x, null, $(v.value, (t, r) => (u(), i("g", null, [
|
|
489
|
+
(u(!0), i(x, null, $(t.x, (o, n) => (u(), i("path", {
|
|
490
|
+
d: r === v.value.length - 1 && v.value.at(-1).series[n] || !v.value.at(-1).series[n] && r < v.value.length - 1 && v.value[r].series[n] && !v.value[r + 1].series[n] ? `M ${o},${t.y[n]}
|
|
491
|
+
h ${b.value * (1 - e.value.style.chart.bars.gapRatio / 2) - e.value.style.chart.bars.borderRadius}
|
|
492
|
+
a ${e.value.style.chart.bars.borderRadius},${e.value.style.chart.bars.borderRadius} 0 0 1 ${e.value.style.chart.bars.borderRadius},${e.value.style.chart.bars.borderRadius}
|
|
493
|
+
v ${t.height[n] - e.value.style.chart.bars.borderRadius < 0 ? 0 : t.height[n] - e.value.style.chart.bars.borderRadius}
|
|
494
|
+
h -${b.value * (1 - e.value.style.chart.bars.gapRatio / 2)}
|
|
495
|
+
v -${t.height[n] - e.value.style.chart.bars.borderRadius < 0 ? 0 : t.height[n] - e.value.style.chart.bars.borderRadius}
|
|
496
|
+
a ${e.value.style.chart.bars.borderRadius},${e.value.style.chart.bars.borderRadius} 0 0 1 ${e.value.style.chart.bars.borderRadius},-${e.value.style.chart.bars.borderRadius} z` : `M ${o},${t.y[n]}
|
|
497
|
+
h ${b.value * (1 - e.value.style.chart.bars.gapRatio / 2)}
|
|
498
|
+
v ${t.height[n] < 0 ? 0 : t.height[n]}
|
|
499
|
+
h -${b.value * (1 - e.value.style.chart.bars.gapRatio / 2)} z`,
|
|
500
|
+
fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
|
|
501
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
502
|
+
"stroke-width": e.value.style.chart.bars.strokeWidth,
|
|
503
|
+
"stroke-linecap": "round",
|
|
504
|
+
"stroke-linejoin": "round",
|
|
505
|
+
class: ke({ "vue-data-ui-bar-animated": e.value.useCssAnimation })
|
|
506
|
+
}, null, 10, wt))), 256))
|
|
507
|
+
]))), 256)),
|
|
508
|
+
e.value.style.chart.grid.x.showAxis ? (u(), i("line", {
|
|
509
|
+
key: 3,
|
|
510
|
+
x1: s.value.left,
|
|
511
|
+
x2: s.value.right,
|
|
512
|
+
y1: s.value.bottom,
|
|
513
|
+
y2: s.value.bottom,
|
|
514
|
+
stroke: e.value.style.chart.grid.x.axisColor,
|
|
515
|
+
"stroke-width": e.value.style.chart.grid.x.axisThickness,
|
|
516
|
+
"stroke-linecap": "round",
|
|
517
|
+
"stroke-linejoin": "round"
|
|
518
|
+
}, null, 8, Ct)) : d("", !0),
|
|
519
|
+
e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (u(), i("line", {
|
|
520
|
+
key: 4,
|
|
521
|
+
x1: s.value.left,
|
|
522
|
+
x2: s.value.left,
|
|
523
|
+
y1: s.value.top,
|
|
524
|
+
y2: s.value.bottom,
|
|
525
|
+
stroke: e.value.style.chart.grid.y.axisColor,
|
|
526
|
+
"stroke-width": e.value.style.chart.grid.y.axisThickness,
|
|
527
|
+
"stroke-linecap": "round",
|
|
528
|
+
"stroke-linejoin": "round"
|
|
529
|
+
}, null, 8, $t)) : d("", !0),
|
|
530
|
+
e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (u(), i("text", {
|
|
531
|
+
key: 5,
|
|
532
|
+
x: s.value.left + s.value.width / 2,
|
|
533
|
+
y: s.value.chartHeight + e.value.style.chart.grid.x.axisName.offsetY,
|
|
534
|
+
"font-size": e.value.style.chart.grid.x.axisName.fontSize,
|
|
535
|
+
fill: e.value.style.chart.grid.x.axisName.color,
|
|
536
|
+
"font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
|
|
537
|
+
"text-anchor": "middle"
|
|
538
|
+
}, z(e.value.style.chart.grid.x.axisName.text), 9, Lt)) : d("", !0),
|
|
539
|
+
e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (u(), i("text", {
|
|
540
|
+
key: 6,
|
|
541
|
+
transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize + e.value.style.chart.grid.y.axisName.offsetX}, ${s.value.top + s.value.height / 2}) rotate(-90)`,
|
|
542
|
+
"font-size": e.value.style.chart.grid.y.axisName.fontSize,
|
|
543
|
+
fill: e.value.style.chart.grid.y.axisName.color,
|
|
544
|
+
"font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
|
|
545
|
+
"text-anchor": "middle"
|
|
546
|
+
}, z(e.value.style.chart.grid.y.axisName.text), 9, _t)) : d("", !0),
|
|
547
|
+
w.value.dataLabels.show ? (u(), i(x, { key: 7 }, [
|
|
548
|
+
(u(!0), i(x, null, $(v.value, (t, r) => (u(), i("g", null, [
|
|
549
|
+
(u(!0), i(x, null, $(t.x, (o, n) => (u(), i("text", {
|
|
550
|
+
x: o + b.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
|
|
551
|
+
y: t.y[n] + t.proportions[n] * s.value.height / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
|
|
552
|
+
"font-size": e.value.style.chart.bars.dataLabels.fontSize,
|
|
553
|
+
fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? C(Ze)(t.color) : e.value.style.chart.bars.dataLabels.color,
|
|
554
|
+
"font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
|
|
555
|
+
"text-anchor": "middle"
|
|
556
|
+
}, z(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Re(t.proportions[n] * 100) : he(t.series[n])), 9, St))), 256))
|
|
557
|
+
]))), 256)),
|
|
558
|
+
e.value.style.chart.bars.totalValues.show && v.value.length > 1 ? (u(), i("g", Tt, [
|
|
559
|
+
(u(!0), i(x, null, $(Ne.value, (t, r) => (u(), i("text", {
|
|
560
|
+
x: s.value.left + b.value * r + b.value / 2,
|
|
561
|
+
y: (e.value.style.chart.bars.distributed ? s.value.top - e.value.style.chart.bars.totalValues.fontSize / 3 : t.y) + e.value.style.chart.bars.totalValues.offsetY,
|
|
562
|
+
"text-anchor": "middle",
|
|
563
|
+
"font-size": e.value.style.chart.bars.totalValues.fontSize,
|
|
564
|
+
"font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
|
|
565
|
+
fill: e.value.style.chart.bars.totalValues.color
|
|
566
|
+
}, z(he(t.value)), 9, zt))), 256))
|
|
567
|
+
])) : d("", !0)
|
|
568
|
+
], 64)) : d("", !0),
|
|
569
|
+
e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed ? (u(), i(x, { key: 8 }, [
|
|
570
|
+
(u(!0), i(x, null, $(K.value, (t, r) => (u(), i("line", {
|
|
571
|
+
x1: s.value.left,
|
|
572
|
+
x2: s.value.left - 6,
|
|
573
|
+
y1: t.y,
|
|
574
|
+
y2: t.y,
|
|
575
|
+
stroke: e.value.style.chart.grid.x.axisColor,
|
|
576
|
+
"stroke-width": 1
|
|
577
|
+
}, null, 8, Nt))), 256)),
|
|
578
|
+
(u(!0), i(x, null, $(K.value, (t, r) => (u(), i("text", {
|
|
579
|
+
x: t.x,
|
|
580
|
+
y: t.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
581
|
+
"font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
|
|
582
|
+
"font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
583
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
584
|
+
"text-anchor": "end"
|
|
585
|
+
}, z(C(H)({
|
|
586
|
+
p: e.value.style.chart.bars.dataLabels.prefix,
|
|
587
|
+
v: t.value,
|
|
588
|
+
s: e.value.style.chart.bars.dataLabels.suffix,
|
|
589
|
+
r: e.value.style.chart.grid.y.axisLabels.rounding
|
|
590
|
+
})), 9, Rt))), 256))
|
|
591
|
+
], 64)) : d("", !0),
|
|
592
|
+
e.value.style.chart.grid.x.timeLabels.show ? (u(!0), i(x, { key: 9 }, $(U.value, (t, r) => (u(), i("text", {
|
|
593
|
+
"text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
594
|
+
"font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
595
|
+
"font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
|
|
596
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
597
|
+
transform: `translate(${s.value.left + b.value * r + b.value / 2}, ${s.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`
|
|
598
|
+
}, z(t), 9, Pt))), 256)) : d("", !0),
|
|
599
|
+
w.value.showTooltip ? (u(!0), i(x, { key: 10 }, $(c.value.end - c.value.start, (t, r) => (u(), i("rect", {
|
|
600
|
+
x: s.value.left + r * b.value,
|
|
601
|
+
y: s.value.top,
|
|
602
|
+
width: b.value,
|
|
603
|
+
height: s.value.height,
|
|
604
|
+
onClick: (o) => Pe(r),
|
|
605
|
+
onMouseenter: (o) => Fe(r),
|
|
606
|
+
onMouseleave: l[0] || (l[0] = (o) => {
|
|
607
|
+
Z.value = null, Y.value = !1;
|
|
608
|
+
}),
|
|
609
|
+
fill: r === Z.value ? e.value.style.chart.highlighter.color + C(Ke)[e.value.style.chart.highlighter.opacity] : "transparent"
|
|
610
|
+
}, null, 40, Ft))), 256)) : d("", !0),
|
|
611
|
+
p(a.$slots, "svg", M(O({ ...s.value })), void 0, !0)
|
|
612
|
+
], 12, gt)) : d("", !0),
|
|
613
|
+
a.$slots.watermark ? (u(), i("div", Mt, [
|
|
614
|
+
p(a.$slots, "watermark", M(O({ isPrinting: C(ie) || C(ne) })), void 0, !0)
|
|
615
|
+
])) : d("", !0),
|
|
616
|
+
P.value ? d("", !0) : (u(), I(vt, {
|
|
617
|
+
key: 4,
|
|
618
|
+
config: {
|
|
619
|
+
type: "bar",
|
|
620
|
+
style: {
|
|
621
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
622
|
+
bar: {
|
|
623
|
+
axis: {
|
|
624
|
+
color: "#CCCCCC"
|
|
625
|
+
},
|
|
626
|
+
color: "#CCCCCC"
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}, null, 8, ["config"])),
|
|
631
|
+
R("div", {
|
|
632
|
+
ref_key: "chartSlicer",
|
|
633
|
+
ref: se,
|
|
634
|
+
style: A(`width:100%;background:${e.value.style.chart.backgroundColor}`),
|
|
635
|
+
"data-html2canvas-ignore": ""
|
|
636
|
+
}, [
|
|
637
|
+
e.value.style.chart.zoom.show && B.value > 1 ? (u(), I(rt, {
|
|
638
|
+
key: `slicer_${ue.value}`,
|
|
639
|
+
background: e.value.style.chart.zoom.color,
|
|
640
|
+
borderColor: e.value.style.chart.backgroundColor,
|
|
641
|
+
fontSize: e.value.style.chart.zoom.fontSize,
|
|
642
|
+
useResetSlot: e.value.style.chart.zoom.useResetSlot,
|
|
643
|
+
labelLeft: e.value.style.chart.grid.x.timeLabels.values[c.value.start] ? e.value.style.chart.grid.x.timeLabels.values[c.value.start] : "",
|
|
644
|
+
labelRight: e.value.style.chart.grid.x.timeLabels.values[c.value.end - 1] ? e.value.style.chart.grid.x.timeLabels.values[c.value.end - 1] : "",
|
|
645
|
+
textColor: e.value.style.chart.color,
|
|
646
|
+
inputColor: e.value.style.chart.zoom.color,
|
|
647
|
+
selectColor: e.value.style.chart.zoom.highlightColor,
|
|
648
|
+
max: Math.max(...ee.dataset.map((t) => t.series.length)),
|
|
649
|
+
min: 0,
|
|
650
|
+
valueStart: c.value.start,
|
|
651
|
+
valueEnd: c.value.end,
|
|
652
|
+
start: c.value.start,
|
|
653
|
+
"onUpdate:start": l[1] || (l[1] = (t) => c.value.start = t),
|
|
654
|
+
end: c.value.end,
|
|
655
|
+
"onUpdate:end": l[2] || (l[2] = (t) => c.value.end = t),
|
|
656
|
+
onReset: ze
|
|
657
|
+
}, {
|
|
658
|
+
"reset-action": m(({ reset: t }) => [
|
|
659
|
+
p(a.$slots, "reset-action", M(O({ reset: t })), void 0, !0)
|
|
660
|
+
]),
|
|
661
|
+
_: 3
|
|
662
|
+
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end"])) : d("", !0)
|
|
663
|
+
], 4),
|
|
664
|
+
Q(st, {
|
|
665
|
+
show: w.value.showTooltip && Y.value,
|
|
666
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
667
|
+
color: e.value.style.chart.tooltip.color,
|
|
668
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
669
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
670
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
671
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
672
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
673
|
+
position: e.value.style.chart.tooltip.position,
|
|
674
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
675
|
+
parent: D.value,
|
|
676
|
+
content: J.value,
|
|
677
|
+
isCustom: C($e)(e.value.style.chart.tooltip.customFormat)
|
|
678
|
+
}, {
|
|
679
|
+
"tooltip-before": m(() => [
|
|
680
|
+
p(a.$slots, "tooltip-before", M(O({ ...ae.value })), void 0, !0)
|
|
681
|
+
]),
|
|
682
|
+
"tooltip-after": m(() => [
|
|
683
|
+
p(a.$slots, "tooltip-after", M(O({ ...ae.value })), void 0, !0)
|
|
684
|
+
]),
|
|
685
|
+
_: 3
|
|
686
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
687
|
+
R("div", {
|
|
688
|
+
ref_key: "chartLegend",
|
|
689
|
+
ref: re
|
|
690
|
+
}, [
|
|
691
|
+
e.value.style.chart.legend.show && P.value ? (u(), I(it, {
|
|
692
|
+
key: 0,
|
|
693
|
+
legendSet: me.value,
|
|
694
|
+
config: Ve.value,
|
|
695
|
+
onClickMarker: l[3] || (l[3] = ({ legend: t }) => t.segregate())
|
|
696
|
+
}, {
|
|
697
|
+
item: m(({ legend: t }) => [
|
|
698
|
+
R("div", {
|
|
699
|
+
onClick: (r) => t.segregate(),
|
|
700
|
+
style: A(`opacity:${L.value.includes(t.id) ? 0.5 : 1}`)
|
|
701
|
+
}, z(t.name), 13, Ot)
|
|
702
|
+
]),
|
|
703
|
+
_: 1
|
|
704
|
+
}, 8, ["legendSet", "config"])) : p(a.$slots, "legend", {
|
|
705
|
+
key: 1,
|
|
706
|
+
legend: me.value
|
|
707
|
+
}, void 0, !0)
|
|
708
|
+
], 512),
|
|
709
|
+
c.value.end - c.value.start < 200 ? (u(), I(nt, {
|
|
710
|
+
key: 5,
|
|
711
|
+
hideDetails: "",
|
|
712
|
+
config: {
|
|
713
|
+
open: w.value.showTable,
|
|
714
|
+
maxHeight: 1e4,
|
|
715
|
+
body: {
|
|
716
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
717
|
+
color: e.value.style.chart.color
|
|
718
|
+
},
|
|
719
|
+
head: {
|
|
720
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
721
|
+
color: e.value.style.chart.color
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}, {
|
|
725
|
+
content: m(() => [
|
|
726
|
+
Q(ct, {
|
|
727
|
+
colNames: W.value.colNames,
|
|
728
|
+
head: W.value.head,
|
|
729
|
+
body: W.value.body,
|
|
730
|
+
config: W.value.config,
|
|
731
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
732
|
+
onClose: l[4] || (l[4] = (t) => w.value.showTable = !1)
|
|
733
|
+
}, {
|
|
734
|
+
th: m(({ th: t }) => [
|
|
735
|
+
R("div", { innerHTML: t }, null, 8, Dt)
|
|
736
|
+
]),
|
|
737
|
+
td: m(({ td: t }) => [
|
|
738
|
+
Ie(z(t), 1)
|
|
739
|
+
]),
|
|
740
|
+
_: 1
|
|
741
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
742
|
+
]),
|
|
743
|
+
_: 1
|
|
744
|
+
}, 8, ["config"])) : d("", !0)
|
|
745
|
+
], 14, ht));
|
|
746
|
+
}
|
|
747
|
+
}, Kt = /* @__PURE__ */ dt(Vt, [["__scopeId", "data-v-5aeb6468"]]);
|
|
748
|
+
export {
|
|
749
|
+
Kt as default
|
|
750
|
+
};
|