vue-data-ui 3.23.4 → 3.23.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PackageVersion-CtRPcMPr.js → PackageVersion-BZs_wnK5.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-MHNlcjAX.js → package-DpxpyR_I.js} +1 -1
- package/dist/{render-common-BOIjYVtz.js → render-common-WZ4vXtlg.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +14 -0
- package/dist/{useConfig-DlNpz6P8.js → useConfig-u71vax4T.js} +16 -3
- package/dist/{useObjectBindings-BeWS5v0i.js → useObjectBindings-d-C_nl0U.js} +2 -2
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-xlN6di_n.js → vue-data-ui-CMf1mzF1.js} +68 -68
- package/dist/vue-data-ui.js +69 -69
- package/dist/{vue-ui-3d-bar-G3GsMDp6.js → vue-ui-3d-bar-BHi1QlwW.js} +2 -2
- package/dist/{vue-ui-accordion-DegI2lzR.js → vue-ui-accordion-DNdBR3LQ.js} +1 -1
- package/dist/{vue-ui-age-pyramid-HW1Kiqib.js → vue-ui-age-pyramid-CivMIHO6.js} +2 -2
- package/dist/{vue-ui-annotator-DfG79D4r.js → vue-ui-annotator-fCliMKNQ.js} +2 -2
- package/dist/{vue-ui-bullet-AWT4T1Yz.js → vue-ui-bullet-BaRzzJfE.js} +2 -2
- package/dist/{vue-ui-bump-DNDDJtRI.js → vue-ui-bump-DhQKyCdv.js} +2 -2
- package/dist/{vue-ui-candlestick-DvNtfrWd.js → vue-ui-candlestick-C_QlFw1y.js} +2 -2
- package/dist/{vue-ui-carousel-table-BQk8CkxQ.js → vue-ui-carousel-table-DER6q3au.js} +2 -2
- package/dist/{vue-ui-chestnut-Cc2J1iOE.js → vue-ui-chestnut-BWc5fSXS.js} +2 -2
- package/dist/{vue-ui-chord-j2Qbi0HA.js → vue-ui-chord-Cbp8ULG2.js} +2 -2
- package/dist/{vue-ui-circle-pack-Do8Bbh4z.js → vue-ui-circle-pack-RDzMeb3A.js} +2 -2
- package/dist/{vue-ui-cursor-Cyzzm6Y6.js → vue-ui-cursor-MRKKLhJk.js} +2 -2
- package/dist/{vue-ui-dag-0e_XFGOJ.js → vue-ui-dag-0Q6HiGmy.js} +2 -2
- package/dist/{vue-ui-dashboard-BJzsxyrY.js → vue-ui-dashboard-CBWYnHvU.js} +65 -65
- package/dist/{vue-ui-digits-Uy498lu-.js → vue-ui-digits-C3Q7fmPc.js} +2 -2
- package/dist/{vue-ui-donut-8RB-gL2J.js → vue-ui-donut-B5DdD0_x.js} +2 -2
- package/dist/{vue-ui-donut-w8R0mW_C.js → vue-ui-donut-BMrXYTdN.js} +2 -2
- package/dist/{vue-ui-donut-evolution-CSYfyIbX.js → vue-ui-donut-evolution-CEcp64yA.js} +2 -2
- package/dist/{vue-ui-dumbbell-8eNZFzyp.js → vue-ui-dumbbell-B6V-yVd7.js} +2 -2
- package/dist/{vue-ui-flow-9VbVqIpA.js → vue-ui-flow-Ccx4O4-m.js} +2 -2
- package/dist/{vue-ui-funnel-BJvc2n0l.js → vue-ui-funnel-CgxQJMUU.js} +2 -2
- package/dist/{vue-ui-galaxy-cpdWAYuu.js → vue-ui-galaxy-CeaKn5Ld.js} +2 -2
- package/dist/{vue-ui-gauge-CCA1unzt.js → vue-ui-gauge-BCs7VZxY.js} +2 -2
- package/dist/{vue-ui-geo-BeFmMlu5.js → vue-ui-geo-Djrp8LQ6.js} +2 -2
- package/dist/{vue-ui-gizmo-BvShxRjx.js → vue-ui-gizmo-BCr3r9Z5.js} +2 -2
- package/dist/{vue-ui-heatmap-DaqaYsGY.js → vue-ui-heatmap-DIKxGiAH.js} +3 -3
- package/dist/{vue-ui-hill-BT5ixO2U.js → vue-ui-hill-DAavuv5-.js} +2 -2
- package/dist/{vue-ui-history-plot-S6MAWwzs.js → vue-ui-history-plot-COfZMiI7.js} +2 -2
- package/dist/{vue-ui-horizontal-bar-DUMN2pwu.js → vue-ui-horizontal-bar-B4vrK1QB.js} +3 -3
- package/dist/{vue-ui-kpi-_UO0otlH.js → vue-ui-kpi-Dlw9Mi3b.js} +2 -2
- package/dist/{vue-ui-mini-loader-CtTewZJG.js → vue-ui-mini-loader-DukGL2bc.js} +1 -1
- package/dist/{vue-ui-molecule-D0s8EZSv.js → vue-ui-molecule-ehZAzPqn.js} +2 -2
- package/dist/{vue-ui-mood-radar-BnvrlH3J.js → vue-ui-mood-radar-CS9qIJzX.js} +2 -2
- package/dist/{vue-ui-nested-donuts-CPkrAtLj.js → vue-ui-nested-donuts-CwEd9CDc.js} +2 -2
- package/dist/{vue-ui-onion-Cs-P6c1S.js → vue-ui-onion-BiffHj6v.js} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-1msZmPiM.js → vue-ui-parallel-coordinate-plot-DC9EjFYA.js} +2 -2
- package/dist/{vue-ui-quadrant-H4BH2X1n.js → vue-ui-quadrant-BIpxU65Y.js} +2 -2
- package/dist/{vue-ui-quick-chart-Dn2OpR7I.js → vue-ui-quick-chart-uwVsepnf.js} +2 -2
- package/dist/{vue-ui-radar-B-0WKG9B.js → vue-ui-radar-CHdxJwQ2.js} +416 -349
- package/dist/{vue-ui-rating-BDVSVFA0.js → vue-ui-rating-DoUFoJvB.js} +1 -1
- package/dist/{vue-ui-relation-circle-B9O3HmHR.js → vue-ui-relation-circle-FGG7wCYA.js} +2 -2
- package/dist/{vue-ui-ridgeline-D_8sALB0.js → vue-ui-ridgeline-ClyBRJef.js} +2 -2
- package/dist/{vue-ui-rings-lgGvyEW_.js → vue-ui-rings-CRDcurAB.js} +2 -2
- package/dist/{vue-ui-scatter-Dzdkyw1C.js → vue-ui-scatter-DYkylqTr.js} +2 -2
- package/dist/{vue-ui-skeleton-E6Hbh29Z.js → vue-ui-skeleton-CBtzmJiI.js} +2 -2
- package/dist/{vue-ui-smiley-5iHJeTPc.js → vue-ui-smiley-BTPYPZdS.js} +1 -1
- package/dist/{vue-ui-spark-trend-BUQ1_7eU.js → vue-ui-spark-trend-Cg__gAj9.js} +2 -2
- package/dist/{vue-ui-sparkbar-iyq8Toli.js → vue-ui-sparkbar-DSqyYcSy.js} +2 -2
- package/dist/{vue-ui-sparkgauge-CJXxmdWD.js → vue-ui-sparkgauge-CfW6-ExF.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-B_zDxZp5.js → vue-ui-sparkhistogram-ClN9JYQF.js} +2 -2
- package/dist/{vue-ui-sparkline-jQ1WegfT.js → vue-ui-sparkline-CzjD9seh.js} +2 -2
- package/dist/{vue-ui-sparkstackbar-Bcipd2lT.js → vue-ui-sparkstackbar-nZ3tHm7l.js} +2 -2
- package/dist/{vue-ui-stackbar-BH5oIVxw.js → vue-ui-stackbar-CRP_j7bH.js} +2 -2
- package/dist/{vue-ui-stackline-CAbvGgyL.js → vue-ui-stackline-CWBthsVq.js} +2 -2
- package/dist/{vue-ui-strip-plot-CjIOca_Y.js → vue-ui-strip-plot-CiEIA52J.js} +2 -2
- package/dist/{vue-ui-table-DzCJOvjR.js → vue-ui-table-CoGF2GWe.js} +3 -3
- package/dist/{vue-ui-table-heatmap-D1bbPXKG.js → vue-ui-table-heatmap-DQ28DYwv.js} +1 -1
- package/dist/{vue-ui-table-sparkline-Dc6HEQUQ.js → vue-ui-table-sparkline-DVpKsZd7.js} +2 -2
- package/dist/{vue-ui-thermometer-DdrOgp8t.js → vue-ui-thermometer-CyIIhi3B.js} +2 -2
- package/dist/{vue-ui-timer-BpFDnonz.js → vue-ui-timer-DAJmVDbB.js} +2 -2
- package/dist/{vue-ui-tiremarks-B19X7xfh.js → vue-ui-tiremarks-BIdIGZ3A.js} +2 -2
- package/dist/{vue-ui-treemap-Dd9pg6yW.js → vue-ui-treemap-e1dtE4yJ.js} +2 -2
- package/dist/vue-ui-waffle-CTvRwpKU.js +1595 -0
- package/dist/{vue-ui-wheel-C4HHM1-P.js → vue-ui-wheel-L7-X1Ezl.js} +2 -2
- package/dist/{vue-ui-word-cloud-e86BT9TU.js → vue-ui-word-cloud-B6ytHITa.js} +2 -2
- package/dist/{vue-ui-world-BYnB-6Gl.js → vue-ui-world-CPWP-sZ5.js} +2 -2
- package/dist/{vue-ui-xy-ChUQgqEu.js → vue-ui-xy-8NgsjKrE.js} +3 -3
- package/dist/{vue-ui-xy-LRU_D8xn.js → vue-ui-xy-DmydKppa.js} +2 -2
- package/dist/{vue-ui-xy-canvas-1rbwMA1m.js → vue-ui-xy-canvas-BMVdrH11.js} +2 -2
- package/dist/{vue_ui_waffle-DIARFc7g.js → vue_ui_waffle-DE_DiSVP.js} +14 -7
- package/package.json +3 -3
- package/dist/vue-ui-waffle-JmiCg9-q.js +0 -1386
|
@@ -0,0 +1,1595 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Bt as n, D as r, Jt as i, Kt as a, Pt as o, S as s, Vt as c, X as l, ct as ee, i as te, jt as ne, n as re, pt as ie, q as ae, r as oe, t as se, tt as ce, w as le, xt as ue } from "./lib-Bttd6u5E.js";
|
|
3
|
+
import { n as de, t as fe } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as pe } from "./useConfig-u71vax4T.js";
|
|
5
|
+
import { t as me } from "./usePrinter-DN5bYhTG.js";
|
|
6
|
+
import { n as he, t as ge } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
+
import { t as _e } from "./useNestedProp-vPNvh7rV.js";
|
|
8
|
+
import { t as ve } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as ye } from "./useChartExport-DNiwdPmb.js";
|
|
10
|
+
import { t as be } from "./useTransitions-g_zBREk2.js";
|
|
11
|
+
import { t as xe } from "./img-Bnokohej.js";
|
|
12
|
+
import { n as Se } from "./Title-BE3qg9xl.js";
|
|
13
|
+
import { t as Ce } from "./Shape-C21CMlWS.js";
|
|
14
|
+
import { t as we } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
15
|
+
import { l as Te, t as Ee } from "./useResponsive-ZtArZtUf.js";
|
|
16
|
+
import { t as De } from "./DefGrad-DVBqDjhO.js";
|
|
17
|
+
import { t as Oe } from "./BaseLegendToggle-DZVucLnv.js";
|
|
18
|
+
import { t as ke } from "./A11yDataTable-DdRsVULz.js";
|
|
19
|
+
import { t as Ae } from "./useUserOptionState-DK-_1ddE.js";
|
|
20
|
+
import { t as je } from "./useChartAccessibility-DYqac8yF.js";
|
|
21
|
+
import { t as Me } from "./labelUtils-BeVpDvTJ.js";
|
|
22
|
+
import { t as Ne } from "./Legend-CQxUgOd-.js";
|
|
23
|
+
import { t as Pe } from "./usePrefersMotion-BC-CsqR1.js";
|
|
24
|
+
import { t as Fe } from "./vue_ui_waffle-DE_DiSVP.js";
|
|
25
|
+
import { Fragment as u, Teleport as Ie, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as Le, createTextVNode as Re, createVNode as ze, defineAsyncComponent as g, guardReactiveProps as _, mergeProps as Be, nextTick as Ve, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as He, onMounted as Ue, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as We, shallowRef as Ge, toDisplayString as Ke, toRefs as qe, unref as T, useSlots as Je, watch as Ye, withCtx as E } from "vue";
|
|
26
|
+
//#region src/components/vue-ui-waffle.vue
|
|
27
|
+
var Xe = /* @__PURE__ */ e({ default: () => St }), Ze = ["id"], Qe = ["id"], $e = ["id"], et = { style: { position: "relative" } }, tt = [
|
|
28
|
+
"xmlns",
|
|
29
|
+
"aria-describedby",
|
|
30
|
+
"viewBox"
|
|
31
|
+
], nt = ["id"], rt = [
|
|
32
|
+
"x",
|
|
33
|
+
"y",
|
|
34
|
+
"height",
|
|
35
|
+
"width"
|
|
36
|
+
], it = ["height", "width"], at = { key: 0 }, ot = [
|
|
37
|
+
"d",
|
|
38
|
+
"stroke",
|
|
39
|
+
"stroke-width",
|
|
40
|
+
"filter"
|
|
41
|
+
], st = [
|
|
42
|
+
"d",
|
|
43
|
+
"fill",
|
|
44
|
+
"stroke",
|
|
45
|
+
"stroke-width",
|
|
46
|
+
"filter"
|
|
47
|
+
], ct = { key: 0 }, lt = [
|
|
48
|
+
"d",
|
|
49
|
+
"fill",
|
|
50
|
+
"filter"
|
|
51
|
+
], ut = [
|
|
52
|
+
"rx",
|
|
53
|
+
"x",
|
|
54
|
+
"y",
|
|
55
|
+
"height",
|
|
56
|
+
"width",
|
|
57
|
+
"stroke",
|
|
58
|
+
"stroke-width",
|
|
59
|
+
"filter"
|
|
60
|
+
], dt = [
|
|
61
|
+
"rx",
|
|
62
|
+
"x",
|
|
63
|
+
"y",
|
|
64
|
+
"height",
|
|
65
|
+
"width",
|
|
66
|
+
"fill",
|
|
67
|
+
"stroke",
|
|
68
|
+
"stroke-width",
|
|
69
|
+
"filter"
|
|
70
|
+
], ft = { key: 0 }, pt = [
|
|
71
|
+
"rx",
|
|
72
|
+
"x",
|
|
73
|
+
"y",
|
|
74
|
+
"height",
|
|
75
|
+
"width",
|
|
76
|
+
"fill",
|
|
77
|
+
"filter"
|
|
78
|
+
], mt = [
|
|
79
|
+
"points",
|
|
80
|
+
"stroke",
|
|
81
|
+
"stroke-width",
|
|
82
|
+
"stroke-linejoin"
|
|
83
|
+
], ht = [
|
|
84
|
+
"textContent",
|
|
85
|
+
"x",
|
|
86
|
+
"y",
|
|
87
|
+
"font-size",
|
|
88
|
+
"fill",
|
|
89
|
+
"filter"
|
|
90
|
+
], gt = [
|
|
91
|
+
"x",
|
|
92
|
+
"y",
|
|
93
|
+
"height",
|
|
94
|
+
"width",
|
|
95
|
+
"onMouseover",
|
|
96
|
+
"onMouseleave",
|
|
97
|
+
"onClick"
|
|
98
|
+
], _t = {
|
|
99
|
+
key: 0,
|
|
100
|
+
style: {
|
|
101
|
+
position: "absolute",
|
|
102
|
+
top: "100%",
|
|
103
|
+
left: "0",
|
|
104
|
+
width: "100%"
|
|
105
|
+
},
|
|
106
|
+
"data-dom-to-png-ignore": "",
|
|
107
|
+
"aria-hidden": "true"
|
|
108
|
+
}, vt = {
|
|
109
|
+
key: 5,
|
|
110
|
+
class: "vue-data-ui-watermark"
|
|
111
|
+
}, yt = ["id"], bt = ["onClick"], xt = ["innerHTML"], St = /*#__PURE__*/ we({
|
|
112
|
+
__name: "vue-ui-waffle",
|
|
113
|
+
props: {
|
|
114
|
+
config: {
|
|
115
|
+
type: Object,
|
|
116
|
+
default() {
|
|
117
|
+
return {};
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
dataset: {
|
|
121
|
+
type: Array,
|
|
122
|
+
default() {
|
|
123
|
+
return [];
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
emits: ["selectLegend", "copyAlt"],
|
|
128
|
+
setup(e, { expose: we, emit: Xe }) {
|
|
129
|
+
let St = g(() => import("./Tooltip-DhjyfHwz.js")), Ct = g(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), wt = g(() => import("./DataTable-BbKgJ5UI.js")), Tt = g(() => import("./vue-ui-accordion-DNdBR3LQ.js").then((e) => e.n)), Et = g(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Dt = g(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), Ot = g(() => import("./PackageVersion-BZs_wnK5.js").then((e) => e.t)), kt = g(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_waffle: At } = pe(), { isThemeValid: jt, warnInvalidTheme: Mt } = ve(), Nt = Pe(), D = e, Pt = Je(), Ft = d({
|
|
130
|
+
get() {
|
|
131
|
+
return !!D.dataset && D.dataset.length;
|
|
132
|
+
},
|
|
133
|
+
set(e) {
|
|
134
|
+
return e;
|
|
135
|
+
}
|
|
136
|
+
}), O = S(ae()), It = S(!1), Lt = S(""), k = S(null), Rt = S(0), A = S(null), zt = S(null), Bt = S(null), Vt = S(null), Ht = S(null), Ut = S(0), Wt = S(0), Gt = S(0), Kt = S(!1), qt = S(null), Jt = S(null), j = S(null), Yt = S({
|
|
137
|
+
x: 0,
|
|
138
|
+
y: 0
|
|
139
|
+
}), Xt = S("pointer"), Zt = S(!1), M = S(on()), { transitionEnabled: N } = be({
|
|
140
|
+
config: () => M.value.transitions,
|
|
141
|
+
dataset: () => D.dataset
|
|
142
|
+
});
|
|
143
|
+
de({
|
|
144
|
+
config: () => M.value,
|
|
145
|
+
dataset: () => D.dataset,
|
|
146
|
+
component: "VueUiWaffle",
|
|
147
|
+
rules: [
|
|
148
|
+
fe.singleSeries,
|
|
149
|
+
fe.emptyArray,
|
|
150
|
+
{
|
|
151
|
+
test: (e) => e.length > 6,
|
|
152
|
+
message: [
|
|
153
|
+
"👀 The number of series is > 6. Consider:",
|
|
154
|
+
"",
|
|
155
|
+
"▶️ Grouping small values dynamically into a single \"Other\" series.",
|
|
156
|
+
"",
|
|
157
|
+
"▶️ Using filters to let users choose a maximum number of series to display.",
|
|
158
|
+
"",
|
|
159
|
+
"▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
});
|
|
164
|
+
let P = d(() => M.value.userOptions.useCursorPointer), Qt = d(() => i({
|
|
165
|
+
defaultConfig: {
|
|
166
|
+
useCustomCells: !1,
|
|
167
|
+
userOptions: { show: !1 },
|
|
168
|
+
table: { show: !1 },
|
|
169
|
+
style: { chart: {
|
|
170
|
+
backgroundColor: "#99999930",
|
|
171
|
+
layout: {
|
|
172
|
+
labels: { captions: { show: !1 } },
|
|
173
|
+
rect: { stroke: "#999999" }
|
|
174
|
+
},
|
|
175
|
+
legend: {
|
|
176
|
+
backgroundColor: "transparent",
|
|
177
|
+
showValue: !1,
|
|
178
|
+
showPercentage: !1
|
|
179
|
+
}
|
|
180
|
+
} }
|
|
181
|
+
},
|
|
182
|
+
userConfig: M.value.skeletonConfig ?? {}
|
|
183
|
+
})), { loading: $t, FINAL_DATASET: en, manualLoading: tn } = he({
|
|
184
|
+
...qe(D),
|
|
185
|
+
FINAL_CONFIG: M,
|
|
186
|
+
prepareConfig: on,
|
|
187
|
+
callback: () => {
|
|
188
|
+
Promise.resolve().then(async () => {
|
|
189
|
+
H.value = bn();
|
|
190
|
+
});
|
|
191
|
+
},
|
|
192
|
+
skeletonDataset: D.config?.skeletonDataset ?? [
|
|
193
|
+
{
|
|
194
|
+
name: "",
|
|
195
|
+
values: [1],
|
|
196
|
+
color: "#AAAAAA"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: "",
|
|
200
|
+
values: [1],
|
|
201
|
+
color: "#BABABA"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: "",
|
|
205
|
+
values: [1],
|
|
206
|
+
color: "#CACACA"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
skeletonConfig: i({
|
|
210
|
+
defaultConfig: M.value,
|
|
211
|
+
userConfig: Qt.value
|
|
212
|
+
})
|
|
213
|
+
}), { userOptionsVisible: nn, setUserOptionsVisibility: rn, keepUserOptionState: an } = Ae({ config: M.value }), { svgRef: F } = je({ config: M.value.style.chart.title });
|
|
214
|
+
function on() {
|
|
215
|
+
let e = _e({
|
|
216
|
+
userConfig: D.config,
|
|
217
|
+
defaultConfig: At
|
|
218
|
+
}), t = e.theme;
|
|
219
|
+
if (!t) return e;
|
|
220
|
+
if (!jt.value(e)) return Mt(e), e;
|
|
221
|
+
let n = _e({
|
|
222
|
+
userConfig: Fe[t] || D.config,
|
|
223
|
+
defaultConfig: e
|
|
224
|
+
}), r = _e({
|
|
225
|
+
userConfig: D.config,
|
|
226
|
+
defaultConfig: n
|
|
227
|
+
});
|
|
228
|
+
return {
|
|
229
|
+
...r,
|
|
230
|
+
customPalette: r.customPalette.length ? r.customPalette : a[t] || o
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
Ye(() => D.config, (e) => {
|
|
234
|
+
$t.value || (M.value = on()), nn.value = !M.value.userOptions.showOnChartHover, ln(), Ut.value += 1, Wt.value += 1, Gt.value += 1, L.value.showTable = M.value.table.show, L.value.showTooltip = M.value.style.chart.tooltip.show;
|
|
235
|
+
}, { deep: !0 });
|
|
236
|
+
let I = Ge(null), sn = Ge(null), cn = d(() => M.value.debug);
|
|
237
|
+
function ln() {
|
|
238
|
+
if (ne(D.dataset) ? (ce({
|
|
239
|
+
componentName: "VueUiWaffle",
|
|
240
|
+
type: "dataset",
|
|
241
|
+
debug: cn.value
|
|
242
|
+
}), Ft.value = !1, tn.value = !0) : cn.value && D.dataset.forEach((e, t) => {
|
|
243
|
+
ie({
|
|
244
|
+
datasetObject: e,
|
|
245
|
+
requiredAttributes: ["name", "values"]
|
|
246
|
+
}).forEach((e) => {
|
|
247
|
+
ce({
|
|
248
|
+
componentName: "VueUiWaffle",
|
|
249
|
+
type: "datasetSerieAttribute",
|
|
250
|
+
property: e,
|
|
251
|
+
index: t
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
}), ne(D.dataset) || (tn.value = M.value.loading), M.value.responsive) {
|
|
255
|
+
let e = Te(() => {
|
|
256
|
+
let { width: e, height: t } = Ee({
|
|
257
|
+
chart: A.value,
|
|
258
|
+
title: M.value.style.chart.title.text ? zt.value : null,
|
|
259
|
+
legend: M.value.style.chart.legend.show ? Bt.value : null,
|
|
260
|
+
source: Vt.value,
|
|
261
|
+
noTitle: Ht.value
|
|
262
|
+
});
|
|
263
|
+
requestAnimationFrame(() => {
|
|
264
|
+
R.value.width = e, R.value.height = t, z.value.width = e, z.value.height = t;
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
I.value && (sn.value && I.value.unobserve(sn.value), I.value.disconnect()), I.value = new ResizeObserver(e), sn.value = A.value.parentNode, I.value.observe(sn.value);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
Ue(() => {
|
|
271
|
+
Kt.value = !0, ln();
|
|
272
|
+
}), He(() => {
|
|
273
|
+
I.value && (sn.value && I.value.unobserve(sn.value), I.value.disconnect());
|
|
274
|
+
});
|
|
275
|
+
let { isPrinting: un, isImaging: dn, generatePdf: fn, generateImage: pn } = me({
|
|
276
|
+
elementId: `vue-ui-waffle_${O.value}`,
|
|
277
|
+
fileName: M.value.style.chart.title.text || "vue-ui-waffle",
|
|
278
|
+
options: M.value.userOptions.print
|
|
279
|
+
}), mn = d(() => M.value.userOptions.show && !M.value.style.chart.title.text), hn = d(() => le(M.value.customPalette)), L = S({
|
|
280
|
+
showTable: M.value.table.show,
|
|
281
|
+
showTooltip: M.value.style.chart.tooltip.show
|
|
282
|
+
});
|
|
283
|
+
Ye(M, () => {
|
|
284
|
+
L.value = {
|
|
285
|
+
showTable: M.value.table.show,
|
|
286
|
+
showTooltip: M.value.style.chart.tooltip.show
|
|
287
|
+
};
|
|
288
|
+
}, { immediate: !0 });
|
|
289
|
+
let R = S({
|
|
290
|
+
height: 512,
|
|
291
|
+
width: 512
|
|
292
|
+
}), z = S({
|
|
293
|
+
top: 0,
|
|
294
|
+
left: 0,
|
|
295
|
+
height: 512,
|
|
296
|
+
width: 512
|
|
297
|
+
}), B = d(() => (z.value.width - M.value.style.chart.layout.grid.size * M.value.style.chart.layout.grid.spaceBetween) / M.value.style.chart.layout.grid.size), V = d(() => (z.value.height - M.value.style.chart.layout.grid.size * M.value.style.chart.layout.grid.spaceBetween) / M.value.style.chart.layout.grid.size), gn = d(() => Math.max(1e-4, z.value.width / M.value.style.chart.layout.grid.size)), _n = d(() => Math.max(1e-4, z.value.height / M.value.style.chart.layout.grid.size));
|
|
298
|
+
function vn(e) {
|
|
299
|
+
let t = M.value.style.chart.layout.grid.size * M.value.style.chart.layout.grid.size, n = e.reduce((e, t) => e + t, 0), r = e.map((e) => e / n * t), i = r.map(Math.floor), a = r.map((e) => e % 1), o = t - i.reduce((e, t) => e + t, 0);
|
|
300
|
+
for (; o > 0;) {
|
|
301
|
+
let e = a.indexOf(Math.max(...a));
|
|
302
|
+
i[e] += 1, a[e] = 0, --o;
|
|
303
|
+
}
|
|
304
|
+
return i;
|
|
305
|
+
}
|
|
306
|
+
let yn = S(!1);
|
|
307
|
+
function bn() {
|
|
308
|
+
return yn.value = en.value.flatMap((e) => e.values.reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0) === 0, en.value.map((e, t) => ({
|
|
309
|
+
...e,
|
|
310
|
+
color: s(e.color) || hn.value[t] || o[t] || o[t % o.length],
|
|
311
|
+
uid: `serie_${t}`,
|
|
312
|
+
absoluteIndex: t
|
|
313
|
+
}));
|
|
314
|
+
}
|
|
315
|
+
let xn = d(() => bn()), H = S(xn.value);
|
|
316
|
+
Ye(() => D.dataset, (e) => {
|
|
317
|
+
Array.isArray(e) && e.length > 0 && (tn.value = !1);
|
|
318
|
+
}, { immediate: !0 }), Ye(() => D.dataset, (e) => {
|
|
319
|
+
H.value = bn();
|
|
320
|
+
}, { deep: !0 });
|
|
321
|
+
let Sn = d(() => vn(H.value.filter((e, t) => !K.value.includes(e.uid)).map((e, t) => yn.value ? 1 : (e.values || []).reduce((e, t) => e + t, 0)))), Cn = d(() => vn(H.value.map((e, t) => yn.value ? 1 : (e.values || []).reduce((e, t) => e + t)))), U = d(() => (cn.value && en.value.forEach((e, t) => {
|
|
322
|
+
[null, void 0].includes(e.values) && ce({
|
|
323
|
+
componentName: "VueUiWaffle",
|
|
324
|
+
type: "datasetSerieAttribute",
|
|
325
|
+
property: "values (number[])",
|
|
326
|
+
index: t
|
|
327
|
+
});
|
|
328
|
+
}), H.value.filter((e, t) => !K.value.includes(e.uid)).map((e, t) => ({
|
|
329
|
+
absoluteIndex: e.absoluteIndex,
|
|
330
|
+
uid: e.uid,
|
|
331
|
+
name: e.name,
|
|
332
|
+
color: e.color,
|
|
333
|
+
value: (e.values || []).reduce((e, t) => e + t, 0),
|
|
334
|
+
absoluteValues: e.values || [],
|
|
335
|
+
proportion: Sn.value[t]
|
|
336
|
+
})))), wn = d(() => H.value.map((e, t) => ({
|
|
337
|
+
absoluteIndex: e.absoluteIndex,
|
|
338
|
+
uid: e.uid,
|
|
339
|
+
name: e.name,
|
|
340
|
+
color: e.color,
|
|
341
|
+
value: (e.values || []).reduce((e, t) => e + t, 0),
|
|
342
|
+
absoluteValues: e.values || [],
|
|
343
|
+
proportion: Cn.value[t]
|
|
344
|
+
})));
|
|
345
|
+
function Tn() {
|
|
346
|
+
return wn.value.map((e) => ({
|
|
347
|
+
name: e.name,
|
|
348
|
+
color: e.color,
|
|
349
|
+
value: e.value,
|
|
350
|
+
proportion: e.proportion
|
|
351
|
+
}));
|
|
352
|
+
}
|
|
353
|
+
let En = d(() => {
|
|
354
|
+
let e = 0;
|
|
355
|
+
return U.value.map((t, n) => {
|
|
356
|
+
let r = e, i = r + t.proportion, a = [];
|
|
357
|
+
for (let e = Math.floor(r); e < Math.floor(i); e += 1) a.push(e);
|
|
358
|
+
return e = i, {
|
|
359
|
+
...t,
|
|
360
|
+
start: r,
|
|
361
|
+
rects: a
|
|
362
|
+
};
|
|
363
|
+
});
|
|
364
|
+
}), W = d(() => En.value.flatMap((e, t) => e.rects.map((n, r) => ({
|
|
365
|
+
isFirst: r === 0,
|
|
366
|
+
isLongEnough: n.length > 2,
|
|
367
|
+
name: e.name,
|
|
368
|
+
color: e.color,
|
|
369
|
+
value: e.value,
|
|
370
|
+
serieIndex: t,
|
|
371
|
+
absoluteStartIndex: r < 3,
|
|
372
|
+
serieId: e.uid,
|
|
373
|
+
...e
|
|
374
|
+
}))).map((e, t) => ({
|
|
375
|
+
...e,
|
|
376
|
+
isAbsoluteFirst: t % M.value.style.chart.layout.grid.size === 0
|
|
377
|
+
}))), G = d(() => {
|
|
378
|
+
let e = [];
|
|
379
|
+
for (let t = 0; t < M.value.style.chart.layout.grid.size; t += 1) for (let n = 0; n < M.value.style.chart.layout.grid.size; n += 1) e.push({
|
|
380
|
+
isStartOfLine: n === 0,
|
|
381
|
+
position: M.value.style.chart.layout.grid.vertical ? t : n,
|
|
382
|
+
x: (M.value.style.chart.layout.grid.vertical ? t : n) * (B.value + M.value.style.chart.layout.grid.spaceBetween),
|
|
383
|
+
y: (M.value.style.chart.layout.grid.vertical ? n : t) * (V.value + M.value.style.chart.layout.grid.spaceBetween) + z.value.top
|
|
384
|
+
});
|
|
385
|
+
return e;
|
|
386
|
+
}), K = S([]), Dn = S(!1), On = S(Object.create(null)), kn = S(Object.create(null)), q = S(0);
|
|
387
|
+
function J(e, t) {
|
|
388
|
+
H.value = H.value.map((n) => n.uid === e ? {
|
|
389
|
+
...n,
|
|
390
|
+
values: [t]
|
|
391
|
+
} : n);
|
|
392
|
+
}
|
|
393
|
+
function An(e, t) {
|
|
394
|
+
let n = t.find((t) => t.uid === e);
|
|
395
|
+
return n ? (n.values || []).reduce((e, t) => e + t, 0) : 0;
|
|
396
|
+
}
|
|
397
|
+
function jn(e) {
|
|
398
|
+
let t = !1;
|
|
399
|
+
On.value[e] && (cancelAnimationFrame(On.value[e]), delete On.value[e], t = !0), kn.value[e] && (cancelAnimationFrame(kn.value[e]), delete kn.value[e], t = !0), t && (q.value = Math.max(0, q.value - 1), Dn.value = q.value > 0);
|
|
400
|
+
}
|
|
401
|
+
function Mn({ seriesId: e, fromValue: t, toValue: n, mode: r }) {
|
|
402
|
+
jn(e), q.value += 1, Dn.value = !0;
|
|
403
|
+
let i = t;
|
|
404
|
+
return new Promise((a) => {
|
|
405
|
+
function o() {
|
|
406
|
+
if (r === "increase") {
|
|
407
|
+
if (i >= n) {
|
|
408
|
+
J(e, n), --q.value, q.value <= 0 && (Dn.value = !1), delete On.value[e], a();
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
i += n * .025, i > n && (i = n), J(e, i), On.value[e] = requestAnimationFrame(o);
|
|
412
|
+
} else {
|
|
413
|
+
if (i <= t / 100) {
|
|
414
|
+
J(e, 0), --q.value, q.value <= 0 && (Dn.value = !1), delete kn.value[e], a();
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
i /= 1.15, J(e, i), kn.value[e] = requestAnimationFrame(o);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
o();
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
function Nn() {
|
|
424
|
+
H.value = xn.value;
|
|
425
|
+
let e = K.value.length > 0;
|
|
426
|
+
if (!M.value.useAnimation) {
|
|
427
|
+
e ? K.value = [] : K.value = Y.value.map((e) => e.uid);
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
e ? [...K.value].forEach((e) => {
|
|
431
|
+
Pn(e, !0);
|
|
432
|
+
}) : Y.value.map((e) => e.uid).forEach((e) => {
|
|
433
|
+
Pn(e, !0);
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
function Pn(e, t = !1) {
|
|
437
|
+
if (yn.value && !t) return;
|
|
438
|
+
let n = t || K.value.length < Y.value.length - 1 && Y.value.length > 1;
|
|
439
|
+
if (!M.value.useAnimation) {
|
|
440
|
+
K.value.includes(e) ? K.value = K.value.filter((t) => t !== e) : n && K.value.push(e);
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
let r = An(e, xn.value), i = An(e, H.value);
|
|
444
|
+
if (i !== 0 || r !== 0) {
|
|
445
|
+
if (K.value.includes(e)) {
|
|
446
|
+
if (K.value = K.value.filter((t) => t !== e), Nt.value) {
|
|
447
|
+
jn(e), J(e, r), qn("selectLegend", U.value.map((e) => ({
|
|
448
|
+
name: e.name,
|
|
449
|
+
color: e.color,
|
|
450
|
+
value: e.value,
|
|
451
|
+
proportion: e.proportion / M.value.style.chart.layout.grid.size ** 2
|
|
452
|
+
})));
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
Mn({
|
|
456
|
+
seriesId: e,
|
|
457
|
+
fromValue: i,
|
|
458
|
+
toValue: r,
|
|
459
|
+
mode: "increase"
|
|
460
|
+
}).then(() => {
|
|
461
|
+
qn("selectLegend", U.value.map((e) => ({
|
|
462
|
+
name: e.name,
|
|
463
|
+
color: e.color,
|
|
464
|
+
value: e.value,
|
|
465
|
+
proportion: e.proportion / M.value.style.chart.layout.grid.size ** 2
|
|
466
|
+
})));
|
|
467
|
+
});
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
if (n) {
|
|
471
|
+
if (Nt.value) {
|
|
472
|
+
jn(e), K.value.includes(e) || K.value.push(e), J(e, 0), qn("selectLegend", U.value.map((e) => ({
|
|
473
|
+
name: e.name,
|
|
474
|
+
color: e.color,
|
|
475
|
+
value: e.value,
|
|
476
|
+
proportion: e.proportion / M.value.style.chart.layout.grid.size ** 2
|
|
477
|
+
})));
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
Mn({
|
|
481
|
+
seriesId: e,
|
|
482
|
+
fromValue: i,
|
|
483
|
+
toValue: 0,
|
|
484
|
+
mode: "decrease"
|
|
485
|
+
}).then(() => {
|
|
486
|
+
K.value.includes(e) || K.value.push(e), J(e, 0), qn("selectLegend", U.value.map((e) => ({
|
|
487
|
+
name: e.name,
|
|
488
|
+
color: e.color,
|
|
489
|
+
value: e.value,
|
|
490
|
+
proportion: e.proportion / M.value.style.chart.layout.grid.size ** 2
|
|
491
|
+
})));
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
function Fn(e) {
|
|
497
|
+
return wn.value.length ? wn.value.find((t) => t.name === e) || (cn.value && console.warn(`VueUiWaffle - Series name not found "${e}"`), null) : (cn.value && console.warn("VueUiWaffle - There are no series to show."), null);
|
|
498
|
+
}
|
|
499
|
+
function In(e) {
|
|
500
|
+
let t = Fn(e);
|
|
501
|
+
t !== null && K.value.includes(t.uid) && Pn(t.uid);
|
|
502
|
+
}
|
|
503
|
+
function Ln(e) {
|
|
504
|
+
let t = Fn(e);
|
|
505
|
+
t !== null && (K.value.includes(t.uid) || Pn(t.uid));
|
|
506
|
+
}
|
|
507
|
+
function Rn({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
|
|
508
|
+
return Me({
|
|
509
|
+
config: i,
|
|
510
|
+
val: e,
|
|
511
|
+
percentage: t,
|
|
512
|
+
showVal: n,
|
|
513
|
+
showPercentage: r
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
let Y = d(() => H.value.map((e, t) => {
|
|
517
|
+
let n = (e.values || []).reduce((e, t) => e + t, 0), r = n / H.value.map((e) => (e.values || []).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0);
|
|
518
|
+
return {
|
|
519
|
+
name: e.name,
|
|
520
|
+
color: e.color || hn[t] || o[t] || o[t % o.length],
|
|
521
|
+
value: n,
|
|
522
|
+
proportion: r,
|
|
523
|
+
uid: e.uid,
|
|
524
|
+
shape: "square"
|
|
525
|
+
};
|
|
526
|
+
}).map((e, t) => {
|
|
527
|
+
let n = Rn({
|
|
528
|
+
val: te(M.value.style.chart.layout.labels.dataLabels.formatter, e.value, l({
|
|
529
|
+
p: M.value.style.chart.layout.labels.dataLabels.prefix,
|
|
530
|
+
v: e.value,
|
|
531
|
+
s: M.value.style.chart.layout.labels.dataLabels.suffix,
|
|
532
|
+
r: M.value.style.chart.legend.roundingValue
|
|
533
|
+
}), {
|
|
534
|
+
datapoint: e,
|
|
535
|
+
index: t
|
|
536
|
+
}),
|
|
537
|
+
percentage: isNaN(e.value / X.value) ? "-" : l({
|
|
538
|
+
v: e.value / X.value * 100,
|
|
539
|
+
s: "%",
|
|
540
|
+
r: M.value.style.chart.legend.roundingPercentage
|
|
541
|
+
}),
|
|
542
|
+
showVal: M.value.style.chart.legend.showValue,
|
|
543
|
+
showPercentage: M.value.style.chart.legend.showPercentage,
|
|
544
|
+
config: M.value.style.chart.legend
|
|
545
|
+
});
|
|
546
|
+
return {
|
|
547
|
+
...e,
|
|
548
|
+
opacity: K.value.includes(e.uid) ? .5 : 1,
|
|
549
|
+
segregate: () => Pn(e.uid),
|
|
550
|
+
isSegregated: K.value.includes(e.uid),
|
|
551
|
+
display: `${e.name}${M.value.style.chart.legend.showPercentage || M.value.style.chart.legend.showValue ? ": " : ""}${n}`
|
|
552
|
+
};
|
|
553
|
+
})), zn = d(() => ({
|
|
554
|
+
cy: "waffle-div-legend",
|
|
555
|
+
backgroundColor: M.value.style.chart.legend.backgroundColor,
|
|
556
|
+
color: M.value.style.chart.legend.color,
|
|
557
|
+
fontSize: M.value.style.chart.legend.fontSize,
|
|
558
|
+
paddingBottom: 12,
|
|
559
|
+
fontWeight: M.value.style.chart.legend.bold ? "bold" : ""
|
|
560
|
+
})), X = d(() => U.value.map((e) => e.value).reduce((e, t) => e + t, 0)), Bn = S(null), Vn = S(null), Z = d(() => {
|
|
561
|
+
let e = /* @__PURE__ */ new Map();
|
|
562
|
+
return W.value.forEach((t, n) => {
|
|
563
|
+
e.has(t.serieIndex) ? e.get(t.serieIndex).rectIndexes.push(n) : e.set(t.serieIndex, {
|
|
564
|
+
serieIndex: t.serieIndex,
|
|
565
|
+
absoluteIndex: t.absoluteIndex,
|
|
566
|
+
serieId: t.serieId,
|
|
567
|
+
name: t.name,
|
|
568
|
+
color: t.color,
|
|
569
|
+
value: t.value,
|
|
570
|
+
proportion: t.proportion,
|
|
571
|
+
rectIndexes: [n]
|
|
572
|
+
});
|
|
573
|
+
}), Array.from(e.values()).sort((e, t) => e.serieIndex - t.serieIndex);
|
|
574
|
+
});
|
|
575
|
+
function Hn(e) {
|
|
576
|
+
return Z.value.find((t) => t.serieIndex === e) || null;
|
|
577
|
+
}
|
|
578
|
+
function Un(e) {
|
|
579
|
+
let t = Hn(e);
|
|
580
|
+
return !t || !t.rectIndexes.length ? null : t.rectIndexes[0];
|
|
581
|
+
}
|
|
582
|
+
function Wn(e) {
|
|
583
|
+
let t = W.value[e];
|
|
584
|
+
M.value.events.datapointClick && M.value.events.datapointClick({
|
|
585
|
+
datapoint: t,
|
|
586
|
+
seriesIndex: t.serieIndex
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
function Gn(e) {
|
|
590
|
+
let t = W.value[e];
|
|
591
|
+
M.value.events.datapointLeave && M.value.events.datapointLeave({
|
|
592
|
+
datapoint: t,
|
|
593
|
+
seriesIndex: t.serieIndex
|
|
594
|
+
}), Vn.value = null, It.value = !1, k.value = null, j.value = null, Xt.value = "pointer";
|
|
595
|
+
}
|
|
596
|
+
function Kn(e, t = "pointer") {
|
|
597
|
+
if (K.value.length === D.dataset.length) return;
|
|
598
|
+
let n = W.value[e];
|
|
599
|
+
if (!n) return;
|
|
600
|
+
Xt.value = t, j.value = n.serieIndex, Bn.value = {
|
|
601
|
+
datapoint: n,
|
|
602
|
+
seriesIndex: n.absoluteIndex,
|
|
603
|
+
series: H.value,
|
|
604
|
+
config: M.value
|
|
605
|
+
}, M.value.events.datapointEnter && Vn.value !== n.serieIndex && M.value.events.datapointEnter({
|
|
606
|
+
datapoint: n,
|
|
607
|
+
seriesIndex: n.serieIndex
|
|
608
|
+
}), Vn.value = n.serieIndex, It.value = !0, k.value = n.serieIndex;
|
|
609
|
+
let r = M.value.style.chart.tooltip.customFormat;
|
|
610
|
+
if (ue(r) && ee(() => r({
|
|
611
|
+
seriesIndex: n.absoluteIndex,
|
|
612
|
+
datapoint: n,
|
|
613
|
+
series: H.value,
|
|
614
|
+
config: M.value
|
|
615
|
+
}))) Lt.value = r({
|
|
616
|
+
seriesIndex: n.absoluteIndex,
|
|
617
|
+
datapoint: n,
|
|
618
|
+
series: H.value,
|
|
619
|
+
config: M.value
|
|
620
|
+
});
|
|
621
|
+
else {
|
|
622
|
+
let e = "";
|
|
623
|
+
e += `<div style="width:100%;text-align:center;border-bottom:1px solid ${M.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${n.name}</div>`, e += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${n.color}" />${Pt.pattern ? `<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${O.value}_${n.absoluteIndex})"/>` : ""}</svg>`, e += `<b>${Rn({
|
|
624
|
+
config: M.value.style.chart.tooltip,
|
|
625
|
+
showVal: M.value.style.chart.tooltip.showValue,
|
|
626
|
+
showPercentage: M.value.style.chart.tooltip.showPercentage,
|
|
627
|
+
val: `<span>${te(M.value.style.chart.layout.labels.dataLabels.formatter, n.value, l({
|
|
628
|
+
p: M.value.style.chart.layout.labels.dataLabels.prefix,
|
|
629
|
+
v: n.value,
|
|
630
|
+
s: M.value.style.chart.layout.labels.dataLabels.suffix,
|
|
631
|
+
r: M.value.style.chart.tooltip.roundingValue
|
|
632
|
+
}), {
|
|
633
|
+
datapoint: n,
|
|
634
|
+
seriesIndex: n.absoluteIndex,
|
|
635
|
+
series: H.value
|
|
636
|
+
})}</span>`,
|
|
637
|
+
percentage: `<span>${l({
|
|
638
|
+
v: yn.value ? 1 / en.value.length * 100 : n.value / X.value * 100,
|
|
639
|
+
s: "%",
|
|
640
|
+
r: M.value.style.chart.tooltip.roundingPercentage
|
|
641
|
+
})}</span>`
|
|
642
|
+
})}</b></div>`, Lt.value = e;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
let qn = Xe, Q = d(() => ({
|
|
646
|
+
head: U.value.map((e) => ({
|
|
647
|
+
name: e.name,
|
|
648
|
+
color: e.color
|
|
649
|
+
})),
|
|
650
|
+
body: U.value.map((e) => e.value)
|
|
651
|
+
}));
|
|
652
|
+
function $(e) {
|
|
653
|
+
return M.value.useBlurOnHover && ![null, void 0].includes(k.value) && k.value !== e ? `url(#blur_${O.value})` : "";
|
|
654
|
+
}
|
|
655
|
+
function Jn(e) {
|
|
656
|
+
return [null, void 0].includes(k.value) || k.value === e ? { opacity: 1 } : { opacity: M.value.style.chart.layout.rect.selection.unselectedOpacity };
|
|
657
|
+
}
|
|
658
|
+
function Yn(e) {
|
|
659
|
+
return e.length <= 3 ? e : e.filter((t, n) => {
|
|
660
|
+
let r = e[(n - 1 + e.length) % e.length], i = e[(n + 1) % e.length], a = r.x === t.x && t.x === i.x, o = r.y === t.y && t.y === i.y;
|
|
661
|
+
return !a && !o;
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
function Xn(e) {
|
|
665
|
+
if (!e.length) return [];
|
|
666
|
+
let t = new Set(e.map(({ row: e, col: t }) => `${e}:${t}`)), n = [], r = /* @__PURE__ */ new Set(), i = [
|
|
667
|
+
[-1, 0],
|
|
668
|
+
[0, 1],
|
|
669
|
+
[1, 0],
|
|
670
|
+
[0, -1]
|
|
671
|
+
];
|
|
672
|
+
e.forEach((e) => {
|
|
673
|
+
let a = `${e.row}:${e.col}`;
|
|
674
|
+
if (r.has(a)) return;
|
|
675
|
+
let o = [], s = [e];
|
|
676
|
+
for (r.add(a); s.length;) {
|
|
677
|
+
let e = s.shift();
|
|
678
|
+
o.push(e), i.forEach(([n, i]) => {
|
|
679
|
+
let a = e.row + n, o = e.col + i, c = `${a}:${o}`;
|
|
680
|
+
!t.has(c) || r.has(c) || (r.add(c), s.push({
|
|
681
|
+
row: a,
|
|
682
|
+
col: o
|
|
683
|
+
}));
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
n.push(o);
|
|
687
|
+
});
|
|
688
|
+
let a = [];
|
|
689
|
+
return n.forEach((e) => {
|
|
690
|
+
let t = new Set(e.map(({ row: e, col: t }) => `${e}:${t}`)), n = [];
|
|
691
|
+
e.forEach(({ row: e, col: r }) => {
|
|
692
|
+
t.has(`${e - 1}:${r}`) || n.push({
|
|
693
|
+
start: {
|
|
694
|
+
x: r,
|
|
695
|
+
y: e
|
|
696
|
+
},
|
|
697
|
+
end: {
|
|
698
|
+
x: r + 1,
|
|
699
|
+
y: e
|
|
700
|
+
}
|
|
701
|
+
}), t.has(`${e}:${r + 1}`) || n.push({
|
|
702
|
+
start: {
|
|
703
|
+
x: r + 1,
|
|
704
|
+
y: e
|
|
705
|
+
},
|
|
706
|
+
end: {
|
|
707
|
+
x: r + 1,
|
|
708
|
+
y: e + 1
|
|
709
|
+
}
|
|
710
|
+
}), t.has(`${e + 1}:${r}`) || n.push({
|
|
711
|
+
start: {
|
|
712
|
+
x: r + 1,
|
|
713
|
+
y: e + 1
|
|
714
|
+
},
|
|
715
|
+
end: {
|
|
716
|
+
x: r,
|
|
717
|
+
y: e + 1
|
|
718
|
+
}
|
|
719
|
+
}), t.has(`${e}:${r - 1}`) || n.push({
|
|
720
|
+
start: {
|
|
721
|
+
x: r,
|
|
722
|
+
y: e + 1
|
|
723
|
+
},
|
|
724
|
+
end: {
|
|
725
|
+
x: r,
|
|
726
|
+
y: e
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
});
|
|
730
|
+
let r = /* @__PURE__ */ new Map(), i = (e) => `${e.start.x}:${e.start.y}>${e.end.x}:${e.end.y}`, o = (e) => `${e.x}:${e.y}`, s = new Set(n.map(i));
|
|
731
|
+
for (n.forEach((e) => {
|
|
732
|
+
let t = o(e.start);
|
|
733
|
+
r.has(t) || r.set(t, []), r.get(t).push(e);
|
|
734
|
+
}); s.size;) {
|
|
735
|
+
let e = s.values().next().value, t = n.find((t) => i(t) === e), c = t.start, l = [c], ee = t;
|
|
736
|
+
for (; ee;) {
|
|
737
|
+
s.delete(i(ee));
|
|
738
|
+
let e = ee.end;
|
|
739
|
+
if (o(e) === o(c)) break;
|
|
740
|
+
l.push(e), ee = (r.get(o(e)) || []).find((e) => s.has(i(e)));
|
|
741
|
+
}
|
|
742
|
+
l.length >= 4 && a.push(Yn(l));
|
|
743
|
+
}
|
|
744
|
+
}), a;
|
|
745
|
+
}
|
|
746
|
+
function Zn(e) {
|
|
747
|
+
let t = M.value.style.chart.layout.grid.size, n = M.value.style.chart.layout.grid.vertical, r = [];
|
|
748
|
+
return W.value.forEach((i, a) => {
|
|
749
|
+
if (i.serieIndex !== e) return;
|
|
750
|
+
let o = Math.floor(a / t), s = a % t;
|
|
751
|
+
r.push({
|
|
752
|
+
row: n ? s : o,
|
|
753
|
+
col: n ? o : s
|
|
754
|
+
});
|
|
755
|
+
}), r;
|
|
756
|
+
}
|
|
757
|
+
function Qn(e) {
|
|
758
|
+
let t = gn.value, n = _n.value;
|
|
759
|
+
return Xn(Zn(e)).map((e) => e.map(({ x: e, y: r }) => ({
|
|
760
|
+
x: e * t,
|
|
761
|
+
y: z.value.top + r * n
|
|
762
|
+
})));
|
|
763
|
+
}
|
|
764
|
+
function $n(e) {
|
|
765
|
+
return e.map(({ x: e, y: t }) => `${e},${t}`).join(" ");
|
|
766
|
+
}
|
|
767
|
+
function er(e) {
|
|
768
|
+
return e.map((e) => {
|
|
769
|
+
if (!e.length) return "";
|
|
770
|
+
let [t, ...n] = e, r = n.map(({ x: e, y: t }) => `L ${e} ${t}`).join(" ");
|
|
771
|
+
return `M ${t.x} ${t.y} ${r} Z`;
|
|
772
|
+
}).filter(Boolean).join(" ");
|
|
773
|
+
}
|
|
774
|
+
let tr = d(() => !M.value.style.chart.layout.rect.selection?.wrap?.show || [null, void 0].includes(k.value) ? [] : Qn(k.value).map($n)), nr = d(() => {
|
|
775
|
+
if (!M.value.style.chart.layout.rect.merged) return [];
|
|
776
|
+
let e = /* @__PURE__ */ new Map();
|
|
777
|
+
return W.value.forEach((t, n) => {
|
|
778
|
+
e.has(t.serieIndex) || e.set(t.serieIndex, {
|
|
779
|
+
serieIndex: t.serieIndex,
|
|
780
|
+
absoluteIndex: t.absoluteIndex,
|
|
781
|
+
color: t.color,
|
|
782
|
+
gradientIndex: n
|
|
783
|
+
});
|
|
784
|
+
}), Array.from(e.values()).map((e) => ({
|
|
785
|
+
...e,
|
|
786
|
+
d: er(Qn(e.serieIndex))
|
|
787
|
+
})).filter((e) => e.d);
|
|
788
|
+
});
|
|
789
|
+
function rr(e, t) {
|
|
790
|
+
return M.value.style.chart.layout.labels.captions.show ? W.value.length && !Dn.value && !M.value.style.chart.layout.grid.vertical && (W.value[e].isFirst && t.position < M.value.style.chart.layout.grid.size - 2 || W.value[e].isAbsoluteFirst && e % M.value.style.chart.layout.grid.size === 0 && W.value[e].absoluteStartIndex) : !1;
|
|
791
|
+
}
|
|
792
|
+
function ir(e, t = null) {
|
|
793
|
+
let n = te(M.value.style.chart.layout.labels.dataLabels.formatter, W.value[e].value, l({
|
|
794
|
+
p: M.value.style.chart.layout.labels.dataLabels.prefix,
|
|
795
|
+
v: W.value[e].value,
|
|
796
|
+
s: M.value.style.chart.layout.labels.dataLabels.suffix,
|
|
797
|
+
r: M.value.style.chart.layout.labels.captions.roundingValue
|
|
798
|
+
}), {
|
|
799
|
+
datapoint: W.value[e],
|
|
800
|
+
position: t
|
|
801
|
+
}), r = l({
|
|
802
|
+
v: W.value[e].proportion,
|
|
803
|
+
s: "%",
|
|
804
|
+
r: M.value.style.chart.layout.labels.captions.roundingPercentage
|
|
805
|
+
}), i = (M.value.style.chart.layout.labels.captions.serieNameAbbreviation ? re({
|
|
806
|
+
source: W.value[e].name,
|
|
807
|
+
length: M.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize
|
|
808
|
+
}) : W.value[e].name) + (M.value.style.chart.layout.labels.captions.showPercentage || M.value.style.chart.layout.labels.captions.showValue ? ":" : "");
|
|
809
|
+
return `${M.value.style.chart.layout.labels.captions.showSerieName ? i : ""} ${Rn({
|
|
810
|
+
val: n,
|
|
811
|
+
percentage: r,
|
|
812
|
+
showVal: M.value.style.chart.layout.labels.captions.showValue,
|
|
813
|
+
showPercentage: M.value.style.chart.layout.labels.captions.showPercentage,
|
|
814
|
+
config: M.value.style.chart.layout.labels.dataLabels
|
|
815
|
+
})}`;
|
|
816
|
+
}
|
|
817
|
+
function ar(e = null) {
|
|
818
|
+
Ve(() => {
|
|
819
|
+
let n = Q.value.head.map((e, t) => [
|
|
820
|
+
[e.name],
|
|
821
|
+
[Q.value.body[t]],
|
|
822
|
+
[isNaN(Q.value.body[t] / X.value) ? "-" : Q.value.body[t] / X.value * 100]
|
|
823
|
+
]), i = [
|
|
824
|
+
[M.value.style.chart.title.text],
|
|
825
|
+
[M.value.style.chart.title.subtitle.text],
|
|
826
|
+
[
|
|
827
|
+
[""],
|
|
828
|
+
["val"],
|
|
829
|
+
["%"]
|
|
830
|
+
]
|
|
831
|
+
].concat(n), a = r(i);
|
|
832
|
+
e ? e(a) : t({
|
|
833
|
+
csvContent: a,
|
|
834
|
+
title: M.value.style.chart.title.text || "vue-ui-waffle"
|
|
835
|
+
});
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
let or = d(() => ({
|
|
839
|
+
head: [
|
|
840
|
+
" <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>",
|
|
841
|
+
te(M.value.style.chart.layout.labels.dataLabels.formatter, X.value, l({
|
|
842
|
+
p: M.value.style.chart.layout.labels.dataLabels.prefix,
|
|
843
|
+
v: X.value,
|
|
844
|
+
s: M.value.style.chart.layout.labels.dataLabels.suffix,
|
|
845
|
+
r: M.value.table.td.roundingValue
|
|
846
|
+
})),
|
|
847
|
+
"100%"
|
|
848
|
+
],
|
|
849
|
+
body: Q.value.head.map((e, t) => [
|
|
850
|
+
{
|
|
851
|
+
color: e.color,
|
|
852
|
+
name: e.name
|
|
853
|
+
},
|
|
854
|
+
te(M.value.style.chart.layout.labels.dataLabels.formatter, Q.value.body[t], l({
|
|
855
|
+
p: M.value.style.chart.layout.labels.dataLabels.prefix,
|
|
856
|
+
v: Q.value.body[t],
|
|
857
|
+
s: M.value.style.chart.layout.labels.dataLabels.suffix,
|
|
858
|
+
r: M.value.table.td.roundingValue
|
|
859
|
+
})),
|
|
860
|
+
isNaN(Q.value.body[t] / X.value) ? "-" : l({
|
|
861
|
+
v: Q.value.body[t] / X.value * 100,
|
|
862
|
+
s: "%",
|
|
863
|
+
r: M.value.table.td.roundingPercentage
|
|
864
|
+
})
|
|
865
|
+
]),
|
|
866
|
+
config: {
|
|
867
|
+
th: {
|
|
868
|
+
backgroundColor: M.value.table.th.backgroundColor,
|
|
869
|
+
color: M.value.table.th.color,
|
|
870
|
+
outline: M.value.table.th.outline
|
|
871
|
+
},
|
|
872
|
+
td: {
|
|
873
|
+
backgroundColor: M.value.table.td.backgroundColor,
|
|
874
|
+
color: M.value.table.td.color,
|
|
875
|
+
outline: M.value.table.td.outline
|
|
876
|
+
},
|
|
877
|
+
shape: "square",
|
|
878
|
+
breakpoint: M.value.table.responsiveBreakpoint
|
|
879
|
+
},
|
|
880
|
+
colNames: [
|
|
881
|
+
M.value.table.columnNames.series,
|
|
882
|
+
M.value.table.columnNames.value,
|
|
883
|
+
M.value.table.columnNames.percentage
|
|
884
|
+
]
|
|
885
|
+
})), sr = S(!1);
|
|
886
|
+
function cr(e) {
|
|
887
|
+
sr.value = e, Rt.value += 1;
|
|
888
|
+
}
|
|
889
|
+
function lr() {
|
|
890
|
+
L.value.showTable = !L.value.showTable;
|
|
891
|
+
}
|
|
892
|
+
function ur() {
|
|
893
|
+
L.value.showTooltip = !L.value.showTooltip;
|
|
894
|
+
}
|
|
895
|
+
let dr = S(!1);
|
|
896
|
+
function fr() {
|
|
897
|
+
dr.value = !dr.value;
|
|
898
|
+
}
|
|
899
|
+
async function pr({ scale: e = 2 } = {}) {
|
|
900
|
+
if (!A.value) return;
|
|
901
|
+
let { width: t, height: n } = A.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await xe({
|
|
902
|
+
domElement: A.value,
|
|
903
|
+
base64: !0,
|
|
904
|
+
img: !0,
|
|
905
|
+
scale: e
|
|
906
|
+
});
|
|
907
|
+
return {
|
|
908
|
+
imageUri: i,
|
|
909
|
+
base64: a,
|
|
910
|
+
title: M.value.style.chart.title.text,
|
|
911
|
+
width: t,
|
|
912
|
+
height: n,
|
|
913
|
+
aspectRatio: r
|
|
914
|
+
};
|
|
915
|
+
}
|
|
916
|
+
let mr = d(() => {
|
|
917
|
+
let e = M.value.table.useDialog && !M.value.table.show, t = L.value.showTable;
|
|
918
|
+
return {
|
|
919
|
+
component: e ? kt : Tt,
|
|
920
|
+
title: `${M.value.style.chart.title.text}${M.value.style.chart.title.subtitle.text ? `: ${M.value.style.chart.title.subtitle.text}` : ""}`,
|
|
921
|
+
props: e ? {
|
|
922
|
+
backgroundColor: M.value.table.th.backgroundColor,
|
|
923
|
+
color: M.value.table.th.color,
|
|
924
|
+
headerColor: M.value.table.th.color,
|
|
925
|
+
headerBg: M.value.table.th.backgroundColor,
|
|
926
|
+
isFullscreen: sr.value,
|
|
927
|
+
fullscreenParent: A.value,
|
|
928
|
+
forcedWidth: Math.min(500, window.innerWidth * .8),
|
|
929
|
+
isCursorPointer: P.value
|
|
930
|
+
} : {
|
|
931
|
+
hideDetails: !0,
|
|
932
|
+
config: {
|
|
933
|
+
open: t,
|
|
934
|
+
maxHeight: 1e4,
|
|
935
|
+
body: {
|
|
936
|
+
backgroundColor: M.value.style.chart.backgroundColor,
|
|
937
|
+
color: M.value.style.chart.color
|
|
938
|
+
},
|
|
939
|
+
head: {
|
|
940
|
+
backgroundColor: M.value.style.chart.backgroundColor,
|
|
941
|
+
color: M.value.style.chart.color
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
};
|
|
946
|
+
});
|
|
947
|
+
Ye(() => L.value.showTable, (e) => {
|
|
948
|
+
M.value.table.show || (e && M.value.table.useDialog && qt.value ? qt.value.open() : "close" in qt.value && qt.value.close());
|
|
949
|
+
});
|
|
950
|
+
function hr() {
|
|
951
|
+
L.value.showTable = !1, Jt.value && Jt.value.setTableIconState(!1);
|
|
952
|
+
}
|
|
953
|
+
let gr = d(() => Y.value.map((e) => ({
|
|
954
|
+
...e,
|
|
955
|
+
name: e.display
|
|
956
|
+
}))), _r = d(() => M.value.style.chart.backgroundColor), vr = d(() => M.value.style.chart.legend), yr = d(() => M.value.style.chart.title), { isCallbackImaging: br, isCallbackSvg: xr, generateSvg: Sr, onGenerateImage: Cr } = ye({
|
|
957
|
+
svg: F,
|
|
958
|
+
title: yr,
|
|
959
|
+
legend: vr,
|
|
960
|
+
legendItems: gr,
|
|
961
|
+
backgroundColor: _r,
|
|
962
|
+
getSvgCallback: () => M.value.userOptions.callbacks.svg,
|
|
963
|
+
generateImage: pn
|
|
964
|
+
});
|
|
965
|
+
async function wr() {
|
|
966
|
+
if (qn("copyAlt", {
|
|
967
|
+
config: M.value,
|
|
968
|
+
dataset: wn.value
|
|
969
|
+
}), !M.value.userOptions.callbacks.altCopy) {
|
|
970
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
971
|
+
return;
|
|
972
|
+
}
|
|
973
|
+
await Promise.resolve(M.value.userOptions.callbacks.altCopy({
|
|
974
|
+
config: M.value,
|
|
975
|
+
dataset: wn.value
|
|
976
|
+
}));
|
|
977
|
+
}
|
|
978
|
+
function Tr() {
|
|
979
|
+
j.value = null, Zt.value = !0;
|
|
980
|
+
}
|
|
981
|
+
function Er() {
|
|
982
|
+
j.value = null, Xt.value = "pointer", It.value = !1, k.value = null, Vn.value = null, Zt.value = !1;
|
|
983
|
+
}
|
|
984
|
+
function Dr(e) {
|
|
985
|
+
if (!F.value || dr.value || document.activeElement !== F.value || !Z.value.length || K.value.length === D.dataset.length) return;
|
|
986
|
+
let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
987
|
+
if (!t && !n && !r && !i) return;
|
|
988
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
989
|
+
j.value = null, Xt.value = "pointer", It.value = !1, k.value = null, Vn.value = null;
|
|
990
|
+
return;
|
|
991
|
+
}
|
|
992
|
+
if (r) {
|
|
993
|
+
if (j.value === null) return;
|
|
994
|
+
let e = Un(j.value);
|
|
995
|
+
if (e === null) return;
|
|
996
|
+
Wn(e);
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
999
|
+
let a = Z.value.findIndex((e) => e.serieIndex === j.value), o = null;
|
|
1000
|
+
if (o = a === -1 ? n ? Z.value[0] : Z.value[Z.value.length - 1] : n ? Z.value[(a + 1) % Z.value.length] : Z.value[(a - 1 + Z.value.length) % Z.value.length], !o) return;
|
|
1001
|
+
let s = Un(o.serieIndex);
|
|
1002
|
+
s !== null && (Or(o.serieIndex), Kn(s, "keyboard"));
|
|
1003
|
+
}
|
|
1004
|
+
function Or(e) {
|
|
1005
|
+
if (!Number.isFinite(e) || !F.value) return;
|
|
1006
|
+
let t = Hn(e);
|
|
1007
|
+
if (!t || !t.rectIndexes.length) return;
|
|
1008
|
+
let n = t.rectIndexes.map((e) => {
|
|
1009
|
+
let t = G.value[e];
|
|
1010
|
+
return t ? {
|
|
1011
|
+
x: t.x + M.value.style.chart.layout.grid.spaceBetween / 2 + gn.value / 2,
|
|
1012
|
+
y: t.y + M.value.style.chart.layout.grid.spaceBetween / 2 + _n.value / 2
|
|
1013
|
+
} : null;
|
|
1014
|
+
}).filter(Boolean);
|
|
1015
|
+
if (!n.length) return;
|
|
1016
|
+
let r = Math.min(...n.map((e) => e.x)), i = Math.max(...n.map((e) => e.x)), a = Math.min(...n.map((e) => e.y)), o = Math.max(...n.map((e) => e.y)), s = (r + i) / 2, c = (a + o) / 2, l = F.value.getBoundingClientRect();
|
|
1017
|
+
Yt.value = {
|
|
1018
|
+
x: l.left + s / R.value.width * l.width,
|
|
1019
|
+
y: l.top + c / R.value.height * l.height
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
let kr = d(() => ({
|
|
1023
|
+
headers: or.value?.colNames ?? [],
|
|
1024
|
+
rows: or.value?.body ?? []
|
|
1025
|
+
}));
|
|
1026
|
+
return we({
|
|
1027
|
+
getData: Tn,
|
|
1028
|
+
getImage: pr,
|
|
1029
|
+
generatePdf: fn,
|
|
1030
|
+
generateCsv: ar,
|
|
1031
|
+
generateImage: pn,
|
|
1032
|
+
generateSvg: Sr,
|
|
1033
|
+
hideSeries: Ln,
|
|
1034
|
+
showSeries: In,
|
|
1035
|
+
toggleTable: lr,
|
|
1036
|
+
toggleTooltip: ur,
|
|
1037
|
+
toggleAnnotator: fr,
|
|
1038
|
+
toggleFullscreen: cr,
|
|
1039
|
+
copyAlt: wr
|
|
1040
|
+
}), (e, t) => (x(), m("div", {
|
|
1041
|
+
class: v(`vue-data-ui-component vue-ui-waffle ${sr.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
1042
|
+
ref_key: "waffleChart",
|
|
1043
|
+
ref: A,
|
|
1044
|
+
id: `vue-ui-waffle_${O.value}`,
|
|
1045
|
+
style: b(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${M.value.style.chart.backgroundColor};${M.value.responsive ? "height: 100%" : ""}`),
|
|
1046
|
+
onMouseenter: t[2] ||= () => T(rn)(!0),
|
|
1047
|
+
onMouseleave: t[3] ||= () => T(rn)(!1)
|
|
1048
|
+
}, [
|
|
1049
|
+
h("div", {
|
|
1050
|
+
id: `chart-instructions-${O.value}`,
|
|
1051
|
+
class: "sr-only"
|
|
1052
|
+
}, [h("p", null, Ke(M.value.a11y.translations.keyboardNavigation), 1)], 8, Qe),
|
|
1053
|
+
kr.value?.rows?.length ? (x(), f(ke, {
|
|
1054
|
+
key: 0,
|
|
1055
|
+
uid: O.value,
|
|
1056
|
+
head: kr.value.headers,
|
|
1057
|
+
body: kr.value.rows,
|
|
1058
|
+
notice: M.value.a11y.translations.tableAvailable,
|
|
1059
|
+
caption: M.value.a11y.translations.tableCaption
|
|
1060
|
+
}, null, 8, [
|
|
1061
|
+
"uid",
|
|
1062
|
+
"head",
|
|
1063
|
+
"body",
|
|
1064
|
+
"notice",
|
|
1065
|
+
"caption"
|
|
1066
|
+
])) : p("", !0),
|
|
1067
|
+
M.value.userOptions.buttons.annotator ? (x(), f(T(Dt), {
|
|
1068
|
+
key: 1,
|
|
1069
|
+
svgRef: T(F),
|
|
1070
|
+
backgroundColor: M.value.style.chart.backgroundColor,
|
|
1071
|
+
color: M.value.style.chart.color,
|
|
1072
|
+
active: dr.value,
|
|
1073
|
+
isCursorPointer: P.value,
|
|
1074
|
+
onClose: fr
|
|
1075
|
+
}, {
|
|
1076
|
+
"annotator-action-close": E(() => [w(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1077
|
+
"annotator-action-color": E(({ color: t }) => [w(e.$slots, "annotator-action-color", y(_({ color: t })), void 0, !0)]),
|
|
1078
|
+
"annotator-action-draw": E(({ mode: t }) => [w(e.$slots, "annotator-action-draw", y(_({ mode: t })), void 0, !0)]),
|
|
1079
|
+
"annotator-action-undo": E(({ disabled: t }) => [w(e.$slots, "annotator-action-undo", y(_({ disabled: t })), void 0, !0)]),
|
|
1080
|
+
"annotator-action-redo": E(({ disabled: t }) => [w(e.$slots, "annotator-action-redo", y(_({ disabled: t })), void 0, !0)]),
|
|
1081
|
+
"annotator-action-delete": E(({ disabled: t }) => [w(e.$slots, "annotator-action-delete", y(_({ disabled: t })), void 0, !0)]),
|
|
1082
|
+
_: 3
|
|
1083
|
+
}, 8, [
|
|
1084
|
+
"svgRef",
|
|
1085
|
+
"backgroundColor",
|
|
1086
|
+
"color",
|
|
1087
|
+
"active",
|
|
1088
|
+
"isCursorPointer"
|
|
1089
|
+
])) : p("", !0),
|
|
1090
|
+
mn.value ? (x(), m("div", {
|
|
1091
|
+
key: 2,
|
|
1092
|
+
ref_key: "noTitle",
|
|
1093
|
+
ref: Ht,
|
|
1094
|
+
class: "vue-data-ui-no-title-space",
|
|
1095
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1096
|
+
}, null, 512)) : p("", !0),
|
|
1097
|
+
M.value.style.chart.title.text ? (x(), m("div", {
|
|
1098
|
+
key: 3,
|
|
1099
|
+
ref_key: "chartTitle",
|
|
1100
|
+
ref: zt,
|
|
1101
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
1102
|
+
}, [(x(), f(Se, {
|
|
1103
|
+
key: `title_${Ut.value}`,
|
|
1104
|
+
config: {
|
|
1105
|
+
title: {
|
|
1106
|
+
cy: "waffle-title",
|
|
1107
|
+
...M.value.style.chart.title
|
|
1108
|
+
},
|
|
1109
|
+
subtitle: {
|
|
1110
|
+
cy: "waffle-subtitle",
|
|
1111
|
+
...M.value.style.chart.title.subtitle
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
}, null, 8, ["config"]))], 512)) : p("", !0),
|
|
1115
|
+
h("div", { id: `legend-top-${O.value}` }, null, 8, $e),
|
|
1116
|
+
M.value.userOptions.show && Ft.value && (T(an) || T(nn)) ? (x(), f(T(Et), {
|
|
1117
|
+
ref_key: "userOptionsRef",
|
|
1118
|
+
ref: Jt,
|
|
1119
|
+
key: `user_options_${Rt.value}`,
|
|
1120
|
+
backgroundColor: M.value.style.chart.backgroundColor,
|
|
1121
|
+
color: M.value.style.chart.color,
|
|
1122
|
+
isPrinting: T(un),
|
|
1123
|
+
isImaging: T(dn),
|
|
1124
|
+
uid: O.value,
|
|
1125
|
+
hasTooltip: M.value.userOptions.buttons.tooltip && M.value.style.chart.tooltip.show,
|
|
1126
|
+
hasPdf: M.value.userOptions.buttons.pdf,
|
|
1127
|
+
hasImg: M.value.userOptions.buttons.img,
|
|
1128
|
+
hasSvg: M.value.userOptions.buttons.svg,
|
|
1129
|
+
hasXls: M.value.userOptions.buttons.csv,
|
|
1130
|
+
hasTable: M.value.userOptions.buttons.table,
|
|
1131
|
+
hasFullscreen: M.value.userOptions.buttons.fullscreen,
|
|
1132
|
+
hasAltCopy: M.value.userOptions.buttons.altCopy,
|
|
1133
|
+
isFullscreen: sr.value,
|
|
1134
|
+
isTooltip: L.value.showTooltip,
|
|
1135
|
+
titles: { ...M.value.userOptions.buttonTitles },
|
|
1136
|
+
chartElement: A.value,
|
|
1137
|
+
position: M.value.userOptions.position,
|
|
1138
|
+
hasAnnotator: M.value.userOptions.buttons.annotator,
|
|
1139
|
+
isAnnotation: dr.value,
|
|
1140
|
+
callbacks: M.value.userOptions.callbacks,
|
|
1141
|
+
printScale: M.value.userOptions.print.scale,
|
|
1142
|
+
tableDialog: M.value.table.useDialog,
|
|
1143
|
+
isCursorPointer: P.value,
|
|
1144
|
+
onToggleFullscreen: cr,
|
|
1145
|
+
onGeneratePdf: T(fn),
|
|
1146
|
+
onGenerateCsv: ar,
|
|
1147
|
+
onGenerateImage: T(Cr),
|
|
1148
|
+
onGenerateSvg: T(Sr),
|
|
1149
|
+
onToggleTable: lr,
|
|
1150
|
+
onToggleTooltip: ur,
|
|
1151
|
+
onToggleAnnotator: fr,
|
|
1152
|
+
onCopyAlt: wr,
|
|
1153
|
+
style: b({ visibility: T(an) ? T(nn) ? "visible" : "hidden" : "visible" })
|
|
1154
|
+
}, Le({ _: 2 }, [
|
|
1155
|
+
e.$slots.menuIcon ? {
|
|
1156
|
+
name: "menuIcon",
|
|
1157
|
+
fn: E(({ isOpen: t, color: n }) => [w(e.$slots, "menuIcon", y(_({
|
|
1158
|
+
isOpen: t,
|
|
1159
|
+
color: n
|
|
1160
|
+
})), void 0, !0)]),
|
|
1161
|
+
key: "0"
|
|
1162
|
+
} : void 0,
|
|
1163
|
+
e.$slots.optionTooltip ? {
|
|
1164
|
+
name: "optionTooltip",
|
|
1165
|
+
fn: E(() => [w(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1166
|
+
key: "1"
|
|
1167
|
+
} : void 0,
|
|
1168
|
+
e.$slots.optionPdf ? {
|
|
1169
|
+
name: "optionPdf",
|
|
1170
|
+
fn: E(() => [w(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1171
|
+
key: "2"
|
|
1172
|
+
} : void 0,
|
|
1173
|
+
e.$slots.optionCsv ? {
|
|
1174
|
+
name: "optionCsv",
|
|
1175
|
+
fn: E(() => [w(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1176
|
+
key: "3"
|
|
1177
|
+
} : void 0,
|
|
1178
|
+
e.$slots.optionImg ? {
|
|
1179
|
+
name: "optionImg",
|
|
1180
|
+
fn: E(() => [w(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1181
|
+
key: "4"
|
|
1182
|
+
} : void 0,
|
|
1183
|
+
e.$slots.optionSvg ? {
|
|
1184
|
+
name: "optionSvg",
|
|
1185
|
+
fn: E(() => [w(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1186
|
+
key: "5"
|
|
1187
|
+
} : void 0,
|
|
1188
|
+
e.$slots.optionTable ? {
|
|
1189
|
+
name: "optionTable",
|
|
1190
|
+
fn: E(() => [w(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1191
|
+
key: "6"
|
|
1192
|
+
} : void 0,
|
|
1193
|
+
e.$slots.optionFullscreen ? {
|
|
1194
|
+
name: "optionFullscreen",
|
|
1195
|
+
fn: E(({ toggleFullscreen: t, isFullscreen: n }) => [w(e.$slots, "optionFullscreen", y(_({
|
|
1196
|
+
toggleFullscreen: t,
|
|
1197
|
+
isFullscreen: n
|
|
1198
|
+
})), void 0, !0)]),
|
|
1199
|
+
key: "7"
|
|
1200
|
+
} : void 0,
|
|
1201
|
+
e.$slots.optionAnnotator ? {
|
|
1202
|
+
name: "optionAnnotator",
|
|
1203
|
+
fn: E(({ toggleAnnotator: t, isAnnotator: n }) => [w(e.$slots, "optionAnnotator", y(_({
|
|
1204
|
+
toggleAnnotator: t,
|
|
1205
|
+
isAnnotator: n
|
|
1206
|
+
})), void 0, !0)]),
|
|
1207
|
+
key: "8"
|
|
1208
|
+
} : void 0,
|
|
1209
|
+
e.$slots.optionAltCopy ? {
|
|
1210
|
+
name: "optionAltCopy",
|
|
1211
|
+
fn: E(({ altCopy: t }) => [w(e.$slots, "optionAltCopy", y(_({ altCopy: t })), void 0, !0)]),
|
|
1212
|
+
key: "9"
|
|
1213
|
+
} : void 0,
|
|
1214
|
+
e.$slots["custom-menu-before"] ? {
|
|
1215
|
+
name: "custom-menu-before",
|
|
1216
|
+
fn: E(() => [w(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1217
|
+
key: "10"
|
|
1218
|
+
} : void 0,
|
|
1219
|
+
e.$slots["custom-menu-after"] ? {
|
|
1220
|
+
name: "custom-menu-after",
|
|
1221
|
+
fn: E(() => [w(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1222
|
+
key: "11"
|
|
1223
|
+
} : void 0
|
|
1224
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : p("", !0),
|
|
1225
|
+
h("div", et, [(x(), m("svg", {
|
|
1226
|
+
ref_key: "svgRef",
|
|
1227
|
+
ref: F,
|
|
1228
|
+
xmlns: T(se),
|
|
1229
|
+
"aria-describedby": `chart-instructions-${O.value}`,
|
|
1230
|
+
class: v({
|
|
1231
|
+
"vue-data-ui-fullscreen--on": sr.value,
|
|
1232
|
+
"vue-data-ui-fulscreen--off": !sr.value,
|
|
1233
|
+
"vue-data-ui-no-transition": !T(N)
|
|
1234
|
+
}),
|
|
1235
|
+
tabindex: "0",
|
|
1236
|
+
viewBox: `0 0 ${R.value.width <= 0 ? 10 : R.value.width} ${R.value.height <= 0 ? 10 : R.value.height}`,
|
|
1237
|
+
style: b(`max-width:100%;overflow:visible;background:transparent;color:${M.value.style.chart.color}`),
|
|
1238
|
+
onFocus: Tr,
|
|
1239
|
+
onBlur: Er,
|
|
1240
|
+
onKeydown: Dr
|
|
1241
|
+
}, [
|
|
1242
|
+
ze(T(Ot)),
|
|
1243
|
+
h("defs", null, [(x(!0), m(u, null, C(W.value, (e, t) => (x(), f(De, {
|
|
1244
|
+
t: "radial",
|
|
1245
|
+
cx: "50%",
|
|
1246
|
+
cy: "50%",
|
|
1247
|
+
r: "50%",
|
|
1248
|
+
fx: "50%",
|
|
1249
|
+
fy: "50%",
|
|
1250
|
+
id: `gradient_${O.value}_${t}`,
|
|
1251
|
+
key: `gradient_${O.value}_${t}`,
|
|
1252
|
+
stops: [[
|
|
1253
|
+
"0%",
|
|
1254
|
+
T(n)(T(c)(e.color, .05), 100 - M.value.style.chart.layout.rect.gradientIntensity),
|
|
1255
|
+
1
|
|
1256
|
+
], [
|
|
1257
|
+
"100%",
|
|
1258
|
+
e.color,
|
|
1259
|
+
1
|
|
1260
|
+
]]
|
|
1261
|
+
}, null, 8, ["id", "stops"]))), 128))]),
|
|
1262
|
+
h("defs", null, [h("filter", {
|
|
1263
|
+
id: `blur_${O.value}`,
|
|
1264
|
+
x: "-50%",
|
|
1265
|
+
y: "-50%",
|
|
1266
|
+
width: "200%",
|
|
1267
|
+
height: "200%"
|
|
1268
|
+
}, [...t[4] ||= [h("feGaussianBlur", {
|
|
1269
|
+
in: "SourceGraphic",
|
|
1270
|
+
stdDeviation: 2
|
|
1271
|
+
}, null, -1), h("feColorMatrix", {
|
|
1272
|
+
type: "saturate",
|
|
1273
|
+
values: "0"
|
|
1274
|
+
}, null, -1)]], 8, nt)]),
|
|
1275
|
+
M.value.useCustomCells && W.value.length && e.$slots.cell ? (x(!0), m(u, { key: 0 }, C(G.value, (t, n) => (x(), m("foreignObject", {
|
|
1276
|
+
x: t.x,
|
|
1277
|
+
y: t.y,
|
|
1278
|
+
height: V.value <= 0 ? 1e-4 : V.value,
|
|
1279
|
+
width: B.value <= 0 ? 1e-4 : B.value,
|
|
1280
|
+
class: "vue-ui-waffle-custom-cell-foreignObject"
|
|
1281
|
+
}, [w(e.$slots, "cell", Be({ ref_for: !0 }, {
|
|
1282
|
+
cell: {
|
|
1283
|
+
...t,
|
|
1284
|
+
color: W.value[n].color,
|
|
1285
|
+
height: Math.max(0, V.value),
|
|
1286
|
+
width: Math.max(0, B.value),
|
|
1287
|
+
...W.value[n]
|
|
1288
|
+
},
|
|
1289
|
+
isSelected: [null, void 0].includes(k.value) ? !0 : W.value[n].serieIndex === k.value
|
|
1290
|
+
}), void 0, !0)], 8, rt))), 256)) : p("", !0),
|
|
1291
|
+
!W.value.length && !M.value.useCustomCells ? (x(), m("rect", {
|
|
1292
|
+
key: 1,
|
|
1293
|
+
x: 12,
|
|
1294
|
+
y: 12,
|
|
1295
|
+
height: z.value.height - 24,
|
|
1296
|
+
width: z.value.width - 24,
|
|
1297
|
+
rx: 3,
|
|
1298
|
+
fill: "none",
|
|
1299
|
+
stroke: "black"
|
|
1300
|
+
}, null, 8, it)) : W.value.length && !M.value.useCustomCells ? (x(), m(u, { key: 2 }, [e.$slots.pattern ? (x(), m("g", at, [(x(!0), m(u, null, C(xn.value, (t) => (x(), m("defs", null, [w(e.$slots, "pattern", Be({ ref_for: !0 }, {
|
|
1301
|
+
seriesIndex: t.absoluteIndex,
|
|
1302
|
+
patternId: `pattern_${O.value}_${t.absoluteIndex}`
|
|
1303
|
+
}), void 0, !0)]))), 256))])) : p("", !0), M.value.style.chart.layout.rect.merged ? (x(), m(u, { key: 1 }, [
|
|
1304
|
+
(x(!0), m(u, null, C(nr.value, (e) => (x(), m("path", {
|
|
1305
|
+
key: `merged-underlayer-${e.serieIndex}`,
|
|
1306
|
+
d: e.d,
|
|
1307
|
+
fill: "white",
|
|
1308
|
+
"fill-rule": "evenodd",
|
|
1309
|
+
stroke: M.value.style.chart.layout.rect.stroke,
|
|
1310
|
+
"stroke-width": M.value.style.chart.layout.rect.strokeWidth,
|
|
1311
|
+
"stroke-linejoin": "round",
|
|
1312
|
+
filter: $(e.serieIndex),
|
|
1313
|
+
style: b(Jn(e.serieIndex)),
|
|
1314
|
+
class: v({ "vue-data-ui-transition": T(N) })
|
|
1315
|
+
}, null, 14, ot))), 128)),
|
|
1316
|
+
(x(!0), m(u, null, C(nr.value, (e) => (x(), m("path", {
|
|
1317
|
+
key: `merged-serie-${e.serieIndex}`,
|
|
1318
|
+
d: e.d,
|
|
1319
|
+
fill: M.value.style.chart.layout.rect.useGradient && M.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${O.value}_${e.gradientIndex})` : e.color,
|
|
1320
|
+
"fill-rule": "evenodd",
|
|
1321
|
+
stroke: M.value.style.chart.layout.rect.stroke,
|
|
1322
|
+
"stroke-width": M.value.style.chart.layout.rect.strokeWidth,
|
|
1323
|
+
"stroke-linejoin": "round",
|
|
1324
|
+
filter: $(e.serieIndex),
|
|
1325
|
+
style: b(Jn(e.serieIndex)),
|
|
1326
|
+
class: v({ "vue-data-ui-transition": T(N) })
|
|
1327
|
+
}, null, 14, st))), 128)),
|
|
1328
|
+
e.$slots.pattern ? (x(), m("g", ct, [(x(!0), m(u, null, C(nr.value, (e) => (x(), m("path", {
|
|
1329
|
+
key: `merged-pattern-${e.serieIndex}`,
|
|
1330
|
+
d: e.d,
|
|
1331
|
+
fill: `url(#pattern_${O.value}_${e.absoluteIndex})`,
|
|
1332
|
+
"fill-rule": "evenodd",
|
|
1333
|
+
stroke: "none",
|
|
1334
|
+
filter: $(e.serieIndex),
|
|
1335
|
+
style: b(Jn(e.serieIndex)),
|
|
1336
|
+
class: v({ "vue-data-ui-transition": T(N) })
|
|
1337
|
+
}, null, 14, lt))), 128))])) : p("", !0)
|
|
1338
|
+
], 64)) : (x(), m(u, { key: 2 }, [
|
|
1339
|
+
(x(!0), m(u, null, C(G.value, (e, t) => (x(), m("rect", {
|
|
1340
|
+
rx: M.value.style.chart.layout.rect.rounded ? M.value.style.chart.layout.rect.rounding : 0,
|
|
1341
|
+
x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1342
|
+
y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1343
|
+
height: V.value <= 0 ? 1e-4 : V.value,
|
|
1344
|
+
width: B.value <= 0 ? 1e-4 : B.value,
|
|
1345
|
+
fill: "white",
|
|
1346
|
+
stroke: M.value.style.chart.layout.rect.stroke,
|
|
1347
|
+
"stroke-width": M.value.style.chart.layout.rect.strokeWidth,
|
|
1348
|
+
filter: $(W.value[t].serieIndex),
|
|
1349
|
+
style: b(Jn(W.value[t].serieIndex)),
|
|
1350
|
+
class: v({ "vue-data-ui-transition": T(N) })
|
|
1351
|
+
}, null, 14, ut))), 256)),
|
|
1352
|
+
(x(!0), m(u, null, C(G.value, (e, t) => (x(), m("rect", {
|
|
1353
|
+
rx: M.value.style.chart.layout.rect.rounded ? M.value.style.chart.layout.rect.rounding : 0,
|
|
1354
|
+
x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1355
|
+
y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1356
|
+
height: V.value <= 0 ? 1e-4 : V.value,
|
|
1357
|
+
width: B.value <= 0 ? 1e-4 : B.value,
|
|
1358
|
+
fill: M.value.style.chart.layout.rect.useGradient && M.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${O.value}_${t})` : W.value[t].color,
|
|
1359
|
+
stroke: M.value.style.chart.layout.rect.stroke,
|
|
1360
|
+
"stroke-width": M.value.style.chart.layout.rect.strokeWidth,
|
|
1361
|
+
filter: $(W.value[t].serieIndex),
|
|
1362
|
+
style: b(Jn(W.value[t].serieIndex)),
|
|
1363
|
+
class: v({ "vue-data-ui-transition": T(N) })
|
|
1364
|
+
}, null, 14, dt))), 256)),
|
|
1365
|
+
e.$slots.pattern ? (x(), m("g", ft, [(x(!0), m(u, null, C(G.value, (e, t) => (x(), m("rect", {
|
|
1366
|
+
rx: M.value.style.chart.layout.rect.rounded ? M.value.style.chart.layout.rect.rounding : 0,
|
|
1367
|
+
x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1368
|
+
y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1369
|
+
height: V.value <= 0 ? 1e-4 : V.value,
|
|
1370
|
+
width: B.value <= 0 ? 1e-4 : B.value,
|
|
1371
|
+
fill: `url(#pattern_${O.value}_${W.value[t].absoluteIndex})`,
|
|
1372
|
+
stroke: "none",
|
|
1373
|
+
filter: $(W.value[t].serieIndex),
|
|
1374
|
+
style: b(Jn(W.value[t].serieIndex)),
|
|
1375
|
+
class: v({ "vue-data-ui-transition": T(N) })
|
|
1376
|
+
}, null, 14, pt))), 256))])) : p("", !0)
|
|
1377
|
+
], 64))], 64)) : p("", !0),
|
|
1378
|
+
e.$slots.cellSvg ? (x(!0), m(u, { key: 3 }, C(G.value, (t, n) => (x(), m("g", null, [w(e.$slots, "cellSvg", Be({ ref_for: !0 }, {
|
|
1379
|
+
cell: {
|
|
1380
|
+
...t,
|
|
1381
|
+
color: W.value[n].color,
|
|
1382
|
+
height: Math.max(0, V.value),
|
|
1383
|
+
width: Math.max(0, B.value),
|
|
1384
|
+
...W.value[n]
|
|
1385
|
+
},
|
|
1386
|
+
isSelected: [null, void 0].includes(k.value) ? !0 : W.value[n].serieIndex === k.value
|
|
1387
|
+
}), void 0, !0)]))), 256)) : p("", !0),
|
|
1388
|
+
(x(!0), m(u, null, C(tr.value, (e, t) => (x(), m("polygon", {
|
|
1389
|
+
key: `selected-series-wrap-${t}`,
|
|
1390
|
+
points: e,
|
|
1391
|
+
fill: "none",
|
|
1392
|
+
stroke: M.value.style.chart.layout.rect.selection.wrap.stroke,
|
|
1393
|
+
"stroke-width": M.value.style.chart.layout.rect.selection.wrap.strokeWidth,
|
|
1394
|
+
"stroke-linejoin": M.value.style.chart.layout.rect.selection.wrap.strokeLinejoin,
|
|
1395
|
+
"pointer-events": "none"
|
|
1396
|
+
}, null, 8, mt))), 128)),
|
|
1397
|
+
(x(!0), m(u, null, C(G.value, (e, t) => (x(), m(u, null, [rr(t, e) ? (x(), m("text", {
|
|
1398
|
+
key: `datalabel_${t}`,
|
|
1399
|
+
textContent: Ke(ir(t, e)),
|
|
1400
|
+
x: e.x + M.value.style.chart.layout.labels.captions.offsetX + M.value.style.chart.layout.grid.spaceBetween / 2 + 6,
|
|
1401
|
+
y: e.y + M.value.style.chart.layout.labels.captions.offsetY + M.value.style.chart.layout.grid.spaceBetween / 2 + _n.value / 2 + M.value.style.chart.layout.labels.captions.fontSize / 3,
|
|
1402
|
+
"font-size": M.value.style.chart.layout.labels.captions.fontSize,
|
|
1403
|
+
fill: T(oe)(W.value[t].color),
|
|
1404
|
+
filter: $(W.value[t].serieIndex),
|
|
1405
|
+
class: v({ "vue-data-ui-transition": T(N) })
|
|
1406
|
+
}, null, 10, ht)) : p("", !0)], 64))), 256)),
|
|
1407
|
+
(x(!0), m(u, null, C(G.value, (e, t) => (x(), m("rect", {
|
|
1408
|
+
x: e.x + M.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1409
|
+
y: e.y + M.value.style.chart.layout.grid.spaceBetween / 2,
|
|
1410
|
+
height: _n.value,
|
|
1411
|
+
width: gn.value,
|
|
1412
|
+
fill: "transparent",
|
|
1413
|
+
stroke: "none",
|
|
1414
|
+
onMouseover: (e) => Kn(t),
|
|
1415
|
+
onMouseleave: (e) => Gn(t),
|
|
1416
|
+
onClick: (e) => Wn(t)
|
|
1417
|
+
}, null, 40, gt))), 256)),
|
|
1418
|
+
w(e.$slots, "svg", { svg: {
|
|
1419
|
+
...R.value,
|
|
1420
|
+
isPrintingImg: T(un) || T(dn) || T(br),
|
|
1421
|
+
isPrintingSvg: T(xr)
|
|
1422
|
+
} }, void 0, !0)
|
|
1423
|
+
], 46, tt)), e.$slots.hint ? (x(), m("div", _t, [w(e.$slots, "hint", y(_({
|
|
1424
|
+
hint: M.value.a11y.translations.keyboardNavigation,
|
|
1425
|
+
isVisible: Zt.value
|
|
1426
|
+
})), void 0, !0)])) : p("", !0)]),
|
|
1427
|
+
e.$slots.watermark ? (x(), m("div", vt, [w(e.$slots, "watermark", y(_({ isPrinting: T(un) || T(dn) || T(br) || T(xr) })), void 0, !0)])) : p("", !0),
|
|
1428
|
+
h("div", { id: `legend-bottom-${O.value}` }, null, 8, yt),
|
|
1429
|
+
Kt.value && (M.value.style.chart.legend.show || e.$slots.legend) ? (x(), f(Ie, {
|
|
1430
|
+
key: 6,
|
|
1431
|
+
to: M.value.style.chart.legend.position === "top" ? `#legend-top-${O.value}` : `#legend-bottom-${O.value}`
|
|
1432
|
+
}, [h("div", {
|
|
1433
|
+
ref_key: "chartLegend",
|
|
1434
|
+
ref: Bt
|
|
1435
|
+
}, [w(e.$slots, "legend", { legend: Y.value }, () => [M.value.style.chart.legend.show ? (x(), f(Ne, {
|
|
1436
|
+
key: `legend_${Gt.value}`,
|
|
1437
|
+
legendSet: Y.value,
|
|
1438
|
+
config: zn.value,
|
|
1439
|
+
isCursorPointer: P.value,
|
|
1440
|
+
onClickMarker: t[0] ||= ({ legend: e }) => Pn(e.uid)
|
|
1441
|
+
}, Le({
|
|
1442
|
+
item: E(({ legend: e }) => [h("div", {
|
|
1443
|
+
onClick: (t) => e.segregate(),
|
|
1444
|
+
style: b(`opacity:${K.value.includes(e.uid) ? .5 : 1}`)
|
|
1445
|
+
}, Ke(e.display), 13, bt)]),
|
|
1446
|
+
legendToggle: E(() => [Y.value.length > 2 && M.value.style.chart.legend.selectAllToggle.show && !T($t) ? (x(), f(Oe, {
|
|
1447
|
+
key: 0,
|
|
1448
|
+
backgroundColor: M.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1449
|
+
color: M.value.style.chart.legend.selectAllToggle.color,
|
|
1450
|
+
fontSize: M.value.style.chart.legend.fontSize,
|
|
1451
|
+
checked: K.value.length > 0,
|
|
1452
|
+
isCursorPointer: P.value,
|
|
1453
|
+
onToggle: Nn
|
|
1454
|
+
}, null, 8, [
|
|
1455
|
+
"backgroundColor",
|
|
1456
|
+
"color",
|
|
1457
|
+
"fontSize",
|
|
1458
|
+
"checked",
|
|
1459
|
+
"isCursorPointer"
|
|
1460
|
+
])) : p("", !0)]),
|
|
1461
|
+
_: 2
|
|
1462
|
+
}, [e.$slots.pattern ? {
|
|
1463
|
+
name: "legend-pattern",
|
|
1464
|
+
fn: E(({ legend: e, index: t }) => [ze(Ce, {
|
|
1465
|
+
shape: e.shape,
|
|
1466
|
+
radius: 30,
|
|
1467
|
+
stroke: "none",
|
|
1468
|
+
plot: {
|
|
1469
|
+
x: 30,
|
|
1470
|
+
y: 30
|
|
1471
|
+
},
|
|
1472
|
+
fill: `url(#pattern_${O.value}_${t})`
|
|
1473
|
+
}, null, 8, ["shape", "fill"])]),
|
|
1474
|
+
key: "0"
|
|
1475
|
+
} : void 0]), 1032, [
|
|
1476
|
+
"legendSet",
|
|
1477
|
+
"config",
|
|
1478
|
+
"isCursorPointer"
|
|
1479
|
+
])) : p("", !0)], !0)], 512)], 8, ["to"])) : p("", !0),
|
|
1480
|
+
e.$slots.source ? (x(), m("div", {
|
|
1481
|
+
key: 7,
|
|
1482
|
+
ref_key: "source",
|
|
1483
|
+
ref: Vt,
|
|
1484
|
+
dir: "auto"
|
|
1485
|
+
}, [w(e.$slots, "source", {}, void 0, !0)], 512)) : p("", !0),
|
|
1486
|
+
ze(T(St), {
|
|
1487
|
+
teleportTo: M.value.style.chart.tooltip.teleportTo,
|
|
1488
|
+
show: L.value.showTooltip && It.value && K.value.length < D.dataset.length,
|
|
1489
|
+
backgroundColor: M.value.style.chart.tooltip.backgroundColor,
|
|
1490
|
+
color: M.value.style.chart.tooltip.color,
|
|
1491
|
+
borderRadius: M.value.style.chart.tooltip.borderRadius,
|
|
1492
|
+
borderColor: M.value.style.chart.tooltip.borderColor,
|
|
1493
|
+
borderWidth: M.value.style.chart.tooltip.borderWidth,
|
|
1494
|
+
backgroundOpacity: M.value.style.chart.tooltip.backgroundOpacity,
|
|
1495
|
+
position: M.value.style.chart.tooltip.position,
|
|
1496
|
+
offsetX: M.value.style.chart.tooltip.offsetX,
|
|
1497
|
+
offsetY: M.value.style.chart.tooltip.offsetY,
|
|
1498
|
+
parent: A.value,
|
|
1499
|
+
content: Lt.value,
|
|
1500
|
+
isCustom: M.value.style.chart.tooltip.customFormat && typeof M.value.style.chart.tooltip.customFormat == "function",
|
|
1501
|
+
fontSize: M.value.style.chart.tooltip.fontSize,
|
|
1502
|
+
isFullscreen: sr.value,
|
|
1503
|
+
smooth: M.value.style.chart.tooltip.smooth,
|
|
1504
|
+
backdropFilter: M.value.style.chart.tooltip.backdropFilter,
|
|
1505
|
+
smoothForce: M.value.style.chart.tooltip.smoothForce,
|
|
1506
|
+
smoothSnapThreshold: M.value.style.chart.tooltip.smoothSnapThreshold,
|
|
1507
|
+
isA11yMode: Xt.value === "keyboard",
|
|
1508
|
+
a11yPosition: Yt.value
|
|
1509
|
+
}, {
|
|
1510
|
+
"tooltip-before": E(() => [w(e.$slots, "tooltip-before", y(_({ ...Bn.value })), void 0, !0)]),
|
|
1511
|
+
tooltip: E(() => [w(e.$slots, "tooltip", y(_({ ...Bn.value })), void 0, !0)]),
|
|
1512
|
+
"tooltip-after": E(() => [w(e.$slots, "tooltip-after", y(_({ ...Bn.value })), void 0, !0)]),
|
|
1513
|
+
_: 3
|
|
1514
|
+
}, 8, [
|
|
1515
|
+
"teleportTo",
|
|
1516
|
+
"show",
|
|
1517
|
+
"backgroundColor",
|
|
1518
|
+
"color",
|
|
1519
|
+
"borderRadius",
|
|
1520
|
+
"borderColor",
|
|
1521
|
+
"borderWidth",
|
|
1522
|
+
"backgroundOpacity",
|
|
1523
|
+
"position",
|
|
1524
|
+
"offsetX",
|
|
1525
|
+
"offsetY",
|
|
1526
|
+
"parent",
|
|
1527
|
+
"content",
|
|
1528
|
+
"isCustom",
|
|
1529
|
+
"fontSize",
|
|
1530
|
+
"isFullscreen",
|
|
1531
|
+
"smooth",
|
|
1532
|
+
"backdropFilter",
|
|
1533
|
+
"smoothForce",
|
|
1534
|
+
"smoothSnapThreshold",
|
|
1535
|
+
"isA11yMode",
|
|
1536
|
+
"a11yPosition"
|
|
1537
|
+
]),
|
|
1538
|
+
Ft.value && M.value.userOptions.buttons.table ? (x(), f(We(mr.value.component), Be({ key: 8 }, mr.value.props, {
|
|
1539
|
+
ref_key: "tableUnit",
|
|
1540
|
+
ref: qt,
|
|
1541
|
+
onClose: hr
|
|
1542
|
+
}), Le({
|
|
1543
|
+
content: E(() => [(x(), f(T(wt), {
|
|
1544
|
+
key: `table_${Wt.value}`,
|
|
1545
|
+
colNames: or.value.colNames,
|
|
1546
|
+
head: or.value.head,
|
|
1547
|
+
body: or.value.body,
|
|
1548
|
+
config: or.value.config,
|
|
1549
|
+
title: M.value.table.useDialog ? "" : mr.value.title,
|
|
1550
|
+
withCloseButton: !M.value.table.useDialog,
|
|
1551
|
+
isCursorPointer: P.value,
|
|
1552
|
+
onClose: hr
|
|
1553
|
+
}, {
|
|
1554
|
+
th: E(({ th: e }) => [h("div", {
|
|
1555
|
+
innerHTML: e,
|
|
1556
|
+
style: {
|
|
1557
|
+
display: "flex",
|
|
1558
|
+
"align-items": "center"
|
|
1559
|
+
}
|
|
1560
|
+
}, null, 8, xt)]),
|
|
1561
|
+
td: E(({ td: e }) => [Re(Ke(e.name || e), 1)]),
|
|
1562
|
+
_: 1
|
|
1563
|
+
}, 8, [
|
|
1564
|
+
"colNames",
|
|
1565
|
+
"head",
|
|
1566
|
+
"body",
|
|
1567
|
+
"config",
|
|
1568
|
+
"title",
|
|
1569
|
+
"withCloseButton",
|
|
1570
|
+
"isCursorPointer"
|
|
1571
|
+
]))]),
|
|
1572
|
+
_: 2
|
|
1573
|
+
}, [M.value.table.useDialog ? {
|
|
1574
|
+
name: "title",
|
|
1575
|
+
fn: E(() => [Re(Ke(mr.value.title), 1)]),
|
|
1576
|
+
key: "0"
|
|
1577
|
+
} : void 0, M.value.table.useDialog ? {
|
|
1578
|
+
name: "actions",
|
|
1579
|
+
fn: E(() => [h("button", {
|
|
1580
|
+
tabindex: "0",
|
|
1581
|
+
class: "vue-ui-user-options-button",
|
|
1582
|
+
onClick: t[1] ||= (e) => ar(M.value.userOptions.callbacks.csv),
|
|
1583
|
+
style: b({ cursor: P.value ? "pointer" : "default" })
|
|
1584
|
+
}, [ze(T(Ct), {
|
|
1585
|
+
name: "fileCsv",
|
|
1586
|
+
stroke: mr.value.props.color
|
|
1587
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1588
|
+
key: "1"
|
|
1589
|
+
} : void 0]), 1040)) : p("", !0),
|
|
1590
|
+
w(e.$slots, "skeleton", {}, () => [T($t) ? (x(), f(ge, { key: 0 })) : p("", !0)], !0)
|
|
1591
|
+
], 46, Ze));
|
|
1592
|
+
}
|
|
1593
|
+
}, [["__scopeId", "data-v-996b1733"]]);
|
|
1594
|
+
//#endregion
|
|
1595
|
+
export { Xe as n, St as t };
|