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