vue-data-ui 2.12.8-beta.3 → 2.13.0
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 +10 -4
- package/dist/{Arrow-kQyQXUUg.js → Arrow-B2y3GYgv.js} +1 -1
- package/dist/{BaseDraggableDialog-DLRFrsDT.js → BaseDraggableDialog-B3CZVeze.js} +2 -2
- package/dist/{BaseIcon-DaR0sIWZ.js → BaseIcon-P7wV92Er.js} +1 -1
- package/dist/{ColorPicker-Bj3sq9o7.js → ColorPicker-C7b6TR_9.js} +2 -2
- package/dist/{DataTable-BBqbcutV.js → DataTable-DBkfb6pd.js} +2 -2
- package/dist/{Legend-DRqzYrP9.js → Legend-DcDRW3Xd.js} +2 -2
- package/dist/{NonSvgPenAndPaper-CQIC2PMP.js → NonSvgPenAndPaper-DYA_rF1x.js} +3 -3
- package/dist/{PackageVersion-ClpqQxYT.js → PackageVersion-C5fpg4GN.js} +2 -2
- package/dist/{PenAndPaper-B-T7XvxF.js → PenAndPaper-BRkuVFb4.js} +3 -3
- package/dist/{Shape-DEWxbZ-l.js → Shape-CnD-h_98.js} +1 -1
- package/dist/{Slicer-o6jJH5bw.js → Slicer-CxdgZOQ7.js} +2 -2
- package/dist/{SparkTooltip-LPnbBoFu.js → SparkTooltip-BIAMOmfJ.js} +1 -1
- package/dist/{Title-apr_T9tg.js → Title-DoWqzga-.js} +1 -1
- package/dist/{Tooltip-BuHsMAfp.js → Tooltip-DYCBNM-_.js} +1 -1
- package/dist/{UserOptions-OVNxxnq5.js → UserOptions-B3q-xfQV.js} +16 -11
- package/dist/dom-to-png-4VVH9Qna.js +247 -0
- package/dist/img-Dy6IrSzX.js +20 -0
- package/dist/{index-CH_mJIWj.js → index-BXbyT0Qn.js} +6 -2
- package/dist/{pdf-Jun3ogRn.js → pdf-ZrUvUcH9.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +20 -3
- package/dist/types/vue-data-ui.d.ts +20 -3
- package/dist/{useNestedProp-rMR-JeOJ.js → useNestedProp-DVZpeH84.js} +1 -1
- package/dist/{usePrinter-DJ7WfWUs.js → usePrinter-aKh5-HcK.js} +2 -2
- package/dist/{vue-data-ui-D7AaTKU6.js → vue-data-ui-DUHiuRmY.js} +63 -63
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BfLLrwWi.js → vue-ui-3d-bar-C3cqHCNp.js} +173 -173
- package/dist/{vue-ui-accordion-Ds4zkPIx.js → vue-ui-accordion-CXsjHe1y.js} +3 -3
- package/dist/{vue-ui-age-pyramid-C7ca5TG5.js → vue-ui-age-pyramid-B2EpIzV9.js} +179 -179
- package/dist/{vue-ui-annotator-DG2z1gw8.js → vue-ui-annotator-Czvbjx_j.js} +2 -2
- package/dist/{vue-ui-bullet-Dh25QAEH.js → vue-ui-bullet-ClY1tgTT.js} +6 -6
- package/dist/{vue-ui-candlestick-7Yo_kEV0.js → vue-ui-candlestick-BQ1RVdoH.js} +113 -113
- package/dist/{vue-ui-carousel-table-Det9Kwmy.js → vue-ui-carousel-table-UQjCOJJV.js} +94 -94
- package/dist/{vue-ui-chestnut-DLlFv6Uj.js → vue-ui-chestnut-DmEa8kef.js} +452 -452
- package/dist/{vue-ui-chord-BXlv5Z2x.js → vue-ui-chord-CEDZ-UcP.js} +17 -17
- package/dist/{vue-ui-circle-pack-DdRcdWmx.js → vue-ui-circle-pack-Bx_mLhCR.js} +116 -116
- package/dist/{vue-ui-cursor-Djtg6Ppw.js → vue-ui-cursor-D27qwk90.js} +2 -2
- package/dist/{vue-ui-dashboard-C4MDDCl6.js → vue-ui-dashboard-DKsYxh6J.js} +62 -62
- package/dist/{vue-ui-digits-8Ox6q1Ov.js → vue-ui-digits-CdDTbIAN.js} +2 -2
- package/dist/{vue-ui-donut-Hk4EaVhb.js → vue-ui-donut-DS-DfHIm.js} +149 -149
- package/dist/{vue-ui-donut-evolution-DzgYokPU.js → vue-ui-donut-evolution-XMEmv1DK.js} +109 -109
- package/dist/{vue-ui-dumbbell-CAC44_Hu.js → vue-ui-dumbbell-DAm5A4u3.js} +65 -65
- package/dist/{vue-ui-flow-CYWiZjrP.js → vue-ui-flow-CTbmqqmV.js} +12 -12
- package/dist/{vue-ui-funnel-C2eqxh_8.js → vue-ui-funnel-CihunDsZ.js} +65 -65
- package/dist/{vue-ui-galaxy-BBfg84E4.js → vue-ui-galaxy-CJHycmpt.js} +82 -82
- package/dist/{vue-ui-gauge-BJgJgef_.js → vue-ui-gauge-Bsc9wIKK.js} +5 -5
- package/dist/{vue-ui-gizmo-DBclpybR.js → vue-ui-gizmo-D6AciZZe.js} +3 -3
- package/dist/{vue-ui-heatmap-D65wOgqe.js → vue-ui-heatmap-in5WwNRr.js} +221 -221
- package/dist/{vue-ui-history-plot-CHhDy7Da.js → vue-ui-history-plot-C9IEmAmm.js} +232 -232
- package/dist/{vue-ui-kpi-uT6fsAaO.js → vue-ui-kpi-fDPWRpRZ.js} +3 -3
- package/dist/{vue-ui-mini-loader-CKVlBiYB.js → vue-ui-mini-loader-BeJRaP7N.js} +2 -2
- package/dist/{vue-ui-molecule-BwtHZtGN.js → vue-ui-molecule-BJbwA0F6.js} +30 -30
- package/dist/{vue-ui-mood-radar-Vf4_-R-m.js → vue-ui-mood-radar--YEOJ6q6.js} +75 -75
- package/dist/{vue-ui-nested-donuts-BVkSns4S.js → vue-ui-nested-donuts-BswKH0D6.js} +16 -16
- package/dist/{vue-ui-onion-UzMmwtvF.js → vue-ui-onion-BAw8X4iu.js} +70 -70
- package/dist/{vue-ui-parallel-coordinate-plot-Dk5T3ZAr.js → vue-ui-parallel-coordinate-plot-CYkzOe_Q.js} +11 -11
- package/dist/{vue-ui-quadrant-Ck7xALez.js → vue-ui-quadrant-BupqUnMn.js} +11 -11
- package/dist/{vue-ui-quick-chart-B62Pa0nG.js → vue-ui-quick-chart-BzpDL6CR.js} +5 -5
- package/dist/{vue-ui-radar-DMfv2hSb.js → vue-ui-radar-zPrbIZv5.js} +283 -282
- package/dist/{vue-ui-rating-CFYHJrxj.js → vue-ui-rating-DqCOz2LB.js} +2 -2
- package/dist/{vue-ui-relation-circle-RWlfC5BI.js → vue-ui-relation-circle-DQp_zboM.js} +5 -5
- package/dist/{vue-ui-ridgeline-Bh93VzcO.js → vue-ui-ridgeline-DoJfX7Ii.js} +100 -100
- package/dist/{vue-ui-rings-CyX30Ccv.js → vue-ui-rings-Bk4QJYsW.js} +96 -96
- package/dist/{vue-ui-scatter-BEDnWByj.js → vue-ui-scatter-RxF0N8Zj.js} +164 -164
- package/dist/{vue-ui-skeleton-C6PWt_m5.js → vue-ui-skeleton-Fxr752Oi.js} +3 -3
- package/dist/{vue-ui-smiley-79itAe84.js → vue-ui-smiley-CNScIHKI.js} +2 -2
- package/dist/{vue-ui-spark-trend-AaA4KuaH.js → vue-ui-spark-trend-CyMzdoJ9.js} +3 -3
- package/dist/{vue-ui-sparkbar-CYBZeaor.js → vue-ui-sparkbar-DMTRPWwC.js} +3 -3
- package/dist/{vue-ui-sparkgauge-ElGarXVS.js → vue-ui-sparkgauge-itAGdTj_.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-C_LV99i1.js → vue-ui-sparkhistogram-CZx5cF_r.js} +4 -4
- package/dist/{vue-ui-sparkline-DwzCA8d6.js → vue-ui-sparkline-POYMl6cO.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-CobB11uw.js → vue-ui-sparkstackbar-C0EE8xrA.js} +3 -3
- package/dist/{vue-ui-stackbar-B4SxM5Ix.js → vue-ui-stackbar-B6ytrTFL.js} +37 -37
- package/dist/{vue-ui-strip-plot-9VK_Y3SC.js → vue-ui-strip-plot-u39z36tT.js} +80 -80
- package/dist/{vue-ui-table-DFTE1OH5.js → vue-ui-table-Cvmrm0sZ.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DvyJx0j7.js → vue-ui-table-heatmap-BOFRFilm.js} +57 -57
- package/dist/{vue-ui-table-sparkline-SGsBnQTK.js → vue-ui-table-sparkline-CMhk8rpj.js} +72 -72
- package/dist/{vue-ui-thermometer-DEMS6HXl.js → vue-ui-thermometer-Cxznchnu.js} +5 -5
- package/dist/{vue-ui-timer-CQ71yJ_N.js → vue-ui-timer-Du0Cskiy.js} +5 -5
- package/dist/{vue-ui-tiremarks-CsN_QtUK.js → vue-ui-tiremarks-BzC40iBw.js} +5 -5
- package/dist/{vue-ui-treemap-B0CPNusH.js → vue-ui-treemap-D5Nk7usb.js} +297 -297
- package/dist/{vue-ui-vertical-bar-Cxv-ahMT.js → vue-ui-vertical-bar-BivMp4WH.js} +81 -81
- package/dist/{vue-ui-waffle-TgNNo9UX.js → vue-ui-waffle-DI0Ul1Tb.js} +50 -50
- package/dist/{vue-ui-wheel-Bq0ZLc-R.js → vue-ui-wheel-BfHsxhQq.js} +5 -5
- package/dist/{vue-ui-word-cloud-D28awCaT.js → vue-ui-word-cloud-ytYbdQKa.js} +67 -67
- package/dist/{vue-ui-world-BhUsfhY5.js → vue-ui-world-CiYvMEKb.js} +55 -55
- package/dist/{vue-ui-xy-CEFkua9H.js → vue-ui-xy-DxgCkZEV.js} +201 -182
- package/dist/{vue-ui-xy-canvas-oHhzL0ui.js → vue-ui-xy-canvas-R0tICTKy.js} +80 -80
- package/package.json +1 -1
- package/dist/dom-to-png-C0Ct8ClX.js +0 -243
- package/dist/img-P0SFFw37.js +0 -19
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineAsyncComponent as K, useSlots as Tt, onMounted as nt, computed as b, ref as $, shallowRef as
|
|
2
|
-
import { u as Nt, c as Se, t as zt, p as S, a as At, b as Ft, o as Pt, e as Rt, d as me, i as be, f as ie, X as Lt, l as rt, G as it, x as ct, q as Mt, r as Dt, y as Vt } from "./index-
|
|
1
|
+
import { defineAsyncComponent as K, useSlots as Tt, onMounted as nt, computed as b, ref as $, shallowRef as B, watch as Ot, onBeforeUnmount as _t, createElementBlock as y, openBlock as v, unref as d, normalizeStyle as M, normalizeClass as xe, createBlock as Z, createCommentVNode as O, createElementVNode as _, createVNode as Te, createSlots as St, withCtx as T, renderSlot as k, normalizeProps as J, guardReactiveProps as Q, Fragment as ge, renderList as Oe, withKeys as st, withModifiers as _e, mergeProps as ut, createTextVNode as ye, toDisplayString as ee, nextTick as It } from "vue";
|
|
2
|
+
import { u as Nt, c as Se, t as zt, p as S, a as At, b as Ft, o as Pt, e as Rt, d as me, i as be, f as ie, X as Lt, l as rt, G as it, x as ct, q as Mt, r as Dt, y as Vt } from "./index-BXbyT0Qn.js";
|
|
3
3
|
import { t as Bt, u as Ht } from "./useResponsive-JZ9xq-JV.js";
|
|
4
|
-
import { u as dt } from "./useNestedProp-
|
|
5
|
-
import { u as Ut } from "./usePrinter-
|
|
4
|
+
import { u as dt } from "./useNestedProp-DVZpeH84.js";
|
|
5
|
+
import { u as Ut } from "./usePrinter-aKh5-HcK.js";
|
|
6
6
|
import { u as Wt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
7
|
import { u as Et } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
-
import Gt from "./BaseIcon-
|
|
9
|
-
import qt from "./Title-
|
|
10
|
-
import Xt from "./Legend-
|
|
8
|
+
import Gt from "./BaseIcon-P7wV92Er.js";
|
|
9
|
+
import qt from "./Title-DoWqzga-.js";
|
|
10
|
+
import Xt from "./Legend-DcDRW3Xd.js";
|
|
11
11
|
import { _ as jt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
function vt(n, r) {
|
|
13
13
|
const s = n.length;
|
|
@@ -65,29 +65,29 @@ function Jt(n) {
|
|
|
65
65
|
return (n.x1 - n.x0) * (n.y1 - n.y0);
|
|
66
66
|
}
|
|
67
67
|
function pt(n, r) {
|
|
68
|
-
const { width: s, height: i, xOffset: u, yOffset: h } = Ie(r), c = n.length, g = n.map((m) => m.normalizedValue || 0).reduce((m, x) => m + x, 0), p = g / i,
|
|
69
|
-
let
|
|
68
|
+
const { width: s, height: i, xOffset: u, yOffset: h } = Ie(r), c = n.length, g = n.map((m) => m.normalizedValue || 0).reduce((m, x) => m + x, 0), p = g / i, H = g / s;
|
|
69
|
+
let A = u, w = h;
|
|
70
70
|
const C = [];
|
|
71
71
|
if (s >= i) {
|
|
72
72
|
for (let m = 0; m < c; m += 1) {
|
|
73
|
-
const x = n[m],
|
|
74
|
-
x0:
|
|
73
|
+
const x = n[m], D = w + x.normalizedValue / p, F = {
|
|
74
|
+
x0: A,
|
|
75
75
|
y0: w,
|
|
76
|
-
x1:
|
|
77
|
-
y1:
|
|
78
|
-
},
|
|
79
|
-
w =
|
|
76
|
+
x1: A + p,
|
|
77
|
+
y1: D
|
|
78
|
+
}, z = Object.assign({}, x, F);
|
|
79
|
+
w = D, C.push(z);
|
|
80
80
|
}
|
|
81
81
|
return C;
|
|
82
82
|
} else {
|
|
83
83
|
for (let m = 0; m < c; m += 1) {
|
|
84
|
-
const x = n[m],
|
|
85
|
-
x0:
|
|
84
|
+
const x = n[m], D = A + x.normalizedValue / H, F = {
|
|
85
|
+
x0: A,
|
|
86
86
|
y0: w,
|
|
87
|
-
x1:
|
|
88
|
-
y1: w +
|
|
89
|
-
},
|
|
90
|
-
|
|
87
|
+
x1: D,
|
|
88
|
+
y1: w + H
|
|
89
|
+
}, z = Object.assign({}, x, F);
|
|
90
|
+
A = D, C.push(z);
|
|
91
91
|
}
|
|
92
92
|
return C;
|
|
93
93
|
}
|
|
@@ -97,7 +97,7 @@ function Qt(n) {
|
|
|
97
97
|
return Math.min(s, i);
|
|
98
98
|
}
|
|
99
99
|
function eo(n, r) {
|
|
100
|
-
const s = n.length, i = n.map((p) => p.value ?? 0).reduce((p,
|
|
100
|
+
const s = n.length, i = n.map((p) => p.value ?? 0).reduce((p, H) => p + H, 0), u = r / i, h = [];
|
|
101
101
|
let c, g;
|
|
102
102
|
for (let p = 0; p < s; p += 1)
|
|
103
103
|
g = n[p], c = Object.assign({}, g, {
|
|
@@ -122,17 +122,17 @@ function to(n, r, s, i) {
|
|
|
122
122
|
const C = pt(h, c);
|
|
123
123
|
return g.concat(C);
|
|
124
124
|
}
|
|
125
|
-
const
|
|
126
|
-
if (Yt(h,
|
|
127
|
-
const C = h.concat(
|
|
125
|
+
const H = Qt(c), A = u[0], w = u.slice(1, p);
|
|
126
|
+
if (Yt(h, A, H)) {
|
|
127
|
+
const C = h.concat(A);
|
|
128
128
|
u = w, h = C, c = c, g = g;
|
|
129
129
|
} else {
|
|
130
130
|
const C = h.length;
|
|
131
131
|
let m = 0;
|
|
132
|
-
for (let
|
|
133
|
-
m += h[
|
|
134
|
-
const x = oo(c, m),
|
|
135
|
-
u = u, h = [], c = x, g =
|
|
132
|
+
for (let z = 0; z < C; z += 1)
|
|
133
|
+
m += h[z].normalizedValue;
|
|
134
|
+
const x = oo(c, m), D = pt(h, c), F = g.concat(D);
|
|
135
|
+
u = u, h = [], c = x, g = F;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -203,58 +203,58 @@ const lo = ["id"], ao = {
|
|
|
203
203
|
},
|
|
204
204
|
emits: ["selectLegend", "selectDatapoint"],
|
|
205
205
|
setup(n, { expose: r, emit: s }) {
|
|
206
|
-
const i = K(() => import("./DataTable-
|
|
206
|
+
const i = K(() => import("./DataTable-DBkfb6pd.js")), u = K(() => import("./PenAndPaper-BRkuVFb4.js")), h = K(() => import("./vue-ui-accordion-CXsjHe1y.js")), c = K(() => import("./vue-ui-skeleton-Fxr752Oi.js")), g = K(() => import("./Tooltip-DYCBNM-_.js")), p = K(() => import("./UserOptions-B3q-xfQV.js")), H = K(() => import("./PackageVersion-C5fpg4GN.js")), { vue_ui_treemap: A } = Nt(), w = n, C = s, m = Tt();
|
|
207
207
|
nt(() => {
|
|
208
208
|
m["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
|
|
209
209
|
});
|
|
210
|
-
const x = b(() => !!w.dataset && w.dataset.length),
|
|
210
|
+
const x = b(() => !!w.dataset && w.dataset.length), D = b(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), F = $(Se()), z = $(!1), ke = $(""), te = $(!1), Ne = $(0), P = $([]), se = B(null), ze = B(null), Ae = B(null), Fe = B(null), Pe = B(null), Re = $(0), Le = $(0), Me = $(0), t = b({
|
|
211
211
|
get: () => He(),
|
|
212
|
-
set: (
|
|
213
|
-
}), { userOptionsVisible: we, setUserOptionsVisibility: De, keepUserOptionState: Ve } = Wt({ config:
|
|
212
|
+
set: (e) => e
|
|
213
|
+
}), { userOptionsVisible: we, setUserOptionsVisibility: De, keepUserOptionState: Ve } = Wt({ config: t.value }), { svgRef: Be } = Et({ config: t.value.style.chart.title });
|
|
214
214
|
function He() {
|
|
215
|
-
const
|
|
215
|
+
const e = dt({
|
|
216
216
|
userConfig: w.config,
|
|
217
|
-
defaultConfig:
|
|
217
|
+
defaultConfig: A
|
|
218
218
|
});
|
|
219
|
-
return
|
|
219
|
+
return e.theme ? {
|
|
220
220
|
...dt({
|
|
221
|
-
userConfig: At.vue_ui_treemap[
|
|
222
|
-
defaultConfig:
|
|
221
|
+
userConfig: At.vue_ui_treemap[e.theme] || w.config,
|
|
222
|
+
defaultConfig: e
|
|
223
223
|
}),
|
|
224
|
-
customPalette: zt[
|
|
225
|
-
} :
|
|
224
|
+
customPalette: zt[e.theme] || S
|
|
225
|
+
} : e;
|
|
226
226
|
}
|
|
227
|
-
Ot(() => w.config, (
|
|
228
|
-
|
|
227
|
+
Ot(() => w.config, (e) => {
|
|
228
|
+
t.value = He(), we.value = !t.value.userOptions.showOnChartHover, Re.value += 1, Le.value += 1, Me.value += 1, R.value.showTable = t.value.table.show, R.value.showTooltip = t.value.style.chart.tooltip.show;
|
|
229
229
|
}, { deep: !0 });
|
|
230
230
|
const { isPrinting: Ue, isImaging: We, generatePdf: Ee, generateImage: Ge } = Ut({
|
|
231
|
-
elementId: `treemap_${
|
|
232
|
-
fileName:
|
|
233
|
-
options:
|
|
234
|
-
}), gt = b(() =>
|
|
235
|
-
showTable:
|
|
236
|
-
showTooltip:
|
|
237
|
-
}),
|
|
238
|
-
height:
|
|
239
|
-
width:
|
|
231
|
+
elementId: `treemap_${F.value}`,
|
|
232
|
+
fileName: t.value.style.chart.title.text || "vue-ui-treemap",
|
|
233
|
+
options: t.value.userOptions.print
|
|
234
|
+
}), gt = b(() => t.value.userOptions.show && !t.value.style.chart.title.text), ce = b(() => Ft(t.value.customPalette)), R = $({
|
|
235
|
+
showTable: t.value.table.show,
|
|
236
|
+
showTooltip: t.value.style.chart.tooltip.show
|
|
237
|
+
}), U = $({
|
|
238
|
+
height: t.value.style.chart.height,
|
|
239
|
+
width: t.value.style.chart.width
|
|
240
240
|
}), q = b(() => ({
|
|
241
|
-
bottom:
|
|
242
|
-
height:
|
|
243
|
-
left:
|
|
244
|
-
right:
|
|
245
|
-
top:
|
|
246
|
-
vbHeight:
|
|
247
|
-
vbWidth:
|
|
248
|
-
width:
|
|
241
|
+
bottom: U.value.height - t.value.style.chart.padding.bottom,
|
|
242
|
+
height: U.value.height - t.value.style.chart.padding.top - t.value.style.chart.padding.bottom,
|
|
243
|
+
left: t.value.style.chart.padding.left,
|
|
244
|
+
right: U.value.width - t.value.style.chart.padding.right,
|
|
245
|
+
top: t.value.style.chart.padding.top,
|
|
246
|
+
vbHeight: U.value.height,
|
|
247
|
+
vbWidth: U.value.width,
|
|
248
|
+
width: U.value.width - t.value.style.chart.padding.left - t.value.style.chart.padding.right
|
|
249
249
|
}));
|
|
250
|
-
function qe(
|
|
251
|
-
|
|
250
|
+
function qe(e) {
|
|
251
|
+
e.forEach((l, o) => {
|
|
252
252
|
l.id = Se(), l.color = me(l.color) || ce.value[o] || S[o] || S[o % S.length], l.children && (l.children.forEach((a) => {
|
|
253
253
|
a.parentId = l.id, a.color = l.color;
|
|
254
254
|
}), qe(l.children));
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
-
const
|
|
257
|
+
const W = B(w.dataset), E = B(null), oe = B(null);
|
|
258
258
|
nt(() => {
|
|
259
259
|
yt();
|
|
260
260
|
});
|
|
@@ -262,49 +262,49 @@ const lo = ["id"], ao = {
|
|
|
262
262
|
if (Pt(w.dataset) && Rt({
|
|
263
263
|
componentName: "VueUiTreemap",
|
|
264
264
|
type: "dataset"
|
|
265
|
-
}), qe(
|
|
266
|
-
const
|
|
265
|
+
}), qe(W.value), t.value.responsive) {
|
|
266
|
+
const e = Bt(() => {
|
|
267
267
|
const { width: l, height: o } = Ht({
|
|
268
268
|
chart: se.value,
|
|
269
|
-
title:
|
|
270
|
-
legend:
|
|
269
|
+
title: t.value.style.chart.title.text ? ze.value : null,
|
|
270
|
+
legend: t.value.style.chart.legend.show ? Ae.value : null,
|
|
271
271
|
source: Fe.value,
|
|
272
272
|
noTitle: Pe.value
|
|
273
273
|
});
|
|
274
274
|
requestAnimationFrame(() => {
|
|
275
|
-
|
|
275
|
+
U.value.width = l, U.value.height = o;
|
|
276
276
|
});
|
|
277
277
|
});
|
|
278
|
-
|
|
278
|
+
E.value && (oe.value && E.value.unobserve(oe.value), E.value.disconnect()), E.value = new ResizeObserver(e), oe.value = se.value.parentNode, E.value.observe(oe.value);
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
_t(() => {
|
|
282
|
-
|
|
282
|
+
E.value && (oe.value && E.value.unobserve(oe.value), E.value.disconnect());
|
|
283
283
|
});
|
|
284
|
-
const le = $(
|
|
285
|
-
...
|
|
286
|
-
color: me(
|
|
287
|
-
})).filter((
|
|
284
|
+
const le = $(W.value), ue = b(() => le.value.map((e, l) => ({
|
|
285
|
+
...e,
|
|
286
|
+
color: me(e.color) || ce.value[l] || S[l] || S[l % S.length]
|
|
287
|
+
})).filter((e) => !P.value.includes(e.id))), ae = b(() => W.value.filter((e) => !P.value.includes(e.id)).map((e) => e.value || 0).reduce((e, l) => e + l, 0)), Xe = b({
|
|
288
288
|
get() {
|
|
289
|
-
let
|
|
290
|
-
return
|
|
289
|
+
let e = [...ue.value];
|
|
290
|
+
return t.value.style.chart.layout.sorted && (e = [...ue.value].sort((l, o) => o.value - l.value)), e.map((l) => ({
|
|
291
291
|
...l
|
|
292
292
|
}));
|
|
293
293
|
},
|
|
294
|
-
set(
|
|
295
|
-
return
|
|
294
|
+
set(e) {
|
|
295
|
+
return e;
|
|
296
296
|
}
|
|
297
297
|
});
|
|
298
|
-
function je(
|
|
299
|
-
return
|
|
298
|
+
function je(e, l) {
|
|
299
|
+
return e.value / l;
|
|
300
300
|
}
|
|
301
|
-
function mt(
|
|
302
|
-
const a =
|
|
303
|
-
return rt(
|
|
301
|
+
function mt(e, l, o) {
|
|
302
|
+
const a = t.value.style.chart.layout.rects.colorRatio - je(l, o);
|
|
303
|
+
return rt(e, a < 0 ? 0 : a);
|
|
304
304
|
}
|
|
305
|
-
function Ye(
|
|
306
|
-
return
|
|
307
|
-
const fe = mt(me(l) || ce.value[
|
|
305
|
+
function Ye(e, l, o, a) {
|
|
306
|
+
return e.map((f, N) => {
|
|
307
|
+
const fe = mt(me(l) || ce.value[N] || S[N] || S[N % S.length], f, a), xt = je(f, a);
|
|
308
308
|
return {
|
|
309
309
|
...f,
|
|
310
310
|
color: fe,
|
|
@@ -315,30 +315,30 @@ const lo = ["id"], ao = {
|
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
317
|
const re = b(() => Zt(
|
|
318
|
-
Xe.value.map((
|
|
319
|
-
const o =
|
|
318
|
+
Xe.value.map((e, l) => {
|
|
319
|
+
const o = e.children ? e.children.reduce((a, f) => a + f.value, 0) : e.value;
|
|
320
320
|
return {
|
|
321
|
-
value:
|
|
322
|
-
id:
|
|
323
|
-
children:
|
|
324
|
-
color:
|
|
325
|
-
name:
|
|
321
|
+
value: e.value,
|
|
322
|
+
id: e.id || Se(),
|
|
323
|
+
children: e.children ? Ye(e.children.sort((a, f) => f.value - a.value), e.color, e.name, o) : void 0,
|
|
324
|
+
color: e.color,
|
|
325
|
+
name: e.name
|
|
326
326
|
};
|
|
327
327
|
}),
|
|
328
328
|
{ x0: q.value.left * 2, y0: q.value.top, x1: q.value.width, y1: q.value.height }
|
|
329
329
|
));
|
|
330
|
-
function Ke({ y0:
|
|
331
|
-
return l -
|
|
330
|
+
function Ke({ y0: e, y1: l }) {
|
|
331
|
+
return l - e <= 0 ? 1e-4 : l - e;
|
|
332
332
|
}
|
|
333
|
-
function Ze({ x0:
|
|
334
|
-
return l -
|
|
333
|
+
function Ze({ x0: e, x1: l }) {
|
|
334
|
+
return l - e <= 0 ? 1e-4 : l - e;
|
|
335
335
|
}
|
|
336
|
-
function X(
|
|
337
|
-
const l =
|
|
338
|
-
return l <
|
|
336
|
+
function X(e) {
|
|
337
|
+
const l = t.value.style.chart.layout.labels.fontSize * (e.proportion * 2 > 1 ? 1 : e.proportion * 2);
|
|
338
|
+
return l < t.value.style.chart.layout.labels.minFontSize ? t.value.style.chart.layout.labels.minFontSize : l;
|
|
339
339
|
}
|
|
340
|
-
function bt(
|
|
341
|
-
te.value =
|
|
340
|
+
function bt(e) {
|
|
341
|
+
te.value = e, Ne.value += 1;
|
|
342
342
|
}
|
|
343
343
|
const ne = b(() => ({
|
|
344
344
|
startX: 0,
|
|
@@ -346,12 +346,12 @@ const lo = ["id"], ao = {
|
|
|
346
346
|
width: q.value.vbWidth,
|
|
347
347
|
height: q.value.vbHeight
|
|
348
348
|
}));
|
|
349
|
-
function j(
|
|
349
|
+
function j(e, l = W.value) {
|
|
350
350
|
for (const o of l) {
|
|
351
|
-
if (o.id ===
|
|
351
|
+
if (o.id === e)
|
|
352
352
|
return o;
|
|
353
353
|
if (o.children) {
|
|
354
|
-
const a = j(
|
|
354
|
+
const a = j(e, o.children);
|
|
355
355
|
if (a)
|
|
356
356
|
return a;
|
|
357
357
|
}
|
|
@@ -359,18 +359,18 @@ const lo = ["id"], ao = {
|
|
|
359
359
|
return null;
|
|
360
360
|
}
|
|
361
361
|
const I = $([]), Y = b(() => I.value.length > 0);
|
|
362
|
-
function de(
|
|
363
|
-
if (!
|
|
364
|
-
le.value =
|
|
362
|
+
function de(e) {
|
|
363
|
+
if (!e) {
|
|
364
|
+
le.value = W.value.slice(), C("selectDatapoint", void 0), I.value = [];
|
|
365
365
|
return;
|
|
366
366
|
}
|
|
367
|
-
const l = j(
|
|
367
|
+
const l = j(e.id);
|
|
368
368
|
if (l && l.children?.length)
|
|
369
|
-
I.value.push(l.id), le.value = l.children.slice(), C("selectDatapoint",
|
|
370
|
-
else if (
|
|
371
|
-
I.value.push(
|
|
372
|
-
const o = j(
|
|
373
|
-
le.value = o.children.slice(), C("selectDatapoint",
|
|
369
|
+
I.value.push(l.id), le.value = l.children.slice(), C("selectDatapoint", e);
|
|
370
|
+
else if (e.parentId) {
|
|
371
|
+
I.value.push(e.parentId);
|
|
372
|
+
const o = j(e.parentId);
|
|
373
|
+
le.value = o.children.slice(), C("selectDatapoint", e);
|
|
374
374
|
} else if (I.value.length > 0) {
|
|
375
375
|
I.value.pop();
|
|
376
376
|
const o = I.value[I.value.length - 1];
|
|
@@ -378,14 +378,14 @@ const lo = ["id"], ao = {
|
|
|
378
378
|
const a = j(o);
|
|
379
379
|
le.value = a.children.slice();
|
|
380
380
|
} else
|
|
381
|
-
le.value =
|
|
381
|
+
le.value = W.value.slice(), I.value = [], C("selectDatapoint", void 0);
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
function kt(
|
|
385
|
-
return !!(j(
|
|
384
|
+
function kt(e) {
|
|
385
|
+
return !!(j(e.id)?.children?.length || e.parentId);
|
|
386
386
|
}
|
|
387
|
-
const
|
|
388
|
-
const
|
|
387
|
+
const G = b(() => {
|
|
388
|
+
const e = [
|
|
389
389
|
{ id: null, label: "All" }
|
|
390
390
|
];
|
|
391
391
|
if (I.value.length > 0) {
|
|
@@ -394,93 +394,93 @@ const lo = ["id"], ao = {
|
|
|
394
394
|
for (; l; )
|
|
395
395
|
o.unshift(l), l = l.parentId ? j(l.parentId) : null;
|
|
396
396
|
for (const a of o)
|
|
397
|
-
|
|
397
|
+
e.push({
|
|
398
398
|
id: a.id,
|
|
399
399
|
label: a.name,
|
|
400
400
|
node: a
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
|
-
return
|
|
404
|
-
}),
|
|
405
|
-
...
|
|
406
|
-
color: me(
|
|
403
|
+
return e;
|
|
404
|
+
}), L = B(null), Je = b(() => W.value.map((e, l) => ({
|
|
405
|
+
...e,
|
|
406
|
+
color: me(e.color) || ce.value[l] || S[l] || S[l % S.length],
|
|
407
407
|
shape: "square"
|
|
408
|
-
})).sort((
|
|
409
|
-
...
|
|
410
|
-
proportion:
|
|
411
|
-
opacity:
|
|
408
|
+
})).sort((e, l) => l.value - e.value).map((e, l) => ({
|
|
409
|
+
...e,
|
|
410
|
+
proportion: e.value / W.value.map((o) => o.value).reduce((o, a) => o + a, 0),
|
|
411
|
+
opacity: P.value.includes(e.id) ? 0.5 : 1
|
|
412
412
|
}))), wt = b(() => ({
|
|
413
413
|
cy: "treemap-div-legend",
|
|
414
|
-
backgroundColor:
|
|
415
|
-
color:
|
|
416
|
-
fontSize:
|
|
414
|
+
backgroundColor: t.value.style.chart.legend.backgroundColor,
|
|
415
|
+
color: t.value.style.chart.legend.color,
|
|
416
|
+
fontSize: t.value.style.chart.legend.fontSize,
|
|
417
417
|
paddingBottom: 12,
|
|
418
|
-
fontWeight:
|
|
418
|
+
fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
|
|
419
419
|
}));
|
|
420
|
-
function Qe(
|
|
421
|
-
|
|
420
|
+
function Qe(e) {
|
|
421
|
+
L.value = null, P.value.includes(e.id) ? P.value = P.value.filter((l) => l !== e.id) : P.value.length < w.dataset.length - 1 && P.value.push(e.id), C("selectLegend", Xe.value);
|
|
422
422
|
}
|
|
423
423
|
const Ce = $(null);
|
|
424
|
-
function Ct({ datapoint:
|
|
425
|
-
|
|
426
|
-
const o =
|
|
424
|
+
function Ct({ datapoint: e, seriesIndex: l }) {
|
|
425
|
+
L.value = e, Ce.value = { datapoint: e, seriesIndex: l, config: t.value, series: ue.value };
|
|
426
|
+
const o = t.value.style.chart.tooltip.customFormat;
|
|
427
427
|
if (ct(o) && Vt(() => o({
|
|
428
428
|
seriesIndex: l,
|
|
429
|
-
datapoint:
|
|
429
|
+
datapoint: e,
|
|
430
430
|
series: ue.value,
|
|
431
|
-
config:
|
|
431
|
+
config: t.value
|
|
432
432
|
})))
|
|
433
433
|
ke.value = o({
|
|
434
434
|
seriesIndex: l,
|
|
435
|
-
datapoint:
|
|
435
|
+
datapoint: e,
|
|
436
436
|
series: ue.value,
|
|
437
|
-
config:
|
|
437
|
+
config: t.value
|
|
438
438
|
});
|
|
439
439
|
else {
|
|
440
440
|
let a = "";
|
|
441
|
-
a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${
|
|
442
|
-
|
|
443
|
-
|
|
441
|
+
a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, a += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${e.color}"/></svg>`, a += `<b>${be(
|
|
442
|
+
t.value.style.chart.layout.labels.formatter,
|
|
443
|
+
e.value,
|
|
444
444
|
ie({
|
|
445
|
-
p:
|
|
446
|
-
v:
|
|
447
|
-
s:
|
|
448
|
-
r:
|
|
445
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
446
|
+
v: e.value,
|
|
447
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
448
|
+
r: t.value.style.chart.tooltip.roundingValue
|
|
449
449
|
}),
|
|
450
|
-
{ datapoint:
|
|
450
|
+
{ datapoint: e, seriesIndex: l }
|
|
451
451
|
)}</b>`, ke.value = `<div>${a}</div>`;
|
|
452
452
|
}
|
|
453
|
-
|
|
453
|
+
z.value = !0;
|
|
454
454
|
}
|
|
455
|
-
const
|
|
456
|
-
const
|
|
455
|
+
const V = b(() => {
|
|
456
|
+
const e = re.value.map((o) => ({
|
|
457
457
|
name: o.name,
|
|
458
458
|
color: o.color
|
|
459
459
|
})), l = re.value.map((o) => o.value);
|
|
460
|
-
return { head:
|
|
460
|
+
return { head: e, body: l };
|
|
461
461
|
});
|
|
462
|
-
function et() {
|
|
462
|
+
function et(e = null) {
|
|
463
463
|
It(() => {
|
|
464
|
-
const
|
|
465
|
-
|
|
466
|
-
], [
|
|
467
|
-
Dt({ csvContent:
|
|
464
|
+
const l = V.value.head.map((f, N) => [[
|
|
465
|
+
f.name
|
|
466
|
+
], [V.value.body[N]], [isNaN(V.value.body[N] / ae.value) ? "-" : V.value.body[N] / ae.value * 100]]), o = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), a = Mt(o);
|
|
467
|
+
e ? e(a) : Dt({ csvContent: a, title: t.value.style.chart.title.text || "vue-ui-treemap" });
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
470
|
const ve = b(() => {
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
], l =
|
|
471
|
+
const e = [
|
|
472
|
+
t.value.table.columnNames.series,
|
|
473
|
+
t.value.table.columnNames.value,
|
|
474
|
+
t.value.table.columnNames.percentage
|
|
475
|
+
], l = V.value.head.map((f, N) => {
|
|
476
476
|
const fe = be(
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
t.value.style.chart.layout.labels.formatter,
|
|
478
|
+
V.value.body[N],
|
|
479
479
|
ie({
|
|
480
|
-
p:
|
|
481
|
-
v:
|
|
482
|
-
s:
|
|
483
|
-
r:
|
|
480
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
481
|
+
v: V.value.body[N],
|
|
482
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
483
|
+
r: t.value.table.td.roundingValue
|
|
484
484
|
})
|
|
485
485
|
);
|
|
486
486
|
return [
|
|
@@ -490,31 +490,31 @@ const lo = ["id"], ao = {
|
|
|
490
490
|
shape: "square"
|
|
491
491
|
},
|
|
492
492
|
fe,
|
|
493
|
-
isNaN(
|
|
494
|
-
v:
|
|
493
|
+
isNaN(V.value.body[N] / ae.value) ? "-" : ie({
|
|
494
|
+
v: V.value.body[N] / ae.value * 100,
|
|
495
495
|
s: "%",
|
|
496
|
-
r:
|
|
496
|
+
r: t.value.table.td.roundingPercentage
|
|
497
497
|
})
|
|
498
498
|
];
|
|
499
499
|
}), o = {
|
|
500
500
|
th: {
|
|
501
|
-
backgroundColor:
|
|
502
|
-
color:
|
|
503
|
-
outline:
|
|
501
|
+
backgroundColor: t.value.table.th.backgroundColor,
|
|
502
|
+
color: t.value.table.th.color,
|
|
503
|
+
outline: t.value.table.th.outline
|
|
504
504
|
},
|
|
505
505
|
td: {
|
|
506
|
-
backgroundColor:
|
|
507
|
-
color:
|
|
508
|
-
outline:
|
|
506
|
+
backgroundColor: t.value.table.td.backgroundColor,
|
|
507
|
+
color: t.value.table.td.color,
|
|
508
|
+
outline: t.value.table.td.outline
|
|
509
509
|
},
|
|
510
|
-
breakpoint:
|
|
510
|
+
breakpoint: t.value.table.responsiveBreakpoint
|
|
511
511
|
};
|
|
512
512
|
return {
|
|
513
513
|
colNames: [
|
|
514
|
-
|
|
515
|
-
|
|
514
|
+
t.value.table.columnNames.series,
|
|
515
|
+
t.value.table.columnNames.value
|
|
516
516
|
],
|
|
517
|
-
head:
|
|
517
|
+
head: e,
|
|
518
518
|
body: l,
|
|
519
519
|
config: o
|
|
520
520
|
};
|
|
@@ -523,18 +523,18 @@ const lo = ["id"], ao = {
|
|
|
523
523
|
return re.value;
|
|
524
524
|
}
|
|
525
525
|
function tt() {
|
|
526
|
-
|
|
526
|
+
R.value.showTable = !R.value.showTable;
|
|
527
527
|
}
|
|
528
528
|
function ot() {
|
|
529
|
-
|
|
529
|
+
R.value.showTooltip = !R.value.showTooltip;
|
|
530
530
|
}
|
|
531
531
|
const he = $(!1);
|
|
532
532
|
function $e() {
|
|
533
533
|
he.value = !he.value;
|
|
534
534
|
}
|
|
535
535
|
const pe = $(null);
|
|
536
|
-
function lt(
|
|
537
|
-
pe.value =
|
|
536
|
+
function lt(e) {
|
|
537
|
+
pe.value = e;
|
|
538
538
|
}
|
|
539
539
|
function at() {
|
|
540
540
|
pe.value = null;
|
|
@@ -547,20 +547,20 @@ const lo = ["id"], ao = {
|
|
|
547
547
|
toggleTable: tt,
|
|
548
548
|
toggleTooltip: ot,
|
|
549
549
|
toggleAnnotator: $e
|
|
550
|
-
}), (
|
|
550
|
+
}), (e, l) => (v(), y("div", {
|
|
551
551
|
ref_key: "treemapChart",
|
|
552
552
|
ref: se,
|
|
553
|
-
class: xe(`vue-ui-treemap ${te.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${
|
|
554
|
-
style:
|
|
555
|
-
id: `treemap_${
|
|
553
|
+
class: xe(`vue-ui-treemap ${te.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
554
|
+
style: M(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive ? "height: 100%;" : ""} text-align:center;background:${t.value.style.chart.backgroundColor}`),
|
|
555
|
+
id: `treemap_${F.value}`,
|
|
556
556
|
onMouseenter: l[3] || (l[3] = () => d(De)(!0)),
|
|
557
557
|
onMouseleave: l[4] || (l[4] = () => d(De)(!1))
|
|
558
558
|
}, [
|
|
559
|
-
|
|
559
|
+
t.value.userOptions.buttons.annotator ? (v(), Z(d(u), {
|
|
560
560
|
key: 0,
|
|
561
561
|
svgRef: d(Be),
|
|
562
|
-
backgroundColor:
|
|
563
|
-
color:
|
|
562
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
563
|
+
color: t.value.style.chart.color,
|
|
564
564
|
active: he.value,
|
|
565
565
|
onClose: $e
|
|
566
566
|
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : O("", !0),
|
|
@@ -571,48 +571,48 @@ const lo = ["id"], ao = {
|
|
|
571
571
|
class: "vue-data-ui-no-title-space",
|
|
572
572
|
style: "height:36px; width: 100%;background:transparent"
|
|
573
573
|
}, null, 512)) : O("", !0),
|
|
574
|
-
|
|
574
|
+
t.value.style.chart.title.text ? (v(), y("div", {
|
|
575
575
|
key: 2,
|
|
576
576
|
ref_key: "chartTitle",
|
|
577
577
|
ref: ze,
|
|
578
|
-
style:
|
|
578
|
+
style: M(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)
|
|
579
579
|
}, [
|
|
580
580
|
(v(), Z(qt, {
|
|
581
581
|
key: `title_${Re.value}`,
|
|
582
582
|
config: {
|
|
583
583
|
title: {
|
|
584
584
|
cy: "treemap-div-title",
|
|
585
|
-
...
|
|
585
|
+
...t.value.style.chart.title
|
|
586
586
|
},
|
|
587
587
|
subtitle: {
|
|
588
588
|
cy: "treemap-div-subtitle",
|
|
589
|
-
...
|
|
589
|
+
...t.value.style.chart.title.subtitle
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
}, null, 8, ["config"]))
|
|
593
593
|
], 4)) : O("", !0),
|
|
594
|
-
|
|
594
|
+
t.value.userOptions.show && x.value && (d(Ve) || d(we)) ? (v(), Z(d(p), {
|
|
595
595
|
ref: "details",
|
|
596
596
|
key: `user_option_${Ne.value}`,
|
|
597
|
-
backgroundColor:
|
|
598
|
-
color:
|
|
597
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
598
|
+
color: t.value.style.chart.color,
|
|
599
599
|
isPrinting: d(Ue),
|
|
600
600
|
isImaging: d(We),
|
|
601
|
-
uid:
|
|
602
|
-
hasTooltip:
|
|
603
|
-
hasPdf:
|
|
604
|
-
hasXls:
|
|
605
|
-
hasImg:
|
|
606
|
-
hasTable:
|
|
607
|
-
hasFullscreen:
|
|
601
|
+
uid: F.value,
|
|
602
|
+
hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
|
|
603
|
+
hasPdf: t.value.userOptions.buttons.pdf,
|
|
604
|
+
hasXls: t.value.userOptions.buttons.csv,
|
|
605
|
+
hasImg: t.value.userOptions.buttons.img,
|
|
606
|
+
hasTable: t.value.userOptions.buttons.table,
|
|
607
|
+
hasFullscreen: t.value.userOptions.buttons.fullscreen,
|
|
608
608
|
isFullscreen: te.value,
|
|
609
|
-
isTooltip:
|
|
610
|
-
titles: { ...
|
|
609
|
+
isTooltip: R.value.showTooltip,
|
|
610
|
+
titles: { ...t.value.userOptions.buttonTitles },
|
|
611
611
|
chartElement: se.value,
|
|
612
|
-
position:
|
|
613
|
-
hasAnnotator:
|
|
612
|
+
position: t.value.userOptions.position,
|
|
613
|
+
hasAnnotator: t.value.userOptions.buttons.annotator,
|
|
614
614
|
isAnnotation: he.value,
|
|
615
|
-
callbacks:
|
|
615
|
+
callbacks: t.value.userOptions.callbacks,
|
|
616
616
|
onToggleFullscreen: bt,
|
|
617
617
|
onGeneratePdf: d(Ee),
|
|
618
618
|
onGenerateCsv: et,
|
|
@@ -620,82 +620,82 @@ const lo = ["id"], ao = {
|
|
|
620
620
|
onToggleTable: tt,
|
|
621
621
|
onToggleTooltip: ot,
|
|
622
622
|
onToggleAnnotator: $e,
|
|
623
|
-
style:
|
|
623
|
+
style: M({
|
|
624
624
|
visibility: d(Ve) ? d(we) ? "visible" : "hidden" : "visible"
|
|
625
625
|
})
|
|
626
626
|
}, St({ _: 2 }, [
|
|
627
|
-
|
|
627
|
+
e.$slots.menuIcon ? {
|
|
628
628
|
name: "menuIcon",
|
|
629
629
|
fn: T(({ isOpen: o, color: a }) => [
|
|
630
|
-
k(
|
|
630
|
+
k(e.$slots, "menuIcon", J(Q({ isOpen: o, color: a })), void 0, !0)
|
|
631
631
|
]),
|
|
632
632
|
key: "0"
|
|
633
633
|
} : void 0,
|
|
634
|
-
|
|
634
|
+
e.$slots.optionTooltip ? {
|
|
635
635
|
name: "optionTooltip",
|
|
636
636
|
fn: T(() => [
|
|
637
|
-
k(
|
|
637
|
+
k(e.$slots, "optionTooltip", {}, void 0, !0)
|
|
638
638
|
]),
|
|
639
639
|
key: "1"
|
|
640
640
|
} : void 0,
|
|
641
|
-
|
|
641
|
+
e.$slots.optionPdf ? {
|
|
642
642
|
name: "optionPdf",
|
|
643
643
|
fn: T(() => [
|
|
644
|
-
k(
|
|
644
|
+
k(e.$slots, "optionPdf", {}, void 0, !0)
|
|
645
645
|
]),
|
|
646
646
|
key: "2"
|
|
647
647
|
} : void 0,
|
|
648
|
-
|
|
648
|
+
e.$slots.optionCsv ? {
|
|
649
649
|
name: "optionCsv",
|
|
650
650
|
fn: T(() => [
|
|
651
|
-
k(
|
|
651
|
+
k(e.$slots, "optionCsv", {}, void 0, !0)
|
|
652
652
|
]),
|
|
653
653
|
key: "3"
|
|
654
654
|
} : void 0,
|
|
655
|
-
|
|
655
|
+
e.$slots.optionImg ? {
|
|
656
656
|
name: "optionImg",
|
|
657
657
|
fn: T(() => [
|
|
658
|
-
k(
|
|
658
|
+
k(e.$slots, "optionImg", {}, void 0, !0)
|
|
659
659
|
]),
|
|
660
660
|
key: "4"
|
|
661
661
|
} : void 0,
|
|
662
|
-
|
|
662
|
+
e.$slots.optionTable ? {
|
|
663
663
|
name: "optionTable",
|
|
664
664
|
fn: T(() => [
|
|
665
|
-
k(
|
|
665
|
+
k(e.$slots, "optionTable", {}, void 0, !0)
|
|
666
666
|
]),
|
|
667
667
|
key: "5"
|
|
668
668
|
} : void 0,
|
|
669
|
-
|
|
669
|
+
e.$slots.optionFullscreen ? {
|
|
670
670
|
name: "optionFullscreen",
|
|
671
671
|
fn: T(({ toggleFullscreen: o, isFullscreen: a }) => [
|
|
672
|
-
k(
|
|
672
|
+
k(e.$slots, "optionFullscreen", J(Q({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
|
|
673
673
|
]),
|
|
674
674
|
key: "6"
|
|
675
675
|
} : void 0,
|
|
676
|
-
|
|
676
|
+
e.$slots.optionAnnotator ? {
|
|
677
677
|
name: "optionAnnotator",
|
|
678
678
|
fn: T(({ toggleAnnotator: o, isAnnotator: a }) => [
|
|
679
|
-
k(
|
|
679
|
+
k(e.$slots, "optionAnnotator", J(Q({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
|
|
680
680
|
]),
|
|
681
681
|
key: "7"
|
|
682
682
|
} : void 0
|
|
683
683
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "onGeneratePdf", "onGenerateImage", "style"])) : O("", !0),
|
|
684
|
-
|
|
685
|
-
(v(!0), y(ge, null, Oe(
|
|
684
|
+
G.value.length > 1 ? (v(), y("nav", ao, [
|
|
685
|
+
(v(!0), y(ge, null, Oe(G.value, (o, a) => (v(), y("span", {
|
|
686
686
|
role: "button",
|
|
687
|
-
tabindex: a <
|
|
687
|
+
tabindex: a < G.value.length - 1 ? 0 : void 0,
|
|
688
688
|
key: o.id || "root",
|
|
689
|
-
onClick: (f) => a ===
|
|
689
|
+
onClick: (f) => a === G.value.length - 1 ? () => {
|
|
690
690
|
} : de(o.node),
|
|
691
691
|
onKeydown: [
|
|
692
|
-
st(_e((f) => a ===
|
|
693
|
-
st(_e((f) => a ===
|
|
692
|
+
st(_e((f) => a === G.value.length - 1 ? void 0 : de(o.node), ["prevent"]), ["enter"]),
|
|
693
|
+
st(_e((f) => a === G.value.length - 1 ? void 0 : de(o.node), ["prevent"]), ["space"])
|
|
694
694
|
],
|
|
695
695
|
class: "vue-ui-treemap-crumb",
|
|
696
|
-
"data-last-crumb": a ===
|
|
697
|
-
style:
|
|
698
|
-
color:
|
|
696
|
+
"data-last-crumb": a === G.value.length - 1,
|
|
697
|
+
style: M({
|
|
698
|
+
color: t.value.style.chart.color
|
|
699
699
|
}),
|
|
700
700
|
onMouseenter: (f) => lt(a),
|
|
701
701
|
onMouseleave: at,
|
|
@@ -704,19 +704,19 @@ const lo = ["id"], ao = {
|
|
|
704
704
|
}, [
|
|
705
705
|
_("span", so, [
|
|
706
706
|
_("span", uo, [
|
|
707
|
-
k(
|
|
707
|
+
k(e.$slots, "breadcrumb-label", ut({ ref_for: !0 }, { crumb: o, isRoot: a === 0, isFocus: pe.value === a }), () => [
|
|
708
708
|
a === 0 ? (v(), y("div", ro, [
|
|
709
709
|
Te(Gt, {
|
|
710
710
|
name: pe.value === 0 ? "homeFilled" : "home",
|
|
711
|
-
stroke:
|
|
711
|
+
stroke: t.value.style.chart.color
|
|
712
712
|
}, null, 8, ["name", "stroke"])
|
|
713
713
|
])) : (v(), y(ge, { key: 1 }, [
|
|
714
714
|
ye(ee(o.label), 1)
|
|
715
715
|
], 64))
|
|
716
716
|
], !0)
|
|
717
717
|
]),
|
|
718
|
-
a <
|
|
719
|
-
k(
|
|
718
|
+
a < G.value.length - 1 ? (v(), y("span", io, [
|
|
719
|
+
k(e.$slots, "breadcrumb-arrow", {}, () => [
|
|
720
720
|
l[5] || (l[5] = ye(" › "))
|
|
721
721
|
], !0)
|
|
722
722
|
])) : O("", !0)
|
|
@@ -730,13 +730,13 @@ const lo = ["id"], ao = {
|
|
|
730
730
|
xmlns: d(Lt),
|
|
731
731
|
class: xe({ "vue-data-ui-fullscreen--on": te.value, "vue-data-ui-fulscreen--off": !te.value, "vue-data-ui-zoom-plus": !Y.value, "vue-data-ui-zoom-minus": Y.value }),
|
|
732
732
|
viewBox: `${ne.value.startX} ${ne.value.startY} ${ne.value.width <= 0 ? 10 : ne.value.width} ${ne.value.height <= 0 ? 10 : ne.value.height}`,
|
|
733
|
-
style:
|
|
733
|
+
style: M(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)
|
|
734
734
|
}, [
|
|
735
|
-
Te(d(
|
|
735
|
+
Te(d(H)),
|
|
736
736
|
(v(!0), y(ge, null, Oe(re.value, (o, a) => (v(), y("g", {
|
|
737
737
|
key: `tgrad_${o.id}`
|
|
738
738
|
}, [
|
|
739
|
-
|
|
739
|
+
t.value.style.chart.layout.rects.gradient.show ? (v(), y("defs", vo, [
|
|
740
740
|
_("radialGradient", {
|
|
741
741
|
id: `tgrad_${o.id}`,
|
|
742
742
|
gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
|
|
@@ -747,7 +747,7 @@ const lo = ["id"], ao = {
|
|
|
747
747
|
}, null, 8, po),
|
|
748
748
|
_("stop", {
|
|
749
749
|
offset: "100%",
|
|
750
|
-
"stop-color": d(rt)(o.color,
|
|
750
|
+
"stop-color": d(rt)(o.color, t.value.style.chart.layout.rects.gradient.intensity / 100)
|
|
751
751
|
}, null, 8, fo)
|
|
752
752
|
], 8, ho)
|
|
753
753
|
])) : O("", !0)
|
|
@@ -760,19 +760,19 @@ const lo = ["id"], ao = {
|
|
|
760
760
|
y: o.y0,
|
|
761
761
|
height: Ke(o),
|
|
762
762
|
width: Ze(o),
|
|
763
|
-
fill:
|
|
764
|
-
rx:
|
|
765
|
-
stroke:
|
|
766
|
-
"stroke-width":
|
|
763
|
+
fill: D.value ? o.color : t.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${o.id})` : o.color,
|
|
764
|
+
rx: t.value.style.chart.layout.rects.borderRadius,
|
|
765
|
+
stroke: L.value && L.value.id === o.id ? t.value.style.chart.layout.rects.selected.stroke : t.value.style.chart.layout.rects.stroke,
|
|
766
|
+
"stroke-width": L.value && L.value.id === o.id ? t.value.style.chart.layout.rects.selected.strokeWidth : t.value.style.chart.layout.rects.strokeWidth,
|
|
767
767
|
onClick: _e((f) => de(o), ["stop"]),
|
|
768
768
|
onMouseenter: () => Ct({
|
|
769
769
|
datapoint: o,
|
|
770
770
|
seriesIndex: a
|
|
771
771
|
}),
|
|
772
772
|
onMouseleave: l[0] || (l[0] = (f) => {
|
|
773
|
-
|
|
773
|
+
L.value = null, z.value = !1;
|
|
774
774
|
}),
|
|
775
|
-
style:
|
|
775
|
+
style: M(`opacity:${L.value ? L.value.id === o.id ? 1 : t.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
|
|
776
776
|
class: xe([
|
|
777
777
|
"vue-ui-treemap-rect",
|
|
778
778
|
kt(o) ? "vue-data-ui-zoom-plus" : Y.value ? "vue-data-ui-zoom-minus" : ""
|
|
@@ -786,32 +786,32 @@ const lo = ["id"], ao = {
|
|
|
786
786
|
class: "vue-ui-treemap-cell-foreignObject"
|
|
787
787
|
}, [
|
|
788
788
|
_("div", mo, [
|
|
789
|
-
|
|
789
|
+
t.value.style.chart.layout.labels.showDefaultLabels && (o.proportion > t.value.style.chart.layout.labels.hideUnderProportion || Y.value) ? (v(), y("div", {
|
|
790
790
|
key: 0,
|
|
791
791
|
class: "vue-ui-treemap-cell-default",
|
|
792
|
-
style:
|
|
792
|
+
style: M(`width:calc(100% - ${X(o) / 1.5}px);text-align:left;line-height:${X(o) < 14 ? 14 : X(o)}px;padding:${X(o) / 3}px; color:${d(it)(o.color)}`)
|
|
793
793
|
}, [
|
|
794
794
|
_("span", {
|
|
795
|
-
style:
|
|
795
|
+
style: M(`width:100%;font-size:${X(o)}px;`)
|
|
796
796
|
}, ee(o.name), 5),
|
|
797
797
|
l[6] || (l[6] = _("br", null, null, -1)),
|
|
798
798
|
_("span", {
|
|
799
|
-
style:
|
|
799
|
+
style: M(`width:100%;font-size:${X(o)}px;`)
|
|
800
800
|
}, ee(d(be)(
|
|
801
|
-
|
|
801
|
+
t.value.style.chart.layout.labels.formatter,
|
|
802
802
|
o.value,
|
|
803
803
|
d(ie)({
|
|
804
|
-
p:
|
|
804
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
805
805
|
v: o.value,
|
|
806
|
-
s:
|
|
807
|
-
r:
|
|
806
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
807
|
+
r: t.value.style.chart.layout.labels.rounding
|
|
808
808
|
}),
|
|
809
809
|
{ datapoint: o }
|
|
810
810
|
)), 5)
|
|
811
811
|
], 4)) : O("", !0),
|
|
812
|
-
k(
|
|
812
|
+
k(e.$slots, "rect", ut({ ref_for: !0 }, {
|
|
813
813
|
rect: o,
|
|
814
|
-
shouldShow: o.proportion >
|
|
814
|
+
shouldShow: o.proportion > t.value.style.chart.layout.labels.hideUnderProportion || Y.value,
|
|
815
815
|
fontSize: X(o),
|
|
816
816
|
isZoom: Y.value,
|
|
817
817
|
textColor: d(it)(o.color)
|
|
@@ -819,17 +819,17 @@ const lo = ["id"], ao = {
|
|
|
819
819
|
])
|
|
820
820
|
], 8, yo))
|
|
821
821
|
]))), 128)),
|
|
822
|
-
k(
|
|
822
|
+
k(e.$slots, "svg", J(Q({ svg: q.value, isZoom: Y.value, rect: L.value, config: t.value })), void 0, !0)
|
|
823
823
|
], 14, co)) : O("", !0),
|
|
824
|
-
|
|
825
|
-
k(
|
|
824
|
+
e.$slots.watermark ? (v(), y("div", bo, [
|
|
825
|
+
k(e.$slots, "watermark", J(Q({ isPrinting: d(Ue) || d(We) })), void 0, !0)
|
|
826
826
|
])) : O("", !0),
|
|
827
827
|
x.value ? O("", !0) : (v(), Z(d(c), {
|
|
828
828
|
key: 7,
|
|
829
829
|
config: {
|
|
830
830
|
type: "treemap",
|
|
831
831
|
style: {
|
|
832
|
-
backgroundColor:
|
|
832
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
833
833
|
treemap: {
|
|
834
834
|
color: "#CCCCCC"
|
|
835
835
|
}
|
|
@@ -840,67 +840,67 @@ const lo = ["id"], ao = {
|
|
|
840
840
|
ref_key: "chartLegend",
|
|
841
841
|
ref: Ae
|
|
842
842
|
}, [
|
|
843
|
-
|
|
843
|
+
t.value.style.chart.legend.show ? (v(), Z(Xt, {
|
|
844
844
|
key: `legend_${Me.value}`,
|
|
845
845
|
legendSet: Je.value,
|
|
846
846
|
config: wt.value,
|
|
847
|
-
id: `treemap_legend_${
|
|
847
|
+
id: `treemap_legend_${F.value}`,
|
|
848
848
|
onClickMarker: l[1] || (l[1] = ({ legend: o }) => Qe(o))
|
|
849
849
|
}, {
|
|
850
850
|
item: T(({ legend: o, index: a }) => [
|
|
851
851
|
_("div", {
|
|
852
852
|
onClick: (f) => Qe(o),
|
|
853
|
-
style:
|
|
853
|
+
style: M(`opacity:${P.value.includes(o.id) ? 0.5 : 1}`)
|
|
854
854
|
}, [
|
|
855
855
|
ye(ee(o.name) + ": " + ee(d(be)(
|
|
856
|
-
|
|
856
|
+
t.value.style.chart.layout.labels.formatter,
|
|
857
857
|
o.value,
|
|
858
858
|
d(ie)({
|
|
859
|
-
p:
|
|
859
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
860
860
|
v: o.value,
|
|
861
|
-
s:
|
|
862
|
-
r:
|
|
861
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
862
|
+
r: t.value.style.chart.legend.roundingValue
|
|
863
863
|
}),
|
|
864
864
|
{ datapoint: o }
|
|
865
865
|
)) + " ", 1),
|
|
866
|
-
|
|
866
|
+
P.value.includes(o.id) ? (v(), y("span", Co, " ( - % ) ")) : (v(), y("span", wo, " (" + ee(isNaN(o.value / ae.value) ? "-" : (o.value / ae.value * 100).toFixed(t.value.style.chart.legend.roundingPercentage)) + "%) ", 1))
|
|
867
867
|
], 12, ko)
|
|
868
868
|
]),
|
|
869
869
|
_: 1
|
|
870
|
-
}, 8, ["legendSet", "config", "id"])) : k(
|
|
870
|
+
}, 8, ["legendSet", "config", "id"])) : k(e.$slots, "legend", {
|
|
871
871
|
key: 1,
|
|
872
872
|
legend: Je.value
|
|
873
873
|
}, void 0, !0)
|
|
874
874
|
], 512),
|
|
875
|
-
|
|
875
|
+
e.$slots.source ? (v(), y("div", {
|
|
876
876
|
key: 8,
|
|
877
877
|
ref_key: "source",
|
|
878
878
|
ref: Fe,
|
|
879
879
|
dir: "auto"
|
|
880
880
|
}, [
|
|
881
|
-
k(
|
|
881
|
+
k(e.$slots, "source", {}, void 0, !0)
|
|
882
882
|
], 512)) : O("", !0),
|
|
883
883
|
Te(d(g), {
|
|
884
|
-
show:
|
|
885
|
-
backgroundColor:
|
|
886
|
-
color:
|
|
887
|
-
fontSize:
|
|
888
|
-
borderRadius:
|
|
889
|
-
borderColor:
|
|
890
|
-
borderWidth:
|
|
891
|
-
backgroundOpacity:
|
|
892
|
-
position:
|
|
893
|
-
offsetY:
|
|
884
|
+
show: R.value.showTooltip && z.value,
|
|
885
|
+
backgroundColor: t.value.style.chart.tooltip.backgroundColor,
|
|
886
|
+
color: t.value.style.chart.tooltip.color,
|
|
887
|
+
fontSize: t.value.style.chart.tooltip.fontSize,
|
|
888
|
+
borderRadius: t.value.style.chart.tooltip.borderRadius,
|
|
889
|
+
borderColor: t.value.style.chart.tooltip.borderColor,
|
|
890
|
+
borderWidth: t.value.style.chart.tooltip.borderWidth,
|
|
891
|
+
backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
|
|
892
|
+
position: t.value.style.chart.tooltip.position,
|
|
893
|
+
offsetY: t.value.style.chart.tooltip.offsetY,
|
|
894
894
|
parent: se.value,
|
|
895
895
|
content: ke.value,
|
|
896
896
|
isFullscreen: te.value,
|
|
897
|
-
isCustom: d(ct)(
|
|
897
|
+
isCustom: d(ct)(t.value.style.chart.tooltip.customFormat)
|
|
898
898
|
}, {
|
|
899
899
|
"tooltip-before": T(() => [
|
|
900
|
-
k(
|
|
900
|
+
k(e.$slots, "tooltip-before", J(Q({ ...Ce.value })), void 0, !0)
|
|
901
901
|
]),
|
|
902
902
|
"tooltip-after": T(() => [
|
|
903
|
-
k(
|
|
903
|
+
k(e.$slots, "tooltip-after", J(Q({ ...Ce.value })), void 0, !0)
|
|
904
904
|
]),
|
|
905
905
|
_: 3
|
|
906
906
|
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
@@ -908,15 +908,15 @@ const lo = ["id"], ao = {
|
|
|
908
908
|
key: 9,
|
|
909
909
|
hideDetails: "",
|
|
910
910
|
config: {
|
|
911
|
-
open:
|
|
911
|
+
open: R.value.showTable,
|
|
912
912
|
maxHeight: 1e4,
|
|
913
913
|
body: {
|
|
914
|
-
backgroundColor:
|
|
915
|
-
color:
|
|
914
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
915
|
+
color: t.value.style.chart.color
|
|
916
916
|
},
|
|
917
917
|
head: {
|
|
918
|
-
backgroundColor:
|
|
919
|
-
color:
|
|
918
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
919
|
+
color: t.value.style.chart.color
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
922
|
}, {
|
|
@@ -927,8 +927,8 @@ const lo = ["id"], ao = {
|
|
|
927
927
|
head: ve.value.head,
|
|
928
928
|
body: ve.value.body,
|
|
929
929
|
config: ve.value.config,
|
|
930
|
-
title: `${
|
|
931
|
-
onClose: l[2] || (l[2] = (o) =>
|
|
930
|
+
title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
|
|
931
|
+
onClose: l[2] || (l[2] = (o) => R.value.showTable = !1)
|
|
932
932
|
}, {
|
|
933
933
|
th: T(({ th: o }) => [
|
|
934
934
|
_("div", {
|
|
@@ -946,7 +946,7 @@ const lo = ["id"], ao = {
|
|
|
946
946
|
}, 8, ["config"])) : O("", !0)
|
|
947
947
|
], 46, lo));
|
|
948
948
|
}
|
|
949
|
-
}, Lo = /* @__PURE__ */ jt(xo, [["__scopeId", "data-v-
|
|
949
|
+
}, Lo = /* @__PURE__ */ jt(xo, [["__scopeId", "data-v-cbd9ec3f"]]);
|
|
950
950
|
export {
|
|
951
951
|
Lo as default
|
|
952
952
|
};
|