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