vue-data-ui 3.0.0-next.6 → 3.0.0-next.60
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/{Arrow-Ul64M9UV.js → Arrow-Dt0ZxTK2.js} +1 -1
- package/dist/{BaseDraggableDialog-Q2ajCztp.js → BaseDraggableDialog-Bl-2tw3H.js} +2 -2
- package/dist/{BaseIcon-BKR7AGeP.js → BaseIcon-C3ljqn8J.js} +1 -1
- package/dist/{ColorPicker-BagIs8-K.js → ColorPicker-0d0whOB3.js} +2 -2
- package/dist/{DataTable-CDwApkI_.js → DataTable-C_tJHvMd.js} +2 -2
- package/dist/{Legend-BSLj7tYc.js → Legend-VD0VB7l7.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DjJe5fXu.js → NonSvgPenAndPaper-DQsHc_AG.js} +3 -3
- package/dist/{PackageVersion-BsKpz6KS.js → PackageVersion-5S8ajCUS.js} +1 -1
- package/dist/{PenAndPaper-BYRk8xrS.js → PenAndPaper-D6wazxlT.js} +3 -3
- package/dist/{Shape-DK7zYTKa.js → Shape-DDSX29LV.js} +43 -37
- package/dist/Slicer-D3SbIarX.js +602 -0
- package/dist/{SparkTooltip-Dy2sVTb_.js → SparkTooltip-BCdP3VDl.js} +1 -1
- package/dist/{Title-Cednydse.js → Title-DEKAfzRX.js} +1 -1
- package/dist/{Tooltip-DJlwW-XP.js → Tooltip-DJlC-n25.js} +23 -19
- package/dist/{UserOptions-DxIzWere.js → UserOptions-D2G7II3G.js} +2 -2
- package/dist/{dom-to-png-lZcM-YfK.js → dom-to-png-Y0tASTWQ.js} +1 -1
- package/dist/{img-DqlIAUF6.js → img-ChLGv8nO.js} +1 -1
- package/dist/{index-BQcLOx39.js → index-BLtc1AIS.js} +1707 -1131
- package/dist/{pdf-CjIXhsyg.js → pdf-DNiq-xsc.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +481 -21
- package/dist/types/vue-data-ui.d.ts +481 -21
- package/dist/useAutoSizeLabelsInsideViewbox-BJDcwsoB.js +41 -0
- package/dist/useNestedProp-DExlTpuj.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-BRY5saEA.js → usePrinter-fqbzwh0l.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-CWRlSsiN.js → vue-data-ui-B8bRwUEL.js} +105 -100
- package/dist/vue-data-ui.js +23 -22
- package/dist/vue-ui-3d-bar-Dddx5kJW.js +1323 -0
- package/dist/{vue-ui-accordion-Df-5BRRg.js → vue-ui-accordion-EMAj3Ykx.js} +3 -3
- package/dist/vue-ui-age-pyramid-CMzKOGfv.js +834 -0
- package/dist/{vue-ui-annotator-BxC5dcIv.js → vue-ui-annotator-BQxXVdZW.js} +2 -2
- package/dist/vue-ui-bullet-DIie_6-T.js +571 -0
- package/dist/vue-ui-candlestick-DU796IGE.js +999 -0
- package/dist/{vue-ui-carousel-table-NTDzafWQ.js → vue-ui-carousel-table-xDItqzuw.js} +29 -29
- package/dist/{vue-ui-chestnut-k21Qqjjq.js → vue-ui-chestnut-DnQ494SU.js} +5 -5
- package/dist/{vue-ui-chord-BVoA6nfI.js → vue-ui-chord-DTs9gQ-R.js} +8 -8
- package/dist/{vue-ui-circle-pack-CEBgImRX.js → vue-ui-circle-pack-D73gxFJW.js} +24 -24
- package/dist/{vue-ui-cursor-BQcz8xw2.js → vue-ui-cursor-CNXTFeSs.js} +2 -2
- package/dist/{vue-ui-dashboard-CyzEpJoI.js → vue-ui-dashboard-Duph5Yta.js} +62 -62
- package/dist/{vue-ui-digits-Dafw1UsT.js → vue-ui-digits-D7qOSGZ-.js} +2 -2
- package/dist/{vue-ui-donut-DKfux8XT.js → vue-ui-donut-EfxITdHJ.js} +320 -308
- package/dist/vue-ui-donut-evolution-H6nfW_kx.js +1075 -0
- package/dist/vue-ui-dumbbell-DCUR8kl_.js +1119 -0
- package/dist/vue-ui-flow-DUENWmgc.js +841 -0
- package/dist/{vue-ui-funnel-CuN8HWwP.js → vue-ui-funnel-BSGUxWhW.js} +16 -16
- package/dist/{vue-ui-galaxy-BHCLFlmy.js → vue-ui-galaxy-D8PBQfbb.js} +60 -58
- package/dist/vue-ui-gauge-C8v8wKJO.js +791 -0
- package/dist/{vue-ui-gizmo-DHEEfdp9.js → vue-ui-gizmo-DmguslRh.js} +3 -3
- package/dist/vue-ui-heatmap-BM5Gfdzz.js +1078 -0
- package/dist/vue-ui-history-plot-CF6SlpwK.js +1073 -0
- package/dist/{vue-ui-kpi-C4i2w_Yd.js → vue-ui-kpi-BCyX-Zu-.js} +7 -7
- package/dist/{vue-ui-mini-loader-BeetGv_m.js → vue-ui-mini-loader-ByMff4PK.js} +2 -2
- package/dist/{vue-ui-molecule-F_gDXjJr.js → vue-ui-molecule-Cxnf2xDy.js} +53 -51
- package/dist/{vue-ui-mood-radar-BJMOEqlu.js → vue-ui-mood-radar-DEfJWXE7.js} +15 -15
- package/dist/vue-ui-nested-donuts-Bt7Pw9l0.js +1286 -0
- package/dist/vue-ui-onion-Bk3KL1Nk.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-BpKRlOYy.js +915 -0
- package/dist/{vue-ui-quadrant-DTyRC1_v.js → vue-ui-quadrant-D1dgOAp2.js} +59 -57
- package/dist/vue-ui-quick-chart-_I6OrH-J.js +1761 -0
- package/dist/{vue-ui-radar-De2iznwo.js → vue-ui-radar-BWnhxayf.js} +30 -28
- package/dist/{vue-ui-rating-CarXXyD-.js → vue-ui-rating-I08lL1Nb.js} +2 -2
- package/dist/{vue-ui-relation-circle-CKkK9D4E.js → vue-ui-relation-circle-CMF5FSha.js} +6 -6
- package/dist/vue-ui-ridgeline-prYrXNYF.js +1153 -0
- package/dist/vue-ui-rings-DmbUIw9S.js +728 -0
- package/dist/vue-ui-scatter-srTVLcUK.js +1178 -0
- package/dist/{vue-ui-skeleton-C7maR60-.js → vue-ui-skeleton-FanSnKr8.js} +3 -3
- package/dist/{vue-ui-smiley-DzCCn5Oc.js → vue-ui-smiley-CWA0Y6wM.js} +26 -26
- package/dist/{vue-ui-spark-trend-Db-Fnp8C.js → vue-ui-spark-trend-EiEzMoPj.js} +3 -3
- package/dist/vue-ui-sparkbar-CCe0U_o0.js +351 -0
- package/dist/{vue-ui-sparkgauge-DAQ4zozy.js → vue-ui-sparkgauge-Cdcirik_.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CMEaO0CW.js → vue-ui-sparkhistogram-CEj9qz9m.js} +4 -4
- package/dist/vue-ui-sparkline-B2-YztKx.js +489 -0
- package/dist/vue-ui-sparkstackbar-BGMtc_HC.js +421 -0
- package/dist/vue-ui-stackbar-DrKaioRS.js +1370 -0
- package/dist/vue-ui-strip-plot-C4qWoDEh.js +915 -0
- package/dist/{vue-ui-table-Dck8Pyg9.js → vue-ui-table-CXqyTj_Z.js} +11 -11
- package/dist/{vue-ui-table-heatmap-DknIGf9_.js → vue-ui-table-heatmap-BZTn3qnM.js} +5 -5
- package/dist/{vue-ui-table-sparkline-G4HAzUt6.js → vue-ui-table-sparkline-CIBdN_KF.js} +14 -14
- package/dist/vue-ui-thermometer-DPIpWKUI.js +541 -0
- package/dist/{vue-ui-timer-Dmr-HCSc.js → vue-ui-timer-Cha-Gb1x.js} +5 -5
- package/dist/vue-ui-tiremarks-B4SjQyS7.js +406 -0
- package/dist/vue-ui-treemap-1twI_ag-.js +1035 -0
- package/dist/{vue-ui-vertical-bar--QFtoFje.js → vue-ui-vertical-bar-C31Jqkbw.js} +318 -302
- package/dist/vue-ui-waffle-DkZykFPK.js +910 -0
- package/dist/vue-ui-wheel-CYOrBHBD.js +379 -0
- package/dist/vue-ui-word-cloud-Clyg0CRZ.js +765 -0
- package/dist/{vue-ui-world-BcK_brDq.js → vue-ui-world-BYgMbS-e.js} +11 -9
- package/dist/vue-ui-xy-BMszd4wZ.js +3760 -0
- package/dist/{vue-ui-xy-canvas--88oKdGN.js → vue-ui-xy-canvas-DwXvZ311.js} +265 -264
- package/package.json +1 -1
- package/dist/Slicer-B_Hb6qSk.js +0 -577
- package/dist/useNestedProp-DefBVltl.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-CJMZqDo1.js +0 -1227
- package/dist/vue-ui-age-pyramid-B6WAMtPk.js +0 -746
- package/dist/vue-ui-bullet-NmtltFbU.js +0 -513
- package/dist/vue-ui-candlestick-BzqQtynP.js +0 -873
- package/dist/vue-ui-donut-evolution-D7cNk_6l.js +0 -903
- package/dist/vue-ui-dumbbell--H80zebk.js +0 -753
- package/dist/vue-ui-flow-lk_HU5NB.js +0 -765
- package/dist/vue-ui-gauge-DWlCh2_B.js +0 -738
- package/dist/vue-ui-heatmap-BK6BNOY_.js +0 -877
- package/dist/vue-ui-history-plot-CGF6lE-7.js +0 -924
- package/dist/vue-ui-nested-donuts-BX0Z0rb1.js +0 -1177
- package/dist/vue-ui-onion-BhjUET_W.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-n7QPVLrW.js +0 -807
- package/dist/vue-ui-quick-chart-5xX-yBIY.js +0 -1612
- package/dist/vue-ui-ridgeline-DQ8RQf3E.js +0 -969
- package/dist/vue-ui-rings-Cze6OsmO.js +0 -685
- package/dist/vue-ui-scatter-CwI3_Dn7.js +0 -1045
- package/dist/vue-ui-sparkbar-C6wsNMMO.js +0 -301
- package/dist/vue-ui-sparkline-R7pfxRWN.js +0 -459
- package/dist/vue-ui-sparkstackbar-DV_XqJQ2.js +0 -381
- package/dist/vue-ui-stackbar-gReSujA_.js +0 -1207
- package/dist/vue-ui-strip-plot-8fsm3nn2.js +0 -761
- package/dist/vue-ui-thermometer-BIkXa4hY.js +0 -495
- package/dist/vue-ui-tiremarks-YWbRk0dm.js +0 -358
- package/dist/vue-ui-treemap-D2OnG3Fh.js +0 -965
- package/dist/vue-ui-waffle-BdaCXuWc.js +0 -863
- package/dist/vue-ui-wheel-Bw3XSa8N.js +0 -352
- package/dist/vue-ui-word-cloud-BH8UZH_J.js +0 -659
- package/dist/vue-ui-xy-Be--zwe9.js +0 -2980
|
@@ -0,0 +1,1761 @@
|
|
|
1
|
+
import { defineAsyncComponent as $e, ref as w, computed as N, toRefs as ta, watch as Ie, shallowRef as $t, onMounted as aa, onBeforeUnmount as It, nextTick as Et, watchEffect as la, createElementBlock as o, openBlock as l, normalizeStyle as O, normalizeClass as ce, createBlock as qe, createCommentVNode as g, createVNode as ke, unref as r, createSlots as oa, withCtx as K, renderSlot as U, normalizeProps as he, guardReactiveProps as fe, toDisplayString as F, createElementVNode as z, Fragment as p, renderList as I, mergeProps as et } from "vue";
|
|
2
|
+
import { u as na, c as ia, t as ua, a as ra, p as j, b as sa, C as We, d as va, G as da, f as ca, o as ha, e as tt, m as fa, D as Tt, X as ga, n as ma, q as at, r as Ee, k as ee, i as W, I as Pt, V as Ot, h as te, y as Xe, z as lt } from "./index-BLtc1AIS.js";
|
|
3
|
+
import { t as Rt, u as pa } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as xa } from "./usePrinter-fqbzwh0l.js";
|
|
5
|
+
import { u as Mt } from "./useNestedProp-DExlTpuj.js";
|
|
6
|
+
import { u as ya } from "./useTimeLabels-DkzmKfZn.js";
|
|
7
|
+
import { u as ka } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
+
import { u as ba } from "./useTimeLabelCollider-CIsgDrl9.js";
|
|
9
|
+
import Sa from "./img-ChLGv8nO.js";
|
|
10
|
+
import { S as wa } from "./Slicer-D3SbIarX.js";
|
|
11
|
+
import { u as Aa, B as La } from "./useLoading-Bt5Doa8m.js";
|
|
12
|
+
import { _ as _a } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
const _ = {
|
|
14
|
+
LINE: "LINE",
|
|
15
|
+
BAR: "BAR",
|
|
16
|
+
DONUT: "DONUT"
|
|
17
|
+
}, za = ["SERIE", "SERIES", "DATA", "VALUE", "VALUES", "NUM"];
|
|
18
|
+
function Ca({ dataset: h, barLineSwitch: P = 6, debug: S = !0 }) {
|
|
19
|
+
let B = null, H = null, le = 0;
|
|
20
|
+
if ((typeof h == "number" || typeof h == "string") && S && console.warn(`The provided dataset (${h}) is not sufficient to build a chart`), Te(h) && (ae(h) && (h.length < P ? B = _.BAR : B = _.LINE, H = h, le = h.length), je(h))) {
|
|
21
|
+
if (!Ia(h))
|
|
22
|
+
return S && console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."), !1;
|
|
23
|
+
const Se = Object.keys(h[0]), M = Object.values(h[0]);
|
|
24
|
+
if (!Se.some((R) => Ea(R)))
|
|
25
|
+
return S && console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."), !1;
|
|
26
|
+
Ft(M, (R) => typeof R == "number") && (B = _.DONUT, H = h), Ft(M, (R) => Array.isArray(R) && ae(R)) && (Nt(h) > P ? B = _.LINE : B = _.BAR, le = Nt(h), H = h.map((R) => ({
|
|
27
|
+
...R,
|
|
28
|
+
data: Ta(R, (Pe) => ae(Pe))
|
|
29
|
+
}))), h = h.map((R) => Bt(R)), H = H.map((R) => Bt(R));
|
|
30
|
+
}
|
|
31
|
+
return Te(h) && [...new Set(h.flatMap((Se) => Array.isArray(Se)))][0], {
|
|
32
|
+
dataset: h,
|
|
33
|
+
type: B,
|
|
34
|
+
usableDataset: H,
|
|
35
|
+
maxSeriesLength: le
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function Dt(h) {
|
|
39
|
+
return !h || Te(h) && !h.length;
|
|
40
|
+
}
|
|
41
|
+
function Te(h) {
|
|
42
|
+
return Array.isArray(h);
|
|
43
|
+
}
|
|
44
|
+
function ae(h) {
|
|
45
|
+
if (!Te(h) || Dt(h)) return !1;
|
|
46
|
+
const P = h.map((S) => Number(S));
|
|
47
|
+
return ![...new Set(P.flatMap((S) => typeof S == "number" && !isNaN(S)))].includes(!1);
|
|
48
|
+
}
|
|
49
|
+
function je(h) {
|
|
50
|
+
return !Te(h) || Dt(h) || !![...new Set(h.flatMap((S) => typeof S == "object" && !Array.isArray(S)))].includes(!1) ? !1 : !h.map((S) => Object.keys(S).length > 0).includes(!1);
|
|
51
|
+
}
|
|
52
|
+
function $a(h, P) {
|
|
53
|
+
const S = Object.keys(h).sort(), B = Object.keys(P).sort();
|
|
54
|
+
if (S.length !== B.length)
|
|
55
|
+
return !1;
|
|
56
|
+
for (let H = 0; H < S.length; H += 1) {
|
|
57
|
+
const le = S[H], be = B[H];
|
|
58
|
+
if (le !== be || typeof h[le] != typeof P[be])
|
|
59
|
+
return !1;
|
|
60
|
+
}
|
|
61
|
+
return !0;
|
|
62
|
+
}
|
|
63
|
+
function Ia(h) {
|
|
64
|
+
if (h.length <= 1) return !0;
|
|
65
|
+
for (let P = 0; P < h.length; P += 1)
|
|
66
|
+
for (let S = P + 1; S < h.length; S += 1)
|
|
67
|
+
if (!$a(h[P], h[S]))
|
|
68
|
+
return !1;
|
|
69
|
+
return !0;
|
|
70
|
+
}
|
|
71
|
+
function Ea(h) {
|
|
72
|
+
return za.includes(h.toUpperCase());
|
|
73
|
+
}
|
|
74
|
+
function Ft(h, P) {
|
|
75
|
+
let S = [];
|
|
76
|
+
for (let B = 0; B < h.length; B += 1)
|
|
77
|
+
S.push(P(h[B]));
|
|
78
|
+
return S.includes(!0);
|
|
79
|
+
}
|
|
80
|
+
function Nt(h) {
|
|
81
|
+
return Math.max(...[...h].flatMap((P) => Object.values(P).filter((S) => ae(S)).map((S) => S.length)));
|
|
82
|
+
}
|
|
83
|
+
function Ta(h, P) {
|
|
84
|
+
return Object.values(h).filter((S) => P(S))[0];
|
|
85
|
+
}
|
|
86
|
+
function Bt(h) {
|
|
87
|
+
const P = {};
|
|
88
|
+
for (let S in h)
|
|
89
|
+
h.hasOwnProperty(S) && (P[S.toUpperCase()] = h[S]);
|
|
90
|
+
return P;
|
|
91
|
+
}
|
|
92
|
+
const Pa = ["id"], Oa = ["xmlns", "viewBox"], Ra = ["x", "y", "width", "height"], Ma = ["x", "y", "width", "height"], Fa = ["width", "height"], Na = ["id"], Ba = ["id"], Da = ["id"], Ua = ["flood-color"], Va = {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: "donut-label-connectors"
|
|
95
|
+
}, Ha = ["d", "stroke", "stroke-width", "filter"], qa = ["cx", "cy", "r", "fill", "filter"], Wa = { class: "donut" }, Xa = ["d", "fill", "stroke", "stroke-width", "filter"], ja = ["d", "onMouseenter", "onMouseout", "onClick"], Ga = {
|
|
96
|
+
key: 1,
|
|
97
|
+
class: "donut-labels quick-animation"
|
|
98
|
+
}, Ya = ["cx", "cy", "fill", "stroke", "filter"], Za = ["text-anchor", "x", "y", "fill", "font-size", "filter"], Ja = ["text-anchor", "x", "y", "fill", "font-size", "filter"], Qa = {
|
|
99
|
+
key: 2,
|
|
100
|
+
class: "donut-hollow quick-animation"
|
|
101
|
+
}, Ka = ["x", "y", "font-size", "fill"], el = ["x", "y", "font-size", "fill"], tl = {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: "line-grid"
|
|
104
|
+
}, al = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ll = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ol = {
|
|
105
|
+
key: 1,
|
|
106
|
+
class: "line-axis"
|
|
107
|
+
}, nl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], il = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ul = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], rl = ["x", "y", "font-size", "fill"], sl = {
|
|
108
|
+
key: 3,
|
|
109
|
+
class: "periodLabels"
|
|
110
|
+
}, vl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], dl = { key: 0 }, cl = ["font-size", "text-anchor", "fill", "transform"], hl = ["font-size", "text-anchor", "fill", "transform", "innerHTML"], fl = { class: "plots" }, gl = { class: "line-plot-series" }, ml = ["d", "stroke", "stroke-width"], pl = ["d", "stroke", "stroke-width"], xl = ["d", "stroke", "stroke-width"], yl = ["d", "stroke", "stroke-width"], kl = ["cx", "cy", "fill", "stroke"], bl = {
|
|
111
|
+
key: 4,
|
|
112
|
+
class: "dataLabels"
|
|
113
|
+
}, Sl = ["font-size", "fill", "x", "y"], wl = {
|
|
114
|
+
key: 5,
|
|
115
|
+
class: "tooltip-traps"
|
|
116
|
+
}, Al = ["x", "y", "height", "width", "fill", "onMouseenter", "onMouseleave", "onClick"], Ll = {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: "line-grid"
|
|
119
|
+
}, _l = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], zl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Cl = {
|
|
120
|
+
key: 1,
|
|
121
|
+
class: "line-axis"
|
|
122
|
+
}, $l = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Il = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], El = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Tl = ["x", "y", "font-size", "fill"], Pl = {
|
|
123
|
+
key: 3,
|
|
124
|
+
class: "periodLabels"
|
|
125
|
+
}, Ol = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Rl = { key: 0 }, Ml = ["font-size", "text-anchor", "fill", "transform"], Fl = ["font-size", "text-anchor", "fill", "transform", "innerHTML"], Nl = { class: "plots" }, Bl = ["x", "width", "height", "y", "fill", "stroke", "stroke-width"], Dl = ["to"], Ul = ["from", "to"], Vl = {
|
|
126
|
+
key: 4,
|
|
127
|
+
class: "dataLabels"
|
|
128
|
+
}, Hl = ["x", "y", "font-size", "fill"], ql = {
|
|
129
|
+
key: 5,
|
|
130
|
+
class: "tooltip-traps"
|
|
131
|
+
}, Wl = ["x", "y", "height", "width", "fill", "onMouseenter", "onMouseleave", "onClick"], Xl = {
|
|
132
|
+
key: 6,
|
|
133
|
+
class: "axis-labels"
|
|
134
|
+
}, jl = ["font-size", "fill", "x", "y"], Gl = ["font-size", "fill", "x", "y"], Yl = ["font-size", "fill", "transform"], Zl = ["font-size", "fill", "transform"], Jl = {
|
|
135
|
+
key: 5,
|
|
136
|
+
class: "vue-data-ui-watermark"
|
|
137
|
+
}, Ql = ["onClick"], Kl = ["onClick"], eo = ["onClick"], to = {
|
|
138
|
+
key: 1,
|
|
139
|
+
class: "vue-ui-quick-chart-not-processable"
|
|
140
|
+
}, ao = {
|
|
141
|
+
__name: "vue-ui-quick-chart",
|
|
142
|
+
props: {
|
|
143
|
+
config: {
|
|
144
|
+
type: Object,
|
|
145
|
+
default() {
|
|
146
|
+
return {};
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
dataset: {
|
|
150
|
+
type: [Array, Object, String, Number],
|
|
151
|
+
default() {
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
emits: ["selectDatapoint", "selectLegend"],
|
|
157
|
+
setup(h, { expose: P, emit: S }) {
|
|
158
|
+
const B = $e(() => import("./BaseIcon-C3ljqn8J.js")), H = $e(() => import("./PackageVersion-5S8ajCUS.js")), le = $e(() => import("./PenAndPaper-D6wazxlT.js")), be = $e(() => import("./Tooltip-DJlC-n25.js")), ot = $e(() => import("./UserOptions-D2G7II3G.js")), { vue_ui_quick_chart: Se } = na(), M = h, R = w(null), Pe = w(null), nt = w(null), it = w(null), oe = w(ia()), re = w(!1), we = w(null), se = w(""), Y = w(null), ut = w(null), rt = w(null), A = w([]), st = w(0), Oe = w(0), Z = w(null), Re = w(null), vt = w(null), dt = w(null), Me = w("#FFFFFF"), e = w(Ze()), Ge = N(() => !!e.value.debug), { loading: D, FINAL_DATASET: Ut, manualLoading: ct } = Aa({
|
|
159
|
+
...ta(M),
|
|
160
|
+
FINAL_CONFIG: e,
|
|
161
|
+
prepareConfig: Ze,
|
|
162
|
+
skeletonDataset: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89],
|
|
163
|
+
skeletonConfig: ua({
|
|
164
|
+
defaultConfig: e.value,
|
|
165
|
+
userConfig: {
|
|
166
|
+
backgroundColor: "#99999930",
|
|
167
|
+
customPalette: ["#BABABA"],
|
|
168
|
+
showDataLabels: !1,
|
|
169
|
+
paletteStartIndex: 0,
|
|
170
|
+
showUserOptions: !1,
|
|
171
|
+
showTooltip: !1,
|
|
172
|
+
xAxisLabel: "",
|
|
173
|
+
yAxisLabel: "",
|
|
174
|
+
xyAxisStroke: "#999999",
|
|
175
|
+
xyGridStroke: "#99999950",
|
|
176
|
+
xyPeriods: [],
|
|
177
|
+
xyShowScale: !1,
|
|
178
|
+
xyPaddingLeft: 6,
|
|
179
|
+
xyPaddingBottom: 12,
|
|
180
|
+
zoomXy: !1,
|
|
181
|
+
zoomStartIndex: null,
|
|
182
|
+
zoomEndIndex: null
|
|
183
|
+
}
|
|
184
|
+
})
|
|
185
|
+
}), { svgRef: ht } = ka({ config: { text: e.value.title } }), Vt = N(() => e.value.showUserOptionsOnChartHover), ft = N(() => e.value.keepUserOptionsStateOnChartLeave), Fe = w(!e.value.showUserOptionsOnChartHover), Ye = w(!1);
|
|
186
|
+
function gt(a = !1) {
|
|
187
|
+
Ye.value = a, Vt.value && (Fe.value = a);
|
|
188
|
+
}
|
|
189
|
+
function Ze() {
|
|
190
|
+
const a = Mt({
|
|
191
|
+
userConfig: M.config,
|
|
192
|
+
defaultConfig: Se
|
|
193
|
+
});
|
|
194
|
+
let c = {};
|
|
195
|
+
return a.theme ? c = {
|
|
196
|
+
...Mt({
|
|
197
|
+
userConfig: sa.vue_ui_quick_chart[a.theme] || M.config,
|
|
198
|
+
defaultConfig: a
|
|
199
|
+
}),
|
|
200
|
+
customPalette: ra[a.theme] || j
|
|
201
|
+
} : c = a, M.config && We(M.config, "zoomStartIndex") ? c.zoomStartIndex = M.config.zoomStartIndex : c.zoomStartIndex = null, M.config && We(M.config, "zoomEndIndex") ? c.zoomEndIndex = M.config.zoomEndIndex : c.zoomEndIndex = null, M.config && !We(M.config, "donutStroke") ? We(M.config, "backgroundColor") ? Me.value = M.config.backgroundColor : Me.value = "#FFFFFF" : Me.value = M.config.donutStroke, c;
|
|
202
|
+
}
|
|
203
|
+
Ie(() => M.config, (a) => {
|
|
204
|
+
D.value || (e.value = Ze()), b.value.width = e.value.width, b.value.height = e.value.height, Fe.value = !e.value.showUserOptionsOnChartHover, xt(), me.value.showTooltip = e.value.showTooltip;
|
|
205
|
+
}, { deep: !0 }), Ie(() => M.dataset, (a) => {
|
|
206
|
+
k.value = Le.value, m.value.start = 0, m.value.end = k.value.maxSeriesLength, Oe.value += 1;
|
|
207
|
+
}, { deep: !0 }), Ie(() => M.dataset, (a) => {
|
|
208
|
+
Array.isArray(a) && a.length > 0 && (ct.value = !1);
|
|
209
|
+
}, { immediate: !0 });
|
|
210
|
+
const Ae = N(() => va(e.value.customPalette)), ge = S, Le = N(() => {
|
|
211
|
+
const a = Ca({ debug: Ge.value, dataset: da(Ut.value, [
|
|
212
|
+
"serie",
|
|
213
|
+
"series",
|
|
214
|
+
"data",
|
|
215
|
+
"value",
|
|
216
|
+
"values",
|
|
217
|
+
"num"
|
|
218
|
+
]), barLineSwitch: e.value.chartIsBarUnderDatasetLength });
|
|
219
|
+
return !a && Ge.value && console.error("VueUiQuickChart : Dataset is not processable"), a;
|
|
220
|
+
}), k = w(Le.value), Ht = N(() => !!k.value), $ = N(() => k.value ? k.value.type : null);
|
|
221
|
+
Ie(() => $.value, (a) => {
|
|
222
|
+
a || ca({
|
|
223
|
+
componentName: "VueUiQuickChart",
|
|
224
|
+
type: "dataset",
|
|
225
|
+
debug: Ge.value
|
|
226
|
+
});
|
|
227
|
+
}, { immediate: !0 });
|
|
228
|
+
const { isPrinting: Ne, isImaging: Be, generatePdf: mt, generateImage: pt } = xa({
|
|
229
|
+
elementId: `${$.value}_${oe.value}`,
|
|
230
|
+
fileName: e.value.title || $.value,
|
|
231
|
+
options: e.value.userOptionsPrint
|
|
232
|
+
}), qt = N(() => e.value.showUserOptions && !e.value.title), b = w({
|
|
233
|
+
width: e.value.width,
|
|
234
|
+
height: e.value.height
|
|
235
|
+
}), me = w({
|
|
236
|
+
showTooltip: e.value.showTooltip
|
|
237
|
+
});
|
|
238
|
+
Ie(e, () => {
|
|
239
|
+
me.value = {
|
|
240
|
+
showTooltip: e.value.showTooltip
|
|
241
|
+
};
|
|
242
|
+
}, { immediate: !0 });
|
|
243
|
+
const ne = $t(null), pe = $t(null);
|
|
244
|
+
aa(() => {
|
|
245
|
+
xt();
|
|
246
|
+
});
|
|
247
|
+
function xt() {
|
|
248
|
+
if (ha(M.dataset) || (ct.value = e.value.loading), e.value.responsive) {
|
|
249
|
+
const a = Rt(() => {
|
|
250
|
+
const { width: c, height: t } = pa({
|
|
251
|
+
chart: R.value,
|
|
252
|
+
title: e.value.title ? Pe.value : null,
|
|
253
|
+
legend: e.value.showLegend ? nt.value : null,
|
|
254
|
+
slicer: [_.BAR, _.LINE].includes($.value) && e.value.zoomXy && k.value.maxSeriesLength > 1 ? it.value : null,
|
|
255
|
+
source: ut.value,
|
|
256
|
+
noTitle: rt.value
|
|
257
|
+
});
|
|
258
|
+
requestAnimationFrame(() => {
|
|
259
|
+
b.value.width = c, b.value.height = t;
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
ne.value && (pe.value && ne.value.unobserve(pe.value), ne.value.disconnect()), ne.value = new ResizeObserver(a), pe.value = R.value.parentNode, ne.value.observe(pe.value);
|
|
263
|
+
}
|
|
264
|
+
Lt();
|
|
265
|
+
}
|
|
266
|
+
It(() => {
|
|
267
|
+
ne.value && (pe.value && ne.value.unobserve(pe.value), ne.value.disconnect());
|
|
268
|
+
});
|
|
269
|
+
const Wt = N(() => {
|
|
270
|
+
switch ($.value) {
|
|
271
|
+
case _.LINE:
|
|
272
|
+
return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
|
|
273
|
+
case _.BAR:
|
|
274
|
+
return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
|
|
275
|
+
case _.DONUT:
|
|
276
|
+
return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
|
|
277
|
+
default:
|
|
278
|
+
return `0 0 ${b.value.width <= 0 ? 10 : b.value.width} ${b.value.height <= 0 ? 10 : b.value.height}`;
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
function yt(a) {
|
|
282
|
+
return [...a].map((c) => c.value).reduce((c, t) => c + t, 0);
|
|
283
|
+
}
|
|
284
|
+
function _e(a) {
|
|
285
|
+
return e.value.blurOnHover && ![null, void 0].includes(Y.value) && Y.value !== a ? `url(#blur_${oe.value})` : "";
|
|
286
|
+
}
|
|
287
|
+
function kt(a, c) {
|
|
288
|
+
A.value.includes(a) ? A.value = A.value.filter((t) => t !== a) : A.value.length < c && A.value.push(a);
|
|
289
|
+
}
|
|
290
|
+
const bt = w(null), St = w(null), De = w(!1);
|
|
291
|
+
function Xt(a, c) {
|
|
292
|
+
De.value = !0;
|
|
293
|
+
let t = a.value;
|
|
294
|
+
const i = Le.value.dataset.find((u, x) => a.id === `donut_${x}`).VALUE;
|
|
295
|
+
if (A.value.includes(a.id)) {
|
|
296
|
+
let u = function() {
|
|
297
|
+
t > i ? (De.value = !1, cancelAnimationFrame(St.value), k.value = {
|
|
298
|
+
...k.value,
|
|
299
|
+
dataset: k.value.dataset.map((x, L) => a.id === `donut_${L}` ? {
|
|
300
|
+
...x,
|
|
301
|
+
value: i,
|
|
302
|
+
VALUE: i
|
|
303
|
+
} : x)
|
|
304
|
+
}) : (t += i * 0.025, k.value = {
|
|
305
|
+
...k.value,
|
|
306
|
+
dataset: k.value.dataset.map((x, L) => a.id === `donut_${L}` ? {
|
|
307
|
+
...x,
|
|
308
|
+
value: t,
|
|
309
|
+
VALUE: t
|
|
310
|
+
} : x)
|
|
311
|
+
}, St.value = requestAnimationFrame(u));
|
|
312
|
+
};
|
|
313
|
+
A.value = A.value.filter((x) => x !== a.id), u();
|
|
314
|
+
} else if (c.length > 1) {
|
|
315
|
+
let u = function() {
|
|
316
|
+
t < i / 100 ? (De.value = !1, cancelAnimationFrame(bt.value), A.value.push(a.id), k.value = {
|
|
317
|
+
...k.value,
|
|
318
|
+
dataset: k.value.dataset.map((x, L) => a.id === `donut_${L}` ? {
|
|
319
|
+
...x,
|
|
320
|
+
value: 0,
|
|
321
|
+
VALUE: 0
|
|
322
|
+
} : x)
|
|
323
|
+
}) : (t /= 1.1, k.value = {
|
|
324
|
+
...k.value,
|
|
325
|
+
dataset: k.value.dataset.map((x, L) => a.id === `donut_${L}` ? {
|
|
326
|
+
...x,
|
|
327
|
+
value: t,
|
|
328
|
+
VALUE: t
|
|
329
|
+
} : x)
|
|
330
|
+
}, bt.value = requestAnimationFrame(u));
|
|
331
|
+
};
|
|
332
|
+
u();
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
const J = w(null);
|
|
336
|
+
function jt(a) {
|
|
337
|
+
J.value = a;
|
|
338
|
+
}
|
|
339
|
+
const wt = N(() => e.value.donutThicknessRatio < 0.01 ? 0.01 : e.value.donutThicknessRatio > 0.4 ? 0.4 : e.value.donutThicknessRatio), T = N(() => {
|
|
340
|
+
if ($.value !== _.DONUT) return null;
|
|
341
|
+
const a = k.value.dataset.map((f, C) => ({
|
|
342
|
+
...f,
|
|
343
|
+
value: f.VALUE || f.DATA || f.SERIE || f.VALUES || f.NUM || 0,
|
|
344
|
+
name: f.NAME || f.DESCRIPTION || f.TITLE || f.LABEL || `Serie ${C}`,
|
|
345
|
+
id: `donut_${C}`
|
|
346
|
+
})).map((f, C) => ({
|
|
347
|
+
...f,
|
|
348
|
+
color: f.COLOR ? tt(f.COLOR) : Ae.value[C + e.value.paletteStartIndex] || j[C + e.value.paletteStartIndex] || j[(C + e.value.paletteStartIndex) % j.length],
|
|
349
|
+
immutableValue: f.value
|
|
350
|
+
}));
|
|
351
|
+
function c(f, C) {
|
|
352
|
+
return W({
|
|
353
|
+
v: isNaN(f.value / yt(C)) ? 0 : f.value / yt(C) * 100,
|
|
354
|
+
s: "%",
|
|
355
|
+
r: e.value.dataLabelRoundingPercentage
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
function t(f) {
|
|
359
|
+
return f.proportion * 100 > e.value.donutHideLabelUnderPercentage;
|
|
360
|
+
}
|
|
361
|
+
function i(f, C) {
|
|
362
|
+
const v = Le.value.dataset.find((y, E) => `donut_${E}` === f).VALUE;
|
|
363
|
+
return Math.abs(String(Number(v.toFixed(0))).length - String(Number(C.toFixed(0))).length);
|
|
364
|
+
}
|
|
365
|
+
function u({ datapoint: f, seriesIndex: C }) {
|
|
366
|
+
we.value = { datapoint: f, seriesIndex: C, config: e.value, dataset: a }, Y.value = f.id;
|
|
367
|
+
const v = e.value.tooltipCustomFormat;
|
|
368
|
+
if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: f, seriesIndex: C }), Xe(v) && lt(() => v({
|
|
369
|
+
datapoint: f,
|
|
370
|
+
seriesIndex: C,
|
|
371
|
+
series: a,
|
|
372
|
+
config: e.value
|
|
373
|
+
})))
|
|
374
|
+
se.value = v({
|
|
375
|
+
datapoint: f,
|
|
376
|
+
seriesIndex: C,
|
|
377
|
+
series: a,
|
|
378
|
+
config: e.value
|
|
379
|
+
});
|
|
380
|
+
else {
|
|
381
|
+
let n = "";
|
|
382
|
+
n += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${f.name}</div>`, n += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${f.color}"/></svg>`, n += `<b>${ee(
|
|
383
|
+
e.value.formatter,
|
|
384
|
+
f.value,
|
|
385
|
+
W({
|
|
386
|
+
p: e.value.valuePrefix,
|
|
387
|
+
v: f.value,
|
|
388
|
+
s: e.value.valueSuffix,
|
|
389
|
+
r: e.value.dataLabelRoundingValue
|
|
390
|
+
}),
|
|
391
|
+
{ datapoint: f, seriesIndex: C }
|
|
392
|
+
)}</b>`, n += `<span>(${W({ v: f.proportion * 100, s: "%", r: e.value.dataLabelRoundingPercentage })})</span></div>`, se.value = `<div>${n}</div>`;
|
|
393
|
+
}
|
|
394
|
+
re.value = !0;
|
|
395
|
+
}
|
|
396
|
+
function x({ datapoint: f, seriesIndex: C }) {
|
|
397
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: f, seriesIndex: C }), re.value = !1, Y.value = null, J.value = null;
|
|
398
|
+
}
|
|
399
|
+
function L({ datapoint: f, seriesIndex: C }) {
|
|
400
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: f, seriesIndex: C }), ge("selectDatapoint", f);
|
|
401
|
+
}
|
|
402
|
+
const ie = {
|
|
403
|
+
centerX: b.value.width / 2,
|
|
404
|
+
centerY: b.value.height / 2
|
|
405
|
+
}, X = a.filter((f) => !A.value.includes(f.id)).map((f) => f.value || 0).reduce((f, C) => f + C, 0), ye = a.map((f, C) => ({
|
|
406
|
+
...f,
|
|
407
|
+
proportion: (f.value || 0) / X,
|
|
408
|
+
value: f.value || 0,
|
|
409
|
+
absoluteValue: Le.value.dataset.find((v, n) => `donut_${n}` === f.id).VALUE
|
|
410
|
+
})), ve = b.value.width / 2, ue = b.value.height / 2, Q = b.value.height * e.value.donutRadiusRatio;
|
|
411
|
+
return {
|
|
412
|
+
dataset: ye.filter((f) => !A.value.includes(f.id)),
|
|
413
|
+
legend: ye,
|
|
414
|
+
drawingArea: ie,
|
|
415
|
+
displayArcPercentage: c,
|
|
416
|
+
isArcBigEnough: t,
|
|
417
|
+
useTooltip: u,
|
|
418
|
+
killTooltip: x,
|
|
419
|
+
selectDatapoint: L,
|
|
420
|
+
getSpaces: i,
|
|
421
|
+
total: X,
|
|
422
|
+
cx: ve,
|
|
423
|
+
cy: ue,
|
|
424
|
+
radius: Q,
|
|
425
|
+
chart: fa(
|
|
426
|
+
{ series: a.filter((f) => !A.value.includes(f.id)) },
|
|
427
|
+
ve,
|
|
428
|
+
ue,
|
|
429
|
+
Q,
|
|
430
|
+
Q,
|
|
431
|
+
1.99999,
|
|
432
|
+
2,
|
|
433
|
+
1,
|
|
434
|
+
360,
|
|
435
|
+
105.25,
|
|
436
|
+
b.value.height * wt.value
|
|
437
|
+
)
|
|
438
|
+
};
|
|
439
|
+
}), m = w({
|
|
440
|
+
start: 0,
|
|
441
|
+
end: k.value.maxSeriesLength
|
|
442
|
+
});
|
|
443
|
+
function Gt() {
|
|
444
|
+
Lt();
|
|
445
|
+
}
|
|
446
|
+
const At = w(null);
|
|
447
|
+
async function Lt() {
|
|
448
|
+
await Et(), await Et();
|
|
449
|
+
const { zoomStartIndex: a, zoomEndIndex: c } = e.value, t = At.value;
|
|
450
|
+
(a != null || c != null) && t ? (a != null && t.setStartValue(a), c != null && t.setEndValue(Yt(c + 1))) : (m.value = {
|
|
451
|
+
start: 0,
|
|
452
|
+
end: k.value.maxSeriesLength
|
|
453
|
+
}, Oe.value += 1);
|
|
454
|
+
}
|
|
455
|
+
function Yt(a) {
|
|
456
|
+
const c = k.value.maxSeriesLength;
|
|
457
|
+
return a > c ? c : a < 0 || e.value.zoomStartIndex !== null && a < e.value.zoomStartIndex ? e.value.zoomStartIndex !== null ? e.value.zoomStartIndex + 1 : 1 : a;
|
|
458
|
+
}
|
|
459
|
+
const Zt = N(() => {
|
|
460
|
+
if (!e.value.zoomMinimap.show || $.value === _.DONUT) return [];
|
|
461
|
+
let a = [];
|
|
462
|
+
ae(k.value.dataset) && (a = k.value.dataset), je(k.value.dataset) && (a = k.value.dataset.map((u, x) => ({
|
|
463
|
+
values: u.VALUE || u.DATA || u.SERIE || u.SERIES || u.VALUES || u.NUM || 0,
|
|
464
|
+
id: $.value === _.LINE ? `line_${x}` : `bar_${x}`
|
|
465
|
+
})).filter((u) => !A.value.includes(u.id)));
|
|
466
|
+
const c = ae(a) ? a.length : Math.max(...a.map((u) => u.values.length));
|
|
467
|
+
let t = [];
|
|
468
|
+
if (ae(a))
|
|
469
|
+
t = a;
|
|
470
|
+
else
|
|
471
|
+
for (let u = 0; u < c; u += 1)
|
|
472
|
+
t.push(a.map((x) => x.values[u] || 0).reduce((x, L) => (x || 0) + (L || 0), 0));
|
|
473
|
+
const i = Math.min(...t);
|
|
474
|
+
return t.map((u) => u + (i < 0 ? Math.abs(i) : 0));
|
|
475
|
+
});
|
|
476
|
+
function _t() {
|
|
477
|
+
let a = 0;
|
|
478
|
+
return Re.value && (a = Array.from(Re.value.querySelectorAll("text")).reduce((i, u) => {
|
|
479
|
+
const x = u.getComputedTextLength();
|
|
480
|
+
return x > i ? x : i;
|
|
481
|
+
}, 0)), a + 4;
|
|
482
|
+
}
|
|
483
|
+
const Je = w(0), Jt = Rt((a) => {
|
|
484
|
+
Je.value = a;
|
|
485
|
+
}, 100);
|
|
486
|
+
la((a) => {
|
|
487
|
+
const c = Z.value;
|
|
488
|
+
if (!c) return;
|
|
489
|
+
const t = new ResizeObserver((i) => {
|
|
490
|
+
Jt(i[0].contentRect.height);
|
|
491
|
+
});
|
|
492
|
+
t.observe(c), a(() => t.disconnect());
|
|
493
|
+
}), It(() => {
|
|
494
|
+
Je.value = 0;
|
|
495
|
+
});
|
|
496
|
+
const Ue = N(() => {
|
|
497
|
+
let a = 0, c = 0;
|
|
498
|
+
return Z.value && (c = Je.value), a + c;
|
|
499
|
+
}), d = N(() => {
|
|
500
|
+
if ($.value !== _.LINE) return null;
|
|
501
|
+
const a = {
|
|
502
|
+
height: b.value.height,
|
|
503
|
+
width: b.value.width
|
|
504
|
+
};
|
|
505
|
+
let c = _t();
|
|
506
|
+
if (Z.value) {
|
|
507
|
+
const v = Z.value.getBBox().x;
|
|
508
|
+
v < 0 && (c += Math.abs(v));
|
|
509
|
+
}
|
|
510
|
+
const t = {
|
|
511
|
+
left: c + e.value.xyPaddingLeft,
|
|
512
|
+
top: e.value.xyPaddingTop,
|
|
513
|
+
right: a.width - e.value.xyPaddingRight,
|
|
514
|
+
bottom: a.height - e.value.xyPaddingBottom - Ue.value,
|
|
515
|
+
width: Math.max(10, a.width - e.value.xyPaddingLeft - e.value.xyPaddingRight - c),
|
|
516
|
+
height: Math.max(10, a.height - e.value.xyPaddingTop - e.value.xyPaddingBottom - Ue.value)
|
|
517
|
+
};
|
|
518
|
+
let i = [];
|
|
519
|
+
ae(k.value.dataset) && (i = [
|
|
520
|
+
{
|
|
521
|
+
values: k.value.dataset.slice(m.value.start, m.value.end),
|
|
522
|
+
absoluteIndices: k.value.dataset.map((v, n) => n).slice(m.value.start, m.value.end),
|
|
523
|
+
name: e.value.title,
|
|
524
|
+
color: Ae.value[e.value.paletteStartIndex] || j[e.value.paletteStartIndex],
|
|
525
|
+
id: "line_0"
|
|
526
|
+
}
|
|
527
|
+
]), je(k.value.dataset) && (i = k.value.dataset.map((v, n) => ({
|
|
528
|
+
...v,
|
|
529
|
+
values: v.VALUE || v.DATA || v.SERIE || v.SERIES || v.VALUES || v.NUM || 0,
|
|
530
|
+
name: v.NAME || v.DESCRIPTION || v.TITLE || v.LABEL || `Serie ${n}`,
|
|
531
|
+
id: `line_${n}`
|
|
532
|
+
})).map((v, n) => ({
|
|
533
|
+
...v,
|
|
534
|
+
color: v.COLOR ? tt(v.COLOR) : Ae.value[n + e.value.paletteStartIndex] || j[n + e.value.paletteStartIndex] || j[(n + e.value.paletteStartIndex) % j.length],
|
|
535
|
+
values: v.values.slice(m.value.start, m.value.end),
|
|
536
|
+
absoluteIndices: v.values.map((y, E) => E).slice(m.value.start, m.value.end)
|
|
537
|
+
})));
|
|
538
|
+
const u = {
|
|
539
|
+
max: Math.max(...i.filter((v) => !A.value.includes(v.id)).flatMap((v) => v.values)),
|
|
540
|
+
min: Math.min(...i.filter((v) => !A.value.includes(v.id)).flatMap((v) => v.values)),
|
|
541
|
+
maxSeries: Math.max(...i.map((v) => v.values.length))
|
|
542
|
+
}, x = Tt(u.min < 0 ? u.min : 0, u.max < 0 ? 0 : u.max, e.value.xyScaleSegments), L = u.min < 0 ? Math.abs(u.min) : 0, ie = u.max < 0 ? t.top : t.bottom - L / (x.max + L) * t.height, X = t.width / u.maxSeries, ye = x.ticks.map((v) => ({
|
|
543
|
+
y: t.bottom - t.height * ((v + L) / (x.max + L)),
|
|
544
|
+
x: t.left - 8,
|
|
545
|
+
value: v
|
|
546
|
+
})), ve = i.map((v, n) => ({
|
|
547
|
+
...v,
|
|
548
|
+
coordinates: v.values.map((y, E) => ({
|
|
549
|
+
x: t.left + X * (E + 1) - X / 2,
|
|
550
|
+
y: t.bottom - (y + L) / (x.max + L) * t.height,
|
|
551
|
+
value: y
|
|
552
|
+
}))
|
|
553
|
+
})).map((v) => {
|
|
554
|
+
let n = [];
|
|
555
|
+
return v.coordinates.forEach((y) => {
|
|
556
|
+
n.push(`${y.x},${y.y} `);
|
|
557
|
+
}), {
|
|
558
|
+
...v,
|
|
559
|
+
linePath: n.join(" ")
|
|
560
|
+
};
|
|
561
|
+
});
|
|
562
|
+
function ue(v) {
|
|
563
|
+
return i.map((n) => ({
|
|
564
|
+
...n,
|
|
565
|
+
value: n.values[v],
|
|
566
|
+
absoluteIndex: n.absoluteIndices[v]
|
|
567
|
+
})).filter((n) => !A.value.includes(n.id));
|
|
568
|
+
}
|
|
569
|
+
function Q(v) {
|
|
570
|
+
Y.value = v, J.value = v;
|
|
571
|
+
const n = ue(v);
|
|
572
|
+
we.value = { datapoint: n, seriesIndex: v, config: e.value, dataset: i };
|
|
573
|
+
const y = e.value.tooltipCustomFormat;
|
|
574
|
+
if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: n, seriesIndex: v + m.value.start }), Xe(y) && lt(() => y({
|
|
575
|
+
datapoint: n,
|
|
576
|
+
seriesIndex: v,
|
|
577
|
+
series: i,
|
|
578
|
+
config: e.value
|
|
579
|
+
})))
|
|
580
|
+
se.value = y({
|
|
581
|
+
datapoint: n,
|
|
582
|
+
seriesIndex: v,
|
|
583
|
+
series: i,
|
|
584
|
+
config: e.value
|
|
585
|
+
});
|
|
586
|
+
else {
|
|
587
|
+
let E = "";
|
|
588
|
+
G.value[n[0].absoluteIndex] && (E += `<div style="border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${G.value[n[0].absoluteIndex].text}</div>`), n.forEach((V, q) => {
|
|
589
|
+
E += `
|
|
590
|
+
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
591
|
+
<svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${V.color}"/></svg>
|
|
592
|
+
<span>${V.name}:</span>
|
|
593
|
+
<b>${ee(
|
|
594
|
+
e.value.formatter,
|
|
595
|
+
V.value,
|
|
596
|
+
W({
|
|
597
|
+
p: e.value.valuePrefix,
|
|
598
|
+
v: V.value,
|
|
599
|
+
s: e.value.valueSuffix,
|
|
600
|
+
r: e.value.dataLabelRoundingValue
|
|
601
|
+
}),
|
|
602
|
+
{ datapoint: V, seriesIndex: q }
|
|
603
|
+
)}
|
|
604
|
+
</b>
|
|
605
|
+
</div>
|
|
606
|
+
`;
|
|
607
|
+
}), se.value = E;
|
|
608
|
+
}
|
|
609
|
+
re.value = !0;
|
|
610
|
+
}
|
|
611
|
+
function f(v) {
|
|
612
|
+
const n = ue(v);
|
|
613
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: n, seriesIndex: v + m.value.start }), Y.value = null, J.value = null, re.value = !1;
|
|
614
|
+
}
|
|
615
|
+
function C(v) {
|
|
616
|
+
const n = ue(v);
|
|
617
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: n, seriesIndex: v + m.value.start }), ge("selectDatapoint", n);
|
|
618
|
+
}
|
|
619
|
+
return {
|
|
620
|
+
absoluteZero: ie,
|
|
621
|
+
dataset: ve.filter((v) => !A.value.includes(v.id)),
|
|
622
|
+
legend: ve,
|
|
623
|
+
drawingArea: t,
|
|
624
|
+
extremes: u,
|
|
625
|
+
slotSize: X,
|
|
626
|
+
yLabels: ye,
|
|
627
|
+
useTooltip: Q,
|
|
628
|
+
killTooltip: f,
|
|
629
|
+
selectDatapoint: C
|
|
630
|
+
};
|
|
631
|
+
}), s = N(() => {
|
|
632
|
+
if ($.value !== _.BAR) return null;
|
|
633
|
+
const a = {
|
|
634
|
+
height: b.value.height,
|
|
635
|
+
width: b.value.width
|
|
636
|
+
};
|
|
637
|
+
let c = _t();
|
|
638
|
+
if (Z.value) {
|
|
639
|
+
const n = Z.value.getBBox().x;
|
|
640
|
+
n < 0 && (c += Math.abs(n));
|
|
641
|
+
}
|
|
642
|
+
const t = {
|
|
643
|
+
left: c + e.value.xyPaddingLeft,
|
|
644
|
+
top: e.value.xyPaddingTop,
|
|
645
|
+
right: a.width - e.value.xyPaddingRight,
|
|
646
|
+
bottom: a.height - e.value.xyPaddingBottom - Ue.value,
|
|
647
|
+
width: Math.max(10, a.width - e.value.xyPaddingLeft - e.value.xyPaddingRight - c),
|
|
648
|
+
height: Math.max(10, a.height - e.value.xyPaddingTop - e.value.xyPaddingBottom - Ue.value)
|
|
649
|
+
};
|
|
650
|
+
let i = [];
|
|
651
|
+
ae(k.value.dataset) && (i = [
|
|
652
|
+
{
|
|
653
|
+
values: k.value.dataset.slice(m.value.start, m.value.end),
|
|
654
|
+
absoluteIndices: k.value.dataset.map((n, y) => y).slice(m.value.start, m.value.end),
|
|
655
|
+
name: e.value.title,
|
|
656
|
+
color: Ae.value[e.value.paletteStartIndex] || j[e.value.paletteStartIndex],
|
|
657
|
+
id: "bar_0"
|
|
658
|
+
}
|
|
659
|
+
]), je(k.value.dataset) && (i = k.value.dataset.map((n, y) => ({
|
|
660
|
+
...n,
|
|
661
|
+
values: n.VALUE || n.DATA || n.SERIE || n.SERIES || n.VALUES || n.NUM || 0,
|
|
662
|
+
name: n.NAME || n.DESCRIPTION || n.TITLE || n.LABEL || `Serie ${y}`,
|
|
663
|
+
id: `bar_${y}`
|
|
664
|
+
})).map((n, y) => ({
|
|
665
|
+
...n,
|
|
666
|
+
color: n.COLOR ? tt(n.COLOR) : Ae.value[y + e.value.paletteStartIndex] || j[y + e.value.paletteStartIndex] || j[(y + e.value.paletteStartIndex) % j.length],
|
|
667
|
+
values: n.values.slice(m.value.start, m.value.end),
|
|
668
|
+
absoluteIndices: n.values.map((E, V) => V).slice(m.value.start, m.value.end)
|
|
669
|
+
})));
|
|
670
|
+
const u = {
|
|
671
|
+
max: Math.max(...i.filter((n) => !A.value.includes(n.id)).flatMap((n) => n.values)) < 0 ? 0 : Math.max(...i.filter((n) => !A.value.includes(n.id)).flatMap((n) => n.values)),
|
|
672
|
+
min: Math.min(...i.filter((n) => !A.value.includes(n.id)).flatMap((n) => n.values)),
|
|
673
|
+
maxSeries: Math.max(...i.filter((n) => !A.value.includes(n.id)).map((n) => n.values.length))
|
|
674
|
+
}, x = Tt(u.min < 0 ? u.min : 0, u.max, e.value.xyScaleSegments), L = x.min < 0 ? Math.abs(x.min) : 0, ie = t.bottom - L / (x.max + L) * t.height, X = t.width / u.maxSeries, ye = x.ticks.map((n) => ({
|
|
675
|
+
y: t.bottom - t.height * ((n + L) / (x.max + L)),
|
|
676
|
+
x: t.left - 8,
|
|
677
|
+
value: n
|
|
678
|
+
})), ve = i.map((n, y) => ({
|
|
679
|
+
...n,
|
|
680
|
+
coordinates: n.values.map((E, V) => {
|
|
681
|
+
const q = (E + L) / (u.max + L) * t.height, ze = Math.abs(E) / Math.abs(u.min) * (t.height - ie), Ke = L / (u.max + L) * t.height, Ce = X / i.filter((de) => !A.value.includes(de.id)).length - e.value.barGap / i.filter((de) => !A.value.includes(de.id)).length;
|
|
682
|
+
return {
|
|
683
|
+
x: t.left + X * V + Ce * y + e.value.barGap / 2,
|
|
684
|
+
y: E > 0 ? t.bottom - q : ie,
|
|
685
|
+
height: E > 0 ? q - Ke : ze,
|
|
686
|
+
value: E,
|
|
687
|
+
width: Ce
|
|
688
|
+
};
|
|
689
|
+
})
|
|
690
|
+
})), ue = i.filter((n) => !A.value.includes(n.id)).map((n, y) => ({
|
|
691
|
+
...n,
|
|
692
|
+
coordinates: n.values.map((E, V) => {
|
|
693
|
+
const q = (E + L) / (u.max + L) * t.height, ze = Math.abs(E) / (u.max + L) * t.height, Ke = L / (u.max + L) * t.height, Ce = X / i.filter((de) => !A.value.includes(de.id)).length - e.value.barGap / i.filter((de) => !A.value.includes(de.id)).length;
|
|
694
|
+
return {
|
|
695
|
+
x: t.left + X * V + Ce * y + e.value.barGap / 2,
|
|
696
|
+
y: E > 0 ? t.bottom - q : ie,
|
|
697
|
+
height: E > 0 ? q - Ke : ze,
|
|
698
|
+
value: E,
|
|
699
|
+
width: Ce
|
|
700
|
+
};
|
|
701
|
+
})
|
|
702
|
+
}));
|
|
703
|
+
function Q(n) {
|
|
704
|
+
return i.map((y) => ({
|
|
705
|
+
...y,
|
|
706
|
+
value: y.values[n],
|
|
707
|
+
absoluteIndex: y.absoluteIndices[n]
|
|
708
|
+
})).filter((y) => !A.value.includes(y.id));
|
|
709
|
+
}
|
|
710
|
+
function f(n) {
|
|
711
|
+
Y.value = n, J.value = n;
|
|
712
|
+
const y = Q(n);
|
|
713
|
+
we.value = { datapoint: y, seriesIndex: n, config: e.value, dataset: i };
|
|
714
|
+
const E = e.value.tooltipCustomFormat;
|
|
715
|
+
if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: y, seriesIndex: n + m.value.start }), Xe(E) && lt(() => E({
|
|
716
|
+
datapoint: y,
|
|
717
|
+
seriesIndex: n,
|
|
718
|
+
series: i,
|
|
719
|
+
config: e.value
|
|
720
|
+
})))
|
|
721
|
+
se.value = E({
|
|
722
|
+
point: y,
|
|
723
|
+
seriesIndex: n,
|
|
724
|
+
series: i,
|
|
725
|
+
config: e.value
|
|
726
|
+
});
|
|
727
|
+
else {
|
|
728
|
+
let V = "";
|
|
729
|
+
G.value[y[0].absoluteIndex] && (V += `<div style="border-bottom:1px solid ${e.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${G.value[y[0].absoluteIndex].text}</div>`), y.forEach((q, ze) => {
|
|
730
|
+
V += `
|
|
731
|
+
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
732
|
+
<svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${q.color}"/></svg>
|
|
733
|
+
<span>${q.name}:</span>
|
|
734
|
+
<b>${ee(
|
|
735
|
+
e.value.formatter,
|
|
736
|
+
q.value,
|
|
737
|
+
W({
|
|
738
|
+
p: e.value.valuePrefix,
|
|
739
|
+
v: q.value,
|
|
740
|
+
s: e.value.valueSuffix,
|
|
741
|
+
r: e.value.dataLabelRoundingValue
|
|
742
|
+
}),
|
|
743
|
+
{ datapoint: q, seriesIndex: ze }
|
|
744
|
+
)}
|
|
745
|
+
</b>
|
|
746
|
+
</div>
|
|
747
|
+
`;
|
|
748
|
+
}), se.value = V;
|
|
749
|
+
}
|
|
750
|
+
re.value = !0;
|
|
751
|
+
}
|
|
752
|
+
function C(n) {
|
|
753
|
+
const y = Q(n);
|
|
754
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: y, seriesIndex: n + m.value.start }), re.value = !1, Y.value = null, J.value = null;
|
|
755
|
+
}
|
|
756
|
+
function v(n) {
|
|
757
|
+
const y = Q(n);
|
|
758
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: y, seriesIndex: n + m.value.start }), ge("selectDatapoint", y);
|
|
759
|
+
}
|
|
760
|
+
return {
|
|
761
|
+
absoluteZero: ie,
|
|
762
|
+
dataset: ue.filter((n) => !A.value.includes(n.id)),
|
|
763
|
+
legend: ve,
|
|
764
|
+
drawingArea: t,
|
|
765
|
+
extremes: u,
|
|
766
|
+
slotSize: X,
|
|
767
|
+
yLabels: ye,
|
|
768
|
+
useTooltip: f,
|
|
769
|
+
killTooltip: C,
|
|
770
|
+
selectDatapoint: v
|
|
771
|
+
};
|
|
772
|
+
}), G = N(() => ya({
|
|
773
|
+
values: e.value.xyPeriods,
|
|
774
|
+
maxDatapoints: k.value.maxSeriesLength,
|
|
775
|
+
formatter: e.value.datetimeFormatter,
|
|
776
|
+
start: m.value.start,
|
|
777
|
+
end: m.value.end
|
|
778
|
+
})), xe = N(() => {
|
|
779
|
+
const a = e.value.xyPeriodsModulo;
|
|
780
|
+
return e.value.xyPeriods.length ? Math.min(a, [...new Set(G.value.map((c) => c.text))].length) : a;
|
|
781
|
+
}), Ve = w(!1);
|
|
782
|
+
function zt(a) {
|
|
783
|
+
Ve.value = a, st.value += 1;
|
|
784
|
+
}
|
|
785
|
+
function Ct() {
|
|
786
|
+
me.value.showTooltip = !me.value.showTooltip;
|
|
787
|
+
}
|
|
788
|
+
const He = w(!1);
|
|
789
|
+
function Qe() {
|
|
790
|
+
He.value = !He.value;
|
|
791
|
+
}
|
|
792
|
+
async function Qt({ scale: a = 2 } = {}) {
|
|
793
|
+
if (!R.value) return;
|
|
794
|
+
const { width: c, height: t } = R.value.getBoundingClientRect(), i = c / t, { imageUri: u, base64: x } = await Sa({ domElement: R.value, base64: !0, img: !0, scale: a });
|
|
795
|
+
return {
|
|
796
|
+
imageUri: u,
|
|
797
|
+
base64: x,
|
|
798
|
+
title: e.value.title,
|
|
799
|
+
width: c,
|
|
800
|
+
height: t,
|
|
801
|
+
aspectRatio: i
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
const Kt = N(() => b.value.width), ea = N(() => b.value.height);
|
|
805
|
+
return ba({
|
|
806
|
+
timeLabelsEls: Z,
|
|
807
|
+
timeLabels: G,
|
|
808
|
+
slicer: m,
|
|
809
|
+
configRef: e,
|
|
810
|
+
rotationPath: ["xyPeriodLabelsRotation"],
|
|
811
|
+
autoRotatePath: ["xyPeriodLabelsAutoRotate"],
|
|
812
|
+
isAutoSize: !1,
|
|
813
|
+
height: ea.value,
|
|
814
|
+
width: Kt.value
|
|
815
|
+
}), P({
|
|
816
|
+
getImage: Qt,
|
|
817
|
+
generatePdf: mt,
|
|
818
|
+
generateImage: pt,
|
|
819
|
+
toggleTooltip: Ct,
|
|
820
|
+
toggleAnnotator: Qe,
|
|
821
|
+
toggleFullscreen: zt
|
|
822
|
+
}), (a, c) => Ht.value ? (l(), o("div", {
|
|
823
|
+
key: 0,
|
|
824
|
+
id: `${$.value}_${oe.value}`,
|
|
825
|
+
ref_key: "quickChart",
|
|
826
|
+
ref: R,
|
|
827
|
+
class: ce({ "vue-ui-quick-chart": !0, "vue-data-ui-wrapper-fullscreen": Ve.value }),
|
|
828
|
+
style: O(`background:${e.value.backgroundColor};color:${e.value.color};font-family:${e.value.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
|
|
829
|
+
onMouseenter: c[2] || (c[2] = () => gt(!0)),
|
|
830
|
+
onMouseleave: c[3] || (c[3] = () => gt(!1))
|
|
831
|
+
}, [
|
|
832
|
+
e.value.userOptionsButtons.annotator ? (l(), qe(r(le), {
|
|
833
|
+
key: 0,
|
|
834
|
+
svgRef: r(ht),
|
|
835
|
+
backgroundColor: e.value.backgroundColor,
|
|
836
|
+
color: e.value.color,
|
|
837
|
+
active: He.value,
|
|
838
|
+
onClose: Qe
|
|
839
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
|
|
840
|
+
qt.value ? (l(), o("div", {
|
|
841
|
+
key: 1,
|
|
842
|
+
ref_key: "noTitle",
|
|
843
|
+
ref: rt,
|
|
844
|
+
class: "vue-data-ui-no-title-space",
|
|
845
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
846
|
+
}, null, 512)) : g("", !0),
|
|
847
|
+
e.value.showUserOptions && (ft.value || Fe.value) ? (l(), qe(r(ot), {
|
|
848
|
+
ref: "details",
|
|
849
|
+
key: `user_option_${st.value}`,
|
|
850
|
+
backgroundColor: e.value.backgroundColor,
|
|
851
|
+
color: e.value.color,
|
|
852
|
+
isPrinting: r(Ne),
|
|
853
|
+
isImaging: r(Be),
|
|
854
|
+
uid: oe.value,
|
|
855
|
+
hasTooltip: e.value.userOptionsButtons.tooltip && e.value.showTooltip,
|
|
856
|
+
hasPdf: e.value.userOptionsButtons.pdf,
|
|
857
|
+
hasImg: e.value.userOptionsButtons.img,
|
|
858
|
+
hasFullscreen: e.value.userOptionsButtons.fullscreen,
|
|
859
|
+
hasXls: !1,
|
|
860
|
+
isTooltip: me.value.showTooltip,
|
|
861
|
+
isFullscreen: Ve.value,
|
|
862
|
+
titles: { ...e.value.userOptionsButtonTitles },
|
|
863
|
+
chartElement: R.value,
|
|
864
|
+
position: e.value.userOptionsPosition,
|
|
865
|
+
hasAnnotator: e.value.userOptionsButtons.annotator,
|
|
866
|
+
isAnnotation: He.value,
|
|
867
|
+
callbacks: e.value.userOptionsCallbacks,
|
|
868
|
+
printScale: e.value.userOptionsPrint.scale,
|
|
869
|
+
onToggleFullscreen: zt,
|
|
870
|
+
onGeneratePdf: r(mt),
|
|
871
|
+
onGenerateImage: r(pt),
|
|
872
|
+
onToggleTooltip: Ct,
|
|
873
|
+
onToggleAnnotator: Qe,
|
|
874
|
+
style: O({
|
|
875
|
+
visibility: ft.value ? Fe.value ? "visible" : "hidden" : "visible"
|
|
876
|
+
})
|
|
877
|
+
}, oa({ _: 2 }, [
|
|
878
|
+
a.$slots.menuIcon ? {
|
|
879
|
+
name: "menuIcon",
|
|
880
|
+
fn: K(({ isOpen: t, color: i }) => [
|
|
881
|
+
U(a.$slots, "menuIcon", he(fe({ isOpen: t, color: i })), void 0, !0)
|
|
882
|
+
]),
|
|
883
|
+
key: "0"
|
|
884
|
+
} : void 0,
|
|
885
|
+
a.$slots.optionTooltip ? {
|
|
886
|
+
name: "optionTooltip",
|
|
887
|
+
fn: K(() => [
|
|
888
|
+
U(a.$slots, "optionTooltip", {}, void 0, !0)
|
|
889
|
+
]),
|
|
890
|
+
key: "1"
|
|
891
|
+
} : void 0,
|
|
892
|
+
a.$slots.optionPdf ? {
|
|
893
|
+
name: "optionPdf",
|
|
894
|
+
fn: K(() => [
|
|
895
|
+
U(a.$slots, "optionPdf", {}, void 0, !0)
|
|
896
|
+
]),
|
|
897
|
+
key: "2"
|
|
898
|
+
} : void 0,
|
|
899
|
+
a.$slots.optionImg ? {
|
|
900
|
+
name: "optionImg",
|
|
901
|
+
fn: K(() => [
|
|
902
|
+
U(a.$slots, "optionImg", {}, void 0, !0)
|
|
903
|
+
]),
|
|
904
|
+
key: "3"
|
|
905
|
+
} : void 0,
|
|
906
|
+
a.$slots.optionFullscreen ? {
|
|
907
|
+
name: "optionFullscreen",
|
|
908
|
+
fn: K(({ toggleFullscreen: t, isFullscreen: i }) => [
|
|
909
|
+
U(a.$slots, "optionFullscreen", he(fe({ toggleFullscreen: t, isFullscreen: i })), void 0, !0)
|
|
910
|
+
]),
|
|
911
|
+
key: "4"
|
|
912
|
+
} : void 0,
|
|
913
|
+
a.$slots.optionAnnotator ? {
|
|
914
|
+
name: "optionAnnotator",
|
|
915
|
+
fn: K(({ toggleAnnotator: t, isAnnotator: i }) => [
|
|
916
|
+
U(a.$slots, "optionAnnotator", he(fe({ toggleAnnotator: t, isAnnotator: i })), void 0, !0)
|
|
917
|
+
]),
|
|
918
|
+
key: "5"
|
|
919
|
+
} : void 0
|
|
920
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
|
|
921
|
+
e.value.title ? (l(), o("div", {
|
|
922
|
+
key: 3,
|
|
923
|
+
ref_key: "quickChartTitle",
|
|
924
|
+
ref: Pe,
|
|
925
|
+
class: "vue-ui-quick-chart-title",
|
|
926
|
+
style: O(`background:transparent;color:${e.value.color};font-size:${e.value.titleFontSize}px;font-weight:${e.value.titleBold ? "bold" : "normal"};text-align:${e.value.titleTextAlign}`)
|
|
927
|
+
}, F(e.value.title), 5)) : g("", !0),
|
|
928
|
+
$.value ? (l(), o("svg", {
|
|
929
|
+
key: 4,
|
|
930
|
+
ref_key: "svgRef",
|
|
931
|
+
ref: ht,
|
|
932
|
+
xmlns: r(ga),
|
|
933
|
+
viewBox: Wt.value,
|
|
934
|
+
style: O(`max-width:100%;overflow:visible;background:transparent;color:${e.value.color}`)
|
|
935
|
+
}, [
|
|
936
|
+
ke(r(H)),
|
|
937
|
+
a.$slots["chart-background"] && $.value === _.BAR ? (l(), o("foreignObject", {
|
|
938
|
+
key: 0,
|
|
939
|
+
x: s.value.drawingArea.left,
|
|
940
|
+
y: s.value.drawingArea.top,
|
|
941
|
+
width: s.value.drawingArea.width,
|
|
942
|
+
height: s.value.drawingArea.height,
|
|
943
|
+
style: {
|
|
944
|
+
pointerEvents: "none"
|
|
945
|
+
}
|
|
946
|
+
}, [
|
|
947
|
+
U(a.$slots, "chart-background", {}, void 0, !0)
|
|
948
|
+
], 8, Ra)) : g("", !0),
|
|
949
|
+
a.$slots["chart-background"] && $.value === _.LINE ? (l(), o("foreignObject", {
|
|
950
|
+
key: 1,
|
|
951
|
+
x: d.value.drawingArea.left,
|
|
952
|
+
y: d.value.drawingArea.top,
|
|
953
|
+
width: d.value.drawingArea.width,
|
|
954
|
+
height: d.value.drawingArea.height,
|
|
955
|
+
style: {
|
|
956
|
+
pointerEvents: "none"
|
|
957
|
+
}
|
|
958
|
+
}, [
|
|
959
|
+
U(a.$slots, "chart-background", {}, void 0, !0)
|
|
960
|
+
], 8, Ma)) : g("", !0),
|
|
961
|
+
a.$slots["chart-background"] && $.value === _.DONUT ? (l(), o("foreignObject", {
|
|
962
|
+
key: 2,
|
|
963
|
+
x: 0,
|
|
964
|
+
y: 0,
|
|
965
|
+
width: b.value.width,
|
|
966
|
+
height: b.value.height,
|
|
967
|
+
style: {
|
|
968
|
+
pointerEvents: "none"
|
|
969
|
+
}
|
|
970
|
+
}, [
|
|
971
|
+
U(a.$slots, "chart-background", {}, void 0, !0)
|
|
972
|
+
], 8, Fa)) : g("", !0),
|
|
973
|
+
z("defs", null, [
|
|
974
|
+
z("filter", {
|
|
975
|
+
id: `blur_${oe.value}`,
|
|
976
|
+
x: "-50%",
|
|
977
|
+
y: "-50%",
|
|
978
|
+
width: "200%",
|
|
979
|
+
height: "200%"
|
|
980
|
+
}, [
|
|
981
|
+
z("feGaussianBlur", {
|
|
982
|
+
in: "SourceGraphic",
|
|
983
|
+
stdDeviation: 2,
|
|
984
|
+
id: `blur_std_${oe.value}`
|
|
985
|
+
}, null, 8, Ba),
|
|
986
|
+
c[4] || (c[4] = z("feColorMatrix", {
|
|
987
|
+
type: "saturate",
|
|
988
|
+
values: "0"
|
|
989
|
+
}, null, -1))
|
|
990
|
+
], 8, Na),
|
|
991
|
+
z("filter", {
|
|
992
|
+
id: `shadow_${oe.value}`,
|
|
993
|
+
"color-interpolation-filters": "sRGB"
|
|
994
|
+
}, [
|
|
995
|
+
z("feDropShadow", {
|
|
996
|
+
dx: "0",
|
|
997
|
+
dy: "0",
|
|
998
|
+
stdDeviation: "10",
|
|
999
|
+
"flood-opacity": "0.5",
|
|
1000
|
+
"flood-color": e.value.donutShadowColor
|
|
1001
|
+
}, null, 8, Ua)
|
|
1002
|
+
], 8, Da)
|
|
1003
|
+
]),
|
|
1004
|
+
$.value === _.DONUT ? (l(), o(p, { key: 3 }, [
|
|
1005
|
+
e.value.showDataLabels ? (l(), o("g", Va, [
|
|
1006
|
+
(l(!0), o(p, null, I(T.value.chart, (t, i) => (l(), o(p, null, [
|
|
1007
|
+
T.value.isArcBigEnough(t) ? (l(), o("path", {
|
|
1008
|
+
key: 0,
|
|
1009
|
+
d: r(ma)(t, { x: b.value.width / 2, y: b.value.height / 2 }, 16, 16, !1, !1, b.value.height * wt.value, 12, e.value.donutCurvedMarkers),
|
|
1010
|
+
stroke: t.color,
|
|
1011
|
+
"stroke-width": e.value.donutLabelMarkerStrokeWidth,
|
|
1012
|
+
"stroke-linecap": "round",
|
|
1013
|
+
"stroke-linejoin": "round",
|
|
1014
|
+
fill: "none",
|
|
1015
|
+
filter: _e(t.id)
|
|
1016
|
+
}, null, 8, Ha)) : g("", !0)
|
|
1017
|
+
], 64))), 256))
|
|
1018
|
+
])) : g("", !0),
|
|
1019
|
+
z("circle", {
|
|
1020
|
+
cx: T.value.cx,
|
|
1021
|
+
cy: T.value.cy,
|
|
1022
|
+
r: T.value.radius,
|
|
1023
|
+
fill: e.value.backgroundColor,
|
|
1024
|
+
filter: e.value.donutUseShadow ? `url(#shadow_${oe.value})` : ""
|
|
1025
|
+
}, null, 8, qa),
|
|
1026
|
+
z("g", Wa, [
|
|
1027
|
+
(l(!0), o(p, null, I(T.value.chart, (t, i) => (l(), o("path", {
|
|
1028
|
+
d: t.arcSlice,
|
|
1029
|
+
fill: t.color,
|
|
1030
|
+
stroke: Me.value,
|
|
1031
|
+
"stroke-width": e.value.donutStrokeWidth,
|
|
1032
|
+
filter: _e(t.id)
|
|
1033
|
+
}, null, 8, Xa))), 256)),
|
|
1034
|
+
(l(!0), o(p, null, I(T.value.chart, (t, i) => (l(), o("path", {
|
|
1035
|
+
d: t.arcSlice,
|
|
1036
|
+
fill: "transparent",
|
|
1037
|
+
onMouseenter: (u) => T.value.useTooltip({ datapoint: t, seriesIndex: i }),
|
|
1038
|
+
onMouseout: (u) => T.value.killTooltip({ datapoint: t, seriesIndex: i }),
|
|
1039
|
+
onClick: (u) => T.value.selectDatapoint({ datapoint: t, seriesIndex: i })
|
|
1040
|
+
}, null, 40, ja))), 256))
|
|
1041
|
+
]),
|
|
1042
|
+
e.value.showDataLabels ? (l(), o("g", Ga, [
|
|
1043
|
+
(l(!0), o(p, null, I(T.value.chart, (t, i) => (l(), o(p, null, [
|
|
1044
|
+
T.value.isArcBigEnough(t) ? (l(), o("circle", {
|
|
1045
|
+
key: 0,
|
|
1046
|
+
cx: r(Ee)(t).x,
|
|
1047
|
+
cy: r(at)(t) - 3.7,
|
|
1048
|
+
fill: t.color,
|
|
1049
|
+
stroke: e.value.backgroundColor,
|
|
1050
|
+
"stroke-width": 1,
|
|
1051
|
+
r: 3,
|
|
1052
|
+
filter: _e(t.id)
|
|
1053
|
+
}, null, 8, Ya)) : g("", !0),
|
|
1054
|
+
T.value.isArcBigEnough(t) ? (l(), o("text", {
|
|
1055
|
+
key: 1,
|
|
1056
|
+
"text-anchor": r(Ee)(t, !0, 20).anchor,
|
|
1057
|
+
x: r(Ee)(t, !0).x,
|
|
1058
|
+
y: r(at)(t),
|
|
1059
|
+
fill: e.value.color,
|
|
1060
|
+
"font-size": e.value.dataLabelFontSize,
|
|
1061
|
+
filter: _e(t.id)
|
|
1062
|
+
}, F(T.value.displayArcPercentage(t, T.value.chart)) + " (" + F(r(ee)(
|
|
1063
|
+
e.value.formatter,
|
|
1064
|
+
t.value,
|
|
1065
|
+
r(W)({
|
|
1066
|
+
p: e.value.valuePrefix,
|
|
1067
|
+
v: t.value,
|
|
1068
|
+
s: e.value.valueSuffix,
|
|
1069
|
+
r: e.value.dataLabelRoundingValue
|
|
1070
|
+
}),
|
|
1071
|
+
{ datapoint: t, seriesIndex: i }
|
|
1072
|
+
)) + ") ", 9, Za)) : g("", !0),
|
|
1073
|
+
T.value.isArcBigEnough(t, !0, 20) ? (l(), o("text", {
|
|
1074
|
+
key: 2,
|
|
1075
|
+
"text-anchor": r(Ee)(t).anchor,
|
|
1076
|
+
x: r(Ee)(t, !0).x,
|
|
1077
|
+
y: r(at)(t) + e.value.dataLabelFontSize,
|
|
1078
|
+
fill: e.value.color,
|
|
1079
|
+
"font-size": e.value.dataLabelFontSize,
|
|
1080
|
+
filter: _e(t.id)
|
|
1081
|
+
}, F(t.name), 9, Ja)) : g("", !0)
|
|
1082
|
+
], 64))), 256))
|
|
1083
|
+
])) : g("", !0),
|
|
1084
|
+
e.value.donutShowTotal ? (l(), o("g", Qa, [
|
|
1085
|
+
z("text", {
|
|
1086
|
+
"text-anchor": "middle",
|
|
1087
|
+
x: T.value.drawingArea.centerX,
|
|
1088
|
+
y: T.value.drawingArea.centerY - e.value.donutTotalLabelFontSize / 2,
|
|
1089
|
+
"font-size": e.value.donutTotalLabelFontSize,
|
|
1090
|
+
fill: e.value.color
|
|
1091
|
+
}, F(e.value.donutTotalLabelText), 9, Ka),
|
|
1092
|
+
z("text", {
|
|
1093
|
+
"text-anchor": "middle",
|
|
1094
|
+
x: T.value.drawingArea.centerX,
|
|
1095
|
+
y: T.value.drawingArea.centerY + e.value.donutTotalLabelFontSize,
|
|
1096
|
+
"font-size": e.value.donutTotalLabelFontSize,
|
|
1097
|
+
fill: e.value.color
|
|
1098
|
+
}, F(r(W)({
|
|
1099
|
+
p: e.value.valuePrefix,
|
|
1100
|
+
v: T.value.total,
|
|
1101
|
+
s: e.value.valueSuffix,
|
|
1102
|
+
r: e.value.dataLabelRoundingValue
|
|
1103
|
+
})), 9, el)
|
|
1104
|
+
])) : g("", !0)
|
|
1105
|
+
], 64)) : g("", !0),
|
|
1106
|
+
$.value === _.LINE ? (l(), o(p, { key: 4 }, [
|
|
1107
|
+
e.value.xyShowGrid ? (l(), o("g", tl, [
|
|
1108
|
+
(l(!0), o(p, null, I(d.value.yLabels, (t) => (l(), o(p, null, [
|
|
1109
|
+
t.y <= d.value.drawingArea.bottom ? (l(), o("line", {
|
|
1110
|
+
key: 0,
|
|
1111
|
+
x1: d.value.drawingArea.left,
|
|
1112
|
+
x2: d.value.drawingArea.right,
|
|
1113
|
+
y1: t.y,
|
|
1114
|
+
y2: t.y,
|
|
1115
|
+
stroke: e.value.xyGridStroke,
|
|
1116
|
+
"stroke-width": e.value.xyGridStrokeWidth,
|
|
1117
|
+
"stroke-linecap": "round"
|
|
1118
|
+
}, null, 8, al)) : g("", !0)
|
|
1119
|
+
], 64))), 256)),
|
|
1120
|
+
(l(!0), o(p, null, I(d.value.extremes.maxSeries + 1, (t, i) => (l(), o("line", {
|
|
1121
|
+
x1: d.value.drawingArea.left + d.value.slotSize * i,
|
|
1122
|
+
x2: d.value.drawingArea.left + d.value.slotSize * i,
|
|
1123
|
+
y1: d.value.drawingArea.top,
|
|
1124
|
+
y2: d.value.drawingArea.bottom,
|
|
1125
|
+
stroke: e.value.xyGridStroke,
|
|
1126
|
+
"stroke-width": e.value.xyGridStrokeWidth,
|
|
1127
|
+
"stroke-linecap": "round"
|
|
1128
|
+
}, null, 8, ll))), 256))
|
|
1129
|
+
])) : g("", !0),
|
|
1130
|
+
e.value.xyShowAxis ? (l(), o("g", ol, [
|
|
1131
|
+
z("line", {
|
|
1132
|
+
x1: d.value.drawingArea.left,
|
|
1133
|
+
x2: d.value.drawingArea.left,
|
|
1134
|
+
y1: d.value.drawingArea.top,
|
|
1135
|
+
y2: d.value.drawingArea.bottom,
|
|
1136
|
+
stroke: e.value.xyAxisStroke,
|
|
1137
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1138
|
+
"stroke-linecap": "round"
|
|
1139
|
+
}, null, 8, nl),
|
|
1140
|
+
z("line", {
|
|
1141
|
+
x1: d.value.drawingArea.left,
|
|
1142
|
+
x2: d.value.drawingArea.right,
|
|
1143
|
+
y1: isNaN(d.value.absoluteZero) ? d.value.drawingArea.bottom : d.value.absoluteZero,
|
|
1144
|
+
y2: isNaN(d.value.absoluteZero) ? d.value.drawingArea.bottom : d.value.absoluteZero,
|
|
1145
|
+
stroke: e.value.xyAxisStroke,
|
|
1146
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1147
|
+
"stroke-linecap": "round"
|
|
1148
|
+
}, null, 8, il)
|
|
1149
|
+
])) : g("", !0),
|
|
1150
|
+
e.value.xyShowScale ? (l(), o("g", {
|
|
1151
|
+
key: 2,
|
|
1152
|
+
class: "yLabels",
|
|
1153
|
+
ref_key: "scaleLabels",
|
|
1154
|
+
ref: Re
|
|
1155
|
+
}, [
|
|
1156
|
+
(l(!0), o(p, null, I(d.value.yLabels, (t, i) => (l(), o(p, null, [
|
|
1157
|
+
t.y <= d.value.drawingArea.bottom ? (l(), o("line", {
|
|
1158
|
+
key: 0,
|
|
1159
|
+
x1: t.x + 4,
|
|
1160
|
+
x2: d.value.drawingArea.left,
|
|
1161
|
+
y1: t.y,
|
|
1162
|
+
y2: t.y,
|
|
1163
|
+
stroke: e.value.xyAxisStroke,
|
|
1164
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1165
|
+
"stroke-linecap": "round"
|
|
1166
|
+
}, null, 8, ul)) : g("", !0),
|
|
1167
|
+
t.y <= d.value.drawingArea.bottom ? (l(), o("text", {
|
|
1168
|
+
key: 1,
|
|
1169
|
+
x: t.x,
|
|
1170
|
+
y: t.y + e.value.xyLabelsYFontSize / 3,
|
|
1171
|
+
"text-anchor": "end",
|
|
1172
|
+
"font-size": e.value.xyLabelsYFontSize,
|
|
1173
|
+
fill: e.value.color
|
|
1174
|
+
}, F(r(ee)(
|
|
1175
|
+
e.value.formatter,
|
|
1176
|
+
t.value,
|
|
1177
|
+
r(W)({
|
|
1178
|
+
p: e.value.valuePrefix,
|
|
1179
|
+
v: t.value,
|
|
1180
|
+
s: e.value.valueSuffix,
|
|
1181
|
+
r: e.value.dataLabelRoundingValue
|
|
1182
|
+
}),
|
|
1183
|
+
{ datapoint: t, seriesIndex: i }
|
|
1184
|
+
)), 9, rl)) : g("", !0)
|
|
1185
|
+
], 64))), 256))
|
|
1186
|
+
], 512)) : g("", !0),
|
|
1187
|
+
e.value.xyShowScale && e.value.xyPeriods.length ? (l(), o("g", sl, [
|
|
1188
|
+
(l(!0), o(p, null, I(G.value.map((t) => t.text), (t, i) => (l(), o(p, null, [
|
|
1189
|
+
!e.value.xyPeriodsShowOnlyAtModulo || e.value.xyPeriodsShowOnlyAtModulo && i % Math.floor((m.value.end - m.value.start) / xe.value) === 0 || m.value.end - m.value.start <= xe.value ? (l(), o("line", {
|
|
1190
|
+
key: 0,
|
|
1191
|
+
x1: d.value.drawingArea.left + d.value.slotSize * (i + 1) - d.value.slotSize / 2,
|
|
1192
|
+
x2: d.value.drawingArea.left + d.value.slotSize * (i + 1) - d.value.slotSize / 2,
|
|
1193
|
+
y1: d.value.drawingArea.bottom,
|
|
1194
|
+
y2: d.value.drawingArea.bottom + 4,
|
|
1195
|
+
stroke: e.value.xyAxisStroke,
|
|
1196
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1197
|
+
"stroke-linecap": "round"
|
|
1198
|
+
}, null, 8, vl)) : g("", !0)
|
|
1199
|
+
], 64))), 256)),
|
|
1200
|
+
z("g", {
|
|
1201
|
+
ref_key: "timeLabelsEls",
|
|
1202
|
+
ref: Z
|
|
1203
|
+
}, [
|
|
1204
|
+
(l(!0), o(p, null, I(G.value.map((t) => t.text), (t, i) => (l(), o(p, null, [
|
|
1205
|
+
!e.value.xyPeriodsShowOnlyAtModulo || e.value.xyPeriodsShowOnlyAtModulo && i % Math.floor((m.value.end - m.value.start) / xe.value) === 0 || m.value.end - m.value.start <= xe.value ? (l(), o("g", dl, [
|
|
1206
|
+
String(t).includes(`
|
|
1207
|
+
`) ? (l(), o("text", {
|
|
1208
|
+
key: 1,
|
|
1209
|
+
class: "vue-data-ui-time-label",
|
|
1210
|
+
"font-size": e.value.xyLabelsXFontSize,
|
|
1211
|
+
"text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
|
|
1212
|
+
fill: e.value.color,
|
|
1213
|
+
transform: `translate(${d.value.drawingArea.left + d.value.slotSize * (i + 1) - d.value.slotSize / 2}, ${d.value.drawingArea.bottom + e.value.xyLabelsXFontSize + 6}), rotate(${e.value.xyPeriodLabelsRotation})`,
|
|
1214
|
+
innerHTML: r(Pt)({
|
|
1215
|
+
content: String(t),
|
|
1216
|
+
fontSize: e.value.xyLabelsXFontSize,
|
|
1217
|
+
fill: e.value.color,
|
|
1218
|
+
x: 0,
|
|
1219
|
+
y: 0
|
|
1220
|
+
})
|
|
1221
|
+
}, null, 8, hl)) : (l(), o("text", {
|
|
1222
|
+
key: 0,
|
|
1223
|
+
class: "vue-data-ui-time-label",
|
|
1224
|
+
"font-size": e.value.xyLabelsXFontSize,
|
|
1225
|
+
"text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
|
|
1226
|
+
fill: e.value.color,
|
|
1227
|
+
transform: `translate(${d.value.drawingArea.left + d.value.slotSize * (i + 1) - d.value.slotSize / 2}, ${d.value.drawingArea.bottom + e.value.xyLabelsXFontSize + 6}), rotate(${e.value.xyPeriodLabelsRotation})`
|
|
1228
|
+
}, F(t), 9, cl))
|
|
1229
|
+
])) : g("", !0)
|
|
1230
|
+
], 64))), 256))
|
|
1231
|
+
], 512)
|
|
1232
|
+
])) : g("", !0),
|
|
1233
|
+
z("g", fl, [
|
|
1234
|
+
(l(!0), o(p, null, I(d.value.dataset, (t, i) => (l(), o("g", gl, [
|
|
1235
|
+
e.value.lineSmooth ? (l(), o(p, { key: 0 }, [
|
|
1236
|
+
z("path", {
|
|
1237
|
+
d: `M ${r(Ot)(t.coordinates)}`,
|
|
1238
|
+
stroke: e.value.backgroundColor,
|
|
1239
|
+
"stroke-width": e.value.lineStrokeWidth + 1,
|
|
1240
|
+
"stroke-linecap": "round",
|
|
1241
|
+
fill: "none",
|
|
1242
|
+
class: ce({ "quick-animation": !r(D), "vue-data-ui-line-animated": e.value.lineAnimated && !r(D) }),
|
|
1243
|
+
style: O({ transition: r(D) ? void 0 : "all 0.3s ease-in-out" })
|
|
1244
|
+
}, null, 14, ml),
|
|
1245
|
+
z("path", {
|
|
1246
|
+
d: `M ${r(Ot)(t.coordinates)}`,
|
|
1247
|
+
stroke: t.color,
|
|
1248
|
+
"stroke-width": e.value.lineStrokeWidth,
|
|
1249
|
+
"stroke-linecap": "round",
|
|
1250
|
+
fill: "none",
|
|
1251
|
+
class: ce({ "quick-animation": !r(D), "vue-data-ui-line-animated": e.value.lineAnimated && !r(D) }),
|
|
1252
|
+
style: O({ transition: r(D) ? void 0 : "all 0.3s ease-in-out" })
|
|
1253
|
+
}, null, 14, pl)
|
|
1254
|
+
], 64)) : (l(), o(p, { key: 1 }, [
|
|
1255
|
+
z("path", {
|
|
1256
|
+
d: `M ${t.linePath}`,
|
|
1257
|
+
stroke: e.value.backgroundColor,
|
|
1258
|
+
"stroke-width": e.value.lineStrokeWidth + 1,
|
|
1259
|
+
"stroke-linecap": "round",
|
|
1260
|
+
fill: "none",
|
|
1261
|
+
class: ce({ "quick-animation": !r(D), "vue-data-ui-line-animated": e.value.lineAnimated && !r(D) }),
|
|
1262
|
+
style: O({ transition: r(D) ? void 0 : "all 0.3s ease-in-out" })
|
|
1263
|
+
}, null, 14, xl),
|
|
1264
|
+
z("path", {
|
|
1265
|
+
d: `M ${t.linePath}`,
|
|
1266
|
+
stroke: t.color,
|
|
1267
|
+
"stroke-width": e.value.lineStrokeWidth,
|
|
1268
|
+
"stroke-linecap": "round",
|
|
1269
|
+
fill: "none",
|
|
1270
|
+
class: ce({ "quick-animation": !r(D), "vue-data-ui-line-animated": e.value.lineAnimated && !r(D) }),
|
|
1271
|
+
style: O({ transition: r(D) ? void 0 : "all 0.3s ease-in-out" })
|
|
1272
|
+
}, null, 14, yl)
|
|
1273
|
+
], 64)),
|
|
1274
|
+
(l(!0), o(p, null, I(t.coordinates, (u, x) => (l(), o("circle", {
|
|
1275
|
+
cx: u.x,
|
|
1276
|
+
cy: r(te)(u.y),
|
|
1277
|
+
r: 3,
|
|
1278
|
+
fill: t.color,
|
|
1279
|
+
stroke: e.value.backgroundColor,
|
|
1280
|
+
"stroke-width": "0.5",
|
|
1281
|
+
class: ce({ "quick-animation": !r(D) }),
|
|
1282
|
+
style: O({ transition: r(D) ? void 0 : "all 0.3s ease-in-out" })
|
|
1283
|
+
}, null, 14, kl))), 256))
|
|
1284
|
+
]))), 256))
|
|
1285
|
+
]),
|
|
1286
|
+
e.value.showDataLabels ? (l(), o("g", bl, [
|
|
1287
|
+
(l(!0), o(p, null, I(d.value.dataset, (t, i) => (l(), o(p, null, [
|
|
1288
|
+
(l(!0), o(p, null, I(t.coordinates, (u, x) => (l(), o("text", {
|
|
1289
|
+
"text-anchor": "middle",
|
|
1290
|
+
"font-size": e.value.dataLabelFontSize,
|
|
1291
|
+
fill: t.color,
|
|
1292
|
+
x: u.x,
|
|
1293
|
+
y: r(te)(u.y) - e.value.dataLabelFontSize / 2,
|
|
1294
|
+
class: "quick-animation",
|
|
1295
|
+
style: O({ transition: r(D) ? void 0 : "all 0.3s ease-in-out" })
|
|
1296
|
+
}, F(r(ee)(
|
|
1297
|
+
e.value.formatter,
|
|
1298
|
+
r(te)(u.value),
|
|
1299
|
+
r(W)({
|
|
1300
|
+
p: e.value.valuePrefix,
|
|
1301
|
+
v: r(te)(u.value),
|
|
1302
|
+
s: e.value.valueSuffix,
|
|
1303
|
+
r: e.value.dataLabelRoundingValue
|
|
1304
|
+
}),
|
|
1305
|
+
{ datapoint: u, seriesIndex: x }
|
|
1306
|
+
)), 13, Sl))), 256))
|
|
1307
|
+
], 64))), 256))
|
|
1308
|
+
])) : g("", !0),
|
|
1309
|
+
Ye.value ? (l(), o("g", wl, [
|
|
1310
|
+
(l(!0), o(p, null, I(d.value.extremes.maxSeries, (t, i) => (l(), o("rect", {
|
|
1311
|
+
x: d.value.drawingArea.left + i * d.value.slotSize,
|
|
1312
|
+
y: d.value.drawingArea.top,
|
|
1313
|
+
height: d.value.drawingArea.height <= 0 ? 1e-5 : d.value.drawingArea.height,
|
|
1314
|
+
width: d.value.slotSize <= 0 ? 1e-5 : d.value.slotSize,
|
|
1315
|
+
fill: [Y.value, J.value].includes(i) ? e.value.xyHighlighterColor : "transparent",
|
|
1316
|
+
style: O(`opacity:${e.value.xyHighlighterOpacity}`),
|
|
1317
|
+
onMouseenter: (u) => d.value.useTooltip(i),
|
|
1318
|
+
onMouseleave: (u) => d.value.killTooltip(i),
|
|
1319
|
+
onClick: (u) => d.value.selectDatapoint(i)
|
|
1320
|
+
}, null, 44, Al))), 256))
|
|
1321
|
+
])) : g("", !0)
|
|
1322
|
+
], 64)) : g("", !0),
|
|
1323
|
+
$.value === _.BAR ? (l(), o(p, { key: 5 }, [
|
|
1324
|
+
e.value.xyShowGrid ? (l(), o("g", Ll, [
|
|
1325
|
+
(l(!0), o(p, null, I(s.value.yLabels, (t) => (l(), o(p, null, [
|
|
1326
|
+
t.y <= s.value.drawingArea.bottom ? (l(), o("line", {
|
|
1327
|
+
key: 0,
|
|
1328
|
+
x1: s.value.drawingArea.left,
|
|
1329
|
+
x2: s.value.drawingArea.right,
|
|
1330
|
+
y1: t.y,
|
|
1331
|
+
y2: t.y,
|
|
1332
|
+
stroke: e.value.xyGridStroke,
|
|
1333
|
+
"stroke-width": e.value.xyGridStrokeWidth,
|
|
1334
|
+
"stroke-linecap": "round"
|
|
1335
|
+
}, null, 8, _l)) : g("", !0)
|
|
1336
|
+
], 64))), 256)),
|
|
1337
|
+
(l(!0), o(p, null, I(s.value.extremes.maxSeries + 1, (t, i) => (l(), o("line", {
|
|
1338
|
+
x1: s.value.drawingArea.left + s.value.slotSize * i,
|
|
1339
|
+
x2: s.value.drawingArea.left + s.value.slotSize * i,
|
|
1340
|
+
y1: s.value.drawingArea.top,
|
|
1341
|
+
y2: s.value.drawingArea.bottom,
|
|
1342
|
+
stroke: e.value.xyGridStroke,
|
|
1343
|
+
"stroke-width": e.value.xyGridStrokeWidth,
|
|
1344
|
+
"stroke-linecap": "round"
|
|
1345
|
+
}, null, 8, zl))), 256))
|
|
1346
|
+
])) : g("", !0),
|
|
1347
|
+
e.value.xyShowAxis ? (l(), o("g", Cl, [
|
|
1348
|
+
z("line", {
|
|
1349
|
+
x1: s.value.drawingArea.left,
|
|
1350
|
+
x2: s.value.drawingArea.left,
|
|
1351
|
+
y1: s.value.drawingArea.top,
|
|
1352
|
+
y2: s.value.drawingArea.bottom,
|
|
1353
|
+
stroke: e.value.xyAxisStroke,
|
|
1354
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1355
|
+
"stroke-linecap": "round"
|
|
1356
|
+
}, null, 8, $l),
|
|
1357
|
+
z("line", {
|
|
1358
|
+
x1: s.value.drawingArea.left,
|
|
1359
|
+
x2: s.value.drawingArea.right,
|
|
1360
|
+
y1: isNaN(s.value.absoluteZero) ? s.value.drawingArea.bottom : s.value.absoluteZero,
|
|
1361
|
+
y2: isNaN(s.value.absoluteZero) ? s.value.drawingArea.bottom : s.value.absoluteZero,
|
|
1362
|
+
stroke: e.value.xyAxisStroke,
|
|
1363
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1364
|
+
"stroke-linecap": "round"
|
|
1365
|
+
}, null, 8, Il)
|
|
1366
|
+
])) : g("", !0),
|
|
1367
|
+
e.value.xyShowScale ? (l(), o("g", {
|
|
1368
|
+
key: 2,
|
|
1369
|
+
class: "yLabels",
|
|
1370
|
+
ref_key: "scaleLabels",
|
|
1371
|
+
ref: Re
|
|
1372
|
+
}, [
|
|
1373
|
+
(l(!0), o(p, null, I(s.value.yLabels, (t, i) => (l(), o(p, null, [
|
|
1374
|
+
t.y <= s.value.drawingArea.bottom ? (l(), o("line", {
|
|
1375
|
+
key: 0,
|
|
1376
|
+
x1: t.x + 4,
|
|
1377
|
+
x2: s.value.drawingArea.left,
|
|
1378
|
+
y1: t.y,
|
|
1379
|
+
y2: t.y,
|
|
1380
|
+
stroke: e.value.xyAxisStroke,
|
|
1381
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1382
|
+
"stroke-linecap": "round"
|
|
1383
|
+
}, null, 8, El)) : g("", !0),
|
|
1384
|
+
t.y <= s.value.drawingArea.bottom ? (l(), o("text", {
|
|
1385
|
+
key: 1,
|
|
1386
|
+
x: t.x,
|
|
1387
|
+
y: t.y + e.value.xyLabelsYFontSize / 3,
|
|
1388
|
+
"text-anchor": "end",
|
|
1389
|
+
"font-size": e.value.xyLabelsYFontSize,
|
|
1390
|
+
fill: e.value.color
|
|
1391
|
+
}, F(r(ee)(
|
|
1392
|
+
e.value.formatter,
|
|
1393
|
+
t.value,
|
|
1394
|
+
r(W)({
|
|
1395
|
+
p: e.value.valuePrefix,
|
|
1396
|
+
v: t.value,
|
|
1397
|
+
s: e.value.valueSuffix,
|
|
1398
|
+
r: e.value.dataLabelRoundingValue
|
|
1399
|
+
}),
|
|
1400
|
+
{ datapoint: t, seriesIndex: i }
|
|
1401
|
+
)), 9, Tl)) : g("", !0)
|
|
1402
|
+
], 64))), 256))
|
|
1403
|
+
], 512)) : g("", !0),
|
|
1404
|
+
e.value.xyShowScale && e.value.xyPeriods.length ? (l(), o("g", Pl, [
|
|
1405
|
+
(l(!0), o(p, null, I(e.value.xyPeriods.slice(m.value.start, m.value.end), (t, i) => (l(), o("line", {
|
|
1406
|
+
x1: s.value.drawingArea.left + s.value.slotSize * (i + 1) - s.value.slotSize / 2,
|
|
1407
|
+
x2: s.value.drawingArea.left + s.value.slotSize * (i + 1) - s.value.slotSize / 2,
|
|
1408
|
+
y1: s.value.drawingArea.bottom,
|
|
1409
|
+
y2: s.value.drawingArea.bottom + 4,
|
|
1410
|
+
stroke: e.value.xyAxisStroke,
|
|
1411
|
+
"stroke-width": e.value.xyAxisStrokeWidth,
|
|
1412
|
+
"stroke-linecap": "round"
|
|
1413
|
+
}, null, 8, Ol))), 256)),
|
|
1414
|
+
z("g", {
|
|
1415
|
+
ref_key: "timeLabelsEls",
|
|
1416
|
+
ref: Z
|
|
1417
|
+
}, [
|
|
1418
|
+
(l(!0), o(p, null, I(G.value.map((t) => t.text), (t, i) => (l(), o(p, null, [
|
|
1419
|
+
!e.value.xyPeriodsShowOnlyAtModulo || e.value.xyPeriodsShowOnlyAtModulo && i % Math.floor((m.value.end - m.value.start) / xe.value) === 0 || m.value.end - m.value.start <= xe.value ? (l(), o("g", Rl, [
|
|
1420
|
+
String(t).includes(`
|
|
1421
|
+
`) ? (l(), o("text", {
|
|
1422
|
+
key: 1,
|
|
1423
|
+
class: "vue-data-ui-time-label",
|
|
1424
|
+
"font-size": e.value.xyLabelsXFontSize,
|
|
1425
|
+
"text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
|
|
1426
|
+
fill: e.value.color,
|
|
1427
|
+
transform: `translate(${s.value.drawingArea.left + s.value.slotSize * (i + 1) - s.value.slotSize / 2}, ${s.value.drawingArea.bottom + e.value.xyLabelsXFontSize + 6}), rotate(${e.value.xyPeriodLabelsRotation})`,
|
|
1428
|
+
innerHTML: r(Pt)({
|
|
1429
|
+
content: String(t),
|
|
1430
|
+
fontSize: e.value.xyLabelsXFontSize,
|
|
1431
|
+
fill: e.value.color,
|
|
1432
|
+
x: 0,
|
|
1433
|
+
y: 0
|
|
1434
|
+
})
|
|
1435
|
+
}, null, 8, Fl)) : (l(), o("text", {
|
|
1436
|
+
key: 0,
|
|
1437
|
+
class: "vue-data-ui-time-label",
|
|
1438
|
+
"font-size": e.value.xyLabelsXFontSize,
|
|
1439
|
+
"text-anchor": e.value.xyPeriodLabelsRotation > 0 ? "start" : e.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
|
|
1440
|
+
fill: e.value.color,
|
|
1441
|
+
transform: `translate(${s.value.drawingArea.left + s.value.slotSize * (i + 1) - s.value.slotSize / 2}, ${s.value.drawingArea.bottom + e.value.xyLabelsXFontSize + 6}), rotate(${e.value.xyPeriodLabelsRotation})`
|
|
1442
|
+
}, F(t), 9, Ml))
|
|
1443
|
+
])) : g("", !0)
|
|
1444
|
+
], 64))), 256))
|
|
1445
|
+
], 512)
|
|
1446
|
+
])) : g("", !0),
|
|
1447
|
+
z("g", Nl, [
|
|
1448
|
+
(l(!0), o(p, null, I(s.value.dataset, (t, i) => (l(), o(p, null, [
|
|
1449
|
+
(l(!0), o(p, null, I(t.coordinates, (u, x) => (l(), o("rect", {
|
|
1450
|
+
x: u.x,
|
|
1451
|
+
width: u.width <= 0 ? 1e-5 : u.width,
|
|
1452
|
+
height: r(te)(u.height <= 0 ? 1e-5 : u.height),
|
|
1453
|
+
y: r(te)(u.y),
|
|
1454
|
+
fill: t.color,
|
|
1455
|
+
stroke: e.value.backgroundColor,
|
|
1456
|
+
"stroke-width": e.value.barStrokeWidth,
|
|
1457
|
+
"stroke-linecap": "round",
|
|
1458
|
+
class: ce({ "vue-data-ui-bar-animated": e.value.barAnimated && u.value < 0 && !r(D) })
|
|
1459
|
+
}, [
|
|
1460
|
+
e.value.barAnimated && u.value > 0 && !r(Ne) && !r(Be) ? (l(), o("animate", {
|
|
1461
|
+
key: 0,
|
|
1462
|
+
attributeName: "height",
|
|
1463
|
+
from: 0,
|
|
1464
|
+
to: u.height,
|
|
1465
|
+
dur: "0.5s"
|
|
1466
|
+
}, null, 8, Dl)) : g("", !0),
|
|
1467
|
+
e.value.barAnimated && u.value > 0 && !r(Ne) && !r(Be) ? (l(), o("animate", {
|
|
1468
|
+
key: 1,
|
|
1469
|
+
attributeName: "y",
|
|
1470
|
+
from: s.value.absoluteZero,
|
|
1471
|
+
to: s.value.absoluteZero - u.height,
|
|
1472
|
+
dur: "0.5s"
|
|
1473
|
+
}, null, 8, Ul)) : g("", !0)
|
|
1474
|
+
], 10, Bl))), 256))
|
|
1475
|
+
], 64))), 256))
|
|
1476
|
+
]),
|
|
1477
|
+
e.value.showDataLabels ? (l(), o("g", Vl, [
|
|
1478
|
+
(l(!0), o(p, null, I(s.value.dataset, (t, i) => (l(), o(p, null, [
|
|
1479
|
+
(l(!0), o(p, null, I(t.coordinates, (u, x) => (l(), o("text", {
|
|
1480
|
+
x: u.x + u.width / 2,
|
|
1481
|
+
y: r(te)(u.y) - e.value.dataLabelFontSize / 2,
|
|
1482
|
+
"text-anchor": "middle",
|
|
1483
|
+
"font-size": e.value.dataLabelFontSize,
|
|
1484
|
+
fill: t.color,
|
|
1485
|
+
class: "quick-animation"
|
|
1486
|
+
}, F(r(ee)(
|
|
1487
|
+
e.value.formatter,
|
|
1488
|
+
r(te)(u.value),
|
|
1489
|
+
r(W)({
|
|
1490
|
+
p: e.value.valuePrefix,
|
|
1491
|
+
v: r(te)(u.value),
|
|
1492
|
+
s: e.value.valueSuffix,
|
|
1493
|
+
r: e.value.dataLabelRoundingValue
|
|
1494
|
+
}),
|
|
1495
|
+
{ datapoint: u, seriesIndex: x }
|
|
1496
|
+
)), 9, Hl))), 256))
|
|
1497
|
+
], 64))), 256))
|
|
1498
|
+
])) : g("", !0),
|
|
1499
|
+
Ye.value ? (l(), o("g", ql, [
|
|
1500
|
+
(l(!0), o(p, null, I(s.value.extremes.maxSeries, (t, i) => (l(), o("rect", {
|
|
1501
|
+
x: s.value.drawingArea.left + i * s.value.slotSize,
|
|
1502
|
+
y: s.value.drawingArea.top,
|
|
1503
|
+
height: s.value.drawingArea.height <= 0 ? 1e-5 : s.value.drawingArea.height,
|
|
1504
|
+
width: s.value.slotSize <= 0 ? 1e-5 : s.value.slotSize,
|
|
1505
|
+
fill: [Y.value, J.value].includes(i) ? e.value.xyHighlighterColor : "transparent",
|
|
1506
|
+
style: O(`opacity:${e.value.xyHighlighterOpacity}`),
|
|
1507
|
+
onMouseenter: (u) => s.value.useTooltip(i),
|
|
1508
|
+
onMouseleave: (u) => s.value.killTooltip(i),
|
|
1509
|
+
onClick: (u) => s.value.selectDatapoint(i)
|
|
1510
|
+
}, null, 44, Wl))), 256))
|
|
1511
|
+
])) : g("", !0)
|
|
1512
|
+
], 64)) : g("", !0),
|
|
1513
|
+
[_.LINE, _.BAR].includes($.value) ? (l(), o("g", Xl, [
|
|
1514
|
+
e.value.xAxisLabel && $.value === _.LINE ? (l(), o("g", {
|
|
1515
|
+
key: 0,
|
|
1516
|
+
ref_key: "xAxisLabel",
|
|
1517
|
+
ref: vt
|
|
1518
|
+
}, [
|
|
1519
|
+
z("text", {
|
|
1520
|
+
"font-size": e.value.axisLabelsFontSize,
|
|
1521
|
+
fill: e.value.color,
|
|
1522
|
+
"text-anchor": "middle",
|
|
1523
|
+
x: d.value.drawingArea.left + d.value.drawingArea.width / 2,
|
|
1524
|
+
y: b.value.height - e.value.axisLabelsFontSize / 3
|
|
1525
|
+
}, F(e.value.xAxisLabel), 9, jl)
|
|
1526
|
+
], 512)) : g("", !0),
|
|
1527
|
+
e.value.xAxisLabel && $.value === _.BAR ? (l(), o("g", {
|
|
1528
|
+
key: 1,
|
|
1529
|
+
ref_key: "xAxisLabel",
|
|
1530
|
+
ref: vt
|
|
1531
|
+
}, [
|
|
1532
|
+
z("text", {
|
|
1533
|
+
"font-size": e.value.axisLabelsFontSize,
|
|
1534
|
+
fill: e.value.color,
|
|
1535
|
+
"text-anchor": "middle",
|
|
1536
|
+
x: s.value.drawingArea.left + s.value.drawingArea.width / 2,
|
|
1537
|
+
y: b.value.height - e.value.axisLabelsFontSize / 3
|
|
1538
|
+
}, F(e.value.xAxisLabel), 9, Gl)
|
|
1539
|
+
], 512)) : g("", !0),
|
|
1540
|
+
e.value.yAxisLabel && $.value === _.LINE ? (l(), o("g", {
|
|
1541
|
+
key: 2,
|
|
1542
|
+
ref_key: "yAxisLabel",
|
|
1543
|
+
ref: dt
|
|
1544
|
+
}, [
|
|
1545
|
+
z("text", {
|
|
1546
|
+
"font-size": e.value.axisLabelsFontSize,
|
|
1547
|
+
fill: e.value.color,
|
|
1548
|
+
transform: `translate(${e.value.axisLabelsFontSize}, ${d.value.drawingArea.top + d.value.drawingArea.height / 2}) rotate(-90)`,
|
|
1549
|
+
"text-anchor": "middle"
|
|
1550
|
+
}, F(e.value.yAxisLabel), 9, Yl)
|
|
1551
|
+
], 512)) : g("", !0),
|
|
1552
|
+
e.value.yAxisLabel && $.value === _.BAR ? (l(), o("g", {
|
|
1553
|
+
key: 3,
|
|
1554
|
+
ref_key: "yAxisLabel",
|
|
1555
|
+
ref: dt
|
|
1556
|
+
}, [
|
|
1557
|
+
z("text", {
|
|
1558
|
+
"font-size": e.value.axisLabelsFontSize,
|
|
1559
|
+
fill: e.value.color,
|
|
1560
|
+
transform: `translate(${e.value.axisLabelsFontSize}, ${s.value.drawingArea.top + s.value.drawingArea.height / 2}) rotate(-90)`,
|
|
1561
|
+
"text-anchor": "middle"
|
|
1562
|
+
}, F(e.value.yAxisLabel), 9, Zl)
|
|
1563
|
+
], 512)) : g("", !0)
|
|
1564
|
+
])) : g("", !0)
|
|
1565
|
+
], 12, Oa)) : g("", !0),
|
|
1566
|
+
a.$slots.watermark ? (l(), o("div", Jl, [
|
|
1567
|
+
U(a.$slots, "watermark", he(fe({ isPrinting: r(Ne) || r(Be) })), void 0, !0)
|
|
1568
|
+
])) : g("", !0),
|
|
1569
|
+
[_.BAR, _.LINE].includes($.value) && e.value.zoomXy && k.value.maxSeriesLength > 1 ? (l(), o("div", {
|
|
1570
|
+
key: `slicer_${Oe.value}`,
|
|
1571
|
+
ref_key: "quickChartSlicer",
|
|
1572
|
+
ref: it
|
|
1573
|
+
}, [
|
|
1574
|
+
(l(), qe(wa, {
|
|
1575
|
+
ref_key: "slicerComponent",
|
|
1576
|
+
ref: At,
|
|
1577
|
+
key: `slicer_${Oe.value}`,
|
|
1578
|
+
background: e.value.zoomColor,
|
|
1579
|
+
borderColor: e.value.backgroundColor,
|
|
1580
|
+
fontSize: e.value.zoomFontSize,
|
|
1581
|
+
useResetSlot: e.value.zoomUseResetSlot,
|
|
1582
|
+
labelLeft: e.value.xyPeriods[m.value.start] ? G.value[0].text : "",
|
|
1583
|
+
labelRight: e.value.xyPeriods[m.value.end - 1] ? G.value.at(-1).text : "",
|
|
1584
|
+
textColor: e.value.color,
|
|
1585
|
+
inputColor: e.value.zoomColor,
|
|
1586
|
+
selectColor: e.value.zoomHighlightColor,
|
|
1587
|
+
max: k.value.maxSeriesLength,
|
|
1588
|
+
min: 0,
|
|
1589
|
+
valueStart: m.value.start,
|
|
1590
|
+
valueEnd: m.value.end,
|
|
1591
|
+
smoothMinimap: e.value.zoomMinimap.smooth,
|
|
1592
|
+
minimapSelectedColor: e.value.zoomMinimap.selectedColor,
|
|
1593
|
+
minimapSelectedColorOpacity: e.value.zoomMinimap.selectedColorOpacity,
|
|
1594
|
+
minimapSelectionRadius: e.value.zoomMinimap.selectionRadius,
|
|
1595
|
+
minimapLineColor: e.value.zoomMinimap.lineColor,
|
|
1596
|
+
minimap: Zt.value,
|
|
1597
|
+
minimapIndicatorColor: e.value.zoomMinimap.indicatorColor,
|
|
1598
|
+
verticalHandles: e.value.zoomMinimap.verticalHandles,
|
|
1599
|
+
minimapSelectedIndex: J.value,
|
|
1600
|
+
start: m.value.start,
|
|
1601
|
+
"onUpdate:start": c[0] || (c[0] = (t) => m.value.start = t),
|
|
1602
|
+
end: m.value.end,
|
|
1603
|
+
"onUpdate:end": c[1] || (c[1] = (t) => m.value.end = t),
|
|
1604
|
+
refreshStartPoint: e.value.zoomStartIndex !== null ? e.value.zoomStartIndex : 0,
|
|
1605
|
+
refreshEndPoint: e.value.zoomEndIndex !== null ? e.value.zoomEndIndex + 1 : k.value.maxSeriesLength,
|
|
1606
|
+
enableRangeHandles: e.value.zoomEnableRangeHandles,
|
|
1607
|
+
enableSelectionDrag: e.value.zoomEnableSelectionDrag,
|
|
1608
|
+
onReset: Gt,
|
|
1609
|
+
onTrapMouse: jt
|
|
1610
|
+
}, {
|
|
1611
|
+
"reset-action": K(({ reset: t }) => [
|
|
1612
|
+
U(a.$slots, "reset-action", he(fe({ reset: t })), void 0, !0)
|
|
1613
|
+
]),
|
|
1614
|
+
_: 3
|
|
1615
|
+
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "smoothMinimap", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectionRadius", "minimapLineColor", "minimap", "minimapIndicatorColor", "verticalHandles", "minimapSelectedIndex", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"]))
|
|
1616
|
+
])) : g("", !0),
|
|
1617
|
+
e.value.showLegend ? (l(), o("div", {
|
|
1618
|
+
key: 7,
|
|
1619
|
+
ref_key: "quickChartLegend",
|
|
1620
|
+
ref: nt,
|
|
1621
|
+
class: "vue-ui-quick-chart-legend",
|
|
1622
|
+
style: O(`background:transparent;color:${e.value.color}`)
|
|
1623
|
+
}, [
|
|
1624
|
+
$.value === _.DONUT ? (l(!0), o(p, { key: 0 }, I(T.value.legend, (t, i) => (l(), o("div", {
|
|
1625
|
+
class: "vue-ui-quick-chart-legend-item",
|
|
1626
|
+
onClick: (u) => {
|
|
1627
|
+
Xt(t, T.value.dataset), ge("selectLegend", t);
|
|
1628
|
+
},
|
|
1629
|
+
style: O(`cursor: ${T.value.legend.length > 1 ? "pointer" : "default"}; opacity:${A.value.includes(t.id) ? "0.5" : "1"}`)
|
|
1630
|
+
}, [
|
|
1631
|
+
e.value.useCustomLegend ? U(a.$slots, "legend", et({
|
|
1632
|
+
key: 0,
|
|
1633
|
+
ref_for: !0
|
|
1634
|
+
}, { legend: t }), void 0, !0) : (l(), o(p, { key: 1 }, [
|
|
1635
|
+
ke(r(B), {
|
|
1636
|
+
name: e.value.legendIcon,
|
|
1637
|
+
stroke: t.color,
|
|
1638
|
+
size: e.value.legendIconSize
|
|
1639
|
+
}, null, 8, ["name", "stroke", "size"]),
|
|
1640
|
+
z("span", {
|
|
1641
|
+
style: O(`font-size:${e.value.legendFontSize}px`)
|
|
1642
|
+
}, F(t.name), 5),
|
|
1643
|
+
z("span", {
|
|
1644
|
+
style: O(`font-size:${e.value.legendFontSize}px;font-variant-numeric:tabular-nums`)
|
|
1645
|
+
}, F(A.value.includes(t.id) ? "-" : r(ee)(
|
|
1646
|
+
e.value.formatter,
|
|
1647
|
+
t.absoluteValue,
|
|
1648
|
+
r(W)({
|
|
1649
|
+
p: e.value.valuePrefix,
|
|
1650
|
+
v: t.absoluteValue,
|
|
1651
|
+
s: e.value.valueSuffix,
|
|
1652
|
+
r: e.value.dataLabelRoundingValue
|
|
1653
|
+
}),
|
|
1654
|
+
{ datapoint: t, seriesIndex: i }
|
|
1655
|
+
)), 5),
|
|
1656
|
+
A.value.includes(t.id) ? (l(), o("span", {
|
|
1657
|
+
key: 0,
|
|
1658
|
+
style: O(`font-size:${e.value.legendFontSize}px`)
|
|
1659
|
+
}, " ( - % ) ", 4)) : De.value ? (l(), o("span", {
|
|
1660
|
+
key: 1,
|
|
1661
|
+
style: O(`font-size:${e.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)
|
|
1662
|
+
}, " ( - % ) ", 4)) : (l(), o("span", {
|
|
1663
|
+
key: 2,
|
|
1664
|
+
style: O(`font-size:${e.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)
|
|
1665
|
+
}, " (" + F(r(W)({
|
|
1666
|
+
v: t.value / T.value.total * 100,
|
|
1667
|
+
s: "%",
|
|
1668
|
+
r: e.value.dataLabelRoundingPercentage
|
|
1669
|
+
})) + ") ", 5))
|
|
1670
|
+
], 64))
|
|
1671
|
+
], 12, Ql))), 256)) : g("", !0),
|
|
1672
|
+
$.value === _.LINE ? (l(!0), o(p, { key: 1 }, I(d.value.legend, (t, i) => (l(), o("div", {
|
|
1673
|
+
class: "vue-ui-quick-chart-legend-item",
|
|
1674
|
+
onClick: (u) => {
|
|
1675
|
+
kt(t.id, d.value.legend.length - 1), ge("selectLegend", t);
|
|
1676
|
+
},
|
|
1677
|
+
style: O(`cursor: ${d.value.legend.length > 1 ? "pointer" : "default"}; opacity:${A.value.includes(t.id) ? "0.5" : "1"}`)
|
|
1678
|
+
}, [
|
|
1679
|
+
e.value.useCustomLegend ? U(a.$slots, "legend", et({
|
|
1680
|
+
key: 0,
|
|
1681
|
+
ref_for: !0
|
|
1682
|
+
}, { legend: t }), void 0, !0) : (l(), o(p, { key: 1 }, [
|
|
1683
|
+
ke(r(B), {
|
|
1684
|
+
name: e.value.legendIcon,
|
|
1685
|
+
stroke: t.color,
|
|
1686
|
+
size: e.value.legendIconSize
|
|
1687
|
+
}, null, 8, ["name", "stroke", "size"]),
|
|
1688
|
+
z("span", {
|
|
1689
|
+
style: O(`font-size:${e.value.legendFontSize}px`)
|
|
1690
|
+
}, F(t.name), 5)
|
|
1691
|
+
], 64))
|
|
1692
|
+
], 12, Kl))), 256)) : g("", !0),
|
|
1693
|
+
$.value === _.BAR ? (l(!0), o(p, { key: 2 }, I(s.value.legend, (t, i) => (l(), o("div", {
|
|
1694
|
+
class: "vue-ui-quick-chart-legend-item",
|
|
1695
|
+
onClick: (u) => {
|
|
1696
|
+
kt(t.id, s.value.legend.length - 1), ge("selectLegend", t);
|
|
1697
|
+
},
|
|
1698
|
+
style: O(`cursor: ${s.value.legend.length > 1 ? "pointer" : "default"}; opacity:${A.value.includes(t.id) ? "0.5" : "1"}`)
|
|
1699
|
+
}, [
|
|
1700
|
+
e.value.useCustomLegend ? U(a.$slots, "legend", et({
|
|
1701
|
+
key: 0,
|
|
1702
|
+
ref_for: !0
|
|
1703
|
+
}, { legend: t }), void 0, !0) : (l(), o(p, { key: 1 }, [
|
|
1704
|
+
ke(r(B), {
|
|
1705
|
+
name: e.value.legendIcon,
|
|
1706
|
+
stroke: t.color,
|
|
1707
|
+
size: e.value.legendIconSize
|
|
1708
|
+
}, null, 8, ["name", "stroke", "size"]),
|
|
1709
|
+
z("span", {
|
|
1710
|
+
style: O(`font-size:${e.value.legendFontSize}px`)
|
|
1711
|
+
}, F(t.name), 5)
|
|
1712
|
+
], 64))
|
|
1713
|
+
], 12, eo))), 256)) : g("", !0)
|
|
1714
|
+
], 4)) : g("", !0),
|
|
1715
|
+
a.$slots.source ? (l(), o("div", {
|
|
1716
|
+
key: 8,
|
|
1717
|
+
ref_key: "source",
|
|
1718
|
+
ref: ut,
|
|
1719
|
+
dir: "auto"
|
|
1720
|
+
}, [
|
|
1721
|
+
U(a.$slots, "source", {}, void 0, !0)
|
|
1722
|
+
], 512)) : g("", !0),
|
|
1723
|
+
ke(r(be), {
|
|
1724
|
+
show: me.value.showTooltip && re.value,
|
|
1725
|
+
backgroundColor: e.value.backgroundColor,
|
|
1726
|
+
color: e.value.color,
|
|
1727
|
+
borderRadius: e.value.tooltipBorderRadius,
|
|
1728
|
+
borderColor: e.value.tooltipBorderColor,
|
|
1729
|
+
borderWidth: e.value.tooltipBorderWidth,
|
|
1730
|
+
fontSize: e.value.tooltipFontSize,
|
|
1731
|
+
backgroundOpacity: e.value.tooltipBackgroundOpacity,
|
|
1732
|
+
position: e.value.tooltipPosition,
|
|
1733
|
+
offsetY: e.value.tooltipOffsetY,
|
|
1734
|
+
parent: R.value,
|
|
1735
|
+
content: se.value,
|
|
1736
|
+
isFullscreen: Ve.value,
|
|
1737
|
+
isCustom: r(Xe)(e.value.tooltipCustomFormat),
|
|
1738
|
+
smooth: e.value.tooltipSmooth,
|
|
1739
|
+
backdropFilter: e.value.tooltipBackdropFilter
|
|
1740
|
+
}, {
|
|
1741
|
+
"tooltip-before": K(() => [
|
|
1742
|
+
U(a.$slots, "tooltip-before", he(fe({ ...we.value })), void 0, !0)
|
|
1743
|
+
]),
|
|
1744
|
+
"tooltip-after": K(() => [
|
|
1745
|
+
U(a.$slots, "tooltip-after", he(fe({ ...we.value })), void 0, !0)
|
|
1746
|
+
]),
|
|
1747
|
+
_: 3
|
|
1748
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
|
|
1749
|
+
r(D) ? (l(), qe(La, { key: 9 })) : g("", !0)
|
|
1750
|
+
], 46, Pa)) : (l(), o("div", to, [
|
|
1751
|
+
ke(r(B), {
|
|
1752
|
+
name: "circleCancel",
|
|
1753
|
+
stroke: "red"
|
|
1754
|
+
}),
|
|
1755
|
+
c[5] || (c[5] = z("span", null, "Dataset is not processable", -1))
|
|
1756
|
+
]));
|
|
1757
|
+
}
|
|
1758
|
+
}, mo = /* @__PURE__ */ _a(ao, [["__scopeId", "data-v-64f113e9"]]);
|
|
1759
|
+
export {
|
|
1760
|
+
mo as default
|
|
1761
|
+
};
|