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