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