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