vue-data-ui 3.22.0 → 3.22.2
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-_pDGXl76.js → Arrow-BGhJI-qh.js} +1 -1
- package/dist/{BaseDraggableDialog-O8jn9Lvi.js → BaseDraggableDialog-a9xCKjW-.js} +2 -2
- package/dist/{BaseIcon-CWXbczu_.js → BaseIcon-DEtwcvEH.js} +1 -1
- package/dist/{BaseLegendToggle-CUYal8mC.js → BaseLegendToggle-B-lM0iV1.js} +1 -1
- package/dist/{BaseZoomControls-JwSGzoKi.js → BaseZoomControls-BjjT6vtB.js} +2 -2
- package/dist/{ColorPicker-CCqmzGGo.js → ColorPicker-DMLahA2S.js} +2 -2
- package/dist/{DataTable-G9aclxhk.js → DataTable-DJZgdnIn.js} +2 -2
- package/dist/{Legend-CAStwHdx.js → Legend-BVDhEEsC.js} +2 -2
- package/dist/{NonSvgPenAndPaper-BLy8zMox.js → NonSvgPenAndPaper-Dwq_M6Bz.js} +13 -13
- package/dist/{PackageVersion-DxBQctV8.js → PackageVersion-Dx81ZIAL.js} +1 -1
- package/dist/{PenAndPaper-z1woaB1V.js → PenAndPaper-DJIIG6dv.js} +13 -13
- package/dist/{Shape-BubavoqO.js → Shape-C5OvuwII.js} +1 -1
- package/dist/{Slicer-JCOpjPU7.js → Slicer-ClR833cP.js} +2 -2
- package/dist/{SlicerPreview-BA_RDgVn.js → SlicerPreview-CAhqG_ZQ.js} +12 -12
- package/dist/{SparkTooltip-DMFXQmFi.js → SparkTooltip-DTzo8Sah.js} +6 -6
- package/dist/{Title-DH6G8_cZ.js → Title-CVYf1f8m.js} +1 -1
- package/dist/{Tooltip-979Ytd8R.js → Tooltip-BmGCBJuU.js} +1 -1
- package/dist/{UserOptions-rx9hUnOy.js → UserOptions-xqbNpHi2.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-CtV3uxDJ.js → dom-to-png-rjAIVHxa.js} +1 -1
- package/dist/exposedLib-CffbQxjN.js +19 -0
- package/dist/{img-C_RNNswI.js → img-BCAOkqfM.js} +1 -1
- package/dist/{labelUtils-Bycs-017.js → labelUtils-C0D1tjig.js} +1 -1
- package/dist/{lib-AJRHFE5U.js → lib-CXicicWN.js} +155 -126
- package/dist/{package-0oRlvBuX.js → package-CILLITOI.js} +1 -1
- package/dist/{pdf-CdX23zf1.js → pdf-ChYv2jb6.js} +1 -1
- package/dist/{render-common-DSiH7qj-.js → render-common-bMAFQ_qf.js} +2 -2
- 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 +7 -10
- package/dist/{useAutoSizeLabelsInsideViewbox-kjVKQz36.js → useAutoSizeLabelsInsideViewbox-B4-0yo3K.js} +1 -1
- package/dist/{useConfig-Br1uzq_L.js → useConfig-Bf_EBbe3.js} +4 -1
- package/dist/{useNestedProp-DtcXIg7n.js → useNestedProp-APyFoLCQ.js} +1 -1
- package/dist/{useObjectBindings-CxQ6A5pi.js → useObjectBindings-Byts-nf-.js} +1 -1
- package/dist/{usePrinter-6n2MzVyV.js → usePrinter-Dng0UK-G.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/{vue-data-ui-DoViN_4r.js → vue-data-ui-DD-txoS1.js} +68 -68
- package/dist/vue-data-ui.js +72 -72
- package/dist/vue-ui-3d-bar-DxfNdF2e.js +1757 -0
- package/dist/{vue-ui-accordion-HvsT8_RM.js → vue-ui-accordion-Di_givzQ.js} +4 -4
- package/dist/vue-ui-age-pyramid-CTwMfsqS.js +1238 -0
- package/dist/{vue-ui-annotator-7s5ly6XJ.js → vue-ui-annotator-tRkLFMQ9.js} +60 -60
- package/dist/{vue-ui-bullet-B-bWGz6d.js → vue-ui-bullet-9gtGJaGb.js} +23 -23
- package/dist/{vue-ui-bump-DM-hF-AK.js → vue-ui-bump-BJ5O8Mps.js} +400 -400
- package/dist/{vue-ui-candlestick-BfOvntqR.js → vue-ui-candlestick-CJ_VVYbJ.js} +50 -50
- package/dist/vue-ui-carousel-table-8s8BSy-K.js +455 -0
- package/dist/vue-ui-chestnut-D3-ck2h2.js +2010 -0
- package/dist/vue-ui-chord-1BitQtEw.js +1391 -0
- package/dist/{vue-ui-circle-pack-BBaRLELd.js → vue-ui-circle-pack-DVMhDFKU.js} +44 -44
- package/dist/{vue-ui-cursor-DWlKtcab.js → vue-ui-cursor-D7yh10hX.js} +61 -61
- package/dist/{vue-ui-dag-BAKU4jBj.js → vue-ui-dag--LFEAAf_.js} +18 -18
- package/dist/{vue-ui-dashboard-DE4R55nU.js → vue-ui-dashboard-COeO878g.js} +70 -70
- package/dist/{vue-ui-digits-B416Mj46.js → vue-ui-digits-C50FVr7C.js} +4 -4
- package/dist/{vue-ui-donut-BuGSF4pM.js → vue-ui-donut-BzKXqQA2.js} +160 -160
- package/dist/{vue-ui-donut-BugVAUHv.js → vue-ui-donut-NHjQzFO5.js} +474 -474
- package/dist/vue-ui-donut-evolution-lPkwit2C.js +1510 -0
- package/dist/vue-ui-dumbbell-hlEfvbbf.js +1530 -0
- package/dist/{vue-ui-flow-BoEP6hmg.js → vue-ui-flow-Bg_OSszc.js} +43 -43
- package/dist/vue-ui-funnel-B_bK0jJB.js +777 -0
- package/dist/{vue-ui-galaxy-CB5F8Q-u.js → vue-ui-galaxy-WVCUzcYc.js} +301 -301
- package/dist/vue-ui-gauge-Cqeko0wA.js +920 -0
- package/dist/{vue-ui-geo-BAy4kNv-.js → vue-ui-geo-DtzXRvmx.js} +22 -22
- package/dist/{vue-ui-gizmo-DjA8cqcl.js → vue-ui-gizmo-hIFd7qck.js} +4 -4
- package/dist/{vue-ui-heatmap-CMlxUI7Q.js → vue-ui-heatmap-yPlwc3l_.js} +95 -95
- package/dist/vue-ui-history-plot-BGmcDg2w.js +1554 -0
- package/dist/{vue-ui-horizontal-bar-XgzEVwOK.js → vue-ui-horizontal-bar-CJciNHpT.js} +264 -264
- package/dist/{vue-ui-kpi-B5Lu5U1S.js → vue-ui-kpi-DmSe1QGb.js} +4 -4
- package/dist/{vue-ui-mini-loader-CyYpLcrt.js → vue-ui-mini-loader-CqxI6DwN.js} +3 -3
- package/dist/{vue-ui-molecule-DzpgAmZn.js → vue-ui-molecule-w-94Uktn.js} +181 -181
- package/dist/{vue-ui-mood-radar-DMgYQtOw.js → vue-ui-mood-radar-B3OGWGHR.js} +29 -29
- package/dist/{vue-ui-nested-donuts-BHX0QqvR.js → vue-ui-nested-donuts-Dv_yE5EV.js} +211 -211
- package/dist/{vue-ui-onion-CYh7tdS0.js → vue-ui-onion-BQbI0Vxd.js} +34 -34
- package/dist/{vue-ui-parallel-coordinate-plot-BTaG92hV.js → vue-ui-parallel-coordinate-plot-ColST3Jj.js} +40 -40
- package/dist/vue-ui-quadrant-BB7qdXK0.js +1978 -0
- package/dist/{vue-ui-quick-chart-CHSUGLTx.js → vue-ui-quick-chart-CGDeo3Fx.js} +358 -358
- package/dist/vue-ui-radar-DqDn14DL.js +1281 -0
- package/dist/{vue-ui-rating-BoBLJm55.js → vue-ui-rating-ChDwpol2.js} +34 -34
- package/dist/vue-ui-relation-circle-BvfZqcK0.js +924 -0
- package/dist/{vue-ui-ridgeline-q_UhtM4M.js → vue-ui-ridgeline-Cq8z57xB.js} +219 -219
- package/dist/{vue-ui-rings-VOjUZu2b.js → vue-ui-rings-Ds-sgNPK.js} +36 -36
- package/dist/{vue-ui-scatter-DETMofE2.js → vue-ui-scatter-BgOVUzQ3.js} +75 -75
- package/dist/{vue-ui-skeleton-D36VILNm.js → vue-ui-skeleton-DJ5KAbfV.js} +42 -42
- package/dist/{vue-ui-smiley-CPbUSUTQ.js → vue-ui-smiley-fFrNX-Gl.js} +17 -17
- package/dist/{vue-ui-spark-trend-XpEbgNeK.js → vue-ui-spark-trend-D6OBWxmg.js} +92 -92
- package/dist/{vue-ui-sparkbar-Dq1hnBhL.js → vue-ui-sparkbar-CtCP8O44.js} +78 -78
- package/dist/{vue-ui-sparkgauge-CbAakuhB.js → vue-ui-sparkgauge-CZDkyViI.js} +38 -38
- package/dist/vue-ui-sparkhistogram-DgruLf33.js +560 -0
- package/dist/vue-ui-sparkline-CJKE7Xcl.js +1547 -0
- package/dist/{vue-ui-sparkstackbar-OprYrGQQ.js → vue-ui-sparkstackbar-BSV0M-2u.js} +162 -162
- package/dist/{vue-ui-stackbar-Bt0FKlf7.js → vue-ui-stackbar-pnlYCnTj.js} +67 -67
- package/dist/vue-ui-stackline-DS_MPmc1.js +2398 -0
- package/dist/{vue-ui-strip-plot-DdzflSOm.js → vue-ui-strip-plot-DSKOrJZX.js} +49 -49
- package/dist/{vue-ui-table-BZbLau0d.js → vue-ui-table-c1FPEwLM.js} +87 -87
- package/dist/{vue-ui-table-heatmap-DX80uRHe.js → vue-ui-table-heatmap-CMQJXnP8.js} +17 -17
- package/dist/vue-ui-table-sparkline-CAS9Pk60.js +712 -0
- package/dist/vue-ui-thermometer-w3eeJv9s.js +763 -0
- package/dist/{vue-ui-timer-smc39MBP.js → vue-ui-timer-CSP48eS-.js} +6 -6
- package/dist/{vue-ui-tiremarks-MwPUc9H4.js → vue-ui-tiremarks-DJvXj1P3.js} +19 -19
- package/dist/vue-ui-treemap-BaOMXTR1.js +1587 -0
- package/dist/vue-ui-waffle-Bo22Ph8n.js +1362 -0
- package/dist/{vue-ui-wheel-VQ5Sc_Kt.js → vue-ui-wheel-CbL52G-w.js} +51 -51
- package/dist/vue-ui-word-cloud-BqOCyp7c.js +1723 -0
- package/dist/{vue-ui-world-Dq9I3omC.js → vue-ui-world-BkjzCcVh.js} +445 -445
- package/dist/{vue-ui-xy-BRITAMZZ.js → vue-ui-xy-CVDNhnDY.js} +162 -162
- package/dist/{vue-ui-xy-D4D9tjiY.js → vue-ui-xy-DuwLRfr4.js} +537 -534
- package/dist/{vue-ui-xy-canvas-CYQF5hVa.js → vue-ui-xy-canvas-CXqGVMeQ.js} +65 -65
- package/package.json +2 -2
- package/dist/exposedLib-BJbE_A8E.js +0 -19
- package/dist/vue-ui-3d-bar-BUEcrSrc.js +0 -1757
- package/dist/vue-ui-age-pyramid-Zw5otO78.js +0 -1238
- package/dist/vue-ui-carousel-table-CrmVyfym.js +0 -455
- package/dist/vue-ui-chestnut-BQq65pNh.js +0 -2010
- package/dist/vue-ui-chord-BA2jFRMP.js +0 -1391
- package/dist/vue-ui-donut-evolution-C6fXP7QH.js +0 -1510
- package/dist/vue-ui-dumbbell-1K5kOirf.js +0 -1530
- package/dist/vue-ui-funnel-CheSqvyj.js +0 -777
- package/dist/vue-ui-gauge-Cjtovl1s.js +0 -920
- package/dist/vue-ui-history-plot-PkrNUPpp.js +0 -1554
- package/dist/vue-ui-quadrant-C00cEk5o.js +0 -1978
- package/dist/vue-ui-radar-jNxRTIur.js +0 -1281
- package/dist/vue-ui-relation-circle-Ne_rI2jS.js +0 -924
- package/dist/vue-ui-sparkhistogram-DpPjIA7n.js +0 -560
- package/dist/vue-ui-sparkline-DLay6Hog.js +0 -1513
- package/dist/vue-ui-stackline-CrUTz-k1.js +0 -2398
- package/dist/vue-ui-table-sparkline-C3_J575b.js +0 -707
- package/dist/vue-ui-thermometer-Bo32hwAO.js +0 -763
- package/dist/vue-ui-treemap-BNG7Zc04.js +0 -1587
- package/dist/vue-ui-waffle-D-9Ny9vN.js +0 -1362
- package/dist/vue-ui-word-cloud-BqsUdsCY.js +0 -1656
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { B as e,
|
|
1
|
+
import { B as e, F as t, Ft as n, G as r, H as i, I as a, It as o, L as s, M as c, O as l, Pt as u, Q as d, R as f, T as p, Ut as m, Vt as h, a as g, c as _, g as v, h as y, i as b, j as x, k as ee, kt as S, pt as C, s as te, t as ne, w, y as T } from "./lib-CXicicWN.js";
|
|
2
2
|
import { t as E } from "./useTimeLabels-BmBRv27Y.js";
|
|
3
|
-
import { t as D } from "./useConfig-
|
|
3
|
+
import { t as D } from "./useConfig-Bf_EBbe3.js";
|
|
4
4
|
import { t as re } from "./vue_ui_xy-BA3-_LCx.js";
|
|
5
|
-
import { _ as O, d as k, f as A, g as j, h as M, l as ie, m as ae, p as N, u as P, v as F } from "./render-common-
|
|
5
|
+
import { _ as O, d as k, f as A, g as j, h as M, l as ie, m as ae, p as N, u as P, v as F } from "./render-common-bMAFQ_qf.js";
|
|
6
6
|
//#region src/svg/vue-ui-xy/create.js
|
|
7
7
|
var { vue_ui_xy: I } = D();
|
|
8
|
-
function oe({ config: e = {}, dataset:
|
|
9
|
-
let
|
|
10
|
-
userConfig:
|
|
8
|
+
function oe({ config: e = {}, dataset: t = [] } = {}) {
|
|
9
|
+
let n = e ?? {}, r = m({
|
|
10
|
+
userConfig: n,
|
|
11
11
|
defaultConfig: I
|
|
12
12
|
});
|
|
13
|
-
|
|
13
|
+
C(n, "chart.highlightArea") && (Array.isArray(n.chart.highlightArea) ? r.chart.highlightArea = n.chart.highlightArea.map((e) => m({
|
|
14
14
|
defaultConfig: I.chart.highlightArea,
|
|
15
15
|
userConfig: e
|
|
16
|
-
})) :
|
|
16
|
+
})) : r.chart.highlightArea = [m({
|
|
17
17
|
defaultConfig: I.chart.highlightArea,
|
|
18
|
-
userConfig:
|
|
19
|
-
})]),
|
|
18
|
+
userConfig: n.chart.highlightArea
|
|
19
|
+
})]), C(n, "chart.annotations") && Array.isArray(n.chart.annotations) && n.chart.annotations.length ? r.chart.annotations = n.chart.annotations.map((e) => m({
|
|
20
20
|
defaultConfig: I.chart.annotations[0],
|
|
21
21
|
userConfig: e
|
|
22
|
-
})) :
|
|
23
|
-
let
|
|
24
|
-
if (!
|
|
25
|
-
...
|
|
26
|
-
customPalette:
|
|
22
|
+
})) : r.chart.annotations = [], C(n, "chart.grid.position") && n.chart.grid.position === "start" && t.some((e) => e.type === "bar") && (r.chart.grid.position = "middle");
|
|
23
|
+
let i = r.theme;
|
|
24
|
+
if (!i) return {
|
|
25
|
+
...r,
|
|
26
|
+
customPalette: r.customPalette?.length ? r.customPalette : S
|
|
27
27
|
};
|
|
28
|
-
let
|
|
29
|
-
userConfig:
|
|
30
|
-
defaultConfig:
|
|
31
|
-
userConfig: re[
|
|
32
|
-
defaultConfig:
|
|
28
|
+
let a = m({
|
|
29
|
+
userConfig: n,
|
|
30
|
+
defaultConfig: m({
|
|
31
|
+
userConfig: re[i] || {},
|
|
32
|
+
defaultConfig: r
|
|
33
33
|
})
|
|
34
34
|
});
|
|
35
35
|
return {
|
|
36
|
-
...
|
|
37
|
-
customPalette:
|
|
36
|
+
...a,
|
|
37
|
+
customPalette: a.customPalette?.length ? a.customPalette : h[i] || S
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
function L(e) {
|
|
@@ -54,7 +54,7 @@ function le({ 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 = se(r) ? Number(r) : Math.min(...n), o = se(i) ? Number(i) : Math.max(...n);
|
|
57
|
-
return
|
|
57
|
+
return y(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 ue({ 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;
|
|
@@ -71,18 +71,18 @@ function de({ dataset: e = [], config: t = {}, width: n = 1e3, height: r = 600,
|
|
|
71
71
|
bottom: r - s.chart.padding.bottom
|
|
72
72
|
};
|
|
73
73
|
c.width = c.right - c.left, c.height = c.bottom - c.top;
|
|
74
|
-
let l = e.flatMap((e) => Array.isArray(e.series) ? e.series.map((e) => Number(typeof e == "object" && e ? e.y : e)) : []).filter(Number.isFinite), u =
|
|
74
|
+
let l = e.flatMap((e) => Array.isArray(e.series) ? e.series.map((e) => Number(typeof e == "object" && e ? e.y : e)) : []).filter(Number.isFinite), u = y(Math.min(0, ...l), Math.max(1, ...l), 6), d = e.some((e) => Array.isArray(e.series) ? e.series.some(L) : !1), f = d ? le({
|
|
75
75
|
dataset: e,
|
|
76
76
|
config: s
|
|
77
|
-
}) : null,
|
|
77
|
+
}) : null, p = Math.max(0, ...e.map((e) => e.series?.length || 0)), m = (e) => p <= 1 ? c.left + c.width / 2 : c.left + e / (p - 1) * c.width, h = (e, t) => d ? L(e) ? ue({
|
|
78
78
|
xValue: e.x,
|
|
79
|
-
xScale:
|
|
79
|
+
xScale: f,
|
|
80
80
|
drawingArea: c,
|
|
81
81
|
config: s
|
|
82
|
-
}) : null :
|
|
82
|
+
}) : null : m(t), g = (e) => {
|
|
83
83
|
let t = (Number(e) - u.min) / (u.max - u.min || 1);
|
|
84
84
|
return c.bottom - t * c.height;
|
|
85
|
-
},
|
|
85
|
+
}, _ = Array.isArray(s.customPalette) ? s.customPalette : [], v = _.length ? _ : S;
|
|
86
86
|
return {
|
|
87
87
|
width: n,
|
|
88
88
|
height: r,
|
|
@@ -91,14 +91,14 @@ function de({ dataset: e = [], config: t = {}, width: n = 1e3, height: r = 600,
|
|
|
91
91
|
config: s,
|
|
92
92
|
drawingArea: c,
|
|
93
93
|
scale: u,
|
|
94
|
-
xScale:
|
|
94
|
+
xScale: f,
|
|
95
95
|
isContinuous: d,
|
|
96
96
|
series: e.map((e, t) => {
|
|
97
|
-
let n = (e.color ? T(e.color) : "") ||
|
|
97
|
+
let n = (e.color ? T(e.color) : "") || v[t % v.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:
|
|
101
|
-
y: n === null || !Number.isFinite(Number(n)) ? null :
|
|
100
|
+
x: h(e, t),
|
|
101
|
+
y: n === null || !Number.isFinite(Number(n)) ? null : g(n),
|
|
102
102
|
value: n,
|
|
103
103
|
index: t,
|
|
104
104
|
rawX: L(e) ? Number(e.x) : null,
|
|
@@ -183,7 +183,7 @@ 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 = i();
|
|
187
187
|
function W(e) {
|
|
188
188
|
return ve;
|
|
189
189
|
}
|
|
@@ -206,17 +206,17 @@ function Ce(e, t, n) {
|
|
|
206
206
|
let { config: r } = e;
|
|
207
207
|
return N(r, "line.useGradient", !1) ? `url(#${ye(e, n)})` : N(r, "line.dot.useSerieColor", !0) ? t.color : N(r, "line.dot.fill", "#FFFFFF");
|
|
208
208
|
}
|
|
209
|
-
function we(e, t,
|
|
210
|
-
let { config:
|
|
211
|
-
return N(
|
|
209
|
+
function we(e, t, r) {
|
|
210
|
+
let { config: i } = e;
|
|
211
|
+
return N(i, "line.area.useGradient", !1) ? `url(#${rt(e, r)})` : n(t.color, O(N(i, "line.area.opacity", 30), 30));
|
|
212
212
|
}
|
|
213
213
|
function K(e, t, n, r) {
|
|
214
214
|
return N(e.config, "bar.useGradient", !1) ? r >= 0 ? `url(#${G(e, n, "pos")})` : `url(#${G(e, n, "neg")})` : t.color;
|
|
215
215
|
}
|
|
216
216
|
function Te(e, t) {
|
|
217
|
-
let { config: n } = e,
|
|
217
|
+
let { config: n } = e, r = [];
|
|
218
218
|
return N(n, "bar.useGradient", !1) && t.filter((e) => e.type === "bar").forEach((t, n) => {
|
|
219
|
-
|
|
219
|
+
r.push(P("linearGradient", {
|
|
220
220
|
id: G(e, n, "pos"),
|
|
221
221
|
x2: "0%",
|
|
222
222
|
y2: "100%"
|
|
@@ -227,33 +227,33 @@ function Te(e, t) {
|
|
|
227
227
|
}),
|
|
228
228
|
k("stop", {
|
|
229
229
|
offset: "62%",
|
|
230
|
-
"stop-color":
|
|
230
|
+
"stop-color": o(T(t.color), .02)
|
|
231
231
|
}),
|
|
232
232
|
k("stop", {
|
|
233
233
|
offset: "100%",
|
|
234
|
-
"stop-color":
|
|
234
|
+
"stop-color": o(T(t.color), .05)
|
|
235
235
|
})
|
|
236
|
-
].join(""))),
|
|
236
|
+
].join(""))), r.push(P("linearGradient", {
|
|
237
237
|
id: G(e, n, "neg"),
|
|
238
238
|
x2: "0%",
|
|
239
239
|
y2: "100%"
|
|
240
240
|
}, [
|
|
241
241
|
k("stop", {
|
|
242
242
|
offset: "0%",
|
|
243
|
-
"stop-color":
|
|
243
|
+
"stop-color": o(T(t.color), .05)
|
|
244
244
|
}),
|
|
245
245
|
k("stop", {
|
|
246
246
|
offset: "38%",
|
|
247
|
-
"stop-color":
|
|
247
|
+
"stop-color": o(T(t.color), .02)
|
|
248
248
|
}),
|
|
249
249
|
k("stop", {
|
|
250
250
|
offset: "100%",
|
|
251
251
|
"stop-color": T(t.color)
|
|
252
252
|
})
|
|
253
253
|
].join("")));
|
|
254
|
-
}), t.filter((e) => e.type === "line").forEach((t,
|
|
255
|
-
N(n, "line.useGradient", !1) &&
|
|
256
|
-
id: ye(e,
|
|
254
|
+
}), t.filter((e) => e.type === "line").forEach((t, i) => {
|
|
255
|
+
N(n, "line.useGradient", !1) && r.push(P("radialGradient", {
|
|
256
|
+
id: ye(e, i),
|
|
257
257
|
cx: "50%",
|
|
258
258
|
cy: "50%",
|
|
259
259
|
r: "50%",
|
|
@@ -261,20 +261,20 @@ function Te(e, t) {
|
|
|
261
261
|
fy: "50%"
|
|
262
262
|
}, [k("stop", {
|
|
263
263
|
offset: "0%",
|
|
264
|
-
"stop-color":
|
|
264
|
+
"stop-color": o(T(t.color), .05)
|
|
265
265
|
}), k("stop", {
|
|
266
266
|
offset: "100%",
|
|
267
267
|
"stop-color": T(t.color)
|
|
268
|
-
})].join(""))), t.temperatureColors && !t.isFlatTemperatureLine &&
|
|
269
|
-
id: be(e,
|
|
268
|
+
})].join(""))), t.temperatureColors && !t.isFlatTemperatureLine && r.push(P("linearGradient", {
|
|
269
|
+
id: be(e, i),
|
|
270
270
|
gradientTransform: "rotate(90)"
|
|
271
271
|
}, t.temperatureColors.map((e, n) => k("stop", {
|
|
272
272
|
offset: u(n, t.temperatureColors.length),
|
|
273
273
|
"stop-color": T(e)
|
|
274
274
|
})).join("")));
|
|
275
|
-
}), t.filter((e) => e.type === "plot").forEach((t,
|
|
276
|
-
N(n, "plot.useGradient", !1) &&
|
|
277
|
-
id: Se(e,
|
|
275
|
+
}), t.filter((e) => e.type === "plot").forEach((t, i) => {
|
|
276
|
+
N(n, "plot.useGradient", !1) && r.push(P("radialGradient", {
|
|
277
|
+
id: Se(e, i),
|
|
278
278
|
cx: "50%",
|
|
279
279
|
cy: "50%",
|
|
280
280
|
r: "50%",
|
|
@@ -282,12 +282,12 @@ function Te(e, t) {
|
|
|
282
282
|
fy: "50%"
|
|
283
283
|
}, [k("stop", {
|
|
284
284
|
offset: "0%",
|
|
285
|
-
"stop-color":
|
|
285
|
+
"stop-color": o(T(t.color), .05)
|
|
286
286
|
}), k("stop", {
|
|
287
287
|
offset: "100%",
|
|
288
288
|
"stop-color": T(t.color)
|
|
289
289
|
})].join("")));
|
|
290
|
-
}),
|
|
290
|
+
}), r.length ? P("defs", { "data-layer": "gradients" }, r.join("")) : "";
|
|
291
291
|
}
|
|
292
292
|
function Ee(e) {
|
|
293
293
|
let t = N(e.config, "chart.backgroundColor", "#FFFFFF");
|
|
@@ -308,13 +308,13 @@ function J(e) {
|
|
|
308
308
|
return N(e, "chart.grid.labels.yAxis.position", "left") === "right";
|
|
309
309
|
}
|
|
310
310
|
function De(e, t) {
|
|
311
|
-
let n =
|
|
311
|
+
let n = r({
|
|
312
312
|
p: N(t, "chart.labels.prefix", ""),
|
|
313
313
|
v: e,
|
|
314
314
|
s: N(t, "chart.labels.suffix", ""),
|
|
315
315
|
r: N(t, "chart.grid.labels.yAxis.rounding", 0)
|
|
316
316
|
});
|
|
317
|
-
return
|
|
317
|
+
return b(N(t, "chart.grid.labels.yAxis.formatter", null), e, n, t);
|
|
318
318
|
}
|
|
319
319
|
function Y(e) {
|
|
320
320
|
return !!N(e, "chart.grid.labels.yAxis.stacked", !1);
|
|
@@ -323,7 +323,7 @@ function X(e) {
|
|
|
323
323
|
return e != null && Number.isFinite(Number(e));
|
|
324
324
|
}
|
|
325
325
|
function Oe(e, t, n, r) {
|
|
326
|
-
return N(e, "chart.grid.labels.yAxis.useNiceScale", !0) ?
|
|
326
|
+
return N(e, "chart.grid.labels.yAxis.useNiceScale", !0) ? y(t, n, r) : v(t, n, r);
|
|
327
327
|
}
|
|
328
328
|
function ke(e, t) {
|
|
329
329
|
let n = j(t.plots).map((e) => Number(e.value)).filter(Number.isFinite), r = N(e, "chart.grid.labels.yAxis.scaleMin", null), i = N(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);
|
|
@@ -361,21 +361,21 @@ 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 = N(n, "chart.grid.labels.axis.xLabel", ""), m = N(n, "chart.grid.labels.xAxisLabels.show", !0) ? o.xAxis * 2 : 0, h = (p ? o.yAxis * 1.5 : 0) + m + o.xAxis,
|
|
365
|
-
top: v +
|
|
366
|
-
right:
|
|
364
|
+
}, t) : { height: 0 }, d = l && c === "top" ? u.height : 0, f = l && c !== "top" ? u.height : 0, p = N(n, "chart.grid.labels.axis.xLabel", ""), m = N(n, "chart.grid.labels.xAxisLabels.show", !0) ? o.xAxis * 2 : 0, h = (p ? o.yAxis * 1.5 : 0) + m + o.xAxis, _ = gt(n) + O(N(n, "chart.labels.fontSize", 12), 12) * 1.1, v = O(N(n, "chart.padding.top", 12), 12), y = O(N(n, "chart.padding.right", 12), 12), b = O(N(n, "chart.padding.bottom", 12), 12), x = O(N(n, "chart.padding.left", 12), 12), ee = O(N(n, "chart.grid.labels.axis.xLabelOffsetY", 0), 0), S = O(N(n, "chart.grid.labels.yAxis.crosshairSize", 0), 0), C = s.left, te = s.right, ne = i - C - te - 6 - x - y, w = {
|
|
365
|
+
top: v + _ + d,
|
|
366
|
+
right: C + (J(n) ? 0 : S) + x + ne,
|
|
367
367
|
bottom: a - h - b - ee - f,
|
|
368
|
-
left:
|
|
369
|
-
width: Math.max(1,
|
|
368
|
+
left: C + (J(n) ? 0 : S) + x,
|
|
369
|
+
width: Math.max(1, ne),
|
|
370
370
|
height: 1,
|
|
371
|
-
scaleLabelX:
|
|
372
|
-
rightScaleLabelX:
|
|
371
|
+
scaleLabelX: C,
|
|
372
|
+
rightScaleLabelX: te,
|
|
373
373
|
scaleLabelsOffset: s.scaleLabelsOffset,
|
|
374
374
|
yAxisLabelWidth: s.yAxisLabelWidth,
|
|
375
375
|
individualOffsetX: 36
|
|
376
376
|
};
|
|
377
377
|
w.height = Math.max(1, w.bottom - w.top);
|
|
378
|
-
let T = Y(n), E = T ?
|
|
378
|
+
let T = Y(n), E = T ? g(t) : t, D = Math.max(1, E.length), re = T ? O(N(n, "chart.grid.labels.yAxis.gap", 12), 12) : 0, k = re * Math.max(0, D - 1), A = Math.max(1, w.height - k), M = R(n), ie = H(n, t), ae = Math.max(1, ...t.map((e) => j(e.plots).length));
|
|
379
379
|
function P(t, n) {
|
|
380
380
|
if (Z(e)) {
|
|
381
381
|
let n = Number(t.rawX);
|
|
@@ -708,13 +708,13 @@ function We(e, t) {
|
|
|
708
708
|
return n.left + n.width * o;
|
|
709
709
|
}
|
|
710
710
|
function Ge(e, t, n) {
|
|
711
|
-
let { config:
|
|
711
|
+
let { config: i } = e, a = r({
|
|
712
712
|
v: t,
|
|
713
|
-
p: N(
|
|
714
|
-
s: N(
|
|
715
|
-
r: N(
|
|
713
|
+
p: N(i, "chart.labels.prefix", ""),
|
|
714
|
+
s: N(i, "chart.labels.suffix", ""),
|
|
715
|
+
r: N(i, "chart.grid.labels.xAxis.rounding", 0)
|
|
716
716
|
});
|
|
717
|
-
return
|
|
717
|
+
return b(N(i, "chart.grid.labels.xAxis.formatter", null), t, a, {
|
|
718
718
|
datapoint: t,
|
|
719
719
|
seriesIndex: null
|
|
720
720
|
});
|
|
@@ -752,7 +752,7 @@ async function Je(e, t) {
|
|
|
752
752
|
start: 0,
|
|
753
753
|
end: i
|
|
754
754
|
}), s = a.map((e) => e?.text ?? ""), c = o.map((e) => e?.text ?? ""), l = Math.min(O(r.modulo, 1), Math.max(1, new Set(s).size));
|
|
755
|
-
return
|
|
755
|
+
return te(!!r.showOnlyFirstAndLast, !!r.showOnlyAtModulo, Math.max(1, l || 1), s, c, O(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,7 +761,7 @@ 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") ? O(N(e.config, "chart.grid.labels.xAxisLabels.rotation", 0), 0) : N(e.config, "chart.grid.labels.xAxisLabels.autoRotate.enable", !1) ? O(N(e.config, "chart.grid.labels.xAxisLabels.autoRotate.angle", 0), 0) : O(N(e.config, "chart.grid.labels.xAxisLabels.rotation", 0), 0);
|
|
765
765
|
}
|
|
766
766
|
async function Qe(t, n) {
|
|
767
767
|
let { config: r, drawingArea: i } = t;
|
|
@@ -885,17 +885,17 @@ function rt(e, t) {
|
|
|
885
885
|
return `areaGradient_${t}_${W()}`;
|
|
886
886
|
}
|
|
887
887
|
function it(e, t) {
|
|
888
|
-
let { config:
|
|
889
|
-
if (!N(
|
|
890
|
-
let i = O(N(
|
|
891
|
-
id: rt(e,
|
|
888
|
+
let { config: r } = e;
|
|
889
|
+
if (!N(r, "line.area.useGradient", !1)) return "";
|
|
890
|
+
let i = O(N(r, "line.area.opacity", 30), 30), a = t.filter((e) => e.type === "line" && e.useArea).map((t, r) => P("linearGradient", {
|
|
891
|
+
id: rt(e, r),
|
|
892
892
|
x1: "0%",
|
|
893
893
|
x2: "0%",
|
|
894
894
|
y1: "0%",
|
|
895
895
|
y2: "100%"
|
|
896
896
|
}, [k("stop", {
|
|
897
897
|
offset: "0%",
|
|
898
|
-
"stop-color":
|
|
898
|
+
"stop-color": n(o(T(t.color), .03), i),
|
|
899
899
|
"stop-opacity": 1
|
|
900
900
|
}), k("stop", {
|
|
901
901
|
offset: "100%",
|
|
@@ -904,26 +904,26 @@ function it(e, t) {
|
|
|
904
904
|
})].join(""))).join("");
|
|
905
905
|
return a ? P("defs", {}, a) : "";
|
|
906
906
|
}
|
|
907
|
-
function at(e,
|
|
907
|
+
function at(e, n) {
|
|
908
908
|
let { config: r } = e, i = !!N(r, "line.cutNullValues", !1), a = [];
|
|
909
|
-
return
|
|
910
|
-
let o = j(
|
|
909
|
+
return n.filter((e) => e.type === "line" && e.useArea).forEach((n, r) => {
|
|
910
|
+
let o = j(n.plots), s = o.filter((e) => e && e.value !== null);
|
|
911
911
|
if (s.length < 2) return;
|
|
912
|
-
let c = Number.isFinite(Number(
|
|
913
|
-
if (
|
|
914
|
-
|
|
912
|
+
let c = Number.isFinite(Number(n.__zeroY)) ? Number(n.__zeroY) : U(e), u = we(e, n, r);
|
|
913
|
+
if (n.smooth && !n.useStepper) {
|
|
914
|
+
l(i ? o : s, c, i).forEach((e) => {
|
|
915
915
|
e && a.push(k("path", {
|
|
916
916
|
d: e,
|
|
917
|
-
fill:
|
|
917
|
+
fill: u,
|
|
918
918
|
"data-cy": "datapoint-line-area-smooth"
|
|
919
919
|
}));
|
|
920
920
|
});
|
|
921
921
|
return;
|
|
922
922
|
}
|
|
923
|
-
(
|
|
923
|
+
(n.useStepper ? t(i ? o : s, c) : i ? p(o, c) : w(s, c)).split(";").filter(Boolean).forEach((e) => {
|
|
924
924
|
a.push(k("path", {
|
|
925
925
|
d: `M${e}Z`,
|
|
926
|
-
fill:
|
|
926
|
+
fill: u,
|
|
927
927
|
"data-cy": "datapoint-line-area-straight"
|
|
928
928
|
}));
|
|
929
929
|
});
|
|
@@ -945,23 +945,23 @@ 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: r } = e, i =
|
|
950
|
-
return i.forEach((
|
|
951
|
-
let u =
|
|
948
|
+
function ct(e, n) {
|
|
949
|
+
let { config: r } = e, i = n.filter((e) => e.type === "line"), o = !!N(r, "line.cutNullValues", !1), l = [];
|
|
950
|
+
return i.forEach((n, i) => {
|
|
951
|
+
let u = o ? j(n.plots) : j(n.plots).filter((e) => e.value !== null), d = u.filter((e) => e.value !== null);
|
|
952
952
|
if (!(d.length < 2)) {
|
|
953
|
-
if (j(
|
|
954
|
-
let
|
|
955
|
-
(
|
|
956
|
-
|
|
953
|
+
if (j(n.dashIndices).length > 0 && !n.useStepper) {
|
|
954
|
+
let t = ot(n, e);
|
|
955
|
+
(n.smooth || N(r, "line.smooth", !1) ? c(u, t) : f(u, t)).forEach((t) => {
|
|
956
|
+
t?.path && l.push(st(e, n, i, t.path, !!t.dashed));
|
|
957
957
|
});
|
|
958
958
|
return;
|
|
959
959
|
}
|
|
960
|
-
(
|
|
961
|
-
|
|
960
|
+
(n.useStepper ? t(u).split(";").filter(Boolean) : [n.smooth || N(r, "line.smooth", !1) ? o ? x(u) : ee(d) : o ? s(u) : a(d, !1, !0)]).forEach((t) => {
|
|
961
|
+
t && l.push(st(e, n, i, t, !!n.dashed));
|
|
962
962
|
});
|
|
963
963
|
}
|
|
964
|
-
}), P("g", { "data-layer": "lines" },
|
|
964
|
+
}), P("g", { "data-layer": "lines" }, l.join(""));
|
|
965
965
|
}
|
|
966
966
|
function lt(e, t, n) {
|
|
967
967
|
let { config: r } = e;
|
|
@@ -1038,7 +1038,7 @@ function ht(e, t) {
|
|
|
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
|
-
|
|
1041
|
+
_({
|
|
1042
1042
|
lineA: j(i.plots),
|
|
1043
1043
|
lineB: j(u.plots),
|
|
1044
1044
|
smoothA: !!i.smooth,
|
|
@@ -1094,19 +1094,19 @@ function vt(e) {
|
|
|
1094
1094
|
function yt(e, t, n, r, i) {
|
|
1095
1095
|
return !n || n.value === null || n.value === void 0 || !Number.isFinite(Number(n.value)) || !N(e.config, "dataLabels.show", !0) || !N(e.config, `${i}.labels.show`, !1) ? !1 : !Object.hasOwn(t, "dataLabels") || t.dataLabels === !0 || e.selectedSerieIndex === r || e.selectedMinimapIndex === r;
|
|
1096
1096
|
}
|
|
1097
|
-
function bt(t, n,
|
|
1098
|
-
let { config: o } = t, s = O(N(o, `${a}.labels.fontSize`, N(o, "chart.labels.fontSize", 12)), 12), c = N(o, `${a}.labels.color`, N(o, "chart.color", "#2A2A2A")), l =
|
|
1097
|
+
function bt(t, n, i, a) {
|
|
1098
|
+
let { config: o } = t, s = O(N(o, `${a}.labels.fontSize`, N(o, "chart.labels.fontSize", 12)), 12), c = N(o, `${a}.labels.color`, N(o, "chart.color", "#2A2A2A")), l = r({
|
|
1099
1099
|
p: n.prefix || N(o, "chart.labels.prefix", ""),
|
|
1100
|
-
v:
|
|
1100
|
+
v: i.value,
|
|
1101
1101
|
s: n.suffix || N(o, "chart.labels.suffix", ""),
|
|
1102
1102
|
r: N(o, `${a}.labels.rounding`, 0)
|
|
1103
1103
|
});
|
|
1104
1104
|
return e({
|
|
1105
|
-
content: Z(t) && Number.isFinite(Number(
|
|
1106
|
-
v:
|
|
1105
|
+
content: Z(t) && Number.isFinite(Number(i.x)) ? `x: ${r({
|
|
1106
|
+
v: i.x,
|
|
1107
1107
|
r: N(o, "chart.grid.labels.xAxis.rounding", 0)
|
|
1108
|
-
})}\ny: ${l}` :
|
|
1109
|
-
datapoint:
|
|
1108
|
+
})}\ny: ${l}` : b(N(o, `${a}.labels.formatter`, null), i.value, l, {
|
|
1109
|
+
datapoint: i,
|
|
1110
1110
|
serie: n
|
|
1111
1111
|
}),
|
|
1112
1112
|
fontSize: s,
|
|
@@ -1169,11 +1169,11 @@ function kt(e, t) {
|
|
|
1169
1169
|
function At(e, t, n, r, i, a) {
|
|
1170
1170
|
let { drawingArea: o } = e, s = t.caption ?? {};
|
|
1171
1171
|
if (!s.text) return "";
|
|
1172
|
-
let c = kt(e, a) * i, l = s.width === "auto" ? c : O(s.width, c), u = Ot(e, r, a) - (s.width === "auto" ? 0 : l / 2 - c / 2),
|
|
1172
|
+
let c = kt(e, a) * i, l = s.width === "auto" ? c : O(s.width, c), u = Ot(e, r, a) - (s.width === "auto" ? 0 : l / 2 - c / 2), f = o.top + O(s.offsetY, 0);
|
|
1173
1173
|
return P("foreignObject", {
|
|
1174
1174
|
"data-key": `highlight_area_caption_${n}`,
|
|
1175
1175
|
x: u,
|
|
1176
|
-
y:
|
|
1176
|
+
y: f,
|
|
1177
1177
|
width: l,
|
|
1178
1178
|
height: 1,
|
|
1179
1179
|
overflow: "visible"
|
|
@@ -1187,33 +1187,33 @@ function At(e, t, n, r, i, a) {
|
|
|
1187
1187
|
`color:${s.color || "#2A2A2A"}`,
|
|
1188
1188
|
`font-weight:${s.bold ? "bold" : "normal"}`
|
|
1189
1189
|
].join(";")
|
|
1190
|
-
},
|
|
1190
|
+
}, d(s.text)));
|
|
1191
1191
|
}
|
|
1192
1192
|
function jt(e, t) {
|
|
1193
|
-
let { config:
|
|
1194
|
-
if (!
|
|
1195
|
-
let
|
|
1196
|
-
return
|
|
1193
|
+
let { config: r, drawingArea: i } = e, a = j(N(r, "chart.highlightArea", []));
|
|
1194
|
+
if (!a.length) return "";
|
|
1195
|
+
let o = Math.max(1, ...t.map((e) => j(e.plots).length)), s = Tt(e), c = Et(e, t), l = [];
|
|
1196
|
+
return a.forEach((t, r) => {
|
|
1197
1197
|
if (!t?.show) return;
|
|
1198
|
-
let
|
|
1199
|
-
if (
|
|
1200
|
-
for (let
|
|
1201
|
-
if (
|
|
1202
|
-
let
|
|
1203
|
-
|
|
1198
|
+
let a = O(t.from, 0), u = Math.min(O(t.to, a), o - 1);
|
|
1199
|
+
if (u < a) return;
|
|
1200
|
+
for (let d = a; d <= u; d += 1) {
|
|
1201
|
+
if (d < s || d > c - 1) continue;
|
|
1202
|
+
let a = d - s;
|
|
1203
|
+
l.push(k("rect", {
|
|
1204
1204
|
"data-cy": "highlight-area",
|
|
1205
|
-
"data-key": `highlight_area_${
|
|
1206
|
-
x: Ot(e,
|
|
1207
|
-
y:
|
|
1208
|
-
width: kt(e,
|
|
1209
|
-
height: Math.max(1,
|
|
1210
|
-
fill:
|
|
1205
|
+
"data-key": `highlight_area_${r}_${d}`,
|
|
1206
|
+
x: Ot(e, a, o),
|
|
1207
|
+
y: i.top,
|
|
1208
|
+
width: kt(e, o),
|
|
1209
|
+
height: Math.max(1, i.height),
|
|
1210
|
+
fill: n(t.color, O(t.opacity, 20)),
|
|
1211
1211
|
"pointer-events": "none"
|
|
1212
1212
|
}));
|
|
1213
1213
|
}
|
|
1214
|
-
let
|
|
1215
|
-
|
|
1216
|
-
}),
|
|
1214
|
+
let d = Math.max(a, s);
|
|
1215
|
+
d <= Math.min(u, c - 1) && l.push(At(e, t, r, d - s, u - a + 1, o));
|
|
1216
|
+
}), l.length ? P("g", { "data-layer": "highlight-areas" }, l.join("")) : "";
|
|
1217
1217
|
}
|
|
1218
1218
|
function Mt(e, t) {
|
|
1219
1219
|
if (t == null) return null;
|
|
@@ -1238,64 +1238,64 @@ function Pt(e, t, n) {
|
|
|
1238
1238
|
};
|
|
1239
1239
|
}
|
|
1240
1240
|
function Ft(e) {
|
|
1241
|
-
let { config: t, drawingArea:
|
|
1241
|
+
let { config: t, drawingArea: r } = e;
|
|
1242
1242
|
if (Y(t)) return "";
|
|
1243
|
-
let
|
|
1244
|
-
if (!
|
|
1245
|
-
let
|
|
1246
|
-
return
|
|
1247
|
-
let
|
|
1243
|
+
let i = j(N(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
|
+
if (!i.length) return "";
|
|
1245
|
+
let a = [];
|
|
1246
|
+
return i.forEach((t, i) => {
|
|
1247
|
+
let o = t.yAxis ?? {}, s = o.label ?? {}, c = o.line ?? {}, l = o.area ?? {}, u = o.yTop, d = o.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
1250
|
if (h && _.push(k("line", {
|
|
1251
|
-
x1:
|
|
1252
|
-
y1:
|
|
1253
|
-
x2:
|
|
1254
|
-
y2:
|
|
1255
|
-
stroke:
|
|
1256
|
-
"stroke-width":
|
|
1257
|
-
"stroke-dasharray":
|
|
1251
|
+
x1: r.left,
|
|
1252
|
+
y1: p,
|
|
1253
|
+
x2: r.right,
|
|
1254
|
+
y2: p,
|
|
1255
|
+
stroke: c.stroke,
|
|
1256
|
+
"stroke-width": c.strokeWidth,
|
|
1257
|
+
"stroke-dasharray": c.strokeDasharray,
|
|
1258
1258
|
"stroke-linecap": "round",
|
|
1259
1259
|
"data-cy": "xy-annotation-y-top-line"
|
|
1260
1260
|
})), g && _.push(k("line", {
|
|
1261
|
-
x1:
|
|
1261
|
+
x1: r.left,
|
|
1262
1262
|
y1: m,
|
|
1263
|
-
x2:
|
|
1263
|
+
x2: r.right,
|
|
1264
1264
|
y2: m,
|
|
1265
|
-
stroke:
|
|
1266
|
-
"stroke-width":
|
|
1267
|
-
"stroke-dasharray":
|
|
1265
|
+
stroke: c.stroke,
|
|
1266
|
+
"stroke-width": c.strokeWidth,
|
|
1267
|
+
"stroke-dasharray": c.strokeDasharray,
|
|
1268
1268
|
"stroke-linecap": "round",
|
|
1269
1269
|
"data-cy": "xy-annotation-y-bottom-line"
|
|
1270
|
-
})),
|
|
1271
|
-
x:
|
|
1272
|
-
y: Math.min(
|
|
1273
|
-
width:
|
|
1274
|
-
height: Math.abs(
|
|
1275
|
-
fill:
|
|
1270
|
+
})), f && h && g && _.push(k("rect", {
|
|
1271
|
+
x: r.left,
|
|
1272
|
+
y: Math.min(p, m),
|
|
1273
|
+
width: r.width,
|
|
1274
|
+
height: Math.abs(p - m),
|
|
1275
|
+
fill: n(l.fill, O(l.opacity, 20)),
|
|
1276
1276
|
"data-cy": "xy-annotation-y-area",
|
|
1277
1277
|
"pointer-events": "none"
|
|
1278
|
-
})),
|
|
1279
|
-
let e =
|
|
1278
|
+
})), s.text) {
|
|
1279
|
+
let e = s.padding ?? {}, t = h && g ? Math.min(p, m) : h ? p : m, n = (s.position === "start" ? r.left + O(e.left, 0) : r.right - O(e.right, 0)) + O(s.offsetX, 0), i = t - O(s.fontSize, 12) / 3 + O(s.offsetY, 0) - O(e.top, 0), a = Pt(s, n, i);
|
|
1280
1280
|
Number.isFinite(a.y) && Number.isFinite(i) && (_.push(k("rect", {
|
|
1281
1281
|
class: "vue-ui-xy-annotation-label-box",
|
|
1282
1282
|
...a,
|
|
1283
1283
|
"data-cy": "xy-annotation-label-box"
|
|
1284
|
-
})), _.push(F(
|
|
1284
|
+
})), _.push(F(s.text, {
|
|
1285
1285
|
class: "vue-ui-xy-annotation-label",
|
|
1286
|
-
x:
|
|
1286
|
+
x: n,
|
|
1287
1287
|
y: i,
|
|
1288
|
-
"font-size":
|
|
1289
|
-
fill:
|
|
1290
|
-
"text-anchor":
|
|
1288
|
+
"font-size": s.fontSize,
|
|
1289
|
+
fill: s.color,
|
|
1290
|
+
"text-anchor": s.textAnchor,
|
|
1291
1291
|
"data-cy": "xy-annotation-label"
|
|
1292
1292
|
})));
|
|
1293
1293
|
}
|
|
1294
|
-
|
|
1294
|
+
a.push(P("g", {
|
|
1295
1295
|
"data-layer": "annotation",
|
|
1296
|
-
"data-key": `annotation_y_${
|
|
1296
|
+
"data-key": `annotation_y_${i}`
|
|
1297
1297
|
}, _.join("")));
|
|
1298
|
-
}),
|
|
1298
|
+
}), a.length ? P("g", { "data-layer": "annotations" }, a.join("")) : "";
|
|
1299
1299
|
}
|
|
1300
1300
|
function It(e, t) {
|
|
1301
1301
|
let n = e.additionalSvgContent;
|
|
@@ -1326,7 +1326,7 @@ async function Lt(e) {
|
|
|
1326
1326
|
}, i), o = a.series;
|
|
1327
1327
|
return `
|
|
1328
1328
|
<svg
|
|
1329
|
-
xmlns="${
|
|
1329
|
+
xmlns="${ne}"
|
|
1330
1330
|
width="100%"
|
|
1331
1331
|
viewBox="0 0 ${n} ${r}"
|
|
1332
1332
|
role="img"
|