vue-data-ui 3.4.8 → 3.5.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 +88 -37
- package/dist/{PackageVersion-D-auaEEJ.js → PackageVersion-Cyx_s25h.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-bullet.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-dashboard.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-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.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-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-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-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-strip-plot.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/style.css +1 -1
- package/dist/{vue-data-ui-CzqHcPqG.js → vue-data-ui-DxgRqCAo.js} +104 -98
- package/dist/vue-data-ui.js +54 -54
- package/dist/{vue-ui-3d-bar-CwXiD8zD.js → vue-ui-3d-bar-DmNJp8SY.js} +1 -1
- package/dist/{vue-ui-age-pyramid-DlEPlWmV.js → vue-ui-age-pyramid-CPAP3sNY.js} +1 -1
- package/dist/{vue-ui-bullet-DtzpeIu4.js → vue-ui-bullet-Ce6uvCQJ.js} +1 -1
- package/dist/{vue-ui-candlestick-DzoiyaeB.js → vue-ui-candlestick-DewevWV_.js} +1 -1
- package/dist/{vue-ui-carousel-table-BqRERrjs.js → vue-ui-carousel-table-Dv1CDfE5.js} +1 -1
- package/dist/{vue-ui-chestnut-CzBGckif.js → vue-ui-chestnut-D9sdFZ4E.js} +1 -1
- package/dist/{vue-ui-chord-B4waG93A.js → vue-ui-chord-BG4dxKNA.js} +1 -1
- package/dist/{vue-ui-circle-pack-DiTw_p5r.js → vue-ui-circle-pack-Be74QB_0.js} +1 -1
- package/dist/{vue-ui-dashboard-Bt-MUKqy.js → vue-ui-dashboard-C4BLwHey.js} +54 -54
- package/dist/{vue-ui-donut-Bc492JeS.js → vue-ui-donut-BRGFcgxS.js} +542 -526
- package/dist/{vue-ui-donut-evolution-D6TaZK2x.js → vue-ui-donut-evolution-DJ0C-7jH.js} +364 -348
- package/dist/{vue-ui-dumbbell-BlZr68Sq.js → vue-ui-dumbbell-iQJ0BUhm.js} +1 -1
- package/dist/{vue-ui-flow-ByEP18dA.js → vue-ui-flow-CTYFoib3.js} +1 -1
- package/dist/{vue-ui-funnel-BU7d_U6T.js → vue-ui-funnel-CG55Xcdy.js} +1 -1
- package/dist/{vue-ui-galaxy-CpVrxaTr.js → vue-ui-galaxy-BQrxjKZJ.js} +221 -205
- package/dist/{vue-ui-gauge-B9Z4EXoj.js → vue-ui-gauge-Tc-0NI0Y.js} +1 -1
- package/dist/{vue-ui-gizmo-T1paJEJ3.js → vue-ui-gizmo-P8h-gnLd.js} +1 -1
- package/dist/{vue-ui-heatmap-Uw83eEMz.js → vue-ui-heatmap-BZimPzsL.js} +1 -1
- package/dist/{vue-ui-history-plot-C93VwVCY.js → vue-ui-history-plot-BVzbuqYY.js} +383 -367
- package/dist/{vue-ui-molecule-CFMWwXFN.js → vue-ui-molecule-BALqwB8c.js} +1 -1
- package/dist/{vue-ui-mood-radar-FkVaaOVG.js → vue-ui-mood-radar-QJ5nlZby.js} +1 -1
- package/dist/{vue-ui-nested-donuts-Cyi98NXq.js → vue-ui-nested-donuts-CmUabkkQ.js} +404 -384
- package/dist/{vue-ui-onion-BCENNhsY.js → vue-ui-onion-DAOCf3f8.js} +331 -309
- package/dist/{vue-ui-parallel-coordinate-plot-Dca9wkD0.js → vue-ui-parallel-coordinate-plot-D8jTuFjq.js} +378 -361
- package/dist/{vue-ui-quadrant-CEtFEZT3.js → vue-ui-quadrant-CO52mSRY.js} +428 -411
- package/dist/{vue-ui-quick-chart-bqcp6BIl.js → vue-ui-quick-chart-DEaVSldE.js} +1 -1
- package/dist/{vue-ui-radar-lgRCmyNP.js → vue-ui-radar-C5V4hhbW.js} +393 -374
- package/dist/{vue-ui-relation-circle-cRRrbaIT.js → vue-ui-relation-circle-CbMM0Jka.js} +1 -1
- package/dist/{vue-ui-ridgeline-CaeFJq9a.js → vue-ui-ridgeline-CXCIRDq6.js} +454 -438
- package/dist/{vue-ui-rings-DbsYfGjx.js → vue-ui-rings-BpUcyqo7.js} +285 -263
- package/dist/{vue-ui-scatter-DcMnoNrY.js → vue-ui-scatter--Dxe-hfO.js} +629 -613
- package/dist/{vue-ui-skeleton-b5fdgyHv.js → vue-ui-skeleton-BWq-VDzg.js} +1 -1
- package/dist/{vue-ui-spark-trend-DrQ26BzL.js → vue-ui-spark-trend-T4J_YOa_.js} +1 -1
- package/dist/{vue-ui-sparkbar-BlvXLcfO.js → vue-ui-sparkbar-DnKP55Vu.js} +1 -1
- package/dist/{vue-ui-sparkgauge-CQmNePxu.js → vue-ui-sparkgauge-BDQLP-zi.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-CJatqy8x.js → vue-ui-sparkhistogram-Dm7QXrA-.js} +1 -1
- package/dist/{vue-ui-sparkline-5m7hFiMq.js → vue-ui-sparkline-tXGDLHRy.js} +1 -1
- package/dist/vue-ui-sparkstackbar-M53Nt07M.js +441 -0
- package/dist/{vue-ui-stackbar-WrexTg8_.js → vue-ui-stackbar-CkBOjryQ.js} +438 -421
- package/dist/{vue-ui-strip-plot-DqX7yya9.js → vue-ui-strip-plot-BX9i3wMn.js} +1 -1
- package/dist/{vue-ui-table-BhrP9BCp.js → vue-ui-table-7r02N9R9.js} +2 -2
- package/dist/{vue-ui-table-sparkline-BECa8n5_.js → vue-ui-table-sparkline-DZaAh10E.js} +1 -1
- package/dist/{vue-ui-thermometer-BxBGrsSR.js → vue-ui-thermometer-CFPt3MOv.js} +1 -1
- package/dist/{vue-ui-timer-BbHY5Ed5.js → vue-ui-timer-Ds-MJoW2.js} +1 -1
- package/dist/{vue-ui-tiremarks-DzL3Sc1f.js → vue-ui-tiremarks-2eIQ6vxu.js} +1 -1
- package/dist/{vue-ui-treemap-DoHoS5NK.js → vue-ui-treemap-BEvl8hiw.js} +500 -484
- package/dist/{vue-ui-vertical-bar-D0N5btU-.js → vue-ui-vertical-bar-D8dtM8sw.js} +350 -334
- package/dist/{vue-ui-waffle-CTt7dxCY.js → vue-ui-waffle-B3q-2SCR.js} +302 -286
- package/dist/{vue-ui-wheel--TIPvQ9I.js → vue-ui-wheel-BpirIgAG.js} +1 -1
- package/dist/{vue-ui-word-cloud-D5pZq4Jq.js → vue-ui-word-cloud-ChT7uLbN.js} +1 -1
- package/dist/{vue-ui-world-BERHgePa.js → vue-ui-world-CdP4g_3_.js} +1 -1
- package/dist/{vue-ui-xy-BI5stV8f.js → vue-ui-xy-B68qQ-gX.js} +1089 -1073
- package/dist/{vue-ui-xy-canvas-DXnLFwW3.js → vue-ui-xy-canvas-DDngEA1s.js} +338 -322
- package/package.json +1 -1
- package/dist/vue-ui-sparkstackbar-Z5g6L2Hj.js +0 -424
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineAsyncComponent as F, useSlots as
|
|
2
|
-
import { c as
|
|
3
|
-
import { t as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import
|
|
11
|
-
import { _ as
|
|
12
|
-
import
|
|
13
|
-
import { t as
|
|
14
|
-
import
|
|
15
|
-
import { _ as
|
|
16
|
-
const
|
|
1
|
+
import { defineAsyncComponent as F, useSlots as Rt, computed as c, ref as i, toRefs as Ut, watch as J, shallowRef as et, onMounted as Et, onBeforeUnmount as Wt, createElementBlock as v, openBlock as n, unref as h, normalizeStyle as ae, normalizeClass as tt, createBlock as B, createCommentVNode as m, createElementVNode as k, createVNode as oe, createSlots as Ce, withCtx as g, renderSlot as y, normalizeProps as W, guardReactiveProps as G, Fragment as $, renderList as D, mergeProps as xe, toDisplayString as ue, Teleport as Gt, resolveDynamicComponent as Ht, createTextVNode as lt, nextTick as jt } from "vue";
|
|
2
|
+
import { c as qt, t as Xt, b as Yt, p as M, o as at, f as $e, g as Jt, e as Qt, a as Q, d as P, X as Kt, s as Zt, i as el, J as tl, h as ll, P as al, Q as ol, I as ul, G as sl, H as nl } from "./lib-C_mNZmhD.js";
|
|
3
|
+
import { t as rl, u as il } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as vl, a as ot } from "./useNestedProp-BjZe1Y85.js";
|
|
5
|
+
import { u as cl, B as dl } from "./BaseScanner-BgWxam9d.js";
|
|
6
|
+
import { u as hl } from "./usePrinter-DTzqpYKF.js";
|
|
7
|
+
import { u as pl } from "./useSvgExport-DrjCWun4.js";
|
|
8
|
+
import { u as fl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
9
|
+
import { u as gl } from "./useChartAccessibility-9icAAmYg.js";
|
|
10
|
+
import yl from "./img-BecE5qXd.js";
|
|
11
|
+
import { _ as bl } from "./Shape-CNXKB8O0.js";
|
|
12
|
+
import ml from "./Title-l36lOBMx.js";
|
|
13
|
+
import { t as wl } from "./themes-AUNCOb2G.js";
|
|
14
|
+
import kl from "./Legend-G6GMcdAc.js";
|
|
15
|
+
import { _ as Cl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
+
const xl = ["id"], $l = ["id"], Tl = ["xmlns", "viewBox"], Il = ["id"], Sl = ["stop-color"], _l = ["stop-color"], Al = ["id"], Ol = ["x", "y", "height", "width"], Pl = ["height", "width"], Ll = { key: 0 }, Fl = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], Bl = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], Dl = { key: 1 }, Vl = ["rx", "x", "y", "height", "width", "fill", "filter"], Nl = ["textContent", "x", "y", "font-size", "fill", "filter"], zl = ["x", "y", "height", "width", "onMouseover", "onMouseleave", "onClick"], Ml = {
|
|
17
17
|
key: 4,
|
|
18
18
|
class: "vue-data-ui-watermark"
|
|
19
|
-
},
|
|
19
|
+
}, Rl = ["id"], Ul = ["onClick"], El = ["innerHTML"], Wl = {
|
|
20
20
|
__name: "vue-ui-waffle",
|
|
21
21
|
props: {
|
|
22
22
|
config: {
|
|
@@ -33,14 +33,14 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
emits: ["selectLegend"],
|
|
36
|
-
setup(
|
|
37
|
-
const
|
|
38
|
-
...
|
|
36
|
+
setup(ut, { expose: st, emit: nt }) {
|
|
37
|
+
const rt = F(() => import("./Tooltip-oWCO1HKy.js")), it = F(() => import("./BaseIcon-BmMbm4d0.js")), vt = F(() => import("./DataTable-BT7VF2ua.js")), ct = F(() => import("./vue-ui-accordion-CZ0thhxa.js")), dt = F(() => import("./UserOptions-CGnQt6Fd.js")), ht = F(() => import("./PenAndPaper-DSvu9dwa.js")), pt = F(() => import("./PackageVersion-Cyx_s25h.js")), ft = F(() => import("./BaseDraggableDialog-ymf2sfB8.js")), { vue_ui_waffle: gt } = vl(), w = ut, yt = Rt(), se = c(() => !!w.dataset && w.dataset.length), b = i(qt()), ne = i(!1), re = i(""), R = i(null), Te = i(0), T = i(null), Ie = i(null), Se = i(null), _e = i(null), Ae = i(null), Oe = i(0), Pe = i(0), Le = i(0), Fe = i(!1), H = i(null), ie = i(null), e = i(he()), { loading: Be, FINAL_DATASET: K, manualLoading: ve } = cl({
|
|
38
|
+
...Ut(w),
|
|
39
39
|
FINAL_CONFIG: e,
|
|
40
|
-
prepareConfig:
|
|
40
|
+
prepareConfig: he,
|
|
41
41
|
callback: () => {
|
|
42
42
|
Promise.resolve().then(async () => {
|
|
43
|
-
p.value =
|
|
43
|
+
p.value = pe();
|
|
44
44
|
});
|
|
45
45
|
},
|
|
46
46
|
skeletonDataset: [
|
|
@@ -60,7 +60,7 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
60
60
|
color: "#CACACA"
|
|
61
61
|
}
|
|
62
62
|
],
|
|
63
|
-
skeletonConfig:
|
|
63
|
+
skeletonConfig: Xt({
|
|
64
64
|
defaultConfig: e.value,
|
|
65
65
|
userConfig: {
|
|
66
66
|
useCustomCells: !1,
|
|
@@ -86,68 +86,68 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
})
|
|
89
|
-
}), { userOptionsVisible:
|
|
90
|
-
function
|
|
91
|
-
const t =
|
|
89
|
+
}), { userOptionsVisible: ce, setUserOptionsVisibility: De, keepUserOptionState: Ve } = fl({ config: e.value }), { svgRef: de } = gl({ config: e.value.style.chart.title });
|
|
90
|
+
function he() {
|
|
91
|
+
const t = ot({
|
|
92
92
|
userConfig: w.config,
|
|
93
|
-
defaultConfig:
|
|
93
|
+
defaultConfig: gt
|
|
94
94
|
});
|
|
95
95
|
return t.theme ? {
|
|
96
|
-
...
|
|
97
|
-
userConfig:
|
|
96
|
+
...ot({
|
|
97
|
+
userConfig: wl.vue_ui_waffle[t.theme] || w.config,
|
|
98
98
|
defaultConfig: t
|
|
99
99
|
}),
|
|
100
|
-
customPalette:
|
|
100
|
+
customPalette: Yt[t.theme] || M
|
|
101
101
|
} : t;
|
|
102
102
|
}
|
|
103
103
|
J(() => w.config, (t) => {
|
|
104
|
-
|
|
104
|
+
Be.value || (e.value = he()), ce.value = !e.value.userOptions.showOnChartHover, ze(), Oe.value += 1, Pe.value += 1, Le.value += 1, C.value.showTable = e.value.table.show, C.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
105
105
|
}, { deep: !0 });
|
|
106
|
-
const L =
|
|
107
|
-
function
|
|
108
|
-
if (
|
|
106
|
+
const L = et(null), U = et(null), Ne = c(() => !!e.value.debug);
|
|
107
|
+
function ze() {
|
|
108
|
+
if (at(w.dataset) ? ($e({
|
|
109
109
|
componentName: "VueUiWaffle",
|
|
110
110
|
type: "dataset",
|
|
111
|
-
debug:
|
|
112
|
-
}),
|
|
113
|
-
|
|
111
|
+
debug: Ne.value
|
|
112
|
+
}), se.value = !1, ve.value = !0) : w.dataset.forEach((t, l) => {
|
|
113
|
+
Jt({
|
|
114
114
|
datasetObject: t,
|
|
115
115
|
requiredAttributes: ["name", "values"]
|
|
116
116
|
}).forEach((a) => {
|
|
117
|
-
|
|
117
|
+
$e({
|
|
118
118
|
componentName: "VueUiWaffle",
|
|
119
119
|
type: "datasetSerieAttribute",
|
|
120
120
|
property: a,
|
|
121
121
|
index: l,
|
|
122
|
-
debug:
|
|
122
|
+
debug: Ne.value
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
|
-
}),
|
|
126
|
-
const t =
|
|
127
|
-
const { width: l, height: a } =
|
|
128
|
-
chart:
|
|
129
|
-
title: e.value.style.chart.title.text ?
|
|
130
|
-
legend: e.value.style.chart.legend.show ?
|
|
131
|
-
source:
|
|
132
|
-
noTitle:
|
|
125
|
+
}), at(w.dataset) || (ve.value = e.value.loading), e.value.responsive) {
|
|
126
|
+
const t = rl(() => {
|
|
127
|
+
const { width: l, height: a } = il({
|
|
128
|
+
chart: T.value,
|
|
129
|
+
title: e.value.style.chart.title.text ? Ie.value : null,
|
|
130
|
+
legend: e.value.style.chart.legend.show ? Se.value : null,
|
|
131
|
+
source: _e.value,
|
|
132
|
+
noTitle: Ae.value
|
|
133
133
|
});
|
|
134
134
|
requestAnimationFrame(() => {
|
|
135
|
-
|
|
135
|
+
V.value.width = l, V.value.height = a, I.value.width = l, I.value.height = a;
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
|
-
L.value && (
|
|
138
|
+
L.value && (U.value && L.value.unobserve(U.value), L.value.disconnect()), L.value = new ResizeObserver(t), U.value = T.value.parentNode, L.value.observe(U.value);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}),
|
|
144
|
-
L.value && (
|
|
141
|
+
Et(() => {
|
|
142
|
+
Fe.value = !0, ze();
|
|
143
|
+
}), Wt(() => {
|
|
144
|
+
L.value && (U.value && L.value.unobserve(U.value), L.value.disconnect());
|
|
145
145
|
});
|
|
146
|
-
const { isPrinting:
|
|
146
|
+
const { isPrinting: Me, isImaging: Re, generatePdf: Ue, generateImage: Ee } = hl({
|
|
147
147
|
elementId: `vue-ui-waffle_${b.value}`,
|
|
148
148
|
fileName: e.value.style.chart.title.text || "vue-ui-waffle",
|
|
149
149
|
options: e.value.userOptions.print
|
|
150
|
-
}),
|
|
150
|
+
}), bt = c(() => e.value.userOptions.show && !e.value.style.chart.title.text), We = c(() => Qt(e.value.customPalette)), C = i({
|
|
151
151
|
showTable: e.value.table.show,
|
|
152
152
|
showTooltip: e.value.style.chart.tooltip.show
|
|
153
153
|
});
|
|
@@ -157,18 +157,18 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
157
157
|
showTooltip: e.value.style.chart.tooltip.show
|
|
158
158
|
};
|
|
159
159
|
}, { immediate: !0 });
|
|
160
|
-
const
|
|
160
|
+
const V = i({
|
|
161
161
|
height: 512,
|
|
162
162
|
width: 512
|
|
163
|
-
}),
|
|
163
|
+
}), I = i({
|
|
164
164
|
top: 0,
|
|
165
165
|
left: 0,
|
|
166
166
|
height: 512,
|
|
167
167
|
width: 512
|
|
168
|
-
}),
|
|
169
|
-
function
|
|
170
|
-
const l = e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.size, a = t.reduce((x,
|
|
171
|
-
let d = l - u.reduce((x,
|
|
168
|
+
}), S = c(() => (I.value.width - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), _ = c(() => (I.value.height - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), mt = c(() => Math.max(1e-4, I.value.width / e.value.style.chart.layout.grid.size)), Ge = c(() => Math.max(1e-4, I.value.height / e.value.style.chart.layout.grid.size));
|
|
169
|
+
function He(t) {
|
|
170
|
+
const l = e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.size, a = t.reduce((x, ke) => x + ke, 0), o = t.map((x) => x / a * l), u = o.map(Math.floor), s = o.map((x) => x % 1);
|
|
171
|
+
let d = l - u.reduce((x, ke) => x + ke, 0);
|
|
172
172
|
for (; d > 0; ) {
|
|
173
173
|
let x = s.indexOf(Math.max(...s));
|
|
174
174
|
u[x] += 1, s[x] = 0, d -= 1;
|
|
@@ -176,28 +176,28 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
176
176
|
return u;
|
|
177
177
|
}
|
|
178
178
|
const j = i(!1);
|
|
179
|
-
function
|
|
179
|
+
function pe() {
|
|
180
180
|
return j.value = K.value.flatMap((t) => t.values.reduce((l, a) => l + a, 0)).reduce((t, l) => t + l, 0) === 0, K.value.map((t, l) => ({
|
|
181
181
|
...t,
|
|
182
|
-
color:
|
|
182
|
+
color: ll(t.color) || We.value[l] || M[l] || M[l % M.length],
|
|
183
183
|
uid: `serie_${l}`,
|
|
184
184
|
absoluteIndex: l
|
|
185
185
|
}));
|
|
186
186
|
}
|
|
187
|
-
const
|
|
187
|
+
const fe = c(() => pe()), p = i(fe.value);
|
|
188
188
|
J(() => w.dataset, (t) => {
|
|
189
|
-
Array.isArray(t) && t.length > 0 && (
|
|
189
|
+
Array.isArray(t) && t.length > 0 && (ve.value = !1);
|
|
190
190
|
}, { immediate: !0 }), J(() => w.dataset, (t) => {
|
|
191
|
-
p.value =
|
|
191
|
+
p.value = pe();
|
|
192
192
|
}, { deep: !0 });
|
|
193
|
-
const
|
|
193
|
+
const wt = c(() => {
|
|
194
194
|
const t = p.value.filter((l, a) => !f.value.includes(l.uid)).map((l, a) => j.value ? 1 : (l.values || []).reduce((o, u) => o + u, 0));
|
|
195
|
-
return
|
|
196
|
-
}),
|
|
195
|
+
return He(t);
|
|
196
|
+
}), kt = c(() => {
|
|
197
197
|
const t = p.value.map((l, a) => j.value ? 1 : (l.values || []).reduce((o, u) => o + u));
|
|
198
|
-
return
|
|
198
|
+
return He(t);
|
|
199
199
|
}), q = c(() => (K.value.forEach((t, l) => {
|
|
200
|
-
[null, void 0].includes(t.values) &&
|
|
200
|
+
[null, void 0].includes(t.values) && $e({
|
|
201
201
|
componentName: "VueUiWaffle",
|
|
202
202
|
type: "datasetSerieAttribute",
|
|
203
203
|
property: "values (number[])",
|
|
@@ -210,25 +210,25 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
210
210
|
color: t.color,
|
|
211
211
|
value: (t.values || []).reduce((a, o) => a + o, 0),
|
|
212
212
|
absoluteValues: t.values || [],
|
|
213
|
-
proportion:
|
|
214
|
-
})))),
|
|
213
|
+
proportion: wt.value[l]
|
|
214
|
+
})))), ge = c(() => p.value.map((t, l) => ({
|
|
215
215
|
absoluteIndex: t.absoluteIndex,
|
|
216
216
|
uid: t.uid,
|
|
217
217
|
name: t.name,
|
|
218
218
|
color: t.color,
|
|
219
219
|
value: (t.values || []).reduce((a, o) => a + o, 0),
|
|
220
220
|
absoluteValues: t.values || [],
|
|
221
|
-
proportion:
|
|
221
|
+
proportion: kt.value[l]
|
|
222
222
|
})));
|
|
223
|
-
function
|
|
224
|
-
return
|
|
223
|
+
function Ct() {
|
|
224
|
+
return ge.value.map((t) => ({
|
|
225
225
|
name: t.name,
|
|
226
226
|
color: t.color,
|
|
227
227
|
value: t.value,
|
|
228
228
|
proportion: t.proportion
|
|
229
229
|
}));
|
|
230
230
|
}
|
|
231
|
-
const
|
|
231
|
+
const xt = c(() => {
|
|
232
232
|
let t = 0;
|
|
233
233
|
return q.value.map((l, a) => {
|
|
234
234
|
const o = t, u = o + l.proportion, s = [];
|
|
@@ -240,7 +240,7 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
240
240
|
rects: s
|
|
241
241
|
};
|
|
242
242
|
});
|
|
243
|
-
}), r = c(() =>
|
|
243
|
+
}), r = c(() => xt.value.flatMap((t, l) => t.rects.map((a, o) => ({
|
|
244
244
|
isFirst: o === 0,
|
|
245
245
|
isLongEnough: a.length > 2,
|
|
246
246
|
name: t.name,
|
|
@@ -253,53 +253,53 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
253
253
|
}))).map((t, l) => ({
|
|
254
254
|
...t,
|
|
255
255
|
isAbsoluteFirst: l % e.value.style.chart.layout.grid.size === 0
|
|
256
|
-
}))),
|
|
256
|
+
}))), E = c(() => {
|
|
257
257
|
const t = [];
|
|
258
258
|
for (let l = 0; l < e.value.style.chart.layout.grid.size; l += 1)
|
|
259
259
|
for (let a = 0; a < e.value.style.chart.layout.grid.size; a += 1)
|
|
260
260
|
t.push({
|
|
261
261
|
isStartOfLine: a === 0,
|
|
262
262
|
position: e.value.style.chart.layout.grid.vertical ? l : a,
|
|
263
|
-
x: (e.value.style.chart.layout.grid.vertical ? l : a) * (
|
|
264
|
-
y: (e.value.style.chart.layout.grid.vertical ? a : l) * (
|
|
263
|
+
x: (e.value.style.chart.layout.grid.vertical ? l : a) * (S.value + e.value.style.chart.layout.grid.spaceBetween),
|
|
264
|
+
y: (e.value.style.chart.layout.grid.vertical ? a : l) * (_.value + e.value.style.chart.layout.grid.spaceBetween) + I.value.top
|
|
265
265
|
});
|
|
266
266
|
return t;
|
|
267
|
-
}), f = i([]), X = i(!1),
|
|
268
|
-
function
|
|
267
|
+
}), f = i([]), X = i(!1), je = i(null), qe = i(null);
|
|
268
|
+
function Z(t) {
|
|
269
269
|
if (j.value) return;
|
|
270
270
|
if (!e.value.useAnimation) {
|
|
271
|
-
f.value.includes(t) ? f.value = f.value.filter((u) => u !== t) : f.value.length <
|
|
271
|
+
f.value.includes(t) ? f.value = f.value.filter((u) => u !== t) : f.value.length < N.value.length - 1 && N.value.length > 1 && f.value.push(t);
|
|
272
272
|
return;
|
|
273
273
|
}
|
|
274
|
-
const l =
|
|
274
|
+
const l = fe.value.find((u) => u.uid === t).values.reduce((u, s) => u + s, 0), a = p.value.find((u) => u.uid === t).values.reduce((u, s) => u + s, 0);
|
|
275
275
|
let o = a;
|
|
276
276
|
if (!(a === 0 && l === 0)) {
|
|
277
277
|
if (f.value.includes(t)) {
|
|
278
278
|
let s = function() {
|
|
279
|
-
o > u ? (cancelAnimationFrame(
|
|
279
|
+
o > u ? (cancelAnimationFrame(je.value), p.value = p.value.map((d, x) => d.uid === t ? {
|
|
280
280
|
...d,
|
|
281
281
|
values: [u]
|
|
282
282
|
} : d), X.value = !1) : (X.value = !0, o += u * 0.025, p.value = p.value.map((d, x) => d.uid === t ? {
|
|
283
283
|
...d,
|
|
284
284
|
values: [o]
|
|
285
|
-
} : d),
|
|
285
|
+
} : d), je.value = requestAnimationFrame(s));
|
|
286
286
|
};
|
|
287
287
|
f.value = f.value.filter((d) => d !== t);
|
|
288
288
|
const u = l;
|
|
289
289
|
s();
|
|
290
|
-
} else if (f.value.length <
|
|
290
|
+
} else if (f.value.length < N.value.length - 1 && N.value.length > 1) {
|
|
291
291
|
let u = function() {
|
|
292
|
-
o < a / 100 ? (cancelAnimationFrame(
|
|
292
|
+
o < a / 100 ? (cancelAnimationFrame(qe.value), f.value.push(t), p.value = p.value.map((s, d) => s.uid === t ? {
|
|
293
293
|
...s,
|
|
294
294
|
values: [0]
|
|
295
295
|
} : s), X.value = !1) : (X.value = !0, o /= 1.15, p.value = p.value.map((s) => s.uid === t ? {
|
|
296
296
|
...s,
|
|
297
297
|
values: [o]
|
|
298
|
-
} : s),
|
|
298
|
+
} : s), qe.value = requestAnimationFrame(u));
|
|
299
299
|
};
|
|
300
300
|
u();
|
|
301
301
|
}
|
|
302
|
-
|
|
302
|
+
Ot("selectLegend", q.value.map((u) => ({
|
|
303
303
|
name: u.name,
|
|
304
304
|
color: u.color,
|
|
305
305
|
value: u.value,
|
|
@@ -307,11 +307,25 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
307
307
|
})));
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
|
|
310
|
+
function Xe(t) {
|
|
311
|
+
if (!ge.value.length)
|
|
312
|
+
return e.value.debug && console.warn("VueUiWaffle - There are no series to show."), null;
|
|
313
|
+
const l = ge.value.find((a) => a.name === t);
|
|
314
|
+
return l || (e.value.debug && console.warn(`VueUiWaffle - Series name not found "${t}"`), null);
|
|
315
|
+
}
|
|
316
|
+
function $t(t) {
|
|
317
|
+
const l = Xe(t);
|
|
318
|
+
l !== null && f.value.includes(l.uid) && Z(l.uid);
|
|
319
|
+
}
|
|
320
|
+
function Tt(t) {
|
|
321
|
+
const l = Xe(t);
|
|
322
|
+
l !== null && (f.value.includes(l.uid) || Z(l.uid));
|
|
323
|
+
}
|
|
324
|
+
const N = c(() => p.value.map((t, l) => {
|
|
311
325
|
const a = (t.values || []).reduce((u, s) => u + s, 0), o = a / p.value.map((u) => (u.values || []).reduce((s, d) => s + d, 0)).reduce((u, s) => u + s, 0);
|
|
312
326
|
return {
|
|
313
327
|
name: t.name,
|
|
314
|
-
color: t.color ||
|
|
328
|
+
color: t.color || We[l] || M[l] || M[l % M.length],
|
|
315
329
|
value: a,
|
|
316
330
|
proportion: o,
|
|
317
331
|
uid: t.uid,
|
|
@@ -320,7 +334,7 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
320
334
|
}).map((t, l) => ({
|
|
321
335
|
...t,
|
|
322
336
|
opacity: f.value.includes(t.uid) ? 0.5 : 1,
|
|
323
|
-
segregate: () =>
|
|
337
|
+
segregate: () => Z(t.uid),
|
|
324
338
|
isSegregated: f.value.includes(t.uid),
|
|
325
339
|
display: `${t.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${e.value.style.chart.legend.showValue ? Q(e.value.style.chart.layout.labels.dataLabels.formatter, t.value, P({
|
|
326
340
|
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
@@ -328,39 +342,39 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
328
342
|
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
329
343
|
r: e.value.style.chart.legend.roundingValue
|
|
330
344
|
}), { datapoint: t, index: l }) : ""}${e.value.style.chart.legend.showPercentage ? f.value.includes(t.uid) ? `${e.value.style.chart.legend.showValue ? " (" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? " (" : ""}${isNaN(t.value / A.value) ? "-" : P({ v: t.value / A.value * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
|
|
331
|
-
}))),
|
|
345
|
+
}))), It = c(() => ({
|
|
332
346
|
cy: "waffle-div-legend",
|
|
333
347
|
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
334
348
|
color: e.value.style.chart.legend.color,
|
|
335
349
|
fontSize: e.value.style.chart.legend.fontSize,
|
|
336
350
|
paddingBottom: 12,
|
|
337
351
|
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
338
|
-
})), A = c(() => q.value.map((t) => t.value).reduce((t, l) => t + l, 0)),
|
|
339
|
-
function
|
|
352
|
+
})), A = c(() => q.value.map((t) => t.value).reduce((t, l) => t + l, 0)), ye = i(null), be = i(null);
|
|
353
|
+
function St(t) {
|
|
340
354
|
const l = r.value[t];
|
|
341
355
|
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: l.serieIndex });
|
|
342
356
|
}
|
|
343
|
-
function
|
|
357
|
+
function _t(t) {
|
|
344
358
|
const l = r.value[t];
|
|
345
|
-
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: l.serieIndex }),
|
|
359
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: l.serieIndex }), be.value = null, ne.value = !1, R.value = null;
|
|
346
360
|
}
|
|
347
|
-
function
|
|
361
|
+
function At(t) {
|
|
348
362
|
if (f.value.length === w.dataset.length) return;
|
|
349
363
|
const l = r.value[t];
|
|
350
|
-
|
|
364
|
+
ye.value = {
|
|
351
365
|
datapoint: l,
|
|
352
366
|
seriesIndex: l.absoluteIndex,
|
|
353
367
|
series: p.value,
|
|
354
368
|
config: e.value
|
|
355
|
-
}, e.value.events.datapointEnter &&
|
|
369
|
+
}, e.value.events.datapointEnter && be.value !== l.serieIndex && e.value.events.datapointEnter({ datapoint: l, seriesIndex: l.serieIndex }), be.value = l.serieIndex, ne.value = !0, R.value = r.value[t].serieIndex;
|
|
356
370
|
const a = e.value.style.chart.tooltip.customFormat;
|
|
357
|
-
if (
|
|
371
|
+
if (sl(a) && nl(() => a({
|
|
358
372
|
seriesIndex: r.value[t].absoluteIndex,
|
|
359
373
|
datapoint: l,
|
|
360
374
|
series: p.value,
|
|
361
375
|
config: e.value
|
|
362
376
|
})))
|
|
363
|
-
|
|
377
|
+
re.value = a({
|
|
364
378
|
seriesIndex: r.value[t].absoluteIndex,
|
|
365
379
|
datapoint: l,
|
|
366
380
|
series: p.value,
|
|
@@ -368,7 +382,7 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
368
382
|
});
|
|
369
383
|
else {
|
|
370
384
|
let o = "";
|
|
371
|
-
if (o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, o += `<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="${l.color}" />${
|
|
385
|
+
if (o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, o += `<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="${l.color}" />${yt.pattern ? `<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${b.value}_${l.absoluteIndex})"/>` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (o += `<b>${Q(
|
|
372
386
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
373
387
|
l.value,
|
|
374
388
|
P({
|
|
@@ -390,23 +404,23 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
390
404
|
});
|
|
391
405
|
e.value.style.chart.tooltip.showValue ? o += `<span>(${u})</span></div>` : o += `<b>${u}%</b></div>`;
|
|
392
406
|
}
|
|
393
|
-
|
|
407
|
+
re.value = o;
|
|
394
408
|
}
|
|
395
409
|
}
|
|
396
|
-
const
|
|
410
|
+
const Ot = nt, O = c(() => {
|
|
397
411
|
const t = q.value.map((a) => ({
|
|
398
412
|
name: a.name,
|
|
399
413
|
color: a.color
|
|
400
414
|
})), l = q.value.map((a) => a.value);
|
|
401
415
|
return { head: t, body: l };
|
|
402
416
|
});
|
|
403
|
-
function
|
|
417
|
+
function ee(t) {
|
|
404
418
|
return e.value.useBlurOnHover && ![null, void 0].includes(R.value) && R.value !== t ? `url(#blur_${b.value})` : "";
|
|
405
419
|
}
|
|
406
|
-
function
|
|
420
|
+
function Pt(t, l) {
|
|
407
421
|
return e.value.style.chart.layout.labels.captions.show ? r.value.length && !X.value && !e.value.style.chart.layout.grid.vertical && (r.value[t].isFirst && l.position < e.value.style.chart.layout.grid.size - 2 || r.value[t].isAbsoluteFirst && t % e.value.style.chart.layout.grid.size === 0 && r.value[t].absoluteStartIndex) : !1;
|
|
408
422
|
}
|
|
409
|
-
function
|
|
423
|
+
function Lt(t, l = null) {
|
|
410
424
|
const a = Q(
|
|
411
425
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
412
426
|
r.value[t].value,
|
|
@@ -417,19 +431,19 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
417
431
|
r: e.value.style.chart.layout.labels.captions.roundingValue
|
|
418
432
|
}),
|
|
419
433
|
{ datapoint: r.value[t], position: l }
|
|
420
|
-
), o = P({ v: r.value[t].proportion, s: "%", r: e.value.style.chart.layout.labels.captions.roundingPercentage }), u = (e.value.style.chart.layout.labels.captions.serieNameAbbreviation ?
|
|
434
|
+
), o = P({ v: r.value[t].proportion, s: "%", r: e.value.style.chart.layout.labels.captions.roundingPercentage }), u = (e.value.style.chart.layout.labels.captions.serieNameAbbreviation ? ul({ source: r.value[t].name, length: e.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize }) : r.value[t].name) + (e.value.style.chart.layout.labels.captions.showPercentage || e.value.style.chart.layout.labels.captions.showValue ? ":" : ""), s = e.value.style.chart.layout.labels.captions.showSerieName ? u : "";
|
|
421
435
|
let d = "";
|
|
422
436
|
return e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? d = `${o} (${a})` : e.value.style.chart.layout.labels.captions.showPercentage && !e.value.style.chart.layout.labels.captions.showValue ? d = o : !e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue && (d = a), `${s}${d}`;
|
|
423
437
|
}
|
|
424
|
-
function
|
|
425
|
-
|
|
438
|
+
function me(t = null) {
|
|
439
|
+
jt(() => {
|
|
426
440
|
const l = O.value.head.map((u, s) => [[
|
|
427
441
|
u.name
|
|
428
|
-
], [O.value.body[s]], [isNaN(O.value.body[s] / A.value) ? "-" : O.value.body[s] / A.value * 100]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), o =
|
|
429
|
-
t ? t(o) :
|
|
442
|
+
], [O.value.body[s]], [isNaN(O.value.body[s] / A.value) ? "-" : O.value.body[s] / A.value * 100]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), o = al(a);
|
|
443
|
+
t ? t(o) : ol({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-waffle" });
|
|
430
444
|
});
|
|
431
445
|
}
|
|
432
|
-
const
|
|
446
|
+
const te = c(() => {
|
|
433
447
|
const t = [
|
|
434
448
|
' <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>',
|
|
435
449
|
Q(
|
|
@@ -487,23 +501,23 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
487
501
|
config: a,
|
|
488
502
|
colNames: o
|
|
489
503
|
};
|
|
490
|
-
}),
|
|
491
|
-
function
|
|
492
|
-
|
|
504
|
+
}), z = i(!1);
|
|
505
|
+
function Ye(t) {
|
|
506
|
+
z.value = t, Te.value += 1;
|
|
493
507
|
}
|
|
494
|
-
function
|
|
508
|
+
function Je() {
|
|
495
509
|
C.value.showTable = !C.value.showTable;
|
|
496
510
|
}
|
|
497
|
-
function
|
|
511
|
+
function Qe() {
|
|
498
512
|
C.value.showTooltip = !C.value.showTooltip;
|
|
499
513
|
}
|
|
500
|
-
const
|
|
501
|
-
function
|
|
502
|
-
|
|
514
|
+
const le = i(!1);
|
|
515
|
+
function we() {
|
|
516
|
+
le.value = !le.value;
|
|
503
517
|
}
|
|
504
|
-
async function
|
|
505
|
-
if (!
|
|
506
|
-
const { width: l, height: a } =
|
|
518
|
+
async function Ft({ scale: t = 2 } = {}) {
|
|
519
|
+
if (!T.value) return;
|
|
520
|
+
const { width: l, height: a } = T.value.getBoundingClientRect(), o = l / a, { imageUri: u, base64: s } = await yl({ domElement: T.value, base64: !0, img: !0, scale: t });
|
|
507
521
|
return {
|
|
508
522
|
imageUri: u,
|
|
509
523
|
base64: s,
|
|
@@ -516,15 +530,15 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
516
530
|
const Y = c(() => {
|
|
517
531
|
const t = e.value.table.useDialog && !e.value.table.show, l = C.value.showTable;
|
|
518
532
|
return {
|
|
519
|
-
component: t ?
|
|
533
|
+
component: t ? ft : ct,
|
|
520
534
|
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
521
535
|
props: t ? {
|
|
522
536
|
backgroundColor: e.value.table.th.backgroundColor,
|
|
523
537
|
color: e.value.table.th.color,
|
|
524
538
|
headerColor: e.value.table.th.color,
|
|
525
539
|
headerBg: e.value.table.th.backgroundColor,
|
|
526
|
-
isFullscreen:
|
|
527
|
-
fullscreenParent:
|
|
540
|
+
isFullscreen: z.value,
|
|
541
|
+
fullscreenParent: T.value,
|
|
528
542
|
forcedWidth: Math.min(500, window.innerWidth * 0.8)
|
|
529
543
|
} : {
|
|
530
544
|
hideDetails: !0,
|
|
@@ -546,69 +560,71 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
546
560
|
J(() => C.value.showTable, (t) => {
|
|
547
561
|
e.value.table.show || (t && e.value.table.useDialog && H.value ? H.value.open() : "close" in H.value && H.value.close());
|
|
548
562
|
});
|
|
549
|
-
function
|
|
550
|
-
C.value.showTable = !1,
|
|
563
|
+
function Ke() {
|
|
564
|
+
C.value.showTable = !1, ie.value && ie.value.setTableIconState(!1);
|
|
551
565
|
}
|
|
552
|
-
const
|
|
566
|
+
const Bt = c(() => N.value.map((t) => ({
|
|
553
567
|
...t,
|
|
554
568
|
name: t.display
|
|
555
|
-
}))),
|
|
556
|
-
svg:
|
|
557
|
-
title:
|
|
558
|
-
legend:
|
|
559
|
-
legendItems:
|
|
560
|
-
backgroundColor:
|
|
569
|
+
}))), Dt = c(() => e.value.style.chart.backgroundColor), Vt = c(() => e.value.style.chart.legend), Nt = c(() => e.value.style.chart.title), { exportSvg: zt, getSvg: Mt } = pl({
|
|
570
|
+
svg: de,
|
|
571
|
+
title: Nt,
|
|
572
|
+
legend: Vt,
|
|
573
|
+
legendItems: Bt,
|
|
574
|
+
backgroundColor: Dt
|
|
561
575
|
});
|
|
562
|
-
async function
|
|
576
|
+
async function Ze({ isCb: t }) {
|
|
563
577
|
if (t) {
|
|
564
|
-
const { blob: l, url: a, text: o, dataUrl: u } = await
|
|
578
|
+
const { blob: l, url: a, text: o, dataUrl: u } = await Mt();
|
|
565
579
|
e.value.userOptions.callbacks.svg({ blob: l, url: a, text: o, dataUrl: u });
|
|
566
580
|
} else
|
|
567
|
-
|
|
581
|
+
zt();
|
|
568
582
|
}
|
|
569
|
-
return
|
|
570
|
-
getData:
|
|
571
|
-
getImage:
|
|
572
|
-
generatePdf:
|
|
573
|
-
generateCsv:
|
|
574
|
-
generateImage:
|
|
575
|
-
generateSvg:
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
583
|
+
return st({
|
|
584
|
+
getData: Ct,
|
|
585
|
+
getImage: Ft,
|
|
586
|
+
generatePdf: Ue,
|
|
587
|
+
generateCsv: me,
|
|
588
|
+
generateImage: Ee,
|
|
589
|
+
generateSvg: Ze,
|
|
590
|
+
hideSeries: Tt,
|
|
591
|
+
showSeries: $t,
|
|
592
|
+
toggleTable: Je,
|
|
593
|
+
toggleTooltip: Qe,
|
|
594
|
+
toggleAnnotator: we,
|
|
595
|
+
toggleFullscreen: Ye
|
|
580
596
|
}), (t, l) => (n(), v("div", {
|
|
581
|
-
class:
|
|
597
|
+
class: tt(`vue-data-ui-component vue-ui-waffle ${z.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
582
598
|
ref_key: "waffleChart",
|
|
583
|
-
ref:
|
|
599
|
+
ref: T,
|
|
584
600
|
id: `vue-ui-waffle_${b.value}`,
|
|
585
|
-
style:
|
|
586
|
-
onMouseenter: l[2] || (l[2] = () => h(
|
|
587
|
-
onMouseleave: l[3] || (l[3] = () => h(
|
|
601
|
+
style: ae(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
602
|
+
onMouseenter: l[2] || (l[2] = () => h(De)(!0)),
|
|
603
|
+
onMouseleave: l[3] || (l[3] = () => h(De)(!1))
|
|
588
604
|
}, [
|
|
589
|
-
e.value.userOptions.buttons.annotator ? (n(), B(h(
|
|
605
|
+
e.value.userOptions.buttons.annotator ? (n(), B(h(ht), {
|
|
590
606
|
key: 0,
|
|
591
|
-
svgRef: h(
|
|
607
|
+
svgRef: h(de),
|
|
592
608
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
593
609
|
color: e.value.style.chart.color,
|
|
594
|
-
active:
|
|
595
|
-
onClose:
|
|
610
|
+
active: le.value,
|
|
611
|
+
onClose: we
|
|
596
612
|
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : m("", !0),
|
|
597
|
-
|
|
613
|
+
bt.value ? (n(), v("div", {
|
|
598
614
|
key: 1,
|
|
599
615
|
ref_key: "noTitle",
|
|
600
|
-
ref:
|
|
616
|
+
ref: Ae,
|
|
601
617
|
class: "vue-data-ui-no-title-space",
|
|
602
618
|
style: "height:36px; width: 100%;background:transparent"
|
|
603
619
|
}, null, 512)) : m("", !0),
|
|
604
620
|
e.value.style.chart.title.text ? (n(), v("div", {
|
|
605
621
|
key: 2,
|
|
606
622
|
ref_key: "chartTitle",
|
|
607
|
-
ref:
|
|
623
|
+
ref: Ie,
|
|
608
624
|
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
609
625
|
}, [
|
|
610
|
-
(n(), B(
|
|
611
|
-
key: `title_${
|
|
626
|
+
(n(), B(ml, {
|
|
627
|
+
key: `title_${Oe.value}`,
|
|
612
628
|
config: {
|
|
613
629
|
title: {
|
|
614
630
|
cy: "waffle-title",
|
|
@@ -623,15 +639,15 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
623
639
|
], 512)) : m("", !0),
|
|
624
640
|
k("div", {
|
|
625
641
|
id: `legend-top-${b.value}`
|
|
626
|
-
}, null, 8,
|
|
627
|
-
e.value.userOptions.show &&
|
|
642
|
+
}, null, 8, $l),
|
|
643
|
+
e.value.userOptions.show && se.value && (h(Ve) || h(ce)) ? (n(), B(h(dt), {
|
|
628
644
|
ref_key: "userOptionsRef",
|
|
629
|
-
ref:
|
|
630
|
-
key: `user_options_${
|
|
645
|
+
ref: ie,
|
|
646
|
+
key: `user_options_${Te.value}`,
|
|
631
647
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
632
648
|
color: e.value.style.chart.color,
|
|
633
|
-
isPrinting: h(
|
|
634
|
-
isImaging: h(
|
|
649
|
+
isPrinting: h(Me),
|
|
650
|
+
isImaging: h(Re),
|
|
635
651
|
uid: b.value,
|
|
636
652
|
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
637
653
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
@@ -640,32 +656,32 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
640
656
|
hasXls: e.value.userOptions.buttons.csv,
|
|
641
657
|
hasTable: e.value.userOptions.buttons.table,
|
|
642
658
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
643
|
-
isFullscreen:
|
|
659
|
+
isFullscreen: z.value,
|
|
644
660
|
isTooltip: C.value.showTooltip,
|
|
645
661
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
646
|
-
chartElement:
|
|
662
|
+
chartElement: T.value,
|
|
647
663
|
position: e.value.userOptions.position,
|
|
648
664
|
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
649
|
-
isAnnotation:
|
|
665
|
+
isAnnotation: le.value,
|
|
650
666
|
callbacks: e.value.userOptions.callbacks,
|
|
651
667
|
printScale: e.value.userOptions.print.scale,
|
|
652
668
|
tableDialog: e.value.table.useDialog,
|
|
653
|
-
onToggleFullscreen:
|
|
654
|
-
onGeneratePdf: h(
|
|
655
|
-
onGenerateCsv:
|
|
656
|
-
onGenerateImage: h(
|
|
657
|
-
onGenerateSvg:
|
|
658
|
-
onToggleTable:
|
|
659
|
-
onToggleTooltip:
|
|
660
|
-
onToggleAnnotator:
|
|
661
|
-
style:
|
|
662
|
-
visibility: h(
|
|
669
|
+
onToggleFullscreen: Ye,
|
|
670
|
+
onGeneratePdf: h(Ue),
|
|
671
|
+
onGenerateCsv: me,
|
|
672
|
+
onGenerateImage: h(Ee),
|
|
673
|
+
onGenerateSvg: Ze,
|
|
674
|
+
onToggleTable: Je,
|
|
675
|
+
onToggleTooltip: Qe,
|
|
676
|
+
onToggleAnnotator: we,
|
|
677
|
+
style: ae({
|
|
678
|
+
visibility: h(Ve) ? h(ce) ? "visible" : "hidden" : "visible"
|
|
663
679
|
})
|
|
664
|
-
},
|
|
680
|
+
}, Ce({ _: 2 }, [
|
|
665
681
|
t.$slots.menuIcon ? {
|
|
666
682
|
name: "menuIcon",
|
|
667
683
|
fn: g(({ isOpen: a, color: o }) => [
|
|
668
|
-
y(t.$slots, "menuIcon", G(
|
|
684
|
+
y(t.$slots, "menuIcon", W(G({ isOpen: a, color: o })), void 0, !0)
|
|
669
685
|
]),
|
|
670
686
|
key: "0"
|
|
671
687
|
} : void 0,
|
|
@@ -714,27 +730,27 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
714
730
|
t.$slots.optionFullscreen ? {
|
|
715
731
|
name: "optionFullscreen",
|
|
716
732
|
fn: g(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
717
|
-
y(t.$slots, "optionFullscreen", G(
|
|
733
|
+
y(t.$slots, "optionFullscreen", W(G({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
718
734
|
]),
|
|
719
735
|
key: "7"
|
|
720
736
|
} : void 0,
|
|
721
737
|
t.$slots.optionAnnotator ? {
|
|
722
738
|
name: "optionAnnotator",
|
|
723
739
|
fn: g(({ toggleAnnotator: a, isAnnotator: o }) => [
|
|
724
|
-
y(t.$slots, "optionAnnotator", G(
|
|
740
|
+
y(t.$slots, "optionAnnotator", W(G({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
|
|
725
741
|
]),
|
|
726
742
|
key: "8"
|
|
727
743
|
} : void 0
|
|
728
744
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : m("", !0),
|
|
729
745
|
(n(), v("svg", {
|
|
730
746
|
ref_key: "svgRef",
|
|
731
|
-
ref:
|
|
732
|
-
xmlns: h(
|
|
733
|
-
class:
|
|
734
|
-
viewBox: `0 0 ${
|
|
735
|
-
style:
|
|
747
|
+
ref: de,
|
|
748
|
+
xmlns: h(Kt),
|
|
749
|
+
class: tt({ "vue-data-ui-fullscreen--on": z.value, "vue-data-ui-fulscreen--off": !z.value }),
|
|
750
|
+
viewBox: `0 0 ${V.value.width <= 0 ? 10 : V.value.width} ${V.value.height <= 0 ? 10 : V.value.height}`,
|
|
751
|
+
style: ae(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
736
752
|
}, [
|
|
737
|
-
|
|
753
|
+
oe(h(pt)),
|
|
738
754
|
k("defs", null, [
|
|
739
755
|
(n(!0), v($, null, D(r.value, (a, o) => (n(), v("radialGradient", {
|
|
740
756
|
cx: "50%",
|
|
@@ -746,13 +762,13 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
746
762
|
}, [
|
|
747
763
|
k("stop", {
|
|
748
764
|
offset: "0%",
|
|
749
|
-
"stop-color": h(
|
|
750
|
-
}, null, 8,
|
|
765
|
+
"stop-color": h(Zt)(h(el)(a.color, 0.05), 100 - e.value.style.chart.layout.rect.gradientIntensity)
|
|
766
|
+
}, null, 8, Sl),
|
|
751
767
|
k("stop", {
|
|
752
768
|
offset: "100%",
|
|
753
769
|
"stop-color": a.color
|
|
754
|
-
}, null, 8,
|
|
755
|
-
], 8,
|
|
770
|
+
}, null, 8, _l)
|
|
771
|
+
], 8, Il))), 256))
|
|
756
772
|
]),
|
|
757
773
|
k("defs", null, [
|
|
758
774
|
k("filter", {
|
|
@@ -770,123 +786,123 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
770
786
|
type: "saturate",
|
|
771
787
|
values: "0"
|
|
772
788
|
}, null, -1)
|
|
773
|
-
])], 8,
|
|
789
|
+
])], 8, Al)
|
|
774
790
|
]),
|
|
775
|
-
e.value.useCustomCells && r.value.length ? (n(!0), v($, { key: 0 }, D(
|
|
791
|
+
e.value.useCustomCells && r.value.length ? (n(!0), v($, { key: 0 }, D(E.value, (a, o) => (n(), v("foreignObject", {
|
|
776
792
|
x: a.x,
|
|
777
793
|
y: a.y,
|
|
778
|
-
height:
|
|
779
|
-
width:
|
|
794
|
+
height: _.value <= 0 ? 1e-4 : _.value,
|
|
795
|
+
width: S.value <= 0 ? 1e-4 : S.value,
|
|
780
796
|
class: "vue-ui-waffle-custom-cell-foreignObject"
|
|
781
797
|
}, [
|
|
782
|
-
y(t.$slots, "cell",
|
|
783
|
-
], 8,
|
|
798
|
+
y(t.$slots, "cell", xe({ ref_for: !0 }, { cell: { ...a, color: r.value[o].color, ...r.value[o] }, isSelected: [null, void 0].includes(R.value) ? !0 : r.value[o].serieIndex === R.value }), void 0, !0)
|
|
799
|
+
], 8, Ol))), 256)) : m("", !0),
|
|
784
800
|
!r.value.length && !e.value.useCustomCells ? (n(), v("rect", {
|
|
785
801
|
key: 1,
|
|
786
802
|
x: 12,
|
|
787
803
|
y: 12,
|
|
788
|
-
height:
|
|
789
|
-
width:
|
|
804
|
+
height: I.value.height - 24,
|
|
805
|
+
width: I.value.width - 24,
|
|
790
806
|
rx: 3,
|
|
791
807
|
fill: "none",
|
|
792
808
|
stroke: "black"
|
|
793
|
-
}, null, 8,
|
|
794
|
-
t.$slots.pattern ? (n(), v("g",
|
|
795
|
-
(n(!0), v($, null, D(
|
|
796
|
-
y(t.$slots, "pattern",
|
|
809
|
+
}, null, 8, Pl)) : r.value.length && !e.value.useCustomCells ? (n(), v($, { key: 2 }, [
|
|
810
|
+
t.$slots.pattern ? (n(), v("g", Ll, [
|
|
811
|
+
(n(!0), v($, null, D(fe.value, (a) => (n(), v("defs", null, [
|
|
812
|
+
y(t.$slots, "pattern", xe({ ref_for: !0 }, { seriesIndex: a.absoluteIndex, patternId: `pattern_${b.value}_${a.absoluteIndex}` }), void 0, !0)
|
|
797
813
|
]))), 256))
|
|
798
814
|
])) : m("", !0),
|
|
799
|
-
(n(!0), v($, null, D(
|
|
815
|
+
(n(!0), v($, null, D(E.value, (a, o) => (n(), v("rect", {
|
|
800
816
|
rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
|
|
801
817
|
x: a.x + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
802
818
|
y: a.y + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
803
|
-
height:
|
|
804
|
-
width:
|
|
819
|
+
height: _.value <= 0 ? 1e-4 : _.value,
|
|
820
|
+
width: S.value <= 0 ? 1e-4 : S.value,
|
|
805
821
|
fill: "white",
|
|
806
822
|
stroke: e.value.style.chart.layout.rect.stroke,
|
|
807
823
|
"stroke-width": e.value.style.chart.layout.rect.strokeWidth,
|
|
808
|
-
filter:
|
|
809
|
-
}, null, 8,
|
|
810
|
-
(n(!0), v($, null, D(
|
|
824
|
+
filter: ee(r.value[o].serieIndex)
|
|
825
|
+
}, null, 8, Fl))), 256)),
|
|
826
|
+
(n(!0), v($, null, D(E.value, (a, o) => (n(), v("rect", {
|
|
811
827
|
rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
|
|
812
828
|
x: a.x + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
813
829
|
y: a.y + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
814
|
-
height:
|
|
815
|
-
width:
|
|
830
|
+
height: _.value <= 0 ? 1e-4 : _.value,
|
|
831
|
+
width: S.value <= 0 ? 1e-4 : S.value,
|
|
816
832
|
fill: e.value.style.chart.layout.rect.useGradient && e.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${b.value}_${o})` : r.value[o].color,
|
|
817
833
|
stroke: e.value.style.chart.layout.rect.stroke,
|
|
818
834
|
"stroke-width": e.value.style.chart.layout.rect.strokeWidth,
|
|
819
|
-
filter:
|
|
820
|
-
}, null, 8,
|
|
821
|
-
t.$slots.pattern ? (n(), v("g",
|
|
822
|
-
(n(!0), v($, null, D(
|
|
835
|
+
filter: ee(r.value[o].serieIndex)
|
|
836
|
+
}, null, 8, Bl))), 256)),
|
|
837
|
+
t.$slots.pattern ? (n(), v("g", Dl, [
|
|
838
|
+
(n(!0), v($, null, D(E.value, (a, o) => (n(), v("rect", {
|
|
823
839
|
rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
|
|
824
840
|
x: a.x + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
825
841
|
y: a.y + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
826
|
-
height:
|
|
827
|
-
width:
|
|
842
|
+
height: _.value <= 0 ? 1e-4 : _.value,
|
|
843
|
+
width: S.value <= 0 ? 1e-4 : S.value,
|
|
828
844
|
fill: `url(#pattern_${b.value}_${r.value[o].absoluteIndex})`,
|
|
829
845
|
stroke: "none",
|
|
830
|
-
filter:
|
|
831
|
-
}, null, 8,
|
|
846
|
+
filter: ee(r.value[o].serieIndex)
|
|
847
|
+
}, null, 8, Vl))), 256))
|
|
832
848
|
])) : m("", !0)
|
|
833
849
|
], 64)) : m("", !0),
|
|
834
|
-
(n(!0), v($, null, D(
|
|
835
|
-
|
|
850
|
+
(n(!0), v($, null, D(E.value, (a, o) => (n(), v($, null, [
|
|
851
|
+
Pt(o, a) ? (n(), v("text", {
|
|
836
852
|
key: `datalabel_${o}`,
|
|
837
|
-
textContent:
|
|
853
|
+
textContent: ue(Lt(o, a)),
|
|
838
854
|
x: a.x + e.value.style.chart.layout.labels.captions.offsetX + e.value.style.chart.layout.grid.spaceBetween / 2 + 6,
|
|
839
|
-
y: a.y + e.value.style.chart.layout.labels.captions.offsetY + e.value.style.chart.layout.grid.spaceBetween / 2 +
|
|
855
|
+
y: a.y + e.value.style.chart.layout.labels.captions.offsetY + e.value.style.chart.layout.grid.spaceBetween / 2 + Ge.value / 2 + e.value.style.chart.layout.labels.captions.fontSize / 3,
|
|
840
856
|
"font-size": e.value.style.chart.layout.labels.captions.fontSize,
|
|
841
|
-
fill: h(
|
|
842
|
-
filter:
|
|
843
|
-
}, null, 8,
|
|
857
|
+
fill: h(tl)(r.value[o].color),
|
|
858
|
+
filter: ee(r.value[o].serieIndex)
|
|
859
|
+
}, null, 8, Nl)) : m("", !0)
|
|
844
860
|
], 64))), 256)),
|
|
845
|
-
(n(!0), v($, null, D(
|
|
861
|
+
(n(!0), v($, null, D(E.value, (a, o) => (n(), v("rect", {
|
|
846
862
|
x: a.x + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
847
863
|
y: a.y + e.value.style.chart.layout.grid.spaceBetween / 2,
|
|
848
|
-
height:
|
|
849
|
-
width:
|
|
864
|
+
height: Ge.value,
|
|
865
|
+
width: mt.value,
|
|
850
866
|
fill: "transparent",
|
|
851
867
|
stroke: "none",
|
|
852
|
-
onMouseover: (u) =>
|
|
853
|
-
onMouseleave: (u) =>
|
|
854
|
-
onClick: (u) =>
|
|
855
|
-
}, null, 40,
|
|
856
|
-
y(t.$slots, "svg", { svg:
|
|
857
|
-
], 14,
|
|
858
|
-
t.$slots.watermark ? (n(), v("div",
|
|
859
|
-
y(t.$slots, "watermark", G(
|
|
868
|
+
onMouseover: (u) => At(o),
|
|
869
|
+
onMouseleave: (u) => _t(o),
|
|
870
|
+
onClick: (u) => St(o)
|
|
871
|
+
}, null, 40, zl))), 256)),
|
|
872
|
+
y(t.$slots, "svg", { svg: V.value }, void 0, !0)
|
|
873
|
+
], 14, Tl)),
|
|
874
|
+
t.$slots.watermark ? (n(), v("div", Ml, [
|
|
875
|
+
y(t.$slots, "watermark", W(G({ isPrinting: h(Me) || h(Re) })), void 0, !0)
|
|
860
876
|
])) : m("", !0),
|
|
861
877
|
k("div", {
|
|
862
878
|
id: `legend-bottom-${b.value}`
|
|
863
|
-
}, null, 8,
|
|
864
|
-
|
|
879
|
+
}, null, 8, Rl),
|
|
880
|
+
Fe.value ? (n(), B(Gt, {
|
|
865
881
|
key: 5,
|
|
866
882
|
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${b.value}` : `#legend-bottom-${b.value}`
|
|
867
883
|
}, [
|
|
868
884
|
k("div", {
|
|
869
885
|
ref_key: "chartLegend",
|
|
870
|
-
ref:
|
|
886
|
+
ref: Se
|
|
871
887
|
}, [
|
|
872
|
-
e.value.style.chart.legend.show ? (n(), B(
|
|
873
|
-
key: `legend_${
|
|
874
|
-
legendSet:
|
|
875
|
-
config:
|
|
876
|
-
onClickMarker: l[0] || (l[0] = ({ legend: a }) =>
|
|
877
|
-
},
|
|
888
|
+
e.value.style.chart.legend.show ? (n(), B(kl, {
|
|
889
|
+
key: `legend_${Le.value}`,
|
|
890
|
+
legendSet: N.value,
|
|
891
|
+
config: It.value,
|
|
892
|
+
onClickMarker: l[0] || (l[0] = ({ legend: a }) => Z(a.uid))
|
|
893
|
+
}, Ce({
|
|
878
894
|
item: g(({ legend: a }) => [
|
|
879
895
|
k("div", {
|
|
880
896
|
onClick: (o) => a.segregate(),
|
|
881
|
-
style:
|
|
882
|
-
},
|
|
897
|
+
style: ae(`opacity:${f.value.includes(a.uid) ? 0.5 : 1}`)
|
|
898
|
+
}, ue(a.display), 13, Ul)
|
|
883
899
|
]),
|
|
884
900
|
_: 2
|
|
885
901
|
}, [
|
|
886
902
|
t.$slots.pattern ? {
|
|
887
903
|
name: "legend-pattern",
|
|
888
904
|
fn: g(({ legend: a, index: o }) => [
|
|
889
|
-
|
|
905
|
+
oe(bl, {
|
|
890
906
|
shape: a.shape,
|
|
891
907
|
radius: 30,
|
|
892
908
|
stroke: "none",
|
|
@@ -898,20 +914,20 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
898
914
|
} : void 0
|
|
899
915
|
]), 1032, ["legendSet", "config"])) : y(t.$slots, "legend", {
|
|
900
916
|
key: 1,
|
|
901
|
-
legend:
|
|
917
|
+
legend: N.value
|
|
902
918
|
}, void 0, !0)
|
|
903
919
|
], 512)
|
|
904
920
|
], 8, ["to"])) : m("", !0),
|
|
905
921
|
t.$slots.source ? (n(), v("div", {
|
|
906
922
|
key: 6,
|
|
907
923
|
ref_key: "source",
|
|
908
|
-
ref:
|
|
924
|
+
ref: _e,
|
|
909
925
|
dir: "auto"
|
|
910
926
|
}, [
|
|
911
927
|
y(t.$slots, "source", {}, void 0, !0)
|
|
912
928
|
], 512)) : m("", !0),
|
|
913
|
-
|
|
914
|
-
show: C.value.showTooltip &&
|
|
929
|
+
oe(h(rt), {
|
|
930
|
+
show: C.value.showTooltip && ne.value && f.value.length < w.dataset.length,
|
|
915
931
|
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
916
932
|
color: e.value.style.chart.tooltip.color,
|
|
917
933
|
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
@@ -920,48 +936,48 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
920
936
|
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
921
937
|
position: e.value.style.chart.tooltip.position,
|
|
922
938
|
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
923
|
-
parent:
|
|
924
|
-
content:
|
|
939
|
+
parent: T.value,
|
|
940
|
+
content: re.value,
|
|
925
941
|
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
|
|
926
942
|
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
927
|
-
isFullscreen:
|
|
943
|
+
isFullscreen: z.value,
|
|
928
944
|
smooth: e.value.style.chart.tooltip.smooth,
|
|
929
945
|
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
930
946
|
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
931
947
|
smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
|
|
932
948
|
}, {
|
|
933
949
|
"tooltip-before": g(() => [
|
|
934
|
-
y(t.$slots, "tooltip-before", G(
|
|
950
|
+
y(t.$slots, "tooltip-before", W(G({ ...ye.value })), void 0, !0)
|
|
935
951
|
]),
|
|
936
952
|
"tooltip-after": g(() => [
|
|
937
|
-
y(t.$slots, "tooltip-after", G(
|
|
953
|
+
y(t.$slots, "tooltip-after", W(G({ ...ye.value })), void 0, !0)
|
|
938
954
|
]),
|
|
939
955
|
_: 3
|
|
940
956
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "fontSize", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
941
|
-
|
|
957
|
+
se.value && e.value.userOptions.buttons.table ? (n(), B(Ht(Y.value.component), xe({ key: 7 }, Y.value.props, {
|
|
942
958
|
ref_key: "tableUnit",
|
|
943
959
|
ref: H,
|
|
944
|
-
onClose:
|
|
945
|
-
}),
|
|
960
|
+
onClose: Ke
|
|
961
|
+
}), Ce({
|
|
946
962
|
content: g(() => [
|
|
947
|
-
(n(), B(h(
|
|
948
|
-
key: `table_${
|
|
949
|
-
colNames:
|
|
950
|
-
head:
|
|
951
|
-
body:
|
|
952
|
-
config:
|
|
963
|
+
(n(), B(h(vt), {
|
|
964
|
+
key: `table_${Pe.value}`,
|
|
965
|
+
colNames: te.value.colNames,
|
|
966
|
+
head: te.value.head,
|
|
967
|
+
body: te.value.body,
|
|
968
|
+
config: te.value.config,
|
|
953
969
|
title: e.value.table.useDialog ? "" : Y.value.title,
|
|
954
970
|
withCloseButton: !e.value.table.useDialog,
|
|
955
|
-
onClose:
|
|
971
|
+
onClose: Ke
|
|
956
972
|
}, {
|
|
957
973
|
th: g(({ th: a }) => [
|
|
958
974
|
k("div", {
|
|
959
975
|
innerHTML: a,
|
|
960
976
|
style: { display: "flex", "align-items": "center" }
|
|
961
|
-
}, null, 8,
|
|
977
|
+
}, null, 8, El)
|
|
962
978
|
]),
|
|
963
979
|
td: g(({ td: a }) => [
|
|
964
|
-
|
|
980
|
+
lt(ue(a.name || a), 1)
|
|
965
981
|
]),
|
|
966
982
|
_: 1
|
|
967
983
|
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
|
|
@@ -971,7 +987,7 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
971
987
|
e.value.table.useDialog ? {
|
|
972
988
|
name: "title",
|
|
973
989
|
fn: g(() => [
|
|
974
|
-
|
|
990
|
+
lt(ue(Y.value.title), 1)
|
|
975
991
|
]),
|
|
976
992
|
key: "0"
|
|
977
993
|
} : void 0,
|
|
@@ -981,9 +997,9 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
981
997
|
k("button", {
|
|
982
998
|
tabindex: "0",
|
|
983
999
|
class: "vue-ui-user-options-button",
|
|
984
|
-
onClick: l[1] || (l[1] = (a) =>
|
|
1000
|
+
onClick: l[1] || (l[1] = (a) => me(e.value.userOptions.callbacks.csv))
|
|
985
1001
|
}, [
|
|
986
|
-
|
|
1002
|
+
oe(h(it), {
|
|
987
1003
|
name: "excel",
|
|
988
1004
|
stroke: Y.value.props.color
|
|
989
1005
|
}, null, 8, ["stroke"])
|
|
@@ -992,10 +1008,10 @@ const wl = ["id"], kl = ["id"], Cl = ["xmlns", "viewBox"], xl = ["id"], $l = ["s
|
|
|
992
1008
|
key: "1"
|
|
993
1009
|
} : void 0
|
|
994
1010
|
]), 1040)) : m("", !0),
|
|
995
|
-
h(
|
|
996
|
-
], 46,
|
|
1011
|
+
h(Be) ? (n(), B(dl, { key: 8 })) : m("", !0)
|
|
1012
|
+
], 46, xl));
|
|
997
1013
|
}
|
|
998
|
-
},
|
|
1014
|
+
}, ua = /* @__PURE__ */ Cl(Wl, [["__scopeId", "data-v-02b3eb8e"]]);
|
|
999
1015
|
export {
|
|
1000
|
-
|
|
1016
|
+
ua as default
|
|
1001
1017
|
};
|