vue-data-ui 3.22.5 → 3.22.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-CgzmXCW_.js → Arrow-Ds4xmpiQ.js} +1 -1
- package/dist/{BaseDraggableDialog-DjzNWkiE.js → BaseDraggableDialog-VbypEaAa.js} +2 -2
- package/dist/{BaseIcon-xBuW2jjI.js → BaseIcon-DcUvOfxf.js} +1 -1
- package/dist/{BaseLegendToggle-C4Usj0LI.js → BaseLegendToggle-DFwIY5bE.js} +1 -1
- package/dist/{BaseZoomControls-Cg9o2J-q.js → BaseZoomControls-DwolSINF.js} +2 -2
- package/dist/{ColorPicker-Usv7badH.js → ColorPicker-UVDPcrjE.js} +2 -2
- package/dist/{DataTable-PidUPOit.js → DataTable-CXfvIulC.js} +2 -2
- package/dist/{Legend-DXOzbXb-.js → Legend-D-635Kag.js} +2 -2
- package/dist/{NonSvgPenAndPaper-OIs8I25K.js → NonSvgPenAndPaper-pR_1qp3s.js} +29 -29
- package/dist/{PackageVersion-CqE8ssFu.js → PackageVersion-Da7hl-34.js} +1 -1
- package/dist/{PenAndPaper-ISUbDKXq.js → PenAndPaper-Bk2-E7V4.js} +18 -18
- package/dist/{Shape-BnF9aMPX.js → Shape-BSetplwm.js} +1 -1
- package/dist/{Slicer-hEvKOLw3.js → Slicer-ClIGOuoX.js} +2 -2
- package/dist/{SlicerPreview-BDI-aCXE.js → SlicerPreview-D1n9AW39.js} +4 -4
- package/dist/{SparkTooltip-DaWSTzfA.js → SparkTooltip-CjDAyolg.js} +1 -1
- package/dist/{Title-DDEEO-Nr.js → Title-C-p0ilWB.js} +1 -1
- package/dist/{Tooltip-BhKov422.js → Tooltip-YabpoXo1.js} +1 -1
- package/dist/{UserOptions-BxT1XHzN.js → UserOptions-BO4VFL8O.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-ZOysoMwu.js → dom-to-png-CVJfsfwL.js} +1 -1
- package/dist/exposedLib-CjwriUaG.js +19 -0
- package/dist/{img-B29J8tV5.js → img-B_y5qDdm.js} +1 -1
- package/dist/{labelUtils-BFcL_t-A.js → labelUtils-CyVwqXSh.js} +1 -1
- package/dist/{lib-CuwHGt1j.js → lib-DRBJCmHW.js} +6 -9
- package/dist/{package-YOcaZtwF.js → package-DyQ_PQis.js} +1 -1
- package/dist/{pdf-ymYt9Lee.js → pdf-CG02qhAH.js} +1 -1
- package/dist/{render-common-B80rr2N_.js → render-common-CUAlQvAQ.js} +22 -22
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +13 -0
- package/dist/types/vue-ui-treemap.d.ts +3 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-DzAZ-MeY.js → useAutoSizeLabelsInsideViewbox-DPMOys9n.js} +1 -1
- package/dist/{useConfig-pVLia3dt.js → useConfig-DYM3f6EI.js} +5 -3
- package/dist/{useNestedProp-BjkuFaz1.js → useNestedProp-BEo2N1Db.js} +1 -1
- package/dist/{useObjectBindings-C1XuDxFr.js → useObjectBindings-CD31syQb.js} +1 -1
- package/dist/{usePrinter-C0wAS8yc.js → usePrinter-CRp5IW3v.js} +2 -2
- package/dist/utils.js +10 -10
- package/dist/{vue-data-ui-mqURXOql.js → vue-data-ui-Bpu4kxlm.js} +68 -68
- package/dist/vue-data-ui.js +73 -73
- package/dist/vue-ui-3d-bar-BAH0jNtT.js +1757 -0
- package/dist/{vue-ui-accordion-B64IJyPU.js → vue-ui-accordion-CfMrbDoq.js} +4 -4
- package/dist/vue-ui-age-pyramid-BF5ZuuyI.js +1238 -0
- package/dist/{vue-ui-annotator-CU4CdKMm.js → vue-ui-annotator-CG6rhFpy.js} +68 -68
- package/dist/{vue-ui-bullet-RGCGF_cO.js → vue-ui-bullet-C_oBS1cr.js} +18 -18
- package/dist/{vue-ui-bump-CiUmHi6k.js → vue-ui-bump-BZB1Na8h.js} +243 -243
- package/dist/{vue-ui-candlestick-BJUk5fMm.js → vue-ui-candlestick-8d_1xO8X.js} +27 -27
- package/dist/{vue-ui-carousel-table-BksIDurC.js → vue-ui-carousel-table-BfZNcwmY.js} +43 -43
- package/dist/vue-ui-chestnut-Cx8T3NEl.js +2010 -0
- package/dist/vue-ui-chord-B-sauvLo.js +1391 -0
- package/dist/{vue-ui-circle-pack-DddaioRm.js → vue-ui-circle-pack-BLh8HnGK.js} +32 -32
- package/dist/{vue-ui-cursor-D2-hWt_G.js → vue-ui-cursor-DVsEm_4l.js} +4 -4
- package/dist/{vue-ui-dag-Dp7pV6Ps.js → vue-ui-dag-Cfi0b9qm.js} +24 -24
- package/dist/{vue-ui-dashboard-D91C5cXo.js → vue-ui-dashboard-F_NZ1xoQ.js} +70 -70
- package/dist/{vue-ui-digits-CMA3U4ZS.js → vue-ui-digits-BfP1kbj3.js} +4 -4
- package/dist/vue-ui-donut-BwAyvV3-.js +2410 -0
- package/dist/{vue-ui-donut-DpiS28CQ.js → vue-ui-donut-DlVRnVr_.js} +120 -120
- package/dist/{vue-ui-donut-evolution-2B61hvv2.js → vue-ui-donut-evolution-D1k4u6cA.js} +419 -419
- package/dist/vue-ui-dumbbell-DgmvPpK2.js +1530 -0
- package/dist/{vue-ui-flow-7Yfsu6AY.js → vue-ui-flow-D_7Idmmw.js} +84 -84
- package/dist/vue-ui-funnel-BYCFV5TD.js +777 -0
- package/dist/vue-ui-galaxy-Bjxbg5_B.js +1077 -0
- package/dist/{vue-ui-gauge-yo4G5HMt.js → vue-ui-gauge-Dt0H7DgC.js} +217 -217
- package/dist/{vue-ui-geo-BOHI6oMZ.js → vue-ui-geo-89DEQb5l.js} +18 -18
- package/dist/{vue-ui-gizmo-DI-35oK-.js → vue-ui-gizmo-CQyLK18v.js} +62 -62
- package/dist/{vue-ui-heatmap-DBVM90VE.js → vue-ui-heatmap-o6MvoxBK.js} +247 -247
- package/dist/vue-ui-history-plot-B7zuCfdg.js +1715 -0
- package/dist/{vue-ui-horizontal-bar-XBrvSxtJ.js → vue-ui-horizontal-bar-CwB4sc6M.js} +275 -275
- package/dist/{vue-ui-kpi-55wwhSBh.js → vue-ui-kpi-4C-j92D-.js} +4 -4
- package/dist/{vue-ui-mini-loader-nOsOsA2V.js → vue-ui-mini-loader-Bj4Wv-i8.js} +3 -3
- package/dist/vue-ui-molecule-BDrRmwmm.js +925 -0
- package/dist/{vue-ui-mood-radar-izcbwGOc.js → vue-ui-mood-radar-B5W35Fvp.js} +30 -30
- package/dist/{vue-ui-nested-donuts-DRJ1QT2n.js → vue-ui-nested-donuts-wfesrzle.js} +105 -105
- package/dist/{vue-ui-onion-xTZOmmtb.js → vue-ui-onion-B8-psLbF.js} +40 -40
- package/dist/vue-ui-parallel-coordinate-plot-DBpHCFxa.js +1416 -0
- package/dist/vue-ui-quadrant-BzyGOJR2.js +1978 -0
- package/dist/{vue-ui-quick-chart-CJ1xQgYc.js → vue-ui-quick-chart-so_8PzvS.js} +663 -663
- package/dist/{vue-ui-radar-C26C6p7e.js → vue-ui-radar-5fQ5AAWD.js} +63 -63
- package/dist/{vue-ui-rating-CRziryE2.js → vue-ui-rating-CKWHDKOT.js} +34 -34
- package/dist/vue-ui-relation-circle-Bd_ONHCz.js +924 -0
- package/dist/{vue-ui-ridgeline-BbJa5C-d.js → vue-ui-ridgeline-DVbYznRz.js} +102 -102
- package/dist/vue-ui-rings-c-yLWFHr.js +1246 -0
- package/dist/{vue-ui-scatter-D9Iw5xlb.js → vue-ui-scatter-QhmE7n1H.js} +87 -87
- package/dist/{vue-ui-skeleton-C4D0i9ho.js → vue-ui-skeleton-BkxB6Dik.js} +4 -4
- package/dist/{vue-ui-smiley-BTvDy8Fm.js → vue-ui-smiley-C4g0iaF7.js} +10 -10
- package/dist/{vue-ui-spark-trend-CMb7UI2t.js → vue-ui-spark-trend-0FELlq4x.js} +98 -98
- package/dist/{vue-ui-sparkbar-DEawjWhg.js → vue-ui-sparkbar-D-i_VLO6.js} +87 -87
- package/dist/{vue-ui-sparkgauge-mubHGQF_.js → vue-ui-sparkgauge-CWw6w_ng.js} +48 -48
- package/dist/{vue-ui-sparkhistogram-D8N-jNBt.js → vue-ui-sparkhistogram-DuGpkfma.js} +105 -105
- package/dist/{vue-ui-sparkline-D4p0PS3-.js → vue-ui-sparkline-Bi06lHQd.js} +252 -252
- package/dist/vue-ui-sparkstackbar-DrKgBUmt.js +662 -0
- package/dist/{vue-ui-stackbar-BzHSHKqe.js → vue-ui-stackbar-DDvuDGQ_.js} +85 -85
- package/dist/vue-ui-stackline-C0NHBUaE.js +2416 -0
- package/dist/{vue-ui-strip-plot-pPiVqFYo.js → vue-ui-strip-plot-_6LL45i9.js} +369 -369
- package/dist/{vue-ui-table-BzqQKuL-.js → vue-ui-table-DBlZswRi.js} +26 -26
- package/dist/{vue-ui-table-heatmap-D38YSxhJ.js → vue-ui-table-heatmap-3xYIDKcP.js} +6 -6
- package/dist/{vue-ui-table-sparkline-BnavmY2R.js → vue-ui-table-sparkline-BH5PzEnJ.js} +201 -201
- package/dist/{vue-ui-thermometer-ePIxpTuE.js → vue-ui-thermometer-BxMzAqoT.js} +119 -119
- package/dist/{vue-ui-timer-BQZxD91f.js → vue-ui-timer-ONSitYDm.js} +30 -30
- package/dist/{vue-ui-tiremarks-CDOlCWS8.js → vue-ui-tiremarks-DWXM-9nR.js} +15 -15
- package/dist/vue-ui-treemap-B03c4RIy.js +1713 -0
- package/dist/{vue-ui-waffle-BpZrFfUb.js → vue-ui-waffle-afa8HSxz.js} +160 -160
- package/dist/{vue-ui-wheel-DRfyK9q9.js → vue-ui-wheel-DRP7X8S2.js} +37 -37
- package/dist/{vue-ui-word-cloud-D0JUA9I9.js → vue-ui-word-cloud-AKpMO97a.js} +38 -38
- package/dist/{vue-ui-world-Dx-41fUM.js → vue-ui-world-CqS-HhZl.js} +400 -400
- package/dist/{vue-ui-xy-BLSGO4Lm.js → vue-ui-xy-Bmd11BxR.js} +656 -656
- package/dist/{vue-ui-xy-DpRqQ09J.js → vue-ui-xy-DJ8YKPgs.js} +244 -244
- package/dist/{vue-ui-xy-canvas-CjbjJ70r.js → vue-ui-xy-canvas-DO_PDGKf.js} +47 -47
- package/package.json +1 -1
- package/dist/exposedLib-C2U48XK7.js +0 -19
- package/dist/vue-ui-3d-bar-BZ1Slxfu.js +0 -1757
- package/dist/vue-ui-age-pyramid-uUVFZo8M.js +0 -1238
- package/dist/vue-ui-chestnut-B3OHA5rg.js +0 -2010
- package/dist/vue-ui-chord-DETV2viY.js +0 -1391
- package/dist/vue-ui-donut-DObpw5zP.js +0 -2410
- package/dist/vue-ui-dumbbell-Cmr65TNE.js +0 -1530
- package/dist/vue-ui-funnel-BLRBDW1a.js +0 -777
- package/dist/vue-ui-galaxy-B9cxOcoE.js +0 -1077
- package/dist/vue-ui-history-plot-BiWpOHKE.js +0 -1715
- package/dist/vue-ui-molecule-DB3rmTw1.js +0 -925
- package/dist/vue-ui-parallel-coordinate-plot-BxQ7D2_o.js +0 -1416
- package/dist/vue-ui-quadrant-BvAmtyAE.js +0 -1978
- package/dist/vue-ui-relation-circle-Dl1aWFAI.js +0 -924
- package/dist/vue-ui-rings-CyrvskTi.js +0 -1246
- package/dist/vue-ui-sparkstackbar-DnrZkIIc.js +0 -662
- package/dist/vue-ui-stackline-CWSvsW1n.js +0 -2416
- package/dist/vue-ui-treemap-DrZlX_7n.js +0 -1587
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as e, A as t, At as n, B as r, D as i, E as a, Ft as o, H as s, Ht as c, It as l, L as u, Lt as d, N as f, P as p, R as m, W as h, Wt as g, a as _, b as v, c as y, g as b, h as x, i as S, j as ee, mt as C, q as w, s as te, t as T, z as E } from "./lib-DRBJCmHW.js";
|
|
2
2
|
import { t as D } from "./useTimeLabels-BmBRv27Y.js";
|
|
3
|
-
import { t as O } from "./useConfig-
|
|
4
|
-
import { t as
|
|
5
|
-
import { _ as
|
|
3
|
+
import { t as O } from "./useConfig-DYM3f6EI.js";
|
|
4
|
+
import { t as k } from "./vue_ui_xy-BA3-_LCx.js";
|
|
5
|
+
import { _ as A, d as j, f as M, g as N, h as P, l as ne, m as F, p as I, u as L, v as R } from "./render-common-CUAlQvAQ.js";
|
|
6
6
|
//#region src/svg/vue-ui-xy/create.js
|
|
7
7
|
var { vue_ui_xy: z } = O();
|
|
8
8
|
function re({ config: e = {}, dataset: t = [] } = {}) {
|
|
9
|
-
let
|
|
10
|
-
userConfig:
|
|
9
|
+
let r = e ?? {}, i = g({
|
|
10
|
+
userConfig: r,
|
|
11
11
|
defaultConfig: z
|
|
12
12
|
});
|
|
13
|
-
|
|
13
|
+
C(r, "chart.highlightArea") && (Array.isArray(r.chart.highlightArea) ? i.chart.highlightArea = r.chart.highlightArea.map((e) => g({
|
|
14
14
|
defaultConfig: z.chart.highlightArea,
|
|
15
15
|
userConfig: e
|
|
16
|
-
})) :
|
|
16
|
+
})) : i.chart.highlightArea = [g({
|
|
17
17
|
defaultConfig: z.chart.highlightArea,
|
|
18
|
-
userConfig:
|
|
19
|
-
})]),
|
|
18
|
+
userConfig: r.chart.highlightArea
|
|
19
|
+
})]), C(r, "chart.annotations") && Array.isArray(r.chart.annotations) && r.chart.annotations.length ? i.chart.annotations = r.chart.annotations.map((e) => g({
|
|
20
20
|
defaultConfig: z.chart.annotations[0],
|
|
21
21
|
userConfig: e
|
|
22
|
-
})) :
|
|
23
|
-
let a =
|
|
22
|
+
})) : i.chart.annotations = [], C(r, "chart.grid.position") && r.chart.grid.position === "start" && t.some((e) => e.type === "bar") && (i.chart.grid.position = "middle");
|
|
23
|
+
let a = i.theme;
|
|
24
24
|
if (!a) return {
|
|
25
|
-
...
|
|
26
|
-
customPalette:
|
|
25
|
+
...i,
|
|
26
|
+
customPalette: i.customPalette?.length ? i.customPalette : n
|
|
27
27
|
};
|
|
28
|
-
let o =
|
|
29
|
-
userConfig:
|
|
30
|
-
defaultConfig:
|
|
31
|
-
userConfig:
|
|
32
|
-
defaultConfig:
|
|
28
|
+
let o = g({
|
|
29
|
+
userConfig: r,
|
|
30
|
+
defaultConfig: g({
|
|
31
|
+
userConfig: k[a] || {},
|
|
32
|
+
defaultConfig: i
|
|
33
33
|
})
|
|
34
34
|
});
|
|
35
35
|
return {
|
|
36
36
|
...o,
|
|
37
|
-
customPalette: o.customPalette?.length ? o.customPalette :
|
|
37
|
+
customPalette: o.customPalette?.length ? o.customPalette : c[a] || n
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
function B(e) {
|
|
@@ -54,50 +54,50 @@ function oe({ dataset: e, config: t }) {
|
|
|
54
54
|
ticks: [0, 1]
|
|
55
55
|
};
|
|
56
56
|
let r = t?.chart?.grid?.labels?.xAxis?.scaleMin, i = t?.chart?.grid?.labels?.xAxis?.scaleMax, a = ie(r) ? Number(r) : Math.min(...n), o = ie(i) ? Number(i) : Math.max(...n);
|
|
57
|
-
return
|
|
57
|
+
return x(a === o ? a - 1 : a, a === o ? o + 1 : o, Number.isFinite(Number(t?.chart?.grid?.labels?.xAxis?.scaleSteps)) ? Number(t.chart.grid.labels.xAxis.scaleSteps) : 6);
|
|
58
58
|
}
|
|
59
59
|
function se({ xValue: e, xScale: t, drawingArea: n, config: r }) {
|
|
60
60
|
let i = (Number(e) - t.min) / (t.max - t.min || 1), a = r?.chart?.grid?.labels?.xAxis?.reverse ? 1 - i : i;
|
|
61
61
|
return n.left + n.width * a;
|
|
62
62
|
}
|
|
63
|
-
function ce({ dataset: e = [], config: t = {}, width:
|
|
64
|
-
let
|
|
63
|
+
function ce({ dataset: e = [], config: t = {}, width: r = 1e3, height: i = 600, selectedXIndex: a, additionalSvgContent: o = "", svgTitle: s = "" } = {}) {
|
|
64
|
+
let c = re({
|
|
65
65
|
config: t,
|
|
66
66
|
dataset: e
|
|
67
|
-
}),
|
|
68
|
-
top:
|
|
69
|
-
left:
|
|
70
|
-
right:
|
|
71
|
-
bottom:
|
|
67
|
+
}), l = {
|
|
68
|
+
top: c.chart.padding.top,
|
|
69
|
+
left: c.chart.padding.left,
|
|
70
|
+
right: r - c.chart.padding.right,
|
|
71
|
+
bottom: i - c.chart.padding.bottom
|
|
72
72
|
};
|
|
73
|
-
|
|
74
|
-
let
|
|
73
|
+
l.width = l.right - l.left, l.height = l.bottom - l.top;
|
|
74
|
+
let u = e.flatMap((e) => Array.isArray(e.series) ? e.series.map((e) => Number(typeof e == "object" && e ? e.y : e)) : []).filter(Number.isFinite), d = x(Math.min(0, ...u), Math.max(1, ...u), 6), f = e.some((e) => Array.isArray(e.series) ? e.series.some(B) : !1), p = f ? oe({
|
|
75
75
|
dataset: e,
|
|
76
|
-
config:
|
|
77
|
-
}) : null,
|
|
76
|
+
config: c
|
|
77
|
+
}) : null, m = Math.max(0, ...e.map((e) => e.series?.length || 0)), h = (e) => m <= 1 ? l.left + l.width / 2 : l.left + e / (m - 1) * l.width, g = (e, t) => f ? B(e) ? se({
|
|
78
78
|
xValue: e.x,
|
|
79
|
-
xScale:
|
|
80
|
-
drawingArea:
|
|
81
|
-
config:
|
|
82
|
-
}) : null :
|
|
83
|
-
let t = (Number(e) -
|
|
84
|
-
return
|
|
85
|
-
},
|
|
79
|
+
xScale: p,
|
|
80
|
+
drawingArea: l,
|
|
81
|
+
config: c
|
|
82
|
+
}) : null : h(t), _ = (e) => {
|
|
83
|
+
let t = (Number(e) - d.min) / (d.max - d.min || 1);
|
|
84
|
+
return l.bottom - t * l.height;
|
|
85
|
+
}, y = Array.isArray(c.customPalette) ? c.customPalette : [], b = y.length ? y : n;
|
|
86
86
|
return {
|
|
87
|
-
width:
|
|
88
|
-
height:
|
|
89
|
-
selectedXIndex:
|
|
87
|
+
width: r,
|
|
88
|
+
height: i,
|
|
89
|
+
selectedXIndex: a,
|
|
90
90
|
dataset: e,
|
|
91
|
-
config:
|
|
92
|
-
drawingArea:
|
|
93
|
-
scale:
|
|
94
|
-
xScale:
|
|
95
|
-
isContinuous:
|
|
91
|
+
config: c,
|
|
92
|
+
drawingArea: l,
|
|
93
|
+
scale: d,
|
|
94
|
+
xScale: p,
|
|
95
|
+
isContinuous: f,
|
|
96
96
|
series: e.map((e, t) => {
|
|
97
|
-
let n = (e.color ?
|
|
97
|
+
let n = (e.color ? v(e.color) : "") || b[t % b.length], r = (e.series || []).map((e, t) => {
|
|
98
98
|
let n = e == null ? null : typeof e == "object" ? e.y ?? null : Number(e);
|
|
99
99
|
return {
|
|
100
|
-
x:
|
|
100
|
+
x: g(e, t),
|
|
101
101
|
y: n === null || !Number.isFinite(Number(n)) ? null : _(n),
|
|
102
102
|
value: n,
|
|
103
103
|
index: t,
|
|
@@ -112,8 +112,8 @@ function ce({ dataset: e = [], config: t = {}, width: n = 1e3, height: r = 600,
|
|
|
112
112
|
plots: r
|
|
113
113
|
};
|
|
114
114
|
}),
|
|
115
|
-
additionalSvgContent:
|
|
116
|
-
svgTitle:
|
|
115
|
+
additionalSvgContent: o,
|
|
116
|
+
svgTitle: s
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
//#endregion
|
|
@@ -125,17 +125,17 @@ function le(e) {
|
|
|
125
125
|
return String(e.scaleLabel ?? e.id ?? e.name ?? "");
|
|
126
126
|
}
|
|
127
127
|
function ue(e) {
|
|
128
|
-
return
|
|
128
|
+
return A(I(e, "chart.grid.labels.yAxis.labelWidth", 40), 40) + 36;
|
|
129
129
|
}
|
|
130
130
|
function de(e) {
|
|
131
|
-
return
|
|
131
|
+
return N(e).flatMap((e) => N(e.plots)).map((e) => e?.value === null || e?.value === void 0 ? null : Number(e.value)).filter(Number.isFinite);
|
|
132
132
|
}
|
|
133
133
|
function fe(e, t, n) {
|
|
134
|
-
let r = de(n), i = I(e, "chart.grid.labels.yAxis.scaleMin", null), a = I(e, "chart.grid.labels.yAxis.scaleMax", null), o = X(i) ? Number(i) : Math.min(0, ...r), s = X(a) ? Number(a) : Math.max(1, ...r), c =
|
|
134
|
+
let r = de(n), i = I(e, "chart.grid.labels.yAxis.scaleMin", null), a = I(e, "chart.grid.labels.yAxis.scaleMax", null), o = X(i) ? Number(i) : Math.min(0, ...r), s = X(a) ? Number(a) : Math.max(1, ...r), c = A(I(e, "chart.grid.labels.yAxis.commonScaleSteps", 6), 6);
|
|
135
135
|
return !r.length && !X(i) && !X(a) ? t : Oe(e, o, s === o ? o + 1 : s, c);
|
|
136
136
|
}
|
|
137
137
|
function pe(e, t) {
|
|
138
|
-
let { drawingArea: n } = e, r =
|
|
138
|
+
let { drawingArea: n } = e, r = A(t.__yOffset, 0), i = A(t.__individualHeight, n.height);
|
|
139
139
|
return {
|
|
140
140
|
top: n.bottom - r - i,
|
|
141
141
|
bottom: n.bottom - r
|
|
@@ -150,8 +150,8 @@ function H(e, t, n, r) {
|
|
|
150
150
|
}
|
|
151
151
|
function me(e, t) {
|
|
152
152
|
let n = {};
|
|
153
|
-
return
|
|
154
|
-
let i = le(t) || `serie_${r}`, a =
|
|
153
|
+
return N(t).forEach((t, r) => {
|
|
154
|
+
let i = le(t) || `serie_${r}`, a = N(t.plots).map((e) => Number(e.value)).filter(Number.isFinite);
|
|
155
155
|
n[i] || (n[i] = {
|
|
156
156
|
scaleLabel: i,
|
|
157
157
|
name: t.name ?? i,
|
|
@@ -162,7 +162,7 @@ function me(e, t) {
|
|
|
162
162
|
}), Object.values(n).forEach((t) => {
|
|
163
163
|
t.scale = ke(e, {
|
|
164
164
|
...t.series[0],
|
|
165
|
-
plots: t.series.flatMap((e) =>
|
|
165
|
+
plots: t.series.flatMap((e) => N(e.plots))
|
|
166
166
|
});
|
|
167
167
|
}), n;
|
|
168
168
|
}
|
|
@@ -173,17 +173,17 @@ function ge(e) {
|
|
|
173
173
|
return e === "bar" || e === "line" || e === "plot" ? e : "line";
|
|
174
174
|
}
|
|
175
175
|
function _e(e) {
|
|
176
|
-
return
|
|
176
|
+
return N(e.series).map((e) => ({
|
|
177
177
|
...e,
|
|
178
178
|
type: ge(e.type),
|
|
179
|
-
plots:
|
|
179
|
+
plots: N(e.plots).filter((e) => e && F(e.x))
|
|
180
180
|
}));
|
|
181
181
|
}
|
|
182
182
|
function U(e) {
|
|
183
183
|
let { drawingArea: t, scale: n } = e, r = (0 - n.min) / (n.max - n.min || 1);
|
|
184
184
|
return t.bottom - r * t.height;
|
|
185
185
|
}
|
|
186
|
-
var ve =
|
|
186
|
+
var ve = h();
|
|
187
187
|
function W(e) {
|
|
188
188
|
return ve;
|
|
189
189
|
}
|
|
@@ -208,7 +208,7 @@ function Ce(e, t, n) {
|
|
|
208
208
|
}
|
|
209
209
|
function we(e, t, n) {
|
|
210
210
|
let { config: r } = e;
|
|
211
|
-
return I(r, "line.area.useGradient", !1) ? `url(#${rt(e, n)})` :
|
|
211
|
+
return I(r, "line.area.useGradient", !1) ? `url(#${rt(e, n)})` : l(t.color, A(I(r, "line.area.opacity", 30), 30));
|
|
212
212
|
}
|
|
213
213
|
function K(e, t, n, r) {
|
|
214
214
|
return I(e.config, "bar.useGradient", !1) ? r >= 0 ? `url(#${G(e, n, "pos")})` : `url(#${G(e, n, "neg")})` : t.color;
|
|
@@ -221,34 +221,34 @@ function Te(e, t) {
|
|
|
221
221
|
x2: "0%",
|
|
222
222
|
y2: "100%"
|
|
223
223
|
}, [
|
|
224
|
-
|
|
224
|
+
j("stop", {
|
|
225
225
|
offset: "0%",
|
|
226
|
-
"stop-color":
|
|
226
|
+
"stop-color": v(t.color)
|
|
227
227
|
}),
|
|
228
|
-
|
|
228
|
+
j("stop", {
|
|
229
229
|
offset: "62%",
|
|
230
|
-
"stop-color":
|
|
230
|
+
"stop-color": d(v(t.color), .02)
|
|
231
231
|
}),
|
|
232
|
-
|
|
232
|
+
j("stop", {
|
|
233
233
|
offset: "100%",
|
|
234
|
-
"stop-color":
|
|
234
|
+
"stop-color": d(v(t.color), .05)
|
|
235
235
|
})
|
|
236
236
|
].join(""))), r.push(L("linearGradient", {
|
|
237
237
|
id: G(e, n, "neg"),
|
|
238
238
|
x2: "0%",
|
|
239
239
|
y2: "100%"
|
|
240
240
|
}, [
|
|
241
|
-
|
|
241
|
+
j("stop", {
|
|
242
242
|
offset: "0%",
|
|
243
|
-
"stop-color":
|
|
243
|
+
"stop-color": d(v(t.color), .05)
|
|
244
244
|
}),
|
|
245
|
-
|
|
245
|
+
j("stop", {
|
|
246
246
|
offset: "38%",
|
|
247
|
-
"stop-color":
|
|
247
|
+
"stop-color": d(v(t.color), .02)
|
|
248
248
|
}),
|
|
249
|
-
|
|
249
|
+
j("stop", {
|
|
250
250
|
offset: "100%",
|
|
251
|
-
"stop-color":
|
|
251
|
+
"stop-color": v(t.color)
|
|
252
252
|
})
|
|
253
253
|
].join("")));
|
|
254
254
|
}), t.filter((e) => e.type === "line").forEach((t, i) => {
|
|
@@ -259,18 +259,18 @@ function Te(e, t) {
|
|
|
259
259
|
r: "50%",
|
|
260
260
|
fx: "50%",
|
|
261
261
|
fy: "50%"
|
|
262
|
-
}, [
|
|
262
|
+
}, [j("stop", {
|
|
263
263
|
offset: "0%",
|
|
264
|
-
"stop-color":
|
|
265
|
-
}),
|
|
264
|
+
"stop-color": d(v(t.color), .05)
|
|
265
|
+
}), j("stop", {
|
|
266
266
|
offset: "100%",
|
|
267
|
-
"stop-color":
|
|
267
|
+
"stop-color": v(t.color)
|
|
268
268
|
})].join(""))), t.temperatureColors && !t.isFlatTemperatureLine && r.push(L("linearGradient", {
|
|
269
269
|
id: be(e, i),
|
|
270
270
|
gradientTransform: "rotate(90)"
|
|
271
|
-
}, t.temperatureColors.map((e, n) =>
|
|
271
|
+
}, t.temperatureColors.map((e, n) => j("stop", {
|
|
272
272
|
offset: o(n, t.temperatureColors.length),
|
|
273
|
-
"stop-color":
|
|
273
|
+
"stop-color": v(e)
|
|
274
274
|
})).join("")));
|
|
275
275
|
}), t.filter((e) => e.type === "plot").forEach((t, i) => {
|
|
276
276
|
I(n, "plot.useGradient", !1) && r.push(L("radialGradient", {
|
|
@@ -280,18 +280,18 @@ function Te(e, t) {
|
|
|
280
280
|
r: "50%",
|
|
281
281
|
fx: "50%",
|
|
282
282
|
fy: "50%"
|
|
283
|
-
}, [
|
|
283
|
+
}, [j("stop", {
|
|
284
284
|
offset: "0%",
|
|
285
|
-
"stop-color":
|
|
286
|
-
}),
|
|
285
|
+
"stop-color": d(v(t.color), .05)
|
|
286
|
+
}), j("stop", {
|
|
287
287
|
offset: "100%",
|
|
288
|
-
"stop-color":
|
|
288
|
+
"stop-color": v(t.color)
|
|
289
289
|
})].join("")));
|
|
290
290
|
}), r.length ? L("defs", { "data-layer": "gradients" }, r.join("")) : "";
|
|
291
291
|
}
|
|
292
292
|
function Ee(e) {
|
|
293
293
|
let t = I(e.config, "chart.backgroundColor", "#FFFFFF");
|
|
294
|
-
return
|
|
294
|
+
return j("rect", {
|
|
295
295
|
width: e.width,
|
|
296
296
|
height: e.height,
|
|
297
297
|
fill: t
|
|
@@ -299,9 +299,9 @@ function Ee(e) {
|
|
|
299
299
|
}
|
|
300
300
|
function q(e) {
|
|
301
301
|
return {
|
|
302
|
-
dataLabels:
|
|
303
|
-
xAxis:
|
|
304
|
-
yAxis:
|
|
302
|
+
dataLabels: A(I(e, "chart.grid.labels.fontSize", 12), 12),
|
|
303
|
+
xAxis: A(I(e, "chart.grid.labels.xAxisLabels.fontSize", 12), 12),
|
|
304
|
+
yAxis: A(I(e, "chart.grid.labels.axis.fontSize", 12), 12)
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
307
|
function J(e) {
|
|
@@ -323,11 +323,11 @@ function X(e) {
|
|
|
323
323
|
return e != null && Number.isFinite(Number(e));
|
|
324
324
|
}
|
|
325
325
|
function Oe(e, t, n, r) {
|
|
326
|
-
return I(e, "chart.grid.labels.yAxis.useNiceScale", !0) ?
|
|
326
|
+
return I(e, "chart.grid.labels.yAxis.useNiceScale", !0) ? x(t, n, r) : b(t, n, r);
|
|
327
327
|
}
|
|
328
328
|
function ke(e, t) {
|
|
329
|
-
let n =
|
|
330
|
-
return Oe(e, a, o === a ? a + 1 : o,
|
|
329
|
+
let n = N(t.plots).map((e) => Number(e.value)).filter(Number.isFinite), r = I(e, "chart.grid.labels.yAxis.scaleMin", null), i = I(e, "chart.grid.labels.yAxis.scaleMax", null), a = X(r) ? Number(r) : X(t.scaleMin) ? Number(t.scaleMin) : Math.min(0, ...n), o = X(i) ? Number(i) : X(t.scaleMax) ? Number(t.scaleMax) : Math.max(1, ...n);
|
|
330
|
+
return Oe(e, a, o === a ? a + 1 : o, A(t.scaleSteps ?? I(e, "chart.grid.labels.yAxis.commonScaleSteps", 6), 6));
|
|
331
331
|
}
|
|
332
332
|
function Ae(e, t, n = []) {
|
|
333
333
|
let r = q(e), i = Y(e), a = V(e), o = ue(e);
|
|
@@ -346,7 +346,7 @@ function Ae(e, t, n = []) {
|
|
|
346
346
|
scaleLabelsOffset: o,
|
|
347
347
|
yAxisLabelWidth: 0
|
|
348
348
|
};
|
|
349
|
-
let s = (i ? n.flatMap((t) => ke(e, t).ticks) :
|
|
349
|
+
let s = (i ? n.flatMap((t) => ke(e, t).ticks) : N(t.ticks)).reduce((t, n) => Math.max(t, M(De(n, e), r.dataLabels)), 0), c = I(e, "chart.grid.labels.axis.yLabel", "") ? r.yAxis * 2 + 24 + A(I(e, "chart.grid.labels.axis.yLabelOffsetX", 0), 0) + r.yAxis : 0, l = s + A(I(e, "chart.grid.labels.yAxis.scaleValueOffsetX", 0), 0) + A(I(e, "chart.grid.labels.yAxis.crosshairSize", 0), 0);
|
|
350
350
|
return {
|
|
351
351
|
left: J(e) ? 0 : l + c,
|
|
352
352
|
right: J(e) ? l + c : 0,
|
|
@@ -361,10 +361,10 @@ function je(e, t) {
|
|
|
361
361
|
...e,
|
|
362
362
|
width: i,
|
|
363
363
|
height: a
|
|
364
|
-
}, t) : { height: 0 }, d = l && c === "top" ? u.height : 0, f = l && c !== "top" ? u.height : 0, p = I(n, "chart.grid.labels.axis.xLabel", ""), m = I(n, "chart.grid.labels.xAxisLabels.show", !0) ? o.xAxis * 2 : 0,
|
|
365
|
-
top: v +
|
|
364
|
+
}, t) : { height: 0 }, d = l && c === "top" ? u.height : 0, f = l && c !== "top" ? u.height : 0, p = I(n, "chart.grid.labels.axis.xLabel", ""), m = I(n, "chart.grid.labels.xAxisLabels.show", !0) ? o.xAxis * 2 : 0, h = (p ? o.yAxis * 1.5 : 0) + m + o.xAxis, g = gt(n) + A(I(n, "chart.labels.fontSize", 12), 12) * 1.1, v = A(I(n, "chart.padding.top", 12), 12), y = A(I(n, "chart.padding.right", 12), 12), b = A(I(n, "chart.padding.bottom", 12), 12), x = A(I(n, "chart.padding.left", 12), 12), S = A(I(n, "chart.grid.labels.axis.xLabelOffsetY", 0), 0), ee = A(I(n, "chart.grid.labels.yAxis.crosshairSize", 0), 0), C = s.left, w = s.right, te = i - C - w - 6 - x - y, T = {
|
|
365
|
+
top: v + g + d,
|
|
366
366
|
right: C + (J(n) ? 0 : ee) + x + te,
|
|
367
|
-
bottom: a -
|
|
367
|
+
bottom: a - h - b - S - f,
|
|
368
368
|
left: C + (J(n) ? 0 : ee) + x,
|
|
369
369
|
width: Math.max(1, te),
|
|
370
370
|
height: 1,
|
|
@@ -375,7 +375,7 @@ function je(e, t) {
|
|
|
375
375
|
individualOffsetX: 36
|
|
376
376
|
};
|
|
377
377
|
T.height = Math.max(1, T.bottom - T.top);
|
|
378
|
-
let E = Y(n), D = E ?
|
|
378
|
+
let E = Y(n), D = E ? _(t) : t, O = Math.max(1, D.length), k = E ? A(I(n, "chart.grid.labels.yAxis.gap", 12), 12) : 0, j = k * Math.max(0, O - 1), M = Math.max(1, T.height - j), P = V(n), ne = me(n, t), F = Math.max(1, ...t.map((e) => N(e.plots).length));
|
|
379
379
|
function L(t, n) {
|
|
380
380
|
if (Z(e)) {
|
|
381
381
|
let n = Number(t.rawX);
|
|
@@ -390,7 +390,7 @@ function je(e, t) {
|
|
|
390
390
|
}, t.index ?? n, F);
|
|
391
391
|
}
|
|
392
392
|
let R = t.map((e, t) => {
|
|
393
|
-
let i = e.id !== void 0 && e.id !== null ? D.find((t) => t.id === e.id) ?? D[t] ?? e : D[t] ?? e, a = he(n, e,
|
|
393
|
+
let i = e.id !== void 0 && e.id !== null ? D.find((t) => t.id === e.id) ?? D[t] ?? e : D[t] ?? e, a = he(n, e, ne, r, P, E), o = A(i.stackIndex, t), s = A(i.stackRatio, 1 / O), c = A(i.cumulatedStackRatio, s * (o + 1)), l = O - 1 - o, u = E ? 1 - c : 0, d = E ? M * u + k * l : 0, f = E ? M * s : T.height;
|
|
394
394
|
function p(e) {
|
|
395
395
|
let t = (e - a.min) / (a.max - a.min || 1);
|
|
396
396
|
return T.bottom - d - t * f;
|
|
@@ -402,7 +402,7 @@ function je(e, t) {
|
|
|
402
402
|
__yOffset: d,
|
|
403
403
|
__individualHeight: f,
|
|
404
404
|
__zeroY: m,
|
|
405
|
-
__scaleYLabels:
|
|
405
|
+
__scaleYLabels: N(a.ticks).map((t) => ({
|
|
406
406
|
value: t,
|
|
407
407
|
y: p(t),
|
|
408
408
|
serie: e
|
|
@@ -422,8 +422,8 @@ function je(e, t) {
|
|
|
422
422
|
...e,
|
|
423
423
|
drawingArea: T,
|
|
424
424
|
series: R,
|
|
425
|
-
__scaleGroups:
|
|
426
|
-
__useIndividualScale:
|
|
425
|
+
__scaleGroups: ne,
|
|
426
|
+
__useIndividualScale: P
|
|
427
427
|
};
|
|
428
428
|
}
|
|
429
429
|
function Me(e) {
|
|
@@ -431,7 +431,7 @@ function Me(e) {
|
|
|
431
431
|
if (!I(t, "chart.grid.labels.show", !0) || !I(t, "chart.grid.labels.yAxis.show", !0)) return "";
|
|
432
432
|
let a = V(t), o = Y(t);
|
|
433
433
|
if (a) return Ne(e);
|
|
434
|
-
let s = q(t), c = J(t), l = I(t, "chart.grid.labels.yAxis.showCrosshairs", !1), u =
|
|
434
|
+
let s = q(t), c = J(t), l = I(t, "chart.grid.labels.yAxis.showCrosshairs", !1), u = A(I(t, "chart.grid.labels.yAxis.crosshairSize", 0), 0), d = A(I(t, "chart.grid.labels.yAxis.scaleValueOffsetX", 0), 0), f = I(t, "chart.grid.labels.color", "#2A2A2A"), p = I(t, "chart.grid.stroke", "#CCCCCC"), m = o ? i.flatMap((e) => N(e.__scaleYLabels)) : N(r.ticks).map((e) => {
|
|
435
435
|
let t = (e - r.min) / (r.max - r.min || 1);
|
|
436
436
|
return {
|
|
437
437
|
value: e,
|
|
@@ -439,7 +439,7 @@ function Me(e) {
|
|
|
439
439
|
};
|
|
440
440
|
}), h = [];
|
|
441
441
|
return m.forEach((e) => {
|
|
442
|
-
Number.isFinite(e.y) && (l && h.push(
|
|
442
|
+
Number.isFinite(e.y) && (l && h.push(j("line", {
|
|
443
443
|
"data-cy": "axis-y-tick",
|
|
444
444
|
x1: c ? n.right : n.left,
|
|
445
445
|
x2: c ? n.right + u : n.left - u,
|
|
@@ -458,12 +458,12 @@ function Me(e) {
|
|
|
458
458
|
}), L("g", { "data-layer": "scale-labels" }, h.join(""));
|
|
459
459
|
}
|
|
460
460
|
function Ne(e) {
|
|
461
|
-
let { config: t, drawingArea: n, series: r } = e, i = q(t), a = J(t), o = Y(t), s = e.__scaleGroups ?? me(t, r), c = I(t, "chart.grid.labels.yAxis.showCrosshairs", !1), l =
|
|
461
|
+
let { config: t, drawingArea: n, series: r } = e, i = q(t), a = J(t), o = Y(t), s = e.__scaleGroups ?? me(t, r), c = I(t, "chart.grid.labels.yAxis.showCrosshairs", !1), l = A(I(t, "chart.grid.labels.yAxis.crosshairSize", 0), 0), u = A(I(t, "chart.grid.labels.yAxis.scaleValueOffsetX", 0), 0), d = A(I(t, "chart.grid.labels.yAxis.labelWidth", 40), 40), f = A(n.individualOffsetX, 36), p = [], m = Object.values(s);
|
|
462
462
|
return m.forEach((e, s) => {
|
|
463
463
|
let h = r.find((t) => le(t) === e.scaleLabel) ?? r[s];
|
|
464
464
|
if (!h) return;
|
|
465
|
-
let g = o ? a ? n.right : n.left : a ? n.right + ue(t) * s : n.left - ue(t) * (m.length - s - 1), _ =
|
|
466
|
-
p.push(
|
|
465
|
+
let g = o ? a ? n.right : n.left : a ? n.right + ue(t) * s : n.left - ue(t) * (m.length - s - 1), _ = A(h.__yOffset, 0), v = A(h.__individualHeight, n.height), y = o ? n.bottom - _ - v : n.top, b = o ? n.bottom - _ : n.bottom;
|
|
466
|
+
p.push(j("line", {
|
|
467
467
|
x1: o || a ? g : g - f,
|
|
468
468
|
x2: o || a ? g : g - f,
|
|
469
469
|
y1: y,
|
|
@@ -478,9 +478,9 @@ function Ne(e) {
|
|
|
478
478
|
"font-size": i.dataLabels * .8,
|
|
479
479
|
"text-anchor": "middle",
|
|
480
480
|
fill: e.color
|
|
481
|
-
})),
|
|
481
|
+
})), N(e.scale.ticks).forEach((r) => {
|
|
482
482
|
let s = b - (r - e.scale.min) / (e.scale.max - e.scale.min || 1) * (b - y);
|
|
483
|
-
Number.isFinite(s) && (c && p.push(
|
|
483
|
+
Number.isFinite(s) && (c && p.push(j("line", {
|
|
484
484
|
"data-cy": "axis-y-tick",
|
|
485
485
|
x1: o || a ? g : g + 3 - l - f,
|
|
486
486
|
x2: o ? a ? g + l : g - l : a ? g + l : g - f,
|
|
@@ -500,7 +500,7 @@ function Ne(e) {
|
|
|
500
500
|
}), L("g", { "data-layer": "individual-scale-labels" }, p.join(""));
|
|
501
501
|
}
|
|
502
502
|
function Pe(e) {
|
|
503
|
-
return [...new Set(e.flatMap((e) =>
|
|
503
|
+
return [...new Set(e.flatMap((e) => N(e.plots)).map((e) => Number(e.x)).filter(Number.isFinite))].sort((e, t) => e - t);
|
|
504
504
|
}
|
|
505
505
|
function Fe(e, t, n = 1) {
|
|
506
506
|
let { drawingArea: r, config: i } = e, a = Pe(t), o = r.width * .05;
|
|
@@ -508,19 +508,19 @@ function Fe(e, t, n = 1) {
|
|
|
508
508
|
let s = a.slice(1).reduce((e, t, n) => {
|
|
509
509
|
let r = a[n], i = Math.abs(t - r);
|
|
510
510
|
return i > 0 ? Math.min(e, i) : e;
|
|
511
|
-
}, Infinity), c =
|
|
511
|
+
}, Infinity), c = A(I(i, "bar.periodGap", .2), .2), l = Number.isFinite(s) && s > 0 ? s * (1 - c) : o;
|
|
512
512
|
return Math.max(1e-5, l / Math.max(1, n));
|
|
513
513
|
}
|
|
514
514
|
function Ie(e, t, n) {
|
|
515
|
-
let { config: r } = e, i =
|
|
515
|
+
let { config: r } = e, i = A(I(r, "bar.innerGap", .05), .05), a = I(r, "bar.borderRadius", 0), o = [];
|
|
516
516
|
if (n) {
|
|
517
517
|
let n = Fe(e, t, 1), r = n * Math.min(Math.abs(i), .95), s = Math.max(1e-5, n - r);
|
|
518
518
|
return t.forEach((t, n) => {
|
|
519
519
|
let r = Number.isFinite(Number(t.__zeroY)) ? Number(t.__zeroY) : U(e);
|
|
520
|
-
|
|
520
|
+
N(t.plots).forEach((i) => {
|
|
521
521
|
if (!i || i.value === null || i.value === void 0 || !Number.isFinite(Number(i.value)) || !Number.isFinite(Number(i.x)) || !Number.isFinite(Number(i.y))) return;
|
|
522
522
|
let c = i.x - s / 2, { y: l, height: u } = H(e, t, i, r);
|
|
523
|
-
i.__barLabelX = i.x, o.push(
|
|
523
|
+
i.__barLabelX = i.x, o.push(j("rect", {
|
|
524
524
|
"data-cy": "datapoint-bar",
|
|
525
525
|
x: c,
|
|
526
526
|
y: l,
|
|
@@ -536,10 +536,10 @@ function Ie(e, t, n) {
|
|
|
536
536
|
let s = Math.max(1, t.length), c = Fe(e, t, s), l = c * Math.min(Math.abs(i), .95), u = Math.max(1e-5, c - l), d = c * s;
|
|
537
537
|
return t.forEach((t, n) => {
|
|
538
538
|
let r = Number.isFinite(Number(t.__zeroY)) ? Number(t.__zeroY) : U(e);
|
|
539
|
-
|
|
539
|
+
N(t.plots).forEach((i) => {
|
|
540
540
|
if (!i || i.value === null || i.value === void 0 || !Number.isFinite(Number(i.value)) || !Number.isFinite(Number(i.x)) || !Number.isFinite(Number(i.y))) return;
|
|
541
541
|
let s = i.x - d / 2 + c * n + l / 2, { y: f, height: p } = H(e, t, i, r);
|
|
542
|
-
i.__barLabelX = s + u / 2, o.push(
|
|
542
|
+
i.__barLabelX = s + u / 2, o.push(j("rect", {
|
|
543
543
|
"data-cy": "datapoint-bar",
|
|
544
544
|
x: s,
|
|
545
545
|
y: f,
|
|
@@ -556,15 +556,15 @@ function Le(e, t) {
|
|
|
556
556
|
let { config: n, drawingArea: r } = e, i = Y(n), a = t.filter((e) => e.type === "bar");
|
|
557
557
|
if (!a.length) return "";
|
|
558
558
|
if (Z(e)) return Ie(e, a, i);
|
|
559
|
-
let o = Math.max(1, ...t.map((e) =>
|
|
559
|
+
let o = Math.max(1, ...t.map((e) => N(e.plots).length)), s = r.width / o, c = A(I(n, "bar.periodGap", .2), .2), l = A(I(n, "bar.innerGap", .05), .05), u = I(n, "bar.borderRadius", 0), d = [];
|
|
560
560
|
if (i) {
|
|
561
561
|
let t = Math.max(1e-5, s * .9), n = t * Math.min(Math.abs(l), .95);
|
|
562
562
|
return a.forEach((i, a) => {
|
|
563
563
|
let o = Number.isFinite(Number(i.__zeroY)) ? Number(i.__zeroY) : U(e);
|
|
564
|
-
|
|
564
|
+
N(i.plots).forEach((c, l) => {
|
|
565
565
|
if (!c || c.value === null || c.value === void 0 || !Number.isFinite(Number(c.value)) || !Number.isFinite(Number(c.y))) return;
|
|
566
566
|
let f = r.left + s * l + s * .05 + n / 2, { y: p, height: m } = H(e, i, c, o);
|
|
567
|
-
c.__barLabelX = f + Math.max(1e-5, t - n) / 2, d.push(
|
|
567
|
+
c.__barLabelX = f + Math.max(1e-5, t - n) / 2, d.push(j("rect", {
|
|
568
568
|
"data-cy": "datapoint-bar",
|
|
569
569
|
x: f,
|
|
570
570
|
y: p,
|
|
@@ -580,10 +580,10 @@ function Le(e, t) {
|
|
|
580
580
|
let f = s * (1 - c), p = f / Math.max(1, a.length), m = p * Math.min(Math.abs(l), .95);
|
|
581
581
|
return U(e), a.forEach((t, n) => {
|
|
582
582
|
let i = Number.isFinite(Number(t.__zeroY)) ? Number(t.__zeroY) : U(e);
|
|
583
|
-
|
|
583
|
+
N(t.plots).forEach((a, o) => {
|
|
584
584
|
if (!a || a.value === null || a.value === void 0 || !Number.isFinite(Number(a.value)) || !Number.isFinite(Number(a.y))) return;
|
|
585
585
|
let c = r.left + s * o + (s - f) / 2 + p * n + m / 2, { y: l, height: h } = H(e, t, a, i);
|
|
586
|
-
a.__barLabelX = c + Math.max(1e-5, p - m) / 2, d.push(
|
|
586
|
+
a.__barLabelX = c + Math.max(1e-5, p - m) / 2, d.push(j("rect", {
|
|
587
587
|
"data-cy": "datapoint-bar",
|
|
588
588
|
x: c,
|
|
589
589
|
y: l,
|
|
@@ -598,7 +598,7 @@ function Le(e, t) {
|
|
|
598
598
|
}
|
|
599
599
|
function Re(e) {
|
|
600
600
|
let { config: t, drawingArea: n, scale: r, series: i } = e;
|
|
601
|
-
return V(t) || Y(t) ? i.flatMap((e) =>
|
|
601
|
+
return V(t) || Y(t) ? i.flatMap((e) => N(e.__scaleYLabels)) : N(r.ticks).map((e) => {
|
|
602
602
|
let t = (e - r.min) / (r.max - r.min || 1);
|
|
603
603
|
return {
|
|
604
604
|
value: e,
|
|
@@ -611,9 +611,9 @@ function ze(e, t, n) {
|
|
|
611
611
|
return r.left + i * t;
|
|
612
612
|
}
|
|
613
613
|
function Be(e, t) {
|
|
614
|
-
let { config: n, drawingArea: r } = e, i = Math.max(1, ...t.map((e) =>
|
|
614
|
+
let { config: n, drawingArea: r } = e, i = Math.max(1, ...t.map((e) => N(e.plots).length)), a = r.top, o = r.bottom;
|
|
615
615
|
if (Z(e)) {
|
|
616
|
-
let e = [...new Set(t.flatMap((e) =>
|
|
616
|
+
let e = [...new Set(t.flatMap((e) => N(e.plots)).map((e) => Number(e.x)).filter(Number.isFinite))].sort((e, t) => e - t);
|
|
617
617
|
return e.length ? I(n, "chart.grid.position", "middle") === "middle" ? e.map((e, t, n) => {
|
|
618
618
|
if (t === 0) return null;
|
|
619
619
|
let r = n[t - 1], i = r + (e - r) / 2;
|
|
@@ -627,9 +627,9 @@ function Be(e, t) {
|
|
|
627
627
|
}).join(" ");
|
|
628
628
|
}
|
|
629
629
|
function Ve(e) {
|
|
630
|
-
let { config: t, drawingArea: n, scale: r, series: i } = e, a = I(t, "chart.grid.show", !0), o = I(t, "chart.grid.showHorizontalLines", !0), s = I(t, "chart.grid.showVerticalLines", !1), c = I(t, "chart.grid.stroke", "#CCCCCC"), l =
|
|
630
|
+
let { config: t, drawingArea: n, scale: r, series: i } = e, a = I(t, "chart.grid.show", !0), o = I(t, "chart.grid.showHorizontalLines", !0), s = I(t, "chart.grid.showVerticalLines", !1), c = I(t, "chart.grid.stroke", "#CCCCCC"), l = A(I(t, "chart.grid.strokeWidth", .5), .5), u = [];
|
|
631
631
|
if (a && o && Re(e).forEach((e) => {
|
|
632
|
-
Number.isFinite(Number(e.y)) && u.push(
|
|
632
|
+
Number.isFinite(Number(e.y)) && u.push(j("line", {
|
|
633
633
|
"data-cy": "xy-grid-horizontal-line",
|
|
634
634
|
x1: n.left,
|
|
635
635
|
x2: n.right,
|
|
@@ -641,7 +641,7 @@ function Ve(e) {
|
|
|
641
641
|
}));
|
|
642
642
|
}), a && s) {
|
|
643
643
|
let t = Be(e, i);
|
|
644
|
-
t && u.push(
|
|
644
|
+
t && u.push(j("path", {
|
|
645
645
|
"data-cy": "xy-grid-vertical-line",
|
|
646
646
|
d: t,
|
|
647
647
|
stroke: c,
|
|
@@ -649,7 +649,7 @@ function Ve(e) {
|
|
|
649
649
|
"stroke-linecap": "round"
|
|
650
650
|
}));
|
|
651
651
|
}
|
|
652
|
-
u.push(
|
|
652
|
+
u.push(j("line", {
|
|
653
653
|
x1: n.left,
|
|
654
654
|
y1: n.bottom,
|
|
655
655
|
x2: n.right,
|
|
@@ -659,7 +659,7 @@ function Ve(e) {
|
|
|
659
659
|
"stroke-linecap": "round"
|
|
660
660
|
}));
|
|
661
661
|
let d = J(t) ? n.right : n.left;
|
|
662
|
-
return u.push(
|
|
662
|
+
return u.push(j("line", {
|
|
663
663
|
x1: d,
|
|
664
664
|
y1: n.top,
|
|
665
665
|
x2: d,
|
|
@@ -667,7 +667,7 @@ function Ve(e) {
|
|
|
667
667
|
stroke: c,
|
|
668
668
|
"stroke-width": l,
|
|
669
669
|
"stroke-linecap": "round"
|
|
670
|
-
})), r.min < 0 && r.max > 0 && u.push(
|
|
670
|
+
})), r.min < 0 && r.max > 0 && u.push(j("line", {
|
|
671
671
|
x1: n.left,
|
|
672
672
|
y1: U(e),
|
|
673
673
|
x2: n.right,
|
|
@@ -682,14 +682,14 @@ function He(e) {
|
|
|
682
682
|
return e && typeof e == "object" && Number.isFinite(Number(e.x)) && Number.isFinite(Number(e.y));
|
|
683
683
|
}
|
|
684
684
|
function Z(e) {
|
|
685
|
-
return e.isContinuous ? !0 :
|
|
685
|
+
return e.isContinuous ? !0 : N(e.series).some((e) => N(e.series).some(He));
|
|
686
686
|
}
|
|
687
687
|
function Ue(e) {
|
|
688
688
|
if (e.xScale && Number.isFinite(Number(e.xScale.min)) && Number.isFinite(Number(e.xScale.max))) return {
|
|
689
689
|
min: Number(e.xScale.min),
|
|
690
690
|
max: Number(e.xScale.max)
|
|
691
691
|
};
|
|
692
|
-
let t =
|
|
692
|
+
let t = N(e.series).flatMap((e) => N(e.series)).filter(He).map((e) => Number(e.x));
|
|
693
693
|
if (!t.length) return {
|
|
694
694
|
min: 0,
|
|
695
695
|
max: 1
|
|
@@ -720,7 +720,7 @@ function Ge(e, t, n) {
|
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
722
|
function Ke(e) {
|
|
723
|
-
let { xScale: t, config: n } = e, r =
|
|
723
|
+
let { xScale: t, config: n } = e, r = N(t?.ticks);
|
|
724
724
|
return (I(n, "chart.grid.labels.xAxis.reverse", !1) ? [...r].reverse() : r).map((t, n) => ({
|
|
725
725
|
id: `continuous_x_label_${n}`,
|
|
726
726
|
text: Ge(e, t, n),
|
|
@@ -735,24 +735,24 @@ function Q(e, t, n) {
|
|
|
735
735
|
return a === "middle" ? r.left + s / 2 + s * t : r.left + s * t;
|
|
736
736
|
}
|
|
737
737
|
async function qe(e, t) {
|
|
738
|
-
let { config: n } = e, r = Math.max(0, ...t.map((e) =>
|
|
738
|
+
let { config: n } = e, r = Math.max(0, ...t.map((e) => N(e.plots).length));
|
|
739
739
|
return await D({
|
|
740
740
|
values: I(n, "chart.grid.labels.xAxisLabels.values", []),
|
|
741
741
|
maxDatapoints: r,
|
|
742
742
|
formatter: I(n, "chart.grid.labels.xAxisLabels.datetimeFormatter", null),
|
|
743
|
-
start:
|
|
744
|
-
end:
|
|
743
|
+
start: A(e.slotStartIndex ?? e.startAbs, 0),
|
|
744
|
+
end: A(e.slotEndIndex ?? e.endAbs, r)
|
|
745
745
|
});
|
|
746
746
|
}
|
|
747
747
|
async function Je(e, t) {
|
|
748
|
-
let { config: n } = e, r = I(n, "chart.grid.labels.xAxisLabels", {}), i = Math.max(0, ...t.map((e) =>
|
|
748
|
+
let { config: n } = e, r = I(n, "chart.grid.labels.xAxisLabels", {}), i = Math.max(0, ...t.map((e) => N(e.plots).length)), a = await qe(e, t), o = await D({
|
|
749
749
|
values: I(n, "chart.grid.labels.xAxisLabels.values", []),
|
|
750
750
|
maxDatapoints: i,
|
|
751
751
|
formatter: I(n, "chart.grid.labels.xAxisLabels.datetimeFormatter", null),
|
|
752
752
|
start: 0,
|
|
753
753
|
end: i
|
|
754
|
-
}), s = a.map((e) => e?.text ?? ""), c = o.map((e) => e?.text ?? ""), l = Math.min(
|
|
755
|
-
return te(!!r.showOnlyFirstAndLast, !!r.showOnlyAtModulo, Math.max(1, l || 1), s, c,
|
|
754
|
+
}), s = a.map((e) => e?.text ?? ""), c = o.map((e) => e?.text ?? ""), l = Math.min(A(r.modulo, 1), Math.max(1, new Set(s).size));
|
|
755
|
+
return te(!!r.showOnlyFirstAndLast, !!r.showOnlyAtModulo, Math.max(1, l || 1), s, c, A(e.slotStartIndex ?? e.startAbs, 0), e.selectedXIndex ?? null, i);
|
|
756
756
|
}
|
|
757
757
|
async function Ye(e, t) {
|
|
758
758
|
return Z(e) ? Ke(e) : await Je(e, t);
|
|
@@ -761,28 +761,28 @@ function Xe(e, t, n, r) {
|
|
|
761
761
|
return Z(e) ? t.x : Q(e, n, r);
|
|
762
762
|
}
|
|
763
763
|
function Ze(e) {
|
|
764
|
-
return
|
|
764
|
+
return C(e.userConfig ?? e.sourceConfig ?? e.props?.config ?? {}, "chart.grid.labels.xAxisLabels.rotation") ? A(I(e.config, "chart.grid.labels.xAxisLabels.rotation", 0), 0) : I(e.config, "chart.grid.labels.xAxisLabels.autoRotate.enable", !1) ? A(I(e.config, "chart.grid.labels.xAxisLabels.autoRotate.angle", 0), 0) : A(I(e.config, "chart.grid.labels.xAxisLabels.rotation", 0), 0);
|
|
765
765
|
}
|
|
766
766
|
async function Qe(e, t) {
|
|
767
767
|
let { config: n, drawingArea: r } = e;
|
|
768
768
|
if (!t[0] || !I(n, "chart.grid.labels.xAxisLabels.show", !0)) return "";
|
|
769
769
|
I(n, "chart.grid.labels.xAxisLabels", {});
|
|
770
|
-
let i =
|
|
770
|
+
let i = A(I(n, "chart.grid.labels.xAxisLabels.fontSize", 12), 12), a = I(n, "chart.grid.labels.xAxisLabels.color", I(n, "chart.grid.labels.color", "#2A2A2A")), o = Ze(e), c = Math.max(1, t[0].plots.length), l = await Ye(e, t), u = o > 0 ? "start" : o < 0 ? "end" : "middle";
|
|
771
771
|
return L("g", { "data-layer": "x-axis-labels" }, l.map((t, n) => {
|
|
772
772
|
let l = typeof t == "string" ? t : t?.text;
|
|
773
773
|
if (!l) return "";
|
|
774
|
-
let d = `translate(${Xe(e, t, n, c)}, ${r.bottom + i * 1.5}), rotate(${
|
|
774
|
+
let d = `translate(${Xe(e, t, n, c)}, ${r.bottom + i * 1.5}), rotate(${o})`;
|
|
775
775
|
return String(l).includes("\n") ? L("text", {
|
|
776
776
|
class: "vue-data-ui-time-label",
|
|
777
777
|
"data-cy": "time-label",
|
|
778
778
|
"text-anchor": u,
|
|
779
779
|
"font-size": i,
|
|
780
|
-
fill:
|
|
780
|
+
fill: a,
|
|
781
781
|
transform: d
|
|
782
|
-
},
|
|
782
|
+
}, s({
|
|
783
783
|
content: String(l),
|
|
784
784
|
fontSize: i,
|
|
785
|
-
fill:
|
|
785
|
+
fill: a,
|
|
786
786
|
x: 0,
|
|
787
787
|
y: 0
|
|
788
788
|
})) : R(l, {
|
|
@@ -790,13 +790,13 @@ async function Qe(e, t) {
|
|
|
790
790
|
"data-cy": "time-label",
|
|
791
791
|
"text-anchor": u,
|
|
792
792
|
"font-size": i,
|
|
793
|
-
fill:
|
|
793
|
+
fill: a,
|
|
794
794
|
transform: d
|
|
795
795
|
});
|
|
796
796
|
}).join(""));
|
|
797
797
|
}
|
|
798
798
|
function $e(e) {
|
|
799
|
-
let { config: t, drawingArea: n, height: r } = e, i = q(t), a = I(t, "chart.grid.labels.axis.xLabel", ""), o = I(t, "chart.grid.labels.axis.yLabel", ""), s = I(t, "chart.grid.labels.axis.color", I(t, "chart.grid.labels.color", "#2A2A2A")), c =
|
|
799
|
+
let { config: t, drawingArea: n, height: r } = e, i = q(t), a = I(t, "chart.grid.labels.axis.xLabel", ""), o = I(t, "chart.grid.labels.axis.yLabel", ""), s = I(t, "chart.grid.labels.axis.color", I(t, "chart.grid.labels.color", "#2A2A2A")), c = A(I(t, "chart.grid.labels.axis.yLabelOffsetX", 0), 0), l = A(I(t, "chart.grid.labels.axis.xLabelOffsetY", 0), 0), u = A(I(t, "chart.grid.labels.yAxis.crosshairSize", 0), 0), d = A(I(t, "chart.grid.labels.yAxis.scaleValueOffsetX", 0), 0), f = A(I(t, "chart.grid.labels.yAxis.labelWidth", 0), 0), p = J(t), m = [];
|
|
800
800
|
if (a && m.push(R(a, {
|
|
801
801
|
x: n.left + n.width / 2,
|
|
802
802
|
y: Math.min(r - 4, n.bottom + i.xAxis * 3 + l),
|
|
@@ -819,12 +819,12 @@ function $e(e) {
|
|
|
819
819
|
async function et(e, t) {
|
|
820
820
|
let { config: n, drawingArea: r } = e, i = I(n, "chart.grid.labels.xAxisLabels.show", !0), a = I(n, "chart.grid.labels.xAxis.showCrosshairs", !1);
|
|
821
821
|
if (!i || !a || !t[0]) return "";
|
|
822
|
-
let o =
|
|
822
|
+
let o = A(I(n, "chart.grid.labels.xAxis.crosshairSize", 6), 6), s = !!I(n, "chart.grid.labels.xAxis.crosshairsAlwaysAtZero", !1), c = Math.max(1, t[0].plots.length), l = await Ye(e, t), u = U(e), d = l.map((t, n) => {
|
|
823
823
|
if (!(typeof t == "string" ? t : t?.text)) return "";
|
|
824
824
|
let i = Z(e) ? t.x : Q(e, n, c);
|
|
825
825
|
return `M${i},${s ? u - (u === r.bottom ? 0 : o / 2) : r.bottom} L${i},${s ? u + o / (u === r.bottom ? 1 : 2) : r.bottom + o}`;
|
|
826
826
|
}).filter(Boolean).join(" ");
|
|
827
|
-
return d ? L("g", { "data-layer": "x-axis-ticks" },
|
|
827
|
+
return d ? L("g", { "data-layer": "x-axis-ticks" }, j("path", {
|
|
828
828
|
d,
|
|
829
829
|
stroke: I(n, "chart.grid.stroke", "#CCCCCC"),
|
|
830
830
|
"stroke-width": 1,
|
|
@@ -833,9 +833,9 @@ async function et(e, t) {
|
|
|
833
833
|
})) : "";
|
|
834
834
|
}
|
|
835
835
|
function tt(e, t) {
|
|
836
|
-
let { config: n, width: r } = e, i = I(n, "chart.legend", {}), a =
|
|
836
|
+
let { config: n, width: r } = e, i = I(n, "chart.legend", {}), a = A(i.fontSize, 12), o = A(i.markerSize, 10), s = A(i.itemGap, 16), c = A(i.rowGap, 8), l = A(i.padding, 8), u = Math.max(1, r - l * 2), d = [], f = [], p = 0;
|
|
837
837
|
return t.forEach((e) => {
|
|
838
|
-
let t = String(e.name ?? ""), n = o + 6 +
|
|
838
|
+
let t = String(e.name ?? ""), n = o + 6 + M(t, a) + s;
|
|
839
839
|
f.length && p + n > u && (d.push({
|
|
840
840
|
items: f,
|
|
841
841
|
width: p
|
|
@@ -864,7 +864,7 @@ function nt(e, t) {
|
|
|
864
864
|
return c.rows.forEach((e, t) => {
|
|
865
865
|
let n = Math.max(c.padding, r / 2 - e.width / 2), i = u + t * (l + c.rowGap);
|
|
866
866
|
e.items.forEach(({ serie: e, label: t, itemWidth: r }) => {
|
|
867
|
-
d.push(
|
|
867
|
+
d.push(j("rect", {
|
|
868
868
|
x: n,
|
|
869
869
|
y: i - c.markerSize / 2,
|
|
870
870
|
width: c.markerSize,
|
|
@@ -887,32 +887,32 @@ function rt(e, t) {
|
|
|
887
887
|
function it(e, t) {
|
|
888
888
|
let { config: n } = e;
|
|
889
889
|
if (!I(n, "line.area.useGradient", !1)) return "";
|
|
890
|
-
let r =
|
|
890
|
+
let r = A(I(n, "line.area.opacity", 30), 30), i = t.filter((e) => e.type === "line" && e.useArea).map((t, n) => L("linearGradient", {
|
|
891
891
|
id: rt(e, n),
|
|
892
892
|
x1: "0%",
|
|
893
893
|
x2: "0%",
|
|
894
894
|
y1: "0%",
|
|
895
895
|
y2: "100%"
|
|
896
|
-
}, [
|
|
896
|
+
}, [j("stop", {
|
|
897
897
|
offset: "0%",
|
|
898
|
-
"stop-color":
|
|
898
|
+
"stop-color": l(d(v(t.color), .03), r),
|
|
899
899
|
"stop-opacity": 1
|
|
900
|
-
}),
|
|
900
|
+
}), j("stop", {
|
|
901
901
|
offset: "100%",
|
|
902
902
|
"stop-color": t.color,
|
|
903
903
|
"stop-opacity": 0
|
|
904
904
|
})].join(""))).join("");
|
|
905
905
|
return i ? L("defs", {}, i) : "";
|
|
906
906
|
}
|
|
907
|
-
function at(
|
|
908
|
-
let { config:
|
|
909
|
-
return
|
|
910
|
-
let
|
|
911
|
-
if (
|
|
912
|
-
let d = Number.isFinite(Number(
|
|
913
|
-
if (
|
|
914
|
-
|
|
915
|
-
e &&
|
|
907
|
+
function at(e, n) {
|
|
908
|
+
let { config: r } = e, o = !!I(r, "line.cutNullValues", !1), s = [];
|
|
909
|
+
return n.filter((e) => e.type === "line" && e.useArea).forEach((n, r) => {
|
|
910
|
+
let c = N(n.plots), l = c.filter((e) => e && e.value !== null);
|
|
911
|
+
if (l.length < 2) return;
|
|
912
|
+
let d = Number.isFinite(Number(n.__zeroY)) ? Number(n.__zeroY) : U(e), f = we(e, n, r);
|
|
913
|
+
if (n.smooth && !n.useStepper) {
|
|
914
|
+
t(o ? c : l, d, o).forEach((e) => {
|
|
915
|
+
e && s.push(j("path", {
|
|
916
916
|
d: e,
|
|
917
917
|
fill: f,
|
|
918
918
|
"data-cy": "datapoint-line-area-smooth"
|
|
@@ -920,22 +920,22 @@ function at(t, i) {
|
|
|
920
920
|
});
|
|
921
921
|
return;
|
|
922
922
|
}
|
|
923
|
-
(
|
|
924
|
-
|
|
923
|
+
(n.useStepper ? u(o ? c : l, d) : o ? i(c, d) : a(l, d)).split(";").filter(Boolean).forEach((e) => {
|
|
924
|
+
s.push(j("path", {
|
|
925
925
|
d: `M${e}Z`,
|
|
926
926
|
fill: f,
|
|
927
927
|
"data-cy": "datapoint-line-area-straight"
|
|
928
928
|
}));
|
|
929
929
|
});
|
|
930
|
-
}), L("g", { "data-layer": "line-areas" },
|
|
930
|
+
}), L("g", { "data-layer": "line-areas" }, s.join(""));
|
|
931
931
|
}
|
|
932
932
|
function ot(e, t) {
|
|
933
|
-
let n =
|
|
934
|
-
return
|
|
933
|
+
let n = A(t.slotStartIndex ?? t.startAbs, 0);
|
|
934
|
+
return N(e.dashIndices).map((e) => Number(e) - n).filter(Number.isFinite);
|
|
935
935
|
}
|
|
936
936
|
function st(e, t, n, r, i) {
|
|
937
|
-
let { config: a } = e, o =
|
|
938
|
-
return
|
|
937
|
+
let { config: a } = e, o = A(t.strokeWidth || I(a, "line.strokeWidth", 2), 2);
|
|
938
|
+
return j("path", {
|
|
939
939
|
d: `M${r}`,
|
|
940
940
|
fill: "none",
|
|
941
941
|
stroke: xe(e, t, n),
|
|
@@ -945,20 +945,20 @@ function st(e, t, n, r, i) {
|
|
|
945
945
|
"stroke-dasharray": i ? o * 2 : 0
|
|
946
946
|
});
|
|
947
947
|
}
|
|
948
|
-
function ct(e,
|
|
949
|
-
let { config:
|
|
950
|
-
return i.forEach((
|
|
951
|
-
let
|
|
952
|
-
if (!(
|
|
953
|
-
if (
|
|
954
|
-
let a = ot(
|
|
955
|
-
(
|
|
956
|
-
|
|
948
|
+
function ct(e, t) {
|
|
949
|
+
let { config: n } = e, i = t.filter((e) => e.type === "line"), a = !!I(n, "line.cutNullValues", !1), o = [];
|
|
950
|
+
return i.forEach((t, i) => {
|
|
951
|
+
let s = a ? N(t.plots) : N(t.plots).filter((e) => e.value !== null), c = s.filter((e) => e.value !== null);
|
|
952
|
+
if (!(c.length < 2)) {
|
|
953
|
+
if (N(t.dashIndices).length > 0 && !t.useStepper) {
|
|
954
|
+
let a = ot(t, e);
|
|
955
|
+
(t.smooth || I(n, "line.smooth", !1) ? p(s, a) : r(s, a)).forEach((n) => {
|
|
956
|
+
n?.path && o.push(st(e, t, i, n.path, !!n.dashed));
|
|
957
957
|
});
|
|
958
958
|
return;
|
|
959
959
|
}
|
|
960
|
-
(
|
|
961
|
-
|
|
960
|
+
(t.useStepper ? u(s).split(";").filter(Boolean) : [t.smooth || I(n, "line.smooth", !1) ? a ? f(s) : ee(c) : a ? E(s) : m(c, !1, !0)]).forEach((n) => {
|
|
961
|
+
n && o.push(st(e, t, i, n, !!t.dashed));
|
|
962
962
|
});
|
|
963
963
|
}
|
|
964
964
|
}), L("g", { "data-layer": "lines" }, o.join(""));
|
|
@@ -971,14 +971,14 @@ function $(e, t) {
|
|
|
971
971
|
let n = I(e.config, "bar.border", {});
|
|
972
972
|
return {
|
|
973
973
|
stroke: n.useSerieColor ? t.color : n.stroke,
|
|
974
|
-
"stroke-width":
|
|
974
|
+
"stroke-width": A(n.strokeWidth, 0)
|
|
975
975
|
};
|
|
976
976
|
}
|
|
977
977
|
function ut(e, t) {
|
|
978
978
|
let { config: n } = e, r = t.filter((e) => e.type === "plot"), i = I(n, "plot.radius", 4), a = I(n, "plot.dot.strokeWidth", 2), o = I(n, "chart.backgroundColor", "#FFFFFF"), s = [];
|
|
979
979
|
return r.forEach((t, r) => {
|
|
980
980
|
t.plots.forEach((c, l) => {
|
|
981
|
-
F(c.value) && s.push(
|
|
981
|
+
F(c.value) && s.push(P({
|
|
982
982
|
dataCy: `xy-plot-${r}-${l}`,
|
|
983
983
|
shape: t.shape,
|
|
984
984
|
plot: c,
|
|
@@ -1006,15 +1006,15 @@ function ft(e, t, n) {
|
|
|
1006
1006
|
function pt(e, t, n, r, i) {
|
|
1007
1007
|
let { config: a } = e;
|
|
1008
1008
|
if (!n || !dt(n.value)) return !1;
|
|
1009
|
-
if (!(i >
|
|
1009
|
+
if (!(i > A(I(a, "line.dot.hideAboveMaxSerieLength", Infinity), Infinity))) return !0;
|
|
1010
1010
|
let o = e.selectedSerieIndex ?? null, s = e.selectedMinimapIndex ?? null;
|
|
1011
1011
|
return o !== null && o === r || s !== null && s === r || ft(t.plots, r, a);
|
|
1012
1012
|
}
|
|
1013
1013
|
function mt(e, t) {
|
|
1014
|
-
let { config: n } = e, r = t.filter((e) => e.type === "line"), i = Math.max(0, ...r.map((e) =>
|
|
1014
|
+
let { config: n } = e, r = t.filter((e) => e.type === "line"), i = Math.max(0, ...r.map((e) => N(e.plots).length)), a = I(n, "line.radius", 4), o = I(n, "line.dot.strokeWidth", 2), s = I(n, "chart.backgroundColor", "#FFFFFF"), c = [];
|
|
1015
1015
|
return r.forEach((t, r) => {
|
|
1016
1016
|
t.plots.forEach((l, u) => {
|
|
1017
|
-
pt(e, t, l, u, i) && c.push(
|
|
1017
|
+
pt(e, t, l, u, i) && c.push(P({
|
|
1018
1018
|
dataCy: "datapoint-line-plot",
|
|
1019
1019
|
shape: t.shape,
|
|
1020
1020
|
plot: l,
|
|
@@ -1029,18 +1029,18 @@ function mt(e, t) {
|
|
|
1029
1029
|
function ht(e, t) {
|
|
1030
1030
|
let { config: n } = e;
|
|
1031
1031
|
if (Y(n)) return "";
|
|
1032
|
-
let r = I(n, "line.interLine", {}), i =
|
|
1032
|
+
let r = I(n, "line.interLine", {}), i = N(r.pairs), a = N(r.colors);
|
|
1033
1033
|
if (!i.length) return "";
|
|
1034
|
-
let o = t.filter((e) => e.type === "line"), s =
|
|
1034
|
+
let o = t.filter((e) => e.type === "line"), s = A(r.fillOpacity, .2), c = !!I(n, "line.cutNullValues", !1), l = [];
|
|
1035
1035
|
return i.forEach((e, t) => {
|
|
1036
1036
|
let [n, r] = Array.isArray(e) ? e : [e?.a, e?.b];
|
|
1037
1037
|
if (!n || !r) return;
|
|
1038
1038
|
let i = o.find((e) => e.name === n), u = o.find((e) => e.name === r);
|
|
1039
1039
|
if (!i || !u) return;
|
|
1040
1040
|
let d = a?.[t]?.[0] ?? i.color, f = a?.[t]?.[1] ?? u.color;
|
|
1041
|
-
|
|
1042
|
-
lineA:
|
|
1043
|
-
lineB:
|
|
1041
|
+
y({
|
|
1042
|
+
lineA: N(i.plots),
|
|
1043
|
+
lineB: N(u.plots),
|
|
1044
1044
|
smoothA: !!i.smooth,
|
|
1045
1045
|
smoothB: !!u.smooth,
|
|
1046
1046
|
colorLineA: d,
|
|
@@ -1048,7 +1048,7 @@ function ht(e, t) {
|
|
|
1048
1048
|
sampleStepPx: 2,
|
|
1049
1049
|
cutNullValues: c
|
|
1050
1050
|
}).forEach((e, i) => {
|
|
1051
|
-
l.push(
|
|
1051
|
+
l.push(j("path", {
|
|
1052
1052
|
"data-cy": "interline-area",
|
|
1053
1053
|
d: e.d,
|
|
1054
1054
|
fill: e.color,
|
|
@@ -1063,13 +1063,13 @@ function ht(e, t) {
|
|
|
1063
1063
|
function gt(e) {
|
|
1064
1064
|
let t = I(e, "chart.title", {}), n = I(t, "subtitle", {});
|
|
1065
1065
|
if (!t.show) return 0;
|
|
1066
|
-
let r =
|
|
1066
|
+
let r = A(t.fontSize, 20), i = n.text ? A(n.fontSize, 14) : 0, a = A(t.paddingTop, 12), o = A(t.paddingBottom, 6);
|
|
1067
1067
|
return a + r + (n.text ? i + 4 : 0) + o;
|
|
1068
1068
|
}
|
|
1069
1069
|
function _t(e) {
|
|
1070
1070
|
let { config: t, width: n } = e, r = I(t, "chart.title", {}), i = I(r, "subtitle", {});
|
|
1071
1071
|
if (!r.show || !r.text) return "";
|
|
1072
|
-
let a = r.textAlign || "center", o = a === "left" ?
|
|
1072
|
+
let a = r.textAlign || "center", o = a === "left" ? A(r.paddingLeft, 12) : a === "right" ? n - A(r.paddingRight, 12) : n / 2, s = a === "left" ? "start" : a === "right" ? "end" : "middle", c = A(r.fontSize, 20), l = A(i.fontSize, 14), u = A(r.paddingTop, 12) + c, d = [R(r.text, {
|
|
1073
1073
|
"data-cy": "xy-div-title",
|
|
1074
1074
|
x: o,
|
|
1075
1075
|
y: u,
|
|
@@ -1095,13 +1095,13 @@ function yt(e, t, n, r, i) {
|
|
|
1095
1095
|
return !n || n.value === null || n.value === void 0 || !Number.isFinite(Number(n.value)) || !I(e.config, "dataLabels.show", !0) || !I(e.config, `${i}.labels.show`, !1) ? !1 : !Object.hasOwn(t, "dataLabels") || t.dataLabels === !0 || e.selectedSerieIndex === r || e.selectedMinimapIndex === r;
|
|
1096
1096
|
}
|
|
1097
1097
|
function bt(e, t, n, r) {
|
|
1098
|
-
let { config: i } = e,
|
|
1098
|
+
let { config: i } = e, a = A(I(i, `${r}.labels.fontSize`, I(i, "chart.labels.fontSize", 12)), 12), o = I(i, `${r}.labels.color`, I(i, "chart.color", "#2A2A2A")), c = w({
|
|
1099
1099
|
p: t.prefix || I(i, "chart.labels.prefix", ""),
|
|
1100
1100
|
v: n.value,
|
|
1101
1101
|
s: t.suffix || I(i, "chart.labels.suffix", ""),
|
|
1102
1102
|
r: I(i, `${r}.labels.rounding`, 0)
|
|
1103
1103
|
});
|
|
1104
|
-
return
|
|
1104
|
+
return s({
|
|
1105
1105
|
content: Z(e) && Number.isFinite(Number(n.x)) ? `x: ${w({
|
|
1106
1106
|
v: n.x,
|
|
1107
1107
|
r: I(i, "chart.grid.labels.xAxis.rounding", 0)
|
|
@@ -1109,28 +1109,28 @@ function bt(e, t, n, r) {
|
|
|
1109
1109
|
datapoint: n,
|
|
1110
1110
|
serie: t
|
|
1111
1111
|
}),
|
|
1112
|
-
fontSize:
|
|
1113
|
-
fill:
|
|
1112
|
+
fontSize: a,
|
|
1113
|
+
fill: o,
|
|
1114
1114
|
x: 0,
|
|
1115
1115
|
y: 0
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
1118
|
function xt(e, t, n) {
|
|
1119
1119
|
let r = I(e.config, `${n}.labels.textAnchor`, null);
|
|
1120
|
-
return r === null ?
|
|
1120
|
+
return r === null ? A(I(e.config, `${n}.labels.rotation`, 0), 0) === 0 ? "middle" : I(e.config, `${n}.labels.alwaysOnTop`, !1) || t.value >= 0 ? "start" : "end" : r;
|
|
1121
1121
|
}
|
|
1122
1122
|
function St(e, t, n) {
|
|
1123
|
-
let r =
|
|
1123
|
+
let r = A(I(e.config, `${n}.labels.offsetX`, 0), 0), i = A(I(e.config, `${n}.labels.offsetY`, -12), -12), a = A(I(e.config, `${n}.labels.rotation`, 0), 0), o = !!I(e.config, `${n}.labels.alwaysOnTop`, !1);
|
|
1124
1124
|
return `translate(${t.x + r}, ${t.y + (o || t.value >= 0 ? i : -i * 3)}) rotate(${a})`;
|
|
1125
1125
|
}
|
|
1126
1126
|
function Ct(e, t, n) {
|
|
1127
|
-
let r =
|
|
1127
|
+
let r = A(I(e.config, "bar.labels.offsetX", 0), 0), i = A(I(e.config, "bar.labels.offsetY", -6), -6), a = A(I(e.config, "bar.labels.rotation", 0), 0), o = !!I(e.config, "bar.labels.alwaysOnTop", !1), s = Number.isFinite(Number(t.__zeroY)) ? Number(t.__zeroY) : U(e), c = Math.abs(s - n.y), l = n.__barLabelX ?? n.x, u = n.y + (o ? i - (n.value < 0 ? c : 0) : n.value >= 0 ? i : -i * 3);
|
|
1128
1128
|
return `translate(${l + r}, ${u}) rotate(${a})`;
|
|
1129
1129
|
}
|
|
1130
1130
|
function wt(e, t) {
|
|
1131
|
-
let { config: n } = e, r =
|
|
1131
|
+
let { config: n } = e, r = A(I(n, "chart.labels.fontSize", 12), 12), i = I(n, "chart.backgroundColor", "#FFFFFF"), a = [];
|
|
1132
1132
|
return t.forEach((t) => {
|
|
1133
|
-
|
|
1133
|
+
N(t.plots).forEach((o, s) => {
|
|
1134
1134
|
let c = t.type;
|
|
1135
1135
|
[
|
|
1136
1136
|
"line",
|
|
@@ -1149,11 +1149,11 @@ function wt(e, t) {
|
|
|
1149
1149
|
}), L("g", { "data-layer": "datapoint-labels" }, a.join(""));
|
|
1150
1150
|
}
|
|
1151
1151
|
function Tt(e) {
|
|
1152
|
-
return
|
|
1152
|
+
return A(e.slotStartIndex ?? e.startAbs, 0);
|
|
1153
1153
|
}
|
|
1154
1154
|
function Et(e, t) {
|
|
1155
|
-
let n = Math.max(0, ...t.map((e) =>
|
|
1156
|
-
return
|
|
1155
|
+
let n = Math.max(0, ...t.map((e) => N(e.plots).length));
|
|
1156
|
+
return A(e.slotEndIndex ?? e.endAbs, n);
|
|
1157
1157
|
}
|
|
1158
1158
|
function Dt(e, t) {
|
|
1159
1159
|
let { drawingArea: n, config: r } = e;
|
|
@@ -1166,54 +1166,54 @@ function Ot(e, t, n) {
|
|
|
1166
1166
|
function kt(e, t) {
|
|
1167
1167
|
return Dt(e, t);
|
|
1168
1168
|
}
|
|
1169
|
-
function At(
|
|
1170
|
-
let { drawingArea:
|
|
1171
|
-
if (!
|
|
1172
|
-
let
|
|
1169
|
+
function At(t, n, r, i, a, o) {
|
|
1170
|
+
let { drawingArea: s } = t, c = n.caption ?? {};
|
|
1171
|
+
if (!c.text) return "";
|
|
1172
|
+
let l = kt(t, o) * a, u = c.width === "auto" ? l : A(c.width, l), d = Ot(t, i, o) - (c.width === "auto" ? 0 : u / 2 - l / 2), f = s.top + A(c.offsetY, 0);
|
|
1173
1173
|
return L("foreignObject", {
|
|
1174
|
-
"data-key": `highlight_area_caption_${
|
|
1175
|
-
x:
|
|
1176
|
-
y:
|
|
1177
|
-
width:
|
|
1174
|
+
"data-key": `highlight_area_caption_${r}`,
|
|
1175
|
+
x: d,
|
|
1176
|
+
y: f,
|
|
1177
|
+
width: u,
|
|
1178
1178
|
height: 1,
|
|
1179
1179
|
overflow: "visible"
|
|
1180
1180
|
}, L("div", {
|
|
1181
1181
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
1182
1182
|
"data-cy": "highlight-area-caption",
|
|
1183
1183
|
style: [
|
|
1184
|
-
`padding:${
|
|
1185
|
-
`text-align:${
|
|
1186
|
-
`font-size:${
|
|
1187
|
-
`color:${
|
|
1188
|
-
`font-weight:${
|
|
1184
|
+
`padding:${A(c.padding, 0)}px`,
|
|
1185
|
+
`text-align:${c.textAlign || "center"}`,
|
|
1186
|
+
`font-size:${A(c.fontSize, 12)}px`,
|
|
1187
|
+
`color:${c.color || "#2A2A2A"}`,
|
|
1188
|
+
`font-weight:${c.bold ? "bold" : "normal"}`
|
|
1189
1189
|
].join(";")
|
|
1190
|
-
},
|
|
1190
|
+
}, e(c.text)));
|
|
1191
1191
|
}
|
|
1192
1192
|
function jt(e, t) {
|
|
1193
|
-
let { config: n, drawingArea: r } = e, i =
|
|
1193
|
+
let { config: n, drawingArea: r } = e, i = N(I(n, "chart.highlightArea", []));
|
|
1194
1194
|
if (!i.length) return "";
|
|
1195
|
-
let a = Math.max(1, ...t.map((e) =>
|
|
1195
|
+
let a = Math.max(1, ...t.map((e) => N(e.plots).length)), o = Tt(e), s = Et(e, t), c = [];
|
|
1196
1196
|
return i.forEach((t, n) => {
|
|
1197
1197
|
if (!t?.show) return;
|
|
1198
|
-
let i =
|
|
1198
|
+
let i = A(t.from, 0), u = Math.min(A(t.to, i), a - 1);
|
|
1199
1199
|
if (u < i) return;
|
|
1200
1200
|
for (let d = i; d <= u; d += 1) {
|
|
1201
1201
|
if (d < o || d > s - 1) continue;
|
|
1202
1202
|
let i = d - o;
|
|
1203
|
-
|
|
1203
|
+
c.push(j("rect", {
|
|
1204
1204
|
"data-cy": "highlight-area",
|
|
1205
1205
|
"data-key": `highlight_area_${n}_${d}`,
|
|
1206
1206
|
x: Ot(e, i, a),
|
|
1207
1207
|
y: r.top,
|
|
1208
1208
|
width: kt(e, a),
|
|
1209
1209
|
height: Math.max(1, r.height),
|
|
1210
|
-
fill:
|
|
1210
|
+
fill: l(t.color, A(t.opacity, 20)),
|
|
1211
1211
|
"pointer-events": "none"
|
|
1212
1212
|
}));
|
|
1213
1213
|
}
|
|
1214
1214
|
let d = Math.max(i, o);
|
|
1215
|
-
d <= Math.min(u, s - 1) &&
|
|
1216
|
-
}),
|
|
1215
|
+
d <= Math.min(u, s - 1) && c.push(At(e, t, n, d - o, u - i + 1, a));
|
|
1216
|
+
}), c.length ? L("g", { "data-layer": "highlight-areas" }, c.join("")) : "";
|
|
1217
1217
|
}
|
|
1218
1218
|
function Mt(e, t) {
|
|
1219
1219
|
if (t == null) return null;
|
|
@@ -1221,15 +1221,15 @@ function Mt(e, t) {
|
|
|
1221
1221
|
return i - (Number(t) - 0) / a * n.height;
|
|
1222
1222
|
}
|
|
1223
1223
|
function Nt(e) {
|
|
1224
|
-
return
|
|
1224
|
+
return M(e.text, A(e.fontSize, 12));
|
|
1225
1225
|
}
|
|
1226
1226
|
function Pt(e, t, n) {
|
|
1227
|
-
let r =
|
|
1228
|
-
return c = e.textAnchor === "middle" ? t - o / 2 -
|
|
1227
|
+
let r = A(e.fontSize, 12), i = e.padding ?? {}, a = e.border ?? {}, o = Nt(e), s = r, c;
|
|
1228
|
+
return c = e.textAnchor === "middle" ? t - o / 2 - A(i.left, 0) : e.textAnchor === "end" ? t - o - A(i.right, 0) : t - A(i.left, 0), {
|
|
1229
1229
|
x: c,
|
|
1230
|
-
y: n - s * .75 -
|
|
1231
|
-
width: o +
|
|
1232
|
-
height: s +
|
|
1230
|
+
y: n - s * .75 - A(i.top, 0),
|
|
1231
|
+
width: o + A(i.left, 0) + A(i.right, 0),
|
|
1232
|
+
height: s + A(i.top, 0) + A(i.bottom, 0),
|
|
1233
1233
|
fill: e.backgroundColor,
|
|
1234
1234
|
stroke: a.stroke,
|
|
1235
1235
|
rx: a.rx,
|
|
@@ -1240,14 +1240,14 @@ function Pt(e, t, n) {
|
|
|
1240
1240
|
function Ft(e) {
|
|
1241
1241
|
let { config: t, drawingArea: n } = e;
|
|
1242
1242
|
if (Y(t)) return "";
|
|
1243
|
-
let r =
|
|
1243
|
+
let r = N(I(t, "chart.annotations", [])).filter((e) => e?.show && (e.yAxis?.yTop !== null || e.yAxis?.yBottom !== null) && (e.yAxis?.yTop !== void 0 || e.yAxis?.yBottom !== void 0));
|
|
1244
1244
|
if (!r.length) return "";
|
|
1245
1245
|
let i = [];
|
|
1246
1246
|
return r.forEach((t, r) => {
|
|
1247
|
-
let a = t.yAxis ?? {}, o = a.label ?? {}, s = a.line ?? {},
|
|
1247
|
+
let a = t.yAxis ?? {}, o = a.label ?? {}, s = a.line ?? {}, c = a.area ?? {}, u = a.yTop, d = a.yBottom, f = u != null && d != null && u !== d, p = Mt(e, u), m = Mt(e, d), h = Number.isFinite(p), g = Number.isFinite(m);
|
|
1248
1248
|
if (!h && !g) return;
|
|
1249
1249
|
let _ = [];
|
|
1250
|
-
if (h && _.push(
|
|
1250
|
+
if (h && _.push(j("line", {
|
|
1251
1251
|
x1: n.left,
|
|
1252
1252
|
y1: p,
|
|
1253
1253
|
x2: n.right,
|
|
@@ -1257,7 +1257,7 @@ function Ft(e) {
|
|
|
1257
1257
|
"stroke-dasharray": s.strokeDasharray,
|
|
1258
1258
|
"stroke-linecap": "round",
|
|
1259
1259
|
"data-cy": "xy-annotation-y-top-line"
|
|
1260
|
-
})), g && _.push(
|
|
1260
|
+
})), g && _.push(j("line", {
|
|
1261
1261
|
x1: n.left,
|
|
1262
1262
|
y1: m,
|
|
1263
1263
|
x2: n.right,
|
|
@@ -1267,17 +1267,17 @@ function Ft(e) {
|
|
|
1267
1267
|
"stroke-dasharray": s.strokeDasharray,
|
|
1268
1268
|
"stroke-linecap": "round",
|
|
1269
1269
|
"data-cy": "xy-annotation-y-bottom-line"
|
|
1270
|
-
})), f && h && g && _.push(
|
|
1270
|
+
})), f && h && g && _.push(j("rect", {
|
|
1271
1271
|
x: n.left,
|
|
1272
1272
|
y: Math.min(p, m),
|
|
1273
1273
|
width: n.width,
|
|
1274
1274
|
height: Math.abs(p - m),
|
|
1275
|
-
fill: c
|
|
1275
|
+
fill: l(c.fill, A(c.opacity, 20)),
|
|
1276
1276
|
"data-cy": "xy-annotation-y-area",
|
|
1277
1277
|
"pointer-events": "none"
|
|
1278
1278
|
})), o.text) {
|
|
1279
|
-
let e = o.padding ?? {}, t = h && g ? Math.min(p, m) : h ? p : m, r = (o.position === "start" ? n.left +
|
|
1280
|
-
Number.isFinite(a.y) && Number.isFinite(i) && (_.push(
|
|
1279
|
+
let e = o.padding ?? {}, t = h && g ? Math.min(p, m) : h ? p : m, r = (o.position === "start" ? n.left + A(e.left, 0) : n.right - A(e.right, 0)) + A(o.offsetX, 0), i = t - A(o.fontSize, 12) / 3 + A(o.offsetY, 0) - A(e.top, 0), a = Pt(o, r, i);
|
|
1280
|
+
Number.isFinite(a.y) && Number.isFinite(i) && (_.push(j("rect", {
|
|
1281
1281
|
class: "vue-ui-xy-annotation-label-box",
|
|
1282
1282
|
...a,
|
|
1283
1283
|
"data-cy": "xy-annotation-label-box"
|
|
@@ -1307,12 +1307,12 @@ function It(e, t) {
|
|
|
1307
1307
|
config: e.config,
|
|
1308
1308
|
series: t.map((e) => ({
|
|
1309
1309
|
...e,
|
|
1310
|
-
plots:
|
|
1310
|
+
plots: N(e.plots).map((e) => ({ ...e }))
|
|
1311
1311
|
}))
|
|
1312
1312
|
}) ?? "" : n ?? "";
|
|
1313
1313
|
}
|
|
1314
1314
|
async function Lt(e) {
|
|
1315
|
-
let t = e.config, n =
|
|
1315
|
+
let t = e.config, n = A(e.width, t.chart.width ?? 1e3), r = A(e.height, t.chart.height ?? 600), i = _e({
|
|
1316
1316
|
...e,
|
|
1317
1317
|
config: t,
|
|
1318
1318
|
width: n,
|
|
@@ -1331,7 +1331,7 @@ async function Lt(e) {
|
|
|
1331
1331
|
viewBox="0 0 ${n} ${r}"
|
|
1332
1332
|
role="img"
|
|
1333
1333
|
>
|
|
1334
|
-
${
|
|
1334
|
+
${ne()}
|
|
1335
1335
|
${vt(a)}
|
|
1336
1336
|
${it(a, o)}
|
|
1337
1337
|
${Te(a, o)}
|