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