vue-data-ui 3.0.2 → 3.0.4
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-uNlT54JX.js → Arrow-YUJc3FQi.js} +1 -1
- package/dist/{BaseDraggableDialog-CujvKo06.js → BaseDraggableDialog-DdXLTRiK.js} +2 -2
- package/dist/{BaseIcon-B8CknCYk.js → BaseIcon-CCivwZUq.js} +1 -1
- package/dist/{ColorPicker-Dmdfq2VV.js → ColorPicker-CWed-s-E.js} +2 -2
- package/dist/{DataTable-osx68WLA.js → DataTable-rj9-mAwF.js} +2 -2
- package/dist/{Legend-CQsASoei.js → Legend-DcDSkq99.js} +2 -2
- package/dist/{NonSvgPenAndPaper-BWz0WtJG.js → NonSvgPenAndPaper-W2N17kLY.js} +3 -3
- package/dist/{PackageVersion-DZGrOKw5.js → PackageVersion-5ZjKSIei.js} +1 -1
- package/dist/{PenAndPaper-CdXspg5R.js → PenAndPaper-BJ0hcgsa.js} +3 -3
- package/dist/{Shape-0sW2StrO.js → Shape-DHIaJs9G.js} +1 -1
- package/dist/{Slicer-52shR-Vu.js → Slicer-BarTZZDU.js} +2 -2
- package/dist/{SparkTooltip-Dxrruu4s.js → SparkTooltip-Diyt3BTN.js} +1 -1
- package/dist/{Title-CntvKJss.js → Title-B55R8CAZ.js} +1 -1
- package/dist/{Tooltip-DF8e4iB9.js → Tooltip-BMOddG-M.js} +1 -1
- package/dist/{UserOptions-DQyIO0ts.js → UserOptions-DVzyjG-W.js} +2 -2
- package/dist/{dom-to-png-KC3tMd8p.js → dom-to-png-BNHsLwF7.js} +1 -1
- package/dist/{img-Cv4nScI0.js → img-Ctts6JQb.js} +1 -1
- package/dist/{index-B9Ct1B_p.js → index-q-LPw2IT.js} +908 -871
- package/dist/{pdf-D0GEfQrI.js → pdf-BfwnBQtY.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +23 -0
- package/dist/types/vue-data-ui.d.ts +23 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-DvdDLkzw.js → useAutoSizeLabelsInsideViewbox-bEAG5sD1.js} +1 -1
- package/dist/{useNestedProp-C0gKxLur.js → useNestedProp-04aFeUYu.js} +1 -1
- package/dist/{usePrinter-DcZXg1hH.js → usePrinter-DX7efa1s.js} +2 -2
- package/dist/{vue-data-ui-DZMDT7RA.js → vue-data-ui-DJTYiV9o.js} +64 -64
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BnCv2CD_.js → vue-ui-3d-bar-DGu87lcK.js} +6 -6
- package/dist/{vue-ui-accordion-B31QK9Hj.js → vue-ui-accordion-D46i_gkB.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Bc4V0a3k.js → vue-ui-age-pyramid-DeS1T-Bw.js} +6 -6
- package/dist/{vue-ui-annotator-D8haGQiH.js → vue-ui-annotator-CrqM9fa9.js} +2 -2
- package/dist/{vue-ui-bullet-n7Y6jYLj.js → vue-ui-bullet-0TypghaZ.js} +199 -186
- package/dist/{vue-ui-candlestick-nCI5GlX7.js → vue-ui-candlestick-n8koDNMv.js} +7 -7
- package/dist/{vue-ui-carousel-table-JH2NjnOk.js → vue-ui-carousel-table-BeUapat0.js} +4 -4
- package/dist/{vue-ui-chestnut-CQtV9AR4.js → vue-ui-chestnut-HbK7CLPq.js} +5 -5
- package/dist/{vue-ui-chord-CGi_iSaL.js → vue-ui-chord-DdNd8wIQ.js} +377 -366
- package/dist/{vue-ui-circle-pack-C8v3Okle.js → vue-ui-circle-pack-HrpJA3B3.js} +6 -6
- package/dist/{vue-ui-cursor-0DHciy1D.js → vue-ui-cursor-Dl_Gep_y.js} +2 -2
- package/dist/{vue-ui-dashboard-CDHJk8sC.js → vue-ui-dashboard-B0clnW3D.js} +62 -62
- package/dist/{vue-ui-digits-Bn1P1K9u.js → vue-ui-digits-BapPpCcj.js} +2 -2
- package/dist/{vue-ui-donut-GqHffshG.js → vue-ui-donut-CdLAu_O5.js} +345 -334
- package/dist/{vue-ui-donut-evolution-Crn7Nnpy.js → vue-ui-donut-evolution-DHYtqqYZ.js} +388 -377
- package/dist/{vue-ui-dumbbell-C__nFV3V.js → vue-ui-dumbbell-SgiIfwyE.js} +354 -343
- package/dist/{vue-ui-flow-7q9o4Jxp.js → vue-ui-flow-D7dra0Tp.js} +299 -288
- package/dist/{vue-ui-funnel-DjmlAdRf.js → vue-ui-funnel-CfhMmeX5.js} +6 -6
- package/dist/{vue-ui-galaxy-Crh7xV6s.js → vue-ui-galaxy-BnPiyPdD.js} +252 -241
- package/dist/{vue-ui-gauge-PjjV3JmB.js → vue-ui-gauge-B6BeYUW3.js} +7 -7
- package/dist/{vue-ui-gizmo-DREMjBvZ.js → vue-ui-gizmo-DoTyGRKN.js} +3 -3
- package/dist/{vue-ui-heatmap-D2CF8Vn8.js → vue-ui-heatmap-Di-qNaDB.js} +7 -7
- package/dist/{vue-ui-history-plot-DX31nVYa.js → vue-ui-history-plot-D_ax0e1n.js} +283 -270
- package/dist/{vue-ui-kpi-FtnzfW7L.js → vue-ui-kpi-nZXBg4tm.js} +3 -3
- package/dist/{vue-ui-mini-loader-DaHPhzVf.js → vue-ui-mini-loader-NoQltPUC.js} +2 -2
- package/dist/{vue-ui-molecule--4MdUCOi.js → vue-ui-molecule-kZceITfL.js} +5 -5
- package/dist/{vue-ui-mood-radar-Ci416qv5.js → vue-ui-mood-radar-DtoNCs1x.js} +264 -253
- package/dist/{vue-ui-nested-donuts-DoVSN0qE.js → vue-ui-nested-donuts-BXZ2WcBF.js} +377 -366
- package/dist/{vue-ui-onion-ChqyoLl8.js → vue-ui-onion-DNP-X1Kr.js} +265 -254
- package/dist/{vue-ui-parallel-coordinate-plot-BPsH_W7X.js → vue-ui-parallel-coordinate-plot-BaMmD1DR.js} +276 -265
- package/dist/{vue-ui-quadrant-CLQqKyzu.js → vue-ui-quadrant-qQkLdaFk.js} +356 -345
- package/dist/{vue-ui-quick-chart-DogHdO42.js → vue-ui-quick-chart-CR-rtVnh.js} +639 -628
- package/dist/{vue-ui-radar-B4rGvzKn.js → vue-ui-radar-BMAqVZty.js} +254 -243
- package/dist/{vue-ui-rating-BvopSHNQ.js → vue-ui-rating-NQHqua4r.js} +2 -2
- package/dist/{vue-ui-relation-circle-C6GEmCiw.js → vue-ui-relation-circle-uYPKJzRP.js} +7 -7
- package/dist/{vue-ui-ridgeline-BJVJ02bA.js → vue-ui-ridgeline-Wesfuq0m.js} +8 -8
- package/dist/{vue-ui-rings-BRTxWhKI.js → vue-ui-rings-C8ofrNp2.js} +250 -239
- package/dist/{vue-ui-scatter-D_BP7XBR.js → vue-ui-scatter-l4Q3KmVI.js} +383 -372
- package/dist/{vue-ui-skeleton-C_nf6VDZ.js → vue-ui-skeleton-DS0KyQM7.js} +3 -3
- package/dist/{vue-ui-smiley-DHCpzxMs.js → vue-ui-smiley-Dvz9CJOH.js} +2 -2
- package/dist/{vue-ui-spark-trend-DfM5OJIx.js → vue-ui-spark-trend-CZEFnuFC.js} +3 -3
- package/dist/{vue-ui-sparkbar-BrvOwqG_.js → vue-ui-sparkbar-BNoRSCo7.js} +3 -3
- package/dist/{vue-ui-sparkgauge-Dp2OkGrS.js → vue-ui-sparkgauge-Dlq3vjoo.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-K_7q57W8.js → vue-ui-sparkhistogram-CfcpDn_W.js} +4 -4
- package/dist/{vue-ui-sparkline-BiEu6kq8.js → vue-ui-sparkline-ClRCVth4.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-BNlyxt3y.js → vue-ui-sparkstackbar-XpDLFtos.js} +3 -3
- package/dist/{vue-ui-stackbar-BKb_dgUq.js → vue-ui-stackbar-B_2xrLjj.js} +443 -432
- package/dist/{vue-ui-strip-plot-D6dwyO-N.js → vue-ui-strip-plot-DoRnEXsU.js} +7 -7
- package/dist/{vue-ui-table-B9UWta9o.js → vue-ui-table-Cr8fNe8Z.js} +4 -9
- package/dist/{vue-ui-table-heatmap-JkwDydPq.js → vue-ui-table-heatmap-ClCYuGAL.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BOKgPT0e.js → vue-ui-table-sparkline-BUzu6v2P.js} +4 -4
- package/dist/{vue-ui-thermometer-Dj0CVTk3.js → vue-ui-thermometer-BsJ_z0Nw.js} +7 -7
- package/dist/{vue-ui-timer-B407nCRd.js → vue-ui-timer-0x5nZPEp.js} +5 -5
- package/dist/{vue-ui-tiremarks-C_betH5B.js → vue-ui-tiremarks-qT3POAeD.js} +6 -6
- package/dist/{vue-ui-treemap-D0gScsaQ.js → vue-ui-treemap-B4ezfcLU.js} +356 -345
- package/dist/{vue-ui-vertical-bar-D3aoix_0.js → vue-ui-vertical-bar-Bwpe58hH.js} +9 -9
- package/dist/{vue-ui-waffle-hpsuszbt.js → vue-ui-waffle-CSKAC_dQ.js} +306 -295
- package/dist/{vue-ui-wheel-0etwsu-o.js → vue-ui-wheel-CVg1L12p.js} +6 -6
- package/dist/{vue-ui-word-cloud-tsEprRhX.js → vue-ui-word-cloud-DY88UMDD.js} +6 -6
- package/dist/{vue-ui-world-BCtGvXjy.js → vue-ui-world-UaCxKRrk.js} +343 -329
- package/dist/vue-ui-xy-Bsh6AmS0.js +3846 -0
- package/dist/{vue-ui-xy-canvas-B1s9twtZ.js → vue-ui-xy-canvas-D7VaVkKk.js} +305 -294
- package/package.json +1 -1
- package/dist/vue-ui-xy-BoT_c9bU.js +0 -3808
|
@@ -0,0 +1,3846 @@
|
|
|
1
|
+
import { useCssVars as io, computed as k, ref as p, onMounted as rl, onBeforeUnmount as cl, watch as at, nextTick as Kt, onUpdated as so, createElementBlock as i, openBlock as u, createElementVNode as b, createCommentVNode as f, renderSlot as J, normalizeStyle as L, createVNode as qt, withDirectives as Yl, unref as v, Fragment as x, renderList as C, normalizeClass as Ne, withKeys as Ma, vModelText as Ca, toDisplayString as te, defineAsyncComponent as kt, useSlots as ro, getCurrentInstance as co, toRefs as vo, watchEffect as ho, createBlock as Be, createSlots as fo, withCtx as ge, normalizeProps as it, guardReactiveProps as wt, mergeProps as $l, Teleport as go, vModelCheckbox as mo, createTextVNode as xo } from "vue";
|
|
2
|
+
import { c as Cl, V as zl, U as Al, X as bo, F as qe, u as po, f as Fl, t as yo, a4 as Ue, d as ko, D as sl, ac as Nt, e as wo, p as So, ad as _l, a9 as D, ae as $o, h as E, af as za, ag as Aa, ah as _o, ai as Ia, aj as Ta, k as be, y as Lo, z as Mo, _ as Na, R as lt, i as Fe, x as Rt, s as Ze, a7 as Q, L as Co, ak as Ll, I as zo, al as St, C as We, a as Ao, b as Io, o as Ra, v as To, w as No, E as Zt } from "./index-q-LPw2IT.js";
|
|
3
|
+
import { t as Dl, u as Ro } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Po } from "./usePrinter-DX7efa1s.js";
|
|
5
|
+
import { u as Oo, B as Ho } from "./useLoading-D7YHNtLX.js";
|
|
6
|
+
import { u as Wl } from "./useNestedProp-04aFeUYu.js";
|
|
7
|
+
import { u as Pa } from "./useTimeLabels-DkzmKfZn.js";
|
|
8
|
+
import { u as Vo } from "./useTimeLabelCollider-CIsgDrl9.js";
|
|
9
|
+
import Eo from "./img-Ctts6JQb.js";
|
|
10
|
+
import Bo from "./Title-B55R8CAZ.js";
|
|
11
|
+
import { S as Fo } from "./Slicer-BarTZZDU.js";
|
|
12
|
+
import { _ as Ml } from "./Shape-DHIaJs9G.js";
|
|
13
|
+
import Wo from "./BaseIcon-CCivwZUq.js";
|
|
14
|
+
import { _ as Oa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
+
const Yo = {
|
|
16
|
+
class: "vue-data-ui-slicer-labels",
|
|
17
|
+
style: { position: "relative", "z-index": "1", "pointer-events": "none" }
|
|
18
|
+
}, Do = {
|
|
19
|
+
key: 0,
|
|
20
|
+
style: { width: "100%", position: "relative" }
|
|
21
|
+
}, Xo = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "minimap",
|
|
24
|
+
style: { width: "100%" }
|
|
25
|
+
}, Go = ["xmlns", "viewBox"], Uo = ["id"], Zo = ["stop-color"], qo = ["d", "stroke"], Ko = ["x", "width", "height", "fill", "rx"], Jo = ["d", "fill"], Qo = ["x", "width", "height", "rx", "fill"], jo = ["x", "width", "height", "fill", "rx"], eu = ["d", "fill"], tu = ["d", "stroke"], lu = ["cx", "cy", "stroke", "fill"], au = ["cx", "cy", "stroke", "fill"], ou = ["x1", "x2", "y2", "stroke"], uu = ["x", "height", "width", "onMouseenter"], nu = ["min", "max"], iu = ["min", "max"], su = {
|
|
26
|
+
__name: "SlicerPreview",
|
|
27
|
+
props: {
|
|
28
|
+
background: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "#FFFFFF"
|
|
31
|
+
},
|
|
32
|
+
borderColor: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "#FFFFFF"
|
|
35
|
+
},
|
|
36
|
+
fontSize: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 14
|
|
39
|
+
},
|
|
40
|
+
labelLeft: {
|
|
41
|
+
type: [String, Number],
|
|
42
|
+
default: ""
|
|
43
|
+
},
|
|
44
|
+
labelRight: {
|
|
45
|
+
type: [String, Number],
|
|
46
|
+
default: ""
|
|
47
|
+
},
|
|
48
|
+
textColor: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: "#1A1A1A"
|
|
51
|
+
},
|
|
52
|
+
inputColor: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: "#1A1A1A"
|
|
55
|
+
},
|
|
56
|
+
max: {
|
|
57
|
+
type: Number,
|
|
58
|
+
default: 0
|
|
59
|
+
},
|
|
60
|
+
min: {
|
|
61
|
+
type: Number,
|
|
62
|
+
default: 0
|
|
63
|
+
},
|
|
64
|
+
selectColor: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "#4A4A4A"
|
|
67
|
+
},
|
|
68
|
+
useResetSlot: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: !1
|
|
71
|
+
},
|
|
72
|
+
valueStart: {
|
|
73
|
+
type: [Number, String],
|
|
74
|
+
default: 0
|
|
75
|
+
},
|
|
76
|
+
valueEnd: {
|
|
77
|
+
type: [Number, String],
|
|
78
|
+
default: 0
|
|
79
|
+
},
|
|
80
|
+
minimap: {
|
|
81
|
+
type: Array,
|
|
82
|
+
default: []
|
|
83
|
+
},
|
|
84
|
+
smoothMinimap: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: !1
|
|
87
|
+
},
|
|
88
|
+
minimapSelectedColor: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: "#1f77b4"
|
|
91
|
+
},
|
|
92
|
+
minimapSelectionRadius: {
|
|
93
|
+
type: Number,
|
|
94
|
+
default: 12
|
|
95
|
+
},
|
|
96
|
+
minimapLineColor: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: "#2D353C"
|
|
99
|
+
},
|
|
100
|
+
minimapSelectedColorOpacity: {
|
|
101
|
+
type: Number,
|
|
102
|
+
default: 0.2
|
|
103
|
+
},
|
|
104
|
+
minimapSelectedIndex: {
|
|
105
|
+
type: Number,
|
|
106
|
+
default: null
|
|
107
|
+
},
|
|
108
|
+
minimapIndicatorColor: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: "#2D353C"
|
|
111
|
+
},
|
|
112
|
+
refreshStartPoint: {
|
|
113
|
+
type: Number,
|
|
114
|
+
default: 0
|
|
115
|
+
},
|
|
116
|
+
refreshEndPoint: {
|
|
117
|
+
type: Number,
|
|
118
|
+
default: null
|
|
119
|
+
},
|
|
120
|
+
enableRangeHandles: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: !1
|
|
123
|
+
},
|
|
124
|
+
enableSelectionDrag: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: !0
|
|
127
|
+
},
|
|
128
|
+
verticalHandles: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
default: !1
|
|
131
|
+
},
|
|
132
|
+
timeLabels: {
|
|
133
|
+
type: Array
|
|
134
|
+
},
|
|
135
|
+
isPreview: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
default: !1
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
emits: ["futureStart", "futureEnd", "update:start", "update:end", "reset", "trapMouse"],
|
|
141
|
+
setup(I, { expose: Il, emit: Tl }) {
|
|
142
|
+
io((g) => ({
|
|
143
|
+
"08ee7c46": ct.value,
|
|
144
|
+
d9036b5e: Ke.value,
|
|
145
|
+
"4e6bd1fc": Lt.value,
|
|
146
|
+
"73b38b81": I.selectColor,
|
|
147
|
+
"07444d8f": _t.value
|
|
148
|
+
}));
|
|
149
|
+
const d = I, Re = p(null), ve = p(d.min), he = p(d.max), $t = k(() => !!d.minimap.length), Jt = p(Cl()), Pt = p(0), st = k({
|
|
150
|
+
get() {
|
|
151
|
+
return ve.value;
|
|
152
|
+
},
|
|
153
|
+
set(g) {
|
|
154
|
+
const h = Math.min(g, he.value - 1);
|
|
155
|
+
ve.value = h, dt.value && (dt.value.value = String(h)), Ye("futureStart", h);
|
|
156
|
+
}
|
|
157
|
+
}), rt = k({
|
|
158
|
+
get() {
|
|
159
|
+
return he.value;
|
|
160
|
+
},
|
|
161
|
+
set(g) {
|
|
162
|
+
const h = Math.max(g, ve.value + 1);
|
|
163
|
+
he.value = h, Qt.value && (Qt.value.value = String(h)), Ye("futureEnd", h);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
rl(() => {
|
|
167
|
+
const g = () => {
|
|
168
|
+
Re.value && (Pt.value = Re.value.getBoundingClientRect().width);
|
|
169
|
+
};
|
|
170
|
+
g();
|
|
171
|
+
const h = Dl(g, 50);
|
|
172
|
+
window.addEventListener("resize", h), cl(() => {
|
|
173
|
+
window.removeEventListener("resize", h);
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
let Ot = null;
|
|
177
|
+
function Pe() {
|
|
178
|
+
clearTimeout(Ot), Ye("update:start", Number(ve.value)), Ye("update:end", Number(he.value));
|
|
179
|
+
}
|
|
180
|
+
const Nl = k(() => d.refreshEndPoint === null ? d.max : d.refreshEndPoint), Ye = Tl, oe = k(() => {
|
|
181
|
+
const g = d.max - d.min, h = (ve.value - d.min) / g * 100, w = (he.value - d.min) / g * 100, m = (h + w) / 2, ne = Ce.value ? `calc(${m}% - ${t.value.width}px)` : ot.value ? `calc(${m}%)` : `calc(${m}% - ${t.value.width / 2}px)`;
|
|
182
|
+
return {
|
|
183
|
+
left: `${h}%`,
|
|
184
|
+
width: `${w - h}%`,
|
|
185
|
+
background: d.selectColor,
|
|
186
|
+
tooltipLeft: `calc(${h}% - ${ot.value ? 0 : Ct.value / 2}px)`,
|
|
187
|
+
tooltipRight: `calc(${w}% - ${Ce.value ? zt.value : zt.value / 2}px)`,
|
|
188
|
+
tooltipCenter: ne,
|
|
189
|
+
arrowLeft: !ot.value,
|
|
190
|
+
arrowRight: !Ce.value
|
|
191
|
+
};
|
|
192
|
+
}), ot = k(() => Re.value ? Re.value.getBoundingClientRect().width * ((ve.value - d.min) / (d.max - d.min)) - Ct.value / 2 < 0 : !1), Ce = k(() => Re.value ? Re.value.getBoundingClientRect().width * ((he.value - d.min) / (d.max - d.min)) + zt.value / 2 > Re.value.getBoundingClientRect().width : !1), ct = k(() => d.inputColor), _t = k(() => d.background), Lt = k(() => `${d.selectColor}33`), Ke = k(() => d.borderColor), Ht = k(() => {
|
|
193
|
+
let g = [];
|
|
194
|
+
for (let h = 0; h < d.minimap.length; h += 1)
|
|
195
|
+
g.push(h);
|
|
196
|
+
return g;
|
|
197
|
+
});
|
|
198
|
+
function Vt() {
|
|
199
|
+
Ye("reset");
|
|
200
|
+
}
|
|
201
|
+
p({
|
|
202
|
+
start: ve.value,
|
|
203
|
+
end: he.value
|
|
204
|
+
}), at(
|
|
205
|
+
() => d.min,
|
|
206
|
+
(g) => {
|
|
207
|
+
Number(ve.value) < Number(g) && (ve.value = Number(g)), Number(he.value) < Number(g) && (he.value = Number(g));
|
|
208
|
+
}
|
|
209
|
+
), at(
|
|
210
|
+
() => d.max,
|
|
211
|
+
(g) => {
|
|
212
|
+
Number(ve.value) > Number(g) && (ve.value = Number(g)), Number(he.value) > Number(g) && (he.value = Number(g));
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
const Je = p(null), q = p({
|
|
216
|
+
width: 1,
|
|
217
|
+
height: 1
|
|
218
|
+
}), $e = p(null);
|
|
219
|
+
rl(() => {
|
|
220
|
+
if ($t.value) {
|
|
221
|
+
const g = Dl(() => {
|
|
222
|
+
const { width: h, height: w } = Ro({
|
|
223
|
+
chart: Je.value
|
|
224
|
+
});
|
|
225
|
+
q.value.width = h, q.value.height = w - 47;
|
|
226
|
+
});
|
|
227
|
+
$e.value = new ResizeObserver(g), $e.value.observe(Je.value);
|
|
228
|
+
}
|
|
229
|
+
}), cl(() => {
|
|
230
|
+
$e.value && $e.value.disconnect();
|
|
231
|
+
});
|
|
232
|
+
const fe = k(() => d.minimap.length ? q.value.width / d.minimap.length : 0), pe = k(() => {
|
|
233
|
+
if (!d.minimap.length) return [];
|
|
234
|
+
const g = Math.max(...d.minimap), h = Math.min(...d.minimap) - 10, w = g - (h > 0 ? 0 : h), m = d.minimap.map((Xt, Rl) => {
|
|
235
|
+
const el = Xt - h;
|
|
236
|
+
return {
|
|
237
|
+
x: q.value.width / d.minimap.length * Rl + fe.value / 2,
|
|
238
|
+
y: q.value.height - el / w * (q.value.height * 0.9)
|
|
239
|
+
};
|
|
240
|
+
}), ne = d.smoothMinimap ? zl(m) : Al(m), xt = [...m].slice(d.valueStart, d.valueEnd), fl = d.smoothMinimap ? zl(xt) : Al(xt);
|
|
241
|
+
return {
|
|
242
|
+
fullSet: ne,
|
|
243
|
+
selectionSet: fl,
|
|
244
|
+
sliced: xt,
|
|
245
|
+
firstPlot: m[d.valueStart],
|
|
246
|
+
lastPlot: m[d.valueEnd - 1]
|
|
247
|
+
};
|
|
248
|
+
}), z = k(() => ({
|
|
249
|
+
x: fe.value * ve.value + fe.value / 2,
|
|
250
|
+
width: q.value.width * ((he.value - ve.value) / d.max) - fe.value
|
|
251
|
+
})), vt = p(d.minimapSelectedIndex);
|
|
252
|
+
at(() => d.minimapSelectedIndex, (g) => {
|
|
253
|
+
vt.value = g + d.valueStart;
|
|
254
|
+
}, { immediate: !0 });
|
|
255
|
+
function me(g) {
|
|
256
|
+
vt.value = g, g >= d.valueStart && g < d.valueEnd && Ye("trapMouse", g - d.valueStart);
|
|
257
|
+
}
|
|
258
|
+
const ue = p(0), dt = p(null), Qt = p(null);
|
|
259
|
+
function ht(g) {
|
|
260
|
+
if (typeof g == "object" && g && "target" in g) {
|
|
261
|
+
const w = g.target, m = "valueAsNumber" in w ? w.valueAsNumber : +w.value;
|
|
262
|
+
return Number.isFinite(m) ? m : NaN;
|
|
263
|
+
}
|
|
264
|
+
const h = +g;
|
|
265
|
+
return Number.isFinite(h) ? h : NaN;
|
|
266
|
+
}
|
|
267
|
+
function ft(g) {
|
|
268
|
+
const h = ht(g);
|
|
269
|
+
Number.isFinite(h) && (st.value = h);
|
|
270
|
+
}
|
|
271
|
+
function ut(g) {
|
|
272
|
+
const h = ht(g);
|
|
273
|
+
Number.isFinite(h) && (rt.value = h);
|
|
274
|
+
}
|
|
275
|
+
const Et = k(() => d.valueEnd - d.valueStart), ze = p(!1);
|
|
276
|
+
let le = p(null);
|
|
277
|
+
const X = k(() => (Pt.value - 48) / (d.max - d.min)), vl = k(() => (Pt.value - 48) / (d.max - d.min) * Et.value), dl = p(2.5), jt = k(() => {
|
|
278
|
+
const g = Pt.value - 48;
|
|
279
|
+
return Math.ceil(
|
|
280
|
+
(d.max - d.min) / ((g - vl.value) / dl.value)
|
|
281
|
+
);
|
|
282
|
+
});
|
|
283
|
+
let _e = null, Oe = null, T = null, De = null;
|
|
284
|
+
const Bt = (g) => {
|
|
285
|
+
if (y.value = !0, !d.enableSelectionDrag) return;
|
|
286
|
+
const h = g.type === "touchstart", w = h && g.targetTouches && g.targetTouches[0] ? g.targetTouches[0] : null, m = h ? w ? w.target : null : g.target;
|
|
287
|
+
!m || !(m instanceof Element) || m.classList && m.classList.contains("range-handle") || (ze.value = !0, le.value = h ? w ? w.clientX : 0 : g.clientX, _e = h ? "touchmove" : "mousemove", Oe = h ? "touchend" : "mouseup", T = h ? ye : Ft, De = h ? hl : Wt, window.addEventListener(_e, T, { passive: !1 }), window.addEventListener(Oe, De));
|
|
288
|
+
};
|
|
289
|
+
function Ft(g) {
|
|
290
|
+
ze.value && He(g.clientX);
|
|
291
|
+
}
|
|
292
|
+
function ye(g) {
|
|
293
|
+
if (!ze.value || !Re.value) return;
|
|
294
|
+
const h = g.target;
|
|
295
|
+
if (!(h instanceof Element) || !Re.value.contains(h) || h.classList && h.classList.contains("range-handle")) return;
|
|
296
|
+
g.preventDefault();
|
|
297
|
+
const w = g.targetTouches && g.targetTouches[0] ? g.targetTouches[0] : null;
|
|
298
|
+
w && He(w.clientX);
|
|
299
|
+
}
|
|
300
|
+
function He(g) {
|
|
301
|
+
if (!ze.value) return;
|
|
302
|
+
const h = g - le.value;
|
|
303
|
+
if (Math.abs(h) > X.value) {
|
|
304
|
+
if (h > 0) {
|
|
305
|
+
const w = Math.min(d.max, he.value + jt.value);
|
|
306
|
+
rt.value = w, st.value = w - Et.value;
|
|
307
|
+
} else {
|
|
308
|
+
const w = Math.max(d.min, ve.value - jt.value);
|
|
309
|
+
st.value = w, rt.value = w + Et.value;
|
|
310
|
+
}
|
|
311
|
+
le.value = g;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
function Wt() {
|
|
315
|
+
_();
|
|
316
|
+
}
|
|
317
|
+
function hl() {
|
|
318
|
+
_();
|
|
319
|
+
}
|
|
320
|
+
function _() {
|
|
321
|
+
ze.value = !1, _e && T && window.removeEventListener(_e, T), Oe && De && window.removeEventListener(Oe, De), _e = Oe = null, T = De = null, Pe();
|
|
322
|
+
}
|
|
323
|
+
const gt = p(!1), Mt = p(null), mt = p(null), Ct = p(1), zt = p(1), y = p(!1);
|
|
324
|
+
function Yt() {
|
|
325
|
+
Mt.value && (Ct.value = Mt.value.getBoundingClientRect().width);
|
|
326
|
+
}
|
|
327
|
+
function $() {
|
|
328
|
+
mt.value && (zt.value = mt.value.getBoundingClientRect().width);
|
|
329
|
+
}
|
|
330
|
+
const Le = p(0);
|
|
331
|
+
function Dt(g) {
|
|
332
|
+
Le.value = g === "start" ? 1 : 0;
|
|
333
|
+
}
|
|
334
|
+
const Qe = p(!1), t = p({
|
|
335
|
+
width: 0,
|
|
336
|
+
left: 0
|
|
337
|
+
});
|
|
338
|
+
at([ve, he], async () => {
|
|
339
|
+
if (await Kt(), !Mt.value || !mt.value) {
|
|
340
|
+
Qe.value = !1, t.value = { width: 0, left: 0 };
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
const g = Mt.value.getBoundingClientRect(), h = mt.value.getBoundingClientRect();
|
|
344
|
+
Qe.value = g.x + g.width > h.x;
|
|
345
|
+
const w = g.x + g.width / 2, m = h.x + h.width / 2, ne = g.width + h.width, xt = (w + m) / 2;
|
|
346
|
+
t.value = {
|
|
347
|
+
width: ne,
|
|
348
|
+
left: xt - ne / 2
|
|
349
|
+
};
|
|
350
|
+
}), so(() => {
|
|
351
|
+
Yt(), $();
|
|
352
|
+
}), at(() => d.labelLeft, () => {
|
|
353
|
+
Kt(Yt);
|
|
354
|
+
}, { deep: !0 }), at(() => d.labelRight, () => {
|
|
355
|
+
Kt($);
|
|
356
|
+
}, { deep: !0 });
|
|
357
|
+
const B = k(() => {
|
|
358
|
+
const g = d.timeLabels.find((w) => w.absoluteIndex === ve.value), h = d.timeLabels.find((w) => w.absoluteIndex === he.value - 1);
|
|
359
|
+
return {
|
|
360
|
+
left: g ? g.text : "",
|
|
361
|
+
right: h ? h.text : ""
|
|
362
|
+
};
|
|
363
|
+
});
|
|
364
|
+
return cl(() => {
|
|
365
|
+
$e.value && $e.value.disconnect(), _e && T && window.removeEventListener(_e, T), Oe && De && window.removeEventListener(Oe, De), _e = Oe = null, T = De = null, clearTimeout(Ot);
|
|
366
|
+
}), Il({
|
|
367
|
+
setStartValue: ft,
|
|
368
|
+
setEndValue: ut
|
|
369
|
+
}), (g, h) => (u(), i("div", {
|
|
370
|
+
"data-dom-to-png-ignore": "",
|
|
371
|
+
style: { padding: "0 24px" },
|
|
372
|
+
class: "vue-data-ui-zoom",
|
|
373
|
+
ref_key: "zoomWrapper",
|
|
374
|
+
ref: Re,
|
|
375
|
+
onMousedown: Bt,
|
|
376
|
+
onTouchstart: Bt
|
|
377
|
+
}, [
|
|
378
|
+
b("div", Yo, [
|
|
379
|
+
I.valueStart !== I.refreshStartPoint || I.valueEnd !== Nl.value ? (u(), i("div", Do, [
|
|
380
|
+
I.useResetSlot ? J(g.$slots, "reset-action", {
|
|
381
|
+
key: 1,
|
|
382
|
+
reset: Vt
|
|
383
|
+
}, void 0, !0) : (u(), i("button", {
|
|
384
|
+
key: 0,
|
|
385
|
+
tabindex: "0",
|
|
386
|
+
role: "button",
|
|
387
|
+
class: "vue-data-ui-refresh-button",
|
|
388
|
+
style: L({
|
|
389
|
+
top: $t.value ? "36px" : "-16px",
|
|
390
|
+
pointerEvents: "all !important"
|
|
391
|
+
}),
|
|
392
|
+
onClick: Vt
|
|
393
|
+
}, [
|
|
394
|
+
qt(Wo, {
|
|
395
|
+
name: "refresh",
|
|
396
|
+
stroke: I.textColor
|
|
397
|
+
}, null, 8, ["stroke"])
|
|
398
|
+
], 4))
|
|
399
|
+
])) : f("", !0)
|
|
400
|
+
]),
|
|
401
|
+
b("div", {
|
|
402
|
+
class: "double-range-slider",
|
|
403
|
+
ref_key: "minimapWrapper",
|
|
404
|
+
ref: Je,
|
|
405
|
+
style: { "z-index": "0" },
|
|
406
|
+
onMouseenter: h[13] || (h[13] = (w) => y.value = !0),
|
|
407
|
+
onMouseleave: h[14] || (h[14] = (w) => y.value = !1)
|
|
408
|
+
}, [
|
|
409
|
+
$t.value ? (u(), i("div", Xo, [
|
|
410
|
+
(u(), i("svg", {
|
|
411
|
+
xmlns: v(bo),
|
|
412
|
+
viewBox: `0 0 ${q.value.width < 0 ? 0 : q.value.width} ${q.value.height < 0 ? 0 : q.value.height}`
|
|
413
|
+
}, [
|
|
414
|
+
b("defs", null, [
|
|
415
|
+
b("linearGradient", {
|
|
416
|
+
id: Jt.value,
|
|
417
|
+
x1: "0%",
|
|
418
|
+
y1: "0%",
|
|
419
|
+
x2: "0%",
|
|
420
|
+
y2: "100%"
|
|
421
|
+
}, [
|
|
422
|
+
b("stop", {
|
|
423
|
+
offset: "0%",
|
|
424
|
+
"stop-color": `${I.minimapLineColor}50`
|
|
425
|
+
}, null, 8, Zo),
|
|
426
|
+
h[15] || (h[15] = b("stop", {
|
|
427
|
+
offset: "100%",
|
|
428
|
+
"stop-color": "transparent"
|
|
429
|
+
}, null, -1))
|
|
430
|
+
], 8, Uo)
|
|
431
|
+
]),
|
|
432
|
+
b("path", {
|
|
433
|
+
d: `M${pe.value.fullSet}`,
|
|
434
|
+
stroke: `${I.minimapLineColor}`,
|
|
435
|
+
fill: "none",
|
|
436
|
+
"stroke-width": "1",
|
|
437
|
+
"stroke-linecap": "round",
|
|
438
|
+
"stroke-linejoin": "round",
|
|
439
|
+
style: { opacity: "1" }
|
|
440
|
+
}, null, 8, qo),
|
|
441
|
+
b("rect", {
|
|
442
|
+
x: z.value.x,
|
|
443
|
+
width: z.value.width < 0 ? 0 : z.value.width,
|
|
444
|
+
height: Math.max(q.value.height, 0),
|
|
445
|
+
y: 0,
|
|
446
|
+
fill: Ke.value,
|
|
447
|
+
rx: I.minimapSelectionRadius,
|
|
448
|
+
stroke: "none"
|
|
449
|
+
}, null, 8, Ko),
|
|
450
|
+
b("path", {
|
|
451
|
+
d: `M${fe.value / 2},${Math.max(q.value.height, 0)} ${pe.value.fullSet} L${q.value.width - fe.value / 2},${Math.max(q.value.height, 0)}Z`,
|
|
452
|
+
fill: `url(#${Jt.value})`,
|
|
453
|
+
stroke: "none",
|
|
454
|
+
style: { opacity: "1" }
|
|
455
|
+
}, null, 8, Jo),
|
|
456
|
+
b("rect", {
|
|
457
|
+
x: z.value.x,
|
|
458
|
+
width: z.value.width < 0 ? 0 : z.value.width,
|
|
459
|
+
height: Math.max(q.value.height, 0),
|
|
460
|
+
y: 0,
|
|
461
|
+
rx: I.minimapSelectionRadius,
|
|
462
|
+
fill: Ke.value
|
|
463
|
+
}, null, 8, Qo),
|
|
464
|
+
b("rect", {
|
|
465
|
+
x: z.value.x,
|
|
466
|
+
width: z.value.width < 0 ? 0 : z.value.width,
|
|
467
|
+
height: Math.max(q.value.height, 0),
|
|
468
|
+
y: 0,
|
|
469
|
+
fill: I.minimapSelectedColor,
|
|
470
|
+
rx: I.minimapSelectionRadius,
|
|
471
|
+
style: L({
|
|
472
|
+
opacity: I.minimapSelectedColorOpacity
|
|
473
|
+
})
|
|
474
|
+
}, null, 12, jo),
|
|
475
|
+
b("path", {
|
|
476
|
+
d: `M${pe.value.sliced[0].x},${Math.max(q.value.height, 0)} ${pe.value.selectionSet} L${pe.value.sliced.at(-1).x},${Math.max(q.value.height, 0)}Z`,
|
|
477
|
+
fill: `url(#${Jt.value})`,
|
|
478
|
+
stroke: "none",
|
|
479
|
+
style: { opacity: "1" }
|
|
480
|
+
}, null, 8, eu),
|
|
481
|
+
b("path", {
|
|
482
|
+
d: `M ${pe.value.selectionSet}`,
|
|
483
|
+
stroke: `${I.minimapLineColor}`,
|
|
484
|
+
fill: "transparent",
|
|
485
|
+
"stroke-width": "2",
|
|
486
|
+
"stroke-linecap": "round",
|
|
487
|
+
"stroke-linejoin": "round"
|
|
488
|
+
}, null, 8, tu),
|
|
489
|
+
b("circle", {
|
|
490
|
+
cx: pe.value.firstPlot.x,
|
|
491
|
+
cy: pe.value.firstPlot.y,
|
|
492
|
+
"stroke-width": "0.5",
|
|
493
|
+
stroke: Ke.value,
|
|
494
|
+
r: "3",
|
|
495
|
+
fill: I.minimapLineColor
|
|
496
|
+
}, null, 8, lu),
|
|
497
|
+
b("circle", {
|
|
498
|
+
cx: pe.value.lastPlot.x,
|
|
499
|
+
cy: pe.value.lastPlot.y,
|
|
500
|
+
"stroke-width": "0.5",
|
|
501
|
+
stroke: Ke.value,
|
|
502
|
+
r: "3",
|
|
503
|
+
fill: I.minimapLineColor
|
|
504
|
+
}, null, 8, au),
|
|
505
|
+
vt.value !== null ? (u(!0), i(x, { key: 0 }, C(Ht.value, (w, m) => (u(), i("g", null, [
|
|
506
|
+
vt.value === w && w >= I.valueStart && w < I.valueEnd ? (u(), i("line", {
|
|
507
|
+
key: 0,
|
|
508
|
+
x1: fe.value * m + fe.value / 2,
|
|
509
|
+
x2: fe.value * m + fe.value / 2,
|
|
510
|
+
y1: 0,
|
|
511
|
+
y2: Math.max(q.value.height, 0),
|
|
512
|
+
stroke: I.minimapIndicatorColor,
|
|
513
|
+
"stroke-linecap": "round",
|
|
514
|
+
"stroke-dasharray": "2",
|
|
515
|
+
"stroke-width": "1"
|
|
516
|
+
}, null, 8, ou)) : f("", !0)
|
|
517
|
+
]))), 256)) : f("", !0),
|
|
518
|
+
(u(!0), i(x, null, C(Ht.value, (w, m) => (u(), i("rect", {
|
|
519
|
+
x: fe.value * m,
|
|
520
|
+
y: 0,
|
|
521
|
+
height: Math.max(q.value.height, 0),
|
|
522
|
+
width: fe.value < 0 ? 0 : fe.value,
|
|
523
|
+
fill: "transparent",
|
|
524
|
+
style: L([{ "pointer-events": "all !important" }, {
|
|
525
|
+
cursor: w >= I.valueStart && w < I.valueEnd && I.enableSelectionDrag ? gt.value ? "grabbing" : "grab" : "default"
|
|
526
|
+
}]),
|
|
527
|
+
onMousedown: h[0] || (h[0] = (ne) => gt.value = !0),
|
|
528
|
+
onMouseup: h[1] || (h[1] = (ne) => gt.value = !1),
|
|
529
|
+
onMouseenter: (ne) => me(w),
|
|
530
|
+
onMouseleave: h[2] || (h[2] = (ne) => {
|
|
531
|
+
vt.value = null, Ye("trapMouse", null);
|
|
532
|
+
})
|
|
533
|
+
}, null, 44, uu))), 256))
|
|
534
|
+
], 8, Go))
|
|
535
|
+
])) : f("", !0),
|
|
536
|
+
h[16] || (h[16] = b("div", { class: "slider-track" }, null, -1)),
|
|
537
|
+
b("div", {
|
|
538
|
+
class: Ne({
|
|
539
|
+
"range-highlight": !0,
|
|
540
|
+
move: I.enableSelectionDrag
|
|
541
|
+
}),
|
|
542
|
+
onMousedown: h[3] || (h[3] = (w) => gt.value = !0),
|
|
543
|
+
onMouseup: h[4] || (h[4] = (w) => gt.value = !1),
|
|
544
|
+
style: L({
|
|
545
|
+
...oe.value,
|
|
546
|
+
cursor: gt.value ? "grabbing" : "grab"
|
|
547
|
+
})
|
|
548
|
+
}, null, 38),
|
|
549
|
+
I.enableRangeHandles ? Yl((u(), i("input", {
|
|
550
|
+
ref_key: "rangeStart",
|
|
551
|
+
ref: dt,
|
|
552
|
+
key: `range-min${ue.value}`,
|
|
553
|
+
type: "range",
|
|
554
|
+
class: Ne({ "range-left": !0, "range-handle": !0, "range-minimap": $t.value && I.verticalHandles }),
|
|
555
|
+
min: I.min,
|
|
556
|
+
max: I.max,
|
|
557
|
+
"onUpdate:modelValue": h[5] || (h[5] = (w) => st.value = w),
|
|
558
|
+
onInput: h[6] || (h[6] = (w) => ft(w)),
|
|
559
|
+
onChange: Pe,
|
|
560
|
+
onKeyup: Ma(Pe, ["enter"]),
|
|
561
|
+
onBlur: Pe,
|
|
562
|
+
onMouseenter: h[7] || (h[7] = (w) => Dt("start")),
|
|
563
|
+
onPointermove: h[8] || (h[8] = (w) => st.value = +w.target.value),
|
|
564
|
+
onPointerup: Pe
|
|
565
|
+
}, null, 42, nu)), [
|
|
566
|
+
[
|
|
567
|
+
Ca,
|
|
568
|
+
st.value,
|
|
569
|
+
void 0,
|
|
570
|
+
{ number: !0 }
|
|
571
|
+
]
|
|
572
|
+
]) : f("", !0),
|
|
573
|
+
I.enableRangeHandles ? Yl((u(), i("input", {
|
|
574
|
+
key: 2,
|
|
575
|
+
ref_key: "rangeEnd",
|
|
576
|
+
ref: Qt,
|
|
577
|
+
type: "range",
|
|
578
|
+
class: Ne({ "range-right": !0, "range-handle": !0, "range-minimap": $t.value && I.verticalHandles }),
|
|
579
|
+
min: I.min,
|
|
580
|
+
max: I.max,
|
|
581
|
+
"onUpdate:modelValue": h[9] || (h[9] = (w) => rt.value = w),
|
|
582
|
+
onInput: h[10] || (h[10] = (w) => ut(w)),
|
|
583
|
+
onChange: Pe,
|
|
584
|
+
onKeyup: Ma(Pe, ["enter"]),
|
|
585
|
+
onBlur: Pe,
|
|
586
|
+
onMouseenter: h[11] || (h[11] = (w) => Dt("end")),
|
|
587
|
+
onPointermove: h[12] || (h[12] = (w) => rt.value = +w.target.value),
|
|
588
|
+
onPointerup: Pe
|
|
589
|
+
}, null, 42, iu)), [
|
|
590
|
+
[
|
|
591
|
+
Ca,
|
|
592
|
+
rt.value,
|
|
593
|
+
void 0,
|
|
594
|
+
{ number: !0 }
|
|
595
|
+
]
|
|
596
|
+
]) : f("", !0),
|
|
597
|
+
B.value.left ? (u(), i("div", {
|
|
598
|
+
key: 3,
|
|
599
|
+
ref_key: "tooltipLeft",
|
|
600
|
+
ref: Mt,
|
|
601
|
+
class: Ne({
|
|
602
|
+
"range-tooltip": !0,
|
|
603
|
+
"range-tooltip-visible": y.value,
|
|
604
|
+
"range-tooltip-arrow": oe.value.arrowLeft && !I.verticalHandles,
|
|
605
|
+
"range-tooltip-arrow-left": !oe.value.arrowLeft && !I.verticalHandles
|
|
606
|
+
}),
|
|
607
|
+
style: L({
|
|
608
|
+
left: oe.value.tooltipLeft,
|
|
609
|
+
color: v(qe)(I.selectColor),
|
|
610
|
+
backgroundColor: I.selectColor,
|
|
611
|
+
border: `1px solid ${Ke.value}`,
|
|
612
|
+
zIndex: `${Le.value + 4}`,
|
|
613
|
+
visibility: Qe.value || B.value.left === B.value.right ? "hidden" : "visible"
|
|
614
|
+
})
|
|
615
|
+
}, te(B.value.left), 7)) : f("", !0),
|
|
616
|
+
(Qe.value || B.value.left === B.value.right) && (B.value.left || B.value.right) ? (u(), i("div", {
|
|
617
|
+
key: 4,
|
|
618
|
+
ref: "tooltipMerge",
|
|
619
|
+
class: Ne({
|
|
620
|
+
"range-tooltip": !0,
|
|
621
|
+
"range-tooltip-visible": y.value,
|
|
622
|
+
"range-tooltip-arrow": !0,
|
|
623
|
+
"range-tooltip-arrow-left": !oe.value.arrowLeft && !I.verticalHandles,
|
|
624
|
+
"range-tooltip-arrow-right": !oe.value.arrowRight && !I.verticalHandles
|
|
625
|
+
}),
|
|
626
|
+
style: L({
|
|
627
|
+
left: oe.value.tooltipCenter,
|
|
628
|
+
width: t.value.width + "px",
|
|
629
|
+
color: v(qe)(I.selectColor),
|
|
630
|
+
backgroundColor: I.selectColor,
|
|
631
|
+
border: `1px solid ${Ke.value}`,
|
|
632
|
+
zIndex: "4"
|
|
633
|
+
})
|
|
634
|
+
}, te(B.value.left === B.value.right ? B.value.left : `${B.value.left} - ${B.value.right}`), 7)) : f("", !0),
|
|
635
|
+
B.value.right ? (u(), i("div", {
|
|
636
|
+
key: 5,
|
|
637
|
+
ref_key: "tooltipRight",
|
|
638
|
+
ref: mt,
|
|
639
|
+
class: Ne({
|
|
640
|
+
"range-tooltip": !0,
|
|
641
|
+
"range-tooltip-visible": y.value,
|
|
642
|
+
"range-tooltip-arrow": oe.value.arrowRight && !I.verticalHandles,
|
|
643
|
+
"range-tooltip-arrow-right": !oe.value.arrowRight && !I.verticalHandles
|
|
644
|
+
}),
|
|
645
|
+
style: L({
|
|
646
|
+
left: oe.value.tooltipRight,
|
|
647
|
+
color: v(qe)(I.selectColor),
|
|
648
|
+
backgroundColor: I.selectColor,
|
|
649
|
+
border: `1px solid ${Ke.value}`,
|
|
650
|
+
zIndex: "4",
|
|
651
|
+
visibility: Qe.value || B.value.left === B.value.right ? "hidden" : "visible"
|
|
652
|
+
})
|
|
653
|
+
}, te(B.value.right), 7)) : f("", !0)
|
|
654
|
+
], 544)
|
|
655
|
+
], 544));
|
|
656
|
+
}
|
|
657
|
+
}, ru = /* @__PURE__ */ Oa(su, [["__scopeId", "data-v-619e736c"]]), cu = ["id"], vu = ["id"], du = ["viewBox", "aria-label"], hu = ["x", "y", "width", "height"], fu = { key: 1 }, gu = { class: "vue-ui-xy-grid" }, mu = ["stroke", "x1", "x2", "y1", "y2"], xu = ["stroke", "x1", "x2", "y1", "y2"], bu = { key: 1 }, pu = ["x1", "x2", "y1", "y2", "stroke"], yu = ["x1", "x2", "y1", "y2", "stroke"], ku = ["x1", "x2", "y1", "y2", "stroke"], wu = { key: 3 }, Su = ["d", "stroke"], $u = { key: 4 }, _u = ["d", "stroke"], Lu = ["id"], Mu = ["stop-color"], Cu = ["stop-color"], zu = ["stop-color"], Au = ["id"], Iu = ["stop-color"], Tu = ["stop-color"], Nu = ["stop-color"], Ru = ["id"], Pu = ["stop-color"], Ou = ["stop-color"], Hu = ["id"], Vu = ["stop-color"], Eu = ["stop-color"], Bu = ["id"], Fu = ["stop-color"], Wu = ["stop-color"], Yu = ["x", "y", "height", "width", "fill"], Du = ["x", "y", "width"], Xu = { key: 0 }, Gu = ["x", "y", "height", "width", "fill"], Uu = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Zu = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], qu = ["width", "x", "y"], Ku = { key: 0 }, Ju = ["id"], Qu = ["fill"], ju = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], en = ["x", "y", "font-size", "fill"], tn = ["stroke", "x1", "x2", "y1", "y2"], ln = { key: 3 }, an = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], on = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], un = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], nn = ["fill", "font-size", "transform"], sn = ["x1", "x2", "y1", "y2", "stroke"], rn = ["x", "y", "font-size", "fill"], cn = ["x1", "x2", "y1", "y2", "stroke"], vn = ["x", "y", "font-size", "fill"], dn = ["width", "x", "y"], hn = { style: { width: "100%" } }, fn = { key: 0 }, gn = ["id"], mn = ["fill"], xn = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], bn = ["x", "y", "font-size", "fill"], pn = ["d", "stroke", "stroke-width", "stroke-dasharray"], yn = ["d", "stroke", "stroke-width", "stroke-dasharray"], kn = { key: 6 }, wn = { key: 0 }, Sn = ["d", "fill"], $n = ["d", "fill"], _n = ["d", "fill"], Ln = ["d", "fill"], Mn = ["d", "stroke", "stroke-width", "stroke-dasharray"], Cn = ["d", "stroke", "stroke-width", "stroke-dasharray"], zn = ["width", "x", "y"], An = { style: { width: "100%" } }, In = { key: 3 }, Tn = ["id"], Nn = ["fill"], Rn = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Pn = ["x", "y", "font-size", "fill"], On = { key: 7 }, Hn = ["x", "y", "font-size", "fill"], Vn = ["x", "y", "font-size", "fill", "font-weight"], En = { key: 8 }, Bn = ["x", "y", "font-size", "fill"], Fn = { key: 9 }, Wn = ["x", "y"], Yn = ["innerHTML"], Dn = ["x", "y"], Xn = ["innerHTML"], Gn = ["x1", "x2", "y1", "y2", "stroke"], Un = { key: 10 }, Zn = ["x", "y", "font-size", "fill"], qn = { key: 11 }, Kn = ["x", "y"], Jn = ["innerHTML"], Qn = ["x", "y"], jn = ["innerHTML"], ei = ["x1", "x2", "y1", "y2", "stroke"], ti = ["x", "y", "font-size", "fill", "innerHTML"], li = ["x", "y", "font-size", "fill", "innerHTML"], ai = ["x", "y", "font-size", "fill", "innerHTML"], oi = ["x", "y", "font-size", "fill", "innerHTML"], ui = ["id"], ni = ["stop-color"], ii = ["stop-color"], si = ["x", "y", "width", "height", "fill", "onMouseenter"], ri = ["font-size", "fill", "transform"], ci = ["x", "y", "font-size", "fill"], vi = ["text-anchor", "font-size", "fill", "transform", "onClick"], di = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], hi = { key: 14 }, fi = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], gi = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], mi = ["y", "x", "width", "height", "fill"], xi = ["id", "x", "y", "font-size", "fill", "text-anchor"], bi = {
|
|
658
|
+
key: 15,
|
|
659
|
+
style: { "pointer-events": "none" }
|
|
660
|
+
}, pi = ["x", "y"], yi = ["cx", "cy", "r", "fill"], ki = {
|
|
661
|
+
key: 4,
|
|
662
|
+
class: "vue-data-ui-watermark"
|
|
663
|
+
}, wi = {
|
|
664
|
+
class: "vue-ui-xy-tag-arrow",
|
|
665
|
+
height: "20",
|
|
666
|
+
viewBox: "0 0 10 20",
|
|
667
|
+
style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
668
|
+
}, Si = ["fill"], $i = ["innerHTML"], _i = {
|
|
669
|
+
class: "vue-ui-xy-tag-arrow",
|
|
670
|
+
height: "100%",
|
|
671
|
+
viewBox: "0 0 10 20",
|
|
672
|
+
style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
673
|
+
}, Li = ["fill"], Mi = ["innerHTML"], Ci = {
|
|
674
|
+
class: "vue-ui-xy-tag-arrow",
|
|
675
|
+
height: "20",
|
|
676
|
+
viewBox: "0 0 10 20",
|
|
677
|
+
style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
678
|
+
}, zi = ["fill"], Ai = ["innerHTML"], Ii = {
|
|
679
|
+
class: "vue-ui-xy-tag-arrow",
|
|
680
|
+
height: "100%",
|
|
681
|
+
viewBox: "0 0 10 20",
|
|
682
|
+
style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
683
|
+
}, Ti = ["fill"], Ni = ["innerHTML"], Ri = ["id"], Pi = ["onClick"], Oi = {
|
|
684
|
+
key: 0,
|
|
685
|
+
viewBox: "0 0 20 12",
|
|
686
|
+
height: "14",
|
|
687
|
+
width: "20"
|
|
688
|
+
}, Hi = ["stroke", "fill"], Vi = {
|
|
689
|
+
key: 1,
|
|
690
|
+
viewBox: "0 0 40 40",
|
|
691
|
+
height: "14",
|
|
692
|
+
width: "14"
|
|
693
|
+
}, Ei = ["fill"], Bi = ["fill"], Fi = {
|
|
694
|
+
key: 2,
|
|
695
|
+
viewBox: "0 0 12 12",
|
|
696
|
+
height: "14",
|
|
697
|
+
width: "14"
|
|
698
|
+
}, Wi = {
|
|
699
|
+
style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
|
|
700
|
+
"data-dom-to-png-ignore": ""
|
|
701
|
+
}, Yi = ["innerHTML"], Di = {
|
|
702
|
+
__name: "vue-ui-xy",
|
|
703
|
+
props: {
|
|
704
|
+
config: {
|
|
705
|
+
type: Object,
|
|
706
|
+
default() {
|
|
707
|
+
return {};
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
dataset: {
|
|
711
|
+
type: Array,
|
|
712
|
+
default() {
|
|
713
|
+
return [];
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
selectedXIndex: {
|
|
717
|
+
type: Number,
|
|
718
|
+
default: void 0
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
emits: ["selectTimeLabel", "selectX", "selectLegend"],
|
|
722
|
+
setup(I, { expose: Il, emit: Tl }) {
|
|
723
|
+
const d = I, Re = kt(() => import("./DataTable-rj9-mAwF.js")), ve = kt(() => import("./Tooltip-BMOddG-M.js")), he = kt(() => import("./UserOptions-DVzyjG-W.js")), $t = kt(() => import("./BaseIcon-CCivwZUq.js")), Jt = kt(() => import("./vue-ui-table-sparkline-BUzu6v2P.js")), Pt = kt(() => import("./vue-ui-accordion-D46i_gkB.js")), st = kt(() => import("./PackageVersion-5ZjKSIei.js")), rt = kt(() => import("./PenAndPaper-BJ0hcgsa.js")), Ot = Tl, Pe = ro(), Nl = co(), { vue_ui_xy: Ye } = po(), oe = p(null), ot = p(null), Ce = p(null), ct = p(null), _t = p(null), Lt = p(null), Ke = p(null), Ht = p(null), Vt = p(null), Je = p(null), q = p(null), $e = p(null), fe = p(null), pe = p(0), z = p(null), vt = p(!0), me = p(600), ue = p(1e3), dt = p("0 0 1000 600"), Qt = p({ x: 0, y: 0 }), ht = p({ line: "line", bar: "bar", plot: "plot" }), ft = p(!1), ut = p(!1), Et = p(!1), ze = p(null), le = p([]), X = p(Cl()), vl = p(0), dl = p(0), jt = p(0), _e = p(!0), Oe = p(0), T = p(null), De = p(!1), Bt = p(!0), Ft = p(!0), ye = p(null), He = p({}), Wt = p(null), hl = p(!1), _ = p(null), gt = k(() => ({
|
|
724
|
+
height: me.value,
|
|
725
|
+
width: ue.value
|
|
726
|
+
})), Mt = d.config.downsample && d.config.downsample.threshold ? d.config.downsample.threshold : 500;
|
|
727
|
+
function mt(l) {
|
|
728
|
+
return Number.isFinite(l) ? Math.max(0, Math.floor(l)) : 0;
|
|
729
|
+
}
|
|
730
|
+
function Ct(l, r, e = 0) {
|
|
731
|
+
return Number.isFinite(l) && Number.isFinite(r) && Math.abs(r) > 1e-9 ? l / r : e;
|
|
732
|
+
}
|
|
733
|
+
const zt = p(!1), y = p({
|
|
734
|
+
dataLabels: { show: !0 },
|
|
735
|
+
showTooltip: !0,
|
|
736
|
+
showTable: !1,
|
|
737
|
+
isStacked: !1,
|
|
738
|
+
useIndividualScale: !1
|
|
739
|
+
});
|
|
740
|
+
function Yt() {
|
|
741
|
+
zt.value ? (y.value.isStacked = t.value.chart.grid.labels.yAxis.stacked, y.value.useIndividualScale == null && (y.value.useIndividualScale = t.value.chart.grid.labels.yAxis.useIndividualScale)) : (y.value = {
|
|
742
|
+
dataLabels: { show: !0 },
|
|
743
|
+
showTooltip: t.value.chart.tooltip.show === !0,
|
|
744
|
+
showTable: t.value.showTable === !0,
|
|
745
|
+
isStacked: t.value.chart.grid.labels.yAxis.stacked,
|
|
746
|
+
useIndividualScale: t.value.chart.grid.labels.yAxis.useIndividualScale
|
|
747
|
+
}, zt.value = !0);
|
|
748
|
+
}
|
|
749
|
+
const $ = p({
|
|
750
|
+
xAxis: 18,
|
|
751
|
+
yAxis: 12,
|
|
752
|
+
dataLabels: 20,
|
|
753
|
+
plotLabels: 10
|
|
754
|
+
}), Le = p({ plot: 3, line: 3 });
|
|
755
|
+
rl(() => {
|
|
756
|
+
hl.value = !0, d.dataset.length && d.dataset.forEach((l, r) => {
|
|
757
|
+
[null, void 0].includes(l.series) && Fl({
|
|
758
|
+
componentName: "VueUiXy",
|
|
759
|
+
type: "datasetSerieAttribute",
|
|
760
|
+
property: "series (number[])",
|
|
761
|
+
index: r,
|
|
762
|
+
debug: ul.value
|
|
763
|
+
});
|
|
764
|
+
});
|
|
765
|
+
});
|
|
766
|
+
function Dt() {
|
|
767
|
+
if (!Object.keys(d.config || {}).length)
|
|
768
|
+
return Ye;
|
|
769
|
+
const l = Wl({
|
|
770
|
+
userConfig: d.config,
|
|
771
|
+
defaultConfig: Ye
|
|
772
|
+
});
|
|
773
|
+
return d.config && We(d.config, "chart.highlightArea") && (Array.isArray(d.config.chart.highlightArea) ? l.chart.highlightArea = d.config.chart.highlightArea : l.chart.highlightArea = [d.config.chart.highlightArea]), d.config && We(d.config, "chart.grid.labels.yAxis.scaleMin") ? l.chart.grid.labels.yAxis.scaleMin = d.config.chart.grid.labels.yAxis.scaleMin : l.chart.grid.labels.yAxis.scaleMin = null, d.config && We(d.config, "chart.grid.labels.yAxis.scaleMax") ? l.chart.grid.labels.yAxis.scaleMax = d.config.chart.grid.labels.yAxis.scaleMax : l.chart.grid.labels.yAxis.scaleMax = null, d.config && We(d.config, "chart.zoom.startIndex") ? l.chart.zoom.startIndex = d.config.chart.zoom.startIndex : l.chart.zoom.startIndex = null, d.config && We(d.config, "chart.zoom.endIndex") ? l.chart.zoom.endIndex = d.config.chart.zoom.endIndex : l.chart.zoom.endIndex = null, d.config && We(d.config, "chart.grid.labels.yAxis.groupColor") ? l.chart.grid.labels.yAxis.groupColor = d.config.chart.grid.labels.yAxis.groupColor : l.chart.grid.labels.yAxis.groupColor = null, d.config && d.config.chart.annotations && Array.isArray(d.config.chart.annotations) && d.config.chart.annotations.length ? l.chart.annotations = d.config.chart.annotations.map((r) => Wl({
|
|
774
|
+
defaultConfig: Ye.chart.annotations[0],
|
|
775
|
+
userConfig: r
|
|
776
|
+
})) : l.chart.annotations = [], d.config && We(d.config, "chart.grid.position") && d.config.chart.grid.position === "start" && d.dataset.length && d.dataset.some((r) => r.type === "bar") && (l.chart.grid.position = "middle", We(d.config, "debug") && console.warn("Vue Data UI - VueUiXy - config.chart.grid.position was overriden to `middle` because your dataset contains a bar")), d.config && We(d.config, "chart.grid.labels.yAxis.serieNameFormatter") ? l.chart.grid.labels.yAxis.serieNameFormatter = d.config.chart.grid.labels.yAxis.serieNameFormatter : l.chart.grid.labels.yAxis.serieNameFormatter = null, d.config && We(d.config, "events.datapointEnter") ? l.events.datapointEnter = d.config.events.datapointEnter : l.events.datapointEnter = null, d.config && We(d.config, "events.datapointLeave") ? l.events.datapointLeave = d.config.events.datapointLeave : l.events.datapointLeave = null, d.config && We(d.config, "events.datapointClick") ? l.events.datapointClick = d.config.events.datapointClick : l.events.datapointClick = null, l.theme ? {
|
|
777
|
+
...Wl({
|
|
778
|
+
userConfig: Io.vue_ui_xy[l.theme] || d.config,
|
|
779
|
+
defaultConfig: l
|
|
780
|
+
}),
|
|
781
|
+
customPalette: Ao[l.theme] || d.palette
|
|
782
|
+
} : l;
|
|
783
|
+
}
|
|
784
|
+
const Qe = k({
|
|
785
|
+
get() {
|
|
786
|
+
return !!d.dataset && d.dataset.length;
|
|
787
|
+
},
|
|
788
|
+
set(l) {
|
|
789
|
+
return l;
|
|
790
|
+
}
|
|
791
|
+
}), t = p(Dt()), { loading: B, FINAL_DATASET: g, manualLoading: h } = Oo({
|
|
792
|
+
...vo(d),
|
|
793
|
+
FINAL_CONFIG: t,
|
|
794
|
+
prepareConfig: Dt,
|
|
795
|
+
callback: () => {
|
|
796
|
+
Promise.resolve().then(async () => {
|
|
797
|
+
await bl();
|
|
798
|
+
});
|
|
799
|
+
},
|
|
800
|
+
skeletonDataset: [
|
|
801
|
+
{
|
|
802
|
+
name: "",
|
|
803
|
+
series: [0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 134],
|
|
804
|
+
type: "line",
|
|
805
|
+
smooth: !0,
|
|
806
|
+
color: "#BABABA"
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
name: "",
|
|
810
|
+
series: [0, 0.5, 1, 1.5, 2.5, 4, 6.5, 10.5, 17, 27.5, 44.5, 67],
|
|
811
|
+
type: "bar",
|
|
812
|
+
color: "#CACACA"
|
|
813
|
+
}
|
|
814
|
+
],
|
|
815
|
+
skeletonConfig: yo({
|
|
816
|
+
defaultConfig: t.value,
|
|
817
|
+
userConfig: {
|
|
818
|
+
useCssAnimation: !1,
|
|
819
|
+
showTable: !1,
|
|
820
|
+
chart: {
|
|
821
|
+
annotations: [],
|
|
822
|
+
highlightArea: [],
|
|
823
|
+
backgroundColor: "#99999930",
|
|
824
|
+
grid: {
|
|
825
|
+
stroke: "#6A6A6A",
|
|
826
|
+
labels: {
|
|
827
|
+
show: !1,
|
|
828
|
+
axis: {
|
|
829
|
+
yLabel: "",
|
|
830
|
+
xLabel: ""
|
|
831
|
+
},
|
|
832
|
+
xAxisLabels: { show: !1 },
|
|
833
|
+
yAxis: {
|
|
834
|
+
commonScaleSteps: 10,
|
|
835
|
+
useNiceScale: !0,
|
|
836
|
+
scaleMin: 0,
|
|
837
|
+
scaleMax: 134
|
|
838
|
+
},
|
|
839
|
+
zeroLine: { show: !0 }
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
padding: {
|
|
843
|
+
top: 12,
|
|
844
|
+
bottom: 24,
|
|
845
|
+
left: 24,
|
|
846
|
+
right: 24
|
|
847
|
+
},
|
|
848
|
+
userOptions: { show: !1 },
|
|
849
|
+
zoom: {
|
|
850
|
+
show: !1,
|
|
851
|
+
startIndex: null,
|
|
852
|
+
endIndex: null
|
|
853
|
+
}
|
|
854
|
+
},
|
|
855
|
+
bar: {
|
|
856
|
+
serieName: { show: !1 },
|
|
857
|
+
labels: { show: !1 },
|
|
858
|
+
border: {
|
|
859
|
+
useSerieColor: !1,
|
|
860
|
+
stroke: "#999999"
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
line: {
|
|
864
|
+
dot: {
|
|
865
|
+
useSerieColor: !1,
|
|
866
|
+
fill: "#8A8A8A"
|
|
867
|
+
},
|
|
868
|
+
labels: { show: !1 }
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
})
|
|
872
|
+
}), w = k({
|
|
873
|
+
get: () => Math.max(...g.value.map((l) => Ue({ data: l.series, threshold: Mt }).length)),
|
|
874
|
+
set: (l) => l
|
|
875
|
+
}), m = p({ start: 0, end: w.value }), ne = p({ start: 0, end: w.value }), xt = k(() => t.value.chart.zoom.preview.enable && (ne.value.start !== m.value.start || ne.value.end !== m.value.end));
|
|
876
|
+
function fl(l, r) {
|
|
877
|
+
ne.value[l] = r;
|
|
878
|
+
}
|
|
879
|
+
function Xt() {
|
|
880
|
+
const l = Math.max(
|
|
881
|
+
1,
|
|
882
|
+
...g.value.map((n) => Ue({
|
|
883
|
+
data: n.series,
|
|
884
|
+
threshold: t.value.downsample.threshold
|
|
885
|
+
}).length)
|
|
886
|
+
);
|
|
887
|
+
let r = Math.max(0, Math.min(m.value.start ?? 0, l - 1)), e = Math.max(r + 1, Math.min(m.value.end ?? l, l));
|
|
888
|
+
(!Number.isFinite(r) || !Number.isFinite(e) || e <= r) && (r = 0, e = l), m.value = { start: r, end: e }, ne.value.start = r, ne.value.end = e;
|
|
889
|
+
}
|
|
890
|
+
const Rl = k(() => {
|
|
891
|
+
const { left: l, top: r, width: e, height: n } = c.value, a = m.value.start, o = m.value.end - a, P = e / o, G = ne.value.start - a, U = ne.value.end - a, M = Math.max(0, Math.min(o, G)), H = Math.max(0, Math.min(o, U));
|
|
892
|
+
return {
|
|
893
|
+
x: l + M * P,
|
|
894
|
+
y: r,
|
|
895
|
+
width: (H - M) * P,
|
|
896
|
+
height: n,
|
|
897
|
+
fill: t.value.chart.zoom.preview.fill,
|
|
898
|
+
stroke: t.value.chart.zoom.preview.stroke,
|
|
899
|
+
"stroke-width": t.value.chart.zoom.preview.strokeWidth,
|
|
900
|
+
"stroke-dasharray": t.value.chart.zoom.preview.strokeDasharray,
|
|
901
|
+
"stroke-linecap": "round",
|
|
902
|
+
"stroke-linejoin": "round",
|
|
903
|
+
style: {
|
|
904
|
+
pointerEvents: "none",
|
|
905
|
+
transition: "all 0.1s ease-in-out",
|
|
906
|
+
animation: "none !important"
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
});
|
|
910
|
+
at(() => d.selectedXIndex, (l) => {
|
|
911
|
+
if ([null, void 0].includes(d.selectedXIndex)) {
|
|
912
|
+
_.value = null;
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
const r = l - m.value.start;
|
|
916
|
+
r < 0 || l >= m.value.end ? _.value = null : _.value = r ?? null;
|
|
917
|
+
}, { immediate: !0 });
|
|
918
|
+
const { isPrinting: el, isImaging: Xl, generatePdf: Gl, generateImage: Ul } = Po({
|
|
919
|
+
elementId: `vue-ui-xy_${X.value}`,
|
|
920
|
+
fileName: t.value.chart.title.text || "vue-ui-xy",
|
|
921
|
+
options: t.value.chart.userOptions.print
|
|
922
|
+
}), Ha = p(!1), Zl = k(() => ko(t.value.customPalette)), gl = k(() => {
|
|
923
|
+
if (t.value.chart.grid.labels.yAxis.scaleMin !== null)
|
|
924
|
+
return t.value.chart.grid.labels.yAxis.scaleMin;
|
|
925
|
+
const l = Math.min(...nt.value.filter((r) => !le.value.includes(r.id)).map((r) => Math.min(...r.series)));
|
|
926
|
+
return l > 0 ? 0 : l;
|
|
927
|
+
}), ml = k(() => {
|
|
928
|
+
if (t.value.chart.grid.labels.yAxis.scaleMax)
|
|
929
|
+
return t.value.chart.grid.labels.yAxis.scaleMax;
|
|
930
|
+
const l = Math.max(...nt.value.filter((r) => !le.value.includes(r.id)).map((r) => Math.max(...r.series)));
|
|
931
|
+
return gl.value === l ? l + 1 : l;
|
|
932
|
+
}), Xe = k(() => t.value.chart.grid.labels.yAxis.useNiceScale ? sl(gl.value, ml.value < 0 ? 0 : ml.value, t.value.chart.grid.labels.yAxis.commonScaleSteps) : Nt(gl.value, ml.value < 0 ? 0 : ml.value, t.value.chart.grid.labels.yAxis.commonScaleSteps)), tl = k(() => [null, void 0].includes(t.value.chart.grid.labels.yAxis.scaleMin) ? Xe.value.min >= 0 ? 0 : Math.abs(Xe.value.min) : -Xe.value.min), nt = k(() => vt.value ? g.value.map((l, r) => {
|
|
933
|
+
const e = Ue({
|
|
934
|
+
data: l.series,
|
|
935
|
+
threshold: t.value.downsample.threshold
|
|
936
|
+
}), n = `uniqueId_${r}`;
|
|
937
|
+
return {
|
|
938
|
+
...l,
|
|
939
|
+
slotAbsoluteIndex: r,
|
|
940
|
+
series: e.map((a) => _l(a) ? a : null).slice(m.value.start, m.value.end),
|
|
941
|
+
color: wo(l.color ? l.color : Zl.value[r] ? Zl.value[r] : So[r]),
|
|
942
|
+
id: n,
|
|
943
|
+
scaleLabel: l.scaleLabel || n
|
|
944
|
+
};
|
|
945
|
+
}) : g.value), je = k(() => nt.value.map((l, r) => ({
|
|
946
|
+
absoluteIndex: r,
|
|
947
|
+
...l,
|
|
948
|
+
series: l.series.map((e) => e + tl.value),
|
|
949
|
+
absoluteValues: l.series,
|
|
950
|
+
segregate: () => va(l),
|
|
951
|
+
isSegregated: le.value.includes(l.id)
|
|
952
|
+
}))), Ve = k(() => nt.value.map((l, r) => ({
|
|
953
|
+
...l,
|
|
954
|
+
series: l.series.map((e) => e + tl.value),
|
|
955
|
+
absoluteValues: l.series
|
|
956
|
+
})).filter((l) => !le.value.includes(l.id)));
|
|
957
|
+
function Va() {
|
|
958
|
+
let l = 0;
|
|
959
|
+
q.value && (l = Array.from(q.value.querySelectorAll("text")).reduce((a, s) => {
|
|
960
|
+
const o = s.getComputedTextLength();
|
|
961
|
+
return (o > a ? o : a) + t.value.chart.grid.labels.yAxis.scaleValueOffsetX;
|
|
962
|
+
}, 0));
|
|
963
|
+
const r = Vt.value ? Vt.value.getBoundingClientRect().width + t.value.chart.grid.labels.axis.yLabelOffsetX + $.value.yAxis : 0, e = t.value.chart.grid.labels.yAxis.crosshairSize;
|
|
964
|
+
return l + r + e;
|
|
965
|
+
}
|
|
966
|
+
const Pl = p(0), Ea = Dl((l) => {
|
|
967
|
+
Pl.value = l;
|
|
968
|
+
}, 100);
|
|
969
|
+
ho((l) => {
|
|
970
|
+
const r = Je.value;
|
|
971
|
+
if (!r) return;
|
|
972
|
+
const e = new ResizeObserver((n) => {
|
|
973
|
+
Ea(n[0].contentRect.height);
|
|
974
|
+
});
|
|
975
|
+
e.observe(r), l(() => e.disconnect());
|
|
976
|
+
}), cl(() => {
|
|
977
|
+
Pl.value = 0;
|
|
978
|
+
});
|
|
979
|
+
const ql = k(() => {
|
|
980
|
+
let l = 0;
|
|
981
|
+
Ht.value && (l = Ht.value.getBBox().height);
|
|
982
|
+
let r = 0;
|
|
983
|
+
return Je.value && (r = Pl.value), l + r + $.value.xAxis;
|
|
984
|
+
}), Ba = k(() => g.value.some((l) => l.useProgression)), c = k(() => {
|
|
985
|
+
let l = 0;
|
|
986
|
+
const r = 36;
|
|
987
|
+
t.value.chart.grid.labels.show && (y.value.useIndividualScale && !y.value.isStacked ? l = (g.value.length - le.value.length) * (t.value.chart.grid.labels.yAxis.labelWidth + r) : y.value.useIndividualScale && y.value.isStacked ? l = t.value.chart.grid.labels.yAxis.labelWidth + r : l = Va());
|
|
988
|
+
const e = t.value.chart.labels.fontSize * 1.1, n = Ba.value ? 24 : 6;
|
|
989
|
+
if (Je.value) {
|
|
990
|
+
const o = Je.value.getBBox().x;
|
|
991
|
+
o < 0 && (l += Math.abs(o));
|
|
992
|
+
}
|
|
993
|
+
const a = ue.value - l - t.value.chart.grid.labels.yAxis.crosshairSize - n - t.value.chart.padding.left - t.value.chart.padding.right, s = t.value.chart.grid.position === "middle" ? 0 : a / R.value / 2;
|
|
994
|
+
return {
|
|
995
|
+
top: t.value.chart.padding.top + e,
|
|
996
|
+
right: ue.value - n - t.value.chart.padding.right,
|
|
997
|
+
bottom: me.value - ql.value - t.value.chart.padding.bottom - t.value.chart.grid.labels.axis.xLabelOffsetY,
|
|
998
|
+
left: l + t.value.chart.grid.labels.yAxis.crosshairSize - s + t.value.chart.padding.left,
|
|
999
|
+
height: me.value - ql.value - t.value.chart.padding.top - t.value.chart.padding.bottom - e - t.value.chart.grid.labels.axis.xLabelOffsetY,
|
|
1000
|
+
width: a,
|
|
1001
|
+
scaleLabelX: l,
|
|
1002
|
+
individualOffsetX: r
|
|
1003
|
+
};
|
|
1004
|
+
}), Fa = k(() => {
|
|
1005
|
+
const l = t.value.chart.grid.position === "middle" ? 1 : 0, r = R.value + l, e = D(c.value.top), n = D(c.value.bottom);
|
|
1006
|
+
return Array.from({ length: r }).map((a, s) => {
|
|
1007
|
+
const o = c.value.width / R.value * s + c.value.left + j.value;
|
|
1008
|
+
return `M${o},${e} L${o},${n}`;
|
|
1009
|
+
}).join(" ");
|
|
1010
|
+
}), Wa = k(() => {
|
|
1011
|
+
if (!t.value.chart.grid.labels.xAxis.showCrosshairs) return "";
|
|
1012
|
+
const l = c.value.width / R.value, r = t.value.chart.grid.labels.xAxis.crosshairSize, e = t.value.chart.grid.labels.xAxis.crosshairsAlwaysAtZero;
|
|
1013
|
+
return Hl.value.map((n, a) => {
|
|
1014
|
+
if (!n || !n.text) return null;
|
|
1015
|
+
const s = c.value.left + l * a + l / 2, o = e ? ke.value - (ke.value === c.value.bottom ? 0 : r / 2) : c.value.bottom, P = e ? ke.value + r / (ke.value === c.value.bottom ? 1 : 2) : c.value.bottom + r;
|
|
1016
|
+
return `M${s},${o} L${s},${P}`;
|
|
1017
|
+
}).filter(Boolean).join(" ");
|
|
1018
|
+
});
|
|
1019
|
+
function Kl() {
|
|
1020
|
+
return !!Nl?.vnode.props?.onSelectTimeLabel;
|
|
1021
|
+
}
|
|
1022
|
+
function Ya(l, r, e) {
|
|
1023
|
+
if (!Wt.value) {
|
|
1024
|
+
const n = document.createElement("canvas");
|
|
1025
|
+
Wt.value = n.getContext("2d");
|
|
1026
|
+
}
|
|
1027
|
+
return Wt.value.font = `normal ${l}px sans-serif`, Wt.value;
|
|
1028
|
+
}
|
|
1029
|
+
function Jl() {
|
|
1030
|
+
const l = oe.value.querySelectorAll(".vue-ui-xy-tag");
|
|
1031
|
+
l.length && Array.from(l).forEach((r) => r.style.opacity = "0");
|
|
1032
|
+
}
|
|
1033
|
+
function xl(l, r, e, n, a) {
|
|
1034
|
+
e && (He.value[`${l}_${r}_${n}_${a}`] = e);
|
|
1035
|
+
}
|
|
1036
|
+
const Ql = p(!1);
|
|
1037
|
+
async function jl(l = !1) {
|
|
1038
|
+
await Kt(), Ql.value = l, De.value && (Ft.value = l);
|
|
1039
|
+
}
|
|
1040
|
+
function Ol() {
|
|
1041
|
+
ft.value = !ft.value;
|
|
1042
|
+
}
|
|
1043
|
+
const de = k(() => {
|
|
1044
|
+
const l = Math.max(...g.value.map((r) => Ue({ data: r.series, threshold: t.value.downsample.threshold }).length));
|
|
1045
|
+
return Pa({
|
|
1046
|
+
values: t.value.chart.grid.labels.xAxisLabels.values,
|
|
1047
|
+
maxDatapoints: l,
|
|
1048
|
+
formatter: t.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
|
|
1049
|
+
start: m.value.start,
|
|
1050
|
+
end: m.value.end
|
|
1051
|
+
});
|
|
1052
|
+
}), ea = k(() => {
|
|
1053
|
+
const l = Math.max(...g.value.map((r) => Ue({ data: r.series, threshold: t.value.downsample.threshold }).length));
|
|
1054
|
+
return Pa({
|
|
1055
|
+
values: t.value.chart.grid.labels.xAxisLabels.values,
|
|
1056
|
+
maxDatapoints: l,
|
|
1057
|
+
formatter: t.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
|
|
1058
|
+
start: 0,
|
|
1059
|
+
end: w.value
|
|
1060
|
+
});
|
|
1061
|
+
}), Da = k(() => {
|
|
1062
|
+
const l = t.value.chart.grid.labels.xAxisLabels.modulo;
|
|
1063
|
+
return de.value.length ? Math.min(l, [...new Set(de.value.map((r) => r.text))].length) : l;
|
|
1064
|
+
}), Hl = k(() => {
|
|
1065
|
+
const l = t.value.chart.grid.labels.xAxisLabels, r = de.value || [];
|
|
1066
|
+
if (l.showOnlyFirstAndLast) {
|
|
1067
|
+
if (r.length <= 2) return r;
|
|
1068
|
+
const S = _.value;
|
|
1069
|
+
return r.map(
|
|
1070
|
+
(O, A) => A === 0 || A === r.length - 1 || S != null && A === S ? O : { ...O, text: "" }
|
|
1071
|
+
);
|
|
1072
|
+
}
|
|
1073
|
+
if (!l.showOnlyAtModulo) return r;
|
|
1074
|
+
const e = Math.max(1, Da.value || 1);
|
|
1075
|
+
if (R.value <= e) return r;
|
|
1076
|
+
const n = e, a = ea.value || [], s = m.value.start ?? 0, o = [];
|
|
1077
|
+
for (let S = 0; S < r.length; S += 1) {
|
|
1078
|
+
const O = r[S]?.text ?? "";
|
|
1079
|
+
if (!O) continue;
|
|
1080
|
+
const A = s + S - 1 >= 0 ? a[s + S - 1]?.text ?? "" : null;
|
|
1081
|
+
O !== A && o.push(S);
|
|
1082
|
+
}
|
|
1083
|
+
if (!o.length) return r.map((S) => ({ ...S, text: "" }));
|
|
1084
|
+
const P = o.length, G = Math.max(2, Math.min(n - 3, P)), U = Math.min(P, n + 3);
|
|
1085
|
+
let M = Math.min(n, P), H = 1 / 0;
|
|
1086
|
+
for (let S = G; S <= U; S += 1) {
|
|
1087
|
+
const O = (P - 1) % (S - 1), A = Math.abs(S - n), ie = O * 10 + A;
|
|
1088
|
+
ie < H && (H = ie, M = S);
|
|
1089
|
+
}
|
|
1090
|
+
const Z = /* @__PURE__ */ new Set();
|
|
1091
|
+
if (M <= 1)
|
|
1092
|
+
Z.add(o[Math.round((P - 1) / 2)]);
|
|
1093
|
+
else {
|
|
1094
|
+
const S = (P - 1) / (M - 1);
|
|
1095
|
+
for (let O = 0; O < M; O += 1)
|
|
1096
|
+
Z.add(o[Math.round(O * S)]);
|
|
1097
|
+
}
|
|
1098
|
+
return r.map((S, O) => Z.has(O) ? S : { ...S, text: "" });
|
|
1099
|
+
});
|
|
1100
|
+
function ta(l, r) {
|
|
1101
|
+
const e = Ve.value.map((n) => ({
|
|
1102
|
+
shape: n.shape || null,
|
|
1103
|
+
name: n.name,
|
|
1104
|
+
color: n.color,
|
|
1105
|
+
type: n.type,
|
|
1106
|
+
value: n.absoluteValues.find((a, s) => s === r),
|
|
1107
|
+
comments: n.comments || [],
|
|
1108
|
+
prefix: n.prefix || t.value.chart.labels.prefix,
|
|
1109
|
+
suffix: n.suffix || t.value.chart.labels.suffix
|
|
1110
|
+
}));
|
|
1111
|
+
Ot("selectTimeLabel", {
|
|
1112
|
+
datapoint: e,
|
|
1113
|
+
absoluteIndex: l.absoluteIndex,
|
|
1114
|
+
label: l.text
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
const R = k(() => {
|
|
1118
|
+
const l = mt((m.value.end ?? 0) - (m.value.start ?? 0));
|
|
1119
|
+
return Math.max(1, l);
|
|
1120
|
+
});
|
|
1121
|
+
function la(l) {
|
|
1122
|
+
T.value = l;
|
|
1123
|
+
}
|
|
1124
|
+
function aa() {
|
|
1125
|
+
y.value.isStacked = !y.value.isStacked, y.value.isStacked ? y.value.useIndividualScale = !0 : y.value.useIndividualScale = t.value.chart.grid.labels.yAxis.useIndividualScale;
|
|
1126
|
+
}
|
|
1127
|
+
function Vl(l) {
|
|
1128
|
+
ul.value && l.autoScaling && (t.value.chart.grid.labels.yAxis.useIndividualScale || console.warn(`VueUiXy (datapoint: ${l.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`), t.value.chart.grid.labels.yAxis.stacked || console.warn(`VueUiXy (datapoint: ${l.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`));
|
|
1129
|
+
}
|
|
1130
|
+
function Xa(l, r) {
|
|
1131
|
+
const e = mt(l), n = Array(e).fill(0);
|
|
1132
|
+
for (let a = 0; a < r.length && a < e; a += 1) n[a] = r[a] ?? 0;
|
|
1133
|
+
return n;
|
|
1134
|
+
}
|
|
1135
|
+
function Ga(l) {
|
|
1136
|
+
const r = Math.max(...g.value.map((e) => Ue({ data: e.series, threshold: t.value.downsample.threshold }).length));
|
|
1137
|
+
return l > r ? r : l < 0 || t.value.chart.zoom.startIndex !== null && l < t.value.chart.zoom.startIndex ? t.value.chart.zoom.startIndex !== null ? t.value.chart.zoom.startIndex + 1 : 1 : l;
|
|
1138
|
+
}
|
|
1139
|
+
async function bl() {
|
|
1140
|
+
await Kt(), await Kt();
|
|
1141
|
+
const { startIndex: l, endIndex: r } = t.value.chart.zoom, e = Ce.value, n = Math.max(
|
|
1142
|
+
...g.value.map(
|
|
1143
|
+
(a) => Ue({
|
|
1144
|
+
data: a.series,
|
|
1145
|
+
threshold: t.value.downsample.threshold
|
|
1146
|
+
}).length
|
|
1147
|
+
)
|
|
1148
|
+
);
|
|
1149
|
+
(l != null || r != null) && e ? (l != null && (m.value.start = l, e.setStartValue(l)), r != null && (m.value.end = r + 1, e.setEndValue(Ga(r + 1)))) : (m.value = { start: 0, end: n }, pe.value += 1), ne.value.start = m.value.start, ne.value.end = m.value.end, Xt();
|
|
1150
|
+
}
|
|
1151
|
+
async function oa() {
|
|
1152
|
+
await bl();
|
|
1153
|
+
}
|
|
1154
|
+
function Ae(l) {
|
|
1155
|
+
return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(l);
|
|
1156
|
+
}
|
|
1157
|
+
const ua = k(() => Xe.value.max + tl.value);
|
|
1158
|
+
function At(l) {
|
|
1159
|
+
return l / (Ae(ua.value) ? ua.value : 1);
|
|
1160
|
+
}
|
|
1161
|
+
const ke = k(() => isNaN(At(tl.value)) ? c.value.bottom : c.value.bottom - c.value.height * At(tl.value));
|
|
1162
|
+
function na(l) {
|
|
1163
|
+
const r = ![null, void 0].includes(t.value.chart.grid.labels.yAxis.scaleMin) && t.value.chart.grid.labels.yAxis.scaleMin > 0 && gl.value >= 0 ? c.value.bottom : ke.value;
|
|
1164
|
+
return l.value >= 0 ? E(r - l.y <= 0 ? 1e-5 : r - l.y) : E(l.y - ke.value <= 0 ? 1e-5 : l.y - ke.value);
|
|
1165
|
+
}
|
|
1166
|
+
function ia(l) {
|
|
1167
|
+
return l.value >= 0 ? E(l.zeroPosition - l.y <= 0 ? 1e-5 : l.zeroPosition - l.y) : E(l.y - l.zeroPosition <= 0 ? 1e-5 : l.zeroPosition - l.y);
|
|
1168
|
+
}
|
|
1169
|
+
const ae = k(() => {
|
|
1170
|
+
const l = Math.max(1, R.value), r = Math.max(1, c.value.width), e = Math.max(1, nt.value.filter((n) => n.type === "bar" && !le.value.includes(n.id)).length);
|
|
1171
|
+
return {
|
|
1172
|
+
bar: Ct(r, l * e, 1),
|
|
1173
|
+
plot: Ct(r, l, 1),
|
|
1174
|
+
line: Ct(r, l, 1)
|
|
1175
|
+
};
|
|
1176
|
+
});
|
|
1177
|
+
function Gt() {
|
|
1178
|
+
return y.value.useIndividualScale && y.value.isStacked ? ae.value.line - c.value.width / R.value * 0.1 : ae.value.bar;
|
|
1179
|
+
}
|
|
1180
|
+
function pl(l) {
|
|
1181
|
+
return y.value.useIndividualScale && y.value.isStacked ? l.x + c.value.width / R.value * 0.05 : l.x + ae.value.bar / 2;
|
|
1182
|
+
}
|
|
1183
|
+
function sa(l) {
|
|
1184
|
+
return l.value >= 0 ? l.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(ke.value) ? c.bottom.value : ke.value;
|
|
1185
|
+
}
|
|
1186
|
+
function ra(l) {
|
|
1187
|
+
return l.value >= 0 ? l.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(l.zeroPosition) ? 0 : l.zeroPosition;
|
|
1188
|
+
}
|
|
1189
|
+
const ll = p(null);
|
|
1190
|
+
function Ua(l) {
|
|
1191
|
+
if (ft.value) return;
|
|
1192
|
+
const r = ye.value.getBoundingClientRect(), n = ye.value.viewBox.baseVal.width / r.width, s = (l.clientX - r.left) * n - c.value.left, o = c.value.width / R.value, P = Math.floor(s / o);
|
|
1193
|
+
P >= 0 && P < R.value ? ll.value !== P && (ll.value = P, ya(!0, P)) : ca();
|
|
1194
|
+
}
|
|
1195
|
+
function ca() {
|
|
1196
|
+
ll.value = null, ya(!1, null);
|
|
1197
|
+
}
|
|
1198
|
+
function Za() {
|
|
1199
|
+
ll.value != null && qa(ll.value);
|
|
1200
|
+
}
|
|
1201
|
+
function qa(l) {
|
|
1202
|
+
const r = Ve.value.map((e) => ({
|
|
1203
|
+
name: e.name,
|
|
1204
|
+
value: [null, void 0, NaN].includes(e.absoluteValues[l]) ? null : e.absoluteValues[l],
|
|
1205
|
+
color: e.color,
|
|
1206
|
+
type: e.type
|
|
1207
|
+
}));
|
|
1208
|
+
Ot(
|
|
1209
|
+
"selectX",
|
|
1210
|
+
{
|
|
1211
|
+
dataset: r,
|
|
1212
|
+
index: l,
|
|
1213
|
+
indexLabel: t.value.chart.grid.labels.xAxisLabels.values[l]
|
|
1214
|
+
}
|
|
1215
|
+
), t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: r, seriesIndex: l + m.value.start });
|
|
1216
|
+
}
|
|
1217
|
+
function Ka() {
|
|
1218
|
+
return je.value.map((l) => ({
|
|
1219
|
+
values: l.absoluteValues,
|
|
1220
|
+
color: l.color,
|
|
1221
|
+
name: l.name,
|
|
1222
|
+
type: l.type
|
|
1223
|
+
}));
|
|
1224
|
+
}
|
|
1225
|
+
async function Ja({ scale: l = 2 } = {}) {
|
|
1226
|
+
if (!oe.value) return;
|
|
1227
|
+
const { width: r, height: e } = oe.value.getBoundingClientRect(), n = r / e, { imageUri: a, base64: s } = await Eo({ domElement: oe.value, base64: !0, img: !0, scale: l });
|
|
1228
|
+
return {
|
|
1229
|
+
imageUri: a,
|
|
1230
|
+
base64: s,
|
|
1231
|
+
title: t.value.chart.title.text,
|
|
1232
|
+
width: r,
|
|
1233
|
+
height: e,
|
|
1234
|
+
aspectRatio: n
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1237
|
+
function va(l) {
|
|
1238
|
+
if (le.value.includes(l.id))
|
|
1239
|
+
le.value = le.value.filter((r) => r !== l.id);
|
|
1240
|
+
else {
|
|
1241
|
+
if (le.value.length + 1 === nt.value.length) return;
|
|
1242
|
+
le.value.push(l.id);
|
|
1243
|
+
}
|
|
1244
|
+
Ot("selectLegend", Ve.value.map((r) => ({
|
|
1245
|
+
name: r.name,
|
|
1246
|
+
values: r.absoluteValues,
|
|
1247
|
+
color: r.color,
|
|
1248
|
+
type: r.type
|
|
1249
|
+
}))), Oe.value += 1;
|
|
1250
|
+
}
|
|
1251
|
+
const Qa = k(() => {
|
|
1252
|
+
const l = t.value.chart.title.text || "Chart visualization", r = t.value.chart.title.subtitle.text || "";
|
|
1253
|
+
return `${l}. ${r}`;
|
|
1254
|
+
}), da = k(() => ({
|
|
1255
|
+
linePlot: R.value > t.value.line.dot.hideAboveMaxSerieLength
|
|
1256
|
+
})), ja = k(() => t.value.chart.userOptions.show && (!t.value.chart.title.show || !t.value.chart.title.text)), eo = k(() => {
|
|
1257
|
+
if (Array.isArray(t.value.chart.highlightArea))
|
|
1258
|
+
return t.value.chart.highlightArea.map((r) => {
|
|
1259
|
+
const e = Math.min(r.to, w.value - 1);
|
|
1260
|
+
return {
|
|
1261
|
+
...r,
|
|
1262
|
+
span: r.from === e ? 1 : e < r.from ? 0 : e - r.from + 1
|
|
1263
|
+
};
|
|
1264
|
+
});
|
|
1265
|
+
const l = {
|
|
1266
|
+
...t.value.chart.highlightArea,
|
|
1267
|
+
to: Math.min(t.value.chart.highlightArea.to, w.value - 1)
|
|
1268
|
+
};
|
|
1269
|
+
return [{ ...l, span: l.from === l.to ? 1 : l.to < l.from ? 0 : l.to - l.from + 1 }];
|
|
1270
|
+
}), to = k(() => vt.value ? g.value.map((l, r) => ({
|
|
1271
|
+
...l,
|
|
1272
|
+
series: Ue({
|
|
1273
|
+
data: l.series,
|
|
1274
|
+
threshold: t.value.downsample.threshold
|
|
1275
|
+
}),
|
|
1276
|
+
id: `uniqueId_${r}`
|
|
1277
|
+
})) : g.value), lo = k(() => Ve.value.map((l) => {
|
|
1278
|
+
const r = l.absoluteValues.map((e) => [void 0, null].includes(e) ? 0 : e);
|
|
1279
|
+
return {
|
|
1280
|
+
id: l.id,
|
|
1281
|
+
name: l.name,
|
|
1282
|
+
color: l.color,
|
|
1283
|
+
values: Xa(R.value, r)
|
|
1284
|
+
};
|
|
1285
|
+
})), ao = k(() => ({
|
|
1286
|
+
responsiveBreakpoint: t.value.table.responsiveBreakpoint,
|
|
1287
|
+
roundingValues: t.value.table.rounding,
|
|
1288
|
+
showAverage: !1,
|
|
1289
|
+
showMedian: !1,
|
|
1290
|
+
showTotal: !1,
|
|
1291
|
+
fontFamily: t.value.chart.fontFamily,
|
|
1292
|
+
prefix: t.value.chart.labels.prefix,
|
|
1293
|
+
suffix: t.value.chart.labels.suffix,
|
|
1294
|
+
colNames: de.value.map((l) => l.text),
|
|
1295
|
+
thead: {
|
|
1296
|
+
backgroundColor: t.value.table.th.backgroundColor,
|
|
1297
|
+
color: t.value.table.th.color,
|
|
1298
|
+
outline: t.value.table.th.outline
|
|
1299
|
+
},
|
|
1300
|
+
tbody: {
|
|
1301
|
+
backgroundColor: t.value.table.td.backgroundColor,
|
|
1302
|
+
color: t.value.table.td.color,
|
|
1303
|
+
outline: t.value.table.td.outline
|
|
1304
|
+
},
|
|
1305
|
+
userOptions: {
|
|
1306
|
+
show: !1
|
|
1307
|
+
}
|
|
1308
|
+
})), j = k(() => t.value.chart.grid.position === "middle" ? 0 : c.value.width / R.value / 2), It = k(() => $o(je.value.filter((l) => !le.value.includes(l.id)))), N = k(() => {
|
|
1309
|
+
const l = Object.groupBy(It.value, (e) => e.scaleLabel), r = {};
|
|
1310
|
+
for (const [e, n] of Object.entries(l)) {
|
|
1311
|
+
const a = n.flatMap((s) => s.absoluteValues);
|
|
1312
|
+
r[e] = {
|
|
1313
|
+
min: Math.min(...a) || 0,
|
|
1314
|
+
max: Math.max(...a) || 1,
|
|
1315
|
+
groupId: `scale_group_${Cl()}`
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
return r;
|
|
1319
|
+
}), oo = k(() => {
|
|
1320
|
+
const l = nt.value.filter((r) => r.type === "bar").filter((r) => !le.value.includes(r.id)).length;
|
|
1321
|
+
return c.value.width / R.value / l - yl.value * l;
|
|
1322
|
+
}), yl = k(() => ae.value.line * t.value.bar.periodGap), kl = k(() => Math.max(1e-5, Gt() - (y.value.useIndividualScale && y.value.isStacked ? 0 : yl.value))), wl = k(() => kl.value * Math.min(Math.abs(t.value.bar.innerGap), 0.95)), ha = k(() => {
|
|
1323
|
+
if (!t.value.chart.zoom.minimap.show) return [];
|
|
1324
|
+
const l = to.value.filter((a) => !le.value.includes(a.id)), r = Math.max(...l.map((a) => a.series.length)), e = [];
|
|
1325
|
+
for (let a = 0; a < r; a += 1)
|
|
1326
|
+
e.push(l.map((s) => s.series[a] || 0).reduce((s, o) => (s || 0) + (o || 0), 0));
|
|
1327
|
+
const n = Math.min(...e);
|
|
1328
|
+
return e.map((a) => a + (n < 0 ? Math.abs(n) : 0));
|
|
1329
|
+
}), al = k(() => Ve.value.map((l) => ({
|
|
1330
|
+
slotAbsoluteIndex: l.slotAbsoluteIndex,
|
|
1331
|
+
shape: l.shape || null,
|
|
1332
|
+
name: l.name,
|
|
1333
|
+
color: l.color,
|
|
1334
|
+
type: l.type,
|
|
1335
|
+
value: l.absoluteValues.find((r, e) => e === _.value),
|
|
1336
|
+
comments: l.comments || [],
|
|
1337
|
+
prefix: l.prefix || t.value.chart.labels.prefix,
|
|
1338
|
+
suffix: l.suffix || t.value.chart.labels.suffix
|
|
1339
|
+
}))), fa = k(() => Xe.value.ticks.map((l) => ({
|
|
1340
|
+
y: l >= 0 ? ke.value - c.value.height * At(l) : ke.value + c.value.height * At(Math.abs(l)),
|
|
1341
|
+
value: l,
|
|
1342
|
+
prefix: t.value.chart.labels.prefix,
|
|
1343
|
+
suffix: t.value.chart.labels.suffix
|
|
1344
|
+
}))), ga = k(() => {
|
|
1345
|
+
const l = t.value.chart.annotations;
|
|
1346
|
+
if (!l || !Array.isArray(l) || l.every((M) => !M.show)) return [];
|
|
1347
|
+
const r = l.filter(
|
|
1348
|
+
(M) => M.show && (M.yAxis.yTop != null || M.yAxis.yBottom != null)
|
|
1349
|
+
);
|
|
1350
|
+
if (!r.length) return [];
|
|
1351
|
+
const { left: e, right: n } = c.value, a = ke.value, s = c.value.height, o = Xe.value.min, G = Xe.value.max - o, U = (M) => {
|
|
1352
|
+
const H = (M - 0) / G;
|
|
1353
|
+
return a - H * s;
|
|
1354
|
+
};
|
|
1355
|
+
return r.map((M) => {
|
|
1356
|
+
const { yAxis: { yTop: H, yBottom: Z, label: S } } = M, O = H != null && Z != null && H !== Z, A = H == null ? null : U(H), ie = Z == null ? null : U(Z), we = Ya(S.fontSize);
|
|
1357
|
+
we.font = `${S.fontSize}px sans-serif`;
|
|
1358
|
+
const ee = we.measureText(S.text).width, Ee = S.fontSize, tt = (S.position === "start" ? e + S.padding.left : n - S.padding.right) + S.offsetX, Ie = (A != null && ie != null ? Math.min(A, ie) : A ?? ie) - S.fontSize / 3 + S.offsetY - S.padding.top;
|
|
1359
|
+
let W;
|
|
1360
|
+
S.textAnchor === "middle" ? W = tt - ee / 2 - S.padding.left : S.textAnchor === "end" ? W = tt - ee - S.padding.right : W = tt - S.padding.left;
|
|
1361
|
+
const Y = Ie - Ee * 0.75 - S.padding.top;
|
|
1362
|
+
return {
|
|
1363
|
+
show: ![A, ie, Y].includes(NaN),
|
|
1364
|
+
id: `annotation_y_${Cl()}`,
|
|
1365
|
+
hasArea: O,
|
|
1366
|
+
areaHeight: O ? Math.abs(A - ie) : 0,
|
|
1367
|
+
yTop: A,
|
|
1368
|
+
yBottom: ie,
|
|
1369
|
+
config: M.yAxis,
|
|
1370
|
+
x1: e,
|
|
1371
|
+
x2: n,
|
|
1372
|
+
_text: { x: tt, y: Ie },
|
|
1373
|
+
_box: {
|
|
1374
|
+
x: W,
|
|
1375
|
+
y: Y,
|
|
1376
|
+
width: ee + S.padding.left + S.padding.right,
|
|
1377
|
+
height: Ee + S.padding.top + S.padding.bottom,
|
|
1378
|
+
fill: S.backgroundColor,
|
|
1379
|
+
stroke: S.border.stroke,
|
|
1380
|
+
rx: S.border.rx,
|
|
1381
|
+
ry: S.border.ry,
|
|
1382
|
+
strokeWidth: S.border.strokeWidth
|
|
1383
|
+
}
|
|
1384
|
+
};
|
|
1385
|
+
});
|
|
1386
|
+
});
|
|
1387
|
+
function ma(l, r) {
|
|
1388
|
+
const e = l[r - 1], n = l[r + 1];
|
|
1389
|
+
let a = !!e && !!n && e.value == null && n.value == null || !e && !!n && n.value == null || !!e && !n && e.value == null;
|
|
1390
|
+
return Ae(l[r].value) && a && t.value.line.cutNullValues;
|
|
1391
|
+
}
|
|
1392
|
+
const bt = k(() => {
|
|
1393
|
+
const l = It.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), r = l.length, e = t.value.chart.grid.labels.yAxis.gap, n = y.value.isStacked, a = n ? e * (r - 1) : 0, s = c.value.height - a;
|
|
1394
|
+
return l.filter((o) => o.type === "bar").map((o, P) => {
|
|
1395
|
+
Vl(o);
|
|
1396
|
+
const G = N.value[o.scaleLabel].min, U = N.value[o.scaleLabel].max;
|
|
1397
|
+
o.absoluteValues.filter((F) => ![null, void 0].includes(F)).map((F) => (F - G) / (U - G));
|
|
1398
|
+
const M = {
|
|
1399
|
+
valueMin: G,
|
|
1400
|
+
valueMax: U < 0 ? 0 : U
|
|
1401
|
+
}, H = {
|
|
1402
|
+
max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
|
|
1403
|
+
min: o.scaleMin || Math.min(...o.absoluteValues.filter((F) => ![void 0, null].includes(F))) > 0 ? 0 : Math.min(...o.absoluteValues.filter((F) => ![null, void 0].includes(F)))
|
|
1404
|
+
}, Z = o.scaleSteps || t.value.chart.grid.labels.yAxis.commonScaleSteps, S = 1.0000001, O = t.value.chart.grid.labels.yAxis.useNiceScale ? sl(H.min, H.max === H.min ? H.max * S : H.max, Z) : Nt(H.min, H.max === H.min ? H.max * S : H.max, Z), A = t.value.chart.grid.labels.yAxis.useNiceScale ? sl(M.valueMin, M.valueMax === M.valueMin ? M.valueMax * S : M.valueMax, Z) : Nt(M.valueMin, M.valueMax === M.valueMin ? M.valueMax * S : M.valueMax, Z), ie = O.min >= 0 ? 0 : Math.abs(O.min), we = 0, ee = O.max + ie, Ee = A.max + Math.abs(we), tt = o.stackIndex, Ut = r - 1 - tt, Ie = n ? 1 - o.cumulatedStackRatio : 0, W = n ? s * Ie + e * Ut : 0, Y = n ? s * o.stackRatio : c.value.height, se = c.value.bottom - W - Y * ie / ee, Te = c.value.bottom - W - Y * we / Ee, Se = je.value.filter((F) => F.type === "bar").filter((F) => !le.value.includes(F.id)).length, nl = o.series.map((F, ce) => {
|
|
1405
|
+
const yt = y.value.useIndividualScale ? (o.absoluteValues[ce] + ie) / ee : At(F), Tt = y.value.useIndividualScale && y.value.isStacked ? c.value.left + c.value.width / R.value * ce : c.value.left + ae.value.bar * P + ae.value.bar * ce * Se - oo.value / 2 - P * yl.value;
|
|
1406
|
+
return {
|
|
1407
|
+
yOffset: E(W),
|
|
1408
|
+
individualHeight: E(Y),
|
|
1409
|
+
x: E(Tt),
|
|
1410
|
+
y: c.value.bottom - W - Y * yt,
|
|
1411
|
+
value: o.absoluteValues[ce],
|
|
1412
|
+
zeroPosition: E(se),
|
|
1413
|
+
individualMax: E(ee),
|
|
1414
|
+
comment: o.comments && o.comments.slice(m.value.start, m.value.end)[ce] || ""
|
|
1415
|
+
};
|
|
1416
|
+
}), Me = o.absoluteValues.map((F) => A.min >= 0 ? (F - Math.abs(A.min)) / (A.max - Math.abs(A.min)) : (F + Math.abs(A.min)) / (A.max + Math.abs(A.min))), pt = o.series.map((F, ce) => {
|
|
1417
|
+
const yt = y.value.useIndividualScale && y.value.isStacked ? c.value.left + c.value.width / R.value * ce : c.value.left - ae.value.bar / 2 + ae.value.bar * P + ae.value.bar * ce * je.value.filter((Tt) => Tt.type === "bar").filter((Tt) => !le.value.includes(Tt.id)).length;
|
|
1418
|
+
return {
|
|
1419
|
+
yOffset: E(W),
|
|
1420
|
+
individualHeight: E(Y),
|
|
1421
|
+
x: E(yt),
|
|
1422
|
+
y: E(c.value.bottom - E(W) - (E(Y) * Me[ce] || 0)),
|
|
1423
|
+
value: o.absoluteValues[ce],
|
|
1424
|
+
zeroPosition: E(se),
|
|
1425
|
+
individualMax: E(ee),
|
|
1426
|
+
comment: o.comments && o.comments.slice(m.value.start, m.value.end)[ce] || ""
|
|
1427
|
+
};
|
|
1428
|
+
}), K = O.ticks.map((F) => ({
|
|
1429
|
+
y: F >= 0 ? se - Y * (F / ee) : se + Y * Math.abs(F) / ee,
|
|
1430
|
+
value: F,
|
|
1431
|
+
prefix: o.prefix || t.value.chart.labels.prefix,
|
|
1432
|
+
suffix: o.suffix || t.value.chart.labels.suffix,
|
|
1433
|
+
datapoint: o
|
|
1434
|
+
})), re = A.ticks.map((F) => {
|
|
1435
|
+
const ce = (F - A.min) / (A.max - A.min);
|
|
1436
|
+
return {
|
|
1437
|
+
y: F >= 0 ? Te - Y * ce : Te + Y * ce,
|
|
1438
|
+
value: F,
|
|
1439
|
+
prefix: o.prefix || t.value.chart.labels.prefix,
|
|
1440
|
+
suffix: o.suffix || t.value.chart.labels.suffix,
|
|
1441
|
+
datapoint: o
|
|
1442
|
+
};
|
|
1443
|
+
});
|
|
1444
|
+
return N.value[o.scaleLabel].name = o.name, N.value[o.scaleLabel].groupName = o.scaleLabel, N.value[o.scaleLabel].groupColor = t.value.chart.grid.labels.yAxis.groupColor || o.color, N.value[o.scaleLabel].color = o.color, N.value[o.scaleLabel].scaleYLabels = o.autoScaling ? re : K, N.value[o.scaleLabel].zeroPosition = o.autoScaling ? Te : se, N.value[o.scaleLabel].individualMax = o.autoScaling ? Ee : ee, N.value[o.scaleLabel].scaleLabel = o.scaleLabel, N.value[o.scaleLabel].id = o.id, N.value[o.scaleLabel].yOffset = W, N.value[o.scaleLabel].individualHeight = Y, N.value[o.scaleLabel].autoScaleYLabels = re, N.value[o.scaleLabel].unique = It.value.filter((F) => F.scaleLabel === o.scaleLabel).length === 1, {
|
|
1445
|
+
...o,
|
|
1446
|
+
yOffset: W,
|
|
1447
|
+
autoScaleYLabels: re,
|
|
1448
|
+
individualHeight: Y,
|
|
1449
|
+
scaleYLabels: o.autoScaling ? re : K,
|
|
1450
|
+
individualScale: o.autoScaling ? A : O,
|
|
1451
|
+
individualMax: o.autoScaling ? Ee : ee,
|
|
1452
|
+
zeroPosition: o.autoScaling ? Te : se,
|
|
1453
|
+
plots: o.autoScaling ? pt : nl,
|
|
1454
|
+
groupId: N.value[o.scaleLabel].groupId
|
|
1455
|
+
};
|
|
1456
|
+
});
|
|
1457
|
+
}), Ge = k(() => {
|
|
1458
|
+
const l = It.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), r = l.length, e = t.value.chart.grid.labels.yAxis.gap, n = y.value.isStacked, a = n ? e * (r - 1) : 0, s = c.value.height - a;
|
|
1459
|
+
return l.filter((o) => o.type === "line").map((o, P) => {
|
|
1460
|
+
Vl(o);
|
|
1461
|
+
const G = N.value[o.scaleLabel].min, U = N.value[o.scaleLabel].max;
|
|
1462
|
+
o.absoluteValues.filter((V) => ![null, void 0].includes(V)).map((V) => (V - G) / (U - G));
|
|
1463
|
+
const M = {
|
|
1464
|
+
valueMin: G,
|
|
1465
|
+
valueMax: U
|
|
1466
|
+
}, H = {
|
|
1467
|
+
max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
|
|
1468
|
+
min: o.scaleMin || (Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues))
|
|
1469
|
+
}, Z = o.scaleSteps || t.value.chart.grid.labels.yAxis.commonScaleSteps, S = 1.0000001, O = t.value.chart.grid.labels.yAxis.useNiceScale ? sl(H.min, H.max === H.min ? H.max * S : H.max, Z) : Nt(H.min, H.max === H.min ? H.max * S : H.max, Z), A = t.value.chart.grid.labels.yAxis.useNiceScale ? sl(M.valueMin, M.valueMax === M.valueMin ? M.valueMax * S : M.valueMax, Z) : Nt(M.valueMin, M.valueMax === M.valueMin ? M.valueMax * S : M.valueMax, Z), ie = O.min >= 0 ? 0 : Math.abs(O.min), we = 0, ee = O.max + Math.abs(ie), Ee = A.max + Math.abs(we), tt = o.stackIndex, Ut = r - 1 - tt, Ie = n ? 1 - o.cumulatedStackRatio : 0, W = n ? s * Ie + e * Ut : 0, Y = n ? s * o.stackRatio : c.value.height, se = c.value.bottom - W - Y * ie / ee, Te = c.value.bottom - W - Y * we / Ee, Se = o.series.map((V, xe) => {
|
|
1470
|
+
const no = y.value.useIndividualScale ? (o.absoluteValues[xe] + Math.abs(ie)) / ee : At(V);
|
|
1471
|
+
return {
|
|
1472
|
+
x: E(c.value.left + ae.value.line / 2 + ae.value.line * xe),
|
|
1473
|
+
y: E(c.value.bottom - W - Y * no),
|
|
1474
|
+
value: o.absoluteValues[xe],
|
|
1475
|
+
comment: o.comments && o.comments.slice(m.value.start, m.value.end)[xe] || ""
|
|
1476
|
+
};
|
|
1477
|
+
}), nl = o.absoluteValues.map((V) => A.min >= 0 ? (V - Math.abs(A.min)) / (A.max - Math.abs(A.min)) : (V + Math.abs(A.min)) / (A.max + Math.abs(A.min))), Me = o.series.map((V, xe) => [void 0, null].includes(o.absoluteValues[xe]) ? {
|
|
1478
|
+
x: E(c.value.left + ae.value.line / 2 + ae.value.line * xe),
|
|
1479
|
+
y: se,
|
|
1480
|
+
value: o.absoluteValues[xe],
|
|
1481
|
+
comment: o.comments && o.comments.slice(m.value.start, m.value.end)[xe] || ""
|
|
1482
|
+
} : {
|
|
1483
|
+
x: E(c.value.left + ae.value.line / 2 + ae.value.line * xe),
|
|
1484
|
+
y: E(c.value.bottom - W - (Y * nl[xe] || 0)),
|
|
1485
|
+
value: o.absoluteValues[xe],
|
|
1486
|
+
comment: o.comments && o.comments.slice(m.value.start, m.value.end)[xe] || ""
|
|
1487
|
+
}), pt = t.value.line.cutNullValues ? za(Se) : zl(Se.filter((V) => V.value !== null)), K = t.value.line.cutNullValues ? za(Me) : zl(Me.filter((V) => V.value !== null)), re = t.value.line.cutNullValues ? Aa(Se) : Al(Se.filter((V) => V.value !== null)), F = t.value.line.cutNullValues ? Aa(Me) : Al(Me.filter((V) => V.value !== null)), ce = O.ticks.map((V) => ({
|
|
1488
|
+
y: V >= 0 ? se - Y * (V / ee) : se + Y * Math.abs(V) / ee,
|
|
1489
|
+
value: V,
|
|
1490
|
+
prefix: o.prefix || t.value.chart.labels.prefix,
|
|
1491
|
+
suffix: o.suffix || t.value.chart.labels.suffix,
|
|
1492
|
+
datapoint: o
|
|
1493
|
+
})), yt = A.ticks.map((V) => {
|
|
1494
|
+
const xe = (V - A.min) / (A.max - A.min);
|
|
1495
|
+
return {
|
|
1496
|
+
y: V >= 0 ? Te - Y * xe : Te + Y * xe,
|
|
1497
|
+
value: V,
|
|
1498
|
+
prefix: o.prefix || t.value.chart.labels.prefix,
|
|
1499
|
+
suffix: o.suffix || t.value.chart.labels.suffix,
|
|
1500
|
+
datapoint: o
|
|
1501
|
+
};
|
|
1502
|
+
});
|
|
1503
|
+
N.value[o.scaleLabel].name = o.name, N.value[o.scaleLabel].groupName = o.scaleLabel, N.value[o.scaleLabel].groupColor = t.value.chart.grid.labels.yAxis.groupColor || o.color, N.value[o.scaleLabel].color = o.color, N.value[o.scaleLabel].scaleYLabels = o.autoScaling ? yt : ce, N.value[o.scaleLabel].zeroPosition = o.autoScaling ? Te : se, N.value[o.scaleLabel].individualMax = o.autoScaling ? Ee : ee, N.value[o.scaleLabel].scaleLabel = o.scaleLabel, N.value[o.scaleLabel].id = o.id, N.value[o.scaleLabel].yOffset = W, N.value[o.scaleLabel].individualHeight = Y, N.value[o.scaleLabel].autoScaleYLabels = yt, N.value[o.scaleLabel].unique = It.value.filter((V) => V.scaleLabel === o.scaleLabel).length === 1;
|
|
1504
|
+
const Tt = y.value.useIndividualScale ? o.autoScaling ? Te : se : ke.value, il = Math.max(Math.max(o.autoScaling ? Te : ce.at(-1) ? ce.at(-1).y : 0, c.value.top), Tt);
|
|
1505
|
+
return {
|
|
1506
|
+
...o,
|
|
1507
|
+
yOffset: W,
|
|
1508
|
+
autoScaleYLabels: yt,
|
|
1509
|
+
individualHeight: Y,
|
|
1510
|
+
scaleYLabels: o.autoScaling ? yt : ce,
|
|
1511
|
+
individualScale: o.autoScaling ? A : O,
|
|
1512
|
+
individualMax: o.autoScaling ? Ee : ee,
|
|
1513
|
+
zeroPosition: o.autoScaling ? Te : se,
|
|
1514
|
+
curve: o.autoScaling ? K : pt,
|
|
1515
|
+
plots: o.autoScaling ? Me : Se,
|
|
1516
|
+
area: o.useArea ? y.value.useIndividualScale ? t.value.line.cutNullValues ? Ia(
|
|
1517
|
+
o.autoScaling ? Me : Se,
|
|
1518
|
+
il
|
|
1519
|
+
) : Ta(
|
|
1520
|
+
o.autoScaling ? Me.filter((V) => V.value !== null) : Se.filter((V) => V.value !== null),
|
|
1521
|
+
il
|
|
1522
|
+
) : t.value.line.cutNullValues ? Ia(Se, il) : Ta(Se.filter((V) => V.value !== null), il) : "",
|
|
1523
|
+
curveAreas: o.useArea ? _o(
|
|
1524
|
+
o.autoScaling ? t.value.line.cutNullValues ? Me : Me.filter((V) => V.value !== null) : t.value.line.cutNullValues ? Se : Se.filter((V) => V.value !== null),
|
|
1525
|
+
il,
|
|
1526
|
+
t.value.line.cutNullValues
|
|
1527
|
+
) : [],
|
|
1528
|
+
straight: o.autoScaling ? F : re,
|
|
1529
|
+
groupId: N.value[o.scaleLabel].groupId
|
|
1530
|
+
};
|
|
1531
|
+
});
|
|
1532
|
+
}), et = k(() => {
|
|
1533
|
+
const l = It.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), r = l.length, e = t.value.chart.grid.labels.yAxis.gap, n = y.value.isStacked, a = n ? e * (r - 1) : 0, s = c.value.height - a;
|
|
1534
|
+
return l.filter((o) => o.type === "plot").map((o) => {
|
|
1535
|
+
Vl(o);
|
|
1536
|
+
const P = N.value[o.scaleLabel].min, G = N.value[o.scaleLabel].max;
|
|
1537
|
+
o.absoluteValues.filter((K) => ![null, void 0].includes(K)).map((K) => (K - P) / (G - P));
|
|
1538
|
+
const U = {
|
|
1539
|
+
valueMin: P,
|
|
1540
|
+
valueMax: G
|
|
1541
|
+
}, M = {
|
|
1542
|
+
max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
|
|
1543
|
+
min: o.scaleMin || Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues)
|
|
1544
|
+
}, H = o.scaleSteps || t.value.chart.grid.labels.yAxis.commonScaleSteps, Z = 1.0000001, S = Nt(M.min, M.max === M.min ? M.max * Z : M.max, H), O = Nt(U.valueMin, U.valueMax === U.valueMin ? U.valueMax * Z : U.valueMax, H), A = S.min >= 0 ? 0 : Math.abs(S.min), ie = 0, we = S.max + A, ee = O.max + Math.abs(ie), Ee = o.stackIndex, tt = r - 1 - Ee, Ut = n ? 1 - o.cumulatedStackRatio : 0, Ie = n ? s * Ut + e * tt : 0, W = n ? s * o.stackRatio : c.value.height, Y = c.value.bottom - Ie - W * A / we, se = c.value.bottom - Ie - W * ie / ee, Te = o.series.map((K, re) => {
|
|
1545
|
+
const F = y.value.useIndividualScale ? (o.absoluteValues[re] + Math.abs(A)) / we : At(K);
|
|
1546
|
+
return {
|
|
1547
|
+
x: E(c.value.left + ae.value.plot / 2 + ae.value.plot * re),
|
|
1548
|
+
y: E(c.value.bottom - Ie - W * F),
|
|
1549
|
+
value: o.absoluteValues[re],
|
|
1550
|
+
comment: o.comments && o.comments.slice(m.value.start, m.value.end)[re] || ""
|
|
1551
|
+
};
|
|
1552
|
+
}), Se = o.absoluteValues.map((K) => O.min >= 0 ? (K - Math.abs(O.min)) / (O.max - Math.abs(O.min)) : (K + Math.abs(O.min)) / (O.max + Math.abs(O.min))), nl = o.series.map((K, re) => ({
|
|
1553
|
+
x: E(c.value.left + ae.value.plot / 2 + ae.value.plot * re),
|
|
1554
|
+
y: E(c.value.bottom - Ie - (W * Se[re] || 0)),
|
|
1555
|
+
value: o.absoluteValues[re],
|
|
1556
|
+
comment: o.comments && o.comments.slice(m.value.start, m.value.end)[re] || ""
|
|
1557
|
+
})), Me = S.ticks.map((K) => ({
|
|
1558
|
+
y: K >= 0 ? Y - W * (K / we) : Y + W * Math.abs(K) / we,
|
|
1559
|
+
value: K,
|
|
1560
|
+
prefix: o.prefix || t.value.chart.labels.prefix,
|
|
1561
|
+
suffix: o.suffix || t.value.chart.labels.suffix,
|
|
1562
|
+
datapoint: o
|
|
1563
|
+
})), pt = O.ticks.map((K) => {
|
|
1564
|
+
const re = (K - O.min) / (O.max - O.min);
|
|
1565
|
+
return {
|
|
1566
|
+
y: K >= 0 ? se - W * re : se + W * re,
|
|
1567
|
+
value: K,
|
|
1568
|
+
prefix: o.prefix || t.value.chart.labels.prefix,
|
|
1569
|
+
suffix: o.suffix || t.value.chart.labels.suffix,
|
|
1570
|
+
datapoint: o
|
|
1571
|
+
};
|
|
1572
|
+
});
|
|
1573
|
+
return N.value[o.scaleLabel].name = o.name, N.value[o.scaleLabel].groupName = o.scaleLabel, N.value[o.scaleLabel].groupColor = t.value.chart.grid.labels.yAxis.groupColor || o.color, N.value[o.scaleLabel].color = o.color, N.value[o.scaleLabel].scaleYLabels = o.autoScaling ? pt : Me, N.value[o.scaleLabel].zeroPosition = o.autoScaling ? se : Y, N.value[o.scaleLabel].individualMax = o.autoScaling ? ee : we, N.value[o.scaleLabel].scaleLabel = o.scaleLabel, N.value[o.scaleLabel].id = o.id, N.value[o.scaleLabel].yOffset = Ie, N.value[o.scaleLabel].individualHeight = W, N.value[o.scaleLabel].autoScaleYLabels = pt, N.value[o.scaleLabel].unique = It.value.filter((K) => K.scaleLabel === o.scaleLabel).length === 1, {
|
|
1574
|
+
...o,
|
|
1575
|
+
yOffset: Ie,
|
|
1576
|
+
autoScaleYLabels: pt,
|
|
1577
|
+
individualHeight: W,
|
|
1578
|
+
scaleYLabels: o.autoScaling ? pt : Me,
|
|
1579
|
+
individualScale: o.autoScaling ? O : S,
|
|
1580
|
+
individualMax: o.autoScaling ? ee : we,
|
|
1581
|
+
zeroPosition: o.autoScaling ? se : Y,
|
|
1582
|
+
plots: o.autoScaling ? nl : Te,
|
|
1583
|
+
groupId: N.value[o.scaleLabel].groupId
|
|
1584
|
+
};
|
|
1585
|
+
});
|
|
1586
|
+
}), ol = k(() => {
|
|
1587
|
+
const l = Ge.value.map((s) => ({
|
|
1588
|
+
name: s.name,
|
|
1589
|
+
color: s.color,
|
|
1590
|
+
scale: s.individualScale,
|
|
1591
|
+
scaleYLabels: s.scaleYLabels,
|
|
1592
|
+
zero: s.zeroPosition,
|
|
1593
|
+
max: s.individualMax,
|
|
1594
|
+
scaleLabel: s.scaleLabel || "",
|
|
1595
|
+
id: s.id,
|
|
1596
|
+
yOffset: s.yOffset || 0,
|
|
1597
|
+
individualHeight: s.individualHeight || c.value.height,
|
|
1598
|
+
autoScaleYLabels: s.autoScaleYLabels
|
|
1599
|
+
})), r = bt.value.map((s) => ({
|
|
1600
|
+
name: s.name,
|
|
1601
|
+
color: s.color,
|
|
1602
|
+
scale: s.individualScale,
|
|
1603
|
+
scaleYLabels: s.scaleYLabels,
|
|
1604
|
+
zero: s.zeroPosition,
|
|
1605
|
+
max: s.individualMax,
|
|
1606
|
+
scaleLabel: s.scaleLabel || "",
|
|
1607
|
+
id: s.id,
|
|
1608
|
+
yOffset: s.yOffset || 0,
|
|
1609
|
+
individualHeight: s.individualHeight || c.value.height
|
|
1610
|
+
})), e = et.value.map((s) => ({
|
|
1611
|
+
name: s.name,
|
|
1612
|
+
color: s.color,
|
|
1613
|
+
scale: s.individualScale,
|
|
1614
|
+
scaleYLabels: s.scaleYLabels,
|
|
1615
|
+
// FIX
|
|
1616
|
+
zero: s.zeroPosition,
|
|
1617
|
+
max: s.individualMax,
|
|
1618
|
+
scaleLabel: s.scaleLabel || "",
|
|
1619
|
+
id: s.id,
|
|
1620
|
+
yOffset: s.yOffset || 0,
|
|
1621
|
+
individualHeight: s.individualHeight || c.value.height
|
|
1622
|
+
})), n = y.value.useIndividualScale && !y.value.isStacked ? Object.values(N.value) : [...l, ...r, ...e], a = n.flatMap((s) => s).length;
|
|
1623
|
+
return n.flatMap((s, o) => {
|
|
1624
|
+
let P = 0;
|
|
1625
|
+
P = y.value.isStacked ? c.value.left : c.value.left / a * (o + 1);
|
|
1626
|
+
const G = y.value.useIndividualScale && !y.value.isStacked ? s.unique ? s.name : s.groupName : s.name;
|
|
1627
|
+
return {
|
|
1628
|
+
unique: s.unique,
|
|
1629
|
+
id: s.id,
|
|
1630
|
+
groupId: s.groupId,
|
|
1631
|
+
scaleLabel: s.scaleLabel,
|
|
1632
|
+
name: be(
|
|
1633
|
+
t.value.chart.grid.labels.yAxis.serieNameFormatter,
|
|
1634
|
+
G,
|
|
1635
|
+
G,
|
|
1636
|
+
s
|
|
1637
|
+
),
|
|
1638
|
+
color: y.value.useIndividualScale && !y.value.isStacked ? s.unique ? s.color : s.groupColor : s.color,
|
|
1639
|
+
scale: s.scale,
|
|
1640
|
+
yOffset: s.yOffset,
|
|
1641
|
+
individualHeight: s.individualHeight,
|
|
1642
|
+
x: P,
|
|
1643
|
+
yLabels: s.scaleYLabels || s.scale.ticks.map((U) => ({
|
|
1644
|
+
y: U >= 0 ? s.zero - s.individualHeight * (U / s.max) : s.zero + s.individualHeight * Math.abs(U) / s.max,
|
|
1645
|
+
value: U
|
|
1646
|
+
}))
|
|
1647
|
+
};
|
|
1648
|
+
});
|
|
1649
|
+
}), xa = k(() => ({
|
|
1650
|
+
datapoint: al.value,
|
|
1651
|
+
seriesIndex: _.value,
|
|
1652
|
+
series: je.value,
|
|
1653
|
+
bars: bt.value,
|
|
1654
|
+
lines: Ge.value,
|
|
1655
|
+
plots: et.value,
|
|
1656
|
+
config: t.value
|
|
1657
|
+
})), uo = k(() => {
|
|
1658
|
+
let l = "", r = al.value.map((a) => a.value).filter((a) => _l(a) && a !== null).reduce((a, s) => Math.abs(a) + Math.abs(s), 0);
|
|
1659
|
+
const e = de.value[_.value], n = t.value.chart.tooltip.customFormat;
|
|
1660
|
+
return Lo(n) && Mo(() => n({
|
|
1661
|
+
absoluteIndex: _.value + m.value.start,
|
|
1662
|
+
seriesIndex: _.value,
|
|
1663
|
+
datapoint: al.value,
|
|
1664
|
+
series: je.value,
|
|
1665
|
+
bars: bt.value,
|
|
1666
|
+
lines: Ge.value,
|
|
1667
|
+
plots: et.value,
|
|
1668
|
+
config: t.value
|
|
1669
|
+
})) ? n({
|
|
1670
|
+
absoluteIndex: _.value + m.value.start,
|
|
1671
|
+
seriesIndex: _.value,
|
|
1672
|
+
datapoint: al.value,
|
|
1673
|
+
series: je.value,
|
|
1674
|
+
bars: bt.value,
|
|
1675
|
+
lines: Ge.value,
|
|
1676
|
+
plots: et.value,
|
|
1677
|
+
config: t.value
|
|
1678
|
+
}) : (e && e.text && t.value.chart.tooltip.showTimeLabel && (l += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.chart.tooltip.borderColor}; width:100%">${e.text}</div>`), al.value.forEach((a) => {
|
|
1679
|
+
if (_l(a.value)) {
|
|
1680
|
+
let s = "", o = "";
|
|
1681
|
+
switch (ht.value[a.type]) {
|
|
1682
|
+
case "bar":
|
|
1683
|
+
s = `<svg viewBox="0 0 40 40" height="14" width="14">${Pe.pattern ? `<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${a.color}" />` : ""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${Pe.pattern ? `url(#pattern_${X.value}_${a.slotAbsoluteIndex}` : a.color}" /></svg>`;
|
|
1684
|
+
break;
|
|
1685
|
+
case "line":
|
|
1686
|
+
!a.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(a.shape) ? o = `<circle cx="10" cy="8" r="4" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${a.color}" />` : a.shape === "triangle" ? o = `<path d="${lt({ plot: { x: 10, y: 8 }, radius: 4, sides: 3, rotation: 0.52 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "square" ? o = `<path d="${lt({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0.8 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "diamond" ? o = `<path d="${lt({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "pentagon" ? o = `<path d="${lt({ plot: { x: 10, y: 8 }, radius: 4, sides: 5, rotation: 0.95 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "hexagon" ? o = `<path d="${lt({ plot: { x: 10, y: 8 }, radius: 4, sides: 6, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "star" && (o = `<polygon stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${a.color}" points="${Na({ plot: { x: 10, y: 8 }, radius: 4 })}" />`), s = `<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${a.color}" />${o}</svg>`;
|
|
1687
|
+
break;
|
|
1688
|
+
case "plot":
|
|
1689
|
+
if (!a.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(a.shape)) {
|
|
1690
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" /></svg>`;
|
|
1691
|
+
break;
|
|
1692
|
+
}
|
|
1693
|
+
if (a.shape === "star") {
|
|
1694
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" points="${Na({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>`;
|
|
1695
|
+
break;
|
|
1696
|
+
}
|
|
1697
|
+
if (a.shape === "triangle") {
|
|
1698
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${lt({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
1699
|
+
break;
|
|
1700
|
+
}
|
|
1701
|
+
if (a.shape === "square") {
|
|
1702
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${lt({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
1703
|
+
break;
|
|
1704
|
+
}
|
|
1705
|
+
if (a.shape === "diamond") {
|
|
1706
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${lt({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
1707
|
+
break;
|
|
1708
|
+
}
|
|
1709
|
+
if (a.shape === "pentagon") {
|
|
1710
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${lt({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
1711
|
+
break;
|
|
1712
|
+
}
|
|
1713
|
+
if (a.shape === "hexagon") {
|
|
1714
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${lt({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
1715
|
+
break;
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
l += `<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${s}</div> ${a.name}: <b>${t.value.chart.tooltip.showValue ? be(
|
|
1719
|
+
a.type === "line" ? t.value.line.labels.formatter : a.type === "bar" ? t.value.bar.labels.formatter : t.value.plot.labels.formatter,
|
|
1720
|
+
a.value,
|
|
1721
|
+
Fe({
|
|
1722
|
+
p: a.prefix,
|
|
1723
|
+
v: a.value,
|
|
1724
|
+
s: a.suffix,
|
|
1725
|
+
r: t.value.chart.tooltip.roundingValue
|
|
1726
|
+
}),
|
|
1727
|
+
{ datapoint: a }
|
|
1728
|
+
) : ""}</b> ${t.value.chart.tooltip.showPercentage ? `(${Fe({
|
|
1729
|
+
v: E(Math.abs(a.value) / r * 100),
|
|
1730
|
+
s: "%",
|
|
1731
|
+
r: t.value.chart.tooltip.roundingPercentage
|
|
1732
|
+
})})` : ""}</div>`, t.value.chart.comments.showInTooltip && a.comments.length && a.comments.slice(m.value.start, m.value.end)[_.value] && (l += `<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.comments.slice(m.value.start, m.value.end)[_.value]}</div>`);
|
|
1733
|
+
}
|
|
1734
|
+
}), `<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${t.value.chart.tooltip.color}">${l}</div>`);
|
|
1735
|
+
}), ba = k(() => {
|
|
1736
|
+
if (nt.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
|
|
1737
|
+
const l = Ve.value.map((e) => ({
|
|
1738
|
+
label: e.name,
|
|
1739
|
+
color: e.color,
|
|
1740
|
+
type: e.type
|
|
1741
|
+
})), r = [];
|
|
1742
|
+
return de.value.forEach((e, n) => {
|
|
1743
|
+
const a = [e.text];
|
|
1744
|
+
Ve.value.forEach((s) => {
|
|
1745
|
+
a.push(Ae(s.absoluteValues[n]) ? Number(s.absoluteValues[n].toFixed(t.value.table.rounding)) : "");
|
|
1746
|
+
}), r.push(a);
|
|
1747
|
+
}), { head: l, body: r };
|
|
1748
|
+
}), Sl = k(() => {
|
|
1749
|
+
const l = t.value.table.showSum;
|
|
1750
|
+
let r = [""].concat(Ve.value.map((s) => s.name));
|
|
1751
|
+
l && (r = r.concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>'));
|
|
1752
|
+
let e = [];
|
|
1753
|
+
for (let s = 0; s < R.value; s += 1) {
|
|
1754
|
+
const o = Ve.value.map((P) => P.absoluteValues[s] ?? 0).reduce((P, G) => P + G, 0);
|
|
1755
|
+
e.push(
|
|
1756
|
+
[
|
|
1757
|
+
de.value[s].text ?? "-"
|
|
1758
|
+
].concat(Ve.value.map(
|
|
1759
|
+
(P) => be(
|
|
1760
|
+
P.type === "line" ? t.value.line.labels.formatter : P.type === "bar" ? t.value.bar.labels.formatter : t.value.plot.labels.formatter,
|
|
1761
|
+
P.absoluteValues[s] ?? 0,
|
|
1762
|
+
Fe({
|
|
1763
|
+
p: P.prefix || t.value.chart.labels.prefix,
|
|
1764
|
+
v: P.absoluteValues[s] ?? 0,
|
|
1765
|
+
s: P.suffix || t.value.chart.labels.suffix,
|
|
1766
|
+
r: t.value.table.rounding
|
|
1767
|
+
})
|
|
1768
|
+
)
|
|
1769
|
+
)).concat(l ? (o ?? 0).toFixed(t.value.table.rounding) : [])
|
|
1770
|
+
);
|
|
1771
|
+
}
|
|
1772
|
+
const n = {
|
|
1773
|
+
th: {
|
|
1774
|
+
backgroundColor: t.value.table.th.backgroundColor,
|
|
1775
|
+
color: t.value.table.th.color,
|
|
1776
|
+
outline: t.value.table.th.outline
|
|
1777
|
+
},
|
|
1778
|
+
td: {
|
|
1779
|
+
backgroundColor: t.value.table.td.backgroundColor,
|
|
1780
|
+
color: t.value.table.td.color,
|
|
1781
|
+
outline: t.value.table.td.outline
|
|
1782
|
+
},
|
|
1783
|
+
breakpoint: t.value.table.responsiveBreakpoint
|
|
1784
|
+
}, a = [t.value.table.columnNames.period].concat(Ve.value.map((s) => s.name)).concat(t.value.table.columnNames.total);
|
|
1785
|
+
return { head: r, body: e, config: n, colNames: a };
|
|
1786
|
+
});
|
|
1787
|
+
function pa(l = null) {
|
|
1788
|
+
const r = [[t.value.chart.title.text], [t.value.chart.title.subtitle.text], [""]], e = ["", ...ba.value.head.map((o) => o.label)], n = ba.value.body, a = r.concat([e]).concat(n), s = To(a);
|
|
1789
|
+
l ? l(s) : No({ csvContent: s, title: t.value.chart.title.text || "vue-ui-xy" });
|
|
1790
|
+
}
|
|
1791
|
+
function ya(l, r = null) {
|
|
1792
|
+
Et.value = l;
|
|
1793
|
+
const e = Ve.value.map((n) => ({
|
|
1794
|
+
name: n.name,
|
|
1795
|
+
value: [null, void 0, NaN].includes(n.absoluteValues[r]) ? null : n.absoluteValues[r],
|
|
1796
|
+
color: n.color,
|
|
1797
|
+
type: n.type
|
|
1798
|
+
}));
|
|
1799
|
+
l ? (_.value = r, t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: e, seriesIndex: r + m.value.start })) : (_.value = null, t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: e, seriesIndex: r + m.value.start }));
|
|
1800
|
+
}
|
|
1801
|
+
function ka() {
|
|
1802
|
+
y.value.showTable = !y.value.showTable;
|
|
1803
|
+
}
|
|
1804
|
+
function wa() {
|
|
1805
|
+
y.value.dataLabels.show = !y.value.dataLabels.show;
|
|
1806
|
+
}
|
|
1807
|
+
function Sa() {
|
|
1808
|
+
y.value.showTooltip = !y.value.showTooltip;
|
|
1809
|
+
}
|
|
1810
|
+
function $a(l) {
|
|
1811
|
+
ut.value = l, vl.value += 1;
|
|
1812
|
+
}
|
|
1813
|
+
function _a() {
|
|
1814
|
+
if (!t.value.responsiveProportionalSizing) {
|
|
1815
|
+
$.value.dataLabels = t.value.chart.grid.labels.fontSize, $.value.yAxis = t.value.chart.grid.labels.axis.fontSize, $.value.xAxis = t.value.chart.grid.labels.xAxisLabels.fontSize, $.value.plotLabels = t.value.chart.labels.fontSize, Le.value.plot = t.value.plot.radius, Le.value.line = t.value.line.radius;
|
|
1816
|
+
return;
|
|
1817
|
+
}
|
|
1818
|
+
$.value.dataLabels = Zt({
|
|
1819
|
+
relator: me.value,
|
|
1820
|
+
adjuster: 400,
|
|
1821
|
+
source: t.value.chart.grid.labels.fontSize,
|
|
1822
|
+
threshold: 10,
|
|
1823
|
+
fallback: 10
|
|
1824
|
+
}), $.value.yAxis = Zt({
|
|
1825
|
+
relator: ue.value,
|
|
1826
|
+
adjuster: 1e3,
|
|
1827
|
+
source: t.value.chart.grid.labels.axis.fontSize,
|
|
1828
|
+
threshold: 10,
|
|
1829
|
+
fallback: 10
|
|
1830
|
+
}), $.value.xAxis = Zt({
|
|
1831
|
+
relator: ue.value,
|
|
1832
|
+
adjuster: 1e3,
|
|
1833
|
+
source: t.value.chart.grid.labels.xAxisLabels.fontSize,
|
|
1834
|
+
threshold: 10,
|
|
1835
|
+
fallback: 10
|
|
1836
|
+
}), $.value.plotLabels = Zt({
|
|
1837
|
+
relator: ue.value,
|
|
1838
|
+
adjuster: 800,
|
|
1839
|
+
source: t.value.chart.labels.fontSize,
|
|
1840
|
+
threshold: 10,
|
|
1841
|
+
fallback: 10
|
|
1842
|
+
}), Le.value.plot = Zt({
|
|
1843
|
+
relator: ue.value,
|
|
1844
|
+
adjuster: 800,
|
|
1845
|
+
source: t.value.plot.radius,
|
|
1846
|
+
threshold: 1,
|
|
1847
|
+
fallback: 1
|
|
1848
|
+
}), Le.value.line = Zt({
|
|
1849
|
+
relator: ue.value,
|
|
1850
|
+
adjuster: 800,
|
|
1851
|
+
source: t.value.line.radius,
|
|
1852
|
+
threshold: 1,
|
|
1853
|
+
fallback: 1
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1856
|
+
const ul = k(() => !!t.value.debug);
|
|
1857
|
+
function El() {
|
|
1858
|
+
Ra(d.dataset) ? (Fl({
|
|
1859
|
+
componentName: "VueUiXy",
|
|
1860
|
+
type: "dataset",
|
|
1861
|
+
debug: ul.value
|
|
1862
|
+
}), h.value = !0) : d.dataset.forEach((r, e) => {
|
|
1863
|
+
[null, void 0].includes(r.name) && (Fl({
|
|
1864
|
+
componentName: "VueUiXy",
|
|
1865
|
+
type: "datasetSerieAttribute",
|
|
1866
|
+
property: "name (string)",
|
|
1867
|
+
index: e,
|
|
1868
|
+
debug: ul.value
|
|
1869
|
+
}), h.value = !0);
|
|
1870
|
+
}), ul.value && d.dataset.forEach((r) => {
|
|
1871
|
+
r.series.forEach((e, n) => {
|
|
1872
|
+
_l(e) || console.warn(`VueUiXy has detected an unsafe value in your dataset:
|
|
1873
|
+
-----> The serie '${r.name}' contains the value '${e}' at index ${n}.
|
|
1874
|
+
'${e}' was converted to null to allow the chart to display.`);
|
|
1875
|
+
});
|
|
1876
|
+
}), Ra(d.dataset) || (h.value = t.value.loading), De.value = t.value.chart.userOptions.showOnChartHover, Bt.value = t.value.chart.userOptions.keepStateOnChartLeave, Ft.value = !t.value.chart.userOptions.showOnChartHover, Yt();
|
|
1877
|
+
const l = 12;
|
|
1878
|
+
if (t.value.responsive) {
|
|
1879
|
+
const e = oe.value.parentNode;
|
|
1880
|
+
$e.value && ($e.value.unobserve(fe.value), $e.value.disconnect());
|
|
1881
|
+
const { height: n, width: a } = e.getBoundingClientRect();
|
|
1882
|
+
let s = null, o = 0;
|
|
1883
|
+
t.value.chart.title.show && ot.value && (s = ot.value, o = s.getBoundingClientRect().height);
|
|
1884
|
+
let P = null, G = 0;
|
|
1885
|
+
t.value.chart.zoom.show && w.value > 6 && Qe.value && Ce.value && Ce.value.$el && (P = Ce.value.$el, G = P.getBoundingClientRect().height);
|
|
1886
|
+
let U = null, M = 0;
|
|
1887
|
+
t.value.chart.legend.show && ct.value && (U = ct.value, M = U.getBoundingClientRect().height);
|
|
1888
|
+
let H = 0;
|
|
1889
|
+
_t.value && (H = _t.value.getBoundingClientRect().height);
|
|
1890
|
+
let Z = 0;
|
|
1891
|
+
Lt.value && (Z = Lt.value.getBoundingClientRect().height), me.value = n - o - M - G - H - Z - l, ue.value = a, dt.value = `0 0 ${ue.value < 0 ? 10 : ue.value} ${me.value < 0 ? 10 : me.value}`, _a();
|
|
1892
|
+
const S = new ResizeObserver((O) => {
|
|
1893
|
+
for (const A of O)
|
|
1894
|
+
t.value.chart.title.show && ot.value ? o = ot.value.getBoundingClientRect().height : o = 0, Ce.value && Ce.value.$el ? G = Ce.value.$el.getBoundingClientRect().height : G = 0, ct.value ? M = ct.value.getBoundingClientRect().height : M = 0, _t.value ? H = _t.value.getBoundingClientRect().height : H = 0, Lt.value ? Z = Lt.value.getBoundingClientRect().height : Z = 0, requestAnimationFrame(() => {
|
|
1895
|
+
me.value = A.contentRect.height - o - M - G - H - Z - l, ue.value = A.contentBoxSize[0].inlineSize, dt.value = `0 0 ${ue.value < 0 ? 10 : ue.value} ${me.value < 0 ? 10 : me.value}`, _a();
|
|
1896
|
+
});
|
|
1897
|
+
});
|
|
1898
|
+
$e.value = S, fe.value = e, S.observe(e);
|
|
1899
|
+
} else
|
|
1900
|
+
me.value = t.value.chart.height, ue.value = t.value.chart.width, $.value.dataLabels = t.value.chart.grid.labels.fontSize, $.value.yAxis = t.value.chart.grid.labels.axis.fontSize, $.value.xAxis = t.value.chart.grid.labels.xAxisLabels.fontSize, $.value.plotLabels = t.value.chart.labels.fontSize, Le.value.plot = t.value.plot.radius, Le.value.line = t.value.line.radius, dt.value = `0 0 ${ue.value} ${me.value}`;
|
|
1901
|
+
}
|
|
1902
|
+
rl(() => {
|
|
1903
|
+
El(), bl(), document.addEventListener("mousemove", (l) => {
|
|
1904
|
+
Qt.value = {
|
|
1905
|
+
x: l.clientX,
|
|
1906
|
+
y: l.clientY
|
|
1907
|
+
};
|
|
1908
|
+
}), document.addEventListener("scroll", Jl);
|
|
1909
|
+
}), cl(() => {
|
|
1910
|
+
document.removeEventListener("scroll", Jl), $e.value && ($e.value.unobserve(fe.value), $e.value.disconnect());
|
|
1911
|
+
}), Vo({
|
|
1912
|
+
timeLabelsEls: Je,
|
|
1913
|
+
timeLabels: de,
|
|
1914
|
+
slicer: m,
|
|
1915
|
+
configRef: t,
|
|
1916
|
+
rotationPath: ["chart", "grid", "labels", "xAxisLabels", "rotation"],
|
|
1917
|
+
autoRotatePath: ["chart", "grid", "labels", "xAxisLabels", "autoRotate", "enable"],
|
|
1918
|
+
isAutoSize: Ha,
|
|
1919
|
+
height: me,
|
|
1920
|
+
width: ue,
|
|
1921
|
+
rotation: t.value.chart.grid.labels.xAxisLabels.autoRotate.angle
|
|
1922
|
+
}), at(() => d.dataset, (l) => {
|
|
1923
|
+
Array.isArray(l) && l.length > 0 && (h.value = !1), w.value = Math.max(...g.value.map((r) => Ue({
|
|
1924
|
+
data: r.series,
|
|
1925
|
+
threshold: t.value.downsample.threshold
|
|
1926
|
+
}).length)), m.value = {
|
|
1927
|
+
start: 0,
|
|
1928
|
+
end: w.value
|
|
1929
|
+
}, pe.value += 1, Oe.value += 1, Xt();
|
|
1930
|
+
}, { deep: !0 }), at(() => d.config, (l) => {
|
|
1931
|
+
B.value || (t.value = Dt()), El(), jt.value += 1, dl.value += 1, Yt(), Xt();
|
|
1932
|
+
}, { deep: !0 });
|
|
1933
|
+
const Bl = p(!1);
|
|
1934
|
+
function La() {
|
|
1935
|
+
const l = oe.value?.parentNode;
|
|
1936
|
+
if (!l) {
|
|
1937
|
+
Bl.value = !1;
|
|
1938
|
+
return;
|
|
1939
|
+
}
|
|
1940
|
+
const r = l.getBoundingClientRect();
|
|
1941
|
+
Bl.value = r.width > 2 && r.height > 2;
|
|
1942
|
+
}
|
|
1943
|
+
return rl(() => {
|
|
1944
|
+
La();
|
|
1945
|
+
const l = new ResizeObserver(() => {
|
|
1946
|
+
La(), Bl.value && (El(), Xt(), bl());
|
|
1947
|
+
});
|
|
1948
|
+
oe.value?.parentNode && l.observe(oe.value.parentNode);
|
|
1949
|
+
}), at(t, () => {
|
|
1950
|
+
Yt();
|
|
1951
|
+
}, { immediate: !0 }), Il({
|
|
1952
|
+
getData: Ka,
|
|
1953
|
+
getImage: Ja,
|
|
1954
|
+
generatePdf: Gl,
|
|
1955
|
+
generateImage: Ul,
|
|
1956
|
+
generateCsv: pa,
|
|
1957
|
+
toggleStack: aa,
|
|
1958
|
+
toggleTable: ka,
|
|
1959
|
+
toggleLabels: wa,
|
|
1960
|
+
toggleTooltip: Sa,
|
|
1961
|
+
toggleAnnotator: Ol,
|
|
1962
|
+
toggleFullscreen: $a
|
|
1963
|
+
}), (l, r) => (u(), i("div", {
|
|
1964
|
+
id: `vue-ui-xy_${X.value}`,
|
|
1965
|
+
class: Ne(`vue-ui-xy ${ut.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1966
|
+
ref_key: "chart",
|
|
1967
|
+
ref: oe,
|
|
1968
|
+
style: L(`background:${t.value.chart.backgroundColor}; color:${t.value.chart.color};width:100%;font-family:${t.value.chart.fontFamily};${t.value.responsive ? "height: 100%" : ""}`),
|
|
1969
|
+
onMouseenter: r[10] || (r[10] = () => jl(!0)),
|
|
1970
|
+
onMouseleave: r[11] || (r[11] = () => jl(!1))
|
|
1971
|
+
}, [
|
|
1972
|
+
t.value.chart.userOptions.buttons.annotator && ye.value ? (u(), Be(v(rt), {
|
|
1973
|
+
key: 0,
|
|
1974
|
+
svgRef: ye.value,
|
|
1975
|
+
backgroundColor: t.value.chart.backgroundColor,
|
|
1976
|
+
color: t.value.chart.color,
|
|
1977
|
+
active: ft.value,
|
|
1978
|
+
onClose: Ol
|
|
1979
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : f("", !0),
|
|
1980
|
+
ja.value ? (u(), i("div", {
|
|
1981
|
+
key: 1,
|
|
1982
|
+
ref_key: "noTitle",
|
|
1983
|
+
ref: Lt,
|
|
1984
|
+
class: "vue-data-ui-no-title-space",
|
|
1985
|
+
style: "height:36px; width: 100%; background:transparent"
|
|
1986
|
+
}, null, 512)) : f("", !0),
|
|
1987
|
+
t.value.chart.title.show ? (u(), i("div", {
|
|
1988
|
+
key: 2,
|
|
1989
|
+
ref_key: "chartTitle",
|
|
1990
|
+
ref: ot,
|
|
1991
|
+
class: "vue-ui-xy-title",
|
|
1992
|
+
style: L(`font-family:${t.value.chart.fontFamily}`)
|
|
1993
|
+
}, [
|
|
1994
|
+
(u(), Be(Bo, {
|
|
1995
|
+
key: `title_${jt.value}`,
|
|
1996
|
+
config: {
|
|
1997
|
+
title: {
|
|
1998
|
+
cy: "xy-div-title",
|
|
1999
|
+
...t.value.chart.title
|
|
2000
|
+
},
|
|
2001
|
+
subtitle: {
|
|
2002
|
+
cy: "xy-div-subtitle",
|
|
2003
|
+
...t.value.chart.title.subtitle
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
}, null, 8, ["config"]))
|
|
2007
|
+
], 4)) : f("", !0),
|
|
2008
|
+
b("div", {
|
|
2009
|
+
id: `legend-top-${X.value}`
|
|
2010
|
+
}, null, 8, vu),
|
|
2011
|
+
t.value.chart.userOptions.show && (Bt.value || Ft.value) ? (u(), Be(v(he), {
|
|
2012
|
+
ref: "defails",
|
|
2013
|
+
key: `user_options_${vl.value}`,
|
|
2014
|
+
backgroundColor: t.value.chart.backgroundColor,
|
|
2015
|
+
color: t.value.chart.color,
|
|
2016
|
+
isPrinting: v(el),
|
|
2017
|
+
isImaging: v(Xl),
|
|
2018
|
+
uid: X.value,
|
|
2019
|
+
hasTooltip: t.value.chart.userOptions.buttons.tooltip && t.value.chart.tooltip.show,
|
|
2020
|
+
hasPdf: t.value.chart.userOptions.buttons.pdf,
|
|
2021
|
+
hasXls: t.value.chart.userOptions.buttons.csv,
|
|
2022
|
+
hasImg: t.value.chart.userOptions.buttons.img,
|
|
2023
|
+
hasLabel: t.value.chart.userOptions.buttons.labels,
|
|
2024
|
+
hasTable: t.value.chart.userOptions.buttons.table,
|
|
2025
|
+
hasStack: I.dataset.length > 1 && t.value.chart.userOptions.buttons.stack,
|
|
2026
|
+
hasFullscreen: t.value.chart.userOptions.buttons.fullscreen,
|
|
2027
|
+
isStacked: y.value.isStacked,
|
|
2028
|
+
isFullscreen: ut.value,
|
|
2029
|
+
chartElement: l.$refs.chart,
|
|
2030
|
+
position: t.value.chart.userOptions.position,
|
|
2031
|
+
isTooltip: y.value.showTooltip,
|
|
2032
|
+
titles: { ...t.value.chart.userOptions.buttonTitles },
|
|
2033
|
+
hasAnnotator: t.value.chart.userOptions.buttons.annotator,
|
|
2034
|
+
isAnnotation: ft.value,
|
|
2035
|
+
callbacks: t.value.chart.userOptions.callbacks,
|
|
2036
|
+
printScale: t.value.chart.userOptions.print.scale,
|
|
2037
|
+
onToggleFullscreen: $a,
|
|
2038
|
+
onGeneratePdf: v(Gl),
|
|
2039
|
+
onGenerateCsv: pa,
|
|
2040
|
+
onGenerateImage: v(Ul),
|
|
2041
|
+
onToggleTable: ka,
|
|
2042
|
+
onToggleLabels: wa,
|
|
2043
|
+
onToggleStack: aa,
|
|
2044
|
+
onToggleTooltip: Sa,
|
|
2045
|
+
onToggleAnnotator: Ol,
|
|
2046
|
+
style: L({
|
|
2047
|
+
visibility: Bt.value ? Ft.value ? "visible" : "hidden" : "visible"
|
|
2048
|
+
})
|
|
2049
|
+
}, fo({ _: 2 }, [
|
|
2050
|
+
l.$slots.menuIcon ? {
|
|
2051
|
+
name: "menuIcon",
|
|
2052
|
+
fn: ge(({ isOpen: e, color: n }) => [
|
|
2053
|
+
J(l.$slots, "menuIcon", it(wt({ isOpen: e, color: n })), void 0, !0)
|
|
2054
|
+
]),
|
|
2055
|
+
key: "0"
|
|
2056
|
+
} : void 0,
|
|
2057
|
+
l.$slots.optionTooltip ? {
|
|
2058
|
+
name: "optionTooltip",
|
|
2059
|
+
fn: ge(() => [
|
|
2060
|
+
J(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
2061
|
+
]),
|
|
2062
|
+
key: "1"
|
|
2063
|
+
} : void 0,
|
|
2064
|
+
l.$slots.optionPdf ? {
|
|
2065
|
+
name: "optionPdf",
|
|
2066
|
+
fn: ge(() => [
|
|
2067
|
+
J(l.$slots, "optionPdf", {}, void 0, !0)
|
|
2068
|
+
]),
|
|
2069
|
+
key: "2"
|
|
2070
|
+
} : void 0,
|
|
2071
|
+
l.$slots.optionCsv ? {
|
|
2072
|
+
name: "optionCsv",
|
|
2073
|
+
fn: ge(() => [
|
|
2074
|
+
J(l.$slots, "optionCsv", {}, void 0, !0)
|
|
2075
|
+
]),
|
|
2076
|
+
key: "3"
|
|
2077
|
+
} : void 0,
|
|
2078
|
+
l.$slots.optionImg ? {
|
|
2079
|
+
name: "optionImg",
|
|
2080
|
+
fn: ge(() => [
|
|
2081
|
+
J(l.$slots, "optionImg", {}, void 0, !0)
|
|
2082
|
+
]),
|
|
2083
|
+
key: "4"
|
|
2084
|
+
} : void 0,
|
|
2085
|
+
l.$slots.optionTable ? {
|
|
2086
|
+
name: "optionTable",
|
|
2087
|
+
fn: ge(() => [
|
|
2088
|
+
J(l.$slots, "optionTable", {}, void 0, !0)
|
|
2089
|
+
]),
|
|
2090
|
+
key: "5"
|
|
2091
|
+
} : void 0,
|
|
2092
|
+
l.$slots.optionLabels ? {
|
|
2093
|
+
name: "optionLabels",
|
|
2094
|
+
fn: ge(() => [
|
|
2095
|
+
J(l.$slots, "optionLabels", {}, void 0, !0)
|
|
2096
|
+
]),
|
|
2097
|
+
key: "6"
|
|
2098
|
+
} : void 0,
|
|
2099
|
+
l.$slots.optionStack ? {
|
|
2100
|
+
name: "optionStack",
|
|
2101
|
+
fn: ge(() => [
|
|
2102
|
+
J(l.$slots, "optionStack", {}, void 0, !0)
|
|
2103
|
+
]),
|
|
2104
|
+
key: "7"
|
|
2105
|
+
} : void 0,
|
|
2106
|
+
l.$slots.optionFullscreen ? {
|
|
2107
|
+
name: "optionFullscreen",
|
|
2108
|
+
fn: ge(({ toggleFullscreen: e, isFullscreen: n }) => [
|
|
2109
|
+
J(l.$slots, "optionFullscreen", it(wt({ toggleFullscreen: e, isFullscreen: n })), void 0, !0)
|
|
2110
|
+
]),
|
|
2111
|
+
key: "8"
|
|
2112
|
+
} : void 0,
|
|
2113
|
+
l.$slots.optionAnnotator ? {
|
|
2114
|
+
name: "optionAnnotator",
|
|
2115
|
+
fn: ge(({ toggleAnnotator: e, isAnnotator: n }) => [
|
|
2116
|
+
J(l.$slots, "optionAnnotator", it(wt({ toggleAnnotator: e, isAnnotator: n })), void 0, !0)
|
|
2117
|
+
]),
|
|
2118
|
+
key: "9"
|
|
2119
|
+
} : void 0
|
|
2120
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasLabel", "hasTable", "hasStack", "hasFullscreen", "isStacked", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : f("", !0),
|
|
2121
|
+
(u(), i("svg", {
|
|
2122
|
+
ref_key: "svgRef",
|
|
2123
|
+
ref: ye,
|
|
2124
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2125
|
+
class: Ne([{ "vue-data-ui-fullscreen--on": ut.value, "vue-data-ui-fulscreen--off": !ut.value }, "vue-ui-xy-svg vue-data-ui-svg"]),
|
|
2126
|
+
width: "100%",
|
|
2127
|
+
viewBox: dt.value,
|
|
2128
|
+
style: L({
|
|
2129
|
+
background: "transparent",
|
|
2130
|
+
color: t.value.chart.color,
|
|
2131
|
+
fontFamily: t.value.chart.fontFamily
|
|
2132
|
+
}),
|
|
2133
|
+
"aria-label": Qa.value,
|
|
2134
|
+
role: "img",
|
|
2135
|
+
"aria-live": "polite",
|
|
2136
|
+
preserveAspectRatio: "xMidYMid",
|
|
2137
|
+
onMousemove: Ua,
|
|
2138
|
+
onMouseleave: ca,
|
|
2139
|
+
onClick: Za
|
|
2140
|
+
}, [
|
|
2141
|
+
b("g", {
|
|
2142
|
+
ref_key: "G",
|
|
2143
|
+
ref: Ke,
|
|
2144
|
+
class: "vue-data-ui-g"
|
|
2145
|
+
}, [
|
|
2146
|
+
qt(v(st)),
|
|
2147
|
+
l.$slots["chart-background"] ? (u(), i("foreignObject", {
|
|
2148
|
+
key: 0,
|
|
2149
|
+
x: c.value.left + j.value < 0 ? 0 : c.value.left + j.value,
|
|
2150
|
+
y: c.value.top,
|
|
2151
|
+
width: c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / R.value) < 0 ? 0 : c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / R.value),
|
|
2152
|
+
height: c.value.height < 0 ? 0 : c.value.height,
|
|
2153
|
+
style: {
|
|
2154
|
+
pointerEvents: "none"
|
|
2155
|
+
}
|
|
2156
|
+
}, [
|
|
2157
|
+
J(l.$slots, "chart-background", {}, void 0, !0)
|
|
2158
|
+
], 8, hu)) : f("", !0),
|
|
2159
|
+
R.value > 0 ? (u(), i("g", fu, [
|
|
2160
|
+
b("g", gu, [
|
|
2161
|
+
t.value.chart.grid.labels.xAxis.showBaseline ? (u(), i("line", {
|
|
2162
|
+
key: 0,
|
|
2163
|
+
stroke: t.value.chart.grid.stroke,
|
|
2164
|
+
"stroke-width": "1",
|
|
2165
|
+
x1: c.value.left + j.value,
|
|
2166
|
+
x2: c.value.right - j.value,
|
|
2167
|
+
y1: v(D)(c.value.bottom),
|
|
2168
|
+
y2: v(D)(c.value.bottom),
|
|
2169
|
+
"stroke-linecap": "round",
|
|
2170
|
+
style: { animation: "none !important" }
|
|
2171
|
+
}, null, 8, mu)) : f("", !0),
|
|
2172
|
+
y.value.useIndividualScale ? t.value.chart.grid.showHorizontalLines ? (u(!0), i(x, { key: 2 }, C(ol.value, (e) => (u(), i("g", null, [
|
|
2173
|
+
e.id === z.value && e.yLabels.length ? (u(!0), i(x, { key: 0 }, C(e.yLabels, (n) => (u(), i("line", {
|
|
2174
|
+
x1: c.value.left + j.value,
|
|
2175
|
+
x2: c.value.right - j.value,
|
|
2176
|
+
y1: v(D)(n.y),
|
|
2177
|
+
y2: v(D)(n.y),
|
|
2178
|
+
stroke: e.color,
|
|
2179
|
+
"stroke-width": 0.5,
|
|
2180
|
+
"stroke-linecap": "round",
|
|
2181
|
+
style: { animation: "none !important" }
|
|
2182
|
+
}, null, 8, yu))), 256)) : e.yLabels.length ? (u(!0), i(x, { key: 1 }, C(e.yLabels, (n) => (u(), i("line", {
|
|
2183
|
+
x1: c.value.left + j.value,
|
|
2184
|
+
x2: c.value.right - j.value,
|
|
2185
|
+
y1: v(D)(n.y),
|
|
2186
|
+
y2: v(D)(n.y),
|
|
2187
|
+
stroke: t.value.chart.grid.stroke,
|
|
2188
|
+
"stroke-width": 0.5,
|
|
2189
|
+
"stroke-linecap": "round",
|
|
2190
|
+
style: { animation: "none !important" }
|
|
2191
|
+
}, null, 8, ku))), 256)) : f("", !0)
|
|
2192
|
+
]))), 256)) : f("", !0) : (u(), i(x, { key: 1 }, [
|
|
2193
|
+
t.value.chart.grid.labels.yAxis.showBaseline ? (u(), i("line", {
|
|
2194
|
+
key: 0,
|
|
2195
|
+
stroke: t.value.chart.grid.stroke,
|
|
2196
|
+
"stroke-width": "1",
|
|
2197
|
+
x1: c.value.left + j.value,
|
|
2198
|
+
x2: c.value.left + j.value,
|
|
2199
|
+
y1: v(D)(c.value.top),
|
|
2200
|
+
y2: v(D)(c.value.bottom),
|
|
2201
|
+
"stroke-linecap": "round",
|
|
2202
|
+
style: { animation: "none !important" }
|
|
2203
|
+
}, null, 8, xu)) : f("", !0),
|
|
2204
|
+
t.value.chart.grid.showHorizontalLines ? (u(), i("g", bu, [
|
|
2205
|
+
(u(!0), i(x, null, C(fa.value, (e) => (u(), i("line", {
|
|
2206
|
+
x1: c.value.left + j.value,
|
|
2207
|
+
x2: c.value.right,
|
|
2208
|
+
y1: v(D)(e.y),
|
|
2209
|
+
y2: v(D)(e.y),
|
|
2210
|
+
stroke: t.value.chart.grid.stroke,
|
|
2211
|
+
"stroke-width": 0.5,
|
|
2212
|
+
"stroke-linecap": "round",
|
|
2213
|
+
style: { animation: "none !important" }
|
|
2214
|
+
}, null, 8, pu))), 256))
|
|
2215
|
+
])) : f("", !0)
|
|
2216
|
+
], 64)),
|
|
2217
|
+
t.value.chart.grid.showVerticalLines ? (u(), i("g", wu, [
|
|
2218
|
+
b("path", {
|
|
2219
|
+
d: Fa.value,
|
|
2220
|
+
"stroke-width": 0.5,
|
|
2221
|
+
stroke: t.value.chart.grid.stroke,
|
|
2222
|
+
"stroke-linecap": "round",
|
|
2223
|
+
style: { animation: "none !important" }
|
|
2224
|
+
}, null, 8, Su)
|
|
2225
|
+
])) : f("", !0),
|
|
2226
|
+
t.value.chart.grid.labels.xAxisLabels.show ? (u(), i("g", $u, [
|
|
2227
|
+
b("path", {
|
|
2228
|
+
d: Wa.value,
|
|
2229
|
+
stroke: t.value.chart.grid.stroke,
|
|
2230
|
+
"stroke-width": 1,
|
|
2231
|
+
"stroke-linecap": "round",
|
|
2232
|
+
style: { animation: "none !important" }
|
|
2233
|
+
}, null, 8, _u)
|
|
2234
|
+
])) : f("", !0)
|
|
2235
|
+
]),
|
|
2236
|
+
(u(!0), i(x, null, C(bt.value, (e, n) => (u(), i("defs", {
|
|
2237
|
+
key: `def_rect_${n}`
|
|
2238
|
+
}, [
|
|
2239
|
+
b("linearGradient", {
|
|
2240
|
+
id: `rectGradient_pos_${n}_${X.value}`,
|
|
2241
|
+
x2: "0%",
|
|
2242
|
+
y2: "100%"
|
|
2243
|
+
}, [
|
|
2244
|
+
b("stop", {
|
|
2245
|
+
offset: "0%",
|
|
2246
|
+
"stop-color": e.color
|
|
2247
|
+
}, null, 8, Mu),
|
|
2248
|
+
b("stop", {
|
|
2249
|
+
offset: "62%",
|
|
2250
|
+
"stop-color": `${v(Rt)(e.color, 0.02)}`
|
|
2251
|
+
}, null, 8, Cu),
|
|
2252
|
+
b("stop", {
|
|
2253
|
+
offset: "100%",
|
|
2254
|
+
"stop-color": `${v(Rt)(e.color, 0.05)}`
|
|
2255
|
+
}, null, 8, zu)
|
|
2256
|
+
], 8, Lu),
|
|
2257
|
+
b("linearGradient", {
|
|
2258
|
+
id: `rectGradient_neg_${n}_${X.value}`,
|
|
2259
|
+
x2: "0%",
|
|
2260
|
+
y2: "100%"
|
|
2261
|
+
}, [
|
|
2262
|
+
b("stop", {
|
|
2263
|
+
offset: "0%",
|
|
2264
|
+
"stop-color": `${v(Rt)(e.color, 0.05)}`
|
|
2265
|
+
}, null, 8, Iu),
|
|
2266
|
+
b("stop", {
|
|
2267
|
+
offset: "38%",
|
|
2268
|
+
"stop-color": `${v(Rt)(e.color, 0.02)}`
|
|
2269
|
+
}, null, 8, Tu),
|
|
2270
|
+
b("stop", {
|
|
2271
|
+
offset: "100%",
|
|
2272
|
+
"stop-color": e.color
|
|
2273
|
+
}, null, 8, Nu)
|
|
2274
|
+
], 8, Au)
|
|
2275
|
+
]))), 128)),
|
|
2276
|
+
(u(!0), i(x, null, C(et.value, (e, n) => (u(), i("defs", {
|
|
2277
|
+
key: `def_plot_${n}`
|
|
2278
|
+
}, [
|
|
2279
|
+
b("radialGradient", {
|
|
2280
|
+
id: `plotGradient_${n}_${X.value}`,
|
|
2281
|
+
cx: "50%",
|
|
2282
|
+
cy: "50%",
|
|
2283
|
+
r: "50%",
|
|
2284
|
+
fx: "50%",
|
|
2285
|
+
fy: "50%"
|
|
2286
|
+
}, [
|
|
2287
|
+
b("stop", {
|
|
2288
|
+
offset: "0%",
|
|
2289
|
+
"stop-color": `${v(Rt)(e.color, 0.05)}`
|
|
2290
|
+
}, null, 8, Pu),
|
|
2291
|
+
b("stop", {
|
|
2292
|
+
offset: "100%",
|
|
2293
|
+
"stop-color": e.color
|
|
2294
|
+
}, null, 8, Ou)
|
|
2295
|
+
], 8, Ru)
|
|
2296
|
+
]))), 128)),
|
|
2297
|
+
(u(!0), i(x, null, C(Ge.value, (e, n) => (u(), i("defs", {
|
|
2298
|
+
key: `def_line_${n}`
|
|
2299
|
+
}, [
|
|
2300
|
+
b("radialGradient", {
|
|
2301
|
+
id: `lineGradient_${n}_${X.value}`,
|
|
2302
|
+
cx: "50%",
|
|
2303
|
+
cy: "50%",
|
|
2304
|
+
r: "50%",
|
|
2305
|
+
fx: "50%",
|
|
2306
|
+
fy: "50%"
|
|
2307
|
+
}, [
|
|
2308
|
+
b("stop", {
|
|
2309
|
+
offset: "0%",
|
|
2310
|
+
"stop-color": `${v(Rt)(e.color, 0.05)}`
|
|
2311
|
+
}, null, 8, Vu),
|
|
2312
|
+
b("stop", {
|
|
2313
|
+
offset: "100%",
|
|
2314
|
+
"stop-color": e.color
|
|
2315
|
+
}, null, 8, Eu)
|
|
2316
|
+
], 8, Hu),
|
|
2317
|
+
b("linearGradient", {
|
|
2318
|
+
id: `areaGradient_${n}_${X.value}`,
|
|
2319
|
+
x1: "0%",
|
|
2320
|
+
x2: "100%",
|
|
2321
|
+
y1: "0%",
|
|
2322
|
+
y2: "0%"
|
|
2323
|
+
}, [
|
|
2324
|
+
b("stop", {
|
|
2325
|
+
offset: "0%",
|
|
2326
|
+
"stop-color": `${v(Ze)(v(Rt)(e.color, 0.03), t.value.line.area.opacity)}`
|
|
2327
|
+
}, null, 8, Fu),
|
|
2328
|
+
b("stop", {
|
|
2329
|
+
offset: "100%",
|
|
2330
|
+
"stop-color": `${v(Ze)(e.color, t.value.line.area.opacity)}`
|
|
2331
|
+
}, null, 8, Wu)
|
|
2332
|
+
], 8, Bu)
|
|
2333
|
+
]))), 128)),
|
|
2334
|
+
(u(!0), i(x, null, C(eo.value, (e) => (u(), i("g", null, [
|
|
2335
|
+
e.show ? (u(), i(x, { key: 0 }, [
|
|
2336
|
+
(u(!0), i(x, null, C(e.span, (n, a) => (u(), i("g", null, [
|
|
2337
|
+
b("rect", {
|
|
2338
|
+
style: L({
|
|
2339
|
+
transition: "none",
|
|
2340
|
+
opacity: e.from + a >= m.value.start && e.from + a <= m.value.end - 1 ? 1 : 0
|
|
2341
|
+
}),
|
|
2342
|
+
x: c.value.left + c.value.width / R.value * (e.from + a - m.value.start),
|
|
2343
|
+
y: c.value.top,
|
|
2344
|
+
height: c.value.height < 0 ? 10 : c.value.height,
|
|
2345
|
+
width: c.value.width / R.value < 0 ? 1e-5 : c.value.width / R.value,
|
|
2346
|
+
fill: v(Ze)(e.color, e.opacity)
|
|
2347
|
+
}, null, 12, Yu)
|
|
2348
|
+
]))), 256)),
|
|
2349
|
+
(u(!0), i(x, null, C(e.span, (n, a) => (u(), i("g", null, [
|
|
2350
|
+
e.caption.text && a === 0 ? (u(), i("foreignObject", {
|
|
2351
|
+
key: 0,
|
|
2352
|
+
x: c.value.left + c.value.width / R.value * (e.from + a - m.value.start) - (e.caption.width === "auto" ? 0 : e.caption.width / 2 - c.value.width / R.value * e.span / 2),
|
|
2353
|
+
y: c.value.top + e.caption.offsetY,
|
|
2354
|
+
style: L({
|
|
2355
|
+
overflow: "visible",
|
|
2356
|
+
opacity: e.to >= m.value.start && e.from < m.value.end ? 1 : 0
|
|
2357
|
+
}),
|
|
2358
|
+
height: "1",
|
|
2359
|
+
width: e.caption.width === "auto" ? c.value.width / R.value * e.span : e.caption.width
|
|
2360
|
+
}, [
|
|
2361
|
+
b("div", {
|
|
2362
|
+
style: L(`padding:${e.caption.padding}px;text-align:${e.caption.textAlign};font-size:${e.caption.fontSize}px;color:${e.caption.color};font-weight:${e.caption.bold ? "bold" : "normal"}`)
|
|
2363
|
+
}, te(e.caption.text), 5)
|
|
2364
|
+
], 12, Du)) : f("", !0)
|
|
2365
|
+
]))), 256))
|
|
2366
|
+
], 64)) : f("", !0)
|
|
2367
|
+
]))), 256)),
|
|
2368
|
+
Ql.value ? (u(), i("g", Xu, [
|
|
2369
|
+
(u(!0), i(x, null, C(R.value, (e, n) => (u(), i("g", {
|
|
2370
|
+
key: `tooltip_trap_highlighter_${n}`
|
|
2371
|
+
}, [
|
|
2372
|
+
b("rect", {
|
|
2373
|
+
x: c.value.left + c.value.width / R.value * n,
|
|
2374
|
+
y: c.value.top,
|
|
2375
|
+
height: c.value.height < 0 ? 10 : c.value.height,
|
|
2376
|
+
width: c.value.width / R.value < 0 ? 1e-5 : c.value.width / R.value,
|
|
2377
|
+
fill: [T.value, _.value, ze.value].includes(n) ? v(Ze)(t.value.chart.highlighter.color, t.value.chart.highlighter.opacity) : "transparent",
|
|
2378
|
+
style: { transition: "none !important", animation: "none !important" }
|
|
2379
|
+
}, null, 8, Gu)
|
|
2380
|
+
]))), 128))
|
|
2381
|
+
])) : f("", !0),
|
|
2382
|
+
bt.value.length ? (u(!0), i(x, { key: 1 }, C(bt.value, (e, n) => (u(), i("g", {
|
|
2383
|
+
key: `serie_bar_${n}`,
|
|
2384
|
+
class: Ne(`serie_bar_${n}`),
|
|
2385
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2386
|
+
}, [
|
|
2387
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i("g", {
|
|
2388
|
+
key: `bar_plot_${n}_${s}`
|
|
2389
|
+
}, [
|
|
2390
|
+
Ae(a.value) ? (u(), i("rect", {
|
|
2391
|
+
key: 0,
|
|
2392
|
+
x: pl(a) + wl.value / 2,
|
|
2393
|
+
y: y.value.useIndividualScale ? ra(a) : sa(a),
|
|
2394
|
+
height: y.value.useIndividualScale ? Math.abs(ia(a)) : Math.abs(na(a)),
|
|
2395
|
+
width: kl.value - wl.value,
|
|
2396
|
+
rx: t.value.bar.borderRadius,
|
|
2397
|
+
fill: t.value.bar.useGradient ? a.value >= 0 ? `url(#rectGradient_pos_${n}_${X.value})` : `url(#rectGradient_neg_${n}_${X.value})` : e.color,
|
|
2398
|
+
stroke: t.value.bar.border.useSerieColor ? e.color : t.value.bar.border.stroke,
|
|
2399
|
+
"stroke-width": t.value.bar.border.strokeWidth,
|
|
2400
|
+
style: L({ transition: v(B) || !t.value.bar.showTransition ? void 0 : `all ${t.value.bar.transitionDurationMs}ms ease-in-out` })
|
|
2401
|
+
}, null, 12, Uu)) : f("", !0),
|
|
2402
|
+
Ae(a.value) && l.$slots.pattern ? (u(), i("rect", {
|
|
2403
|
+
key: 1,
|
|
2404
|
+
x: pl(a) - wl.value / 2,
|
|
2405
|
+
y: y.value.useIndividualScale ? ra(a) : sa(a),
|
|
2406
|
+
height: y.value.useIndividualScale ? Math.abs(ia(a)) : Math.abs(na(a)),
|
|
2407
|
+
width: kl.value - wl.value,
|
|
2408
|
+
rx: t.value.bar.borderRadius,
|
|
2409
|
+
fill: `url(#pattern_${X.value}_${e.slotAbsoluteIndex})`,
|
|
2410
|
+
stroke: t.value.bar.border.useSerieColor ? e.color : t.value.bar.border.stroke,
|
|
2411
|
+
"stroke-width": t.value.bar.border.strokeWidth,
|
|
2412
|
+
style: L({ transition: v(B) || !t.value.bar.showTransition ? void 0 : `all ${t.value.bar.transitionDurationMs}ms ease-in-out` })
|
|
2413
|
+
}, null, 12, Zu)) : f("", !0),
|
|
2414
|
+
a.comment && t.value.chart.comments.show ? (u(), i("foreignObject", {
|
|
2415
|
+
key: 2,
|
|
2416
|
+
style: { overflow: "visible" },
|
|
2417
|
+
height: "12",
|
|
2418
|
+
width: kl.value / 2 + t.value.chart.comments.width,
|
|
2419
|
+
x: pl(a) - t.value.chart.comments.width / 2 + t.value.chart.comments.offsetX,
|
|
2420
|
+
y: v(E)(a.y) + t.value.chart.comments.offsetY + 6
|
|
2421
|
+
}, [
|
|
2422
|
+
J(l.$slots, "plot-comment", {
|
|
2423
|
+
plot: { ...a, color: e.color, seriesIndex: n, datapointIndex: s }
|
|
2424
|
+
}, void 0, !0)
|
|
2425
|
+
], 8, qu)) : f("", !0)
|
|
2426
|
+
]))), 128)),
|
|
2427
|
+
Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(v(Q)(e.plots).trend) ? (u(), i("g", Ku, [
|
|
2428
|
+
b("defs", null, [
|
|
2429
|
+
b("marker", {
|
|
2430
|
+
id: `bar_arrow_${n}`,
|
|
2431
|
+
markerWidth: 7,
|
|
2432
|
+
markerHeight: 7,
|
|
2433
|
+
refX: "0",
|
|
2434
|
+
refY: 7 / 2,
|
|
2435
|
+
orient: "auto"
|
|
2436
|
+
}, [
|
|
2437
|
+
b("polygon", {
|
|
2438
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
2439
|
+
fill: e.color
|
|
2440
|
+
}, null, 8, Qu)
|
|
2441
|
+
], 8, Ju)
|
|
2442
|
+
]),
|
|
2443
|
+
e.plots.length > 1 ? (u(), i("line", {
|
|
2444
|
+
key: 0,
|
|
2445
|
+
x1: v(Q)(e.plots).x1 + Gt(),
|
|
2446
|
+
x2: v(Q)(e.plots).x2 + Gt(),
|
|
2447
|
+
y1: v(D)(v(Q)(e.plots).y1),
|
|
2448
|
+
y2: v(D)(v(Q)(e.plots).y2),
|
|
2449
|
+
"stroke-width": 1,
|
|
2450
|
+
stroke: e.color,
|
|
2451
|
+
"stroke-dasharray": 2,
|
|
2452
|
+
"marker-end": `url(#bar_arrow_${n})`
|
|
2453
|
+
}, null, 8, ju)) : f("", !0),
|
|
2454
|
+
e.plots.length > 1 ? (u(), i("text", {
|
|
2455
|
+
key: 1,
|
|
2456
|
+
"text-anchor": "middle",
|
|
2457
|
+
x: v(Q)(e.plots).x2 + Gt(),
|
|
2458
|
+
y: v(Q)(e.plots).y2 - 6,
|
|
2459
|
+
"font-size": $.value.plotLabels,
|
|
2460
|
+
fill: e.color
|
|
2461
|
+
}, te(v(Fe)({
|
|
2462
|
+
v: v(Q)(e.plots).trend * 100,
|
|
2463
|
+
s: "%",
|
|
2464
|
+
r: 2
|
|
2465
|
+
})), 9, en)) : f("", !0)
|
|
2466
|
+
])) : f("", !0)
|
|
2467
|
+
], 6))), 128)) : f("", !0),
|
|
2468
|
+
!y.value.useIndividualScale && t.value.chart.grid.labels.zeroLine.show ? (u(), i("line", {
|
|
2469
|
+
key: 2,
|
|
2470
|
+
stroke: t.value.chart.grid.stroke,
|
|
2471
|
+
"stroke-width": "1",
|
|
2472
|
+
x1: c.value.left + j.value,
|
|
2473
|
+
x2: c.value.right - j.value,
|
|
2474
|
+
y1: v(D)(ke.value),
|
|
2475
|
+
y2: v(D)(ke.value),
|
|
2476
|
+
"stroke-linecap": "round",
|
|
2477
|
+
style: { animation: "none !important" }
|
|
2478
|
+
}, null, 8, tn)) : f("", !0),
|
|
2479
|
+
t.value.chart.highlighter.useLine && (![null, void 0].includes(_.value) || ![null, void 0].includes(T.value)) ? (u(), i("g", ln, [
|
|
2480
|
+
b("line", {
|
|
2481
|
+
x1: c.value.left + c.value.width / R.value * ((_.value !== null ? _.value : 0) || (T.value !== null ? T.value : 0)) + c.value.width / R.value / 2,
|
|
2482
|
+
x2: c.value.left + c.value.width / R.value * ((_.value !== null ? _.value : 0) || (T.value !== null ? T.value : 0)) + c.value.width / R.value / 2,
|
|
2483
|
+
y1: v(D)(c.value.top),
|
|
2484
|
+
y2: v(D)(c.value.bottom),
|
|
2485
|
+
stroke: t.value.chart.highlighter.color,
|
|
2486
|
+
"stroke-width": t.value.chart.highlighter.lineWidth,
|
|
2487
|
+
"stroke-dasharray": t.value.chart.highlighter.lineDasharray,
|
|
2488
|
+
"stroke-linecap": "round",
|
|
2489
|
+
style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
|
|
2490
|
+
}, null, 8, an)
|
|
2491
|
+
])) : f("", !0),
|
|
2492
|
+
t.value.chart.grid.frame.show ? (u(), i("rect", {
|
|
2493
|
+
key: 4,
|
|
2494
|
+
style: { pointerEvents: "none", transition: "none", animation: "none !important" },
|
|
2495
|
+
x: c.value.left + j.value < 0 ? 0 : c.value.left + j.value,
|
|
2496
|
+
y: c.value.top,
|
|
2497
|
+
width: c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / R.value) < 0 ? 0 : c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / R.value),
|
|
2498
|
+
height: c.value.height < 0 ? 0 : c.value.height,
|
|
2499
|
+
fill: "transparent",
|
|
2500
|
+
stroke: t.value.chart.grid.frame.stroke,
|
|
2501
|
+
"stroke-width": t.value.chart.grid.frame.strokeWidth,
|
|
2502
|
+
"stroke-linecap": t.value.chart.grid.frame.strokeLinecap,
|
|
2503
|
+
"stroke-linejoin": t.value.chart.grid.frame.strokeLinejoin,
|
|
2504
|
+
"stroke-dasharray": t.value.chart.grid.frame.strokeDasharray
|
|
2505
|
+
}, null, 8, on)) : f("", !0),
|
|
2506
|
+
t.value.chart.grid.labels.show ? (u(), i("g", {
|
|
2507
|
+
key: 5,
|
|
2508
|
+
ref_key: "scaleLabels",
|
|
2509
|
+
ref: q
|
|
2510
|
+
}, [
|
|
2511
|
+
y.value.useIndividualScale ? (u(), i(x, { key: 0 }, [
|
|
2512
|
+
(u(!0), i(x, null, C(ol.value, (e) => (u(), i("g", null, [
|
|
2513
|
+
b("line", {
|
|
2514
|
+
x1: e.x + j.value - c.value.individualOffsetX,
|
|
2515
|
+
x2: e.x + j.value - c.value.individualOffsetX,
|
|
2516
|
+
y1: y.value.isStacked ? v(D)(c.value.bottom - e.yOffset - e.individualHeight) : v(D)(c.value.top),
|
|
2517
|
+
y2: y.value.isStacked ? v(D)(c.value.bottom - e.yOffset) : v(D)(c.value.bottom),
|
|
2518
|
+
stroke: e.color,
|
|
2519
|
+
"stroke-width": t.value.chart.grid.stroke,
|
|
2520
|
+
"stroke-linecap": "round",
|
|
2521
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out; animation: none !important`)
|
|
2522
|
+
}, null, 12, un)
|
|
2523
|
+
]))), 256)),
|
|
2524
|
+
(u(!0), i(x, null, C(ol.value, (e) => (u(), i("g", {
|
|
2525
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2526
|
+
}, [
|
|
2527
|
+
b("text", {
|
|
2528
|
+
fill: e.color,
|
|
2529
|
+
"font-size": $.value.dataLabels * 0.8,
|
|
2530
|
+
"text-anchor": "middle",
|
|
2531
|
+
transform: `translate(${e.x - $.value.dataLabels * 0.8 / 2 + j.value}, ${y.value.isStacked ? c.value.bottom - e.yOffset - e.individualHeight / 2 : c.value.top + c.value.height / 2}) rotate(-90)`
|
|
2532
|
+
}, te(e.name) + " " + te(e.scaleLabel && e.unique && e.scaleLabel !== e.id ? `-
|
|
2533
|
+
${e.scaleLabel}` : ""), 9, nn),
|
|
2534
|
+
(u(!0), i(x, null, C(e.yLabels, (n, a) => (u(), i(x, null, [
|
|
2535
|
+
t.value.chart.grid.labels.yAxis.showCrosshairs ? (u(), i("line", {
|
|
2536
|
+
key: 0,
|
|
2537
|
+
x1: e.x + 3 + j.value - t.value.chart.grid.labels.yAxis.crosshairSize - c.value.individualOffsetX,
|
|
2538
|
+
x2: e.x + j.value - c.value.individualOffsetX,
|
|
2539
|
+
y1: v(D)(n.y),
|
|
2540
|
+
y2: v(D)(n.y),
|
|
2541
|
+
stroke: e.color,
|
|
2542
|
+
"stroke-width": 1,
|
|
2543
|
+
"stroke-linecap": "round",
|
|
2544
|
+
style: { animation: "none !important" }
|
|
2545
|
+
}, null, 8, sn)) : f("", !0)
|
|
2546
|
+
], 64))), 256)),
|
|
2547
|
+
(u(!0), i(x, null, C(e.yLabels, (n, a) => (u(), i("text", {
|
|
2548
|
+
x: e.x - 5 + j.value - c.value.individualOffsetX,
|
|
2549
|
+
y: v(D)(n.y) + $.value.dataLabels / 3,
|
|
2550
|
+
"font-size": $.value.dataLabels,
|
|
2551
|
+
"text-anchor": "end",
|
|
2552
|
+
fill: e.color
|
|
2553
|
+
}, te(v(be)(
|
|
2554
|
+
t.value.chart.grid.labels.yAxis.formatter,
|
|
2555
|
+
n.value,
|
|
2556
|
+
v(Fe)({
|
|
2557
|
+
p: n.prefix,
|
|
2558
|
+
v: n.value,
|
|
2559
|
+
s: n.suffix,
|
|
2560
|
+
r: t.value.chart.grid.labels.yAxis.rounding
|
|
2561
|
+
}),
|
|
2562
|
+
{ datapoint: n.datapoint, seriesIndex: a }
|
|
2563
|
+
)), 9, rn))), 256))
|
|
2564
|
+
], 4))), 256))
|
|
2565
|
+
], 64)) : (u(!0), i(x, { key: 1 }, C(fa.value, (e, n) => (u(), i("g", {
|
|
2566
|
+
key: `yLabel_${n}`
|
|
2567
|
+
}, [
|
|
2568
|
+
Ae(e) && e.value >= Xe.value.min && e.value <= Xe.value.max && t.value.chart.grid.labels.yAxis.showCrosshairs ? (u(), i("line", {
|
|
2569
|
+
key: 0,
|
|
2570
|
+
x1: c.value.left,
|
|
2571
|
+
x2: c.value.left - t.value.chart.grid.labels.yAxis.crosshairSize,
|
|
2572
|
+
y1: v(D)(e.y),
|
|
2573
|
+
y2: v(D)(e.y),
|
|
2574
|
+
stroke: t.value.chart.grid.stroke,
|
|
2575
|
+
"stroke-width": "1",
|
|
2576
|
+
"stroke-linecap": "round",
|
|
2577
|
+
style: { animation: "none !important" }
|
|
2578
|
+
}, null, 8, cn)) : f("", !0),
|
|
2579
|
+
e.value >= Xe.value.min && e.value <= Xe.value.max ? (u(), i("text", {
|
|
2580
|
+
key: 1,
|
|
2581
|
+
x: c.value.scaleLabelX - t.value.chart.grid.labels.yAxis.crosshairSize,
|
|
2582
|
+
y: v(E)(e.y + $.value.dataLabels / 3),
|
|
2583
|
+
"font-size": $.value.dataLabels,
|
|
2584
|
+
"text-anchor": "end",
|
|
2585
|
+
fill: t.value.chart.grid.labels.color
|
|
2586
|
+
}, te(Ae(e.value) ? v(be)(
|
|
2587
|
+
t.value.chart.grid.labels.yAxis.formatter,
|
|
2588
|
+
e.value,
|
|
2589
|
+
v(Fe)({
|
|
2590
|
+
p: e.prefix,
|
|
2591
|
+
v: e.value,
|
|
2592
|
+
s: e.suffix,
|
|
2593
|
+
r: t.value.chart.grid.labels.yAxis.rounding
|
|
2594
|
+
})
|
|
2595
|
+
) : ""), 9, vn)) : f("", !0)
|
|
2596
|
+
]))), 128))
|
|
2597
|
+
], 512)) : f("", !0),
|
|
2598
|
+
(u(!0), i(x, null, C(et.value, (e, n) => (u(), i("g", {
|
|
2599
|
+
key: `serie_plot_${n}`,
|
|
2600
|
+
class: Ne(`serie_plot_${n}`),
|
|
2601
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2602
|
+
}, [
|
|
2603
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i("g", {
|
|
2604
|
+
key: `circle_plot_${n}_${s}`
|
|
2605
|
+
}, [
|
|
2606
|
+
a && Ae(a.value) ? (u(), Be(Ml, {
|
|
2607
|
+
key: 0,
|
|
2608
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
|
|
2609
|
+
color: t.value.plot.useGradient ? `url(#plotGradient_${n}_${X.value})` : t.value.plot.dot.useSerieColor ? e.color : t.value.plot.dot.fill,
|
|
2610
|
+
plot: { x: v(E)(a.x), y: v(E)(a.y) },
|
|
2611
|
+
radius: _.value !== null && _.value === s || T.value !== null && T.value === s ? (Le.value.plot || 6) * 1.5 : Le.value.plot || 6,
|
|
2612
|
+
stroke: t.value.plot.dot.useSerieColor ? t.value.chart.backgroundColor : e.color,
|
|
2613
|
+
strokeWidth: t.value.plot.dot.strokeWidth,
|
|
2614
|
+
transition: v(B) || !t.value.plot.showTransition || _.value !== null && _.value === s || T.value !== null && T.value === s ? void 0 : `all ${t.value.plot.transitionDurationMs}ms ease-in-out`
|
|
2615
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : f("", !0),
|
|
2616
|
+
a.comment && t.value.chart.comments.show ? (u(), i("foreignObject", {
|
|
2617
|
+
key: 1,
|
|
2618
|
+
style: { overflow: "visible" },
|
|
2619
|
+
height: "12",
|
|
2620
|
+
width: t.value.chart.comments.width,
|
|
2621
|
+
x: a.x - t.value.chart.comments.width / 2 + t.value.chart.comments.offsetX,
|
|
2622
|
+
y: a.y + t.value.chart.comments.offsetY + 6
|
|
2623
|
+
}, [
|
|
2624
|
+
b("div", hn, [
|
|
2625
|
+
J(l.$slots, "plot-comment", {
|
|
2626
|
+
plot: { ...a, color: e.color, seriesIndex: n, datapointIndex: s }
|
|
2627
|
+
}, void 0, !0)
|
|
2628
|
+
])
|
|
2629
|
+
], 8, dn)) : f("", !0)
|
|
2630
|
+
]))), 128)),
|
|
2631
|
+
Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(v(Q)(e.plots).trend) ? (u(), i("g", fn, [
|
|
2632
|
+
b("defs", null, [
|
|
2633
|
+
b("marker", {
|
|
2634
|
+
id: `plot_arrow_${n}`,
|
|
2635
|
+
markerWidth: 7,
|
|
2636
|
+
markerHeight: 7,
|
|
2637
|
+
refX: "0",
|
|
2638
|
+
refY: 7 / 2,
|
|
2639
|
+
orient: "auto"
|
|
2640
|
+
}, [
|
|
2641
|
+
b("polygon", {
|
|
2642
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
2643
|
+
fill: e.color
|
|
2644
|
+
}, null, 8, mn)
|
|
2645
|
+
], 8, gn)
|
|
2646
|
+
]),
|
|
2647
|
+
e.plots.length > 1 ? (u(), i("line", {
|
|
2648
|
+
key: 0,
|
|
2649
|
+
x1: v(Q)(e.plots).x1,
|
|
2650
|
+
x2: v(Q)(e.plots).x2,
|
|
2651
|
+
y1: v(D)(v(Q)(e.plots).y1),
|
|
2652
|
+
y2: v(D)(v(Q)(e.plots).y2),
|
|
2653
|
+
"stroke-width": 1,
|
|
2654
|
+
stroke: e.color,
|
|
2655
|
+
"stroke-dasharray": 2,
|
|
2656
|
+
"marker-end": `url(#plot_arrow_${n})`
|
|
2657
|
+
}, null, 8, xn)) : f("", !0),
|
|
2658
|
+
e.plots.length > 1 ? (u(), i("text", {
|
|
2659
|
+
key: 1,
|
|
2660
|
+
"text-anchor": "middle",
|
|
2661
|
+
x: v(Q)(e.plots).x2,
|
|
2662
|
+
y: v(Q)(e.plots).y2 - 6,
|
|
2663
|
+
"font-size": $.value.plotLabels,
|
|
2664
|
+
fill: e.color
|
|
2665
|
+
}, te(v(Fe)({
|
|
2666
|
+
v: v(Q)(e.plots).trend * 100,
|
|
2667
|
+
s: "%",
|
|
2668
|
+
r: 2
|
|
2669
|
+
})), 9, bn)) : f("", !0)
|
|
2670
|
+
])) : f("", !0)
|
|
2671
|
+
], 6))), 128)),
|
|
2672
|
+
(u(!0), i(x, null, C(Ge.value, (e, n) => (u(), i("g", {
|
|
2673
|
+
key: `serie_line_${n}`,
|
|
2674
|
+
class: Ne(`serie_line_${n}`),
|
|
2675
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2676
|
+
}, [
|
|
2677
|
+
e.smooth && e.plots.length > 1 && e.curve ? (u(), i("path", {
|
|
2678
|
+
key: 0,
|
|
2679
|
+
d: `M${e.curve}`,
|
|
2680
|
+
stroke: t.value.chart.backgroundColor,
|
|
2681
|
+
"stroke-width": t.value.line.strokeWidth + 1,
|
|
2682
|
+
"stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
|
|
2683
|
+
fill: "none",
|
|
2684
|
+
style: L({ transition: v(B) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2685
|
+
}, null, 12, pn)) : e.plots.length > 1 && e.straight ? (u(), i("path", {
|
|
2686
|
+
key: 1,
|
|
2687
|
+
d: `M${e.straight}`,
|
|
2688
|
+
stroke: t.value.chart.backgroundColor,
|
|
2689
|
+
"stroke-width": t.value.line.strokeWidth + 1,
|
|
2690
|
+
"stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
|
|
2691
|
+
fill: "none",
|
|
2692
|
+
"stroke-linecap": "round",
|
|
2693
|
+
"stroke-linejoin": "round",
|
|
2694
|
+
style: L({ transition: v(B) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2695
|
+
}, null, 12, yn)) : f("", !0)
|
|
2696
|
+
], 6))), 128)),
|
|
2697
|
+
l.$slots.pattern ? (u(), i("defs", kn, [
|
|
2698
|
+
(u(!0), i(x, null, C(nt.value, (e, n) => J(l.$slots, "pattern", $l({
|
|
2699
|
+
key: `serie_pattern_slot_${n}`
|
|
2700
|
+
}, { ref_for: !0 }, { ...e, seriesIndex: e.slotAbsoluteIndex, patternId: `pattern_${X.value}_${n}` }), void 0, !0)), 128))
|
|
2701
|
+
])) : f("", !0),
|
|
2702
|
+
(u(!0), i(x, null, C(Ge.value, (e, n) => (u(), i("g", {
|
|
2703
|
+
key: `serie_line_${n}`,
|
|
2704
|
+
class: Ne(`serie_line_${n}`),
|
|
2705
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2706
|
+
}, [
|
|
2707
|
+
e.useArea && e.plots.length > 1 ? (u(), i("g", wn, [
|
|
2708
|
+
e.smooth ? (u(!0), i(x, { key: 0 }, C(e.curveAreas, (a, s) => (u(), i(x, { key: s }, [
|
|
2709
|
+
a ? (u(), i("path", {
|
|
2710
|
+
key: 0,
|
|
2711
|
+
d: a,
|
|
2712
|
+
fill: t.value.line.area.useGradient ? `url(#areaGradient_${n}_${X.value})` : v(Ze)(e.color, t.value.line.area.opacity),
|
|
2713
|
+
style: L({ transition: v(B) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2714
|
+
}, null, 12, Sn)) : f("", !0),
|
|
2715
|
+
l.$slots.pattern && a ? (u(), i("path", {
|
|
2716
|
+
key: 1,
|
|
2717
|
+
d: a,
|
|
2718
|
+
fill: `url(#pattern_${X.value}_${e.slotAbsoluteIndex})`,
|
|
2719
|
+
style: L({ transition: v(B) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2720
|
+
}, null, 12, $n)) : f("", !0)
|
|
2721
|
+
], 64))), 128)) : (u(!0), i(x, { key: 1 }, C(e.area.split(";"), (a, s) => (u(), i(x, { key: s }, [
|
|
2722
|
+
a ? (u(), i("path", {
|
|
2723
|
+
key: 0,
|
|
2724
|
+
d: `M${a}Z`,
|
|
2725
|
+
fill: t.value.line.area.useGradient ? `url(#areaGradient_${n}_${X.value})` : v(Ze)(e.color, t.value.line.area.opacity),
|
|
2726
|
+
style: L({ transition: v(B) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2727
|
+
}, null, 12, _n)) : f("", !0),
|
|
2728
|
+
l.$slots.pattern && a ? (u(), i("path", {
|
|
2729
|
+
key: 1,
|
|
2730
|
+
d: `M${a}Z`,
|
|
2731
|
+
fill: `url(#pattern_${X.value}_${e.slotAbsoluteIndex})`,
|
|
2732
|
+
style: L({ transition: v(B) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2733
|
+
}, null, 12, Ln)) : f("", !0)
|
|
2734
|
+
], 64))), 128))
|
|
2735
|
+
])) : f("", !0),
|
|
2736
|
+
e.smooth && e.plots.length > 1 && e.curve ? (u(), i("path", {
|
|
2737
|
+
key: 1,
|
|
2738
|
+
d: `M${e.curve}`,
|
|
2739
|
+
stroke: e.color,
|
|
2740
|
+
"stroke-width": t.value.line.strokeWidth,
|
|
2741
|
+
"stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
|
|
2742
|
+
fill: "none",
|
|
2743
|
+
"stroke-linecap": "round",
|
|
2744
|
+
style: L({ transition: v(B) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2745
|
+
}, null, 12, Mn)) : e.plots.length > 1 && e.straight ? (u(), i("path", {
|
|
2746
|
+
key: 2,
|
|
2747
|
+
d: `M${e.straight}`,
|
|
2748
|
+
stroke: e.color,
|
|
2749
|
+
"stroke-width": t.value.line.strokeWidth,
|
|
2750
|
+
"stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
|
|
2751
|
+
fill: "none",
|
|
2752
|
+
"stroke-linecap": "round",
|
|
2753
|
+
"stroke-linejoin": "round",
|
|
2754
|
+
style: L({ transition: v(B) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2755
|
+
}, null, 12, Cn)) : f("", !0),
|
|
2756
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i(x, {
|
|
2757
|
+
key: `circle_line_${n}_${s}`
|
|
2758
|
+
}, [
|
|
2759
|
+
!da.value.linePlot && a && Ae(a.value) || da.value.linePlot && a && Ae(a.value) && (_.value !== null && _.value === s || T.value !== null && T.value === s) || ma(e.plots, s) ? (u(), Be(Ml, {
|
|
2760
|
+
key: 0,
|
|
2761
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
|
|
2762
|
+
color: t.value.line.useGradient ? `url(#lineGradient_${n}_${X.value})` : t.value.line.dot.useSerieColor ? e.color : t.value.line.dot.fill,
|
|
2763
|
+
plot: { x: v(E)(a.x), y: v(E)(a.y) },
|
|
2764
|
+
radius: _.value !== null && _.value === s || T.value !== null && T.value === s ? (Le.value.line || 6) * 1.5 : (ma(e.plots, s), Le.value.line || 6),
|
|
2765
|
+
stroke: t.value.line.dot.useSerieColor ? t.value.chart.backgroundColor : e.color,
|
|
2766
|
+
strokeWidth: t.value.line.dot.strokeWidth,
|
|
2767
|
+
transition: v(B) || !t.value.line.showTransition || _.value !== null && _.value === s || T.value !== null && T.value === s ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out`
|
|
2768
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : f("", !0),
|
|
2769
|
+
a.comment && t.value.chart.comments.show ? (u(), i("foreignObject", {
|
|
2770
|
+
key: 1,
|
|
2771
|
+
style: { overflow: "visible" },
|
|
2772
|
+
height: "12",
|
|
2773
|
+
width: t.value.chart.comments.width,
|
|
2774
|
+
x: a.x - t.value.chart.comments.width / 2 + t.value.chart.comments.offsetX,
|
|
2775
|
+
y: a.y + t.value.chart.comments.offsetY + 6
|
|
2776
|
+
}, [
|
|
2777
|
+
b("div", An, [
|
|
2778
|
+
J(l.$slots, "plot-comment", {
|
|
2779
|
+
plot: { ...a, color: e.color, seriesIndex: n, datapointIndex: s }
|
|
2780
|
+
}, void 0, !0)
|
|
2781
|
+
])
|
|
2782
|
+
], 8, zn)) : f("", !0)
|
|
2783
|
+
], 64))), 128)),
|
|
2784
|
+
Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(v(Q)(e.plots).trend) ? (u(), i("g", In, [
|
|
2785
|
+
b("defs", null, [
|
|
2786
|
+
b("marker", {
|
|
2787
|
+
id: `line_arrow_${n}`,
|
|
2788
|
+
markerWidth: 7,
|
|
2789
|
+
markerHeight: 7,
|
|
2790
|
+
refX: "0",
|
|
2791
|
+
refY: 7 / 2,
|
|
2792
|
+
orient: "auto"
|
|
2793
|
+
}, [
|
|
2794
|
+
b("polygon", {
|
|
2795
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
2796
|
+
fill: e.color
|
|
2797
|
+
}, null, 8, Nn)
|
|
2798
|
+
], 8, Tn)
|
|
2799
|
+
]),
|
|
2800
|
+
e.plots.length > 1 ? (u(), i("line", {
|
|
2801
|
+
key: 0,
|
|
2802
|
+
x1: v(Q)(e.plots).x1,
|
|
2803
|
+
x2: v(Q)(e.plots).x2,
|
|
2804
|
+
y1: v(D)(v(Q)(e.plots).y1),
|
|
2805
|
+
y2: v(D)(v(Q)(e.plots).y2),
|
|
2806
|
+
"stroke-width": 1,
|
|
2807
|
+
stroke: e.color,
|
|
2808
|
+
"stroke-dasharray": 2,
|
|
2809
|
+
"marker-end": `url(#line_arrow_${n})`
|
|
2810
|
+
}, null, 8, Rn)) : f("", !0),
|
|
2811
|
+
e.plots.length > 1 ? (u(), i("text", {
|
|
2812
|
+
key: 1,
|
|
2813
|
+
"text-anchor": "middle",
|
|
2814
|
+
x: v(Q)(e.plots).x2,
|
|
2815
|
+
y: v(Q)(e.plots).y2 - 6,
|
|
2816
|
+
"font-size": $.value.plotLabels,
|
|
2817
|
+
fill: e.color
|
|
2818
|
+
}, te(v(Fe)({
|
|
2819
|
+
v: v(Q)(e.plots).trend * 100,
|
|
2820
|
+
s: "%",
|
|
2821
|
+
r: 2
|
|
2822
|
+
})), 9, Pn)) : f("", !0)
|
|
2823
|
+
])) : f("", !0)
|
|
2824
|
+
], 6))), 128)),
|
|
2825
|
+
(t.value.bar.labels.show || t.value.bar.serieName.show) && y.value.dataLabels.show ? (u(), i("g", On, [
|
|
2826
|
+
(u(!0), i(x, null, C(bt.value, (e, n) => (u(), i(x, {
|
|
2827
|
+
key: `xLabel_bar_${n}`
|
|
2828
|
+
}, [
|
|
2829
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i(x, {
|
|
2830
|
+
key: `xLabel_bar_${n}_${s}`
|
|
2831
|
+
}, [
|
|
2832
|
+
a && (!Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || _.value !== null && _.value === s || T.value !== null && T.value === s) && t.value.bar.labels.show ? (u(), i("text", {
|
|
2833
|
+
key: 0,
|
|
2834
|
+
x: y.value.useIndividualScale && y.value.isStacked ? a.x + ae.value.line / 2 : pl(a) + Gt() / 2 - yl.value / 2,
|
|
2835
|
+
y: v(E)(a.y) + (a.value >= 0 ? t.value.bar.labels.offsetY : -t.value.bar.labels.offsetY * 3),
|
|
2836
|
+
"text-anchor": "middle",
|
|
2837
|
+
"font-size": $.value.plotLabels,
|
|
2838
|
+
fill: t.value.bar.labels.color,
|
|
2839
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2840
|
+
}, te(Ae(a.value) ? v(be)(
|
|
2841
|
+
t.value.bar.labels.formatter,
|
|
2842
|
+
a.value,
|
|
2843
|
+
v(Fe)({
|
|
2844
|
+
p: e.prefix || t.value.chart.labels.prefix,
|
|
2845
|
+
v: a.value,
|
|
2846
|
+
s: e.suffix || t.value.chart.labels.suffix,
|
|
2847
|
+
r: t.value.bar.labels.rounding
|
|
2848
|
+
}),
|
|
2849
|
+
{
|
|
2850
|
+
datapoint: a,
|
|
2851
|
+
serie: e
|
|
2852
|
+
}
|
|
2853
|
+
) : ""), 13, Hn)) : f("", !0),
|
|
2854
|
+
a && t.value.bar.serieName.show ? (u(), i("text", {
|
|
2855
|
+
key: 1,
|
|
2856
|
+
x: y.value.useIndividualScale && y.value.isStacked ? a.x + ae.value.line / 2 : a.x + Gt() * 1.1,
|
|
2857
|
+
y: a.y + (a.value > 0 ? t.value.bar.serieName.offsetY : -t.value.bar.serieName.offsetY * 3),
|
|
2858
|
+
"text-anchor": "middle",
|
|
2859
|
+
"font-size": $.value.plotLabels,
|
|
2860
|
+
fill: t.value.bar.serieName.useSerieColor ? e.color : t.value.bar.serieName.color,
|
|
2861
|
+
"font-weight": t.value.bar.serieName.bold ? "bold" : "normal",
|
|
2862
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2863
|
+
}, te(t.value.bar.serieName.useAbbreviation ? v(Co)({
|
|
2864
|
+
source: e.name,
|
|
2865
|
+
length: t.value.bar.serieName.abbreviationSize
|
|
2866
|
+
}) : e.name), 13, Vn)) : f("", !0)
|
|
2867
|
+
], 64))), 128))
|
|
2868
|
+
], 64))), 128))
|
|
2869
|
+
])) : f("", !0),
|
|
2870
|
+
t.value.plot.labels.show && y.value.dataLabels.show ? (u(), i("g", En, [
|
|
2871
|
+
(u(!0), i(x, null, C(et.value, (e, n) => (u(), i(x, {
|
|
2872
|
+
key: `xLabel_plot_${n}`
|
|
2873
|
+
}, [
|
|
2874
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i(x, {
|
|
2875
|
+
key: `xLabel_plot_${n}_${s}`
|
|
2876
|
+
}, [
|
|
2877
|
+
a && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || _.value !== null && _.value === s || T.value !== null && T.value === s ? (u(), i("text", {
|
|
2878
|
+
key: 0,
|
|
2879
|
+
x: a.x,
|
|
2880
|
+
y: a.y + t.value.plot.labels.offsetY,
|
|
2881
|
+
"text-anchor": "middle",
|
|
2882
|
+
"font-size": $.value.plotLabels,
|
|
2883
|
+
fill: t.value.plot.labels.color,
|
|
2884
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2885
|
+
}, te(Ae(a.value) ? v(be)(
|
|
2886
|
+
t.value.plot.labels.formatter,
|
|
2887
|
+
a.value,
|
|
2888
|
+
v(Fe)({
|
|
2889
|
+
p: e.prefix || t.value.chart.labels.prefix,
|
|
2890
|
+
v: a.value,
|
|
2891
|
+
s: e.suffix || t.value.chart.labels.suffix,
|
|
2892
|
+
r: t.value.plot.labels.rounding
|
|
2893
|
+
}),
|
|
2894
|
+
{
|
|
2895
|
+
datapoint: a,
|
|
2896
|
+
serie: e
|
|
2897
|
+
}
|
|
2898
|
+
) : ""), 13, Bn)) : f("", !0)
|
|
2899
|
+
], 64))), 128))
|
|
2900
|
+
], 64))), 128))
|
|
2901
|
+
])) : (u(), i("g", Fn, [
|
|
2902
|
+
(u(!0), i(x, null, C(et.value, (e, n) => (u(), i(x, {
|
|
2903
|
+
key: `xLabel_plot_${n}`
|
|
2904
|
+
}, [
|
|
2905
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i(x, {
|
|
2906
|
+
key: `xLabel_plot_${n}_${s}`
|
|
2907
|
+
}, [
|
|
2908
|
+
t.value.plot.tag.followValue ? (u(), i(x, { key: 1 }, [
|
|
2909
|
+
[T.value, _.value, ze.value].includes(s) && e.useTag ? (u(), i("line", {
|
|
2910
|
+
key: 0,
|
|
2911
|
+
class: "vue-ui-xy-tag-plot",
|
|
2912
|
+
x1: c.value.left,
|
|
2913
|
+
x2: c.value.right,
|
|
2914
|
+
y1: a.y,
|
|
2915
|
+
y2: a.y,
|
|
2916
|
+
"stroke-width": 1,
|
|
2917
|
+
"stroke-linecap": "round",
|
|
2918
|
+
"stroke-dasharray": "2",
|
|
2919
|
+
stroke: e.color
|
|
2920
|
+
}, null, 8, Gn)) : f("", !0)
|
|
2921
|
+
], 64)) : (u(), i(x, { key: 0 }, [
|
|
2922
|
+
a && s === 0 && e.useTag && e.useTag === "start" ? (u(), i("foreignObject", {
|
|
2923
|
+
key: 0,
|
|
2924
|
+
x: a.x,
|
|
2925
|
+
y: a.y - 20,
|
|
2926
|
+
height: 24,
|
|
2927
|
+
width: "150",
|
|
2928
|
+
style: L(`overflow: visible; opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2929
|
+
}, [
|
|
2930
|
+
b("div", {
|
|
2931
|
+
style: L(`padding: 3px; background:${v(Ze)(e.color, 80)};color:${v(qe)(e.color)};width:fit-content;font-size:${$.value.plotLabels}px;border-radius: 2px;`),
|
|
2932
|
+
innerHTML: v(be)(
|
|
2933
|
+
t.value.plot.tag.formatter,
|
|
2934
|
+
a.value,
|
|
2935
|
+
e.name,
|
|
2936
|
+
{
|
|
2937
|
+
datapoint: a,
|
|
2938
|
+
seriesIndex: s,
|
|
2939
|
+
serieName: e.name
|
|
2940
|
+
}
|
|
2941
|
+
)
|
|
2942
|
+
}, null, 12, Yn)
|
|
2943
|
+
], 12, Wn)) : f("", !0),
|
|
2944
|
+
a && s === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (u(), i("foreignObject", {
|
|
2945
|
+
key: 1,
|
|
2946
|
+
x: a.x - e.name.length * ($.value.plotLabels / 2),
|
|
2947
|
+
y: a.y - 20,
|
|
2948
|
+
height: 24,
|
|
2949
|
+
width: "150",
|
|
2950
|
+
style: L(`overflow: visible; opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2951
|
+
}, [
|
|
2952
|
+
b("div", {
|
|
2953
|
+
style: L(`padding: 3px; background:${v(Ze)(e.color, 80)};color:${v(qe)(e.color)};width:fit-content;font-size:${$.value.plotLabels}px;border-radius: 2px;`),
|
|
2954
|
+
innerHTML: v(be)(
|
|
2955
|
+
t.value.plot.tag.formatter,
|
|
2956
|
+
a.value,
|
|
2957
|
+
e.name,
|
|
2958
|
+
{
|
|
2959
|
+
datapoint: a,
|
|
2960
|
+
seriesIndex: s,
|
|
2961
|
+
serieName: e.name
|
|
2962
|
+
}
|
|
2963
|
+
)
|
|
2964
|
+
}, null, 12, Xn)
|
|
2965
|
+
], 12, Dn)) : f("", !0)
|
|
2966
|
+
], 64))
|
|
2967
|
+
], 64))), 128))
|
|
2968
|
+
], 64))), 128))
|
|
2969
|
+
])),
|
|
2970
|
+
t.value.line.labels.show && y.value.dataLabels.show ? (u(), i("g", Un, [
|
|
2971
|
+
(u(!0), i(x, null, C(Ge.value, (e, n) => (u(), i(x, {
|
|
2972
|
+
key: `xLabel_line_${n}`
|
|
2973
|
+
}, [
|
|
2974
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i(x, {
|
|
2975
|
+
key: `xLabel_line_${n}_${s}`
|
|
2976
|
+
}, [
|
|
2977
|
+
a && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || _.value !== null && _.value === s || T.value !== null && T.value === s ? (u(), i("text", {
|
|
2978
|
+
key: 0,
|
|
2979
|
+
x: a.x,
|
|
2980
|
+
y: a.y + (a.value >= 0 ? t.value.line.labels.offsetY : -t.value.line.labels.offsetY * 3),
|
|
2981
|
+
"text-anchor": "middle",
|
|
2982
|
+
"font-size": $.value.plotLabels,
|
|
2983
|
+
fill: t.value.line.labels.color,
|
|
2984
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2985
|
+
}, te(Ae(a.value) ? v(be)(
|
|
2986
|
+
t.value.line.labels.formatter,
|
|
2987
|
+
a.value,
|
|
2988
|
+
v(Fe)({
|
|
2989
|
+
p: e.prefix || t.value.chart.labels.prefix,
|
|
2990
|
+
v: a.value,
|
|
2991
|
+
s: e.suffix || t.value.chart.labels.suffix,
|
|
2992
|
+
r: t.value.line.labels.rounding
|
|
2993
|
+
}),
|
|
2994
|
+
{
|
|
2995
|
+
datapoint: a,
|
|
2996
|
+
serie: e
|
|
2997
|
+
}
|
|
2998
|
+
) : ""), 13, Zn)) : f("", !0)
|
|
2999
|
+
], 64))), 128))
|
|
3000
|
+
], 64))), 128))
|
|
3001
|
+
])) : (u(), i("g", qn, [
|
|
3002
|
+
(u(!0), i(x, null, C(Ge.value, (e, n) => (u(), i(x, {
|
|
3003
|
+
key: `xLabel_line_${n}`
|
|
3004
|
+
}, [
|
|
3005
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i(x, {
|
|
3006
|
+
key: `xLabel_line_${n}_${s}`
|
|
3007
|
+
}, [
|
|
3008
|
+
t.value.line.tag.followValue ? (u(), i(x, { key: 1 }, [
|
|
3009
|
+
[T.value, _.value, ze.value].includes(s) && e.useTag ? (u(), i("line", {
|
|
3010
|
+
key: 0,
|
|
3011
|
+
class: "vue-ui-xy-tag-line",
|
|
3012
|
+
x1: c.value.left,
|
|
3013
|
+
x2: c.value.right,
|
|
3014
|
+
y1: a.y,
|
|
3015
|
+
y2: a.y,
|
|
3016
|
+
"stroke-width": 1,
|
|
3017
|
+
"stroke-linecap": "round",
|
|
3018
|
+
"stroke-dasharray": "2",
|
|
3019
|
+
stroke: e.color
|
|
3020
|
+
}, null, 8, ei)) : f("", !0)
|
|
3021
|
+
], 64)) : (u(), i(x, { key: 0 }, [
|
|
3022
|
+
a && s === 0 && e.useTag && e.useTag === "start" ? (u(), i("foreignObject", {
|
|
3023
|
+
key: 0,
|
|
3024
|
+
x: a.x,
|
|
3025
|
+
y: a.y - 20,
|
|
3026
|
+
height: 24,
|
|
3027
|
+
width: "150",
|
|
3028
|
+
style: L(`overflow: visible; opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3029
|
+
}, [
|
|
3030
|
+
b("div", {
|
|
3031
|
+
style: L(`padding: 3px; background:${v(Ze)(e.color, 80)};color:${v(qe)(e.color)};width:fit-content;font-size:${$.value.plotLabels}px;border-radius: 2px;`),
|
|
3032
|
+
innerHTML: v(be)(
|
|
3033
|
+
t.value.line.tag.formatter,
|
|
3034
|
+
a.value,
|
|
3035
|
+
e.name,
|
|
3036
|
+
{
|
|
3037
|
+
datapoint: a,
|
|
3038
|
+
seriesIndex: s,
|
|
3039
|
+
serieName: e.name
|
|
3040
|
+
}
|
|
3041
|
+
)
|
|
3042
|
+
}, null, 12, Jn)
|
|
3043
|
+
], 12, Kn)) : f("", !0),
|
|
3044
|
+
a && s === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (u(), i("foreignObject", {
|
|
3045
|
+
key: 1,
|
|
3046
|
+
x: a.x,
|
|
3047
|
+
y: a.y - 20,
|
|
3048
|
+
height: 24,
|
|
3049
|
+
width: "150",
|
|
3050
|
+
style: L(`overflow: visible; opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3051
|
+
}, [
|
|
3052
|
+
b("div", {
|
|
3053
|
+
style: L(`padding: 3px; background:${v(Ze)(e.color, 80)};color:${v(qe)(e.color)};width:fit-content;font-size:${$.value.plotLabels}px;border-radius: 2px;`),
|
|
3054
|
+
innerHTML: v(be)(
|
|
3055
|
+
t.value.line.tag.formatter,
|
|
3056
|
+
a.value,
|
|
3057
|
+
e.name,
|
|
3058
|
+
{
|
|
3059
|
+
datapoint: a,
|
|
3060
|
+
seriesIndex: s,
|
|
3061
|
+
serieName: e.name
|
|
3062
|
+
}
|
|
3063
|
+
)
|
|
3064
|
+
}, null, 12, jn)
|
|
3065
|
+
], 12, Qn)) : f("", !0)
|
|
3066
|
+
], 64))
|
|
3067
|
+
], 64))), 128))
|
|
3068
|
+
], 64))), 128))
|
|
3069
|
+
])),
|
|
3070
|
+
(u(!0), i(x, null, C(Ge.value, (e, n) => (u(), i(x, {
|
|
3071
|
+
key: `xLabel_line_${n}`
|
|
3072
|
+
}, [
|
|
3073
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i(x, {
|
|
3074
|
+
key: `xLabel_line_${n}_${s}`
|
|
3075
|
+
}, [
|
|
3076
|
+
a && s === 0 && e.showSerieName && e.showSerieName === "start" ? (u(), i("text", {
|
|
3077
|
+
key: 0,
|
|
3078
|
+
x: a.x - $.value.plotLabels,
|
|
3079
|
+
y: a.y,
|
|
3080
|
+
"font-size": $.value.plotLabels,
|
|
3081
|
+
"text-anchor": "end",
|
|
3082
|
+
fill: e.color,
|
|
3083
|
+
innerHTML: v(Ll)({
|
|
3084
|
+
content: e.name,
|
|
3085
|
+
fontSize: $.value.plotLabels,
|
|
3086
|
+
fill: e.color,
|
|
3087
|
+
x: a.x - $.value.plotLabels,
|
|
3088
|
+
y: a.y,
|
|
3089
|
+
maxWords: 2
|
|
3090
|
+
}),
|
|
3091
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3092
|
+
}, null, 12, ti)) : f("", !0),
|
|
3093
|
+
a && s === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (u(), i("text", {
|
|
3094
|
+
key: 1,
|
|
3095
|
+
x: a.x + $.value.plotLabels,
|
|
3096
|
+
y: a.y,
|
|
3097
|
+
"font-size": $.value.plotLabels,
|
|
3098
|
+
"text-anchor": "start",
|
|
3099
|
+
fill: e.color,
|
|
3100
|
+
innerHTML: v(Ll)({
|
|
3101
|
+
content: e.name,
|
|
3102
|
+
fontSize: $.value.plotLabels,
|
|
3103
|
+
fill: e.color,
|
|
3104
|
+
x: a.x + $.value.plotLabels,
|
|
3105
|
+
y: a.y,
|
|
3106
|
+
maxWords: 2
|
|
3107
|
+
}),
|
|
3108
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3109
|
+
}, null, 12, li)) : f("", !0)
|
|
3110
|
+
], 64))), 128))
|
|
3111
|
+
], 64))), 128)),
|
|
3112
|
+
(u(!0), i(x, null, C(et.value, (e, n) => (u(), i(x, {
|
|
3113
|
+
key: `xLabel_plot_${n}`
|
|
3114
|
+
}, [
|
|
3115
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i(x, {
|
|
3116
|
+
key: `xLabel_plot_${n}_${s}`
|
|
3117
|
+
}, [
|
|
3118
|
+
a && s === 0 && e.showSerieName && e.showSerieName === "start" ? (u(), i("text", {
|
|
3119
|
+
key: 0,
|
|
3120
|
+
x: a.x - $.value.plotLabels,
|
|
3121
|
+
y: a.y,
|
|
3122
|
+
"font-size": $.value.plotLabels,
|
|
3123
|
+
"text-anchor": "end",
|
|
3124
|
+
fill: e.color,
|
|
3125
|
+
innerHTML: v(Ll)({
|
|
3126
|
+
content: e.name,
|
|
3127
|
+
fontSize: $.value.plotLabels,
|
|
3128
|
+
fill: e.color,
|
|
3129
|
+
x: a.x - $.value.plotLabels,
|
|
3130
|
+
y: a.y,
|
|
3131
|
+
maxWords: 2
|
|
3132
|
+
}),
|
|
3133
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3134
|
+
}, null, 12, ai)) : f("", !0),
|
|
3135
|
+
a && s === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (u(), i("text", {
|
|
3136
|
+
key: 1,
|
|
3137
|
+
x: a.x + $.value.plotLabels,
|
|
3138
|
+
y: a.y,
|
|
3139
|
+
"font-size": $.value.plotLabels,
|
|
3140
|
+
"text-anchor": "start",
|
|
3141
|
+
fill: e.color,
|
|
3142
|
+
innerHTML: v(Ll)({
|
|
3143
|
+
content: e.name,
|
|
3144
|
+
fontSize: $.value.plotLabels,
|
|
3145
|
+
fill: e.color,
|
|
3146
|
+
x: a.x + $.value.plotLabels,
|
|
3147
|
+
y: a.y,
|
|
3148
|
+
maxWords: 2
|
|
3149
|
+
}),
|
|
3150
|
+
style: L(`opacity:${z.value ? z.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3151
|
+
}, null, 12, oi)) : f("", !0)
|
|
3152
|
+
], 64))), 128))
|
|
3153
|
+
], 64))), 128)),
|
|
3154
|
+
y.value.useIndividualScale && !y.value.isStacked ? (u(), i(x, { key: 12 }, [
|
|
3155
|
+
b("defs", null, [
|
|
3156
|
+
(u(!0), i(x, null, C(ol.value, (e, n) => (u(), i("linearGradient", {
|
|
3157
|
+
id: `individual_scale_gradient_${X.value}_${n}`,
|
|
3158
|
+
x1: "0%",
|
|
3159
|
+
x2: "100%",
|
|
3160
|
+
y1: "0%",
|
|
3161
|
+
y2: "0%"
|
|
3162
|
+
}, [
|
|
3163
|
+
b("stop", {
|
|
3164
|
+
offset: "0%",
|
|
3165
|
+
"stop-color": t.value.chart.backgroundColor,
|
|
3166
|
+
"stop-opacity": "0"
|
|
3167
|
+
}, null, 8, ni),
|
|
3168
|
+
b("stop", {
|
|
3169
|
+
offset: "100%",
|
|
3170
|
+
"stop-color": e.color,
|
|
3171
|
+
"stop-opacity": "0.2"
|
|
3172
|
+
}, null, 8, ii)
|
|
3173
|
+
], 8, ui))), 256))
|
|
3174
|
+
]),
|
|
3175
|
+
(u(!0), i(x, null, C(ol.value, (e, n) => (u(), i("rect", {
|
|
3176
|
+
x: e.x - t.value.chart.grid.labels.yAxis.labelWidth + j.value - c.value.individualOffsetX,
|
|
3177
|
+
y: c.value.top,
|
|
3178
|
+
width: t.value.chart.grid.labels.yAxis.labelWidth + c.value.individualOffsetX,
|
|
3179
|
+
height: c.value.height < 0 ? 10 : c.value.height,
|
|
3180
|
+
fill: z.value === e.groupId ? `url(#individual_scale_gradient_${X.value}_${n})` : "transparent",
|
|
3181
|
+
onMouseenter: (a) => z.value = e.groupId,
|
|
3182
|
+
onMouseleave: r[0] || (r[0] = (a) => z.value = null)
|
|
3183
|
+
}, null, 40, si))), 256))
|
|
3184
|
+
], 64)) : f("", !0),
|
|
3185
|
+
b("g", null, [
|
|
3186
|
+
t.value.chart.grid.labels.axis.yLabel && !y.value.useIndividualScale ? (u(), i("text", {
|
|
3187
|
+
key: 0,
|
|
3188
|
+
ref_key: "yAxisLabel",
|
|
3189
|
+
ref: Vt,
|
|
3190
|
+
"font-size": $.value.yAxis,
|
|
3191
|
+
fill: t.value.chart.grid.labels.color,
|
|
3192
|
+
transform: `translate(${t.value.chart.grid.labels.axis.fontSize}, ${c.value.top + c.value.height / 2}) rotate(-90)`,
|
|
3193
|
+
"text-anchor": "middle",
|
|
3194
|
+
style: { transition: "none" }
|
|
3195
|
+
}, te(t.value.chart.grid.labels.axis.yLabel), 9, ri)) : f("", !0),
|
|
3196
|
+
t.value.chart.grid.labels.axis.xLabel ? (u(), i("text", {
|
|
3197
|
+
key: 1,
|
|
3198
|
+
ref_key: "xAxisLabel",
|
|
3199
|
+
ref: Ht,
|
|
3200
|
+
"text-anchor": "middle",
|
|
3201
|
+
x: ue.value / 2,
|
|
3202
|
+
y: me.value - 3,
|
|
3203
|
+
"font-size": $.value.yAxis,
|
|
3204
|
+
fill: t.value.chart.grid.labels.color
|
|
3205
|
+
}, te(t.value.chart.grid.labels.axis.xLabel), 9, ci)) : f("", !0)
|
|
3206
|
+
]),
|
|
3207
|
+
t.value.chart.grid.labels.xAxisLabels.show ? (u(), i("g", {
|
|
3208
|
+
key: 13,
|
|
3209
|
+
ref_key: "timeLabelsEls",
|
|
3210
|
+
ref: Je
|
|
3211
|
+
}, [
|
|
3212
|
+
l.$slots["time-label"] ? (u(!0), i(x, { key: 0 }, C(Hl.value, (e, n) => J(l.$slots, "time-label", $l({
|
|
3213
|
+
key: `time_label_${n}`,
|
|
3214
|
+
ref_for: !0
|
|
3215
|
+
}, {
|
|
3216
|
+
x: c.value.left + c.value.width / R.value * n + c.value.width / R.value / 2,
|
|
3217
|
+
y: c.value.bottom,
|
|
3218
|
+
fontSize: $.value.xAxis,
|
|
3219
|
+
fill: t.value.chart.grid.labels.xAxisLabels.color,
|
|
3220
|
+
transform: `translate(${c.value.left + c.value.width / R.value * n + c.value.width / R.value / 2}, ${c.value.bottom + $.value.xAxis * 1.3 + t.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${t.value.chart.grid.labels.xAxisLabels.rotation})`,
|
|
3221
|
+
absoluteIndex: e.absoluteIndex,
|
|
3222
|
+
content: e.text,
|
|
3223
|
+
textAnchor: t.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : t.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
3224
|
+
show: e && e.text
|
|
3225
|
+
}), void 0, !0)), 128)) : (u(!0), i(x, { key: 1 }, C(Hl.value, (e, n) => (u(), i("g", {
|
|
3226
|
+
key: `time_label_${n}`
|
|
3227
|
+
}, [
|
|
3228
|
+
e && e.text ? (u(), i(x, { key: 0 }, [
|
|
3229
|
+
String(e.text).includes(`
|
|
3230
|
+
`) ? (u(), i("text", {
|
|
3231
|
+
key: 1,
|
|
3232
|
+
class: "vue-data-ui-time-label",
|
|
3233
|
+
"text-anchor": t.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : t.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
3234
|
+
"font-size": $.value.xAxis,
|
|
3235
|
+
fill: t.value.chart.grid.labels.xAxisLabels.color,
|
|
3236
|
+
transform: `translate(${c.value.left + c.value.width / R.value * n + c.value.width / R.value / 2}, ${c.value.bottom + $.value.xAxis * 1.5}), rotate(${t.value.chart.grid.labels.xAxisLabels.rotation})`,
|
|
3237
|
+
style: L({
|
|
3238
|
+
cursor: Kl() ? "pointer" : "default"
|
|
3239
|
+
}),
|
|
3240
|
+
innerHTML: v(zo)({
|
|
3241
|
+
content: String(e.text),
|
|
3242
|
+
fontSize: $.value.xAxis,
|
|
3243
|
+
fill: t.value.chart.grid.labels.xAxisLabels.color,
|
|
3244
|
+
x: 0,
|
|
3245
|
+
y: 0
|
|
3246
|
+
}),
|
|
3247
|
+
onClick: () => ta(e, n)
|
|
3248
|
+
}, null, 12, di)) : (u(), i("text", {
|
|
3249
|
+
key: 0,
|
|
3250
|
+
class: "vue-data-ui-time-label",
|
|
3251
|
+
"text-anchor": t.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : t.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
3252
|
+
"font-size": $.value.xAxis,
|
|
3253
|
+
fill: t.value.chart.grid.labels.xAxisLabels.color,
|
|
3254
|
+
transform: `translate(${c.value.left + c.value.width / R.value * n + c.value.width / R.value / 2}, ${c.value.bottom + $.value.xAxis * 1.5}), rotate(${t.value.chart.grid.labels.xAxisLabels.rotation})`,
|
|
3255
|
+
style: L({
|
|
3256
|
+
cursor: Kl() ? "pointer" : "default"
|
|
3257
|
+
}),
|
|
3258
|
+
onClick: () => ta(e, n)
|
|
3259
|
+
}, te(e.text || ""), 13, vi))
|
|
3260
|
+
], 64)) : f("", !0)
|
|
3261
|
+
]))), 128))
|
|
3262
|
+
], 512)) : f("", !0),
|
|
3263
|
+
ga.value.length && !y.value.isStacked ? (u(), i("g", hi, [
|
|
3264
|
+
(u(!0), i(x, null, C(ga.value, (e) => (u(), i("g", {
|
|
3265
|
+
key: e.uid
|
|
3266
|
+
}, [
|
|
3267
|
+
e.yTop && e.show && isFinite(e.yTop) ? (u(), i("line", {
|
|
3268
|
+
key: 0,
|
|
3269
|
+
x1: e.x1,
|
|
3270
|
+
y1: e.yTop,
|
|
3271
|
+
x2: e.x2,
|
|
3272
|
+
y2: e.yTop,
|
|
3273
|
+
stroke: e.config.line.stroke,
|
|
3274
|
+
"stroke-width": e.config.line.strokeWidth,
|
|
3275
|
+
"stroke-dasharray": e.config.line.strokeDasharray,
|
|
3276
|
+
"stroke-linecap": "round",
|
|
3277
|
+
style: { animation: "none !important" }
|
|
3278
|
+
}, null, 8, fi)) : f("", !0),
|
|
3279
|
+
e.yBottom && e.show && isFinite(e.yBottom) ? (u(), i("line", {
|
|
3280
|
+
key: 1,
|
|
3281
|
+
x1: e.x1,
|
|
3282
|
+
y1: e.yBottom,
|
|
3283
|
+
x2: e.x2,
|
|
3284
|
+
y2: e.yBottom,
|
|
3285
|
+
stroke: e.config.line.stroke,
|
|
3286
|
+
"stroke-width": e.config.line.strokeWidth,
|
|
3287
|
+
"stroke-dasharray": e.config.line.strokeDasharray,
|
|
3288
|
+
"stroke-linecap": "round",
|
|
3289
|
+
style: { animation: "none !important" }
|
|
3290
|
+
}, null, 8, gi)) : f("", !0),
|
|
3291
|
+
e.hasArea && e.show && isFinite(e.yTop) && isFinite(e.yBottom) ? (u(), i("rect", {
|
|
3292
|
+
key: 2,
|
|
3293
|
+
y: Math.min(e.yTop, e.yBottom),
|
|
3294
|
+
x: e.x1,
|
|
3295
|
+
width: c.value.width,
|
|
3296
|
+
height: v(E)(e.areaHeight, 0),
|
|
3297
|
+
fill: v(Ze)(e.config.area.fill, e.config.area.opacity),
|
|
3298
|
+
style: { animation: "none !important" }
|
|
3299
|
+
}, null, 8, mi)) : f("", !0),
|
|
3300
|
+
e.config.label.text && e.show && isFinite(e._box.y) ? (u(), i("rect", $l({
|
|
3301
|
+
key: 3,
|
|
3302
|
+
class: "vue-ui-xy-annotation-label-box"
|
|
3303
|
+
}, { ref_for: !0 }, e._box, { style: { animation: "none !important", transition: "none !important" } }), null, 16)) : f("", !0),
|
|
3304
|
+
e.config.label.text && e.show && isFinite(e._text.y) ? (u(), i("text", {
|
|
3305
|
+
key: 4,
|
|
3306
|
+
id: e.id,
|
|
3307
|
+
class: "vue-ui-xy-annotation-label",
|
|
3308
|
+
x: e._text.x,
|
|
3309
|
+
y: e._text.y,
|
|
3310
|
+
"font-size": e.config.label.fontSize,
|
|
3311
|
+
fill: e.config.label.color,
|
|
3312
|
+
"text-anchor": e.config.label.textAnchor
|
|
3313
|
+
}, te(e.config.label.text), 9, xi)) : f("", !0)
|
|
3314
|
+
]))), 128))
|
|
3315
|
+
])) : f("", !0),
|
|
3316
|
+
t.value.chart.timeTag.show && (![null, void 0].includes(_.value) || ![null, void 0].includes(T.value)) ? (u(), i("g", bi, [
|
|
3317
|
+
(u(), i("foreignObject", {
|
|
3318
|
+
x: c.value.left + c.value.width / R.value * ((_.value !== null ? _.value : 0) || (T.value !== null ? T.value : 0)) - 100 + c.value.width / R.value / 2,
|
|
3319
|
+
y: c.value.bottom,
|
|
3320
|
+
width: "200",
|
|
3321
|
+
height: "40",
|
|
3322
|
+
style: { overflow: "visible !important" }
|
|
3323
|
+
}, [
|
|
3324
|
+
b("div", {
|
|
3325
|
+
class: "vue-ui-xy-time-tag",
|
|
3326
|
+
style: L(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${t.value.chart.timeTag.backgroundColor};color:${t.value.chart.timeTag.color};font-size:${t.value.chart.timeTag.fontSize}px`)
|
|
3327
|
+
}, te((de.value[(_.value !== null ? _.value : 0) || (T.value !== null ? T.value : 0)] ? de.value[(_.value !== null ? _.value : 0) || (T.value !== null ? T.value : 0)].text : "") || (_.value !== null ? _.value : 0) || (T.value !== null ? T.value : 0)), 5)
|
|
3328
|
+
], 8, pi)),
|
|
3329
|
+
b("circle", {
|
|
3330
|
+
cx: c.value.left + c.value.width / R.value * ((_.value !== null ? _.value : 0) || (T.value !== null ? T.value : 0)) + c.value.width / R.value / 2,
|
|
3331
|
+
cy: c.value.bottom,
|
|
3332
|
+
r: t.value.chart.timeTag.circleMarker.radius,
|
|
3333
|
+
fill: t.value.chart.timeTag.circleMarker.color
|
|
3334
|
+
}, null, 8, yi)
|
|
3335
|
+
])) : f("", !0)
|
|
3336
|
+
])) : f("", !0),
|
|
3337
|
+
xt.value ? (u(), i("rect", it($l({ key: 2 }, Rl.value)), null, 16)) : f("", !0),
|
|
3338
|
+
J(l.$slots, "svg", { svg: gt.value }, void 0, !0)
|
|
3339
|
+
], 512)
|
|
3340
|
+
], 46, du)),
|
|
3341
|
+
l.$slots.watermark ? (u(), i("div", ki, [
|
|
3342
|
+
J(l.$slots, "watermark", it(wt({ isPrinting: v(el) || v(Xl) })), void 0, !0)
|
|
3343
|
+
])) : f("", !0),
|
|
3344
|
+
(u(!0), i(x, null, C(Ge.value, (e, n) => (u(), i(x, {
|
|
3345
|
+
key: `tag_line_${n}`
|
|
3346
|
+
}, [
|
|
3347
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i(x, {
|
|
3348
|
+
key: `tag_line_${n}_${s}`
|
|
3349
|
+
}, [
|
|
3350
|
+
[T.value, _.value, ze.value].includes(s) && e.useTag && e.useTag === "end" && t.value.line.tag.followValue ? (u(), i("div", {
|
|
3351
|
+
key: 0,
|
|
3352
|
+
ref_for: !0,
|
|
3353
|
+
ref: (o) => xl(n, s, o, "right", "line"),
|
|
3354
|
+
class: "vue-ui-xy-tag",
|
|
3355
|
+
"data-tag": "right",
|
|
3356
|
+
style: L({
|
|
3357
|
+
position: "fixed",
|
|
3358
|
+
top: v(St)({
|
|
3359
|
+
svgElement: ye.value,
|
|
3360
|
+
x: c.value.right + t.value.line.tag.fontSize / 1.5,
|
|
3361
|
+
y: a.y,
|
|
3362
|
+
element: He.value[`${n}_${s}_right_line`],
|
|
3363
|
+
position: "right"
|
|
3364
|
+
}).top + "px",
|
|
3365
|
+
left: v(St)({
|
|
3366
|
+
svgElement: ye.value,
|
|
3367
|
+
x: c.value.right + t.value.line.tag.fontSize / 1.5,
|
|
3368
|
+
y: a.y,
|
|
3369
|
+
element: He.value[`${n}_${s}_right_line`],
|
|
3370
|
+
position: "right"
|
|
3371
|
+
}).left + "px",
|
|
3372
|
+
height: "fit-content",
|
|
3373
|
+
width: "fit-content",
|
|
3374
|
+
background: e.color,
|
|
3375
|
+
color: v(qe)(e.color),
|
|
3376
|
+
padding: "0 6px",
|
|
3377
|
+
fontSize: t.value.line.tag.fontSize + "px",
|
|
3378
|
+
opacity: 1
|
|
3379
|
+
})
|
|
3380
|
+
}, [
|
|
3381
|
+
(u(), i("svg", wi, [
|
|
3382
|
+
b("path", {
|
|
3383
|
+
d: "M 0,10 10,0 10,20 Z",
|
|
3384
|
+
fill: e.color,
|
|
3385
|
+
stroke: "none"
|
|
3386
|
+
}, null, 8, Si)
|
|
3387
|
+
])),
|
|
3388
|
+
b("div", {
|
|
3389
|
+
class: "vue-ui-xy-tag-content",
|
|
3390
|
+
innerHTML: v(be)(
|
|
3391
|
+
t.value.line.tag.formatter,
|
|
3392
|
+
a.value,
|
|
3393
|
+
e.name,
|
|
3394
|
+
{
|
|
3395
|
+
datapoint: a,
|
|
3396
|
+
seriesIndex: s,
|
|
3397
|
+
serieName: e.name
|
|
3398
|
+
}
|
|
3399
|
+
)
|
|
3400
|
+
}, null, 8, $i)
|
|
3401
|
+
], 4)) : f("", !0),
|
|
3402
|
+
[T.value, _.value, ze.value].includes(s) && e.useTag && e.useTag === "start" && t.value.line.tag.followValue ? (u(), i("div", {
|
|
3403
|
+
key: 1,
|
|
3404
|
+
ref_for: !0,
|
|
3405
|
+
ref: (o) => xl(n, s, o, "left", "line"),
|
|
3406
|
+
class: "vue-ui-xy-tag",
|
|
3407
|
+
"data-tag": "left",
|
|
3408
|
+
style: L({
|
|
3409
|
+
position: "fixed",
|
|
3410
|
+
top: v(St)({
|
|
3411
|
+
svgElement: ye.value,
|
|
3412
|
+
x: c.value.left - t.value.line.tag.fontSize / 1.5,
|
|
3413
|
+
y: a.y,
|
|
3414
|
+
element: He.value[`${n}_${s}_left_line`],
|
|
3415
|
+
position: "left"
|
|
3416
|
+
}).top + "px",
|
|
3417
|
+
left: v(St)({
|
|
3418
|
+
svgElement: ye.value,
|
|
3419
|
+
x: c.value.left - t.value.line.tag.fontSize / 1.5,
|
|
3420
|
+
y: a.y,
|
|
3421
|
+
element: He.value[`${n}_${s}_left_line`],
|
|
3422
|
+
position: "left"
|
|
3423
|
+
}).left + "px",
|
|
3424
|
+
height: "fit-content",
|
|
3425
|
+
width: "fit-content",
|
|
3426
|
+
background: e.color,
|
|
3427
|
+
color: v(qe)(e.color),
|
|
3428
|
+
padding: "0 6px",
|
|
3429
|
+
fontSize: t.value.line.tag.fontSize + "px",
|
|
3430
|
+
opacity: 1
|
|
3431
|
+
})
|
|
3432
|
+
}, [
|
|
3433
|
+
(u(), i("svg", _i, [
|
|
3434
|
+
b("path", {
|
|
3435
|
+
d: "M 0,0 10,10 0,20 Z",
|
|
3436
|
+
fill: e.color,
|
|
3437
|
+
stroke: "none"
|
|
3438
|
+
}, null, 8, Li)
|
|
3439
|
+
])),
|
|
3440
|
+
b("div", {
|
|
3441
|
+
class: "vue-ui-xy-tag-content",
|
|
3442
|
+
innerHTML: v(be)(
|
|
3443
|
+
t.value.line.tag.formatter,
|
|
3444
|
+
a.value,
|
|
3445
|
+
e.name,
|
|
3446
|
+
{
|
|
3447
|
+
datapoint: a,
|
|
3448
|
+
seriesIndex: s,
|
|
3449
|
+
serieName: e.name
|
|
3450
|
+
}
|
|
3451
|
+
)
|
|
3452
|
+
}, null, 8, Mi)
|
|
3453
|
+
], 4)) : f("", !0)
|
|
3454
|
+
], 64))), 128))
|
|
3455
|
+
], 64))), 128)),
|
|
3456
|
+
(u(!0), i(x, null, C(et.value, (e, n) => (u(), i(x, {
|
|
3457
|
+
key: `tag_plot_${n}`
|
|
3458
|
+
}, [
|
|
3459
|
+
(u(!0), i(x, null, C(e.plots, (a, s) => (u(), i(x, {
|
|
3460
|
+
key: `tag_plot_${n}_${s}`
|
|
3461
|
+
}, [
|
|
3462
|
+
[T.value, _.value, ze.value].includes(s) && e.useTag && e.useTag === "end" && t.value.plot.tag.followValue ? (u(), i("div", {
|
|
3463
|
+
key: 0,
|
|
3464
|
+
ref_for: !0,
|
|
3465
|
+
ref: (o) => xl(n, s, o, "right", "plot"),
|
|
3466
|
+
class: "vue-ui-xy-tag",
|
|
3467
|
+
"data-tag": "right",
|
|
3468
|
+
style: L({
|
|
3469
|
+
position: "fixed",
|
|
3470
|
+
top: v(St)({
|
|
3471
|
+
svgElement: ye.value,
|
|
3472
|
+
x: c.value.right + t.value.plot.tag.fontSize / 1.5,
|
|
3473
|
+
y: a.y,
|
|
3474
|
+
element: He.value[`${n}_${s}_right_plot`],
|
|
3475
|
+
position: "right"
|
|
3476
|
+
}).top + "px",
|
|
3477
|
+
left: v(St)({
|
|
3478
|
+
svgElement: ye.value,
|
|
3479
|
+
x: c.value.right + t.value.plot.tag.fontSize / 1.5,
|
|
3480
|
+
y: a.y,
|
|
3481
|
+
element: He.value[`${n}_${s}_right_plot`],
|
|
3482
|
+
position: "right"
|
|
3483
|
+
}).left + "px",
|
|
3484
|
+
height: "fit-content",
|
|
3485
|
+
width: "fit-content",
|
|
3486
|
+
background: e.color,
|
|
3487
|
+
color: v(qe)(e.color),
|
|
3488
|
+
padding: "0 6px",
|
|
3489
|
+
fontSize: t.value.plot.tag.fontSize + "px",
|
|
3490
|
+
opacity: 1
|
|
3491
|
+
})
|
|
3492
|
+
}, [
|
|
3493
|
+
(u(), i("svg", Ci, [
|
|
3494
|
+
b("path", {
|
|
3495
|
+
d: "M 0,10 10,0 10,20 Z",
|
|
3496
|
+
fill: e.color,
|
|
3497
|
+
stroke: "none"
|
|
3498
|
+
}, null, 8, zi)
|
|
3499
|
+
])),
|
|
3500
|
+
b("div", {
|
|
3501
|
+
class: "vue-ui-xy-tag-content",
|
|
3502
|
+
innerHTML: v(be)(
|
|
3503
|
+
t.value.plot.tag.formatter,
|
|
3504
|
+
a.value,
|
|
3505
|
+
e.name,
|
|
3506
|
+
{
|
|
3507
|
+
datapoint: a,
|
|
3508
|
+
seriesIndex: s,
|
|
3509
|
+
serieName: e.name
|
|
3510
|
+
}
|
|
3511
|
+
)
|
|
3512
|
+
}, null, 8, Ai)
|
|
3513
|
+
], 4)) : f("", !0),
|
|
3514
|
+
[T.value, _.value, ze.value].includes(s) && e.useTag && e.useTag === "start" && t.value.plot.tag.followValue ? (u(), i("div", {
|
|
3515
|
+
key: 1,
|
|
3516
|
+
ref_for: !0,
|
|
3517
|
+
ref: (o) => xl(n, s, o, "left", "plot"),
|
|
3518
|
+
class: "vue-ui-xy-tag",
|
|
3519
|
+
"data-tag": "left",
|
|
3520
|
+
style: L({
|
|
3521
|
+
position: "fixed",
|
|
3522
|
+
top: v(St)({
|
|
3523
|
+
svgElement: ye.value,
|
|
3524
|
+
x: c.value.left - t.value.plot.tag.fontSize / 1.5,
|
|
3525
|
+
y: a.y,
|
|
3526
|
+
element: He.value[`${n}_${s}_left_plot`],
|
|
3527
|
+
position: "left"
|
|
3528
|
+
}).top + "px",
|
|
3529
|
+
left: v(St)({
|
|
3530
|
+
svgElement: ye.value,
|
|
3531
|
+
x: c.value.left - t.value.plot.tag.fontSize / 1.5,
|
|
3532
|
+
y: a.y,
|
|
3533
|
+
element: He.value[`${n}_${s}_left_plot`],
|
|
3534
|
+
position: "left"
|
|
3535
|
+
}).left + "px",
|
|
3536
|
+
height: "fit-content",
|
|
3537
|
+
width: "fit-content",
|
|
3538
|
+
background: e.color,
|
|
3539
|
+
color: v(qe)(e.color),
|
|
3540
|
+
padding: "0 6px",
|
|
3541
|
+
fontSize: t.value.plot.tag.fontSize + "px",
|
|
3542
|
+
opacity: 1
|
|
3543
|
+
})
|
|
3544
|
+
}, [
|
|
3545
|
+
(u(), i("svg", Ii, [
|
|
3546
|
+
b("path", {
|
|
3547
|
+
d: "M 0,0 10,10 0,20 Z",
|
|
3548
|
+
fill: e.color,
|
|
3549
|
+
stroke: "none"
|
|
3550
|
+
}, null, 8, Ti)
|
|
3551
|
+
])),
|
|
3552
|
+
b("div", {
|
|
3553
|
+
class: "vue-ui-xy-tag-content",
|
|
3554
|
+
innerHTML: v(be)(
|
|
3555
|
+
t.value.plot.tag.formatter,
|
|
3556
|
+
a.value,
|
|
3557
|
+
e.name,
|
|
3558
|
+
{
|
|
3559
|
+
datapoint: a,
|
|
3560
|
+
seriesIndex: s,
|
|
3561
|
+
serieName: e.name
|
|
3562
|
+
}
|
|
3563
|
+
)
|
|
3564
|
+
}, null, 8, Ni)
|
|
3565
|
+
], 4)) : f("", !0)
|
|
3566
|
+
], 64))), 128))
|
|
3567
|
+
], 64))), 128)),
|
|
3568
|
+
t.value.chart.zoom.preview.enable ? (u(), i(x, { key: 5 }, [
|
|
3569
|
+
t.value.chart.zoom.show && w.value > 6 && Qe.value ? (u(), Be(ru, {
|
|
3570
|
+
ref_key: "chartSlicer",
|
|
3571
|
+
ref: Ce,
|
|
3572
|
+
key: `slicer_${pe.value}`,
|
|
3573
|
+
background: t.value.chart.zoom.color,
|
|
3574
|
+
fontSize: t.value.chart.zoom.fontSize,
|
|
3575
|
+
useResetSlot: t.value.chart.zoom.useResetSlot,
|
|
3576
|
+
labelLeft: de.value[0] ? de.value[0].text : "",
|
|
3577
|
+
labelRight: de.value.at(-1) ? de.value.at(-1).text : "",
|
|
3578
|
+
textColor: t.value.chart.color,
|
|
3579
|
+
inputColor: t.value.chart.zoom.color,
|
|
3580
|
+
selectColor: t.value.chart.zoom.highlightColor,
|
|
3581
|
+
borderColor: t.value.chart.backgroundColor,
|
|
3582
|
+
minimap: ha.value,
|
|
3583
|
+
smoothMinimap: t.value.chart.zoom.minimap.smooth,
|
|
3584
|
+
minimapSelectedColor: t.value.chart.zoom.minimap.selectedColor,
|
|
3585
|
+
minimapSelectionRadius: t.value.chart.zoom.minimap.selectionRadius,
|
|
3586
|
+
minimapLineColor: t.value.chart.zoom.minimap.lineColor,
|
|
3587
|
+
minimapSelectedColorOpacity: t.value.chart.zoom.minimap.selectedColorOpacity,
|
|
3588
|
+
minimapSelectedIndex: _.value,
|
|
3589
|
+
minimapIndicatorColor: t.value.chart.zoom.minimap.indicatorColor,
|
|
3590
|
+
verticalHandles: t.value.chart.zoom.minimap.verticalHandles,
|
|
3591
|
+
max: w.value,
|
|
3592
|
+
min: 0,
|
|
3593
|
+
valueStart: m.value.start,
|
|
3594
|
+
valueEnd: m.value.end,
|
|
3595
|
+
start: m.value.start,
|
|
3596
|
+
"onUpdate:start": r[1] || (r[1] = (e) => m.value.start = e),
|
|
3597
|
+
end: m.value.end,
|
|
3598
|
+
"onUpdate:end": r[2] || (r[2] = (e) => m.value.end = e),
|
|
3599
|
+
refreshStartPoint: t.value.chart.zoom.startIndex !== null ? t.value.chart.zoom.startIndex : 0,
|
|
3600
|
+
refreshEndPoint: t.value.chart.zoom.endIndex !== null ? t.value.chart.zoom.endIndex + 1 : Math.max(...I.dataset.map((e) => v(Ue)({ data: e.series, threshold: t.value.downsample.threshold }).length)),
|
|
3601
|
+
enableRangeHandles: t.value.chart.zoom.enableRangeHandles,
|
|
3602
|
+
enableSelectionDrag: t.value.chart.zoom.enableSelectionDrag,
|
|
3603
|
+
onReset: oa,
|
|
3604
|
+
onTrapMouse: la,
|
|
3605
|
+
onFutureStart: r[3] || (r[3] = (e) => fl("start", e)),
|
|
3606
|
+
onFutureEnd: r[4] || (r[4] = (e) => fl("end", e)),
|
|
3607
|
+
timeLabels: ea.value,
|
|
3608
|
+
isPreview: xt.value
|
|
3609
|
+
}, {
|
|
3610
|
+
"reset-action": ge(({ reset: e }) => [
|
|
3611
|
+
J(l.$slots, "reset-action", it(wt({ reset: e })), void 0, !0)
|
|
3612
|
+
]),
|
|
3613
|
+
_: 3
|
|
3614
|
+
}, 8, ["background", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "borderColor", "minimap", "smoothMinimap", "minimapSelectedColor", "minimapSelectionRadius", "minimapLineColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapIndicatorColor", "verticalHandles", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag", "timeLabels", "isPreview"])) : f("", !0)
|
|
3615
|
+
], 64)) : (u(), i(x, { key: 6 }, [
|
|
3616
|
+
t.value.chart.zoom.show && w.value > 6 && Qe.value ? (u(), Be(Fo, {
|
|
3617
|
+
ref_key: "chartSlicer",
|
|
3618
|
+
ref: Ce,
|
|
3619
|
+
key: `slicer_${pe.value}`,
|
|
3620
|
+
background: t.value.chart.zoom.color,
|
|
3621
|
+
fontSize: t.value.chart.zoom.fontSize,
|
|
3622
|
+
useResetSlot: t.value.chart.zoom.useResetSlot,
|
|
3623
|
+
labelLeft: de.value[0] ? de.value[0].text : "",
|
|
3624
|
+
labelRight: de.value.at(-1) ? de.value.at(-1).text : "",
|
|
3625
|
+
textColor: t.value.chart.color,
|
|
3626
|
+
inputColor: t.value.chart.zoom.color,
|
|
3627
|
+
selectColor: t.value.chart.zoom.highlightColor,
|
|
3628
|
+
borderColor: t.value.chart.backgroundColor,
|
|
3629
|
+
minimap: ha.value,
|
|
3630
|
+
smoothMinimap: t.value.chart.zoom.minimap.smooth,
|
|
3631
|
+
minimapSelectedColor: t.value.chart.zoom.minimap.selectedColor,
|
|
3632
|
+
minimapSelectionRadius: t.value.chart.zoom.minimap.selectionRadius,
|
|
3633
|
+
minimapLineColor: t.value.chart.zoom.minimap.lineColor,
|
|
3634
|
+
minimapSelectedColorOpacity: t.value.chart.zoom.minimap.selectedColorOpacity,
|
|
3635
|
+
minimapSelectedIndex: _.value,
|
|
3636
|
+
minimapIndicatorColor: t.value.chart.zoom.minimap.indicatorColor,
|
|
3637
|
+
verticalHandles: t.value.chart.zoom.minimap.verticalHandles,
|
|
3638
|
+
max: w.value,
|
|
3639
|
+
min: 0,
|
|
3640
|
+
valueStart: m.value.start,
|
|
3641
|
+
valueEnd: m.value.end,
|
|
3642
|
+
start: m.value.start,
|
|
3643
|
+
"onUpdate:start": r[5] || (r[5] = (e) => m.value.start = e),
|
|
3644
|
+
end: m.value.end,
|
|
3645
|
+
"onUpdate:end": r[6] || (r[6] = (e) => m.value.end = e),
|
|
3646
|
+
refreshStartPoint: t.value.chart.zoom.startIndex !== null ? t.value.chart.zoom.startIndex : 0,
|
|
3647
|
+
refreshEndPoint: t.value.chart.zoom.endIndex !== null ? t.value.chart.zoom.endIndex + 1 : Math.max(...I.dataset.map((e) => v(Ue)({ data: e.series, threshold: t.value.downsample.threshold }).length)),
|
|
3648
|
+
enableRangeHandles: t.value.chart.zoom.enableRangeHandles,
|
|
3649
|
+
enableSelectionDrag: t.value.chart.zoom.enableSelectionDrag,
|
|
3650
|
+
onReset: oa,
|
|
3651
|
+
onTrapMouse: la
|
|
3652
|
+
}, {
|
|
3653
|
+
"reset-action": ge(({ reset: e }) => [
|
|
3654
|
+
J(l.$slots, "reset-action", it(wt({ reset: e })), void 0, !0)
|
|
3655
|
+
]),
|
|
3656
|
+
_: 3
|
|
3657
|
+
}, 8, ["background", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "borderColor", "minimap", "smoothMinimap", "minimapSelectedColor", "minimapSelectionRadius", "minimapLineColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapIndicatorColor", "verticalHandles", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : f("", !0)
|
|
3658
|
+
], 64)),
|
|
3659
|
+
b("div", {
|
|
3660
|
+
id: `legend-bottom-${X.value}`
|
|
3661
|
+
}, null, 8, Ri),
|
|
3662
|
+
hl.value ? (u(), Be(go, {
|
|
3663
|
+
key: 7,
|
|
3664
|
+
to: t.value.chart.legend.position === "top" ? `#legend-top-${X.value}` : `#legend-bottom-${X.value}`
|
|
3665
|
+
}, [
|
|
3666
|
+
t.value.chart.legend.show ? (u(), i("div", {
|
|
3667
|
+
key: 0,
|
|
3668
|
+
ref_key: "chartLegend",
|
|
3669
|
+
ref: ct,
|
|
3670
|
+
class: "vue-ui-xy-legend",
|
|
3671
|
+
style: L(`font-size:${t.value.chart.legend.fontSize}px`)
|
|
3672
|
+
}, [
|
|
3673
|
+
(u(!0), i(x, null, C(je.value, (e, n) => (u(), i("div", {
|
|
3674
|
+
key: `div_legend_item_${n}`,
|
|
3675
|
+
onClick: (a) => va(e),
|
|
3676
|
+
class: Ne({ "vue-ui-xy-legend-item-alone": je.value.length === 1, "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": le.value.includes(e.id) })
|
|
3677
|
+
}, [
|
|
3678
|
+
ht.value[e.type] === "line" ? (u(), i("svg", Oi, [
|
|
3679
|
+
b("rect", {
|
|
3680
|
+
x: "0",
|
|
3681
|
+
y: "7.5",
|
|
3682
|
+
rx: "1.5",
|
|
3683
|
+
stroke: t.value.chart.backgroundColor,
|
|
3684
|
+
"stroke-width": 0.5,
|
|
3685
|
+
height: "3",
|
|
3686
|
+
width: "20",
|
|
3687
|
+
fill: e.color
|
|
3688
|
+
}, null, 8, Hi),
|
|
3689
|
+
qt(Ml, {
|
|
3690
|
+
plot: { x: 10, y: 9 },
|
|
3691
|
+
radius: 4,
|
|
3692
|
+
color: e.color,
|
|
3693
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
|
|
3694
|
+
stroke: t.value.chart.backgroundColor,
|
|
3695
|
+
strokeWidth: 0.5
|
|
3696
|
+
}, null, 8, ["color", "shape", "stroke"])
|
|
3697
|
+
])) : ht.value[e.type] === "bar" ? (u(), i("svg", Vi, [
|
|
3698
|
+
ht.value[e.type] === "bar" && l.$slots.pattern ? (u(), i("rect", {
|
|
3699
|
+
key: 0,
|
|
3700
|
+
x: "0",
|
|
3701
|
+
y: "0",
|
|
3702
|
+
rx: "1",
|
|
3703
|
+
height: "40",
|
|
3704
|
+
width: "40",
|
|
3705
|
+
stroke: "none",
|
|
3706
|
+
fill: e.color
|
|
3707
|
+
}, null, 8, Ei)) : f("", !0),
|
|
3708
|
+
ht.value[e.type] === "bar" ? (u(), i("rect", {
|
|
3709
|
+
key: 1,
|
|
3710
|
+
x: "0",
|
|
3711
|
+
y: "0",
|
|
3712
|
+
rx: "1",
|
|
3713
|
+
height: "40",
|
|
3714
|
+
width: "40",
|
|
3715
|
+
stroke: "none",
|
|
3716
|
+
fill: l.$slots.pattern ? `url(#pattern_${X.value}_${e.slotAbsoluteIndex})` : e.color
|
|
3717
|
+
}, null, 8, Bi)) : f("", !0)
|
|
3718
|
+
])) : (u(), i("svg", Fi, [
|
|
3719
|
+
qt(Ml, {
|
|
3720
|
+
plot: { x: 6, y: 6 },
|
|
3721
|
+
radius: 5,
|
|
3722
|
+
color: e.color,
|
|
3723
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle"
|
|
3724
|
+
}, null, 8, ["color", "shape"])
|
|
3725
|
+
])),
|
|
3726
|
+
b("span", {
|
|
3727
|
+
style: L(`color:${t.value.chart.legend.color}`)
|
|
3728
|
+
}, te(e.name), 5)
|
|
3729
|
+
], 10, Pi))), 128))
|
|
3730
|
+
], 4)) : (u(), i("div", {
|
|
3731
|
+
key: 1,
|
|
3732
|
+
ref_key: "chartLegend",
|
|
3733
|
+
ref: ct
|
|
3734
|
+
}, [
|
|
3735
|
+
J(l.$slots, "legend", { legend: je.value }, void 0, !0)
|
|
3736
|
+
], 512))
|
|
3737
|
+
], 8, ["to"])) : f("", !0),
|
|
3738
|
+
l.$slots.source ? (u(), i("div", {
|
|
3739
|
+
key: 8,
|
|
3740
|
+
ref_key: "source",
|
|
3741
|
+
ref: _t,
|
|
3742
|
+
dir: "auto"
|
|
3743
|
+
}, [
|
|
3744
|
+
J(l.$slots, "source", {}, void 0, !0)
|
|
3745
|
+
], 512)) : f("", !0),
|
|
3746
|
+
qt(v(ve), {
|
|
3747
|
+
show: y.value.showTooltip && Et.value,
|
|
3748
|
+
backgroundColor: t.value.chart.tooltip.backgroundColor,
|
|
3749
|
+
color: t.value.chart.tooltip.color,
|
|
3750
|
+
fontSize: t.value.chart.tooltip.fontSize,
|
|
3751
|
+
borderRadius: t.value.chart.tooltip.borderRadius,
|
|
3752
|
+
borderColor: t.value.chart.tooltip.borderColor,
|
|
3753
|
+
borderWidth: t.value.chart.tooltip.borderWidth,
|
|
3754
|
+
backgroundOpacity: t.value.chart.tooltip.backgroundOpacity,
|
|
3755
|
+
position: t.value.chart.tooltip.position,
|
|
3756
|
+
offsetY: t.value.chart.tooltip.offsetY,
|
|
3757
|
+
parent: l.$refs.chart,
|
|
3758
|
+
content: uo.value,
|
|
3759
|
+
isFullscreen: ut.value,
|
|
3760
|
+
isCustom: t.value.chart.tooltip.customFormat && typeof t.value.chart.tooltip.customFormat == "function",
|
|
3761
|
+
smooth: t.value.chart.tooltip.smooth,
|
|
3762
|
+
backdropFilter: t.value.chart.tooltip.backdropFilter
|
|
3763
|
+
}, {
|
|
3764
|
+
"tooltip-before": ge(() => [
|
|
3765
|
+
J(l.$slots, "tooltip-before", it(wt({ ...xa.value })), void 0, !0)
|
|
3766
|
+
]),
|
|
3767
|
+
"tooltip-after": ge(() => [
|
|
3768
|
+
J(l.$slots, "tooltip-after", it(wt({ ...xa.value })), void 0, !0)
|
|
3769
|
+
]),
|
|
3770
|
+
_: 3
|
|
3771
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
|
|
3772
|
+
Qe.value ? (u(), Be(v(Pt), {
|
|
3773
|
+
key: 9,
|
|
3774
|
+
hideDetails: "",
|
|
3775
|
+
config: {
|
|
3776
|
+
open: y.value.showTable,
|
|
3777
|
+
maxHeight: 1e4,
|
|
3778
|
+
body: {
|
|
3779
|
+
backgroundColor: t.value.chart.backgroundColor,
|
|
3780
|
+
color: t.value.chart.color
|
|
3781
|
+
},
|
|
3782
|
+
head: {
|
|
3783
|
+
backgroundColor: t.value.chart.backgroundColor,
|
|
3784
|
+
color: t.value.chart.color
|
|
3785
|
+
}
|
|
3786
|
+
}
|
|
3787
|
+
}, {
|
|
3788
|
+
content: ge(() => [
|
|
3789
|
+
b("div", {
|
|
3790
|
+
style: L(`${v(el) ? "" : "max-height:400px"};overflow:auto;width:100%;margin-top:48px`)
|
|
3791
|
+
}, [
|
|
3792
|
+
b("div", Wi, [
|
|
3793
|
+
Yl(b("input", {
|
|
3794
|
+
type: "checkbox",
|
|
3795
|
+
"onUpdate:modelValue": r[7] || (r[7] = (e) => _e.value = e)
|
|
3796
|
+
}, null, 512), [
|
|
3797
|
+
[mo, _e.value]
|
|
3798
|
+
]),
|
|
3799
|
+
b("div", {
|
|
3800
|
+
onClick: r[8] || (r[8] = (e) => _e.value = !_e.value),
|
|
3801
|
+
style: { cursor: "pointer" }
|
|
3802
|
+
}, [
|
|
3803
|
+
qt(v($t), {
|
|
3804
|
+
name: "chartLine",
|
|
3805
|
+
size: 20,
|
|
3806
|
+
stroke: t.value.chart.color
|
|
3807
|
+
}, null, 8, ["stroke"])
|
|
3808
|
+
])
|
|
3809
|
+
]),
|
|
3810
|
+
_e.value ? (u(), Be(v(Jt), {
|
|
3811
|
+
key: `sparkline_${Oe.value}`,
|
|
3812
|
+
dataset: lo.value,
|
|
3813
|
+
config: ao.value
|
|
3814
|
+
}, null, 8, ["dataset", "config"])) : (u(), Be(v(Re), {
|
|
3815
|
+
key: `table_${dl.value}`,
|
|
3816
|
+
colNames: Sl.value.colNames,
|
|
3817
|
+
head: Sl.value.head,
|
|
3818
|
+
body: Sl.value.body,
|
|
3819
|
+
config: Sl.value.config,
|
|
3820
|
+
title: `${t.value.chart.title.text}${t.value.chart.title.subtitle.text ? ` : ${t.value.chart.title.subtitle.text}` : ""}`,
|
|
3821
|
+
onClose: r[9] || (r[9] = (e) => y.value.showTable = !1)
|
|
3822
|
+
}, {
|
|
3823
|
+
th: ge(({ th: e }) => [
|
|
3824
|
+
b("div", { innerHTML: e }, null, 8, Yi)
|
|
3825
|
+
]),
|
|
3826
|
+
td: ge(({ td: e }) => [
|
|
3827
|
+
xo(te(isNaN(Number(e)) ? e : v(Fe)({
|
|
3828
|
+
p: t.value.chart.labels.prefix,
|
|
3829
|
+
v: e,
|
|
3830
|
+
s: t.value.chart.labels.suffix,
|
|
3831
|
+
r: t.value.table.rounding
|
|
3832
|
+
})), 1)
|
|
3833
|
+
]),
|
|
3834
|
+
_: 1
|
|
3835
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
3836
|
+
], 4)
|
|
3837
|
+
]),
|
|
3838
|
+
_: 1
|
|
3839
|
+
}, 8, ["config"])) : f("", !0),
|
|
3840
|
+
v(B) ? (u(), Be(Ho, { key: 10 })) : f("", !0)
|
|
3841
|
+
], 46, cu));
|
|
3842
|
+
}
|
|
3843
|
+
}, us = /* @__PURE__ */ Oa(Di, [["__scopeId", "data-v-c149fe00"]]);
|
|
3844
|
+
export {
|
|
3845
|
+
us as default
|
|
3846
|
+
};
|