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