vue-data-ui 3.0.0-next.3 → 3.0.0-next.30
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/README.md +1 -1
- package/dist/{Arrow-C8ztMhxn.js → Arrow-gZkDqarC.js} +1 -1
- package/dist/{BaseDraggableDialog-DoA1cXmQ.js → BaseDraggableDialog-Cx7MDUn7.js} +2 -2
- package/dist/{BaseIcon-TJm1JI2f.js → BaseIcon-DEGIw8ne.js} +1 -1
- package/dist/{useLoading-Bt5Doa8m.js → BaseScanner-DIK2NTdp.js} +11 -11
- package/dist/{ColorPicker-DwhabPvD.js → ColorPicker-dVo9qgIk.js} +2 -2
- package/dist/{DataTable-DObwKftY.js → DataTable-DjL9vVfm.js} +2 -2
- package/dist/{Legend-C-EDWcHp.js → Legend-DNs8ZSxL.js} +2 -2
- package/dist/{NonSvgPenAndPaper-Cmy4Opaq.js → NonSvgPenAndPaper-Bmu00306.js} +3 -3
- package/dist/{PackageVersion-B_SVQo0g.js → PackageVersion-SqC1iXfO.js} +1 -1
- package/dist/{PenAndPaper-CFbTGuB_.js → PenAndPaper-C1bF0gIz.js} +3 -3
- package/dist/{Shape-DGduPk8q.js → Shape-CNmKltYG.js} +1 -1
- package/dist/{Slicer-VumiAmDi.js → Slicer-DYffOkSj.js} +2 -2
- package/dist/{SparkTooltip-DrRmoIkR.js → SparkTooltip-BuPeepCP.js} +7 -7
- package/dist/{Title-Dahu_Ia-.js → Title-B21jaJ0n.js} +1 -1
- package/dist/{Tooltip-j8grOyYT.js → Tooltip-C4HWh3fx.js} +1 -1
- package/dist/{UserOptions-BOIQ8NtD.js → UserOptions-DQDPN9YO.js} +2 -2
- package/dist/{dom-to-png-00aHI4Vj.js → dom-to-png-Z16yk8O6.js} +1 -1
- package/dist/{img-DFeNRkbq.js → img-UQKhhbxb.js} +1 -1
- package/dist/{index-DKjAxJY6.js → index-Bxh2efzz.js} +1298 -1180
- package/dist/{pdf-COmwjbLG.js → pdf-D2K9GCDq.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +140 -15
- package/dist/types/vue-data-ui.d.ts +140 -15
- package/dist/{useNestedProp-Cmx8ApWu.js → useNestedProp-BGEUK51b.js} +1 -1
- package/dist/{usePrinter-BefhLUKK.js → usePrinter-CfB_poc_.js} +2 -2
- package/dist/useTimeLabelCollider-V7AOiPLB.js +71 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DFkUfjfs.js} +211 -152
- package/dist/{vue-data-ui-kdcEQgS0.js → vue-data-ui-Em_nyncZ.js} +80 -74
- package/dist/vue-data-ui.js +58 -56
- package/dist/{vue-ui-3d-bar-Lv9eoXpT.js → vue-ui-3d-bar-KFXQhCpk.js} +6 -6
- package/dist/{vue-ui-accordion-BhrF0D_h.js → vue-ui-accordion-CXj3OfMj.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DN94DM1L.js → vue-ui-age-pyramid-Bygd_6Lj.js} +6 -6
- package/dist/{vue-ui-annotator-D-YFzFco.js → vue-ui-annotator-CaxhGvw9.js} +2 -2
- package/dist/{vue-ui-bullet--c-hIC1J.js → vue-ui-bullet-xsVzeIGY.js} +7 -7
- package/dist/vue-ui-candlestick-DT3NblSj.js +989 -0
- package/dist/{vue-ui-carousel-table-Bg4_nEqO.js → vue-ui-carousel-table-Bj6Blcps.js} +4 -4
- package/dist/{vue-ui-chestnut-D9BP8n-D.js → vue-ui-chestnut-Bzi7pvOQ.js} +5 -5
- package/dist/{vue-ui-chord-DDa4TTtv.js → vue-ui-chord-SN0lkfJI.js} +8 -8
- package/dist/{vue-ui-circle-pack-DWxEHCSN.js → vue-ui-circle-pack-BwH7JGeH.js} +26 -26
- package/dist/{vue-ui-cursor-BtLD4k-n.js → vue-ui-cursor-BLHqKKuQ.js} +2 -2
- package/dist/{vue-ui-dashboard-DvyNEYA8.js → vue-ui-dashboard-C5ye3aO2.js} +62 -62
- package/dist/{vue-ui-digits-XkSs-Fvw.js → vue-ui-digits-fWW_yCiA.js} +2 -2
- package/dist/{vue-ui-donut-BO2QuXBj.js → vue-ui-donut-VI_2cil0.js} +405 -380
- package/dist/vue-ui-donut-evolution-BMDGbLPk.js +1072 -0
- package/dist/{vue-ui-dumbbell-jtJmPKky.js → vue-ui-dumbbell-DYVwpQdP.js} +7 -7
- package/dist/{vue-ui-flow-D1hSlRXa.js → vue-ui-flow-BP3lwS2c.js} +7 -7
- package/dist/{vue-ui-funnel-BlLlAOtx.js → vue-ui-funnel-C2gKEJrg.js} +6 -6
- package/dist/{vue-ui-galaxy-BZAhXSnB.js → vue-ui-galaxy-CHu9EpUI.js} +5 -5
- package/dist/{vue-ui-gauge-FdnYVol9.js → vue-ui-gauge-DXoBEk4e.js} +6 -6
- package/dist/{vue-ui-gizmo-BXiMNDNp.js → vue-ui-gizmo-DpWaeVxb.js} +3 -3
- package/dist/{vue-ui-heatmap-BUmZvmK0.js → vue-ui-heatmap-C6Xh5fmd.js} +7 -7
- package/dist/{vue-ui-history-plot-CTT0NO2g.js → vue-ui-history-plot-CH4RJSqN.js} +7 -7
- package/dist/{vue-ui-kpi-BNNqPORJ.js → vue-ui-kpi-DJrypxm5.js} +3 -3
- package/dist/{vue-ui-mini-loader-wa4WjqZj.js → vue-ui-mini-loader-BMaEgYp1.js} +2 -2
- package/dist/{vue-ui-molecule-NGbWYvw-.js → vue-ui-molecule-om_udncc.js} +5 -5
- package/dist/{vue-ui-mood-radar-Dz2YUYPG.js → vue-ui-mood-radar-BOd7BMa4.js} +7 -7
- package/dist/vue-ui-nested-donuts-B6krlgFx.js +1284 -0
- package/dist/{vue-ui-onion-DUeU3zvH.js → vue-ui-onion-COQ1H7Ft.js} +7 -7
- package/dist/{vue-ui-parallel-coordinate-plot-5158EX3T.js → vue-ui-parallel-coordinate-plot-CEKsfccd.js} +8 -8
- package/dist/{vue-ui-quadrant-BEaCxPxR.js → vue-ui-quadrant-C88vkF8q.js} +8 -8
- package/dist/{vue-ui-quick-chart-C3yTivjK.js → vue-ui-quick-chart-CG2lY19C.js} +266 -264
- package/dist/{vue-ui-radar-CwRo-de_.js → vue-ui-radar-CUAYzxM4.js} +7 -7
- package/dist/{vue-ui-rating-nHTBjTie.js → vue-ui-rating-DT0BLQ1G.js} +2 -2
- package/dist/{vue-ui-relation-circle-w7TYrdHz.js → vue-ui-relation-circle-Ek_uAHpF.js} +6 -6
- package/dist/{vue-ui-ridgeline-Dk9xpHSw.js → vue-ui-ridgeline-73OXSMcJ.js} +9 -9
- package/dist/{vue-ui-rings-tCL5utj_.js → vue-ui-rings-D1gK_JVs.js} +8 -8
- package/dist/{vue-ui-scatter-BJUJRCto.js → vue-ui-scatter-DCy4Vb84.js} +8 -8
- package/dist/{vue-ui-skeleton-Cf09cngz.js → vue-ui-skeleton-DIb-2uan.js} +3 -3
- package/dist/{vue-ui-smiley-BvoOjmJx.js → vue-ui-smiley-DiIu0kjQ.js} +2 -2
- package/dist/{vue-ui-spark-trend-Bdz2gHnU.js → vue-ui-spark-trend-BPczzwfH.js} +3 -3
- package/dist/{vue-ui-sparkbar-CS1FzyFk.js → vue-ui-sparkbar-B4LpToMU.js} +3 -3
- package/dist/{vue-ui-sparkgauge-auWy_YMm.js → vue-ui-sparkgauge-D9KwmalJ.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-yA_F8Ls5.js → vue-ui-sparkhistogram-h7qmzAe1.js} +4 -4
- package/dist/vue-ui-sparkline-DYYy38Fu.js +489 -0
- package/dist/{vue-ui-sparkstackbar-BhqOPIZT.js → vue-ui-sparkstackbar-DIIyxzKM.js} +3 -3
- package/dist/vue-ui-stackbar-BhPcAjIe.js +1358 -0
- package/dist/{vue-ui-strip-plot-D7KgSU5y.js → vue-ui-strip-plot-9wxxXL3R.js} +7 -7
- package/dist/{vue-ui-table-BDJg5T9l.js → vue-ui-table-FAEiGW1W.js} +3 -3
- package/dist/{vue-ui-table-heatmap-Pp2gbL5G.js → vue-ui-table-heatmap-Cwbw5Rqy.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CmZBjiWv.js → vue-ui-table-sparkline-DnZ44NiP.js} +4 -4
- package/dist/{vue-ui-thermometer-ClY99Umm.js → vue-ui-thermometer-CHFtR_VC.js} +6 -6
- package/dist/{vue-ui-timer-_Bck3rxo.js → vue-ui-timer-DWzZTLxC.js} +5 -5
- package/dist/{vue-ui-tiremarks-C2CtoJT_.js → vue-ui-tiremarks-DTS-ZQRp.js} +6 -6
- package/dist/{vue-ui-treemap-CM-zqI6U.js → vue-ui-treemap-B5OdGgS-.js} +8 -8
- package/dist/vue-ui-vertical-bar-CcjDg9Bc.js +1106 -0
- package/dist/{vue-ui-waffle-B21kT4HO.js → vue-ui-waffle-C1XVqncx.js} +8 -8
- package/dist/{vue-ui-wheel-Dqv-ta7L.js → vue-ui-wheel-DEIJPpR4.js} +6 -6
- package/dist/{vue-ui-word-cloud-DHjvCwD8.js → vue-ui-word-cloud-CUzU4JpO.js} +6 -6
- package/dist/{vue-ui-world-h3Csu0YN.js → vue-ui-world-D0pONCg9.js} +6 -6
- package/dist/vue-ui-xy-EoeoBLu2.js +3027 -0
- package/dist/{vue-ui-xy-canvas-sIRUM_Be.js → vue-ui-xy-canvas-Do-IpmFr.js} +252 -253
- package/package.json +1 -1
- package/dist/vue-ui-candlestick-Dz0D7t8f.js +0 -873
- package/dist/vue-ui-donut-evolution-CQDtCf7k.js +0 -903
- package/dist/vue-ui-nested-donuts-ywwGdEJO.js +0 -1177
- package/dist/vue-ui-sparkline-B-sCAUEL.js +0 -459
- package/dist/vue-ui-stackbar-CZzqF-ZH.js +0 -1207
- package/dist/vue-ui-vertical-bar-CET-9MDi.js +0 -980
- package/dist/vue-ui-xy-CZ7mScyg.js +0 -2958
|
@@ -0,0 +1,3027 @@
|
|
|
1
|
+
import { defineAsyncComponent as Be, useSlots as Nt, getCurrentInstance as Vt, ref as S, computed as $, onMounted as Ba, toRefs as Pt, watch as Ml, watchEffect as Ht, onBeforeUnmount as Ya, createElementBlock as i, openBlock as u, normalizeStyle as z, normalizeClass as Ue, createBlock as Me, createCommentVNode as d, createVNode as xl, unref as v, createSlots as Rt, withCtx as ue, renderSlot as q, normalizeProps as Ze, guardReactiveProps as Je, createElementVNode as x, Fragment as h, renderList as k, toDisplayString as le, mergeProps as Ql, withDirectives as Bt, vModelCheckbox as Yt, createTextVNode as Ft, nextTick as jl } from "vue";
|
|
2
|
+
import { u as Et, c as ea, e as la, A as Wt, a5 as Ye, b as Xt, D as ml, ac as Ke, d as Gt, p as Dt, ad as zl, aa as R, ae as qt, v as T, af as Fa, V as Ea, ag as Wa, U as Xa, ah as Ut, ai as Ga, aj as Da, i as re, x as Zt, y as Jt, _ as qa, R as ze, f as me, w as Qe, s as Se, a8 as X, L as Kt, F as Fe, ak as Cl, I as Qt, al as Ee, C as be, t as jt, a as eo, o as Ua, q as lo, r as ao, E as ol } from "./index-Bxh2efzz.js";
|
|
3
|
+
import { u as aa } from "./useNestedProp-BGEUK51b.js";
|
|
4
|
+
import { u as to } from "./useTimeLabels-DFkUfjfs.js";
|
|
5
|
+
import { u as oo } from "./useTimeLabelCollider-V7AOiPLB.js";
|
|
6
|
+
import { S as so } from "./Slicer-DYffOkSj.js";
|
|
7
|
+
import uo from "./Title-B21jaJ0n.js";
|
|
8
|
+
import { _ as Il } from "./Shape-CNmKltYG.js";
|
|
9
|
+
import ro from "./img-UQKhhbxb.js";
|
|
10
|
+
import { u as io } from "./usePrinter-CfB_poc_.js";
|
|
11
|
+
import { u as no, B as co } from "./BaseScanner-DIK2NTdp.js";
|
|
12
|
+
import { t as vo } from "./useResponsive-DfdjqQps.js";
|
|
13
|
+
import { _ as ho } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const fo = ["id"], go = ["viewBox", "aria-label"], xo = ["x", "y", "width", "height"], mo = { key: 1 }, bo = { class: "vue-ui-xy-grid" }, yo = ["stroke", "x1", "x2", "y1", "y2"], po = ["stroke", "x1", "x2", "y1", "y2"], ko = { key: 1 }, _o = ["x1", "x2", "y1", "y2", "stroke"], wo = ["x1", "x2", "y1", "y2", "stroke"], So = ["x1", "x2", "y1", "y2", "stroke"], $o = { key: 3 }, Lo = ["d", "stroke"], Ao = { key: 4 }, Mo = ["d", "stroke"], zo = ["id"], Co = ["stop-color"], Io = ["stop-color"], To = ["stop-color"], Oo = ["id"], No = ["stop-color"], Vo = ["stop-color"], Po = ["stop-color"], Ho = ["id"], Ro = ["stop-color"], Bo = ["stop-color"], Yo = ["id"], Fo = ["stop-color"], Eo = ["stop-color"], Wo = ["id"], Xo = ["stop-color"], Go = ["stop-color"], Do = ["x", "y", "height", "width", "fill"], qo = ["x", "y", "width"], Uo = { key: 0 }, Zo = ["x", "y", "height", "width", "fill"], Jo = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Ko = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Qo = ["width", "x", "y"], jo = { key: 0 }, es = ["id"], ls = ["fill"], as = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], ts = ["x", "y", "font-size", "fill"], os = ["stroke", "x1", "x2", "y1", "y2"], ss = { key: 3 }, us = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], rs = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], is = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ns = ["fill", "font-size", "transform"], cs = ["x1", "x2", "y1", "y2", "stroke"], vs = ["x", "y", "font-size", "fill"], ds = ["x1", "x2", "y1", "y2", "stroke"], hs = ["x", "y", "font-size", "fill"], fs = ["width", "x", "y"], gs = { style: { width: "100%" } }, xs = { key: 0 }, ms = ["id"], bs = ["fill"], ys = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], ps = ["x", "y", "font-size", "fill"], ks = ["d", "stroke", "stroke-width", "stroke-dasharray"], _s = ["d", "stroke", "stroke-width", "stroke-dasharray"], ws = { key: 6 }, Ss = { key: 0 }, $s = ["d", "fill"], Ls = ["d", "fill"], As = ["d", "fill"], Ms = ["d", "fill"], zs = ["d", "stroke", "stroke-width", "stroke-dasharray"], Cs = ["d", "stroke", "stroke-width", "stroke-dasharray"], Is = ["width", "x", "y"], Ts = { style: { width: "100%" } }, Os = { key: 3 }, Ns = ["id"], Vs = ["fill"], Ps = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Hs = ["x", "y", "font-size", "fill"], Rs = { key: 7 }, Bs = ["x", "y", "font-size", "fill"], Ys = ["x", "y", "font-size", "fill", "font-weight"], Fs = { key: 8 }, Es = ["x", "y", "font-size", "fill"], Ws = { key: 9 }, Xs = ["x", "y"], Gs = ["innerHTML"], Ds = ["x", "y"], qs = ["innerHTML"], Us = ["x1", "x2", "y1", "y2", "stroke"], Zs = { key: 10 }, Js = ["x", "y", "font-size", "fill"], Ks = { key: 11 }, Qs = ["x", "y"], js = ["innerHTML"], eu = ["x", "y"], lu = ["innerHTML"], au = ["x1", "x2", "y1", "y2", "stroke"], tu = ["x", "y", "font-size", "fill", "innerHTML"], ou = ["x", "y", "font-size", "fill", "innerHTML"], su = ["x", "y", "font-size", "fill", "innerHTML"], uu = ["x", "y", "font-size", "fill", "innerHTML"], ru = ["id"], iu = ["stop-color"], nu = ["stop-color"], cu = ["x", "y", "width", "height", "fill", "onMouseenter"], vu = ["font-size", "fill", "transform"], du = ["x", "y", "font-size", "fill"], hu = ["text-anchor", "font-size", "fill", "transform", "onClick"], fu = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], gu = { key: 14 }, xu = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], mu = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], bu = ["y", "x", "width", "height", "fill"], yu = ["id", "x", "y", "font-size", "fill", "text-anchor"], pu = { key: 15 }, ku = ["x", "y", "height", "width", "onMouseenter", "onMouseleave", "onClick"], _u = {
|
|
15
|
+
key: 16,
|
|
16
|
+
style: { "pointer-events": "none" }
|
|
17
|
+
}, wu = ["x", "y"], Su = ["cx", "cy", "r", "fill"], $u = {
|
|
18
|
+
key: 4,
|
|
19
|
+
class: "vue-data-ui-watermark"
|
|
20
|
+
}, Lu = {
|
|
21
|
+
class: "vue-ui-xy-tag-arrow",
|
|
22
|
+
height: "20",
|
|
23
|
+
viewBox: "0 0 10 20",
|
|
24
|
+
style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
25
|
+
}, Au = ["fill"], Mu = ["innerHTML"], zu = {
|
|
26
|
+
class: "vue-ui-xy-tag-arrow",
|
|
27
|
+
height: "100%",
|
|
28
|
+
viewBox: "0 0 10 20",
|
|
29
|
+
style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
30
|
+
}, Cu = ["fill"], Iu = ["innerHTML"], Tu = {
|
|
31
|
+
class: "vue-ui-xy-tag-arrow",
|
|
32
|
+
height: "20",
|
|
33
|
+
viewBox: "0 0 10 20",
|
|
34
|
+
style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
35
|
+
}, Ou = ["fill"], Nu = ["innerHTML"], Vu = {
|
|
36
|
+
class: "vue-ui-xy-tag-arrow",
|
|
37
|
+
height: "100%",
|
|
38
|
+
viewBox: "0 0 10 20",
|
|
39
|
+
style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
40
|
+
}, Pu = ["fill"], Hu = ["innerHTML"], Ru = ["onClick"], Bu = {
|
|
41
|
+
key: 0,
|
|
42
|
+
viewBox: "0 0 20 12",
|
|
43
|
+
height: "14",
|
|
44
|
+
width: "20"
|
|
45
|
+
}, Yu = ["stroke", "fill"], Fu = {
|
|
46
|
+
key: 1,
|
|
47
|
+
viewBox: "0 0 40 40",
|
|
48
|
+
height: "14",
|
|
49
|
+
width: "14"
|
|
50
|
+
}, Eu = ["fill"], Wu = ["fill"], Xu = {
|
|
51
|
+
key: 2,
|
|
52
|
+
viewBox: "0 0 12 12",
|
|
53
|
+
height: "14",
|
|
54
|
+
width: "14"
|
|
55
|
+
}, Gu = {
|
|
56
|
+
style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
|
|
57
|
+
"data-dom-to-png-ignore": ""
|
|
58
|
+
}, Du = ["innerHTML"], qu = {
|
|
59
|
+
__name: "vue-ui-xy",
|
|
60
|
+
props: {
|
|
61
|
+
config: {
|
|
62
|
+
type: Object,
|
|
63
|
+
default() {
|
|
64
|
+
return {};
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
dataset: {
|
|
68
|
+
type: Array,
|
|
69
|
+
default() {
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
selectedXIndex: {
|
|
74
|
+
type: Number,
|
|
75
|
+
default: void 0
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
emits: ["selectTimeLabel", "selectX", "selectLegend"],
|
|
79
|
+
setup(Tl, { expose: Za, emit: Ja }) {
|
|
80
|
+
const g = Tl, Ka = Be(() => import("./DataTable-DjL9vVfm.js")), Qa = Be(() => import("./Tooltip-C4HWh3fx.js")), ja = Be(() => import("./UserOptions-DQDPN9YO.js")), et = Be(() => import("./BaseIcon-DEGIw8ne.js")), lt = Be(() => import("./vue-ui-table-sparkline-DnZ44NiP.js")), at = Be(() => import("./vue-ui-accordion-CXj3OfMj.js")), tt = Be(() => import("./PackageVersion-SqC1iXfO.js")), ot = Be(() => import("./PenAndPaper-C1bF0gIz.js")), Ol = Ja, ta = Nt(), st = Vt(), { vue_ui_xy: Nl } = Et(), je = S(null), sl = S(null), Ne = S(null), el = S(null), ul = S(null), rl = S(null), ut = S(null), Vl = S(null), Pl = S(null), ll = S(null), Hl = S(null), We = S(null), Rl = S(null), Bl = S(0), M = S(null), oa = S(!0), ve = S(600), ae = S(1e3), bl = S("0 0 1000 600"), rt = S({ x: 0, y: 0 }), il = S({ line: "line", bar: "bar", plot: "plot" }), yl = S(!1), al = S(!1), sa = S(!1), Xe = S(null), te = S([]), U = S(ea()), ua = S(0), ra = S(0), ia = S(0), nl = S(!0), Yl = S(0), O = S(null), na = S(!1), Fl = S(!0), pl = S(!0), ye = S(null), Ce = S({}), kl = S(null), p = S(null), it = $(() => ({
|
|
81
|
+
height: ve.value,
|
|
82
|
+
width: ae.value
|
|
83
|
+
})), nt = g.config.downsample && g.config.downsample.threshold ? g.config.downsample.threshold : 500, f = S({
|
|
84
|
+
dataLabels: { show: !0 },
|
|
85
|
+
showTooltip: !0,
|
|
86
|
+
showTable: !1,
|
|
87
|
+
isStacked: !1,
|
|
88
|
+
useIndividualScale: !1
|
|
89
|
+
}), m = S({
|
|
90
|
+
xAxis: 18,
|
|
91
|
+
yAxis: 12,
|
|
92
|
+
dataLabels: 20,
|
|
93
|
+
plotLabels: 10
|
|
94
|
+
}), $e = S({ plot: 3, line: 3 });
|
|
95
|
+
Ba(() => {
|
|
96
|
+
g.dataset.length && g.dataset.forEach((a, c) => {
|
|
97
|
+
[null, void 0].includes(a.series) && la({
|
|
98
|
+
componentName: "VueUiXy",
|
|
99
|
+
type: "datasetSerieAttribute",
|
|
100
|
+
property: "series (number[])",
|
|
101
|
+
index: c,
|
|
102
|
+
debug: hl.value
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
function El() {
|
|
107
|
+
if (!Object.keys(g.config || {}).length)
|
|
108
|
+
return Nl;
|
|
109
|
+
const a = aa({
|
|
110
|
+
userConfig: g.config,
|
|
111
|
+
defaultConfig: Nl
|
|
112
|
+
});
|
|
113
|
+
return g.config && be(g.config, "chart.highlightArea") && (Array.isArray(g.config.chart.highlightArea) ? a.chart.highlightArea = g.config.chart.highlightArea : a.chart.highlightArea = [g.config.chart.highlightArea]), g.config && be(g.config, "chart.grid.labels.yAxis.scaleMin") ? a.chart.grid.labels.yAxis.scaleMin = g.config.chart.grid.labels.yAxis.scaleMin : a.chart.grid.labels.yAxis.scaleMin = null, g.config && be(g.config, "chart.grid.labels.yAxis.scaleMax") ? a.chart.grid.labels.yAxis.scaleMax = g.config.chart.grid.labels.yAxis.scaleMax : a.chart.grid.labels.yAxis.scaleMax = null, g.config && be(g.config, "chart.zoom.startIndex") ? a.chart.zoom.startIndex = g.config.chart.zoom.startIndex : a.chart.zoom.startIndex = null, g.config && be(g.config, "chart.zoom.endIndex") ? a.chart.zoom.endIndex = g.config.chart.zoom.endIndex : a.chart.zoom.endIndex = null, g.config && be(g.config, "chart.grid.labels.yAxis.groupColor") ? a.chart.grid.labels.yAxis.groupColor = g.config.chart.grid.labels.yAxis.groupColor : a.chart.grid.labels.yAxis.groupColor = null, g.config && g.config.chart.annotations && Array.isArray(g.config.chart.annotations) && g.config.chart.annotations.length ? a.chart.annotations = g.config.chart.annotations.map((c) => aa({
|
|
114
|
+
defaultConfig: Nl.chart.annotations[0],
|
|
115
|
+
userConfig: c
|
|
116
|
+
})) : a.chart.annotations = [], g.config && be(g.config, "chart.grid.position") && g.config.chart.grid.position === "start" && g.dataset.length && g.dataset.some((c) => c.type === "bar") && (a.chart.grid.position = "middle", be(g.config, "debug") && console.warn("Vue Data UI - VueUiXy - config.chart.grid.position was overriden to `middle` because your dataset contains a bar")), g.config && be(g.config, "chart.grid.labels.yAxis.serieNameFormatter") ? a.chart.grid.labels.yAxis.serieNameFormatter = g.config.chart.grid.labels.yAxis.serieNameFormatter : a.chart.grid.labels.yAxis.serieNameFormatter = null, g.config && be(g.config, "events.datapointEnter") ? a.events.datapointEnter = g.config.events.datapointEnter : a.events.datapointEnter = null, g.config && be(g.config, "events.datapointLeave") ? a.events.datapointLeave = g.config.events.datapointLeave : a.events.datapointLeave = null, g.config && be(g.config, "events.datapointClick") ? a.events.datapointClick = g.config.events.datapointClick : a.events.datapointClick = null, a.theme ? {
|
|
117
|
+
...aa({
|
|
118
|
+
userConfig: eo.vue_ui_xy[a.theme] || g.config,
|
|
119
|
+
defaultConfig: a
|
|
120
|
+
}),
|
|
121
|
+
customPalette: jt[a.theme] || g.palette
|
|
122
|
+
} : a;
|
|
123
|
+
}
|
|
124
|
+
const Wl = $({
|
|
125
|
+
get() {
|
|
126
|
+
return !!g.dataset && g.dataset.length;
|
|
127
|
+
},
|
|
128
|
+
set(a) {
|
|
129
|
+
return a;
|
|
130
|
+
}
|
|
131
|
+
}), l = S(El()), { loading: Xl, FINAL_DATASET: pe, manualLoading: _l } = no({
|
|
132
|
+
...Pt(g),
|
|
133
|
+
FINAL_CONFIG: l,
|
|
134
|
+
prepareConfig: El,
|
|
135
|
+
callback: () => {
|
|
136
|
+
Promise.resolve().then(async () => {
|
|
137
|
+
await Kl();
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
skeletonDataset: [
|
|
141
|
+
{
|
|
142
|
+
name: "",
|
|
143
|
+
series: [0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 134],
|
|
144
|
+
type: "line",
|
|
145
|
+
smooth: !0,
|
|
146
|
+
color: "#BABABA"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: "",
|
|
150
|
+
series: [0, 0.5, 1, 1.5, 2.5, 4, 6.5, 10.5, 17, 27.5, 44.5, 67],
|
|
151
|
+
type: "bar",
|
|
152
|
+
color: "#CACACA"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
skeletonConfig: Wt({
|
|
156
|
+
defaultConfig: l.value,
|
|
157
|
+
userConfig: {
|
|
158
|
+
useCssAnimation: !1,
|
|
159
|
+
showTable: !1,
|
|
160
|
+
chart: {
|
|
161
|
+
annotations: [],
|
|
162
|
+
highlightArea: [],
|
|
163
|
+
backgroundColor: "#99999930",
|
|
164
|
+
grid: {
|
|
165
|
+
stroke: "#6A6A6A",
|
|
166
|
+
labels: {
|
|
167
|
+
show: !1,
|
|
168
|
+
axis: {
|
|
169
|
+
yLabel: "",
|
|
170
|
+
xLabel: ""
|
|
171
|
+
},
|
|
172
|
+
xAxisLabels: { show: !1 },
|
|
173
|
+
yAxis: {
|
|
174
|
+
commonScaleSteps: 10,
|
|
175
|
+
useNiceScale: !0,
|
|
176
|
+
scaleMin: 0,
|
|
177
|
+
scaleMax: 134
|
|
178
|
+
},
|
|
179
|
+
zeroLine: { show: !0 }
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
legend: { show: !1 },
|
|
183
|
+
padding: {
|
|
184
|
+
top: 12,
|
|
185
|
+
bottom: 24,
|
|
186
|
+
left: 24,
|
|
187
|
+
right: 24
|
|
188
|
+
},
|
|
189
|
+
userOptions: { show: !1 },
|
|
190
|
+
zoom: {
|
|
191
|
+
show: !1,
|
|
192
|
+
startIndex: null,
|
|
193
|
+
endIndex: null
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
bar: {
|
|
197
|
+
serieName: { show: !1 },
|
|
198
|
+
labels: { show: !1 },
|
|
199
|
+
border: {
|
|
200
|
+
useSerieColor: !1,
|
|
201
|
+
stroke: "#999999"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
line: {
|
|
205
|
+
dot: {
|
|
206
|
+
useSerieColor: !1,
|
|
207
|
+
fill: "#8A8A8A"
|
|
208
|
+
},
|
|
209
|
+
labels: { show: !1 }
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
})
|
|
213
|
+
}), Ve = $({
|
|
214
|
+
get: () => Math.max(...pe.value.map((a) => Ye({ data: a.series, threshold: nt }).length)),
|
|
215
|
+
set: (a) => a
|
|
216
|
+
}), y = S({ start: 0, end: Ve.value });
|
|
217
|
+
Ml(() => g.selectedXIndex, (a) => {
|
|
218
|
+
if ([null, void 0].includes(g.selectedXIndex)) {
|
|
219
|
+
p.value = null;
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
const c = a - y.value.start;
|
|
223
|
+
c < 0 || a >= y.value.end ? p.value = null : p.value = c ?? null;
|
|
224
|
+
}, { immediate: !0 });
|
|
225
|
+
const { isPrinting: Gl, isImaging: ca, generatePdf: va, generateImage: da } = io({
|
|
226
|
+
elementId: `vue-ui-xy_${U.value}`,
|
|
227
|
+
fileName: l.value.chart.title.text || "vue-ui-xy",
|
|
228
|
+
options: l.value.chart.userOptions.print
|
|
229
|
+
}), ct = S(!1), ha = $(() => Xt(l.value.customPalette)), wl = $(() => l.value.chart.grid.labels.yAxis.scaleMax ? l.value.chart.grid.labels.yAxis.scaleMax : Math.max(...Ie.value.filter((a) => !te.value.includes(a.id)).map((a) => Math.max(...a.series)))), Dl = $(() => {
|
|
230
|
+
if (l.value.chart.grid.labels.yAxis.scaleMin !== null)
|
|
231
|
+
return l.value.chart.grid.labels.yAxis.scaleMin;
|
|
232
|
+
const a = Math.min(...Ie.value.filter((c) => !te.value.includes(c.id)).map((c) => Math.min(...c.series)));
|
|
233
|
+
return a > 0 ? 0 : a;
|
|
234
|
+
}), ke = $(() => l.value.chart.grid.labels.yAxis.useNiceScale ? ml(Dl.value, wl.value < 0 ? 0 : wl.value, l.value.chart.grid.labels.yAxis.commonScaleSteps) : Ke(Dl.value, wl.value < 0 ? 0 : wl.value, l.value.chart.grid.labels.yAxis.commonScaleSteps)), cl = $(() => [null, void 0].includes(l.value.chart.grid.labels.yAxis.scaleMin) ? ke.value.min >= 0 ? 0 : Math.abs(ke.value.min) : -ke.value.min), Ie = $(() => oa.value ? pe.value.map((a, c) => {
|
|
235
|
+
const e = Ye({
|
|
236
|
+
data: a.series,
|
|
237
|
+
threshold: l.value.downsample.threshold
|
|
238
|
+
}), s = `uniqueId_${c}`;
|
|
239
|
+
return {
|
|
240
|
+
...a,
|
|
241
|
+
slotAbsoluteIndex: c,
|
|
242
|
+
series: e.map((t) => zl(t) ? t : null).slice(y.value.start, y.value.end),
|
|
243
|
+
color: Gt(a.color ? a.color : ha.value[c] ? ha.value[c] : Dt[c]),
|
|
244
|
+
id: s,
|
|
245
|
+
scaleLabel: a.scaleLabel || s
|
|
246
|
+
};
|
|
247
|
+
}) : pe.value), Te = $(() => Ie.value.map((a, c) => ({
|
|
248
|
+
absoluteIndex: c,
|
|
249
|
+
...a,
|
|
250
|
+
series: a.series.map((e) => e + cl.value),
|
|
251
|
+
absoluteValues: a.series,
|
|
252
|
+
segregate: () => $a(a),
|
|
253
|
+
isSegregated: te.value.includes(a.id)
|
|
254
|
+
}))), fe = $(() => Ie.value.map((a, c) => ({
|
|
255
|
+
...a,
|
|
256
|
+
series: a.series.map((e) => e + cl.value),
|
|
257
|
+
absoluteValues: a.series
|
|
258
|
+
})).filter((a) => !te.value.includes(a.id)));
|
|
259
|
+
function vt() {
|
|
260
|
+
let a = 0;
|
|
261
|
+
Hl.value && (a = Array.from(Hl.value.querySelectorAll("text")).reduce((t, r) => {
|
|
262
|
+
const o = r.getComputedTextLength();
|
|
263
|
+
return (o > t ? o : t) + l.value.chart.grid.labels.yAxis.scaleValueOffsetX;
|
|
264
|
+
}, 0));
|
|
265
|
+
const c = Pl.value ? Pl.value.getBoundingClientRect().width + l.value.chart.grid.labels.axis.yLabelOffsetX + m.value.yAxis : 0, e = l.value.chart.grid.labels.yAxis.crosshairSize;
|
|
266
|
+
return a + c + e;
|
|
267
|
+
}
|
|
268
|
+
const ql = S(0), dt = vo((a) => {
|
|
269
|
+
ql.value = a;
|
|
270
|
+
}, 100);
|
|
271
|
+
Ht((a) => {
|
|
272
|
+
const c = ll.value;
|
|
273
|
+
if (!c) return;
|
|
274
|
+
const e = new ResizeObserver((s) => {
|
|
275
|
+
dt(s[0].contentRect.height);
|
|
276
|
+
});
|
|
277
|
+
e.observe(c), a(() => e.disconnect());
|
|
278
|
+
}), Ya(() => {
|
|
279
|
+
ql.value = 0;
|
|
280
|
+
});
|
|
281
|
+
const fa = $(() => {
|
|
282
|
+
let a = 0;
|
|
283
|
+
Vl.value && (a = Vl.value.getBBox().height);
|
|
284
|
+
let c = 0;
|
|
285
|
+
return ll.value && (c = ql.value), a + c + m.value.xAxis;
|
|
286
|
+
}), ht = $(() => pe.value.some((a) => a.useProgression)), n = $(() => {
|
|
287
|
+
let a = 0;
|
|
288
|
+
const c = 36;
|
|
289
|
+
l.value.chart.grid.labels.show && (f.value.useIndividualScale && !f.value.isStacked ? a = (pe.value.length - te.value.length) * (l.value.chart.grid.labels.yAxis.labelWidth + c) : f.value.useIndividualScale && f.value.isStacked ? a = l.value.chart.grid.labels.yAxis.labelWidth + c : a = vt());
|
|
290
|
+
const e = l.value.chart.labels.fontSize * 1.1, s = ht.value ? 24 : 6;
|
|
291
|
+
if (ll.value) {
|
|
292
|
+
const o = ll.value.getBBox().x;
|
|
293
|
+
o < 0 && (a += Math.abs(o));
|
|
294
|
+
}
|
|
295
|
+
const t = ae.value - a - l.value.chart.grid.labels.yAxis.crosshairSize - s - l.value.chart.padding.left - l.value.chart.padding.right, r = l.value.chart.grid.position === "middle" ? 0 : t / b.value / 2;
|
|
296
|
+
return {
|
|
297
|
+
top: l.value.chart.padding.top + e,
|
|
298
|
+
right: ae.value - s - l.value.chart.padding.right,
|
|
299
|
+
bottom: ve.value - fa.value - l.value.chart.padding.bottom - l.value.chart.grid.labels.axis.xLabelOffsetY,
|
|
300
|
+
left: a + l.value.chart.grid.labels.yAxis.crosshairSize - r + l.value.chart.padding.left,
|
|
301
|
+
height: ve.value - fa.value - l.value.chart.padding.top - l.value.chart.padding.bottom - e - l.value.chart.grid.labels.axis.xLabelOffsetY,
|
|
302
|
+
width: t,
|
|
303
|
+
scaleLabelX: a,
|
|
304
|
+
individualOffsetX: c
|
|
305
|
+
};
|
|
306
|
+
}), ft = $(() => {
|
|
307
|
+
const a = l.value.chart.grid.position === "middle" ? 1 : 0, c = b.value + a, e = R(n.value.top), s = R(n.value.bottom);
|
|
308
|
+
return Array.from({ length: c }).map((t, r) => {
|
|
309
|
+
const o = n.value.width / b.value * r + n.value.left + G.value;
|
|
310
|
+
return `M${o},${e} L${o},${s}`;
|
|
311
|
+
}).join(" ");
|
|
312
|
+
}), gt = $(() => {
|
|
313
|
+
if (!l.value.chart.grid.labels.xAxis.showCrosshairs)
|
|
314
|
+
return "";
|
|
315
|
+
const {
|
|
316
|
+
showOnlyAtModulo: a,
|
|
317
|
+
showOnlyFirstAndLast: c,
|
|
318
|
+
modulo: e
|
|
319
|
+
} = l.value.chart.grid.labels.xAxisLabels, s = J.value.length ? Math.min(e, [...new Set(J.value.map((r) => r.text))].length) : e, t = Math.floor((y.value.end - y.value.start) / s);
|
|
320
|
+
return J.value.map((r, o) => {
|
|
321
|
+
if (!r) return null;
|
|
322
|
+
const B = a && b.value <= s, F = !c && !a, E = c && !a && (o === 0 || o === J.value.length - 1), L = c && !a && p.value === o, C = !c && a && o % t === 0;
|
|
323
|
+
if (!(B || F || E || L || C))
|
|
324
|
+
return null;
|
|
325
|
+
const Y = n.value.width / b.value, w = n.value.left + Y * o + Y / 2, N = l.value.chart.grid.labels.xAxis.crosshairSize, A = l.value.chart.grid.labels.xAxis.crosshairsAlwaysAtZero, K = A ? ie.value - (ie.value === n.value.bottom ? 0 : N / 2) : n.value.bottom, oe = A ? ie.value + N / (ie.value === n.value.bottom ? 1 : 2) : n.value.bottom + N;
|
|
326
|
+
return `M${w},${K} L${w},${oe}`;
|
|
327
|
+
}).filter((r) => r !== null).join(" ");
|
|
328
|
+
});
|
|
329
|
+
function ga() {
|
|
330
|
+
return !!st?.vnode.props?.onSelectTimeLabel;
|
|
331
|
+
}
|
|
332
|
+
function xt(a, c, e) {
|
|
333
|
+
if (!kl.value) {
|
|
334
|
+
const s = document.createElement("canvas");
|
|
335
|
+
kl.value = s.getContext("2d");
|
|
336
|
+
}
|
|
337
|
+
return kl.value.font = `normal ${a}px sans-serif`, kl.value;
|
|
338
|
+
}
|
|
339
|
+
function xa() {
|
|
340
|
+
const a = je.value.querySelectorAll(".vue-ui-xy-tag");
|
|
341
|
+
a.length && Array.from(a).forEach((c) => c.style.opacity = "0");
|
|
342
|
+
}
|
|
343
|
+
function Sl(a, c, e, s, t) {
|
|
344
|
+
e && (Ce.value[`${a}_${c}_${s}_${t}`] = e);
|
|
345
|
+
}
|
|
346
|
+
const Ul = S(!1);
|
|
347
|
+
async function ma(a = !1) {
|
|
348
|
+
await jl(), Ul.value = a, na.value && (pl.value = a);
|
|
349
|
+
}
|
|
350
|
+
function Zl() {
|
|
351
|
+
yl.value = !yl.value;
|
|
352
|
+
}
|
|
353
|
+
const J = $(() => {
|
|
354
|
+
const a = Math.max(...pe.value.map((c) => Ye({ data: c.series, threshold: l.value.downsample.threshold }).length));
|
|
355
|
+
return to({
|
|
356
|
+
values: l.value.chart.grid.labels.xAxisLabels.values,
|
|
357
|
+
maxDatapoints: a,
|
|
358
|
+
formatter: l.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
|
|
359
|
+
start: y.value.start,
|
|
360
|
+
end: y.value.end
|
|
361
|
+
});
|
|
362
|
+
}), $l = $(() => {
|
|
363
|
+
const a = l.value.chart.grid.labels.xAxisLabels.modulo;
|
|
364
|
+
return J.value.length ? Math.min(a, [...new Set(J.value.map((c) => c.text))].length) : a;
|
|
365
|
+
});
|
|
366
|
+
function ba(a, c) {
|
|
367
|
+
const e = fe.value.map((s) => ({
|
|
368
|
+
shape: s.shape || null,
|
|
369
|
+
name: s.name,
|
|
370
|
+
color: s.color,
|
|
371
|
+
type: s.type,
|
|
372
|
+
value: s.absoluteValues.find((t, r) => r === c),
|
|
373
|
+
comments: s.comments || [],
|
|
374
|
+
prefix: s.prefix || l.value.chart.labels.prefix,
|
|
375
|
+
suffix: s.suffix || l.value.chart.labels.suffix
|
|
376
|
+
}));
|
|
377
|
+
Ol("selectTimeLabel", {
|
|
378
|
+
datapoint: e,
|
|
379
|
+
absoluteIndex: a.absoluteIndex,
|
|
380
|
+
label: a.text
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
const b = $(() => y.value.end - y.value.start);
|
|
384
|
+
function mt(a) {
|
|
385
|
+
O.value = a;
|
|
386
|
+
}
|
|
387
|
+
function ya() {
|
|
388
|
+
f.value.isStacked = !f.value.isStacked, f.value.isStacked ? f.value.useIndividualScale = !0 : f.value.useIndividualScale = l.value.chart.grid.labels.yAxis.useIndividualScale;
|
|
389
|
+
}
|
|
390
|
+
function Jl(a) {
|
|
391
|
+
hl.value && a.autoScaling && (l.value.chart.grid.labels.yAxis.useIndividualScale || console.warn(`VueUiXy (datapoint: ${a.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`), l.value.chart.grid.labels.yAxis.stacked || console.warn(`VueUiXy (datapoint: ${a.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`));
|
|
392
|
+
}
|
|
393
|
+
function bt(a, c) {
|
|
394
|
+
let e = Array(Math.abs(a)).fill(0);
|
|
395
|
+
for (let s = 0; s < c.length && s < a; s += 1)
|
|
396
|
+
e[s] = c[s];
|
|
397
|
+
return e;
|
|
398
|
+
}
|
|
399
|
+
function yt(a) {
|
|
400
|
+
const c = Math.max(...pe.value.map((e) => Ye({ data: e.series, threshold: l.value.downsample.threshold }).length));
|
|
401
|
+
return a > c ? c : a < 0 || l.value.chart.zoom.startIndex !== null && a < l.value.chart.zoom.startIndex ? l.value.chart.zoom.startIndex !== null ? l.value.chart.zoom.startIndex + 1 : 1 : a;
|
|
402
|
+
}
|
|
403
|
+
async function Kl() {
|
|
404
|
+
await jl(), await jl();
|
|
405
|
+
const { startIndex: a, endIndex: c } = l.value.chart.zoom, e = Ne.value, s = Math.max(
|
|
406
|
+
...pe.value.map(
|
|
407
|
+
(t) => Ye({
|
|
408
|
+
data: t.series,
|
|
409
|
+
threshold: l.value.downsample.threshold
|
|
410
|
+
}).length
|
|
411
|
+
)
|
|
412
|
+
);
|
|
413
|
+
(a != null || c != null) && e ? (a != null && e.setStartValue(a), c != null && e.setEndValue(yt(c + 1))) : (y.value = { start: 0, end: s }, Bl.value += 1);
|
|
414
|
+
}
|
|
415
|
+
function pt() {
|
|
416
|
+
Kl();
|
|
417
|
+
}
|
|
418
|
+
function ge(a) {
|
|
419
|
+
return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(a);
|
|
420
|
+
}
|
|
421
|
+
const pa = $(() => ke.value.max + cl.value);
|
|
422
|
+
function Ge(a) {
|
|
423
|
+
return a / (ge(pa.value) ? pa.value : 1);
|
|
424
|
+
}
|
|
425
|
+
const ie = $(() => isNaN(Ge(cl.value)) ? n.value.bottom : n.value.bottom - n.value.height * Ge(cl.value));
|
|
426
|
+
function ka(a) {
|
|
427
|
+
const c = ![null, void 0].includes(l.value.chart.grid.labels.yAxis.scaleMin) && l.value.chart.grid.labels.yAxis.scaleMin > 0 && Dl.value >= 0 ? n.value.bottom : ie.value;
|
|
428
|
+
return a.value >= 0 ? T(c - a.y <= 0 ? 1e-5 : c - a.y) : T(a.y - ie.value <= 0 ? 1e-5 : a.y - ie.value);
|
|
429
|
+
}
|
|
430
|
+
function _a(a) {
|
|
431
|
+
return a.value >= 0 ? T(a.zeroPosition - a.y <= 0 ? 1e-5 : a.zeroPosition - a.y) : T(a.y - a.zeroPosition <= 0 ? 1e-5 : a.zeroPosition - a.y);
|
|
432
|
+
}
|
|
433
|
+
const Z = $(() => ({
|
|
434
|
+
bar: n.value.width / b.value / Ie.value.filter((a) => a.type === "bar").filter((a) => !te.value.includes(a.id)).length,
|
|
435
|
+
plot: n.value.width / b.value,
|
|
436
|
+
line: n.value.width / b.value
|
|
437
|
+
}));
|
|
438
|
+
function _e() {
|
|
439
|
+
return f.value.useIndividualScale && f.value.isStacked ? Z.value.line - n.value.width / b.value * 0.1 : Z.value.bar;
|
|
440
|
+
}
|
|
441
|
+
function Ll(a) {
|
|
442
|
+
return f.value.useIndividualScale && f.value.isStacked ? a.x + n.value.width / b.value * 0.05 : a.x + Z.value.bar / 2;
|
|
443
|
+
}
|
|
444
|
+
function wa(a) {
|
|
445
|
+
return a.value >= 0 ? a.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(ie.value) ? n.bottom.value : ie.value;
|
|
446
|
+
}
|
|
447
|
+
function Sa(a) {
|
|
448
|
+
return a.value >= 0 ? a.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(a.zeroPosition) ? 0 : a.zeroPosition;
|
|
449
|
+
}
|
|
450
|
+
function kt(a) {
|
|
451
|
+
const c = fe.value.map((e) => ({
|
|
452
|
+
name: e.name,
|
|
453
|
+
value: [null, void 0, NaN].includes(e.absoluteValues[a]) ? null : e.absoluteValues[a],
|
|
454
|
+
color: e.color,
|
|
455
|
+
type: e.type
|
|
456
|
+
}));
|
|
457
|
+
Ol(
|
|
458
|
+
"selectX",
|
|
459
|
+
{
|
|
460
|
+
dataset: c,
|
|
461
|
+
index: a,
|
|
462
|
+
indexLabel: l.value.chart.grid.labels.xAxisLabels.values[a]
|
|
463
|
+
}
|
|
464
|
+
), l.value.events.datapointClick && l.value.events.datapointClick({ datapoint: c, seriesIndex: a + y.value.start });
|
|
465
|
+
}
|
|
466
|
+
function _t() {
|
|
467
|
+
return Te.value.map((a) => ({
|
|
468
|
+
values: a.absoluteValues,
|
|
469
|
+
color: a.color,
|
|
470
|
+
name: a.name,
|
|
471
|
+
type: a.type
|
|
472
|
+
}));
|
|
473
|
+
}
|
|
474
|
+
async function wt({ scale: a = 2 } = {}) {
|
|
475
|
+
if (!je.value) return;
|
|
476
|
+
const { width: c, height: e } = je.value.getBoundingClientRect(), s = c / e, { imageUri: t, base64: r } = await ro({ domElement: je.value, base64: !0, img: !0, scale: a });
|
|
477
|
+
return {
|
|
478
|
+
imageUri: t,
|
|
479
|
+
base64: r,
|
|
480
|
+
title: l.value.chart.title.text,
|
|
481
|
+
width: c,
|
|
482
|
+
height: e,
|
|
483
|
+
aspectRatio: s
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
function $a(a) {
|
|
487
|
+
if (te.value.includes(a.id))
|
|
488
|
+
te.value = te.value.filter((c) => c !== a.id);
|
|
489
|
+
else {
|
|
490
|
+
if (te.value.length + 1 === Ie.value.length) return;
|
|
491
|
+
te.value.push(a.id);
|
|
492
|
+
}
|
|
493
|
+
Ol("selectLegend", fe.value.map((c) => ({
|
|
494
|
+
name: c.name,
|
|
495
|
+
values: c.absoluteValues,
|
|
496
|
+
color: c.color,
|
|
497
|
+
type: c.type
|
|
498
|
+
}))), Yl.value += 1;
|
|
499
|
+
}
|
|
500
|
+
const St = $(() => {
|
|
501
|
+
const a = l.value.chart.title.text || "Chart visualization", c = l.value.chart.title.subtitle.text || "";
|
|
502
|
+
return `${a}. ${c}`;
|
|
503
|
+
}), La = $(() => ({
|
|
504
|
+
linePlot: b.value > l.value.line.dot.hideAboveMaxSerieLength
|
|
505
|
+
})), $t = $(() => l.value.chart.userOptions.show && (!l.value.chart.title.show || !l.value.chart.title.text)), Lt = $(() => {
|
|
506
|
+
if (Array.isArray(l.value.chart.highlightArea))
|
|
507
|
+
return l.value.chart.highlightArea.map((c) => {
|
|
508
|
+
const e = Math.min(c.to, Ve.value - 1);
|
|
509
|
+
return {
|
|
510
|
+
...c,
|
|
511
|
+
span: c.from === e ? 1 : e < c.from ? 0 : e - c.from + 1
|
|
512
|
+
};
|
|
513
|
+
});
|
|
514
|
+
const a = {
|
|
515
|
+
...l.value.chart.highlightArea,
|
|
516
|
+
to: Math.min(l.value.chart.highlightArea.to, Ve.value - 1)
|
|
517
|
+
};
|
|
518
|
+
return [{ ...a, span: a.from === a.to ? 1 : a.to < a.from ? 0 : a.to - a.from + 1 }];
|
|
519
|
+
}), At = $(() => oa.value ? pe.value.map((a, c) => ({
|
|
520
|
+
...a,
|
|
521
|
+
series: Ye({
|
|
522
|
+
data: a.series,
|
|
523
|
+
threshold: l.value.downsample.threshold
|
|
524
|
+
}),
|
|
525
|
+
id: `uniqueId_${c}`
|
|
526
|
+
})) : pe.value), Mt = $(() => fe.value.map((a) => {
|
|
527
|
+
const c = a.absoluteValues.map((e) => [void 0, null].includes(e) ? 0 : e);
|
|
528
|
+
return {
|
|
529
|
+
id: a.id,
|
|
530
|
+
name: a.name,
|
|
531
|
+
color: a.color,
|
|
532
|
+
values: bt(b.value, c)
|
|
533
|
+
};
|
|
534
|
+
})), zt = $(() => ({
|
|
535
|
+
responsiveBreakpoint: l.value.table.responsiveBreakpoint,
|
|
536
|
+
roundingValues: l.value.table.rounding,
|
|
537
|
+
showAverage: !1,
|
|
538
|
+
showMedian: !1,
|
|
539
|
+
showTotal: !1,
|
|
540
|
+
fontFamily: l.value.chart.fontFamily,
|
|
541
|
+
prefix: l.value.chart.labels.prefix,
|
|
542
|
+
suffix: l.value.chart.labels.suffix,
|
|
543
|
+
colNames: J.value.map((a) => a.text),
|
|
544
|
+
thead: {
|
|
545
|
+
backgroundColor: l.value.table.th.backgroundColor,
|
|
546
|
+
color: l.value.table.th.color,
|
|
547
|
+
outline: l.value.table.th.outline
|
|
548
|
+
},
|
|
549
|
+
tbody: {
|
|
550
|
+
backgroundColor: l.value.table.td.backgroundColor,
|
|
551
|
+
color: l.value.table.td.color,
|
|
552
|
+
outline: l.value.table.td.outline
|
|
553
|
+
},
|
|
554
|
+
userOptions: {
|
|
555
|
+
show: !1
|
|
556
|
+
}
|
|
557
|
+
})), G = $(() => l.value.chart.grid.position === "middle" ? 0 : n.value.width / b.value / 2), De = $(() => qt(Te.value.filter((a) => !te.value.includes(a.id)))), _ = $(() => {
|
|
558
|
+
const a = Object.groupBy(De.value, (e) => e.scaleLabel), c = {};
|
|
559
|
+
for (const [e, s] of Object.entries(a)) {
|
|
560
|
+
const t = s.flatMap((r) => r.absoluteValues);
|
|
561
|
+
c[e] = {
|
|
562
|
+
min: Math.min(...t) || 0,
|
|
563
|
+
max: Math.max(...t) || 1,
|
|
564
|
+
groupId: `scale_group_${ea()}`
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
return c;
|
|
568
|
+
}), Ct = $(() => {
|
|
569
|
+
const a = Ie.value.filter((c) => c.type === "bar").filter((c) => !te.value.includes(c.id)).length;
|
|
570
|
+
return n.value.width / b.value / a - Oe.value * a;
|
|
571
|
+
}), Oe = $(() => Z.value.line * l.value.bar.periodGap), It = $(() => {
|
|
572
|
+
if (!l.value.chart.zoom.minimap.show) return [];
|
|
573
|
+
const a = At.value.filter((t) => !te.value.includes(t.id)), c = Math.max(...a.map((t) => t.series.length)), e = [];
|
|
574
|
+
for (let t = 0; t < c; t += 1)
|
|
575
|
+
e.push(a.map((r) => r.series[t] || 0).reduce((r, o) => (r || 0) + (o || 0), 0));
|
|
576
|
+
const s = Math.min(...e);
|
|
577
|
+
return e.map((t) => t + (s < 0 ? Math.abs(s) : 0));
|
|
578
|
+
}), vl = $(() => fe.value.map((a) => ({
|
|
579
|
+
slotAbsoluteIndex: a.slotAbsoluteIndex,
|
|
580
|
+
shape: a.shape || null,
|
|
581
|
+
name: a.name,
|
|
582
|
+
color: a.color,
|
|
583
|
+
type: a.type,
|
|
584
|
+
value: a.absoluteValues.find((c, e) => e === p.value),
|
|
585
|
+
comments: a.comments || [],
|
|
586
|
+
prefix: a.prefix || l.value.chart.labels.prefix,
|
|
587
|
+
suffix: a.suffix || l.value.chart.labels.suffix
|
|
588
|
+
}))), Aa = $(() => ke.value.ticks.map((a) => ({
|
|
589
|
+
y: a >= 0 ? ie.value - n.value.height * Ge(a) : ie.value + n.value.height * Ge(Math.abs(a)),
|
|
590
|
+
value: a,
|
|
591
|
+
prefix: l.value.chart.labels.prefix,
|
|
592
|
+
suffix: l.value.chart.labels.suffix
|
|
593
|
+
}))), Ma = $(() => {
|
|
594
|
+
const a = l.value.chart.annotations;
|
|
595
|
+
if (!a || !Array.isArray(a) || a.every((L) => !L.show)) return [];
|
|
596
|
+
const c = a.filter(
|
|
597
|
+
(L) => L.show && (L.yAxis.yTop != null || L.yAxis.yBottom != null)
|
|
598
|
+
);
|
|
599
|
+
if (!c.length) return [];
|
|
600
|
+
const { left: e, right: s } = n.value, t = ie.value, r = n.value.height, o = ke.value.min, F = ke.value.max - o, E = (L) => {
|
|
601
|
+
const C = (L - 0) / F;
|
|
602
|
+
return t - C * r;
|
|
603
|
+
};
|
|
604
|
+
return c.map((L) => {
|
|
605
|
+
const { yAxis: { yTop: C, yBottom: Y, label: w } } = L, N = C != null && Y != null && C !== Y, A = C == null ? null : E(C), K = Y == null ? null : E(Y), oe = xt(w.fontSize);
|
|
606
|
+
oe.font = `${w.fontSize}px sans-serif`;
|
|
607
|
+
const D = oe.measureText(w.text).width, xe = w.fontSize, Ae = (w.position === "start" ? e + w.padding.left : s - w.padding.right) + w.offsetX, de = (A != null && K != null ? Math.min(A, K) : A ?? K) - w.fontSize / 3 + w.offsetY - w.padding.top;
|
|
608
|
+
let P;
|
|
609
|
+
w.textAnchor === "middle" ? P = Ae - D / 2 - w.padding.left : w.textAnchor === "end" ? P = Ae - D - w.padding.right : P = Ae - w.padding.left;
|
|
610
|
+
const H = de - xe * 0.75 - w.padding.top;
|
|
611
|
+
return {
|
|
612
|
+
show: ![A, K, H].includes(NaN),
|
|
613
|
+
id: `annotation_y_${ea()}`,
|
|
614
|
+
hasArea: N,
|
|
615
|
+
areaHeight: N ? Math.abs(A - K) : 0,
|
|
616
|
+
yTop: A,
|
|
617
|
+
yBottom: K,
|
|
618
|
+
config: L.yAxis,
|
|
619
|
+
x1: e,
|
|
620
|
+
x2: s,
|
|
621
|
+
_text: { x: Ae, y: de },
|
|
622
|
+
_box: {
|
|
623
|
+
x: P,
|
|
624
|
+
y: H,
|
|
625
|
+
width: D + w.padding.left + w.padding.right,
|
|
626
|
+
height: xe + w.padding.top + w.padding.bottom,
|
|
627
|
+
fill: w.backgroundColor,
|
|
628
|
+
stroke: w.border.stroke,
|
|
629
|
+
rx: w.border.rx,
|
|
630
|
+
ry: w.border.ry,
|
|
631
|
+
strokeWidth: w.border.strokeWidth
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
});
|
|
635
|
+
}), Pe = $(() => {
|
|
636
|
+
const a = De.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), c = a.length, e = l.value.chart.grid.labels.yAxis.gap, s = f.value.isStacked, t = s ? e * (c - 1) : 0, r = n.value.height - t;
|
|
637
|
+
return a.filter((o) => o.type === "bar").map((o, B) => {
|
|
638
|
+
Jl(o);
|
|
639
|
+
const F = _.value[o.scaleLabel].min, E = _.value[o.scaleLabel].max;
|
|
640
|
+
o.absoluteValues.filter((V) => ![null, void 0].includes(V)).map((V) => (V - F) / (E - F));
|
|
641
|
+
const L = {
|
|
642
|
+
valueMin: F,
|
|
643
|
+
valueMax: E < 0 ? 0 : E
|
|
644
|
+
}, C = {
|
|
645
|
+
max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
|
|
646
|
+
min: o.scaleMin || Math.min(...o.absoluteValues.filter((V) => ![void 0, null].includes(V))) > 0 ? 0 : Math.min(...o.absoluteValues.filter((V) => ![null, void 0].includes(V)))
|
|
647
|
+
}, Y = o.scaleSteps || l.value.chart.grid.labels.yAxis.commonScaleSteps, w = 1.0000001, N = l.value.chart.grid.labels.yAxis.useNiceScale ? ml(C.min, C.max === C.min ? C.max * w : C.max, Y) : Ke(C.min, C.max === C.min ? C.max * w : C.max, Y), A = l.value.chart.grid.labels.yAxis.useNiceScale ? ml(L.valueMin, L.valueMax === L.valueMin ? L.valueMax * w : L.valueMax, Y) : Ke(L.valueMin, L.valueMax === L.valueMin ? L.valueMax * w : L.valueMax, Y), K = N.min >= 0 ? 0 : Math.abs(N.min), oe = 0, D = N.max + K, xe = A.max + Math.abs(oe), Ae = o.stackIndex, tl = c - 1 - Ae, de = s ? 1 - o.cumulatedStackRatio : 0, P = s ? r * de + e * tl : 0, H = s ? r * o.stackRatio : n.value.height, Q = n.value.bottom - P - H * K / D, he = n.value.bottom - P - H * oe / xe, ne = Te.value.filter((V) => V.type === "bar").filter((V) => !te.value.includes(V.id)).length, fl = o.series.map((V, ee) => {
|
|
648
|
+
const Re = f.value.useIndividualScale ? (o.absoluteValues[ee] + K) / D : Ge(V), qe = f.value.useIndividualScale && f.value.isStacked ? n.value.left + n.value.width / b.value * ee : n.value.left + Z.value.bar * B + Z.value.bar * ee * ne - Ct.value / 2 - B * Oe.value;
|
|
649
|
+
return {
|
|
650
|
+
yOffset: T(P),
|
|
651
|
+
individualHeight: T(H),
|
|
652
|
+
x: T(qe),
|
|
653
|
+
y: n.value.bottom - P - H * Re,
|
|
654
|
+
value: o.absoluteValues[ee],
|
|
655
|
+
zeroPosition: T(Q),
|
|
656
|
+
individualMax: T(D),
|
|
657
|
+
comment: o.comments && o.comments.slice(y.value.start, y.value.end)[ee] || ""
|
|
658
|
+
};
|
|
659
|
+
}), ce = o.absoluteValues.map((V) => A.min >= 0 ? (V - Math.abs(A.min)) / (A.max - Math.abs(A.min)) : (V + Math.abs(A.min)) / (A.max + Math.abs(A.min))), He = o.series.map((V, ee) => {
|
|
660
|
+
const Re = f.value.useIndividualScale && f.value.isStacked ? n.value.left + n.value.width / b.value * ee : n.value.left - Z.value.bar / 2 + Z.value.bar * B + Z.value.bar * ee * Te.value.filter((qe) => qe.type === "bar").filter((qe) => !te.value.includes(qe.id)).length;
|
|
661
|
+
return {
|
|
662
|
+
yOffset: T(P),
|
|
663
|
+
individualHeight: T(H),
|
|
664
|
+
x: T(Re),
|
|
665
|
+
y: T(n.value.bottom - T(P) - (T(H) * ce[ee] || 0)),
|
|
666
|
+
value: o.absoluteValues[ee],
|
|
667
|
+
zeroPosition: T(Q),
|
|
668
|
+
individualMax: T(D),
|
|
669
|
+
comment: o.comments && o.comments.slice(y.value.start, y.value.end)[ee] || ""
|
|
670
|
+
};
|
|
671
|
+
}), W = N.ticks.map((V) => ({
|
|
672
|
+
y: V >= 0 ? Q - H * (V / D) : Q + H * Math.abs(V) / D,
|
|
673
|
+
value: V,
|
|
674
|
+
prefix: o.prefix || l.value.chart.labels.prefix,
|
|
675
|
+
suffix: o.suffix || l.value.chart.labels.suffix,
|
|
676
|
+
datapoint: o
|
|
677
|
+
})), j = A.ticks.map((V) => {
|
|
678
|
+
const ee = (V - A.min) / (A.max - A.min);
|
|
679
|
+
return {
|
|
680
|
+
y: V >= 0 ? he - H * ee : he + H * ee,
|
|
681
|
+
value: V,
|
|
682
|
+
prefix: o.prefix || l.value.chart.labels.prefix,
|
|
683
|
+
suffix: o.suffix || l.value.chart.labels.suffix,
|
|
684
|
+
datapoint: o
|
|
685
|
+
};
|
|
686
|
+
});
|
|
687
|
+
return _.value[o.scaleLabel].name = o.name, _.value[o.scaleLabel].groupName = o.scaleLabel, _.value[o.scaleLabel].groupColor = l.value.chart.grid.labels.yAxis.groupColor || o.color, _.value[o.scaleLabel].color = o.color, _.value[o.scaleLabel].scaleYLabels = o.autoScaling ? j : W, _.value[o.scaleLabel].zeroPosition = o.autoScaling ? he : Q, _.value[o.scaleLabel].individualMax = o.autoScaling ? xe : D, _.value[o.scaleLabel].scaleLabel = o.scaleLabel, _.value[o.scaleLabel].id = o.id, _.value[o.scaleLabel].yOffset = P, _.value[o.scaleLabel].individualHeight = H, _.value[o.scaleLabel].autoScaleYLabels = j, _.value[o.scaleLabel].unique = De.value.filter((V) => V.scaleLabel === o.scaleLabel).length === 1, {
|
|
688
|
+
...o,
|
|
689
|
+
yOffset: P,
|
|
690
|
+
autoScaleYLabels: j,
|
|
691
|
+
individualHeight: H,
|
|
692
|
+
scaleYLabels: o.autoScaling ? j : W,
|
|
693
|
+
individualScale: o.autoScaling ? A : N,
|
|
694
|
+
individualMax: o.autoScaling ? xe : D,
|
|
695
|
+
zeroPosition: o.autoScaling ? he : Q,
|
|
696
|
+
plots: o.autoScaling ? He : fl,
|
|
697
|
+
groupId: _.value[o.scaleLabel].groupId
|
|
698
|
+
};
|
|
699
|
+
});
|
|
700
|
+
}), we = $(() => {
|
|
701
|
+
const a = De.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), c = a.length, e = l.value.chart.grid.labels.yAxis.gap, s = f.value.isStacked, t = s ? e * (c - 1) : 0, r = n.value.height - t;
|
|
702
|
+
return a.filter((o) => o.type === "line").map((o, B) => {
|
|
703
|
+
Jl(o);
|
|
704
|
+
const F = _.value[o.scaleLabel].min, E = _.value[o.scaleLabel].max;
|
|
705
|
+
o.absoluteValues.filter((I) => ![null, void 0].includes(I)).map((I) => (I - F) / (E - F));
|
|
706
|
+
const L = {
|
|
707
|
+
valueMin: F,
|
|
708
|
+
valueMax: E
|
|
709
|
+
}, C = {
|
|
710
|
+
max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
|
|
711
|
+
min: o.scaleMin || (Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues))
|
|
712
|
+
}, Y = o.scaleSteps || l.value.chart.grid.labels.yAxis.commonScaleSteps, w = 1.0000001, N = l.value.chart.grid.labels.yAxis.useNiceScale ? ml(C.min, C.max === C.min ? C.max * w : C.max, Y) : Ke(C.min, C.max === C.min ? C.max * w : C.max, Y), A = l.value.chart.grid.labels.yAxis.useNiceScale ? ml(L.valueMin, L.valueMax === L.valueMin ? L.valueMax * w : L.valueMax, Y) : Ke(L.valueMin, L.valueMax === L.valueMin ? L.valueMax * w : L.valueMax, Y), K = N.min >= 0 ? 0 : Math.abs(N.min), oe = 0, D = N.max + Math.abs(K), xe = A.max + Math.abs(oe), Ae = o.stackIndex, tl = c - 1 - Ae, de = s ? 1 - o.cumulatedStackRatio : 0, P = s ? r * de + e * tl : 0, H = s ? r * o.stackRatio : n.value.height, Q = n.value.bottom - P - H * K / D, he = n.value.bottom - P - H * oe / xe, ne = o.series.map((I, se) => {
|
|
713
|
+
const Ot = f.value.useIndividualScale ? (o.absoluteValues[se] + Math.abs(K)) / D : Ge(I);
|
|
714
|
+
return {
|
|
715
|
+
x: T(n.value.left + Z.value.line / 2 + Z.value.line * se),
|
|
716
|
+
y: T(n.value.bottom - P - H * Ot),
|
|
717
|
+
value: o.absoluteValues[se],
|
|
718
|
+
comment: o.comments && o.comments.slice(y.value.start, y.value.end)[se] || ""
|
|
719
|
+
};
|
|
720
|
+
}), fl = o.absoluteValues.map((I) => A.min >= 0 ? (I - Math.abs(A.min)) / (A.max - Math.abs(A.min)) : (I + Math.abs(A.min)) / (A.max + Math.abs(A.min))), ce = o.series.map((I, se) => [void 0, null].includes(o.absoluteValues[se]) ? {
|
|
721
|
+
x: T(n.value.left + Z.value.line / 2 + Z.value.line * se),
|
|
722
|
+
y: Q,
|
|
723
|
+
value: o.absoluteValues[se],
|
|
724
|
+
comment: o.comments && o.comments.slice(y.value.start, y.value.end)[se] || ""
|
|
725
|
+
} : {
|
|
726
|
+
x: T(n.value.left + Z.value.line / 2 + Z.value.line * se),
|
|
727
|
+
y: T(n.value.bottom - P - (H * fl[se] || 0)),
|
|
728
|
+
value: o.absoluteValues[se],
|
|
729
|
+
comment: o.comments && o.comments.slice(y.value.start, y.value.end)[se] || ""
|
|
730
|
+
}), He = l.value.line.cutNullValues ? Fa(ne) : Ea(ne.filter((I) => I.value !== null)), W = l.value.line.cutNullValues ? Fa(ce) : Ea(ce.filter((I) => I.value !== null)), j = l.value.line.cutNullValues ? Wa(ne) : Xa(ne.filter((I) => I.value !== null)), V = l.value.line.cutNullValues ? Wa(ce) : Xa(ce.filter((I) => I.value !== null)), ee = N.ticks.map((I) => ({
|
|
731
|
+
y: I >= 0 ? Q - H * (I / D) : Q + H * Math.abs(I) / D,
|
|
732
|
+
value: I,
|
|
733
|
+
prefix: o.prefix || l.value.chart.labels.prefix,
|
|
734
|
+
suffix: o.suffix || l.value.chart.labels.suffix,
|
|
735
|
+
datapoint: o
|
|
736
|
+
})), Re = A.ticks.map((I) => {
|
|
737
|
+
const se = (I - A.min) / (A.max - A.min);
|
|
738
|
+
return {
|
|
739
|
+
y: I >= 0 ? he - H * se : he + H * se,
|
|
740
|
+
value: I,
|
|
741
|
+
prefix: o.prefix || l.value.chart.labels.prefix,
|
|
742
|
+
suffix: o.suffix || l.value.chart.labels.suffix,
|
|
743
|
+
datapoint: o
|
|
744
|
+
};
|
|
745
|
+
});
|
|
746
|
+
_.value[o.scaleLabel].name = o.name, _.value[o.scaleLabel].groupName = o.scaleLabel, _.value[o.scaleLabel].groupColor = l.value.chart.grid.labels.yAxis.groupColor || o.color, _.value[o.scaleLabel].color = o.color, _.value[o.scaleLabel].scaleYLabels = o.autoScaling ? Re : ee, _.value[o.scaleLabel].zeroPosition = o.autoScaling ? he : Q, _.value[o.scaleLabel].individualMax = o.autoScaling ? xe : D, _.value[o.scaleLabel].scaleLabel = o.scaleLabel, _.value[o.scaleLabel].id = o.id, _.value[o.scaleLabel].yOffset = P, _.value[o.scaleLabel].individualHeight = H, _.value[o.scaleLabel].autoScaleYLabels = Re, _.value[o.scaleLabel].unique = De.value.filter((I) => I.scaleLabel === o.scaleLabel).length === 1;
|
|
747
|
+
const qe = f.value.useIndividualScale ? o.autoScaling ? he : Q : ie.value, gl = Math.max(Math.max(o.autoScaling ? he : ee.at(-1) ? ee.at(-1).y : 0, n.value.top), qe);
|
|
748
|
+
return {
|
|
749
|
+
...o,
|
|
750
|
+
yOffset: P,
|
|
751
|
+
autoScaleYLabels: Re,
|
|
752
|
+
individualHeight: H,
|
|
753
|
+
scaleYLabels: o.autoScaling ? Re : ee,
|
|
754
|
+
individualScale: o.autoScaling ? A : N,
|
|
755
|
+
individualMax: o.autoScaling ? xe : D,
|
|
756
|
+
zeroPosition: o.autoScaling ? he : Q,
|
|
757
|
+
curve: o.autoScaling ? W : He,
|
|
758
|
+
plots: o.autoScaling ? ce : ne,
|
|
759
|
+
area: o.useArea ? f.value.useIndividualScale ? l.value.line.cutNullValues ? Ga(
|
|
760
|
+
o.autoScaling ? ce : ne,
|
|
761
|
+
gl
|
|
762
|
+
) : Da(
|
|
763
|
+
o.autoScaling ? ce.filter((I) => I.value !== null) : ne.filter((I) => I.value !== null),
|
|
764
|
+
gl
|
|
765
|
+
) : l.value.line.cutNullValues ? Ga(ne, gl) : Da(ne.filter((I) => I.value !== null), gl) : "",
|
|
766
|
+
curveAreas: o.useArea ? Ut(
|
|
767
|
+
o.autoScaling ? l.value.line.cutNullValues ? ce : ce.filter((I) => I.value !== null) : l.value.line.cutNullValues ? ne : ne.filter((I) => I.value !== null),
|
|
768
|
+
gl,
|
|
769
|
+
l.value.line.cutNullValues
|
|
770
|
+
) : [],
|
|
771
|
+
straight: o.autoScaling ? V : j,
|
|
772
|
+
groupId: _.value[o.scaleLabel].groupId
|
|
773
|
+
};
|
|
774
|
+
});
|
|
775
|
+
}), Le = $(() => {
|
|
776
|
+
const a = De.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), c = a.length, e = l.value.chart.grid.labels.yAxis.gap, s = f.value.isStacked, t = s ? e * (c - 1) : 0, r = n.value.height - t;
|
|
777
|
+
return a.filter((o) => o.type === "plot").map((o) => {
|
|
778
|
+
Jl(o);
|
|
779
|
+
const B = _.value[o.scaleLabel].min, F = _.value[o.scaleLabel].max;
|
|
780
|
+
o.absoluteValues.filter((W) => ![null, void 0].includes(W)).map((W) => (W - B) / (F - B));
|
|
781
|
+
const E = {
|
|
782
|
+
valueMin: B,
|
|
783
|
+
valueMax: F
|
|
784
|
+
}, L = {
|
|
785
|
+
max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
|
|
786
|
+
min: o.scaleMin || Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues)
|
|
787
|
+
}, C = o.scaleSteps || l.value.chart.grid.labels.yAxis.commonScaleSteps, Y = 1.0000001, w = Ke(L.min, L.max === L.min ? L.max * Y : L.max, C), N = Ke(E.valueMin, E.valueMax === E.valueMin ? E.valueMax * Y : E.valueMax, C), A = w.min >= 0 ? 0 : Math.abs(w.min), K = 0, oe = w.max + A, D = N.max + Math.abs(K), xe = o.stackIndex, Ae = c - 1 - xe, tl = s ? 1 - o.cumulatedStackRatio : 0, de = s ? r * tl + e * Ae : 0, P = s ? r * o.stackRatio : n.value.height, H = n.value.bottom - de - P * A / oe, Q = n.value.bottom - de - P * K / D, he = o.series.map((W, j) => {
|
|
788
|
+
const V = f.value.useIndividualScale ? (o.absoluteValues[j] + Math.abs(A)) / oe : Ge(W);
|
|
789
|
+
return {
|
|
790
|
+
x: T(n.value.left + Z.value.plot / 2 + Z.value.plot * j),
|
|
791
|
+
y: T(n.value.bottom - de - P * V),
|
|
792
|
+
value: o.absoluteValues[j],
|
|
793
|
+
comment: o.comments && o.comments.slice(y.value.start, y.value.end)[j] || ""
|
|
794
|
+
};
|
|
795
|
+
}), ne = o.absoluteValues.map((W) => N.min >= 0 ? (W - Math.abs(N.min)) / (N.max - Math.abs(N.min)) : (W + Math.abs(N.min)) / (N.max + Math.abs(N.min))), fl = o.series.map((W, j) => ({
|
|
796
|
+
x: T(n.value.left + Z.value.plot / 2 + Z.value.plot * j),
|
|
797
|
+
y: T(n.value.bottom - de - (P * ne[j] || 0)),
|
|
798
|
+
value: o.absoluteValues[j],
|
|
799
|
+
comment: o.comments && o.comments.slice(y.value.start, y.value.end)[j] || ""
|
|
800
|
+
})), ce = w.ticks.map((W) => ({
|
|
801
|
+
y: W >= 0 ? H - P * (W / oe) : H + P * Math.abs(W) / oe,
|
|
802
|
+
value: W,
|
|
803
|
+
prefix: o.prefix || l.value.chart.labels.prefix,
|
|
804
|
+
suffix: o.suffix || l.value.chart.labels.suffix,
|
|
805
|
+
datapoint: o
|
|
806
|
+
})), He = N.ticks.map((W) => {
|
|
807
|
+
const j = (W - N.min) / (N.max - N.min);
|
|
808
|
+
return {
|
|
809
|
+
y: W >= 0 ? Q - P * j : Q + P * j,
|
|
810
|
+
value: W,
|
|
811
|
+
prefix: o.prefix || l.value.chart.labels.prefix,
|
|
812
|
+
suffix: o.suffix || l.value.chart.labels.suffix,
|
|
813
|
+
datapoint: o
|
|
814
|
+
};
|
|
815
|
+
});
|
|
816
|
+
return _.value[o.scaleLabel].name = o.name, _.value[o.scaleLabel].groupName = o.scaleLabel, _.value[o.scaleLabel].groupColor = l.value.chart.grid.labels.yAxis.groupColor || o.color, _.value[o.scaleLabel].color = o.color, _.value[o.scaleLabel].scaleYLabels = o.autoScaling ? He : ce, _.value[o.scaleLabel].zeroPosition = o.autoScaling ? Q : H, _.value[o.scaleLabel].individualMax = o.autoScaling ? D : oe, _.value[o.scaleLabel].scaleLabel = o.scaleLabel, _.value[o.scaleLabel].id = o.id, _.value[o.scaleLabel].yOffset = de, _.value[o.scaleLabel].individualHeight = P, _.value[o.scaleLabel].autoScaleYLabels = He, _.value[o.scaleLabel].unique = De.value.filter((W) => W.scaleLabel === o.scaleLabel).length === 1, {
|
|
817
|
+
...o,
|
|
818
|
+
yOffset: de,
|
|
819
|
+
autoScaleYLabels: He,
|
|
820
|
+
individualHeight: P,
|
|
821
|
+
scaleYLabels: o.autoScaling ? He : ce,
|
|
822
|
+
individualScale: o.autoScaling ? N : w,
|
|
823
|
+
individualMax: o.autoScaling ? D : oe,
|
|
824
|
+
zeroPosition: o.autoScaling ? Q : H,
|
|
825
|
+
plots: o.autoScaling ? fl : he,
|
|
826
|
+
groupId: _.value[o.scaleLabel].groupId
|
|
827
|
+
};
|
|
828
|
+
});
|
|
829
|
+
}), dl = $(() => {
|
|
830
|
+
const a = we.value.map((r) => ({
|
|
831
|
+
name: r.name,
|
|
832
|
+
color: r.color,
|
|
833
|
+
scale: r.individualScale,
|
|
834
|
+
scaleYLabels: r.scaleYLabels,
|
|
835
|
+
zero: r.zeroPosition,
|
|
836
|
+
max: r.individualMax,
|
|
837
|
+
scaleLabel: r.scaleLabel || "",
|
|
838
|
+
id: r.id,
|
|
839
|
+
yOffset: r.yOffset || 0,
|
|
840
|
+
individualHeight: r.individualHeight || n.value.height,
|
|
841
|
+
autoScaleYLabels: r.autoScaleYLabels
|
|
842
|
+
})), c = Pe.value.map((r) => ({
|
|
843
|
+
name: r.name,
|
|
844
|
+
color: r.color,
|
|
845
|
+
scale: r.individualScale,
|
|
846
|
+
scaleYLabels: r.scaleYLabels,
|
|
847
|
+
zero: r.zeroPosition,
|
|
848
|
+
max: r.individualMax,
|
|
849
|
+
scaleLabel: r.scaleLabel || "",
|
|
850
|
+
id: r.id,
|
|
851
|
+
yOffset: r.yOffset || 0,
|
|
852
|
+
individualHeight: r.individualHeight || n.value.height
|
|
853
|
+
})), e = Le.value.map((r) => ({
|
|
854
|
+
name: r.name,
|
|
855
|
+
color: r.color,
|
|
856
|
+
scale: r.individualScale,
|
|
857
|
+
scaleYLabels: r.scaleYLabels,
|
|
858
|
+
// FIX
|
|
859
|
+
zero: r.zeroPosition,
|
|
860
|
+
max: r.individualMax,
|
|
861
|
+
scaleLabel: r.scaleLabel || "",
|
|
862
|
+
id: r.id,
|
|
863
|
+
yOffset: r.yOffset || 0,
|
|
864
|
+
individualHeight: r.individualHeight || n.value.height
|
|
865
|
+
})), s = f.value.useIndividualScale && !f.value.isStacked ? Object.values(_.value) : [...a, ...c, ...e], t = s.flatMap((r) => r).length;
|
|
866
|
+
return s.flatMap((r, o) => {
|
|
867
|
+
let B = 0;
|
|
868
|
+
B = f.value.isStacked ? n.value.left : n.value.left / t * (o + 1);
|
|
869
|
+
const F = f.value.useIndividualScale && !f.value.isStacked ? r.unique ? r.name : r.groupName : r.name;
|
|
870
|
+
return {
|
|
871
|
+
unique: r.unique,
|
|
872
|
+
id: r.id,
|
|
873
|
+
groupId: r.groupId,
|
|
874
|
+
scaleLabel: r.scaleLabel,
|
|
875
|
+
name: re(
|
|
876
|
+
l.value.chart.grid.labels.yAxis.serieNameFormatter,
|
|
877
|
+
F,
|
|
878
|
+
F,
|
|
879
|
+
r
|
|
880
|
+
),
|
|
881
|
+
color: f.value.useIndividualScale && !f.value.isStacked ? r.unique ? r.color : r.groupColor : r.color,
|
|
882
|
+
scale: r.scale,
|
|
883
|
+
yOffset: r.yOffset,
|
|
884
|
+
individualHeight: r.individualHeight,
|
|
885
|
+
x: B,
|
|
886
|
+
yLabels: r.scaleYLabels || r.scale.ticks.map((E) => ({
|
|
887
|
+
y: E >= 0 ? r.zero - r.individualHeight * (E / r.max) : r.zero + r.individualHeight * Math.abs(E) / r.max,
|
|
888
|
+
value: E
|
|
889
|
+
}))
|
|
890
|
+
};
|
|
891
|
+
});
|
|
892
|
+
}), za = $(() => ({
|
|
893
|
+
datapoint: vl.value,
|
|
894
|
+
seriesIndex: p.value,
|
|
895
|
+
series: Te.value,
|
|
896
|
+
bars: Pe.value,
|
|
897
|
+
lines: we.value,
|
|
898
|
+
plots: Le.value,
|
|
899
|
+
config: l.value
|
|
900
|
+
})), Tt = $(() => {
|
|
901
|
+
let a = "", c = vl.value.map((t) => t.value).filter((t) => zl(t) && t !== null).reduce((t, r) => Math.abs(t) + Math.abs(r), 0);
|
|
902
|
+
const e = J.value[p.value], s = l.value.chart.tooltip.customFormat;
|
|
903
|
+
return Zt(s) && Jt(() => s({
|
|
904
|
+
absoluteIndex: p.value + y.value.start,
|
|
905
|
+
seriesIndex: p.value,
|
|
906
|
+
datapoint: vl.value,
|
|
907
|
+
series: Te.value,
|
|
908
|
+
bars: Pe.value,
|
|
909
|
+
lines: we.value,
|
|
910
|
+
plots: Le.value,
|
|
911
|
+
config: l.value
|
|
912
|
+
})) ? s({
|
|
913
|
+
absoluteIndex: p.value + y.value.start,
|
|
914
|
+
seriesIndex: p.value,
|
|
915
|
+
datapoint: vl.value,
|
|
916
|
+
series: Te.value,
|
|
917
|
+
bars: Pe.value,
|
|
918
|
+
lines: we.value,
|
|
919
|
+
plots: Le.value,
|
|
920
|
+
config: l.value
|
|
921
|
+
}) : (e && e.text && l.value.chart.tooltip.showTimeLabel && (a += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${l.value.chart.tooltip.borderColor}; width:100%">${e.text}</div>`), vl.value.forEach((t) => {
|
|
922
|
+
if (zl(t.value)) {
|
|
923
|
+
let r = "", o = "";
|
|
924
|
+
switch (il.value[t.type]) {
|
|
925
|
+
case "bar":
|
|
926
|
+
r = `<svg viewBox="0 0 40 40" height="14" width="14">${ta.pattern ? `<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${t.color}" />` : ""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${ta.pattern ? `url(#pattern_${U.value}_${t.slotAbsoluteIndex}` : t.color}" /></svg>`;
|
|
927
|
+
break;
|
|
928
|
+
case "line":
|
|
929
|
+
!t.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(t.shape) ? o = `<circle cx="10" cy="8" r="4" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${t.color}" />` : t.shape === "triangle" ? o = `<path d="${ze({ plot: { x: 10, y: 8 }, radius: 4, sides: 3, rotation: 0.52 }).path}" fill="${t.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : t.shape === "square" ? o = `<path d="${ze({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0.8 }).path}" fill="${t.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : t.shape === "diamond" ? o = `<path d="${ze({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0 }).path}" fill="${t.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : t.shape === "pentagon" ? o = `<path d="${ze({ plot: { x: 10, y: 8 }, radius: 4, sides: 5, rotation: 0.95 }).path}" fill="${t.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : t.shape === "hexagon" ? o = `<path d="${ze({ plot: { x: 10, y: 8 }, radius: 4, sides: 6, rotation: 0 }).path}" fill="${t.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : t.shape === "star" && (o = `<polygon stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${t.color}" points="${qa({ plot: { x: 10, y: 8 }, radius: 4 })}" />`), r = `<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${t.color}" />${o}</svg>`;
|
|
930
|
+
break;
|
|
931
|
+
case "plot":
|
|
932
|
+
if (!t.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(t.shape)) {
|
|
933
|
+
r = `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${t.color}" /></svg>`;
|
|
934
|
+
break;
|
|
935
|
+
}
|
|
936
|
+
if (t.shape === "star") {
|
|
937
|
+
r = `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${t.color}" points="${qa({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>`;
|
|
938
|
+
break;
|
|
939
|
+
}
|
|
940
|
+
if (t.shape === "triangle") {
|
|
941
|
+
r = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${ze({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${t.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
942
|
+
break;
|
|
943
|
+
}
|
|
944
|
+
if (t.shape === "square") {
|
|
945
|
+
r = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${ze({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${t.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
946
|
+
break;
|
|
947
|
+
}
|
|
948
|
+
if (t.shape === "diamond") {
|
|
949
|
+
r = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${ze({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${t.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
950
|
+
break;
|
|
951
|
+
}
|
|
952
|
+
if (t.shape === "pentagon") {
|
|
953
|
+
r = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${ze({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${t.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
954
|
+
break;
|
|
955
|
+
}
|
|
956
|
+
if (t.shape === "hexagon") {
|
|
957
|
+
r = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${ze({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${t.color}" stroke="${l.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
958
|
+
break;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
a += `<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${r}</div> ${t.name}: <b>${l.value.chart.tooltip.showValue ? re(
|
|
962
|
+
t.type === "line" ? l.value.line.labels.formatter : t.type === "bar" ? l.value.bar.labels.formatter : l.value.plot.labels.formatter,
|
|
963
|
+
t.value,
|
|
964
|
+
me({
|
|
965
|
+
p: t.prefix,
|
|
966
|
+
v: t.value,
|
|
967
|
+
s: t.suffix,
|
|
968
|
+
r: l.value.chart.tooltip.roundingValue
|
|
969
|
+
}),
|
|
970
|
+
{ datapoint: t }
|
|
971
|
+
) : ""}</b> ${l.value.chart.tooltip.showPercentage ? `(${me({
|
|
972
|
+
v: T(Math.abs(t.value) / c * 100),
|
|
973
|
+
s: "%",
|
|
974
|
+
r: l.value.chart.tooltip.roundingPercentage
|
|
975
|
+
})})` : ""}</div>`, l.value.chart.comments.showInTooltip && t.comments.length && t.comments.slice(y.value.start, y.value.end)[p.value] && (a += `<div class="vue-data-ui-tooltip-comment" style="background:${t.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${t.color}">${t.comments.slice(y.value.start, y.value.end)[p.value]}</div>`);
|
|
976
|
+
}
|
|
977
|
+
}), `<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${l.value.chart.tooltip.color}">${a}</div>`);
|
|
978
|
+
}), Ca = $(() => {
|
|
979
|
+
if (Ie.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
|
|
980
|
+
const a = fe.value.map((e) => ({
|
|
981
|
+
label: e.name,
|
|
982
|
+
color: e.color,
|
|
983
|
+
type: e.type
|
|
984
|
+
})), c = [];
|
|
985
|
+
return J.value.forEach((e, s) => {
|
|
986
|
+
const t = [e.text];
|
|
987
|
+
fe.value.forEach((r) => {
|
|
988
|
+
t.push(ge(r.absoluteValues[s]) ? Number(r.absoluteValues[s].toFixed(l.value.table.rounding)) : "");
|
|
989
|
+
}), c.push(t);
|
|
990
|
+
}), { head: a, body: c };
|
|
991
|
+
}), Al = $(() => {
|
|
992
|
+
const a = l.value.table.showSum;
|
|
993
|
+
let c = [""].concat(fe.value.map((r) => r.name));
|
|
994
|
+
a && (c = c.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>'));
|
|
995
|
+
let e = [];
|
|
996
|
+
for (let r = 0; r < b.value; r += 1) {
|
|
997
|
+
const o = fe.value.map((B) => B.absoluteValues[r] ?? 0).reduce((B, F) => B + F, 0);
|
|
998
|
+
e.push(
|
|
999
|
+
[
|
|
1000
|
+
J.value[r].text ?? "-"
|
|
1001
|
+
].concat(fe.value.map(
|
|
1002
|
+
(B) => re(
|
|
1003
|
+
B.type === "line" ? l.value.line.labels.formatter : B.type === "bar" ? l.value.bar.labels.formatter : l.value.plot.labels.formatter,
|
|
1004
|
+
B.absoluteValues[r] ?? 0,
|
|
1005
|
+
me({
|
|
1006
|
+
p: B.prefix || l.value.chart.labels.prefix,
|
|
1007
|
+
v: B.absoluteValues[r] ?? 0,
|
|
1008
|
+
s: B.suffix || l.value.chart.labels.suffix,
|
|
1009
|
+
r: l.value.table.rounding
|
|
1010
|
+
})
|
|
1011
|
+
)
|
|
1012
|
+
)).concat(a ? (o ?? 0).toFixed(l.value.table.rounding) : [])
|
|
1013
|
+
);
|
|
1014
|
+
}
|
|
1015
|
+
const s = {
|
|
1016
|
+
th: {
|
|
1017
|
+
backgroundColor: l.value.table.th.backgroundColor,
|
|
1018
|
+
color: l.value.table.th.color,
|
|
1019
|
+
outline: l.value.table.th.outline
|
|
1020
|
+
},
|
|
1021
|
+
td: {
|
|
1022
|
+
backgroundColor: l.value.table.td.backgroundColor,
|
|
1023
|
+
color: l.value.table.td.color,
|
|
1024
|
+
outline: l.value.table.td.outline
|
|
1025
|
+
},
|
|
1026
|
+
breakpoint: l.value.table.responsiveBreakpoint
|
|
1027
|
+
}, t = [l.value.table.columnNames.period].concat(fe.value.map((r) => r.name)).concat(l.value.table.columnNames.total);
|
|
1028
|
+
return { head: c, body: e, config: s, colNames: t };
|
|
1029
|
+
});
|
|
1030
|
+
function Ia(a = null) {
|
|
1031
|
+
const c = [[l.value.chart.title.text], [l.value.chart.title.subtitle.text], [""]], e = ["", ...Ca.value.head.map((o) => o.label)], s = Ca.value.body, t = c.concat([e]).concat(s), r = lo(t);
|
|
1032
|
+
a ? a(r) : ao({ csvContent: r, title: l.value.chart.title.text || "vue-ui-xy" });
|
|
1033
|
+
}
|
|
1034
|
+
function Ta(a, c = null) {
|
|
1035
|
+
sa.value = a;
|
|
1036
|
+
const e = fe.value.map((s) => ({
|
|
1037
|
+
name: s.name,
|
|
1038
|
+
value: [null, void 0, NaN].includes(s.absoluteValues[c]) ? null : s.absoluteValues[c],
|
|
1039
|
+
color: s.color,
|
|
1040
|
+
type: s.type
|
|
1041
|
+
}));
|
|
1042
|
+
a ? (p.value = c, l.value.events.datapointEnter && l.value.events.datapointEnter({ datapoint: e, seriesIndex: c + y.value.start })) : (p.value = null, l.value.events.datapointLeave && l.value.events.datapointLeave({ datapoint: e, seriesIndex: c + y.value.start }));
|
|
1043
|
+
}
|
|
1044
|
+
function Oa() {
|
|
1045
|
+
f.value.showTable = !f.value.showTable;
|
|
1046
|
+
}
|
|
1047
|
+
function Na() {
|
|
1048
|
+
f.value.dataLabels.show = !f.value.dataLabels.show;
|
|
1049
|
+
}
|
|
1050
|
+
function Va() {
|
|
1051
|
+
f.value.showTooltip = !f.value.showTooltip;
|
|
1052
|
+
}
|
|
1053
|
+
function Pa(a) {
|
|
1054
|
+
al.value = a, ua.value += 1;
|
|
1055
|
+
}
|
|
1056
|
+
function Ha() {
|
|
1057
|
+
if (!l.value.responsiveProportionalSizing) {
|
|
1058
|
+
m.value.dataLabels = l.value.chart.grid.labels.fontSize, m.value.yAxis = l.value.chart.grid.labels.axis.fontSize, m.value.xAxis = l.value.chart.grid.labels.xAxisLabels.fontSize, m.value.plotLabels = l.value.chart.labels.fontSize, $e.value.plot = l.value.plot.radius, $e.value.line = l.value.line.radius;
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1061
|
+
m.value.dataLabels = ol({
|
|
1062
|
+
relator: ve.value,
|
|
1063
|
+
adjuster: 400,
|
|
1064
|
+
source: l.value.chart.grid.labels.fontSize,
|
|
1065
|
+
threshold: 10,
|
|
1066
|
+
fallback: 10
|
|
1067
|
+
}), m.value.yAxis = ol({
|
|
1068
|
+
relator: ae.value,
|
|
1069
|
+
adjuster: 1e3,
|
|
1070
|
+
source: l.value.chart.grid.labels.axis.fontSize,
|
|
1071
|
+
threshold: 10,
|
|
1072
|
+
fallback: 10
|
|
1073
|
+
}), m.value.xAxis = ol({
|
|
1074
|
+
relator: ae.value,
|
|
1075
|
+
adjuster: 1e3,
|
|
1076
|
+
source: l.value.chart.grid.labels.xAxisLabels.fontSize,
|
|
1077
|
+
threshold: 10,
|
|
1078
|
+
fallback: 10
|
|
1079
|
+
}), m.value.plotLabels = ol({
|
|
1080
|
+
relator: ae.value,
|
|
1081
|
+
adjuster: 800,
|
|
1082
|
+
source: l.value.chart.labels.fontSize,
|
|
1083
|
+
threshold: 10,
|
|
1084
|
+
fallback: 10
|
|
1085
|
+
}), $e.value.plot = ol({
|
|
1086
|
+
relator: ae.value,
|
|
1087
|
+
adjuster: 800,
|
|
1088
|
+
source: l.value.plot.radius,
|
|
1089
|
+
threshold: 1,
|
|
1090
|
+
fallback: 1
|
|
1091
|
+
}), $e.value.line = ol({
|
|
1092
|
+
relator: ae.value,
|
|
1093
|
+
adjuster: 800,
|
|
1094
|
+
source: l.value.line.radius,
|
|
1095
|
+
threshold: 1,
|
|
1096
|
+
fallback: 1
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
const hl = $(() => !!l.value.debug);
|
|
1100
|
+
function Ra() {
|
|
1101
|
+
Ua(g.dataset) ? (la({
|
|
1102
|
+
componentName: "VueUiXy",
|
|
1103
|
+
type: "dataset",
|
|
1104
|
+
debug: hl.value
|
|
1105
|
+
}), _l.value = !0) : g.dataset.forEach((c, e) => {
|
|
1106
|
+
[null, void 0].includes(c.name) && (la({
|
|
1107
|
+
componentName: "VueUiXy",
|
|
1108
|
+
type: "datasetSerieAttribute",
|
|
1109
|
+
property: "name (string)",
|
|
1110
|
+
index: e,
|
|
1111
|
+
debug: hl.value
|
|
1112
|
+
}), _l.value = !0);
|
|
1113
|
+
}), hl.value && g.dataset.forEach((c) => {
|
|
1114
|
+
c.series.forEach((e, s) => {
|
|
1115
|
+
zl(e) || console.warn(`VueUiXy has detected an unsafe value in your dataset:
|
|
1116
|
+
-----> The serie '${c.name}' contains the value '${e}' at index ${s}.
|
|
1117
|
+
'${e}' was converted to null to allow the chart to display.`);
|
|
1118
|
+
});
|
|
1119
|
+
}), Ua(g.dataset) || (_l.value = l.value.loading), na.value = l.value.chart.userOptions.showOnChartHover, Fl.value = l.value.chart.userOptions.keepStateOnChartLeave, pl.value = !l.value.chart.userOptions.showOnChartHover, f.value = {
|
|
1120
|
+
dataLabels: {
|
|
1121
|
+
show: !0
|
|
1122
|
+
},
|
|
1123
|
+
showTooltip: l.value.chart.tooltip.show === !0,
|
|
1124
|
+
showTable: l.value.showTable === !0,
|
|
1125
|
+
isStacked: l.value.chart.grid.labels.yAxis.stacked,
|
|
1126
|
+
useIndividualScale: l.value.chart.grid.labels.yAxis.useIndividualScale
|
|
1127
|
+
};
|
|
1128
|
+
const a = 12;
|
|
1129
|
+
if (l.value.responsive) {
|
|
1130
|
+
const e = je.value.parentNode;
|
|
1131
|
+
We.value && (We.value.unobserve(Rl.value), We.value.disconnect());
|
|
1132
|
+
const { height: s, width: t } = e.getBoundingClientRect();
|
|
1133
|
+
let r = null, o = 0;
|
|
1134
|
+
l.value.chart.title.show && sl.value && (r = sl.value, o = r.getBoundingClientRect().height);
|
|
1135
|
+
let B = null, F = 0;
|
|
1136
|
+
l.value.chart.zoom.show && Ve.value > 6 && Wl.value && Ne.value && Ne.value.$el && (B = Ne.value.$el, F = B.getBoundingClientRect().height);
|
|
1137
|
+
let E = null, L = 0;
|
|
1138
|
+
l.value.chart.legend.show && el.value && (E = el.value, L = E.getBoundingClientRect().height);
|
|
1139
|
+
let C = 0;
|
|
1140
|
+
ul.value && (C = ul.value.getBoundingClientRect().height);
|
|
1141
|
+
let Y = 0;
|
|
1142
|
+
rl.value && (Y = rl.value.getBoundingClientRect().height), ve.value = s - o - L - F - C - Y - a, ae.value = t, bl.value = `0 0 ${ae.value < 0 ? 10 : ae.value} ${ve.value < 0 ? 10 : ve.value}`, Ha();
|
|
1143
|
+
const w = new ResizeObserver((N) => {
|
|
1144
|
+
for (const A of N)
|
|
1145
|
+
l.value.chart.title.show && sl.value ? o = sl.value.getBoundingClientRect().height : o = 0, Ne.value && Ne.value.$el ? F = Ne.value.$el.getBoundingClientRect().height : F = 0, el.value ? L = el.value.getBoundingClientRect().height : L = 0, ul.value ? C = ul.value.getBoundingClientRect().height : C = 0, rl.value ? Y = rl.value.getBoundingClientRect().height : Y = 0, requestAnimationFrame(() => {
|
|
1146
|
+
ve.value = A.contentRect.height - o - L - F - C - Y - a, ae.value = A.contentBoxSize[0].inlineSize, bl.value = `0 0 ${ae.value < 0 ? 10 : ae.value} ${ve.value < 0 ? 10 : ve.value}`, Ha();
|
|
1147
|
+
});
|
|
1148
|
+
});
|
|
1149
|
+
We.value = w, Rl.value = e, w.observe(e);
|
|
1150
|
+
} else
|
|
1151
|
+
ve.value = l.value.chart.height, ae.value = l.value.chart.width, m.value.dataLabels = l.value.chart.grid.labels.fontSize, m.value.yAxis = l.value.chart.grid.labels.axis.fontSize, m.value.xAxis = l.value.chart.grid.labels.xAxisLabels.fontSize, m.value.plotLabels = l.value.chart.labels.fontSize, $e.value.plot = l.value.plot.radius, $e.value.line = l.value.line.radius, bl.value = `0 0 ${ae.value} ${ve.value}`;
|
|
1152
|
+
}
|
|
1153
|
+
return Ba(() => {
|
|
1154
|
+
Ra(), Kl(), document.addEventListener("mousemove", (a) => {
|
|
1155
|
+
rt.value = {
|
|
1156
|
+
x: a.clientX,
|
|
1157
|
+
y: a.clientY
|
|
1158
|
+
};
|
|
1159
|
+
}), document.addEventListener("scroll", xa);
|
|
1160
|
+
}), Ya(() => {
|
|
1161
|
+
document.removeEventListener("scroll", xa), We.value && (We.value.unobserve(Rl.value), We.value.disconnect());
|
|
1162
|
+
}), oo({
|
|
1163
|
+
timeLabelsEls: ll,
|
|
1164
|
+
timeLabels: J,
|
|
1165
|
+
slicer: y,
|
|
1166
|
+
configRef: l,
|
|
1167
|
+
rotationPath: ["chart", "grid", "labels", "xAxisLabels", "rotation"],
|
|
1168
|
+
autoRotatePath: ["chart", "grid", "labels", "xAxisLabels", "autoRotate"],
|
|
1169
|
+
isAutoSize: ct
|
|
1170
|
+
}), Ml(() => g.dataset, (a) => {
|
|
1171
|
+
Array.isArray(a) && a.length > 0 && (_l.value = !1), Ve.value = Math.max(...pe.value.map((c) => Ye({
|
|
1172
|
+
data: c.series,
|
|
1173
|
+
threshold: l.value.downsample.threshold
|
|
1174
|
+
}).length)), y.value = {
|
|
1175
|
+
start: 0,
|
|
1176
|
+
end: Ve.value
|
|
1177
|
+
}, Bl.value += 1, Yl.value += 1;
|
|
1178
|
+
}, { deep: !0 }), Ml(() => g.config, (a) => {
|
|
1179
|
+
Xl.value || (l.value = El()), Ra(), ia.value += 1, ra.value += 1, f.value = {
|
|
1180
|
+
dataLabels: {
|
|
1181
|
+
show: !0
|
|
1182
|
+
},
|
|
1183
|
+
showTooltip: l.value.chart.tooltip.show === !0,
|
|
1184
|
+
showTable: l.value.showTable === !0,
|
|
1185
|
+
isStacked: l.value.chart.grid.labels.yAxis.stacked,
|
|
1186
|
+
useIndividualScale: l.value.chart.grid.labels.yAxis.useIndividualScale
|
|
1187
|
+
};
|
|
1188
|
+
}, { deep: !0 }), Ml(l, () => {
|
|
1189
|
+
f.value = {
|
|
1190
|
+
dataLabels: {
|
|
1191
|
+
show: !0
|
|
1192
|
+
},
|
|
1193
|
+
showTooltip: l.value.chart.tooltip.show === !0,
|
|
1194
|
+
showTable: l.value.showTable === !0,
|
|
1195
|
+
isStacked: l.value.chart.grid.labels.yAxis.stacked,
|
|
1196
|
+
useIndividualScale: l.value.chart.grid.labels.yAxis.useIndividualScale
|
|
1197
|
+
};
|
|
1198
|
+
}, { immediate: !0 }), Za({
|
|
1199
|
+
getData: _t,
|
|
1200
|
+
getImage: wt,
|
|
1201
|
+
generatePdf: va,
|
|
1202
|
+
generateImage: da,
|
|
1203
|
+
generateCsv: Ia,
|
|
1204
|
+
toggleStack: ya,
|
|
1205
|
+
toggleTable: Oa,
|
|
1206
|
+
toggleLabels: Na,
|
|
1207
|
+
toggleTooltip: Va,
|
|
1208
|
+
toggleAnnotator: Zl,
|
|
1209
|
+
toggleFullscreen: Pa
|
|
1210
|
+
}), (a, c) => (u(), i("div", {
|
|
1211
|
+
id: `vue-ui-xy_${U.value}`,
|
|
1212
|
+
class: Ue(`vue-ui-xy ${al.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${l.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1213
|
+
ref_key: "chart",
|
|
1214
|
+
ref: je,
|
|
1215
|
+
style: z(`background:${l.value.chart.backgroundColor}; color:${l.value.chart.color};width:100%;font-family:${l.value.chart.fontFamily};${l.value.responsive ? "height: 100%" : ""}`),
|
|
1216
|
+
onMouseenter: c[6] || (c[6] = () => ma(!0)),
|
|
1217
|
+
onMouseleave: c[7] || (c[7] = () => ma(!1))
|
|
1218
|
+
}, [
|
|
1219
|
+
l.value.chart.userOptions.buttons.annotator && ye.value ? (u(), Me(v(ot), {
|
|
1220
|
+
key: 0,
|
|
1221
|
+
svgRef: ye.value,
|
|
1222
|
+
backgroundColor: l.value.chart.backgroundColor,
|
|
1223
|
+
color: l.value.chart.color,
|
|
1224
|
+
active: yl.value,
|
|
1225
|
+
onClose: Zl
|
|
1226
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : d("", !0),
|
|
1227
|
+
$t.value ? (u(), i("div", {
|
|
1228
|
+
key: 1,
|
|
1229
|
+
ref_key: "noTitle",
|
|
1230
|
+
ref: rl,
|
|
1231
|
+
class: "vue-data-ui-no-title-space",
|
|
1232
|
+
style: "height:36px; width: 100%; background:transparent"
|
|
1233
|
+
}, null, 512)) : d("", !0),
|
|
1234
|
+
l.value.chart.title.show ? (u(), i("div", {
|
|
1235
|
+
key: 2,
|
|
1236
|
+
ref_key: "chartTitle",
|
|
1237
|
+
ref: sl,
|
|
1238
|
+
class: "vue-ui-xy-title",
|
|
1239
|
+
style: z(`font-family:${l.value.chart.fontFamily}`)
|
|
1240
|
+
}, [
|
|
1241
|
+
(u(), Me(uo, {
|
|
1242
|
+
key: `title_${ia.value}`,
|
|
1243
|
+
config: {
|
|
1244
|
+
title: {
|
|
1245
|
+
cy: "xy-div-title",
|
|
1246
|
+
...l.value.chart.title
|
|
1247
|
+
},
|
|
1248
|
+
subtitle: {
|
|
1249
|
+
cy: "xy-div-subtitle",
|
|
1250
|
+
...l.value.chart.title.subtitle
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}, null, 8, ["config"]))
|
|
1254
|
+
], 4)) : d("", !0),
|
|
1255
|
+
l.value.chart.userOptions.show && (Fl.value || pl.value) ? (u(), Me(v(ja), {
|
|
1256
|
+
ref: "defails",
|
|
1257
|
+
key: `user_options_${ua.value}`,
|
|
1258
|
+
backgroundColor: l.value.chart.backgroundColor,
|
|
1259
|
+
color: l.value.chart.color,
|
|
1260
|
+
isPrinting: v(Gl),
|
|
1261
|
+
isImaging: v(ca),
|
|
1262
|
+
uid: U.value,
|
|
1263
|
+
hasTooltip: l.value.chart.userOptions.buttons.tooltip && l.value.chart.tooltip.show,
|
|
1264
|
+
hasPdf: l.value.chart.userOptions.buttons.pdf,
|
|
1265
|
+
hasXls: l.value.chart.userOptions.buttons.csv,
|
|
1266
|
+
hasImg: l.value.chart.userOptions.buttons.img,
|
|
1267
|
+
hasLabel: l.value.chart.userOptions.buttons.labels,
|
|
1268
|
+
hasTable: l.value.chart.userOptions.buttons.table,
|
|
1269
|
+
hasStack: Tl.dataset.length > 1 && l.value.chart.userOptions.buttons.stack,
|
|
1270
|
+
hasFullscreen: l.value.chart.userOptions.buttons.fullscreen,
|
|
1271
|
+
isStacked: f.value.isStacked,
|
|
1272
|
+
isFullscreen: al.value,
|
|
1273
|
+
chartElement: a.$refs.chart,
|
|
1274
|
+
position: l.value.chart.userOptions.position,
|
|
1275
|
+
isTooltip: f.value.showTooltip,
|
|
1276
|
+
titles: { ...l.value.chart.userOptions.buttonTitles },
|
|
1277
|
+
hasAnnotator: l.value.chart.userOptions.buttons.annotator,
|
|
1278
|
+
isAnnotation: yl.value,
|
|
1279
|
+
callbacks: l.value.chart.userOptions.callbacks,
|
|
1280
|
+
printScale: l.value.chart.userOptions.print.scale,
|
|
1281
|
+
onToggleFullscreen: Pa,
|
|
1282
|
+
onGeneratePdf: v(va),
|
|
1283
|
+
onGenerateCsv: Ia,
|
|
1284
|
+
onGenerateImage: v(da),
|
|
1285
|
+
onToggleTable: Oa,
|
|
1286
|
+
onToggleLabels: Na,
|
|
1287
|
+
onToggleStack: ya,
|
|
1288
|
+
onToggleTooltip: Va,
|
|
1289
|
+
onToggleAnnotator: Zl,
|
|
1290
|
+
style: z({
|
|
1291
|
+
visibility: Fl.value ? pl.value ? "visible" : "hidden" : "visible"
|
|
1292
|
+
})
|
|
1293
|
+
}, Rt({ _: 2 }, [
|
|
1294
|
+
a.$slots.menuIcon ? {
|
|
1295
|
+
name: "menuIcon",
|
|
1296
|
+
fn: ue(({ isOpen: e, color: s }) => [
|
|
1297
|
+
q(a.$slots, "menuIcon", Ze(Je({ isOpen: e, color: s })), void 0, !0)
|
|
1298
|
+
]),
|
|
1299
|
+
key: "0"
|
|
1300
|
+
} : void 0,
|
|
1301
|
+
a.$slots.optionTooltip ? {
|
|
1302
|
+
name: "optionTooltip",
|
|
1303
|
+
fn: ue(() => [
|
|
1304
|
+
q(a.$slots, "optionTooltip", {}, void 0, !0)
|
|
1305
|
+
]),
|
|
1306
|
+
key: "1"
|
|
1307
|
+
} : void 0,
|
|
1308
|
+
a.$slots.optionPdf ? {
|
|
1309
|
+
name: "optionPdf",
|
|
1310
|
+
fn: ue(() => [
|
|
1311
|
+
q(a.$slots, "optionPdf", {}, void 0, !0)
|
|
1312
|
+
]),
|
|
1313
|
+
key: "2"
|
|
1314
|
+
} : void 0,
|
|
1315
|
+
a.$slots.optionCsv ? {
|
|
1316
|
+
name: "optionCsv",
|
|
1317
|
+
fn: ue(() => [
|
|
1318
|
+
q(a.$slots, "optionCsv", {}, void 0, !0)
|
|
1319
|
+
]),
|
|
1320
|
+
key: "3"
|
|
1321
|
+
} : void 0,
|
|
1322
|
+
a.$slots.optionImg ? {
|
|
1323
|
+
name: "optionImg",
|
|
1324
|
+
fn: ue(() => [
|
|
1325
|
+
q(a.$slots, "optionImg", {}, void 0, !0)
|
|
1326
|
+
]),
|
|
1327
|
+
key: "4"
|
|
1328
|
+
} : void 0,
|
|
1329
|
+
a.$slots.optionTable ? {
|
|
1330
|
+
name: "optionTable",
|
|
1331
|
+
fn: ue(() => [
|
|
1332
|
+
q(a.$slots, "optionTable", {}, void 0, !0)
|
|
1333
|
+
]),
|
|
1334
|
+
key: "5"
|
|
1335
|
+
} : void 0,
|
|
1336
|
+
a.$slots.optionLabels ? {
|
|
1337
|
+
name: "optionLabels",
|
|
1338
|
+
fn: ue(() => [
|
|
1339
|
+
q(a.$slots, "optionLabels", {}, void 0, !0)
|
|
1340
|
+
]),
|
|
1341
|
+
key: "6"
|
|
1342
|
+
} : void 0,
|
|
1343
|
+
a.$slots.optionStack ? {
|
|
1344
|
+
name: "optionStack",
|
|
1345
|
+
fn: ue(() => [
|
|
1346
|
+
q(a.$slots, "optionStack", {}, void 0, !0)
|
|
1347
|
+
]),
|
|
1348
|
+
key: "7"
|
|
1349
|
+
} : void 0,
|
|
1350
|
+
a.$slots.optionFullscreen ? {
|
|
1351
|
+
name: "optionFullscreen",
|
|
1352
|
+
fn: ue(({ toggleFullscreen: e, isFullscreen: s }) => [
|
|
1353
|
+
q(a.$slots, "optionFullscreen", Ze(Je({ toggleFullscreen: e, isFullscreen: s })), void 0, !0)
|
|
1354
|
+
]),
|
|
1355
|
+
key: "8"
|
|
1356
|
+
} : void 0,
|
|
1357
|
+
a.$slots.optionAnnotator ? {
|
|
1358
|
+
name: "optionAnnotator",
|
|
1359
|
+
fn: ue(({ toggleAnnotator: e, isAnnotator: s }) => [
|
|
1360
|
+
q(a.$slots, "optionAnnotator", Ze(Je({ toggleAnnotator: e, isAnnotator: s })), void 0, !0)
|
|
1361
|
+
]),
|
|
1362
|
+
key: "9"
|
|
1363
|
+
} : void 0
|
|
1364
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasLabel", "hasTable", "hasStack", "hasFullscreen", "isStacked", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : d("", !0),
|
|
1365
|
+
(u(), i("svg", {
|
|
1366
|
+
ref_key: "svgRef",
|
|
1367
|
+
ref: ye,
|
|
1368
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1369
|
+
class: Ue([{ "vue-data-ui-fullscreen--on": al.value, "vue-data-ui-fulscreen--off": !al.value }, "vue-ui-xy-svg vue-data-ui-svg"]),
|
|
1370
|
+
width: "100%",
|
|
1371
|
+
viewBox: bl.value,
|
|
1372
|
+
style: z({
|
|
1373
|
+
background: "transparent",
|
|
1374
|
+
color: l.value.chart.color,
|
|
1375
|
+
fontFamily: l.value.chart.fontFamily
|
|
1376
|
+
}),
|
|
1377
|
+
"aria-label": St.value,
|
|
1378
|
+
role: "img",
|
|
1379
|
+
"aria-live": "polite",
|
|
1380
|
+
preserveAspectRatio: "xMidYMid"
|
|
1381
|
+
}, [
|
|
1382
|
+
x("g", {
|
|
1383
|
+
ref_key: "G",
|
|
1384
|
+
ref: ut,
|
|
1385
|
+
class: "vue-data-ui-g"
|
|
1386
|
+
}, [
|
|
1387
|
+
xl(v(tt)),
|
|
1388
|
+
a.$slots["chart-background"] ? (u(), i("foreignObject", {
|
|
1389
|
+
key: 0,
|
|
1390
|
+
x: n.value.left + G.value < 0 ? 0 : n.value.left + G.value,
|
|
1391
|
+
y: n.value.top,
|
|
1392
|
+
width: n.value.width - (l.value.chart.grid.position === "middle" ? 0 : n.value.width / b.value) < 0 ? 0 : n.value.width - (l.value.chart.grid.position === "middle" ? 0 : n.value.width / b.value),
|
|
1393
|
+
height: n.value.height < 0 ? 0 : n.value.height,
|
|
1394
|
+
style: {
|
|
1395
|
+
pointerEvents: "none"
|
|
1396
|
+
}
|
|
1397
|
+
}, [
|
|
1398
|
+
q(a.$slots, "chart-background", {}, void 0, !0)
|
|
1399
|
+
], 8, xo)) : d("", !0),
|
|
1400
|
+
b.value > 0 ? (u(), i("g", mo, [
|
|
1401
|
+
x("g", bo, [
|
|
1402
|
+
l.value.chart.grid.labels.xAxis.showBaseline ? (u(), i("line", {
|
|
1403
|
+
key: 0,
|
|
1404
|
+
stroke: l.value.chart.grid.stroke,
|
|
1405
|
+
"stroke-width": "1",
|
|
1406
|
+
x1: n.value.left + G.value,
|
|
1407
|
+
x2: n.value.right - G.value,
|
|
1408
|
+
y1: v(R)(n.value.bottom),
|
|
1409
|
+
y2: v(R)(n.value.bottom),
|
|
1410
|
+
"stroke-linecap": "round",
|
|
1411
|
+
style: { animation: "none !important" }
|
|
1412
|
+
}, null, 8, yo)) : d("", !0),
|
|
1413
|
+
f.value.useIndividualScale ? l.value.chart.grid.showHorizontalLines ? (u(!0), i(h, { key: 2 }, k(dl.value, (e) => (u(), i("g", null, [
|
|
1414
|
+
e.id === M.value && e.yLabels.length ? (u(!0), i(h, { key: 0 }, k(e.yLabels, (s) => (u(), i("line", {
|
|
1415
|
+
x1: n.value.left + G.value,
|
|
1416
|
+
x2: n.value.right - G.value,
|
|
1417
|
+
y1: v(R)(s.y),
|
|
1418
|
+
y2: v(R)(s.y),
|
|
1419
|
+
stroke: e.color,
|
|
1420
|
+
"stroke-width": 0.5,
|
|
1421
|
+
"stroke-linecap": "round",
|
|
1422
|
+
style: { animation: "none !important" }
|
|
1423
|
+
}, null, 8, wo))), 256)) : e.yLabels.length ? (u(!0), i(h, { key: 1 }, k(e.yLabels, (s) => (u(), i("line", {
|
|
1424
|
+
x1: n.value.left + G.value,
|
|
1425
|
+
x2: n.value.right - G.value,
|
|
1426
|
+
y1: v(R)(s.y),
|
|
1427
|
+
y2: v(R)(s.y),
|
|
1428
|
+
stroke: l.value.chart.grid.stroke,
|
|
1429
|
+
"stroke-width": 0.5,
|
|
1430
|
+
"stroke-linecap": "round",
|
|
1431
|
+
style: { animation: "none !important" }
|
|
1432
|
+
}, null, 8, So))), 256)) : d("", !0)
|
|
1433
|
+
]))), 256)) : d("", !0) : (u(), i(h, { key: 1 }, [
|
|
1434
|
+
l.value.chart.grid.labels.yAxis.showBaseline ? (u(), i("line", {
|
|
1435
|
+
key: 0,
|
|
1436
|
+
stroke: l.value.chart.grid.stroke,
|
|
1437
|
+
"stroke-width": "1",
|
|
1438
|
+
x1: n.value.left + G.value,
|
|
1439
|
+
x2: n.value.left + G.value,
|
|
1440
|
+
y1: v(R)(n.value.top),
|
|
1441
|
+
y2: v(R)(n.value.bottom),
|
|
1442
|
+
"stroke-linecap": "round",
|
|
1443
|
+
style: { animation: "none !important" }
|
|
1444
|
+
}, null, 8, po)) : d("", !0),
|
|
1445
|
+
l.value.chart.grid.showHorizontalLines ? (u(), i("g", ko, [
|
|
1446
|
+
(u(!0), i(h, null, k(Aa.value, (e) => (u(), i("line", {
|
|
1447
|
+
x1: n.value.left + G.value,
|
|
1448
|
+
x2: n.value.right,
|
|
1449
|
+
y1: v(R)(e.y),
|
|
1450
|
+
y2: v(R)(e.y),
|
|
1451
|
+
stroke: l.value.chart.grid.stroke,
|
|
1452
|
+
"stroke-width": 0.5,
|
|
1453
|
+
"stroke-linecap": "round",
|
|
1454
|
+
style: { animation: "none !important" }
|
|
1455
|
+
}, null, 8, _o))), 256))
|
|
1456
|
+
])) : d("", !0)
|
|
1457
|
+
], 64)),
|
|
1458
|
+
l.value.chart.grid.showVerticalLines ? (u(), i("g", $o, [
|
|
1459
|
+
x("path", {
|
|
1460
|
+
d: ft.value,
|
|
1461
|
+
"stroke-width": 0.5,
|
|
1462
|
+
stroke: l.value.chart.grid.stroke,
|
|
1463
|
+
"stroke-linecap": "round",
|
|
1464
|
+
style: { animation: "none !important" }
|
|
1465
|
+
}, null, 8, Lo)
|
|
1466
|
+
])) : d("", !0),
|
|
1467
|
+
l.value.chart.grid.labels.xAxisLabels.show ? (u(), i("g", Ao, [
|
|
1468
|
+
x("path", {
|
|
1469
|
+
d: gt.value,
|
|
1470
|
+
stroke: l.value.chart.grid.stroke,
|
|
1471
|
+
"stroke-width": 1,
|
|
1472
|
+
"stroke-linecap": "round",
|
|
1473
|
+
style: { animation: "none !important" }
|
|
1474
|
+
}, null, 8, Mo)
|
|
1475
|
+
])) : d("", !0)
|
|
1476
|
+
]),
|
|
1477
|
+
(u(!0), i(h, null, k(Pe.value, (e, s) => (u(), i("defs", {
|
|
1478
|
+
key: `def_rect_${s}`
|
|
1479
|
+
}, [
|
|
1480
|
+
x("linearGradient", {
|
|
1481
|
+
id: `rectGradient_pos_${s}_${U.value}`,
|
|
1482
|
+
x2: "0%",
|
|
1483
|
+
y2: "100%"
|
|
1484
|
+
}, [
|
|
1485
|
+
x("stop", {
|
|
1486
|
+
offset: "0%",
|
|
1487
|
+
"stop-color": e.color
|
|
1488
|
+
}, null, 8, Co),
|
|
1489
|
+
x("stop", {
|
|
1490
|
+
offset: "62%",
|
|
1491
|
+
"stop-color": `${v(Qe)(e.color, 0.02)}`
|
|
1492
|
+
}, null, 8, Io),
|
|
1493
|
+
x("stop", {
|
|
1494
|
+
offset: "100%",
|
|
1495
|
+
"stop-color": `${v(Qe)(e.color, 0.05)}`
|
|
1496
|
+
}, null, 8, To)
|
|
1497
|
+
], 8, zo),
|
|
1498
|
+
x("linearGradient", {
|
|
1499
|
+
id: `rectGradient_neg_${s}_${U.value}`,
|
|
1500
|
+
x2: "0%",
|
|
1501
|
+
y2: "100%"
|
|
1502
|
+
}, [
|
|
1503
|
+
x("stop", {
|
|
1504
|
+
offset: "0%",
|
|
1505
|
+
"stop-color": `${v(Qe)(e.color, 0.05)}`
|
|
1506
|
+
}, null, 8, No),
|
|
1507
|
+
x("stop", {
|
|
1508
|
+
offset: "38%",
|
|
1509
|
+
"stop-color": `${v(Qe)(e.color, 0.02)}`
|
|
1510
|
+
}, null, 8, Vo),
|
|
1511
|
+
x("stop", {
|
|
1512
|
+
offset: "100%",
|
|
1513
|
+
"stop-color": e.color
|
|
1514
|
+
}, null, 8, Po)
|
|
1515
|
+
], 8, Oo)
|
|
1516
|
+
]))), 128)),
|
|
1517
|
+
(u(!0), i(h, null, k(Le.value, (e, s) => (u(), i("defs", {
|
|
1518
|
+
key: `def_plot_${s}`
|
|
1519
|
+
}, [
|
|
1520
|
+
x("radialGradient", {
|
|
1521
|
+
id: `plotGradient_${s}_${U.value}`,
|
|
1522
|
+
cx: "50%",
|
|
1523
|
+
cy: "50%",
|
|
1524
|
+
r: "50%",
|
|
1525
|
+
fx: "50%",
|
|
1526
|
+
fy: "50%"
|
|
1527
|
+
}, [
|
|
1528
|
+
x("stop", {
|
|
1529
|
+
offset: "0%",
|
|
1530
|
+
"stop-color": `${v(Qe)(e.color, 0.05)}`
|
|
1531
|
+
}, null, 8, Ro),
|
|
1532
|
+
x("stop", {
|
|
1533
|
+
offset: "100%",
|
|
1534
|
+
"stop-color": e.color
|
|
1535
|
+
}, null, 8, Bo)
|
|
1536
|
+
], 8, Ho)
|
|
1537
|
+
]))), 128)),
|
|
1538
|
+
(u(!0), i(h, null, k(we.value, (e, s) => (u(), i("defs", {
|
|
1539
|
+
key: `def_line_${s}`
|
|
1540
|
+
}, [
|
|
1541
|
+
x("radialGradient", {
|
|
1542
|
+
id: `lineGradient_${s}_${U.value}`,
|
|
1543
|
+
cx: "50%",
|
|
1544
|
+
cy: "50%",
|
|
1545
|
+
r: "50%",
|
|
1546
|
+
fx: "50%",
|
|
1547
|
+
fy: "50%"
|
|
1548
|
+
}, [
|
|
1549
|
+
x("stop", {
|
|
1550
|
+
offset: "0%",
|
|
1551
|
+
"stop-color": `${v(Qe)(e.color, 0.05)}`
|
|
1552
|
+
}, null, 8, Fo),
|
|
1553
|
+
x("stop", {
|
|
1554
|
+
offset: "100%",
|
|
1555
|
+
"stop-color": e.color
|
|
1556
|
+
}, null, 8, Eo)
|
|
1557
|
+
], 8, Yo),
|
|
1558
|
+
x("linearGradient", {
|
|
1559
|
+
id: `areaGradient_${s}_${U.value}`,
|
|
1560
|
+
x1: "0%",
|
|
1561
|
+
x2: "100%",
|
|
1562
|
+
y1: "0%",
|
|
1563
|
+
y2: "0%"
|
|
1564
|
+
}, [
|
|
1565
|
+
x("stop", {
|
|
1566
|
+
offset: "0%",
|
|
1567
|
+
"stop-color": `${v(Se)(v(Qe)(e.color, 0.03), l.value.line.area.opacity)}`
|
|
1568
|
+
}, null, 8, Xo),
|
|
1569
|
+
x("stop", {
|
|
1570
|
+
offset: "100%",
|
|
1571
|
+
"stop-color": `${v(Se)(e.color, l.value.line.area.opacity)}`
|
|
1572
|
+
}, null, 8, Go)
|
|
1573
|
+
], 8, Wo)
|
|
1574
|
+
]))), 128)),
|
|
1575
|
+
(u(!0), i(h, null, k(Lt.value, (e) => (u(), i("g", null, [
|
|
1576
|
+
e.show ? (u(), i(h, { key: 0 }, [
|
|
1577
|
+
(u(!0), i(h, null, k(e.span, (s, t) => (u(), i("g", null, [
|
|
1578
|
+
x("rect", {
|
|
1579
|
+
style: z({
|
|
1580
|
+
transition: "none",
|
|
1581
|
+
opacity: e.from + t >= y.value.start && e.from + t <= y.value.end - 1 ? 1 : 0
|
|
1582
|
+
}),
|
|
1583
|
+
x: n.value.left + n.value.width / b.value * (e.from + t - y.value.start),
|
|
1584
|
+
y: n.value.top,
|
|
1585
|
+
height: n.value.height < 0 ? 10 : n.value.height,
|
|
1586
|
+
width: n.value.width / b.value < 0 ? 1e-5 : n.value.width / b.value,
|
|
1587
|
+
fill: v(Se)(e.color, e.opacity)
|
|
1588
|
+
}, null, 12, Do)
|
|
1589
|
+
]))), 256)),
|
|
1590
|
+
(u(!0), i(h, null, k(e.span, (s, t) => (u(), i("g", null, [
|
|
1591
|
+
e.caption.text && t === 0 ? (u(), i("foreignObject", {
|
|
1592
|
+
key: 0,
|
|
1593
|
+
x: n.value.left + n.value.width / b.value * (e.from + t - y.value.start) - (e.caption.width === "auto" ? 0 : e.caption.width / 2 - n.value.width / b.value * e.span / 2),
|
|
1594
|
+
y: n.value.top + e.caption.offsetY,
|
|
1595
|
+
style: z({
|
|
1596
|
+
overflow: "visible",
|
|
1597
|
+
opacity: e.to >= y.value.start && e.from < y.value.end ? 1 : 0
|
|
1598
|
+
}),
|
|
1599
|
+
height: "1",
|
|
1600
|
+
width: e.caption.width === "auto" ? n.value.width / b.value * e.span : e.caption.width
|
|
1601
|
+
}, [
|
|
1602
|
+
x("div", {
|
|
1603
|
+
style: z(`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"}`)
|
|
1604
|
+
}, le(e.caption.text), 5)
|
|
1605
|
+
], 12, qo)) : d("", !0)
|
|
1606
|
+
]))), 256))
|
|
1607
|
+
], 64)) : d("", !0)
|
|
1608
|
+
]))), 256)),
|
|
1609
|
+
Ul.value ? (u(), i("g", Uo, [
|
|
1610
|
+
(u(!0), i(h, null, k(b.value, (e, s) => (u(), i("g", {
|
|
1611
|
+
key: `tooltip_trap_highlighter_${s}`
|
|
1612
|
+
}, [
|
|
1613
|
+
x("rect", {
|
|
1614
|
+
x: n.value.left + n.value.width / b.value * s,
|
|
1615
|
+
y: n.value.top,
|
|
1616
|
+
height: n.value.height < 0 ? 10 : n.value.height,
|
|
1617
|
+
width: n.value.width / b.value < 0 ? 1e-5 : n.value.width / b.value,
|
|
1618
|
+
fill: [O.value, p.value, Xe.value].includes(s) ? v(Se)(l.value.chart.highlighter.color, l.value.chart.highlighter.opacity) : "transparent"
|
|
1619
|
+
}, null, 8, Zo)
|
|
1620
|
+
]))), 128))
|
|
1621
|
+
])) : d("", !0),
|
|
1622
|
+
Pe.value.length ? (u(!0), i(h, { key: 1 }, k(Pe.value, (e, s) => (u(), i("g", {
|
|
1623
|
+
key: `serie_bar_${s}`,
|
|
1624
|
+
class: Ue(`serie_bar_${s}`),
|
|
1625
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1626
|
+
}, [
|
|
1627
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i("g", {
|
|
1628
|
+
key: `bar_plot_${s}_${r}`
|
|
1629
|
+
}, [
|
|
1630
|
+
ge(t.value) ? (u(), i("rect", {
|
|
1631
|
+
key: 0,
|
|
1632
|
+
x: Ll(t),
|
|
1633
|
+
y: f.value.useIndividualScale ? Sa(t) : wa(t),
|
|
1634
|
+
height: f.value.useIndividualScale ? Math.abs(_a(t)) : Math.abs(ka(t)),
|
|
1635
|
+
width: _e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Oe.value) < 0 ? 1e-5 : _e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Oe.value),
|
|
1636
|
+
rx: l.value.bar.borderRadius,
|
|
1637
|
+
fill: l.value.bar.useGradient ? t.value >= 0 ? `url(#rectGradient_pos_${s}_${U.value})` : `url(#rectGradient_neg_${s}_${U.value})` : e.color,
|
|
1638
|
+
stroke: l.value.bar.border.useSerieColor ? e.color : l.value.bar.border.stroke,
|
|
1639
|
+
"stroke-width": l.value.bar.border.strokeWidth,
|
|
1640
|
+
style: z(`${v(Xl) ? "transition:none !important" : ""}`)
|
|
1641
|
+
}, null, 12, Jo)) : d("", !0),
|
|
1642
|
+
ge(t.value) && a.$slots.pattern ? (u(), i("rect", {
|
|
1643
|
+
key: 1,
|
|
1644
|
+
x: Ll(t),
|
|
1645
|
+
y: f.value.useIndividualScale ? Sa(t) : wa(t),
|
|
1646
|
+
height: f.value.useIndividualScale ? Math.abs(_a(t)) : Math.abs(ka(t)),
|
|
1647
|
+
width: _e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Oe.value) < 0 ? 1e-5 : _e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Oe.value),
|
|
1648
|
+
rx: l.value.bar.borderRadius,
|
|
1649
|
+
fill: `url(#pattern_${U.value}_${e.slotAbsoluteIndex})`,
|
|
1650
|
+
stroke: l.value.bar.border.useSerieColor ? e.color : l.value.bar.border.stroke,
|
|
1651
|
+
"stroke-width": l.value.bar.border.strokeWidth
|
|
1652
|
+
}, null, 8, Ko)) : d("", !0),
|
|
1653
|
+
t.comment && l.value.chart.comments.show ? (u(), i("foreignObject", {
|
|
1654
|
+
key: 2,
|
|
1655
|
+
style: { overflow: "visible" },
|
|
1656
|
+
height: "12",
|
|
1657
|
+
width: (_e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Oe.value) < 0 ? 1e-5 : _e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Oe.value) / 2) + l.value.chart.comments.width,
|
|
1658
|
+
x: Ll(t) - l.value.chart.comments.width / 2 + l.value.chart.comments.offsetX,
|
|
1659
|
+
y: v(T)(t.y) + l.value.chart.comments.offsetY + 6
|
|
1660
|
+
}, [
|
|
1661
|
+
q(a.$slots, "plot-comment", {
|
|
1662
|
+
plot: { ...t, color: e.color, seriesIndex: s, datapointIndex: r }
|
|
1663
|
+
}, void 0, !0)
|
|
1664
|
+
], 8, Qo)) : d("", !0)
|
|
1665
|
+
]))), 128)),
|
|
1666
|
+
Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(v(X)(e.plots).trend) ? (u(), i("g", jo, [
|
|
1667
|
+
x("defs", null, [
|
|
1668
|
+
x("marker", {
|
|
1669
|
+
id: `bar_arrow_${s}`,
|
|
1670
|
+
markerWidth: 7,
|
|
1671
|
+
markerHeight: 7,
|
|
1672
|
+
refX: "0",
|
|
1673
|
+
refY: 7 / 2,
|
|
1674
|
+
orient: "auto"
|
|
1675
|
+
}, [
|
|
1676
|
+
x("polygon", {
|
|
1677
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
1678
|
+
fill: e.color
|
|
1679
|
+
}, null, 8, ls)
|
|
1680
|
+
], 8, es)
|
|
1681
|
+
]),
|
|
1682
|
+
e.plots.length > 1 ? (u(), i("line", {
|
|
1683
|
+
key: 0,
|
|
1684
|
+
x1: v(X)(e.plots).x1 + _e(),
|
|
1685
|
+
x2: v(X)(e.plots).x2 + _e(),
|
|
1686
|
+
y1: v(R)(v(X)(e.plots).y1),
|
|
1687
|
+
y2: v(R)(v(X)(e.plots).y2),
|
|
1688
|
+
"stroke-width": 1,
|
|
1689
|
+
stroke: e.color,
|
|
1690
|
+
"stroke-dasharray": 2,
|
|
1691
|
+
"marker-end": `url(#bar_arrow_${s})`
|
|
1692
|
+
}, null, 8, as)) : d("", !0),
|
|
1693
|
+
e.plots.length > 1 ? (u(), i("text", {
|
|
1694
|
+
key: 1,
|
|
1695
|
+
"text-anchor": "middle",
|
|
1696
|
+
x: v(X)(e.plots).x2 + _e(),
|
|
1697
|
+
y: v(X)(e.plots).y2 - 6,
|
|
1698
|
+
"font-size": m.value.plotLabels,
|
|
1699
|
+
fill: e.color
|
|
1700
|
+
}, le(v(me)({
|
|
1701
|
+
v: v(X)(e.plots).trend * 100,
|
|
1702
|
+
s: "%",
|
|
1703
|
+
r: 2
|
|
1704
|
+
})), 9, ts)) : d("", !0)
|
|
1705
|
+
])) : d("", !0)
|
|
1706
|
+
], 6))), 128)) : d("", !0),
|
|
1707
|
+
!f.value.useIndividualScale && l.value.chart.grid.labels.zeroLine.show ? (u(), i("line", {
|
|
1708
|
+
key: 2,
|
|
1709
|
+
stroke: l.value.chart.grid.stroke,
|
|
1710
|
+
"stroke-width": "1",
|
|
1711
|
+
x1: n.value.left + G.value,
|
|
1712
|
+
x2: n.value.right - G.value,
|
|
1713
|
+
y1: v(R)(ie.value),
|
|
1714
|
+
y2: v(R)(ie.value),
|
|
1715
|
+
"stroke-linecap": "round",
|
|
1716
|
+
style: { animation: "none !important" }
|
|
1717
|
+
}, null, 8, os)) : d("", !0),
|
|
1718
|
+
l.value.chart.highlighter.useLine && (![null, void 0].includes(p.value) || ![null, void 0].includes(O.value)) ? (u(), i("g", ss, [
|
|
1719
|
+
x("line", {
|
|
1720
|
+
x1: n.value.left + n.value.width / b.value * ((p.value !== null ? p.value : 0) || (O.value !== null ? O.value : 0)) + n.value.width / b.value / 2,
|
|
1721
|
+
x2: n.value.left + n.value.width / b.value * ((p.value !== null ? p.value : 0) || (O.value !== null ? O.value : 0)) + n.value.width / b.value / 2,
|
|
1722
|
+
y1: v(R)(n.value.top),
|
|
1723
|
+
y2: v(R)(n.value.bottom),
|
|
1724
|
+
stroke: l.value.chart.highlighter.color,
|
|
1725
|
+
"stroke-width": l.value.chart.highlighter.lineWidth,
|
|
1726
|
+
"stroke-dasharray": l.value.chart.highlighter.lineDasharray,
|
|
1727
|
+
"stroke-linecap": "round",
|
|
1728
|
+
style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
|
|
1729
|
+
}, null, 8, us)
|
|
1730
|
+
])) : d("", !0),
|
|
1731
|
+
l.value.chart.grid.frame.show ? (u(), i("rect", {
|
|
1732
|
+
key: 4,
|
|
1733
|
+
style: { pointerEvents: "none", transition: "none", animation: "none !important" },
|
|
1734
|
+
x: n.value.left + G.value < 0 ? 0 : n.value.left + G.value,
|
|
1735
|
+
y: n.value.top,
|
|
1736
|
+
width: n.value.width - (l.value.chart.grid.position === "middle" ? 0 : n.value.width / b.value) < 0 ? 0 : n.value.width - (l.value.chart.grid.position === "middle" ? 0 : n.value.width / b.value),
|
|
1737
|
+
height: n.value.height < 0 ? 0 : n.value.height,
|
|
1738
|
+
fill: "transparent",
|
|
1739
|
+
stroke: l.value.chart.grid.frame.stroke,
|
|
1740
|
+
"stroke-width": l.value.chart.grid.frame.strokeWidth,
|
|
1741
|
+
"stroke-linecap": l.value.chart.grid.frame.strokeLinecap,
|
|
1742
|
+
"stroke-linejoin": l.value.chart.grid.frame.strokeLinejoin,
|
|
1743
|
+
"stroke-dasharray": l.value.chart.grid.frame.strokeDasharray
|
|
1744
|
+
}, null, 8, rs)) : d("", !0),
|
|
1745
|
+
l.value.chart.grid.labels.show ? (u(), i("g", {
|
|
1746
|
+
key: 5,
|
|
1747
|
+
ref_key: "scaleLabels",
|
|
1748
|
+
ref: Hl
|
|
1749
|
+
}, [
|
|
1750
|
+
f.value.useIndividualScale ? (u(), i(h, { key: 0 }, [
|
|
1751
|
+
(u(!0), i(h, null, k(dl.value, (e) => (u(), i("g", null, [
|
|
1752
|
+
x("line", {
|
|
1753
|
+
x1: e.x + G.value - n.value.individualOffsetX,
|
|
1754
|
+
x2: e.x + G.value - n.value.individualOffsetX,
|
|
1755
|
+
y1: f.value.isStacked ? v(R)(n.value.bottom - e.yOffset - e.individualHeight) : v(R)(n.value.top),
|
|
1756
|
+
y2: f.value.isStacked ? v(R)(n.value.bottom - e.yOffset) : v(R)(n.value.bottom),
|
|
1757
|
+
stroke: e.color,
|
|
1758
|
+
"stroke-width": l.value.chart.grid.stroke,
|
|
1759
|
+
"stroke-linecap": "round",
|
|
1760
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out; animation: none !important`)
|
|
1761
|
+
}, null, 12, is)
|
|
1762
|
+
]))), 256)),
|
|
1763
|
+
(u(!0), i(h, null, k(dl.value, (e) => (u(), i("g", {
|
|
1764
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1765
|
+
}, [
|
|
1766
|
+
x("text", {
|
|
1767
|
+
fill: e.color,
|
|
1768
|
+
"font-size": m.value.dataLabels * 0.8,
|
|
1769
|
+
"text-anchor": "middle",
|
|
1770
|
+
transform: `translate(${e.x - m.value.dataLabels * 0.8 / 2 + G.value}, ${f.value.isStacked ? n.value.bottom - e.yOffset - e.individualHeight / 2 : n.value.top + n.value.height / 2}) rotate(-90)`
|
|
1771
|
+
}, le(e.name) + " " + le(e.scaleLabel && e.unique && e.scaleLabel !== e.id ? `-
|
|
1772
|
+
${e.scaleLabel}` : ""), 9, ns),
|
|
1773
|
+
(u(!0), i(h, null, k(e.yLabels, (s, t) => (u(), i(h, null, [
|
|
1774
|
+
l.value.chart.grid.labels.yAxis.showCrosshairs ? (u(), i("line", {
|
|
1775
|
+
key: 0,
|
|
1776
|
+
x1: e.x + 3 + G.value - l.value.chart.grid.labels.yAxis.crosshairSize - n.value.individualOffsetX,
|
|
1777
|
+
x2: e.x + G.value - n.value.individualOffsetX,
|
|
1778
|
+
y1: v(R)(s.y),
|
|
1779
|
+
y2: v(R)(s.y),
|
|
1780
|
+
stroke: e.color,
|
|
1781
|
+
"stroke-width": 1,
|
|
1782
|
+
"stroke-linecap": "round",
|
|
1783
|
+
style: { animation: "none !important" }
|
|
1784
|
+
}, null, 8, cs)) : d("", !0)
|
|
1785
|
+
], 64))), 256)),
|
|
1786
|
+
(u(!0), i(h, null, k(e.yLabels, (s, t) => (u(), i("text", {
|
|
1787
|
+
x: e.x - 5 + G.value - n.value.individualOffsetX,
|
|
1788
|
+
y: v(R)(s.y) + m.value.dataLabels / 3,
|
|
1789
|
+
"font-size": m.value.dataLabels,
|
|
1790
|
+
"text-anchor": "end",
|
|
1791
|
+
fill: e.color
|
|
1792
|
+
}, le(v(re)(
|
|
1793
|
+
l.value.chart.grid.labels.yAxis.formatter,
|
|
1794
|
+
s.value,
|
|
1795
|
+
v(me)({
|
|
1796
|
+
p: s.prefix,
|
|
1797
|
+
v: s.value,
|
|
1798
|
+
s: s.suffix,
|
|
1799
|
+
r: l.value.chart.grid.labels.yAxis.rounding
|
|
1800
|
+
}),
|
|
1801
|
+
{ datapoint: s.datapoint, seriesIndex: t }
|
|
1802
|
+
)), 9, vs))), 256))
|
|
1803
|
+
], 4))), 256))
|
|
1804
|
+
], 64)) : (u(!0), i(h, { key: 1 }, k(Aa.value, (e, s) => (u(), i("g", {
|
|
1805
|
+
key: `yLabel_${s}`
|
|
1806
|
+
}, [
|
|
1807
|
+
ge(e) && e.value >= ke.value.min && e.value <= ke.value.max && l.value.chart.grid.labels.yAxis.showCrosshairs ? (u(), i("line", {
|
|
1808
|
+
key: 0,
|
|
1809
|
+
x1: n.value.left,
|
|
1810
|
+
x2: n.value.left - l.value.chart.grid.labels.yAxis.crosshairSize,
|
|
1811
|
+
y1: v(R)(e.y),
|
|
1812
|
+
y2: v(R)(e.y),
|
|
1813
|
+
stroke: l.value.chart.grid.stroke,
|
|
1814
|
+
"stroke-width": "1",
|
|
1815
|
+
"stroke-linecap": "round",
|
|
1816
|
+
style: { animation: "none !important" }
|
|
1817
|
+
}, null, 8, ds)) : d("", !0),
|
|
1818
|
+
e.value >= ke.value.min && e.value <= ke.value.max ? (u(), i("text", {
|
|
1819
|
+
key: 1,
|
|
1820
|
+
x: n.value.scaleLabelX - l.value.chart.grid.labels.yAxis.crosshairSize,
|
|
1821
|
+
y: v(T)(e.y + m.value.dataLabels / 3),
|
|
1822
|
+
"font-size": m.value.dataLabels,
|
|
1823
|
+
"text-anchor": "end",
|
|
1824
|
+
fill: l.value.chart.grid.labels.color
|
|
1825
|
+
}, le(ge(e.value) ? v(re)(
|
|
1826
|
+
l.value.chart.grid.labels.yAxis.formatter,
|
|
1827
|
+
e.value,
|
|
1828
|
+
v(me)({
|
|
1829
|
+
p: e.prefix,
|
|
1830
|
+
v: e.value,
|
|
1831
|
+
s: e.suffix,
|
|
1832
|
+
r: l.value.chart.grid.labels.yAxis.rounding
|
|
1833
|
+
})
|
|
1834
|
+
) : ""), 9, hs)) : d("", !0)
|
|
1835
|
+
]))), 128))
|
|
1836
|
+
], 512)) : d("", !0),
|
|
1837
|
+
(u(!0), i(h, null, k(Le.value, (e, s) => (u(), i("g", {
|
|
1838
|
+
key: `serie_plot_${s}`,
|
|
1839
|
+
class: Ue(`serie_plot_${s}`),
|
|
1840
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1841
|
+
}, [
|
|
1842
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i("g", {
|
|
1843
|
+
key: `circle_plot_${s}_${r}`
|
|
1844
|
+
}, [
|
|
1845
|
+
t && ge(t.value) ? (u(), Me(Il, {
|
|
1846
|
+
key: 0,
|
|
1847
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
|
|
1848
|
+
color: l.value.plot.useGradient ? `url(#plotGradient_${s}_${U.value})` : l.value.plot.dot.useSerieColor ? e.color : l.value.plot.dot.fill,
|
|
1849
|
+
plot: { x: v(T)(t.x), y: v(T)(t.y) },
|
|
1850
|
+
radius: p.value !== null && p.value === r || O.value !== null && O.value === r ? ($e.value.plot || 6) * 1.5 : $e.value.plot || 6,
|
|
1851
|
+
stroke: l.value.plot.dot.useSerieColor ? l.value.chart.backgroundColor : e.color,
|
|
1852
|
+
strokeWidth: l.value.plot.dot.strokeWidth
|
|
1853
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : d("", !0),
|
|
1854
|
+
t.comment && l.value.chart.comments.show ? (u(), i("foreignObject", {
|
|
1855
|
+
key: 1,
|
|
1856
|
+
style: { overflow: "visible" },
|
|
1857
|
+
height: "12",
|
|
1858
|
+
width: l.value.chart.comments.width,
|
|
1859
|
+
x: t.x - l.value.chart.comments.width / 2 + l.value.chart.comments.offsetX,
|
|
1860
|
+
y: t.y + l.value.chart.comments.offsetY + 6
|
|
1861
|
+
}, [
|
|
1862
|
+
x("div", gs, [
|
|
1863
|
+
q(a.$slots, "plot-comment", {
|
|
1864
|
+
plot: { ...t, color: e.color, seriesIndex: s, datapointIndex: r }
|
|
1865
|
+
}, void 0, !0)
|
|
1866
|
+
])
|
|
1867
|
+
], 8, fs)) : d("", !0)
|
|
1868
|
+
]))), 128)),
|
|
1869
|
+
Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(v(X)(e.plots).trend) ? (u(), i("g", xs, [
|
|
1870
|
+
x("defs", null, [
|
|
1871
|
+
x("marker", {
|
|
1872
|
+
id: `plot_arrow_${s}`,
|
|
1873
|
+
markerWidth: 7,
|
|
1874
|
+
markerHeight: 7,
|
|
1875
|
+
refX: "0",
|
|
1876
|
+
refY: 7 / 2,
|
|
1877
|
+
orient: "auto"
|
|
1878
|
+
}, [
|
|
1879
|
+
x("polygon", {
|
|
1880
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
1881
|
+
fill: e.color
|
|
1882
|
+
}, null, 8, bs)
|
|
1883
|
+
], 8, ms)
|
|
1884
|
+
]),
|
|
1885
|
+
e.plots.length > 1 ? (u(), i("line", {
|
|
1886
|
+
key: 0,
|
|
1887
|
+
x1: v(X)(e.plots).x1,
|
|
1888
|
+
x2: v(X)(e.plots).x2,
|
|
1889
|
+
y1: v(R)(v(X)(e.plots).y1),
|
|
1890
|
+
y2: v(R)(v(X)(e.plots).y2),
|
|
1891
|
+
"stroke-width": 1,
|
|
1892
|
+
stroke: e.color,
|
|
1893
|
+
"stroke-dasharray": 2,
|
|
1894
|
+
"marker-end": `url(#plot_arrow_${s})`
|
|
1895
|
+
}, null, 8, ys)) : d("", !0),
|
|
1896
|
+
e.plots.length > 1 ? (u(), i("text", {
|
|
1897
|
+
key: 1,
|
|
1898
|
+
"text-anchor": "middle",
|
|
1899
|
+
x: v(X)(e.plots).x2,
|
|
1900
|
+
y: v(X)(e.plots).y2 - 6,
|
|
1901
|
+
"font-size": m.value.plotLabels,
|
|
1902
|
+
fill: e.color
|
|
1903
|
+
}, le(v(me)({
|
|
1904
|
+
v: v(X)(e.plots).trend * 100,
|
|
1905
|
+
s: "%",
|
|
1906
|
+
r: 2
|
|
1907
|
+
})), 9, ps)) : d("", !0)
|
|
1908
|
+
])) : d("", !0)
|
|
1909
|
+
], 6))), 128)),
|
|
1910
|
+
(u(!0), i(h, null, k(we.value, (e, s) => (u(), i("g", {
|
|
1911
|
+
key: `serie_line_${s}`,
|
|
1912
|
+
class: Ue(`serie_line_${s}`),
|
|
1913
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1914
|
+
}, [
|
|
1915
|
+
e.smooth && e.plots.length > 1 && e.curve ? (u(), i("path", {
|
|
1916
|
+
key: 0,
|
|
1917
|
+
d: `M${e.curve}`,
|
|
1918
|
+
stroke: l.value.chart.backgroundColor,
|
|
1919
|
+
"stroke-width": l.value.line.strokeWidth + 1,
|
|
1920
|
+
"stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
|
|
1921
|
+
fill: "none"
|
|
1922
|
+
}, null, 8, ks)) : e.plots.length > 1 && e.straight ? (u(), i("path", {
|
|
1923
|
+
key: 1,
|
|
1924
|
+
d: `M${e.straight}`,
|
|
1925
|
+
stroke: l.value.chart.backgroundColor,
|
|
1926
|
+
"stroke-width": l.value.line.strokeWidth + 1,
|
|
1927
|
+
"stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
|
|
1928
|
+
fill: "none",
|
|
1929
|
+
"stroke-linecap": "round",
|
|
1930
|
+
"stroke-linejoin": "round"
|
|
1931
|
+
}, null, 8, _s)) : d("", !0)
|
|
1932
|
+
], 6))), 128)),
|
|
1933
|
+
a.$slots.pattern ? (u(), i("defs", ws, [
|
|
1934
|
+
(u(!0), i(h, null, k(Ie.value, (e, s) => q(a.$slots, "pattern", Ql({
|
|
1935
|
+
key: `serie_pattern_slot_${s}`
|
|
1936
|
+
}, { ref_for: !0 }, { ...e, seriesIndex: e.slotAbsoluteIndex, patternId: `pattern_${U.value}_${s}` }), void 0, !0)), 128))
|
|
1937
|
+
])) : d("", !0),
|
|
1938
|
+
(u(!0), i(h, null, k(we.value, (e, s) => (u(), i("g", {
|
|
1939
|
+
key: `serie_line_${s}`,
|
|
1940
|
+
class: Ue(`serie_line_${s}`),
|
|
1941
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1942
|
+
}, [
|
|
1943
|
+
e.useArea && e.plots.length > 1 ? (u(), i("g", Ss, [
|
|
1944
|
+
e.smooth ? (u(!0), i(h, { key: 0 }, k(e.curveAreas, (t, r) => (u(), i(h, { key: r }, [
|
|
1945
|
+
t ? (u(), i("path", {
|
|
1946
|
+
key: 0,
|
|
1947
|
+
d: t,
|
|
1948
|
+
fill: l.value.line.area.useGradient ? `url(#areaGradient_${s}_${U.value})` : v(Se)(e.color, l.value.line.area.opacity)
|
|
1949
|
+
}, null, 8, $s)) : d("", !0),
|
|
1950
|
+
a.$slots.pattern && t ? (u(), i("path", {
|
|
1951
|
+
key: 1,
|
|
1952
|
+
d: t,
|
|
1953
|
+
fill: `url(#pattern_${U.value}_${e.slotAbsoluteIndex})`
|
|
1954
|
+
}, null, 8, Ls)) : d("", !0)
|
|
1955
|
+
], 64))), 128)) : (u(!0), i(h, { key: 1 }, k(e.area.split(";"), (t, r) => (u(), i(h, { key: r }, [
|
|
1956
|
+
t ? (u(), i("path", {
|
|
1957
|
+
key: 0,
|
|
1958
|
+
d: `M${t}Z`,
|
|
1959
|
+
fill: l.value.line.area.useGradient ? `url(#areaGradient_${s}_${U.value})` : v(Se)(e.color, l.value.line.area.opacity)
|
|
1960
|
+
}, null, 8, As)) : d("", !0),
|
|
1961
|
+
a.$slots.pattern && t ? (u(), i("path", {
|
|
1962
|
+
key: 1,
|
|
1963
|
+
d: `M${t}Z`,
|
|
1964
|
+
fill: `url(#pattern_${U.value}_${e.slotAbsoluteIndex})`
|
|
1965
|
+
}, null, 8, Ms)) : d("", !0)
|
|
1966
|
+
], 64))), 128))
|
|
1967
|
+
])) : d("", !0),
|
|
1968
|
+
e.smooth && e.plots.length > 1 && e.curve ? (u(), i("path", {
|
|
1969
|
+
key: 1,
|
|
1970
|
+
d: `M${e.curve}`,
|
|
1971
|
+
stroke: e.color,
|
|
1972
|
+
"stroke-width": l.value.line.strokeWidth,
|
|
1973
|
+
"stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
|
|
1974
|
+
fill: "none",
|
|
1975
|
+
"stroke-linecap": "round"
|
|
1976
|
+
}, null, 8, zs)) : e.plots.length > 1 && e.straight ? (u(), i("path", {
|
|
1977
|
+
key: 2,
|
|
1978
|
+
d: `M${e.straight}`,
|
|
1979
|
+
stroke: e.color,
|
|
1980
|
+
"stroke-width": l.value.line.strokeWidth,
|
|
1981
|
+
"stroke-dasharray": e.dashed ? l.value.line.strokeWidth * 2 : 0,
|
|
1982
|
+
fill: "none",
|
|
1983
|
+
"stroke-linecap": "round",
|
|
1984
|
+
"stroke-linejoin": "round"
|
|
1985
|
+
}, null, 8, Cs)) : d("", !0),
|
|
1986
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i(h, {
|
|
1987
|
+
key: `circle_line_${s}_${r}`
|
|
1988
|
+
}, [
|
|
1989
|
+
!La.value.linePlot && t && ge(t.value) || La.value.linePlot && t && ge(t.value) && (p.value !== null && p.value === r || O.value !== null && O.value === r) ? (u(), Me(Il, {
|
|
1990
|
+
key: 0,
|
|
1991
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
|
|
1992
|
+
color: l.value.line.useGradient ? `url(#lineGradient_${s}_${U.value})` : l.value.line.dot.useSerieColor ? e.color : l.value.line.dot.fill,
|
|
1993
|
+
plot: { x: v(T)(t.x), y: v(T)(t.y) },
|
|
1994
|
+
radius: p.value !== null && p.value === r || O.value !== null && O.value === r ? ($e.value.line || 6) * 1.5 : $e.value.line || 6,
|
|
1995
|
+
stroke: l.value.line.dot.useSerieColor ? l.value.chart.backgroundColor : e.color,
|
|
1996
|
+
strokeWidth: l.value.line.dot.strokeWidth
|
|
1997
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : d("", !0),
|
|
1998
|
+
t.comment && l.value.chart.comments.show ? (u(), i("foreignObject", {
|
|
1999
|
+
key: 1,
|
|
2000
|
+
style: { overflow: "visible" },
|
|
2001
|
+
height: "12",
|
|
2002
|
+
width: l.value.chart.comments.width,
|
|
2003
|
+
x: t.x - l.value.chart.comments.width / 2 + l.value.chart.comments.offsetX,
|
|
2004
|
+
y: t.y + l.value.chart.comments.offsetY + 6
|
|
2005
|
+
}, [
|
|
2006
|
+
x("div", Ts, [
|
|
2007
|
+
q(a.$slots, "plot-comment", {
|
|
2008
|
+
plot: { ...t, color: e.color, seriesIndex: s, datapointIndex: r }
|
|
2009
|
+
}, void 0, !0)
|
|
2010
|
+
])
|
|
2011
|
+
], 8, Is)) : d("", !0)
|
|
2012
|
+
], 64))), 128)),
|
|
2013
|
+
Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(v(X)(e.plots).trend) ? (u(), i("g", Os, [
|
|
2014
|
+
x("defs", null, [
|
|
2015
|
+
x("marker", {
|
|
2016
|
+
id: `line_arrow_${s}`,
|
|
2017
|
+
markerWidth: 7,
|
|
2018
|
+
markerHeight: 7,
|
|
2019
|
+
refX: "0",
|
|
2020
|
+
refY: 7 / 2,
|
|
2021
|
+
orient: "auto"
|
|
2022
|
+
}, [
|
|
2023
|
+
x("polygon", {
|
|
2024
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
2025
|
+
fill: e.color
|
|
2026
|
+
}, null, 8, Vs)
|
|
2027
|
+
], 8, Ns)
|
|
2028
|
+
]),
|
|
2029
|
+
e.plots.length > 1 ? (u(), i("line", {
|
|
2030
|
+
key: 0,
|
|
2031
|
+
x1: v(X)(e.plots).x1,
|
|
2032
|
+
x2: v(X)(e.plots).x2,
|
|
2033
|
+
y1: v(R)(v(X)(e.plots).y1),
|
|
2034
|
+
y2: v(R)(v(X)(e.plots).y2),
|
|
2035
|
+
"stroke-width": 1,
|
|
2036
|
+
stroke: e.color,
|
|
2037
|
+
"stroke-dasharray": 2,
|
|
2038
|
+
"marker-end": `url(#line_arrow_${s})`
|
|
2039
|
+
}, null, 8, Ps)) : d("", !0),
|
|
2040
|
+
e.plots.length > 1 ? (u(), i("text", {
|
|
2041
|
+
key: 1,
|
|
2042
|
+
"text-anchor": "middle",
|
|
2043
|
+
x: v(X)(e.plots).x2,
|
|
2044
|
+
y: v(X)(e.plots).y2 - 6,
|
|
2045
|
+
"font-size": m.value.plotLabels,
|
|
2046
|
+
fill: e.color
|
|
2047
|
+
}, le(v(me)({
|
|
2048
|
+
v: v(X)(e.plots).trend * 100,
|
|
2049
|
+
s: "%",
|
|
2050
|
+
r: 2
|
|
2051
|
+
})), 9, Hs)) : d("", !0)
|
|
2052
|
+
])) : d("", !0)
|
|
2053
|
+
], 6))), 128)),
|
|
2054
|
+
(l.value.bar.labels.show || l.value.bar.serieName.show) && f.value.dataLabels.show ? (u(), i("g", Rs, [
|
|
2055
|
+
(u(!0), i(h, null, k(Pe.value, (e, s) => (u(), i(h, {
|
|
2056
|
+
key: `xLabel_bar_${s}`
|
|
2057
|
+
}, [
|
|
2058
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i(h, {
|
|
2059
|
+
key: `xLabel_bar_${s}_${r}`
|
|
2060
|
+
}, [
|
|
2061
|
+
t && (!Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || p.value !== null && p.value === r || O.value !== null && O.value === r) && l.value.bar.labels.show ? (u(), i("text", {
|
|
2062
|
+
key: 0,
|
|
2063
|
+
x: f.value.useIndividualScale && f.value.isStacked ? t.x + Z.value.line / 2 : Ll(t) + _e() / 2 - Oe.value / 2,
|
|
2064
|
+
y: v(T)(t.y) + (t.value >= 0 ? l.value.bar.labels.offsetY : -l.value.bar.labels.offsetY * 3),
|
|
2065
|
+
"text-anchor": "middle",
|
|
2066
|
+
"font-size": m.value.plotLabels,
|
|
2067
|
+
fill: l.value.bar.labels.color,
|
|
2068
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2069
|
+
}, le(ge(t.value) ? v(re)(
|
|
2070
|
+
l.value.bar.labels.formatter,
|
|
2071
|
+
t.value,
|
|
2072
|
+
v(me)({
|
|
2073
|
+
p: e.prefix || l.value.chart.labels.prefix,
|
|
2074
|
+
v: t.value,
|
|
2075
|
+
s: e.suffix || l.value.chart.labels.suffix,
|
|
2076
|
+
r: l.value.bar.labels.rounding
|
|
2077
|
+
}),
|
|
2078
|
+
{
|
|
2079
|
+
datapoint: t,
|
|
2080
|
+
serie: e
|
|
2081
|
+
}
|
|
2082
|
+
) : ""), 13, Bs)) : d("", !0),
|
|
2083
|
+
t && l.value.bar.serieName.show ? (u(), i("text", {
|
|
2084
|
+
key: 1,
|
|
2085
|
+
x: f.value.useIndividualScale && f.value.isStacked ? t.x + Z.value.line / 2 : t.x + _e() * 1.1,
|
|
2086
|
+
y: t.y + (t.value > 0 ? l.value.bar.serieName.offsetY : -l.value.bar.serieName.offsetY * 3),
|
|
2087
|
+
"text-anchor": "middle",
|
|
2088
|
+
"font-size": m.value.plotLabels,
|
|
2089
|
+
fill: l.value.bar.serieName.useSerieColor ? e.color : l.value.bar.serieName.color,
|
|
2090
|
+
"font-weight": l.value.bar.serieName.bold ? "bold" : "normal",
|
|
2091
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2092
|
+
}, le(l.value.bar.serieName.useAbbreviation ? v(Kt)({
|
|
2093
|
+
source: e.name,
|
|
2094
|
+
length: l.value.bar.serieName.abbreviationSize
|
|
2095
|
+
}) : e.name), 13, Ys)) : d("", !0)
|
|
2096
|
+
], 64))), 128))
|
|
2097
|
+
], 64))), 128))
|
|
2098
|
+
])) : d("", !0),
|
|
2099
|
+
l.value.plot.labels.show && f.value.dataLabels.show ? (u(), i("g", Fs, [
|
|
2100
|
+
(u(!0), i(h, null, k(Le.value, (e, s) => (u(), i(h, {
|
|
2101
|
+
key: `xLabel_plot_${s}`
|
|
2102
|
+
}, [
|
|
2103
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i(h, {
|
|
2104
|
+
key: `xLabel_plot_${s}_${r}`
|
|
2105
|
+
}, [
|
|
2106
|
+
t && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || p.value !== null && p.value === r || O.value !== null && O.value === r ? (u(), i("text", {
|
|
2107
|
+
key: 0,
|
|
2108
|
+
x: t.x,
|
|
2109
|
+
y: t.y + l.value.plot.labels.offsetY,
|
|
2110
|
+
"text-anchor": "middle",
|
|
2111
|
+
"font-size": m.value.plotLabels,
|
|
2112
|
+
fill: l.value.plot.labels.color,
|
|
2113
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2114
|
+
}, le(ge(t.value) ? v(re)(
|
|
2115
|
+
l.value.plot.labels.formatter,
|
|
2116
|
+
t.value,
|
|
2117
|
+
v(me)({
|
|
2118
|
+
p: e.prefix || l.value.chart.labels.prefix,
|
|
2119
|
+
v: t.value,
|
|
2120
|
+
s: e.suffix || l.value.chart.labels.suffix,
|
|
2121
|
+
r: l.value.plot.labels.rounding
|
|
2122
|
+
}),
|
|
2123
|
+
{
|
|
2124
|
+
datapoint: t,
|
|
2125
|
+
serie: e
|
|
2126
|
+
}
|
|
2127
|
+
) : ""), 13, Es)) : d("", !0)
|
|
2128
|
+
], 64))), 128))
|
|
2129
|
+
], 64))), 128))
|
|
2130
|
+
])) : (u(), i("g", Ws, [
|
|
2131
|
+
(u(!0), i(h, null, k(Le.value, (e, s) => (u(), i(h, {
|
|
2132
|
+
key: `xLabel_plot_${s}`
|
|
2133
|
+
}, [
|
|
2134
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i(h, {
|
|
2135
|
+
key: `xLabel_plot_${s}_${r}`
|
|
2136
|
+
}, [
|
|
2137
|
+
l.value.plot.tag.followValue ? (u(), i(h, { key: 1 }, [
|
|
2138
|
+
[O.value, p.value, Xe.value].includes(r) && e.useTag ? (u(), i("line", {
|
|
2139
|
+
key: 0,
|
|
2140
|
+
class: "vue-ui-xy-tag-plot",
|
|
2141
|
+
x1: n.value.left,
|
|
2142
|
+
x2: n.value.right,
|
|
2143
|
+
y1: t.y,
|
|
2144
|
+
y2: t.y,
|
|
2145
|
+
"stroke-width": 1,
|
|
2146
|
+
"stroke-linecap": "round",
|
|
2147
|
+
"stroke-dasharray": "2",
|
|
2148
|
+
stroke: e.color
|
|
2149
|
+
}, null, 8, Us)) : d("", !0)
|
|
2150
|
+
], 64)) : (u(), i(h, { key: 0 }, [
|
|
2151
|
+
t && r === 0 && e.useTag && e.useTag === "start" ? (u(), i("foreignObject", {
|
|
2152
|
+
key: 0,
|
|
2153
|
+
x: t.x,
|
|
2154
|
+
y: t.y - 20,
|
|
2155
|
+
height: 24,
|
|
2156
|
+
width: "150",
|
|
2157
|
+
style: z(`overflow: visible; opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2158
|
+
}, [
|
|
2159
|
+
x("div", {
|
|
2160
|
+
style: z(`padding: 3px; background:${v(Se)(e.color, 80)};color:${v(Fe)(e.color)};width:fit-content;font-size:${m.value.plotLabels}px;border-radius: 2px;`),
|
|
2161
|
+
innerHTML: v(re)(
|
|
2162
|
+
l.value.plot.tag.formatter,
|
|
2163
|
+
t.value,
|
|
2164
|
+
e.name,
|
|
2165
|
+
{
|
|
2166
|
+
datapoint: t,
|
|
2167
|
+
seriesIndex: r,
|
|
2168
|
+
serieName: e.name
|
|
2169
|
+
}
|
|
2170
|
+
)
|
|
2171
|
+
}, null, 12, Gs)
|
|
2172
|
+
], 12, Xs)) : d("", !0),
|
|
2173
|
+
t && r === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (u(), i("foreignObject", {
|
|
2174
|
+
key: 1,
|
|
2175
|
+
x: t.x - e.name.length * (m.value.plotLabels / 2),
|
|
2176
|
+
y: t.y - 20,
|
|
2177
|
+
height: 24,
|
|
2178
|
+
width: "150",
|
|
2179
|
+
style: z(`overflow: visible; opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2180
|
+
}, [
|
|
2181
|
+
x("div", {
|
|
2182
|
+
style: z(`padding: 3px; background:${v(Se)(e.color, 80)};color:${v(Fe)(e.color)};width:fit-content;font-size:${m.value.plotLabels}px;border-radius: 2px;`),
|
|
2183
|
+
innerHTML: v(re)(
|
|
2184
|
+
l.value.plot.tag.formatter,
|
|
2185
|
+
t.value,
|
|
2186
|
+
e.name,
|
|
2187
|
+
{
|
|
2188
|
+
datapoint: t,
|
|
2189
|
+
seriesIndex: r,
|
|
2190
|
+
serieName: e.name
|
|
2191
|
+
}
|
|
2192
|
+
)
|
|
2193
|
+
}, null, 12, qs)
|
|
2194
|
+
], 12, Ds)) : d("", !0)
|
|
2195
|
+
], 64))
|
|
2196
|
+
], 64))), 128))
|
|
2197
|
+
], 64))), 128))
|
|
2198
|
+
])),
|
|
2199
|
+
l.value.line.labels.show && f.value.dataLabels.show ? (u(), i("g", Zs, [
|
|
2200
|
+
(u(!0), i(h, null, k(we.value, (e, s) => (u(), i(h, {
|
|
2201
|
+
key: `xLabel_line_${s}`
|
|
2202
|
+
}, [
|
|
2203
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i(h, {
|
|
2204
|
+
key: `xLabel_line_${s}_${r}`
|
|
2205
|
+
}, [
|
|
2206
|
+
t && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || p.value !== null && p.value === r || O.value !== null && O.value === r ? (u(), i("text", {
|
|
2207
|
+
key: 0,
|
|
2208
|
+
x: t.x,
|
|
2209
|
+
y: t.y + (t.value >= 0 ? l.value.line.labels.offsetY : -l.value.line.labels.offsetY * 3),
|
|
2210
|
+
"text-anchor": "middle",
|
|
2211
|
+
"font-size": m.value.plotLabels,
|
|
2212
|
+
fill: l.value.line.labels.color,
|
|
2213
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2214
|
+
}, le(ge(t.value) ? v(re)(
|
|
2215
|
+
l.value.line.labels.formatter,
|
|
2216
|
+
t.value,
|
|
2217
|
+
v(me)({
|
|
2218
|
+
p: e.prefix || l.value.chart.labels.prefix,
|
|
2219
|
+
v: t.value,
|
|
2220
|
+
s: e.suffix || l.value.chart.labels.suffix,
|
|
2221
|
+
r: l.value.line.labels.rounding
|
|
2222
|
+
}),
|
|
2223
|
+
{
|
|
2224
|
+
datapoint: t,
|
|
2225
|
+
serie: e
|
|
2226
|
+
}
|
|
2227
|
+
) : ""), 13, Js)) : d("", !0)
|
|
2228
|
+
], 64))), 128))
|
|
2229
|
+
], 64))), 128))
|
|
2230
|
+
])) : (u(), i("g", Ks, [
|
|
2231
|
+
(u(!0), i(h, null, k(we.value, (e, s) => (u(), i(h, {
|
|
2232
|
+
key: `xLabel_line_${s}`
|
|
2233
|
+
}, [
|
|
2234
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i(h, {
|
|
2235
|
+
key: `xLabel_line_${s}_${r}`
|
|
2236
|
+
}, [
|
|
2237
|
+
l.value.line.tag.followValue ? (u(), i(h, { key: 1 }, [
|
|
2238
|
+
[O.value, p.value, Xe.value].includes(r) && e.useTag ? (u(), i("line", {
|
|
2239
|
+
key: 0,
|
|
2240
|
+
class: "vue-ui-xy-tag-line",
|
|
2241
|
+
x1: n.value.left,
|
|
2242
|
+
x2: n.value.right,
|
|
2243
|
+
y1: t.y,
|
|
2244
|
+
y2: t.y,
|
|
2245
|
+
"stroke-width": 1,
|
|
2246
|
+
"stroke-linecap": "round",
|
|
2247
|
+
"stroke-dasharray": "2",
|
|
2248
|
+
stroke: e.color
|
|
2249
|
+
}, null, 8, au)) : d("", !0)
|
|
2250
|
+
], 64)) : (u(), i(h, { key: 0 }, [
|
|
2251
|
+
t && r === 0 && e.useTag && e.useTag === "start" ? (u(), i("foreignObject", {
|
|
2252
|
+
key: 0,
|
|
2253
|
+
x: t.x,
|
|
2254
|
+
y: t.y - 20,
|
|
2255
|
+
height: 24,
|
|
2256
|
+
width: "150",
|
|
2257
|
+
style: z(`overflow: visible; opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2258
|
+
}, [
|
|
2259
|
+
x("div", {
|
|
2260
|
+
style: z(`padding: 3px; background:${v(Se)(e.color, 80)};color:${v(Fe)(e.color)};width:fit-content;font-size:${m.value.plotLabels}px;border-radius: 2px;`),
|
|
2261
|
+
innerHTML: v(re)(
|
|
2262
|
+
l.value.line.tag.formatter,
|
|
2263
|
+
t.value,
|
|
2264
|
+
e.name,
|
|
2265
|
+
{
|
|
2266
|
+
datapoint: t,
|
|
2267
|
+
seriesIndex: r,
|
|
2268
|
+
serieName: e.name
|
|
2269
|
+
}
|
|
2270
|
+
)
|
|
2271
|
+
}, null, 12, js)
|
|
2272
|
+
], 12, Qs)) : d("", !0),
|
|
2273
|
+
t && r === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (u(), i("foreignObject", {
|
|
2274
|
+
key: 1,
|
|
2275
|
+
x: t.x,
|
|
2276
|
+
y: t.y - 20,
|
|
2277
|
+
height: 24,
|
|
2278
|
+
width: "150",
|
|
2279
|
+
style: z(`overflow: visible; opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2280
|
+
}, [
|
|
2281
|
+
x("div", {
|
|
2282
|
+
style: z(`padding: 3px; background:${v(Se)(e.color, 80)};color:${v(Fe)(e.color)};width:fit-content;font-size:${m.value.plotLabels}px;border-radius: 2px;`),
|
|
2283
|
+
innerHTML: v(re)(
|
|
2284
|
+
l.value.line.tag.formatter,
|
|
2285
|
+
t.value,
|
|
2286
|
+
e.name,
|
|
2287
|
+
{
|
|
2288
|
+
datapoint: t,
|
|
2289
|
+
seriesIndex: r,
|
|
2290
|
+
serieName: e.name
|
|
2291
|
+
}
|
|
2292
|
+
)
|
|
2293
|
+
}, null, 12, lu)
|
|
2294
|
+
], 12, eu)) : d("", !0)
|
|
2295
|
+
], 64))
|
|
2296
|
+
], 64))), 128))
|
|
2297
|
+
], 64))), 128))
|
|
2298
|
+
])),
|
|
2299
|
+
(u(!0), i(h, null, k(we.value, (e, s) => (u(), i(h, {
|
|
2300
|
+
key: `xLabel_line_${s}`
|
|
2301
|
+
}, [
|
|
2302
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i(h, {
|
|
2303
|
+
key: `xLabel_line_${s}_${r}`
|
|
2304
|
+
}, [
|
|
2305
|
+
t && r === 0 && e.showSerieName && e.showSerieName === "start" ? (u(), i("text", {
|
|
2306
|
+
key: 0,
|
|
2307
|
+
x: t.x - m.value.plotLabels,
|
|
2308
|
+
y: t.y,
|
|
2309
|
+
"font-size": m.value.plotLabels,
|
|
2310
|
+
"text-anchor": "end",
|
|
2311
|
+
fill: e.color,
|
|
2312
|
+
innerHTML: v(Cl)({
|
|
2313
|
+
content: e.name,
|
|
2314
|
+
fontSize: m.value.plotLabels,
|
|
2315
|
+
fill: e.color,
|
|
2316
|
+
x: t.x - m.value.plotLabels,
|
|
2317
|
+
y: t.y,
|
|
2318
|
+
maxWords: 2
|
|
2319
|
+
}),
|
|
2320
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2321
|
+
}, null, 12, tu)) : d("", !0),
|
|
2322
|
+
t && r === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (u(), i("text", {
|
|
2323
|
+
key: 1,
|
|
2324
|
+
x: t.x + m.value.plotLabels,
|
|
2325
|
+
y: t.y,
|
|
2326
|
+
"font-size": m.value.plotLabels,
|
|
2327
|
+
"text-anchor": "start",
|
|
2328
|
+
fill: e.color,
|
|
2329
|
+
innerHTML: v(Cl)({
|
|
2330
|
+
content: e.name,
|
|
2331
|
+
fontSize: m.value.plotLabels,
|
|
2332
|
+
fill: e.color,
|
|
2333
|
+
x: t.x + m.value.plotLabels,
|
|
2334
|
+
y: t.y,
|
|
2335
|
+
maxWords: 2
|
|
2336
|
+
}),
|
|
2337
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2338
|
+
}, null, 12, ou)) : d("", !0)
|
|
2339
|
+
], 64))), 128))
|
|
2340
|
+
], 64))), 128)),
|
|
2341
|
+
(u(!0), i(h, null, k(Le.value, (e, s) => (u(), i(h, {
|
|
2342
|
+
key: `xLabel_plot_${s}`
|
|
2343
|
+
}, [
|
|
2344
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i(h, {
|
|
2345
|
+
key: `xLabel_plot_${s}_${r}`
|
|
2346
|
+
}, [
|
|
2347
|
+
t && r === 0 && e.showSerieName && e.showSerieName === "start" ? (u(), i("text", {
|
|
2348
|
+
key: 0,
|
|
2349
|
+
x: t.x - m.value.plotLabels,
|
|
2350
|
+
y: t.y,
|
|
2351
|
+
"font-size": m.value.plotLabels,
|
|
2352
|
+
"text-anchor": "end",
|
|
2353
|
+
fill: e.color,
|
|
2354
|
+
innerHTML: v(Cl)({
|
|
2355
|
+
content: e.name,
|
|
2356
|
+
fontSize: m.value.plotLabels,
|
|
2357
|
+
fill: e.color,
|
|
2358
|
+
x: t.x - m.value.plotLabels,
|
|
2359
|
+
y: t.y,
|
|
2360
|
+
maxWords: 2
|
|
2361
|
+
}),
|
|
2362
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2363
|
+
}, null, 12, su)) : d("", !0),
|
|
2364
|
+
t && r === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (u(), i("text", {
|
|
2365
|
+
key: 1,
|
|
2366
|
+
x: t.x + m.value.plotLabels,
|
|
2367
|
+
y: t.y,
|
|
2368
|
+
"font-size": m.value.plotLabels,
|
|
2369
|
+
"text-anchor": "start",
|
|
2370
|
+
fill: e.color,
|
|
2371
|
+
innerHTML: v(Cl)({
|
|
2372
|
+
content: e.name,
|
|
2373
|
+
fontSize: m.value.plotLabels,
|
|
2374
|
+
fill: e.color,
|
|
2375
|
+
x: t.x + m.value.plotLabels,
|
|
2376
|
+
y: t.y,
|
|
2377
|
+
maxWords: 2
|
|
2378
|
+
}),
|
|
2379
|
+
style: z(`opacity:${M.value ? M.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2380
|
+
}, null, 12, uu)) : d("", !0)
|
|
2381
|
+
], 64))), 128))
|
|
2382
|
+
], 64))), 128)),
|
|
2383
|
+
f.value.useIndividualScale && !f.value.isStacked ? (u(), i(h, { key: 12 }, [
|
|
2384
|
+
x("defs", null, [
|
|
2385
|
+
(u(!0), i(h, null, k(dl.value, (e, s) => (u(), i("linearGradient", {
|
|
2386
|
+
id: `individual_scale_gradient_${U.value}_${s}`,
|
|
2387
|
+
x1: "0%",
|
|
2388
|
+
x2: "100%",
|
|
2389
|
+
y1: "0%",
|
|
2390
|
+
y2: "0%"
|
|
2391
|
+
}, [
|
|
2392
|
+
x("stop", {
|
|
2393
|
+
offset: "0%",
|
|
2394
|
+
"stop-color": l.value.chart.backgroundColor,
|
|
2395
|
+
"stop-opacity": "0"
|
|
2396
|
+
}, null, 8, iu),
|
|
2397
|
+
x("stop", {
|
|
2398
|
+
offset: "100%",
|
|
2399
|
+
"stop-color": e.color,
|
|
2400
|
+
"stop-opacity": "0.2"
|
|
2401
|
+
}, null, 8, nu)
|
|
2402
|
+
], 8, ru))), 256))
|
|
2403
|
+
]),
|
|
2404
|
+
(u(!0), i(h, null, k(dl.value, (e, s) => (u(), i("rect", {
|
|
2405
|
+
x: e.x - l.value.chart.grid.labels.yAxis.labelWidth + G.value - n.value.individualOffsetX,
|
|
2406
|
+
y: n.value.top,
|
|
2407
|
+
width: l.value.chart.grid.labels.yAxis.labelWidth + n.value.individualOffsetX,
|
|
2408
|
+
height: n.value.height < 0 ? 10 : n.value.height,
|
|
2409
|
+
fill: M.value === e.groupId ? `url(#individual_scale_gradient_${U.value}_${s})` : "transparent",
|
|
2410
|
+
onMouseenter: (t) => M.value = e.groupId,
|
|
2411
|
+
onMouseleave: c[0] || (c[0] = (t) => M.value = null)
|
|
2412
|
+
}, null, 40, cu))), 256))
|
|
2413
|
+
], 64)) : d("", !0),
|
|
2414
|
+
x("g", null, [
|
|
2415
|
+
l.value.chart.grid.labels.axis.yLabel && !f.value.useIndividualScale ? (u(), i("text", {
|
|
2416
|
+
key: 0,
|
|
2417
|
+
ref_key: "yAxisLabel",
|
|
2418
|
+
ref: Pl,
|
|
2419
|
+
"font-size": m.value.yAxis,
|
|
2420
|
+
fill: l.value.chart.grid.labels.color,
|
|
2421
|
+
transform: `translate(${l.value.chart.grid.labels.axis.fontSize}, ${n.value.top + n.value.height / 2}) rotate(-90)`,
|
|
2422
|
+
"text-anchor": "middle",
|
|
2423
|
+
style: { transition: "none" }
|
|
2424
|
+
}, le(l.value.chart.grid.labels.axis.yLabel), 9, vu)) : d("", !0),
|
|
2425
|
+
l.value.chart.grid.labels.axis.xLabel ? (u(), i("text", {
|
|
2426
|
+
key: 1,
|
|
2427
|
+
ref_key: "xAxisLabel",
|
|
2428
|
+
ref: Vl,
|
|
2429
|
+
"text-anchor": "middle",
|
|
2430
|
+
x: ae.value / 2,
|
|
2431
|
+
y: ve.value - 3,
|
|
2432
|
+
"font-size": m.value.yAxis,
|
|
2433
|
+
fill: l.value.chart.grid.labels.color
|
|
2434
|
+
}, le(l.value.chart.grid.labels.axis.xLabel), 9, du)) : d("", !0)
|
|
2435
|
+
]),
|
|
2436
|
+
l.value.chart.grid.labels.xAxisLabels.show ? (u(), i("g", {
|
|
2437
|
+
key: 13,
|
|
2438
|
+
ref_key: "timeLabelsEls",
|
|
2439
|
+
ref: ll
|
|
2440
|
+
}, [
|
|
2441
|
+
a.$slots["time-label"] ? (u(!0), i(h, { key: 0 }, k(J.value, (e, s) => q(a.$slots, "time-label", Ql({
|
|
2442
|
+
key: `time_label_${s}`,
|
|
2443
|
+
ref_for: !0
|
|
2444
|
+
}, {
|
|
2445
|
+
x: n.value.left + n.value.width / b.value * s + n.value.width / b.value / 2,
|
|
2446
|
+
y: n.value.bottom,
|
|
2447
|
+
fontSize: m.value.xAxis,
|
|
2448
|
+
fill: l.value.chart.grid.labels.xAxisLabels.color,
|
|
2449
|
+
transform: `translate(${n.value.left + n.value.width / b.value * s + n.value.width / b.value / 2}, ${n.value.bottom + m.value.xAxis * 1.3 + l.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${l.value.chart.grid.labels.xAxisLabels.rotation})`,
|
|
2450
|
+
absoluteIndex: e.absoluteIndex,
|
|
2451
|
+
content: e.text,
|
|
2452
|
+
textAnchor: l.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : l.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
2453
|
+
show: e && l.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo && b.value <= $l.value || e && !l.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !l.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || e && l.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (s === 0 || s === J.value.length - 1) && !l.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || e && l.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && p.value === s && !l.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || e && !l.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && l.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo && s % Math.floor((y.value.end - y.value.start) / $l.value) === 0
|
|
2454
|
+
}), void 0, !0)), 128)) : (u(!0), i(h, { key: 1 }, k(J.value, (e, s) => (u(), i("g", {
|
|
2455
|
+
key: `time_label_${s}`
|
|
2456
|
+
}, [
|
|
2457
|
+
e && l.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo && b.value <= $l.value || e && !l.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !l.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || e && l.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (s === 0 || s === J.value.length - 1) && !l.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || e && l.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && p.value === s && !l.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || e && !l.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && l.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo && s % Math.floor((y.value.end - y.value.start) / $l.value) === 0 ? (u(), i(h, { key: 0 }, [
|
|
2458
|
+
String(e.text).includes(`
|
|
2459
|
+
`) ? (u(), i("text", {
|
|
2460
|
+
key: 1,
|
|
2461
|
+
"text-anchor": l.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : l.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
2462
|
+
"font-size": m.value.xAxis,
|
|
2463
|
+
fill: l.value.chart.grid.labels.xAxisLabels.color,
|
|
2464
|
+
transform: `translate(${n.value.left + n.value.width / b.value * s + n.value.width / b.value / 2}, ${n.value.bottom + m.value.xAxis * 1.3 + l.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${l.value.chart.grid.labels.xAxisLabels.rotation})`,
|
|
2465
|
+
style: z({
|
|
2466
|
+
cursor: ga() ? "pointer" : "default"
|
|
2467
|
+
}),
|
|
2468
|
+
innerHTML: v(Qt)({
|
|
2469
|
+
content: String(e.text),
|
|
2470
|
+
fontSize: m.value.xAxis,
|
|
2471
|
+
fill: l.value.chart.grid.labels.xAxisLabels.color,
|
|
2472
|
+
x: 0,
|
|
2473
|
+
y: 0
|
|
2474
|
+
}),
|
|
2475
|
+
onClick: () => ba(e, s)
|
|
2476
|
+
}, null, 12, fu)) : (u(), i("text", {
|
|
2477
|
+
key: 0,
|
|
2478
|
+
class: "vue-data-ui-time-label",
|
|
2479
|
+
"text-anchor": l.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : l.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
2480
|
+
"font-size": m.value.xAxis,
|
|
2481
|
+
fill: l.value.chart.grid.labels.xAxisLabels.color,
|
|
2482
|
+
transform: `translate(${n.value.left + n.value.width / b.value * s + n.value.width / b.value / 2}, ${n.value.bottom + m.value.xAxis * 1.5}), rotate(${l.value.chart.grid.labels.xAxisLabels.rotation})`,
|
|
2483
|
+
style: z({
|
|
2484
|
+
cursor: ga() ? "pointer" : "default"
|
|
2485
|
+
}),
|
|
2486
|
+
onClick: () => ba(e, s)
|
|
2487
|
+
}, le(e.text || ""), 13, hu))
|
|
2488
|
+
], 64)) : d("", !0)
|
|
2489
|
+
]))), 128))
|
|
2490
|
+
], 512)) : d("", !0),
|
|
2491
|
+
Ma.value.length && !f.value.isStacked ? (u(), i("g", gu, [
|
|
2492
|
+
(u(!0), i(h, null, k(Ma.value, (e) => (u(), i("g", {
|
|
2493
|
+
key: e.uid
|
|
2494
|
+
}, [
|
|
2495
|
+
e.yTop && e.show && isFinite(e.yTop) ? (u(), i("line", {
|
|
2496
|
+
key: 0,
|
|
2497
|
+
x1: e.x1,
|
|
2498
|
+
y1: e.yTop,
|
|
2499
|
+
x2: e.x2,
|
|
2500
|
+
y2: e.yTop,
|
|
2501
|
+
stroke: e.config.line.stroke,
|
|
2502
|
+
"stroke-width": e.config.line.strokeWidth,
|
|
2503
|
+
"stroke-dasharray": e.config.line.strokeDasharray,
|
|
2504
|
+
"stroke-linecap": "round",
|
|
2505
|
+
style: { animation: "none !important" }
|
|
2506
|
+
}, null, 8, xu)) : d("", !0),
|
|
2507
|
+
e.yBottom && e.show && isFinite(e.yBottom) ? (u(), i("line", {
|
|
2508
|
+
key: 1,
|
|
2509
|
+
x1: e.x1,
|
|
2510
|
+
y1: e.yBottom,
|
|
2511
|
+
x2: e.x2,
|
|
2512
|
+
y2: e.yBottom,
|
|
2513
|
+
stroke: e.config.line.stroke,
|
|
2514
|
+
"stroke-width": e.config.line.strokeWidth,
|
|
2515
|
+
"stroke-dasharray": e.config.line.strokeDasharray,
|
|
2516
|
+
"stroke-linecap": "round",
|
|
2517
|
+
style: { animation: "none !important" }
|
|
2518
|
+
}, null, 8, mu)) : d("", !0),
|
|
2519
|
+
e.hasArea && e.show && isFinite(e.yTop) && isFinite(e.yBottom) ? (u(), i("rect", {
|
|
2520
|
+
key: 2,
|
|
2521
|
+
y: Math.min(e.yTop, e.yBottom),
|
|
2522
|
+
x: e.x1,
|
|
2523
|
+
width: n.value.width,
|
|
2524
|
+
height: v(T)(e.areaHeight, 0),
|
|
2525
|
+
fill: v(Se)(e.config.area.fill, e.config.area.opacity),
|
|
2526
|
+
style: { animation: "none !important" }
|
|
2527
|
+
}, null, 8, bu)) : d("", !0),
|
|
2528
|
+
e.config.label.text && e.show && isFinite(e._box.y) ? (u(), i("rect", Ql({
|
|
2529
|
+
key: 3,
|
|
2530
|
+
class: "vue-ui-xy-annotation-label-box"
|
|
2531
|
+
}, { ref_for: !0 }, e._box, { style: { animation: "none !important", transition: "none !important" } }), null, 16)) : d("", !0),
|
|
2532
|
+
e.config.label.text && e.show && isFinite(e._text.y) ? (u(), i("text", {
|
|
2533
|
+
key: 4,
|
|
2534
|
+
id: e.id,
|
|
2535
|
+
class: "vue-ui-xy-annotation-label",
|
|
2536
|
+
x: e._text.x,
|
|
2537
|
+
y: e._text.y,
|
|
2538
|
+
"font-size": e.config.label.fontSize,
|
|
2539
|
+
fill: e.config.label.color,
|
|
2540
|
+
"text-anchor": e.config.label.textAnchor
|
|
2541
|
+
}, le(e.config.label.text), 9, yu)) : d("", !0)
|
|
2542
|
+
]))), 128))
|
|
2543
|
+
])) : d("", !0),
|
|
2544
|
+
Ul.value ? (u(), i("g", pu, [
|
|
2545
|
+
(u(!0), i(h, null, k(b.value, (e, s) => (u(), i("rect", {
|
|
2546
|
+
key: `tooltip_trap_${s}`,
|
|
2547
|
+
x: n.value.left + n.value.width / b.value * s,
|
|
2548
|
+
y: n.value.top,
|
|
2549
|
+
height: n.value.height < 0 ? 10 : n.value.height,
|
|
2550
|
+
width: n.value.width / b.value < 0 ? 1e-5 : n.value.width / b.value,
|
|
2551
|
+
fill: "transparent",
|
|
2552
|
+
onMouseenter: (t) => Ta(!0, s),
|
|
2553
|
+
onMouseleave: (t) => Ta(!1, s),
|
|
2554
|
+
onClick: (t) => kt(s)
|
|
2555
|
+
}, null, 40, ku))), 128))
|
|
2556
|
+
])) : d("", !0),
|
|
2557
|
+
l.value.chart.timeTag.show && (![null, void 0].includes(p.value) || ![null, void 0].includes(O.value)) ? (u(), i("g", _u, [
|
|
2558
|
+
(u(), i("foreignObject", {
|
|
2559
|
+
x: n.value.left + n.value.width / b.value * ((p.value !== null ? p.value : 0) || (O.value !== null ? O.value : 0)) - 100 + n.value.width / b.value / 2,
|
|
2560
|
+
y: n.value.bottom,
|
|
2561
|
+
width: "200",
|
|
2562
|
+
height: "40",
|
|
2563
|
+
style: { overflow: "visible !important" }
|
|
2564
|
+
}, [
|
|
2565
|
+
x("div", {
|
|
2566
|
+
class: "vue-ui-xy-time-tag",
|
|
2567
|
+
style: z(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${l.value.chart.timeTag.backgroundColor};color:${l.value.chart.timeTag.color};font-size:${l.value.chart.timeTag.fontSize}px`)
|
|
2568
|
+
}, le(J.value[(p.value !== null ? p.value : 0) || (O.value !== null ? O.value : 0)].text || (p.value !== null ? p.value : 0) || (O.value !== null ? O.value : 0)), 5)
|
|
2569
|
+
], 8, wu)),
|
|
2570
|
+
x("circle", {
|
|
2571
|
+
cx: n.value.left + n.value.width / b.value * ((p.value !== null ? p.value : 0) || (O.value !== null ? O.value : 0)) + n.value.width / b.value / 2,
|
|
2572
|
+
cy: n.value.bottom,
|
|
2573
|
+
r: l.value.chart.timeTag.circleMarker.radius,
|
|
2574
|
+
fill: l.value.chart.timeTag.circleMarker.color
|
|
2575
|
+
}, null, 8, Su)
|
|
2576
|
+
])) : d("", !0)
|
|
2577
|
+
])) : d("", !0),
|
|
2578
|
+
q(a.$slots, "svg", { svg: it.value }, void 0, !0)
|
|
2579
|
+
], 512)
|
|
2580
|
+
], 14, go)),
|
|
2581
|
+
a.$slots.watermark ? (u(), i("div", $u, [
|
|
2582
|
+
q(a.$slots, "watermark", Ze(Je({ isPrinting: v(Gl) || v(ca) })), void 0, !0)
|
|
2583
|
+
])) : d("", !0),
|
|
2584
|
+
(u(!0), i(h, null, k(we.value, (e, s) => (u(), i(h, {
|
|
2585
|
+
key: `tag_line_${s}`
|
|
2586
|
+
}, [
|
|
2587
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i(h, {
|
|
2588
|
+
key: `tag_line_${s}_${r}`
|
|
2589
|
+
}, [
|
|
2590
|
+
[O.value, p.value, Xe.value].includes(r) && e.useTag && e.useTag === "end" && l.value.line.tag.followValue ? (u(), i("div", {
|
|
2591
|
+
key: 0,
|
|
2592
|
+
ref_for: !0,
|
|
2593
|
+
ref: (o) => Sl(s, r, o, "right", "line"),
|
|
2594
|
+
class: "vue-ui-xy-tag",
|
|
2595
|
+
"data-tag": "right",
|
|
2596
|
+
style: z({
|
|
2597
|
+
position: "fixed",
|
|
2598
|
+
top: v(Ee)({
|
|
2599
|
+
svgElement: ye.value,
|
|
2600
|
+
x: n.value.right + l.value.line.tag.fontSize / 1.5,
|
|
2601
|
+
y: t.y,
|
|
2602
|
+
element: Ce.value[`${s}_${r}_right_line`],
|
|
2603
|
+
position: "right"
|
|
2604
|
+
}).top + "px",
|
|
2605
|
+
left: v(Ee)({
|
|
2606
|
+
svgElement: ye.value,
|
|
2607
|
+
x: n.value.right + l.value.line.tag.fontSize / 1.5,
|
|
2608
|
+
y: t.y,
|
|
2609
|
+
element: Ce.value[`${s}_${r}_right_line`],
|
|
2610
|
+
position: "right"
|
|
2611
|
+
}).left + "px",
|
|
2612
|
+
height: "fit-content",
|
|
2613
|
+
width: "fit-content",
|
|
2614
|
+
background: e.color,
|
|
2615
|
+
color: v(Fe)(e.color),
|
|
2616
|
+
padding: "0 6px",
|
|
2617
|
+
fontSize: l.value.line.tag.fontSize + "px",
|
|
2618
|
+
opacity: 1
|
|
2619
|
+
})
|
|
2620
|
+
}, [
|
|
2621
|
+
(u(), i("svg", Lu, [
|
|
2622
|
+
x("path", {
|
|
2623
|
+
d: "M 0,10 10,0 10,20 Z",
|
|
2624
|
+
fill: e.color,
|
|
2625
|
+
stroke: "none"
|
|
2626
|
+
}, null, 8, Au)
|
|
2627
|
+
])),
|
|
2628
|
+
x("div", {
|
|
2629
|
+
class: "vue-ui-xy-tag-content",
|
|
2630
|
+
innerHTML: v(re)(
|
|
2631
|
+
l.value.line.tag.formatter,
|
|
2632
|
+
t.value,
|
|
2633
|
+
e.name,
|
|
2634
|
+
{
|
|
2635
|
+
datapoint: t,
|
|
2636
|
+
seriesIndex: r,
|
|
2637
|
+
serieName: e.name
|
|
2638
|
+
}
|
|
2639
|
+
)
|
|
2640
|
+
}, null, 8, Mu)
|
|
2641
|
+
], 4)) : d("", !0),
|
|
2642
|
+
[O.value, p.value, Xe.value].includes(r) && e.useTag && e.useTag === "start" && l.value.line.tag.followValue ? (u(), i("div", {
|
|
2643
|
+
key: 1,
|
|
2644
|
+
ref_for: !0,
|
|
2645
|
+
ref: (o) => Sl(s, r, o, "left", "line"),
|
|
2646
|
+
class: "vue-ui-xy-tag",
|
|
2647
|
+
"data-tag": "left",
|
|
2648
|
+
style: z({
|
|
2649
|
+
position: "fixed",
|
|
2650
|
+
top: v(Ee)({
|
|
2651
|
+
svgElement: ye.value,
|
|
2652
|
+
x: n.value.left - l.value.line.tag.fontSize / 1.5,
|
|
2653
|
+
y: t.y,
|
|
2654
|
+
element: Ce.value[`${s}_${r}_left_line`],
|
|
2655
|
+
position: "left"
|
|
2656
|
+
}).top + "px",
|
|
2657
|
+
left: v(Ee)({
|
|
2658
|
+
svgElement: ye.value,
|
|
2659
|
+
x: n.value.left - l.value.line.tag.fontSize / 1.5,
|
|
2660
|
+
y: t.y,
|
|
2661
|
+
element: Ce.value[`${s}_${r}_left_line`],
|
|
2662
|
+
position: "left"
|
|
2663
|
+
}).left + "px",
|
|
2664
|
+
height: "fit-content",
|
|
2665
|
+
width: "fit-content",
|
|
2666
|
+
background: e.color,
|
|
2667
|
+
color: v(Fe)(e.color),
|
|
2668
|
+
padding: "0 6px",
|
|
2669
|
+
fontSize: l.value.line.tag.fontSize + "px",
|
|
2670
|
+
opacity: 1
|
|
2671
|
+
})
|
|
2672
|
+
}, [
|
|
2673
|
+
(u(), i("svg", zu, [
|
|
2674
|
+
x("path", {
|
|
2675
|
+
d: "M 0,0 10,10 0,20 Z",
|
|
2676
|
+
fill: e.color,
|
|
2677
|
+
stroke: "none"
|
|
2678
|
+
}, null, 8, Cu)
|
|
2679
|
+
])),
|
|
2680
|
+
x("div", {
|
|
2681
|
+
class: "vue-ui-xy-tag-content",
|
|
2682
|
+
innerHTML: v(re)(
|
|
2683
|
+
l.value.line.tag.formatter,
|
|
2684
|
+
t.value,
|
|
2685
|
+
e.name,
|
|
2686
|
+
{
|
|
2687
|
+
datapoint: t,
|
|
2688
|
+
seriesIndex: r,
|
|
2689
|
+
serieName: e.name
|
|
2690
|
+
}
|
|
2691
|
+
)
|
|
2692
|
+
}, null, 8, Iu)
|
|
2693
|
+
], 4)) : d("", !0)
|
|
2694
|
+
], 64))), 128))
|
|
2695
|
+
], 64))), 128)),
|
|
2696
|
+
(u(!0), i(h, null, k(Le.value, (e, s) => (u(), i(h, {
|
|
2697
|
+
key: `tag_plot_${s}`
|
|
2698
|
+
}, [
|
|
2699
|
+
(u(!0), i(h, null, k(e.plots, (t, r) => (u(), i(h, {
|
|
2700
|
+
key: `tag_plot_${s}_${r}`
|
|
2701
|
+
}, [
|
|
2702
|
+
[O.value, p.value, Xe.value].includes(r) && e.useTag && e.useTag === "end" && l.value.plot.tag.followValue ? (u(), i("div", {
|
|
2703
|
+
key: 0,
|
|
2704
|
+
ref_for: !0,
|
|
2705
|
+
ref: (o) => Sl(s, r, o, "right", "plot"),
|
|
2706
|
+
class: "vue-ui-xy-tag",
|
|
2707
|
+
"data-tag": "right",
|
|
2708
|
+
style: z({
|
|
2709
|
+
position: "fixed",
|
|
2710
|
+
top: v(Ee)({
|
|
2711
|
+
svgElement: ye.value,
|
|
2712
|
+
x: n.value.right + l.value.plot.tag.fontSize / 1.5,
|
|
2713
|
+
y: t.y,
|
|
2714
|
+
element: Ce.value[`${s}_${r}_right_plot`],
|
|
2715
|
+
position: "right"
|
|
2716
|
+
}).top + "px",
|
|
2717
|
+
left: v(Ee)({
|
|
2718
|
+
svgElement: ye.value,
|
|
2719
|
+
x: n.value.right + l.value.plot.tag.fontSize / 1.5,
|
|
2720
|
+
y: t.y,
|
|
2721
|
+
element: Ce.value[`${s}_${r}_right_plot`],
|
|
2722
|
+
position: "right"
|
|
2723
|
+
}).left + "px",
|
|
2724
|
+
height: "fit-content",
|
|
2725
|
+
width: "fit-content",
|
|
2726
|
+
background: e.color,
|
|
2727
|
+
color: v(Fe)(e.color),
|
|
2728
|
+
padding: "0 6px",
|
|
2729
|
+
fontSize: l.value.plot.tag.fontSize + "px",
|
|
2730
|
+
opacity: 1
|
|
2731
|
+
})
|
|
2732
|
+
}, [
|
|
2733
|
+
(u(), i("svg", Tu, [
|
|
2734
|
+
x("path", {
|
|
2735
|
+
d: "M 0,10 10,0 10,20 Z",
|
|
2736
|
+
fill: e.color,
|
|
2737
|
+
stroke: "none"
|
|
2738
|
+
}, null, 8, Ou)
|
|
2739
|
+
])),
|
|
2740
|
+
x("div", {
|
|
2741
|
+
class: "vue-ui-xy-tag-content",
|
|
2742
|
+
innerHTML: v(re)(
|
|
2743
|
+
l.value.plot.tag.formatter,
|
|
2744
|
+
t.value,
|
|
2745
|
+
e.name,
|
|
2746
|
+
{
|
|
2747
|
+
datapoint: t,
|
|
2748
|
+
seriesIndex: r,
|
|
2749
|
+
serieName: e.name
|
|
2750
|
+
}
|
|
2751
|
+
)
|
|
2752
|
+
}, null, 8, Nu)
|
|
2753
|
+
], 4)) : d("", !0),
|
|
2754
|
+
[O.value, p.value, Xe.value].includes(r) && e.useTag && e.useTag === "start" && l.value.plot.tag.followValue ? (u(), i("div", {
|
|
2755
|
+
key: 1,
|
|
2756
|
+
ref_for: !0,
|
|
2757
|
+
ref: (o) => Sl(s, r, o, "left", "plot"),
|
|
2758
|
+
class: "vue-ui-xy-tag",
|
|
2759
|
+
"data-tag": "left",
|
|
2760
|
+
style: z({
|
|
2761
|
+
position: "fixed",
|
|
2762
|
+
top: v(Ee)({
|
|
2763
|
+
svgElement: ye.value,
|
|
2764
|
+
x: n.value.left - l.value.plot.tag.fontSize / 1.5,
|
|
2765
|
+
y: t.y,
|
|
2766
|
+
element: Ce.value[`${s}_${r}_left_plot`],
|
|
2767
|
+
position: "left"
|
|
2768
|
+
}).top + "px",
|
|
2769
|
+
left: v(Ee)({
|
|
2770
|
+
svgElement: ye.value,
|
|
2771
|
+
x: n.value.left - l.value.plot.tag.fontSize / 1.5,
|
|
2772
|
+
y: t.y,
|
|
2773
|
+
element: Ce.value[`${s}_${r}_left_plot`],
|
|
2774
|
+
position: "left"
|
|
2775
|
+
}).left + "px",
|
|
2776
|
+
height: "fit-content",
|
|
2777
|
+
width: "fit-content",
|
|
2778
|
+
background: e.color,
|
|
2779
|
+
color: v(Fe)(e.color),
|
|
2780
|
+
padding: "0 6px",
|
|
2781
|
+
fontSize: l.value.plot.tag.fontSize + "px",
|
|
2782
|
+
opacity: 1
|
|
2783
|
+
})
|
|
2784
|
+
}, [
|
|
2785
|
+
(u(), i("svg", Vu, [
|
|
2786
|
+
x("path", {
|
|
2787
|
+
d: "M 0,0 10,10 0,20 Z",
|
|
2788
|
+
fill: e.color,
|
|
2789
|
+
stroke: "none"
|
|
2790
|
+
}, null, 8, Pu)
|
|
2791
|
+
])),
|
|
2792
|
+
x("div", {
|
|
2793
|
+
class: "vue-ui-xy-tag-content",
|
|
2794
|
+
innerHTML: v(re)(
|
|
2795
|
+
l.value.plot.tag.formatter,
|
|
2796
|
+
t.value,
|
|
2797
|
+
e.name,
|
|
2798
|
+
{
|
|
2799
|
+
datapoint: t,
|
|
2800
|
+
seriesIndex: r,
|
|
2801
|
+
serieName: e.name
|
|
2802
|
+
}
|
|
2803
|
+
)
|
|
2804
|
+
}, null, 8, Hu)
|
|
2805
|
+
], 4)) : d("", !0)
|
|
2806
|
+
], 64))), 128))
|
|
2807
|
+
], 64))), 128)),
|
|
2808
|
+
l.value.chart.zoom.show && Ve.value > 6 && Wl.value ? (u(), Me(so, {
|
|
2809
|
+
ref_key: "chartSlicer",
|
|
2810
|
+
ref: Ne,
|
|
2811
|
+
key: `slicer_${Bl.value}`,
|
|
2812
|
+
background: l.value.chart.zoom.color,
|
|
2813
|
+
fontSize: l.value.chart.zoom.fontSize,
|
|
2814
|
+
useResetSlot: l.value.chart.zoom.useResetSlot,
|
|
2815
|
+
labelLeft: J.value[0] ? J.value[0].text : "",
|
|
2816
|
+
labelRight: J.value.at(-1) ? J.value.at(-1).text : "",
|
|
2817
|
+
textColor: l.value.chart.color,
|
|
2818
|
+
inputColor: l.value.chart.zoom.color,
|
|
2819
|
+
selectColor: l.value.chart.zoom.highlightColor,
|
|
2820
|
+
borderColor: l.value.chart.backgroundColor,
|
|
2821
|
+
minimap: It.value,
|
|
2822
|
+
smoothMinimap: l.value.chart.zoom.minimap.smooth,
|
|
2823
|
+
minimapSelectedColor: l.value.chart.zoom.minimap.selectedColor,
|
|
2824
|
+
minimapSelectionRadius: l.value.chart.zoom.minimap.selectionRadius,
|
|
2825
|
+
minimapLineColor: l.value.chart.zoom.minimap.lineColor,
|
|
2826
|
+
minimapSelectedColorOpacity: l.value.chart.zoom.minimap.selectedColorOpacity,
|
|
2827
|
+
minimapSelectedIndex: p.value,
|
|
2828
|
+
minimapIndicatorColor: l.value.chart.zoom.minimap.indicatorColor,
|
|
2829
|
+
verticalHandles: l.value.chart.zoom.minimap.verticalHandles,
|
|
2830
|
+
max: Ve.value,
|
|
2831
|
+
min: 0,
|
|
2832
|
+
valueStart: y.value.start,
|
|
2833
|
+
valueEnd: y.value.end,
|
|
2834
|
+
start: y.value.start,
|
|
2835
|
+
"onUpdate:start": c[1] || (c[1] = (e) => y.value.start = e),
|
|
2836
|
+
end: y.value.end,
|
|
2837
|
+
"onUpdate:end": c[2] || (c[2] = (e) => y.value.end = e),
|
|
2838
|
+
refreshStartPoint: l.value.chart.zoom.startIndex !== null ? l.value.chart.zoom.startIndex : 0,
|
|
2839
|
+
refreshEndPoint: l.value.chart.zoom.endIndex !== null ? l.value.chart.zoom.endIndex + 1 : Math.max(...Tl.dataset.map((e) => v(Ye)({ data: e.series, threshold: l.value.downsample.threshold }).length)),
|
|
2840
|
+
enableRangeHandles: l.value.chart.zoom.enableRangeHandles,
|
|
2841
|
+
enableSelectionDrag: l.value.chart.zoom.enableSelectionDrag,
|
|
2842
|
+
onReset: pt,
|
|
2843
|
+
onTrapMouse: mt
|
|
2844
|
+
}, {
|
|
2845
|
+
"reset-action": ue(({ reset: e }) => [
|
|
2846
|
+
q(a.$slots, "reset-action", Ze(Je({ reset: e })), void 0, !0)
|
|
2847
|
+
]),
|
|
2848
|
+
_: 3
|
|
2849
|
+
}, 8, ["background", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "borderColor", "minimap", "smoothMinimap", "minimapSelectedColor", "minimapSelectionRadius", "minimapLineColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapIndicatorColor", "verticalHandles", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : d("", !0),
|
|
2850
|
+
l.value.chart.legend.show ? (u(), i("div", {
|
|
2851
|
+
key: 6,
|
|
2852
|
+
ref_key: "chartLegend",
|
|
2853
|
+
ref: el,
|
|
2854
|
+
class: "vue-ui-xy-legend",
|
|
2855
|
+
style: z(`font-size:${l.value.chart.legend.fontSize}px`)
|
|
2856
|
+
}, [
|
|
2857
|
+
(u(!0), i(h, null, k(Te.value, (e, s) => (u(), i("div", {
|
|
2858
|
+
key: `div_legend_item_${s}`,
|
|
2859
|
+
onClick: (t) => $a(e),
|
|
2860
|
+
class: Ue({ "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": te.value.includes(e.id) })
|
|
2861
|
+
}, [
|
|
2862
|
+
il.value[e.type] === "line" ? (u(), i("svg", Bu, [
|
|
2863
|
+
x("rect", {
|
|
2864
|
+
x: "0",
|
|
2865
|
+
y: "7.5",
|
|
2866
|
+
rx: "1.5",
|
|
2867
|
+
stroke: l.value.chart.backgroundColor,
|
|
2868
|
+
"stroke-width": 0.5,
|
|
2869
|
+
height: "3",
|
|
2870
|
+
width: "20",
|
|
2871
|
+
fill: e.color
|
|
2872
|
+
}, null, 8, Yu),
|
|
2873
|
+
xl(Il, {
|
|
2874
|
+
plot: { x: 10, y: 9 },
|
|
2875
|
+
radius: 4,
|
|
2876
|
+
color: e.color,
|
|
2877
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
|
|
2878
|
+
stroke: l.value.chart.backgroundColor,
|
|
2879
|
+
strokeWidth: 0.5
|
|
2880
|
+
}, null, 8, ["color", "shape", "stroke"])
|
|
2881
|
+
])) : il.value[e.type] === "bar" ? (u(), i("svg", Fu, [
|
|
2882
|
+
il.value[e.type] === "bar" && a.$slots.pattern ? (u(), i("rect", {
|
|
2883
|
+
key: 0,
|
|
2884
|
+
x: "0",
|
|
2885
|
+
y: "0",
|
|
2886
|
+
rx: "1",
|
|
2887
|
+
height: "40",
|
|
2888
|
+
width: "40",
|
|
2889
|
+
stroke: "none",
|
|
2890
|
+
fill: e.color
|
|
2891
|
+
}, null, 8, Eu)) : d("", !0),
|
|
2892
|
+
il.value[e.type] === "bar" ? (u(), i("rect", {
|
|
2893
|
+
key: 1,
|
|
2894
|
+
x: "0",
|
|
2895
|
+
y: "0",
|
|
2896
|
+
rx: "1",
|
|
2897
|
+
height: "40",
|
|
2898
|
+
width: "40",
|
|
2899
|
+
stroke: "none",
|
|
2900
|
+
fill: a.$slots.pattern ? `url(#pattern_${U.value}_${e.slotAbsoluteIndex})` : e.color
|
|
2901
|
+
}, null, 8, Wu)) : d("", !0)
|
|
2902
|
+
])) : (u(), i("svg", Xu, [
|
|
2903
|
+
xl(Il, {
|
|
2904
|
+
plot: { x: 6, y: 6 },
|
|
2905
|
+
radius: 5,
|
|
2906
|
+
color: e.color,
|
|
2907
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle"
|
|
2908
|
+
}, null, 8, ["color", "shape"])
|
|
2909
|
+
])),
|
|
2910
|
+
x("span", {
|
|
2911
|
+
style: z(`color:${l.value.chart.legend.color}`)
|
|
2912
|
+
}, le(e.name), 5)
|
|
2913
|
+
], 10, Ru))), 128))
|
|
2914
|
+
], 4)) : (u(), i("div", {
|
|
2915
|
+
key: 7,
|
|
2916
|
+
ref_key: "chartLegend",
|
|
2917
|
+
ref: el
|
|
2918
|
+
}, [
|
|
2919
|
+
q(a.$slots, "legend", { legend: Te.value }, void 0, !0)
|
|
2920
|
+
], 512)),
|
|
2921
|
+
a.$slots.source ? (u(), i("div", {
|
|
2922
|
+
key: 8,
|
|
2923
|
+
ref_key: "source",
|
|
2924
|
+
ref: ul,
|
|
2925
|
+
dir: "auto"
|
|
2926
|
+
}, [
|
|
2927
|
+
q(a.$slots, "source", {}, void 0, !0)
|
|
2928
|
+
], 512)) : d("", !0),
|
|
2929
|
+
xl(v(Qa), {
|
|
2930
|
+
show: f.value.showTooltip && sa.value,
|
|
2931
|
+
backgroundColor: l.value.chart.tooltip.backgroundColor,
|
|
2932
|
+
color: l.value.chart.tooltip.color,
|
|
2933
|
+
fontSize: l.value.chart.tooltip.fontSize,
|
|
2934
|
+
borderRadius: l.value.chart.tooltip.borderRadius,
|
|
2935
|
+
borderColor: l.value.chart.tooltip.borderColor,
|
|
2936
|
+
borderWidth: l.value.chart.tooltip.borderWidth,
|
|
2937
|
+
backgroundOpacity: l.value.chart.tooltip.backgroundOpacity,
|
|
2938
|
+
position: l.value.chart.tooltip.position,
|
|
2939
|
+
offsetY: l.value.chart.tooltip.offsetY,
|
|
2940
|
+
parent: a.$refs.chart,
|
|
2941
|
+
content: Tt.value,
|
|
2942
|
+
isFullscreen: al.value,
|
|
2943
|
+
isCustom: l.value.chart.tooltip.customFormat && typeof l.value.chart.tooltip.customFormat == "function"
|
|
2944
|
+
}, {
|
|
2945
|
+
"tooltip-before": ue(() => [
|
|
2946
|
+
q(a.$slots, "tooltip-before", Ze(Je({ ...za.value })), void 0, !0)
|
|
2947
|
+
]),
|
|
2948
|
+
"tooltip-after": ue(() => [
|
|
2949
|
+
q(a.$slots, "tooltip-after", Ze(Je({ ...za.value })), void 0, !0)
|
|
2950
|
+
]),
|
|
2951
|
+
_: 3
|
|
2952
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
2953
|
+
Wl.value ? (u(), Me(v(at), {
|
|
2954
|
+
key: 9,
|
|
2955
|
+
hideDetails: "",
|
|
2956
|
+
config: {
|
|
2957
|
+
open: f.value.showTable,
|
|
2958
|
+
maxHeight: 1e4,
|
|
2959
|
+
body: {
|
|
2960
|
+
backgroundColor: l.value.chart.backgroundColor,
|
|
2961
|
+
color: l.value.chart.color
|
|
2962
|
+
},
|
|
2963
|
+
head: {
|
|
2964
|
+
backgroundColor: l.value.chart.backgroundColor,
|
|
2965
|
+
color: l.value.chart.color
|
|
2966
|
+
}
|
|
2967
|
+
}
|
|
2968
|
+
}, {
|
|
2969
|
+
content: ue(() => [
|
|
2970
|
+
x("div", {
|
|
2971
|
+
style: z(`${v(Gl) ? "" : "max-height:400px"};overflow:auto;width:100%;margin-top:48px`)
|
|
2972
|
+
}, [
|
|
2973
|
+
x("div", Gu, [
|
|
2974
|
+
Bt(x("input", {
|
|
2975
|
+
type: "checkbox",
|
|
2976
|
+
"onUpdate:modelValue": c[3] || (c[3] = (e) => nl.value = e)
|
|
2977
|
+
}, null, 512), [
|
|
2978
|
+
[Yt, nl.value]
|
|
2979
|
+
]),
|
|
2980
|
+
x("div", {
|
|
2981
|
+
onClick: c[4] || (c[4] = (e) => nl.value = !nl.value),
|
|
2982
|
+
style: { cursor: "pointer" }
|
|
2983
|
+
}, [
|
|
2984
|
+
xl(v(et), {
|
|
2985
|
+
name: "chartLine",
|
|
2986
|
+
size: 20,
|
|
2987
|
+
stroke: l.value.chart.color
|
|
2988
|
+
}, null, 8, ["stroke"])
|
|
2989
|
+
])
|
|
2990
|
+
]),
|
|
2991
|
+
nl.value ? (u(), Me(v(lt), {
|
|
2992
|
+
key: `sparkline_${Yl.value}`,
|
|
2993
|
+
dataset: Mt.value,
|
|
2994
|
+
config: zt.value
|
|
2995
|
+
}, null, 8, ["dataset", "config"])) : (u(), Me(v(Ka), {
|
|
2996
|
+
key: `table_${ra.value}`,
|
|
2997
|
+
colNames: Al.value.colNames,
|
|
2998
|
+
head: Al.value.head,
|
|
2999
|
+
body: Al.value.body,
|
|
3000
|
+
config: Al.value.config,
|
|
3001
|
+
title: `${l.value.chart.title.text}${l.value.chart.title.subtitle.text ? ` : ${l.value.chart.title.subtitle.text}` : ""}`,
|
|
3002
|
+
onClose: c[5] || (c[5] = (e) => f.value.showTable = !1)
|
|
3003
|
+
}, {
|
|
3004
|
+
th: ue(({ th: e }) => [
|
|
3005
|
+
x("div", { innerHTML: e }, null, 8, Du)
|
|
3006
|
+
]),
|
|
3007
|
+
td: ue(({ td: e }) => [
|
|
3008
|
+
Ft(le(isNaN(Number(e)) ? e : v(me)({
|
|
3009
|
+
p: l.value.chart.labels.prefix,
|
|
3010
|
+
v: e,
|
|
3011
|
+
s: l.value.chart.labels.suffix,
|
|
3012
|
+
r: l.value.table.rounding
|
|
3013
|
+
})), 1)
|
|
3014
|
+
]),
|
|
3015
|
+
_: 1
|
|
3016
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
3017
|
+
], 4)
|
|
3018
|
+
]),
|
|
3019
|
+
_: 1
|
|
3020
|
+
}, 8, ["config"])) : d("", !0),
|
|
3021
|
+
v(Xl) ? (u(), Me(co, { key: 10 })) : d("", !0)
|
|
3022
|
+
], 46, fo));
|
|
3023
|
+
}
|
|
3024
|
+
}, rr = /* @__PURE__ */ ho(qu, [["__scopeId", "data-v-0e1aac69"]]);
|
|
3025
|
+
export {
|
|
3026
|
+
rr as default
|
|
3027
|
+
};
|