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