vue-data-ui 2.2.90 → 2.2.91
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/data-table-d-VcuH-r.js +1488 -0
- package/dist/{index.es-Cgqo-FBk.js → index.es-Dc9Fd4o6.js} +1 -1
- package/dist/legend-DJCYLsl_.js +61 -0
- package/dist/style.css +1 -1
- package/dist/themes-lgjsYHsH.js +4967 -0
- package/dist/title-BF-9Qcni.js +56 -0
- package/dist/tooltip-D85WEOKi.js +94 -0
- package/dist/user-options-DZgCz8UA.js +415 -0
- package/dist/vue-data-ui.js +455 -61
- package/dist/vue-ui-3d-bar-DW7kGJSz.js +20360 -0
- package/dist/vue-ui-age-pyramid-4hcuKpFY.js +781 -0
- package/dist/vue-ui-annotator-C83FVvl8.js +2175 -0
- package/dist/vue-ui-candlestick-diclGj95.js +807 -0
- package/dist/vue-ui-chestnut-ACetHLdG.js +1049 -0
- package/dist/vue-ui-cursor-Rx7UNaYT.js +229 -0
- package/dist/vue-ui-dashboard-B3PlN0ks.js +231 -0
- package/dist/vue-ui-digits-CxMXID42.js +154 -0
- package/dist/vue-ui-donut-DMiwVXNd.js +1534 -0
- package/dist/vue-ui-dumbbell-B_X1T8TR.js +621 -0
- package/dist/vue-ui-flow-B72wzQ6V.js +451 -0
- package/dist/vue-ui-galaxy-DXX5yivT.js +482 -0
- package/dist/vue-ui-gauge-Cs9PDurH.js +466 -0
- package/dist/vue-ui-heatmap-PcoNSLdN.js +581 -0
- package/dist/vue-ui-kpi-DchEmPtB.js +55 -0
- package/dist/vue-ui-mini-loader-DltJLkqy.js +131 -0
- package/dist/vue-ui-molecule-CWvukBzs.js +746 -0
- package/dist/vue-ui-mood-radar-DEfdtIi8.js +544 -0
- package/dist/vue-ui-nested-donuts-9URpqgXE.js +768 -0
- package/dist/vue-ui-onion-C0eowUT6.js +551 -0
- package/dist/vue-ui-parallel-coordinate-plot-Bc_pAaPJ.js +647 -0
- package/dist/vue-ui-quadrant-_ddVAm9V.js +1174 -0
- package/dist/vue-ui-quick-chart-Cio0hDYO.js +1310 -0
- package/dist/vue-ui-radar-Dyg38i33.js +853 -0
- package/dist/vue-ui-rating-CE1Lmwd2.js +271 -0
- package/dist/vue-ui-relation-circle-BMlB3k3d.js +303 -0
- package/dist/vue-ui-rings-BuXeijvb.js +507 -0
- package/dist/vue-ui-scatter-B1hZfOua.js +870 -0
- package/dist/vue-ui-screenshot-0QXgxzGs.js +160 -0
- package/dist/vue-ui-smiley-B7kR7exr.js +763 -0
- package/dist/vue-ui-spark-trend-BmL2KiYL.js +245 -0
- package/dist/vue-ui-sparkgauge-BMzFv14L.js +158 -0
- package/dist/vue-ui-sparkhistogram-DWpOXqHm.js +243 -0
- package/dist/vue-ui-sparkstackbar-DB9VQXlc.js +244 -0
- package/dist/vue-ui-strip-plot-DyN6P0JO.js +614 -0
- package/dist/vue-ui-table-DM3zL89q.js +2180 -0
- package/dist/vue-ui-table-heatmap-gWx0Nslu.js +237 -0
- package/dist/vue-ui-thermometer-Bcqv5kd_.js +384 -0
- package/dist/vue-ui-timer-BIFxjujK.js +451 -0
- package/dist/vue-ui-tiremarks-zBwHpED_.js +248 -0
- package/dist/vue-ui-treemap-BaplVc_z.js +719 -0
- package/dist/vue-ui-vertical-bar-CdK6ZJPM.js +734 -0
- package/dist/vue-ui-waffle-COOzH7M3.js +635 -0
- package/dist/vue-ui-wheel-BEpuVTBk.js +226 -0
- package/dist/vue-ui-word-cloud-DNqxAAiX.js +344 -0
- package/dist/vue-ui-xy-_mHq-czW.js +2058 -0
- package/dist/vue-ui-xy-canvas-DqX8Gee5.js +1003 -0
- package/package.json +1 -1
- package/dist/index-DZlxUin4.js +0 -57288
|
@@ -0,0 +1,781 @@
|
|
|
1
|
+
import { computed as N, ref as C, onMounted as ye, openBlock as f, createElementBlock as b, normalizeClass as oe, normalizeStyle as G, createVNode as Y, createCommentVNode as S, createBlock as J, unref as I, createSlots as fe, withCtx as A, renderSlot as O, normalizeProps as j, guardReactiveProps as H, createElementVNode as w, Fragment as B, renderList as R, toDisplayString as F, createTextVNode as ae, nextTick as ve } from "vue";
|
|
2
|
+
import { _ as ge, e as ce, i as pe, j as be, X as we, x as ie, o as q, D as me, y as xe, z as _e, v as ke, w as Ce } from "./data-table-d-VcuH-r.js";
|
|
3
|
+
import { t as Le } from "./themes-lgjsYHsH.js";
|
|
4
|
+
import { u as se, _ as Te } from "./title-BF-9Qcni.js";
|
|
5
|
+
import { U as Se } from "./user-options-DZgCz8UA.js";
|
|
6
|
+
import { _ as $e } from "./tooltip-D85WEOKi.js";
|
|
7
|
+
import { u as Ae, a as Ne, S as Ie, A as Oe } from "./vue-ui-3d-bar-DW7kGJSz.js";
|
|
8
|
+
function pt(t, i, r, h = {}) {
|
|
9
|
+
if (r <= 0) return;
|
|
10
|
+
t.save();
|
|
11
|
+
const {
|
|
12
|
+
color: v = "black",
|
|
13
|
+
lineWidth: y = 1,
|
|
14
|
+
lineCap: k = "round",
|
|
15
|
+
lineJoin: p = "round",
|
|
16
|
+
lineDash: x = null,
|
|
17
|
+
lineDashoffset: c = 0,
|
|
18
|
+
shadowColor: a = null,
|
|
19
|
+
shadowBlur: g = 0,
|
|
20
|
+
shadowOffsetX: L = 0,
|
|
21
|
+
shadowOffsetY: e = 0,
|
|
22
|
+
fillStyle: $ = "#FFFFFF"
|
|
23
|
+
} = h;
|
|
24
|
+
t.beginPath(), t.arc(i.x, i.y, r, 0, 2 * Math.PI), t.strokeStyle = v, t.lineWidth = y, t.lineCap = k, t.lineJoin = p, x && (t.setLineDash(x), t.lineDashoffset = c), a && (t.shadowColor = a, t.shadowOffsetX = L, t.shadowOffsetY = e), g && (t.shadowBlur = g), $ && (t.fillStyle = $), t.fillStyle && t.fill(), t.stroke(), t.restore();
|
|
25
|
+
}
|
|
26
|
+
function bt(t, i, r = {}) {
|
|
27
|
+
if (!i.length) return;
|
|
28
|
+
t.save();
|
|
29
|
+
const {
|
|
30
|
+
color: h = "black",
|
|
31
|
+
lineWidth: v = 1,
|
|
32
|
+
lineCap: y = "round",
|
|
33
|
+
lineJoin: k = "round",
|
|
34
|
+
lineDash: p = null,
|
|
35
|
+
lineDashoffset: x = 0,
|
|
36
|
+
shadowColor: c = null,
|
|
37
|
+
shadowBlur: a = 0,
|
|
38
|
+
shadowOffsetX: g = 0,
|
|
39
|
+
shadowOffsetY: L = 0
|
|
40
|
+
} = r;
|
|
41
|
+
t.beginPath(), t.moveTo(i[0].x, i[0].y);
|
|
42
|
+
for (let e = 1; e < i.length; e += 1)
|
|
43
|
+
t.lineTo(i[e].x, i[e].y);
|
|
44
|
+
t.strokeStyle = h, t.lineWidth = v, t.lineCap = y, t.lineJoin = k, p && (t.setLineDash(p), t.lineDashoffset = x), c && (t.shadowColor = c, t.shadowOffsetX = g, t.shadowOffsetY = L), a && (t.shadowBlur = a), t.stroke(), t.restore();
|
|
45
|
+
}
|
|
46
|
+
function wt(t, i, r = {}) {
|
|
47
|
+
if (!i.length) return;
|
|
48
|
+
t.save();
|
|
49
|
+
const {
|
|
50
|
+
strokeColor: h = "black",
|
|
51
|
+
lineWidth: v = 1,
|
|
52
|
+
lineCap: y = "round",
|
|
53
|
+
lineJoin: k = "round",
|
|
54
|
+
lineDash: p = null,
|
|
55
|
+
lineDashoffset: x = 0,
|
|
56
|
+
fillColor: c = null,
|
|
57
|
+
gradient: a = null,
|
|
58
|
+
shadowColor: g = null,
|
|
59
|
+
shadowBlur: L = 0,
|
|
60
|
+
shadowOffsetX: e = 0,
|
|
61
|
+
shadowOffsetY: $ = 0
|
|
62
|
+
} = r;
|
|
63
|
+
t.beginPath(), t.moveTo(i[0].x, i[0].y);
|
|
64
|
+
for (let d = 1; d < i.length; d += 1)
|
|
65
|
+
t.lineTo(i[d].x, i[d].y);
|
|
66
|
+
if (t.closePath(), t.strokeStyle = h, t.lineWidth = v, t.lineCap = y, t.lineJoin = k, p && (t.setLineDash(p), t.lineDashoffset = x), g && (t.shadowColor = g, t.shadowBlur = L, t.shadowOffsetX = e, t.shadowOffsetY = $), a) {
|
|
67
|
+
let d;
|
|
68
|
+
a.type === "linear" ? d = t.createLinearGradient(
|
|
69
|
+
_(a.start.x, Number.MIN_VALUE),
|
|
70
|
+
_(a.start.y, Number.MIN_VALUE),
|
|
71
|
+
_(a.end.x, Number.MIN_VALUE * 2),
|
|
72
|
+
_(a.end.y, Number.MIN_VALUE * 2)
|
|
73
|
+
) : a.type === "radial" && (d = t.createRadialGradient(
|
|
74
|
+
_(a.start.x, Number.MIN_VALUE),
|
|
75
|
+
_(a.start.y, Number.MIN_VALUE),
|
|
76
|
+
a.start.r || 0,
|
|
77
|
+
_(a.end.x, Number.MIN_VALUE * 2),
|
|
78
|
+
_(a.end.y, Number.MIN_VALUE * 2),
|
|
79
|
+
a.end.r || 0
|
|
80
|
+
)), d && a.stops && (a.stops.forEach((z) => {
|
|
81
|
+
d.addColorStop(z.offset, z.color);
|
|
82
|
+
}), t.fillStyle = d);
|
|
83
|
+
} else c && (t.fillStyle = c);
|
|
84
|
+
t.fillStyle && t.fill(), h && t.stroke(), t.restore();
|
|
85
|
+
}
|
|
86
|
+
function mt(t, i, r = {}) {
|
|
87
|
+
if (!i.length) return;
|
|
88
|
+
t.save();
|
|
89
|
+
const {
|
|
90
|
+
strokeColor: h = "black",
|
|
91
|
+
lineWidth: v = 1,
|
|
92
|
+
lineCap: y = "round",
|
|
93
|
+
lineJoin: k = "round",
|
|
94
|
+
lineDash: p = null,
|
|
95
|
+
lineDashoffset: x = 0,
|
|
96
|
+
fillColor: c = null,
|
|
97
|
+
gradient: a = null,
|
|
98
|
+
shadowColor: g = null,
|
|
99
|
+
shadowBlur: L = 0,
|
|
100
|
+
shadowOffsetX: e = 0,
|
|
101
|
+
shadowOffsetY: $ = 0
|
|
102
|
+
} = r;
|
|
103
|
+
t.beginPath(), t.moveTo(i[0].x, i[0].y);
|
|
104
|
+
for (let d = 1; d < i.length; d += 1)
|
|
105
|
+
t.lineTo(i[d].x, i[d].y);
|
|
106
|
+
if (t.closePath(), t.strokeStyle = h, t.lineWidth = v, t.lineCap = y, t.lineJoin = k, p && (t.setLineDash(p), t.lineDashoffset = x), g && (t.shadowColor = g, t.shadowBlur = L, t.shadowOffsetX = e, t.shadowOffsetY = $), a) {
|
|
107
|
+
let d;
|
|
108
|
+
a.type === "linear" ? d = t.createLinearGradient(
|
|
109
|
+
_(a.start.x, Number.MIN_VALUE),
|
|
110
|
+
_(a.start.y, Number.MIN_VALUE),
|
|
111
|
+
_(a.end.x, Number.MIN_VALUE * 2),
|
|
112
|
+
_(a.end.y, Number.MIN_VALUE * 2)
|
|
113
|
+
) : a.type === "radial" && (d = t.createRadialGradient(
|
|
114
|
+
_(a.start.x, Number.MIN_VALUE),
|
|
115
|
+
_(a.start.y, Number.MIN_VALUE),
|
|
116
|
+
a.start.r || 0,
|
|
117
|
+
_(a.end.x, Number.MIN_VALUE * 2),
|
|
118
|
+
_(a.end.y, Number.MIN_VALUE * 2),
|
|
119
|
+
a.end.r || 0
|
|
120
|
+
)), d && a.stops && (a.stops.forEach((z) => {
|
|
121
|
+
d.addColorStop(z.offset, z.color);
|
|
122
|
+
}), t.fillStyle = d);
|
|
123
|
+
} else c && (t.fillStyle = c);
|
|
124
|
+
t.fillStyle && t.fill(), h && t.stroke(), t.restore();
|
|
125
|
+
}
|
|
126
|
+
function xt(t, i, r, h, v = {}) {
|
|
127
|
+
t.save();
|
|
128
|
+
const {
|
|
129
|
+
font: y = "16px sans-serif",
|
|
130
|
+
color: k = "black",
|
|
131
|
+
align: p = "start",
|
|
132
|
+
baseline: x = "alphabetic",
|
|
133
|
+
maxWidth: c = void 0,
|
|
134
|
+
rotation: a = 0,
|
|
135
|
+
shadowColor: g = null,
|
|
136
|
+
shadowBlur: L = 0,
|
|
137
|
+
shadowOffsetX: e = 0,
|
|
138
|
+
shadowOffsetY: $ = 0,
|
|
139
|
+
strokeColor: d = null,
|
|
140
|
+
lineWidth: z = 1
|
|
141
|
+
} = v;
|
|
142
|
+
t.font = y, t.fillStyle = k, t.textAlign = p, t.textBaseline = x, g && (t.shadowColor = g, t.shadowBlur = L, t.shadowOffsetX = e, t.shadowOffsetY = $), d && (t.strokeStyle = d, t.lineWidth = z), a !== 0 && (t.translate(r, h), t.rotate(Math.PI / 180 * a), t.translate(-r, -h)), t.fillText(i, r, h, c), d && t.strokeText(i, r, h, c), t.restore();
|
|
143
|
+
}
|
|
144
|
+
function ze(t, i = 20) {
|
|
145
|
+
let r;
|
|
146
|
+
return function(...h) {
|
|
147
|
+
const v = this;
|
|
148
|
+
r || (t.apply(v, h), r = !0, setTimeout(() => r = !1, i));
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function _t(t, i, r = !1) {
|
|
152
|
+
let h;
|
|
153
|
+
return function(...v) {
|
|
154
|
+
const y = this, k = function() {
|
|
155
|
+
h = null, r || t.apply(y, v);
|
|
156
|
+
}, p = r && !h;
|
|
157
|
+
clearTimeout(h), h = setTimeout(k, i), p && t.apply(y, v);
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function kt(t) {
|
|
161
|
+
const i = document.createElement("canvas");
|
|
162
|
+
return i.width = t.width || 1, i.height = t.height || 1, t.width || (t.width = 1), t.height || (t.height = 1), i.getContext("2d").drawImage(t, 0, 0), i;
|
|
163
|
+
}
|
|
164
|
+
function _(t, i) {
|
|
165
|
+
return [null, void 0, NaN, 1 / 0, -1 / 0].includes(t) ? i : t;
|
|
166
|
+
}
|
|
167
|
+
function Me({
|
|
168
|
+
chart: t,
|
|
169
|
+
title: i = null,
|
|
170
|
+
slicer: r = null,
|
|
171
|
+
legend: h = null
|
|
172
|
+
}) {
|
|
173
|
+
let v = 0, y = 0;
|
|
174
|
+
if (t) {
|
|
175
|
+
const k = t.parentNode, { height: p, width: x } = k.getBoundingClientRect();
|
|
176
|
+
let c = 0, a = 0, g = 0;
|
|
177
|
+
i && (c = i.getBoundingClientRect().height), r && (a = r.getBoundingClientRect().height), h && (g = h.getBoundingClientRect().height), v = p - c - a - g, y = x;
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
width: y,
|
|
181
|
+
height: v
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
const Fe = ["id"], Pe = ["xmlns", "viewBox"], Ee = ["id"], De = ["stop-color"], Be = ["stop-color"], Ue = ["id"], Ve = ["stop-color"], Re = ["stop-color"], We = ["x", "y", "width", "height", "fill", "rx"], Xe = ["x", "y", "width", "height", "fill", "rx"], Ge = ["x", "y", "width", "height", "fill", "rx"], Ye = ["x", "y", "width", "height", "fill", "rx"], Je = { key: 0 }, je = ["x", "y", "fill", "font-size", "font-weight"], He = ["x", "y", "fill", "font-size", "font-weight"], qe = { key: 1 }, Ke = ["x", "y", "font-size", "fill", "font-weight"], Qe = { key: 2 }, Ze = { key: 0 }, et = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], lt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ot = ["x", "y", "font-size", "fill", "font-weight"], at = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], it = ["x", "y", "font-size", "fill", "font-weight"], st = ["x", "y", "font-size", "fill", "font-weight"], ut = ["x", "y", "width", "height", "fill", "onMouseover"], rt = {
|
|
185
|
+
__name: "vue-ui-age-pyramid",
|
|
186
|
+
props: {
|
|
187
|
+
config: {
|
|
188
|
+
type: Object,
|
|
189
|
+
default() {
|
|
190
|
+
return {};
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
dataset: {
|
|
194
|
+
type: Array,
|
|
195
|
+
default() {
|
|
196
|
+
return [];
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
setup(t, { expose: i }) {
|
|
201
|
+
const r = t, { vue_ui_age_pyramid: h } = Ae(), v = N(() => !!r.dataset && r.dataset.length), y = C(ce()), k = C(null), p = C(!1), x = C(""), c = C(null), a = C(0), g = C(null), L = C(null), e = N(() => {
|
|
202
|
+
const l = se({
|
|
203
|
+
userConfig: r.config,
|
|
204
|
+
defaultConfig: h
|
|
205
|
+
});
|
|
206
|
+
return l.theme ? {
|
|
207
|
+
...se({
|
|
208
|
+
userConfig: Le.vue_ui_age_pyramid[l.theme] || r.config,
|
|
209
|
+
defaultConfig: l
|
|
210
|
+
})
|
|
211
|
+
} : l;
|
|
212
|
+
}), $ = C(null);
|
|
213
|
+
ye(() => {
|
|
214
|
+
if (pe(r.dataset) && be({
|
|
215
|
+
componentName: "VueUiAgePyramid",
|
|
216
|
+
type: "dataset"
|
|
217
|
+
}), e.value.responsive) {
|
|
218
|
+
const l = ze(() => {
|
|
219
|
+
const { width: n, height: o } = Me({
|
|
220
|
+
chart: g.value,
|
|
221
|
+
title: e.value.style.title.text ? L.value : null
|
|
222
|
+
});
|
|
223
|
+
T.value.width = n, T.value.height = o;
|
|
224
|
+
});
|
|
225
|
+
$.value = new ResizeObserver(l), $.value.observe(g.value.parentNode);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
const { isPrinting: d, isImaging: z, generatePdf: K, generateImage: Q } = Ne({
|
|
229
|
+
elementId: `vue-ui-age-pyramid_${y.value}`,
|
|
230
|
+
fileName: e.value.style.title.text || "vue-ui-age-pyramid"
|
|
231
|
+
}), M = C({
|
|
232
|
+
showTable: e.value.table.show,
|
|
233
|
+
showTooltip: e.value.style.tooltip.show
|
|
234
|
+
}), T = C({
|
|
235
|
+
height: e.value.style.height,
|
|
236
|
+
width: e.value.style.width
|
|
237
|
+
}), u = N(() => {
|
|
238
|
+
const l = T.value.width - e.value.style.layout.padding.right - e.value.style.layout.padding.left, n = e.value.style.layout.padding.left, o = T.value.width - e.value.style.layout.padding.right;
|
|
239
|
+
return {
|
|
240
|
+
top: e.value.style.layout.padding.top,
|
|
241
|
+
left: n,
|
|
242
|
+
right: o,
|
|
243
|
+
bottom: T.value.height - e.value.style.layout.padding.bottom,
|
|
244
|
+
width: l,
|
|
245
|
+
height: T.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom,
|
|
246
|
+
centerX: e.value.style.layout.padding.left + l / 2,
|
|
247
|
+
leftChart: {
|
|
248
|
+
width: l / 2 - e.value.style.layout.centerSlit.width,
|
|
249
|
+
right: n + l / 2 - e.value.style.layout.centerSlit.width
|
|
250
|
+
},
|
|
251
|
+
rightChart: {
|
|
252
|
+
width: l / 2 - e.value.style.layout.centerSlit.width,
|
|
253
|
+
left: n + l / 2 + e.value.style.layout.centerSlit.width
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
}), ue = N(() => r.dataset.map((l) => e.value.style.layout.dataLabels.yAxis.display === "age" ? l[1] : l[0])), P = N(() => {
|
|
257
|
+
const l = re(U.value / 5), n = [], o = [];
|
|
258
|
+
for (let s = 0; s <= 5; s += 1) {
|
|
259
|
+
const m = l * s, le = l * (s - 5);
|
|
260
|
+
n.push({
|
|
261
|
+
value: m,
|
|
262
|
+
x: u.value.left + u.value.width / 2 + e.value.style.layout.centerSlit.width + m / U.value * u.value.leftChart.width
|
|
263
|
+
}), o.push({
|
|
264
|
+
value: Math.abs(le),
|
|
265
|
+
x: u.value.left + u.value.width / 2 + le / U.value * u.value.leftChart.width - e.value.style.layout.centerSlit.width
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
return {
|
|
269
|
+
right: n,
|
|
270
|
+
left: o
|
|
271
|
+
};
|
|
272
|
+
});
|
|
273
|
+
function re(l) {
|
|
274
|
+
if (l === 0) return 0;
|
|
275
|
+
const o = 10 ** Math.floor(Math.log10(Math.abs(l)));
|
|
276
|
+
let s;
|
|
277
|
+
return l < 0, s = Math.round(l / o) * o, s;
|
|
278
|
+
}
|
|
279
|
+
const U = N(() => Math.max(...r.dataset.flatMap((l) => l.slice(-2)))), E = N(() => r.dataset.length), ne = N(() => r.dataset.map((l) => ({
|
|
280
|
+
segment: l[0],
|
|
281
|
+
age: l[1],
|
|
282
|
+
left: {
|
|
283
|
+
value: l[2],
|
|
284
|
+
proportionToMax: l[2] / U.value
|
|
285
|
+
},
|
|
286
|
+
right: {
|
|
287
|
+
value: l[3],
|
|
288
|
+
proportionToMax: l[3] / U.value
|
|
289
|
+
}
|
|
290
|
+
}))), D = N(() => ne.value.map((l, n) => {
|
|
291
|
+
const o = u.value.top + u.value.height / E.value * n, s = u.value.height / E.value - e.value.style.layout.bars.gap;
|
|
292
|
+
return {
|
|
293
|
+
segment: l.segment,
|
|
294
|
+
age: l.age,
|
|
295
|
+
left: {
|
|
296
|
+
...l.left,
|
|
297
|
+
y: o,
|
|
298
|
+
color: e.value.style.layout.bars.left.color,
|
|
299
|
+
x: u.value.leftChart.right - l.left.proportionToMax * u.value.leftChart.width,
|
|
300
|
+
width: l.left.proportionToMax * u.value.leftChart.width,
|
|
301
|
+
height: s
|
|
302
|
+
},
|
|
303
|
+
right: {
|
|
304
|
+
...l.right,
|
|
305
|
+
y: o,
|
|
306
|
+
color: e.value.style.layout.bars.right.color,
|
|
307
|
+
x: u.value.rightChart.left,
|
|
308
|
+
width: l.right.proportionToMax * u.value.rightChart.width,
|
|
309
|
+
height: s
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
})), X = C(null);
|
|
313
|
+
function de(l, n) {
|
|
314
|
+
c.value = l, X.value = {
|
|
315
|
+
datapoint: n,
|
|
316
|
+
seriesIndex: l,
|
|
317
|
+
series: D.value,
|
|
318
|
+
config: e.value
|
|
319
|
+
};
|
|
320
|
+
const o = e.value.style.tooltip.customFormat;
|
|
321
|
+
if (xe(o) && _e(() => o({
|
|
322
|
+
seriesIndex: l,
|
|
323
|
+
datapoint: {
|
|
324
|
+
segment: n[0],
|
|
325
|
+
index: n[1],
|
|
326
|
+
left: n[2],
|
|
327
|
+
right: n[3]
|
|
328
|
+
},
|
|
329
|
+
series: D.value,
|
|
330
|
+
config: e.value
|
|
331
|
+
})))
|
|
332
|
+
x.value = o({
|
|
333
|
+
seriesIndex: l,
|
|
334
|
+
datapoint: {
|
|
335
|
+
segment: n[0],
|
|
336
|
+
index: n[1],
|
|
337
|
+
left: n[2],
|
|
338
|
+
right: n[3]
|
|
339
|
+
},
|
|
340
|
+
series: D.value,
|
|
341
|
+
config: e.value
|
|
342
|
+
});
|
|
343
|
+
else {
|
|
344
|
+
let s = "";
|
|
345
|
+
const m = D.value[l];
|
|
346
|
+
s += `<div><b>${m.segment}</b></div>`, s += `<div>${e.value.translations.age}: ${m.age}</div>`, s += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}">`, s += '<div style="display:flex; flex-direction:row;gap:12px">', s += `<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${e.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${e.value.style.layout.bars.gradient.show ? `url(#age_pyramid_left_${y.value})` : e.value.style.layout.bars.left.color}"/></svg><div>${e.value.translations.female}</div><div><b>${m.left.value.toLocaleString()}</b></div></div>`, s += `<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${e.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${e.value.style.layout.bars.gradient.show ? `url(#age_pyramid_right_${y.value})` : e.value.style.layout.bars.right.color}"/></svg><div>${e.value.translations.male}</div><div><b>${m.right.value.toLocaleString()}</b></div></div>`, s += "</div>", s += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}"><div>${e.value.translations.total}</div><div><b>${(m.left.value + m.right.value).toLocaleString()}</b></div></div>`, s += "</div>", x.value = `<div>${s}</div>`;
|
|
347
|
+
}
|
|
348
|
+
p.value = !0;
|
|
349
|
+
}
|
|
350
|
+
function Z() {
|
|
351
|
+
ve(() => {
|
|
352
|
+
const l = [e.value.translations.year, e.value.translations.age, e.value.translations.female, e.value.translations.male, e.value.translations.total], n = r.dataset.map((m) => [
|
|
353
|
+
m[0],
|
|
354
|
+
m[1],
|
|
355
|
+
m[2],
|
|
356
|
+
m[3],
|
|
357
|
+
m[2] + m[3]
|
|
358
|
+
]), o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([l]).concat(n), s = ke(o);
|
|
359
|
+
Ce({ csvContent: s, title: e.value.style.title.text || "vue-ui-heatmap" });
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
const W = N(() => {
|
|
363
|
+
const l = [
|
|
364
|
+
e.value.translations.year,
|
|
365
|
+
e.value.translations.age,
|
|
366
|
+
e.value.translations.female,
|
|
367
|
+
e.value.translations.male,
|
|
368
|
+
e.value.translations.total
|
|
369
|
+
], n = r.dataset.map((s) => [
|
|
370
|
+
s[0],
|
|
371
|
+
s[1],
|
|
372
|
+
s[2].toLocaleString(),
|
|
373
|
+
s[3].toLocaleString(),
|
|
374
|
+
(s[2] + s[3]).toLocaleString()
|
|
375
|
+
]), o = {
|
|
376
|
+
th: {
|
|
377
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
378
|
+
color: e.value.table.th.color,
|
|
379
|
+
outline: e.value.table.th.outline
|
|
380
|
+
},
|
|
381
|
+
td: {
|
|
382
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
383
|
+
color: e.value.table.td.color,
|
|
384
|
+
outline: e.value.table.td.outline
|
|
385
|
+
},
|
|
386
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
387
|
+
};
|
|
388
|
+
return { head: l, body: n, config: o, colNames: l };
|
|
389
|
+
}), V = C(!1);
|
|
390
|
+
function he(l) {
|
|
391
|
+
V.value = l, a.value += 1;
|
|
392
|
+
}
|
|
393
|
+
function ee() {
|
|
394
|
+
M.value.showTable = !M.value.showTable;
|
|
395
|
+
}
|
|
396
|
+
function te() {
|
|
397
|
+
M.value.showTooltip = !M.value.showTooltip;
|
|
398
|
+
}
|
|
399
|
+
return i({
|
|
400
|
+
generatePdf: K,
|
|
401
|
+
generateCsv: Z,
|
|
402
|
+
generateImage: Q,
|
|
403
|
+
toggleTable: ee,
|
|
404
|
+
toggleTooltip: te
|
|
405
|
+
}), (l, n) => (f(), b("div", {
|
|
406
|
+
class: oe(`vue-ui-age-pyramid ${V.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
407
|
+
ref_key: "agePyramid",
|
|
408
|
+
ref: g,
|
|
409
|
+
id: `vue-ui-age-pyramid_${y.value}`,
|
|
410
|
+
style: G(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.title.text ? "" : "padding-top:36px"};background:${e.value.style.backgroundColor};${e.value.responsive ? "height:100%" : ""}`)
|
|
411
|
+
}, [
|
|
412
|
+
e.value.style.title.text ? (f(), b("div", {
|
|
413
|
+
key: 0,
|
|
414
|
+
ref_key: "chartTitle",
|
|
415
|
+
ref: L,
|
|
416
|
+
style: G(`width:100%;background:${e.value.style.backgroundColor}`)
|
|
417
|
+
}, [
|
|
418
|
+
Y(Te, {
|
|
419
|
+
config: {
|
|
420
|
+
title: {
|
|
421
|
+
cy: "pyramid-div-title",
|
|
422
|
+
...e.value.style.title
|
|
423
|
+
},
|
|
424
|
+
subtitle: {
|
|
425
|
+
cy: "pyramid-div-subtitle",
|
|
426
|
+
...e.value.style.title.subtitle
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}, null, 8, ["config"])
|
|
430
|
+
], 4)) : S("", !0),
|
|
431
|
+
e.value.userOptions.show && v.value ? (f(), J(Se, {
|
|
432
|
+
ref_key: "details",
|
|
433
|
+
ref: k,
|
|
434
|
+
key: `user_options_${a.value}`,
|
|
435
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
436
|
+
color: e.value.style.color,
|
|
437
|
+
isImaging: I(z),
|
|
438
|
+
isPrinting: I(d),
|
|
439
|
+
uid: y.value,
|
|
440
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
|
|
441
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
442
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
443
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
444
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
445
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
446
|
+
isFullscreen: V.value,
|
|
447
|
+
isTooltip: M.value.showTooltip,
|
|
448
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
449
|
+
chartElement: g.value,
|
|
450
|
+
onToggleFullscreen: he,
|
|
451
|
+
onGeneratePdf: I(K),
|
|
452
|
+
onGenerateCsv: Z,
|
|
453
|
+
onGenerateImage: I(Q),
|
|
454
|
+
onToggleTable: ee,
|
|
455
|
+
onToggleTooltip: te
|
|
456
|
+
}, fe({ _: 2 }, [
|
|
457
|
+
l.$slots.optionTooltip ? {
|
|
458
|
+
name: "optionTooltip",
|
|
459
|
+
fn: A(() => [
|
|
460
|
+
O(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
461
|
+
]),
|
|
462
|
+
key: "0"
|
|
463
|
+
} : void 0,
|
|
464
|
+
l.$slots.optionPdf ? {
|
|
465
|
+
name: "optionPdf",
|
|
466
|
+
fn: A(() => [
|
|
467
|
+
O(l.$slots, "optionPdf", {}, void 0, !0)
|
|
468
|
+
]),
|
|
469
|
+
key: "1"
|
|
470
|
+
} : void 0,
|
|
471
|
+
l.$slots.optionCsv ? {
|
|
472
|
+
name: "optionCsv",
|
|
473
|
+
fn: A(() => [
|
|
474
|
+
O(l.$slots, "optionCsv", {}, void 0, !0)
|
|
475
|
+
]),
|
|
476
|
+
key: "2"
|
|
477
|
+
} : void 0,
|
|
478
|
+
l.$slots.optionImg ? {
|
|
479
|
+
name: "optionImg",
|
|
480
|
+
fn: A(() => [
|
|
481
|
+
O(l.$slots, "optionImg", {}, void 0, !0)
|
|
482
|
+
]),
|
|
483
|
+
key: "3"
|
|
484
|
+
} : void 0,
|
|
485
|
+
l.$slots.optionTable ? {
|
|
486
|
+
name: "optionTable",
|
|
487
|
+
fn: A(() => [
|
|
488
|
+
O(l.$slots, "optionTable", {}, void 0, !0)
|
|
489
|
+
]),
|
|
490
|
+
key: "4"
|
|
491
|
+
} : void 0,
|
|
492
|
+
l.$slots.optionFullscreen ? {
|
|
493
|
+
name: "optionFullscreen",
|
|
494
|
+
fn: A(({ toggleFullscreen: o, isFullscreen: s }) => [
|
|
495
|
+
O(l.$slots, "optionFullscreen", j(H({ toggleFullscreen: o, isFullscreen: s })), void 0, !0)
|
|
496
|
+
]),
|
|
497
|
+
key: "5"
|
|
498
|
+
} : void 0
|
|
499
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : S("", !0),
|
|
500
|
+
v.value ? (f(), b("svg", {
|
|
501
|
+
key: 2,
|
|
502
|
+
xmlns: I(we),
|
|
503
|
+
class: oe({ "vue-data-ui-fullscreen--on": V.value, "vue-data-ui-fulscreen--off": !V.value }),
|
|
504
|
+
viewBox: `0 0 ${T.value.width <= 0 ? 10 : T.value.width} ${T.value.height <= 0 ? 10 : T.value.height}`,
|
|
505
|
+
style: G(`max-width:100%;overflow:visible;background:${e.value.style.backgroundColor};color:${e.value.style.color}`)
|
|
506
|
+
}, [
|
|
507
|
+
w("defs", null, [
|
|
508
|
+
w("linearGradient", {
|
|
509
|
+
id: `age_pyramid_left_${y.value}`,
|
|
510
|
+
x1: "0%",
|
|
511
|
+
y1: "0%",
|
|
512
|
+
x2: "100%",
|
|
513
|
+
y2: "0%"
|
|
514
|
+
}, [
|
|
515
|
+
w("stop", {
|
|
516
|
+
offset: "0%",
|
|
517
|
+
"stop-color": e.value.style.layout.bars.left.color
|
|
518
|
+
}, null, 8, De),
|
|
519
|
+
w("stop", {
|
|
520
|
+
offset: "100%",
|
|
521
|
+
"stop-color": `${I(ie)(e.value.style.layout.bars.left.color, e.value.style.layout.bars.gradient.shiftHue)}${I(q)[100 - e.value.style.layout.bars.gradient.intensity]}`
|
|
522
|
+
}, null, 8, Be)
|
|
523
|
+
], 8, Ee),
|
|
524
|
+
w("linearGradient", {
|
|
525
|
+
id: `age_pyramid_right_${y.value}`,
|
|
526
|
+
x1: "0%",
|
|
527
|
+
y1: "0%",
|
|
528
|
+
x2: "100%",
|
|
529
|
+
y2: "0%"
|
|
530
|
+
}, [
|
|
531
|
+
w("stop", {
|
|
532
|
+
offset: "0%",
|
|
533
|
+
"stop-color": `${I(ie)(e.value.style.layout.bars.right.color, e.value.style.layout.bars.gradient.shiftHue)}${I(q)[100 - e.value.style.layout.bars.gradient.intensity]}`
|
|
534
|
+
}, null, 8, Ve),
|
|
535
|
+
w("stop", {
|
|
536
|
+
offset: "100%",
|
|
537
|
+
"stop-color": e.value.style.layout.bars.right.color
|
|
538
|
+
}, null, 8, Re)
|
|
539
|
+
], 8, Ue)
|
|
540
|
+
]),
|
|
541
|
+
(f(!0), b(B, null, R(D.value, (o, s) => (f(), b("g", null, [
|
|
542
|
+
w("rect", {
|
|
543
|
+
x: o.left.x,
|
|
544
|
+
y: o.left.y,
|
|
545
|
+
width: o.left.width <= 0 ? 1e-4 : o.left.width,
|
|
546
|
+
height: o.left.height <= 0 ? 1e-4 : o.left.height,
|
|
547
|
+
fill: e.value.style.layout.bars.gradient.underlayer,
|
|
548
|
+
rx: e.value.style.layout.bars.borderRadius
|
|
549
|
+
}, null, 8, We),
|
|
550
|
+
w("rect", {
|
|
551
|
+
x: o.left.x,
|
|
552
|
+
y: o.left.y,
|
|
553
|
+
width: o.left.width <= 0 ? 1e-4 : o.left.width,
|
|
554
|
+
height: o.left.height <= 0 ? 1e-4 : o.left.height,
|
|
555
|
+
fill: e.value.style.layout.bars.gradient.show ? `url(#age_pyramid_left_${y.value})` : o.left.color,
|
|
556
|
+
rx: e.value.style.layout.bars.borderRadius
|
|
557
|
+
}, null, 8, Xe),
|
|
558
|
+
w("rect", {
|
|
559
|
+
x: o.right.x,
|
|
560
|
+
y: o.right.y,
|
|
561
|
+
width: o.right.width <= 0 ? 1e-4 : o.right.width,
|
|
562
|
+
height: o.right.height <= 0 ? 1e-4 : o.right.height,
|
|
563
|
+
fill: e.value.style.layout.bars.gradient.underlayer,
|
|
564
|
+
rx: e.value.style.layout.bars.borderRadius
|
|
565
|
+
}, null, 8, Ge),
|
|
566
|
+
w("rect", {
|
|
567
|
+
x: o.right.x,
|
|
568
|
+
y: o.right.y,
|
|
569
|
+
width: o.right.width <= 0 ? 1e-4 : o.right.width,
|
|
570
|
+
height: o.right.height <= 0 ? 1e-4 : o.right.height,
|
|
571
|
+
fill: e.value.style.layout.bars.gradient.show ? `url(#age_pyramid_right_${y.value})` : o.right.color,
|
|
572
|
+
rx: e.value.style.layout.bars.borderRadius
|
|
573
|
+
}, null, 8, Ye)
|
|
574
|
+
]))), 256)),
|
|
575
|
+
w("g", null, [
|
|
576
|
+
e.value.style.layout.dataLabels.sideTitles.show ? (f(), b("g", Je, [
|
|
577
|
+
w("text", {
|
|
578
|
+
x: u.value.left,
|
|
579
|
+
y: u.value.top + e.value.style.layout.dataLabels.sideTitles.offsetY,
|
|
580
|
+
fill: e.value.style.layout.dataLabels.sideTitles.useSideColor ? e.value.style.layout.bars.left.color : e.value.style.layout.dataLabels.sideTitles.color,
|
|
581
|
+
"font-size": e.value.style.layout.dataLabels.sideTitles.fontSize,
|
|
582
|
+
"text-anchor": "start",
|
|
583
|
+
"font-weight": e.value.style.layout.dataLabels.sideTitles.bold ? "bold" : "normal"
|
|
584
|
+
}, F(e.value.translations.female), 9, je),
|
|
585
|
+
w("text", {
|
|
586
|
+
x: u.value.right,
|
|
587
|
+
y: u.value.top + e.value.style.layout.dataLabels.sideTitles.offsetY,
|
|
588
|
+
fill: e.value.style.layout.dataLabels.sideTitles.useSideColor ? e.value.style.layout.bars.right.color : e.value.style.layout.dataLabels.sideTitles.color,
|
|
589
|
+
"font-size": e.value.style.layout.dataLabels.sideTitles.fontSize,
|
|
590
|
+
"text-anchor": "end",
|
|
591
|
+
"font-weight": e.value.style.layout.dataLabels.sideTitles.bold ? "bold" : "normal"
|
|
592
|
+
}, F(e.value.translations.male), 9, He)
|
|
593
|
+
])) : S("", !0),
|
|
594
|
+
e.value.style.layout.dataLabels.yAxis.show ? (f(), b("g", qe, [
|
|
595
|
+
(f(!0), b(B, null, R(ue.value, (o, s) => (f(), b(B, null, [
|
|
596
|
+
s % e.value.style.layout.dataLabels.yAxis.showEvery === 0 ? (f(), b("text", {
|
|
597
|
+
key: 0,
|
|
598
|
+
x: u.value.centerX,
|
|
599
|
+
y: u.value.top + u.value.height / E.value * s + e.value.style.layout.dataLabels.yAxis.fontSize / 3,
|
|
600
|
+
"text-anchor": "middle",
|
|
601
|
+
"font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
602
|
+
fill: e.value.style.layout.dataLabels.yAxis.color,
|
|
603
|
+
"font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal"
|
|
604
|
+
}, F(o), 9, Ke)) : S("", !0)
|
|
605
|
+
], 64))), 256))
|
|
606
|
+
])) : S("", !0),
|
|
607
|
+
e.value.style.layout.dataLabels.xAxis.show ? (f(), b("g", Qe, [
|
|
608
|
+
e.value.style.layout.grid.show ? (f(), b("g", Ze, [
|
|
609
|
+
w("line", {
|
|
610
|
+
x1: P.value.right[0].x,
|
|
611
|
+
x2: P.value.right.at(-1).x,
|
|
612
|
+
y1: u.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
|
|
613
|
+
y2: u.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
|
|
614
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
615
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
616
|
+
"stroke-linecap": "round"
|
|
617
|
+
}, null, 8, et),
|
|
618
|
+
w("line", {
|
|
619
|
+
x1: P.value.left[0].x,
|
|
620
|
+
x2: P.value.left.at(-1).x,
|
|
621
|
+
y1: u.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
|
|
622
|
+
y2: u.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
|
|
623
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
624
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
625
|
+
"stroke-linecap": "round"
|
|
626
|
+
}, null, 8, tt)
|
|
627
|
+
])) : S("", !0),
|
|
628
|
+
(f(!0), b(B, null, R(P.value.right, (o) => (f(), b("g", null, [
|
|
629
|
+
e.value.style.layout.grid.show ? (f(), b("line", {
|
|
630
|
+
key: 0,
|
|
631
|
+
x1: o.x,
|
|
632
|
+
x2: o.x,
|
|
633
|
+
y1: u.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
|
|
634
|
+
y2: u.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 4,
|
|
635
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
636
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
637
|
+
"stroke-linecap": "round"
|
|
638
|
+
}, null, 8, lt)) : S("", !0),
|
|
639
|
+
w("text", {
|
|
640
|
+
x: o.x,
|
|
641
|
+
y: u.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize * 2,
|
|
642
|
+
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
643
|
+
fill: e.value.style.layout.dataLabels.xAxis.color,
|
|
644
|
+
"text-anchor": "middle",
|
|
645
|
+
"font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal"
|
|
646
|
+
}, F(Number((o.value / e.value.style.layout.dataLabels.xAxis.scale).toFixed(0)).toLocaleString()), 9, ot)
|
|
647
|
+
]))), 256)),
|
|
648
|
+
(f(!0), b(B, null, R(P.value.left, (o) => (f(), b("g", null, [
|
|
649
|
+
e.value.style.layout.grid.show ? (f(), b("line", {
|
|
650
|
+
key: 0,
|
|
651
|
+
x1: o.x,
|
|
652
|
+
x2: o.x,
|
|
653
|
+
y1: u.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 2,
|
|
654
|
+
y2: u.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize / 4,
|
|
655
|
+
stroke: e.value.style.layout.grid.stroke,
|
|
656
|
+
"stroke-width": e.value.style.layout.grid.strokeWidth,
|
|
657
|
+
"stroke-linecap": "round"
|
|
658
|
+
}, null, 8, at)) : S("", !0),
|
|
659
|
+
w("text", {
|
|
660
|
+
x: o.x,
|
|
661
|
+
y: u.value.bottom + e.value.style.layout.dataLabels.xAxis.fontSize * 2,
|
|
662
|
+
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
663
|
+
fill: e.value.style.layout.dataLabels.xAxis.color,
|
|
664
|
+
"text-anchor": "middle",
|
|
665
|
+
"font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal"
|
|
666
|
+
}, F(Number((o.value / e.value.style.layout.dataLabels.xAxis.scale).toFixed(0)).toLocaleString()), 9, it)
|
|
667
|
+
]))), 256)),
|
|
668
|
+
w("text", {
|
|
669
|
+
x: u.value.right,
|
|
670
|
+
y: T.value.height,
|
|
671
|
+
"text-anchor": "end",
|
|
672
|
+
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
673
|
+
fill: e.value.style.layout.dataLabels.xAxis.color,
|
|
674
|
+
"font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal"
|
|
675
|
+
}, F(e.value.style.layout.dataLabels.xAxis.translation), 9, st)
|
|
676
|
+
])) : S("", !0)
|
|
677
|
+
]),
|
|
678
|
+
(f(!0), b(B, null, R(t.dataset, (o, s) => (f(), b("g", null, [
|
|
679
|
+
w("rect", {
|
|
680
|
+
x: u.value.left,
|
|
681
|
+
y: u.value.top + u.value.height / E.value * s - e.value.style.layout.bars.gap / 2,
|
|
682
|
+
width: u.value.width <= 0 ? 1e-4 : u.value.width,
|
|
683
|
+
height: u.value.height / E.value <= 0 ? 1e-4 : u.value.height / E.value,
|
|
684
|
+
fill: c.value !== null && c.value === s ? `${e.value.style.highlighter.color}${I(q)[e.value.style.highlighter.opacity]}` : "transparent",
|
|
685
|
+
onMouseover: (m) => de(s, o),
|
|
686
|
+
onMouseleave: n[0] || (n[0] = (m) => {
|
|
687
|
+
c.value = null, p.value = !1;
|
|
688
|
+
})
|
|
689
|
+
}, null, 40, ut)
|
|
690
|
+
]))), 256)),
|
|
691
|
+
O(l.$slots, "svg", { svg: T.value }, void 0, !0)
|
|
692
|
+
], 14, Pe)) : S("", !0),
|
|
693
|
+
v.value ? S("", !0) : (f(), J(Ie, {
|
|
694
|
+
key: 3,
|
|
695
|
+
config: {
|
|
696
|
+
type: "pyramid",
|
|
697
|
+
style: {
|
|
698
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
699
|
+
pyramid: {
|
|
700
|
+
color: "#CCCCCC"
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}, null, 8, ["config"])),
|
|
705
|
+
O(l.$slots, "legend", { legend: D.value }, void 0, !0),
|
|
706
|
+
Y($e, {
|
|
707
|
+
show: M.value.showTooltip && p.value,
|
|
708
|
+
backgroundColor: e.value.style.tooltip.backgroundColor,
|
|
709
|
+
color: e.value.style.tooltip.color,
|
|
710
|
+
borderRadius: e.value.style.tooltip.borderRadius,
|
|
711
|
+
borderColor: e.value.style.tooltip.borderColor,
|
|
712
|
+
borderWidth: e.value.style.tooltip.borderWidth,
|
|
713
|
+
fontSize: e.value.style.tooltip.fontSize,
|
|
714
|
+
backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
|
|
715
|
+
parent: g.value,
|
|
716
|
+
content: x.value,
|
|
717
|
+
isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
|
|
718
|
+
}, {
|
|
719
|
+
"tooltip-before": A(() => [
|
|
720
|
+
O(l.$slots, "tooltip-before", j(H({ ...X.value })), void 0, !0)
|
|
721
|
+
]),
|
|
722
|
+
"tooltip-after": A(() => [
|
|
723
|
+
O(l.$slots, "tooltip-after", j(H({ ...X.value })), void 0, !0)
|
|
724
|
+
]),
|
|
725
|
+
_: 3
|
|
726
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
|
|
727
|
+
v.value ? (f(), J(Oe, {
|
|
728
|
+
key: 4,
|
|
729
|
+
hideDetails: "",
|
|
730
|
+
config: {
|
|
731
|
+
open: M.value.showTable,
|
|
732
|
+
maxHeight: 1e4,
|
|
733
|
+
body: {
|
|
734
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
735
|
+
color: e.value.style.color
|
|
736
|
+
},
|
|
737
|
+
head: {
|
|
738
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
739
|
+
color: e.value.style.color
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}, {
|
|
743
|
+
content: A(() => [
|
|
744
|
+
Y(me, {
|
|
745
|
+
colNames: W.value.colNames,
|
|
746
|
+
head: W.value.head,
|
|
747
|
+
body: W.value.body,
|
|
748
|
+
config: W.value.config,
|
|
749
|
+
title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
|
|
750
|
+
onClose: n[1] || (n[1] = (o) => M.value.showTable = !1)
|
|
751
|
+
}, {
|
|
752
|
+
th: A(({ th: o }) => [
|
|
753
|
+
ae(F(o), 1)
|
|
754
|
+
]),
|
|
755
|
+
td: A(({ td: o }) => [
|
|
756
|
+
ae(F(o), 1)
|
|
757
|
+
]),
|
|
758
|
+
_: 1
|
|
759
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
760
|
+
]),
|
|
761
|
+
_: 1
|
|
762
|
+
}, 8, ["config"])) : S("", !0)
|
|
763
|
+
], 14, Fe));
|
|
764
|
+
}
|
|
765
|
+
}, nt = /* @__PURE__ */ ge(rt, [["__scopeId", "data-v-44b2f1f2"]]), Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
766
|
+
__proto__: null,
|
|
767
|
+
default: nt
|
|
768
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
769
|
+
export {
|
|
770
|
+
pt as a,
|
|
771
|
+
xt as b,
|
|
772
|
+
kt as c,
|
|
773
|
+
_t as d,
|
|
774
|
+
Ct as e,
|
|
775
|
+
bt as l,
|
|
776
|
+
wt as p,
|
|
777
|
+
mt as r,
|
|
778
|
+
ze as t,
|
|
779
|
+
Me as u,
|
|
780
|
+
nt as v
|
|
781
|
+
};
|