vue-data-ui 3.15.12 → 3.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -59
- package/dist/A11yDataTable-KcVAX2cP.js +54 -0
- package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
- package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
- package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
- package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
- package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
- package/dist/ColorPicker-B0mV4xzu.js +255 -0
- package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
- package/dist/Legend-CS7Xo5LK.js +101 -0
- package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
- package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
- package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
- package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
- package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
- package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
- package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
- package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
- package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
- package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
- 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-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
- package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
- package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
- package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
- package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
- package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +59 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
- package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
- package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
- package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
- package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
- package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
- package/dist/vue-data-ui.js +72 -72
- package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
- package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
- package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
- package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
- package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
- package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
- package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
- package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
- package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
- package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
- package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
- package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
- package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
- package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
- package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
- package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
- package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
- package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
- package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
- package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
- package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
- package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
- package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
- package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
- package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
- package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
- package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
- package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
- package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
- package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
- package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
- package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
- package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
- package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
- package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
- package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
- package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
- package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
- package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
- package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
- package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
- package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
- package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
- package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
- package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
- package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
- package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
- package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
- package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
- package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
- package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
- package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
- package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
- package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
- package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
- package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
- package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
- package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
- package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
- package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
- package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
- package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
- package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
- package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
- package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
- package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
- package/package.json +2 -2
- package/dist/ColorPicker-j0ySewhI.js +0 -244
- package/dist/Legend-1LMMsPxL.js +0 -90
- package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
- package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
- package/dist/vue-ui-bump-C_fKharc.js +0 -1059
- package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
- package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
- package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
- package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
- package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
- package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
- package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
- package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
- package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
- package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
- package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
- package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
- package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
- package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
- package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
- package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
- package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
- package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
- package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
- package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
- package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
- package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
- package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
- package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
- package/dist/vue-ui-rings-80ZUki42.js +0 -1083
- package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
- package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
- package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
- package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
- package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
- package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
- package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
- package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
- package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
- package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
- package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
- package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
- package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
- package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
- package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
|
@@ -0,0 +1,2164 @@
|
|
|
1
|
+
import { defineAsyncComponent as ke, useSlots as gs, computed as f, ref as h, shallowRef as qt, onMounted as ps, toRefs as bs, watch as Fe, onBeforeUnmount as Xt, nextTick as Gt, watchEffect as pt, openBlock as i, createElementBlock as v, normalizeStyle as ge, normalizeClass as tl, createElementVNode as le, toDisplayString as fe, createBlock as oe, createCommentVNode as x, unref as C, withCtx as P, renderSlot as N, normalizeProps as ee, guardReactiveProps as te, createSlots as jt, createVNode as Ze, Fragment as F, renderList as X, mergeProps as bt, Teleport as xs, resolveDynamicComponent as ks, createTextVNode as al } from "vue";
|
|
2
|
+
import { j as ll, t as sl, m as ws, p as xt, n as Ss, o as ol, q as nl, r as Ms, s as $s, ar as Qe, E as kt, D as wt, I as Cs, c as we, b as Se, F as Ls, T as As, U as Ts, k as et, l as Ce, G as tt, X as Ns, x as Ps, u as Is, K as rl, a0 as zs, a1 as _s, z as Fs, A as at, a3 as Es } from "./lib-DBptbyyI.js";
|
|
3
|
+
import { t as Rs, u as Os } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as il, a as ul, b as Ds } from "./useTimeLabels-C-A2uZKi.js";
|
|
5
|
+
import { u as Vs } from "./useConfig-DO94Aj5s.js";
|
|
6
|
+
import { u as Bs, B as Ys } from "./BaseScanner-BhhkKVoj.js";
|
|
7
|
+
import { u as Hs } from "./usePrinter-CEpYU3r5.js";
|
|
8
|
+
import { u as Ws } from "./useSvgExport-ByUukOZt.js";
|
|
9
|
+
import { u as Jt } from "./useNestedProp-Bf5XFbs8.js";
|
|
10
|
+
import { u as Us } from "./useThemeCheck-D1ZYXUwG.js";
|
|
11
|
+
import { u as qs } from "./useStableElementSize-DCNs0Tx7.js";
|
|
12
|
+
import { u as Xs } from "./useChartAccessibility-9icAAmYg.js";
|
|
13
|
+
import { u as Gs } from "./useTimeLabelCollider-CIsgDrl9.js";
|
|
14
|
+
import { u as js } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
+
import Js from "./img-LXxMLmCg.js";
|
|
16
|
+
import { _ as Kt } from "./Shape-BKRUOeKk.js";
|
|
17
|
+
import Ks from "./Title-BeMKE1cj.js";
|
|
18
|
+
import Zs from "./vue_ui_stackline-QTh-nuxE.js";
|
|
19
|
+
import Qs from "./Legend-CS7Xo5LK.js";
|
|
20
|
+
import { A as eo } from "./A11yDataTable-KcVAX2cP.js";
|
|
21
|
+
import { S as to } from "./SlicerPreview-DTjwV0iY.js";
|
|
22
|
+
import { B as ao } from "./BaseLegendToggle-BQVIawmA.js";
|
|
23
|
+
import { _ as lo } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
24
|
+
const so = ["id"], oo = ["id"], no = ["id"], ro = { style: { position: "relative" } }, io = ["aria-describedby", "xmlns", "viewBox"], uo = { key: 0 }, co = ["x", "y", "width", "height"], vo = { key: 1 }, ho = ["id"], mo = ["stop-color"], fo = ["stop-color"], yo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], go = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], po = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], bo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], xo = ["x", "y", "font-size", "fill", "font-weight"], ko = ["transform", "font-size", "fill", "font-weight"], wo = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], So = ["d", "fill", "opacity"], Mo = ["d", "stroke", "stroke-width"], $o = ["x1", "x2", "y1", "y2", "stroke"], Co = ["x", "y", "font-size", "font-weight", "fill"], Lo = { key: 0 }, Ao = { key: 1 }, To = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], No = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], Po = ["x", "y", "height", "width", "fill"], Io = { key: 0 }, zo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], _o = { key: 0 }, Fo = ["x", "y", "font-size", "fill", "font-weight"], Eo = ["x", "y", "font-size", "font-weight", "fill"], Ro = ["data-start", "data-end"], Oo = {
|
|
25
|
+
key: 0,
|
|
26
|
+
style: { position: "absolute", top: "100%", left: "0", width: "100%" },
|
|
27
|
+
"data-dom-to-png-ignore": "",
|
|
28
|
+
"aria-hidden": "true"
|
|
29
|
+
}, Do = {
|
|
30
|
+
key: 5,
|
|
31
|
+
class: "vue-data-ui-watermark"
|
|
32
|
+
}, Vo = ["onClick"], Bo = ["innerHTML"], Yo = ["innerHTML"], Ho = ["id"], Wo = {
|
|
33
|
+
__name: "vue-ui-stackline",
|
|
34
|
+
props: {
|
|
35
|
+
config: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default() {
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
dataset: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default() {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
selectedXIndex: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: void 0
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
emits: ["selectDatapoint", "selectLegend", "selectTimeLabel", "selectX", "copyAlt"],
|
|
53
|
+
setup(St, { expose: cl, emit: vl }) {
|
|
54
|
+
const dl = ke(() => import("./Tooltip-Bf-kM3_A.js")), hl = ke(() => import("./BaseIcon-Cb3zzG6s.js")), ml = ke(() => import("./vue-ui-accordion-nvggWcGN.js")), fl = ke(() => import("./DataTable-DT2kIdQ6.js")), yl = ke(() => import("./PenAndPaper-Ct3qJ4lA.js")), gl = ke(() => import("./UserOptions-rW2fRf3V.js")), pl = ke(() => import("./PackageVersion-DPO-OOVI.js")), bl = ke(() => import("./BaseDraggableDialog-CIb-iD9g.js")), { vue_ui_stackline: xl } = Vs(), { isThemeValid: kl, warnInvalidTheme: wl } = Us(), Zt = gs(), G = St, ye = vl, Ee = f({
|
|
55
|
+
get() {
|
|
56
|
+
return !!G.dataset && G.dataset.length;
|
|
57
|
+
},
|
|
58
|
+
set(t) {
|
|
59
|
+
return t;
|
|
60
|
+
}
|
|
61
|
+
}), ue = h(null), K = h(ll()), Re = h(!1), Qt = h(null), D = h([]), ea = h(0), ta = h(null), aa = h(null), Oe = h(null), la = h(null), sa = h(null), De = h(!1), Mt = h(!1), oa = h(0), Sl = h(0), Ml = h(0), na = h(!1), Ve = h(null), $t = h(null), Le = h(!1), lt = h(!1), st = h(!1), ot = h(null), Ct = h(null), Lt = h(null), nt = h(null), $l = h(null), ra = qt(null), ia = h(!1), ua = h(0), ca = h(0), ce = h(null), va = h({ x: 0, y: 0 }), Be = h("pointer"), da = qs({
|
|
62
|
+
elementRef: ra,
|
|
63
|
+
minimumWidth: 2,
|
|
64
|
+
minimumHeight: 2,
|
|
65
|
+
stableFramesRequired: 2,
|
|
66
|
+
once: !1,
|
|
67
|
+
onSizeAccepted: () => {
|
|
68
|
+
rt();
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
function At() {
|
|
72
|
+
ra.value = ue.value?.parentNode ?? null;
|
|
73
|
+
}
|
|
74
|
+
function ha() {
|
|
75
|
+
return new Promise((t) => {
|
|
76
|
+
requestAnimationFrame(() => {
|
|
77
|
+
requestAnimationFrame(t);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
async function rt() {
|
|
82
|
+
const t = ++ca.value;
|
|
83
|
+
ia.value = !1, await Gt(), await ha(), await ha(), t === ca.value && (ua.value += 1, ia.value = !0);
|
|
84
|
+
}
|
|
85
|
+
const Ye = h(null), Ae = h(!1);
|
|
86
|
+
function Tt() {
|
|
87
|
+
Ae.value = !Ae.value;
|
|
88
|
+
}
|
|
89
|
+
ps(() => {
|
|
90
|
+
At(), da.start(), na.value = !0, ka(), rt();
|
|
91
|
+
});
|
|
92
|
+
const e = h(It()), ve = f(() => e.value.userOptions.useCursorPointer), Cl = f(() => sl({
|
|
93
|
+
defaultConfig: {
|
|
94
|
+
userOptions: { show: !1 },
|
|
95
|
+
useCssAnimation: !1,
|
|
96
|
+
table: { show: !1 },
|
|
97
|
+
tooltip: { show: !1 },
|
|
98
|
+
style: {
|
|
99
|
+
chart: {
|
|
100
|
+
backgroundColor: "#99999930",
|
|
101
|
+
lines: {
|
|
102
|
+
totalValues: { show: !1 },
|
|
103
|
+
dataLabels: { show: !1 }
|
|
104
|
+
},
|
|
105
|
+
grid: {
|
|
106
|
+
frame: {
|
|
107
|
+
stroke: "#6A6A6A"
|
|
108
|
+
},
|
|
109
|
+
scale: {
|
|
110
|
+
scaleMin: 0,
|
|
111
|
+
scaleMax: 144
|
|
112
|
+
},
|
|
113
|
+
x: {
|
|
114
|
+
axisColor: "#6A6A6A",
|
|
115
|
+
linesColor: "#6A6A6A",
|
|
116
|
+
axisName: { show: !1 },
|
|
117
|
+
timeLabels: { show: !1 }
|
|
118
|
+
},
|
|
119
|
+
y: {
|
|
120
|
+
axisColor: "#6A6A6A",
|
|
121
|
+
linesColor: "#6A6A6A",
|
|
122
|
+
axisName: { show: !1 },
|
|
123
|
+
axisLabels: { show: !1 }
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
legend: {
|
|
127
|
+
backgroundColor: "transparent"
|
|
128
|
+
},
|
|
129
|
+
padding: {
|
|
130
|
+
left: 24,
|
|
131
|
+
right: 24,
|
|
132
|
+
bottom: 12
|
|
133
|
+
},
|
|
134
|
+
zoom: {
|
|
135
|
+
show: !1,
|
|
136
|
+
startIndex: null,
|
|
137
|
+
endIndex: null
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
userConfig: e.value.skeletonConfig ?? {}
|
|
143
|
+
})), { loading: de, FINAL_DATASET: Nt, manualLoading: it } = Bs({
|
|
144
|
+
...bs(G),
|
|
145
|
+
FINAL_CONFIG: e,
|
|
146
|
+
prepareConfig: It,
|
|
147
|
+
callback: () => {
|
|
148
|
+
Promise.resolve().then(async () => {
|
|
149
|
+
await mt();
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
skeletonDataset: G.config?.skeletonDataset ?? [
|
|
153
|
+
{
|
|
154
|
+
name: "",
|
|
155
|
+
series: [3, 2, 1, 5, 13, 21, 8, 89, 34, 55],
|
|
156
|
+
color: "#8A8A8A"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "",
|
|
160
|
+
series: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89],
|
|
161
|
+
color: "#CACACA"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
skeletonConfig: sl({
|
|
165
|
+
defaultConfig: e.value,
|
|
166
|
+
userConfig: Cl.value
|
|
167
|
+
})
|
|
168
|
+
}), { userOptionsVisible: Pt, setUserOptionsVisibility: ma, keepUserOptionState: fa } = js({ config: e.value }), { svgRef: he } = Xs({ config: e.value.style.chart.title });
|
|
169
|
+
function Ll() {
|
|
170
|
+
Le.value = !0, ma(!0);
|
|
171
|
+
}
|
|
172
|
+
function Al() {
|
|
173
|
+
ma(!1), Le.value = !1, ce.value = null, Be.value = "pointer", Re.value = !1, b.value = null, ye("selectX", { seriesIndex: null, datapoint: null });
|
|
174
|
+
}
|
|
175
|
+
function It() {
|
|
176
|
+
const t = Jt({
|
|
177
|
+
userConfig: G.config,
|
|
178
|
+
defaultConfig: xl
|
|
179
|
+
});
|
|
180
|
+
let l = {};
|
|
181
|
+
const a = t.theme;
|
|
182
|
+
if (a)
|
|
183
|
+
if (!kl.value(t))
|
|
184
|
+
wl(t), l = t;
|
|
185
|
+
else {
|
|
186
|
+
const s = Jt({
|
|
187
|
+
userConfig: Zs[a] || G.config,
|
|
188
|
+
defaultConfig: t
|
|
189
|
+
});
|
|
190
|
+
l = {
|
|
191
|
+
...Jt({
|
|
192
|
+
userConfig: G.config,
|
|
193
|
+
defaultConfig: s
|
|
194
|
+
}),
|
|
195
|
+
customPalette: t.customPalette.length ? t.customPalette : ws[a] || xt
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
else
|
|
199
|
+
l = t;
|
|
200
|
+
return l;
|
|
201
|
+
}
|
|
202
|
+
const ya = f(() => e.value.style.chart.lines.dataLabels.hideUnderValue !== null), ga = f(() => e.value.style.chart.lines.dataLabels.hideUnderPercentage !== null);
|
|
203
|
+
Fe(() => G.config, (t) => {
|
|
204
|
+
de.value || (e.value = It()), Pt.value = !e.value.userOptions.showOnChartHover, ka(), oa.value += 1, Sl.value += 1, Ml.value += 1, j.value.dataLabels.show = e.value.style.chart.lines.dataLabels.show, j.value.showTable = e.value.table.show, j.value.showTooltip = e.value.style.chart.tooltip.show, ne.value.width = e.value.style.chart.width, ne.value.height = e.value.style.chart.height, ne.value.paddingRatio = {
|
|
205
|
+
top: e.value.style.chart.padding.top / e.value.style.chart.height,
|
|
206
|
+
right: e.value.style.chart.padding.right / e.value.style.chart.width,
|
|
207
|
+
bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
|
|
208
|
+
left: e.value.style.chart.padding.left / e.value.style.chart.width
|
|
209
|
+
}, At(), rt(), ct();
|
|
210
|
+
}, { deep: !0 }), Fe(() => G.dataset, (t) => {
|
|
211
|
+
Array.isArray(t) && t.length > 0 && (it.value = !1), $a(), At(), rt();
|
|
212
|
+
}, { deep: !0 });
|
|
213
|
+
const j = h({
|
|
214
|
+
dataLabels: {
|
|
215
|
+
show: e.value.style.chart.lines.dataLabels.show
|
|
216
|
+
},
|
|
217
|
+
showTable: e.value.table.show,
|
|
218
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
219
|
+
});
|
|
220
|
+
Fe(e, () => {
|
|
221
|
+
j.value = {
|
|
222
|
+
dataLabels: {
|
|
223
|
+
show: e.value.style.chart.lines.dataLabels.show
|
|
224
|
+
},
|
|
225
|
+
showTable: e.value.table.show,
|
|
226
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
227
|
+
};
|
|
228
|
+
}, { immediate: !0 });
|
|
229
|
+
const { isPrinting: zt, isImaging: _t, generatePdf: pa, generateImage: ba } = Hs({
|
|
230
|
+
elementId: `stackline_${K.value}`,
|
|
231
|
+
fileName: e.value.style.chart.title.text || "vue-ui-stackline",
|
|
232
|
+
options: e.value.userOptions.print
|
|
233
|
+
}), Tl = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), ne = h({
|
|
234
|
+
width: e.value.style.chart.width,
|
|
235
|
+
height: e.value.style.chart.height,
|
|
236
|
+
paddingRatio: {
|
|
237
|
+
top: e.value.style.chart.padding.top / e.value.style.chart.height,
|
|
238
|
+
right: e.value.style.chart.padding.right / e.value.style.chart.width,
|
|
239
|
+
bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
|
|
240
|
+
left: e.value.style.chart.padding.left / e.value.style.chart.width
|
|
241
|
+
}
|
|
242
|
+
}), Nl = f(() => Ss(e.value.customPalette)), pe = qt(null), Te = qt(null), xa = h(null), Ft = f(() => !!e.value.debug);
|
|
243
|
+
function ka() {
|
|
244
|
+
if (ol(G.dataset) ? (nl({
|
|
245
|
+
componentName: "VueUiStackline",
|
|
246
|
+
type: "dataset",
|
|
247
|
+
debug: Ft.value
|
|
248
|
+
}), it.value = !0) : G.dataset.forEach((t, l) => {
|
|
249
|
+
Ms({
|
|
250
|
+
datasetObject: t,
|
|
251
|
+
requiredAttributes: ["name", "series"]
|
|
252
|
+
}).forEach((a) => {
|
|
253
|
+
Ee.value = !1, nl({
|
|
254
|
+
componentName: "VueUiStackline",
|
|
255
|
+
type: "datasetSerieAttribute",
|
|
256
|
+
property: a,
|
|
257
|
+
index: l,
|
|
258
|
+
debug: Ft.value
|
|
259
|
+
}), it.value = !0;
|
|
260
|
+
});
|
|
261
|
+
}), ol(G.dataset) || (it.value = e.value.loading), setTimeout(() => {
|
|
262
|
+
Mt.value = !0;
|
|
263
|
+
}, 10), e.value.responsive) {
|
|
264
|
+
const t = Rs(() => {
|
|
265
|
+
Mt.value = !1;
|
|
266
|
+
const { width: l, height: a } = Os({
|
|
267
|
+
chart: ue.value,
|
|
268
|
+
noTitle: la.value,
|
|
269
|
+
title: e.value.style.chart.title.text ? ta.value : null,
|
|
270
|
+
legend: e.value.style.chart.legend.show ? aa.value : null,
|
|
271
|
+
slicer: e.value.style.chart.zoom.show && me.value > 6 ? Oe.value.$el : null,
|
|
272
|
+
source: sa.value
|
|
273
|
+
});
|
|
274
|
+
requestAnimationFrame(() => {
|
|
275
|
+
ne.value.width = l, ne.value.height = a - 12, clearTimeout(xa.value), xa.value = setTimeout(() => {
|
|
276
|
+
Mt.value = !0;
|
|
277
|
+
}, 10);
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
pe.value && (Te.value && pe.value.unobserve(Te.value), pe.value.disconnect()), pe.value = new ResizeObserver(t), Te.value = ue.value.parentNode, pe.value.observe(Te.value);
|
|
281
|
+
}
|
|
282
|
+
mt();
|
|
283
|
+
}
|
|
284
|
+
Xt(() => {
|
|
285
|
+
da.stop(), pe.value && (Te.value && pe.value.unobserve(Te.value), pe.value.disconnect());
|
|
286
|
+
});
|
|
287
|
+
function Pl() {
|
|
288
|
+
let t = 0;
|
|
289
|
+
Lt.value && (t = Array.from(Lt.value.querySelectorAll("text")).reduce((s, n) => {
|
|
290
|
+
const o = n.getComputedTextLength();
|
|
291
|
+
return o > s ? o : s;
|
|
292
|
+
}, 0));
|
|
293
|
+
const l = Ct.value ? Ct.value.getBoundingClientRect().width : 0;
|
|
294
|
+
return t + l + (l ? 24 : 0);
|
|
295
|
+
}
|
|
296
|
+
const Et = h(0), He = h(0), We = h(0);
|
|
297
|
+
function Il() {
|
|
298
|
+
const t = nt.value;
|
|
299
|
+
if (!t) {
|
|
300
|
+
He.value = 0;
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
try {
|
|
304
|
+
const l = t.getBBox();
|
|
305
|
+
He.value = Number.isFinite(l?.height) ? l.height : 0;
|
|
306
|
+
} catch {
|
|
307
|
+
He.value = 0;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function zl() {
|
|
311
|
+
We.value && cancelAnimationFrame(We.value), We.value = requestAnimationFrame(() => {
|
|
312
|
+
requestAnimationFrame(() => {
|
|
313
|
+
Il();
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
Xt(() => {
|
|
318
|
+
We.value && cancelAnimationFrame(We.value), He.value = 0, Et.value = 0;
|
|
319
|
+
});
|
|
320
|
+
const wa = f(() => {
|
|
321
|
+
let t = 0;
|
|
322
|
+
if (ot.value)
|
|
323
|
+
try {
|
|
324
|
+
t = ot.value.getBBox().height;
|
|
325
|
+
} catch {
|
|
326
|
+
t = 0;
|
|
327
|
+
}
|
|
328
|
+
const l = e.value.style.chart.grid.x.timeLabels.show ? He.value : 0;
|
|
329
|
+
return t + l;
|
|
330
|
+
}), d = f(() => {
|
|
331
|
+
ua.value;
|
|
332
|
+
const { height: t, width: l } = ne.value, { right: a } = ne.value.paddingRatio;
|
|
333
|
+
let s = e.value.style.chart.lines.totalValues.show && G.dataset && G.dataset.length > 1 ? e.value.style.chart.lines.totalValues.fontSize * 1.3 : 0, n = 0;
|
|
334
|
+
e.value.style.chart.grid.y.axisLabels.show && (n = Pl());
|
|
335
|
+
const o = e.value.style.chart.padding.top + s, r = l - l * a - Et.value, y = t - e.value.style.chart.padding.bottom - wa.value - s, k = e.value.style.chart.padding.left + n, A = l - k - l * a - Et.value, S = t - o - e.value.style.chart.padding.bottom - wa.value - s;
|
|
336
|
+
return {
|
|
337
|
+
chartHeight: Math.max(0, t),
|
|
338
|
+
chartWidth: Math.max(0, l),
|
|
339
|
+
top: o,
|
|
340
|
+
right: Math.max(0, r),
|
|
341
|
+
bottom: Math.max(0, y),
|
|
342
|
+
left: Math.max(0, k),
|
|
343
|
+
width: Math.max(0, A),
|
|
344
|
+
height: Math.max(0, S)
|
|
345
|
+
};
|
|
346
|
+
}), _l = f(() => {
|
|
347
|
+
const { left: t, top: l, width: a, height: s } = d.value, n = c.value.start, o = c.value.end, r = Math.max(1, o - n), y = Math.max(0, Math.min(r, (re.value.start ?? n) - n)), k = Math.max(0, Math.min(r, (re.value.end ?? o) - n)), A = Math.max(0, k - y), S = {
|
|
348
|
+
fill: e.value.style.chart.zoom.preview.fill,
|
|
349
|
+
stroke: e.value.style.chart.zoom.preview.stroke,
|
|
350
|
+
"stroke-width": e.value.style.chart.zoom.preview.strokeWidth,
|
|
351
|
+
"stroke-dasharray": e.value.style.chart.zoom.preview.strokeDasharray,
|
|
352
|
+
"stroke-linecap": "round",
|
|
353
|
+
"stroke-linejoin": "round",
|
|
354
|
+
style: {
|
|
355
|
+
pointerEvents: "none",
|
|
356
|
+
transition: "none !important",
|
|
357
|
+
animation: "none !important"
|
|
358
|
+
}
|
|
359
|
+
}, I = a / r;
|
|
360
|
+
return {
|
|
361
|
+
x: t + y * I,
|
|
362
|
+
y: l,
|
|
363
|
+
width: A * I,
|
|
364
|
+
height: s,
|
|
365
|
+
...S
|
|
366
|
+
};
|
|
367
|
+
}), Z = f(() => Nt.value.map((t, l) => {
|
|
368
|
+
const a = $s(t.color) || Nl.value[l] || xt[l] || xt[l % xt.length];
|
|
369
|
+
return {
|
|
370
|
+
...t,
|
|
371
|
+
shape: t.shape || "circle",
|
|
372
|
+
standalone: !!t.standalone,
|
|
373
|
+
// In distributed mode, all values are converted to positive
|
|
374
|
+
series: JSON.parse(JSON.stringify(t.series)).map((s) => e.value.style.chart.lines.distributed ? Math.abs(s) : s),
|
|
375
|
+
seriesSource: t.series,
|
|
376
|
+
// Store signs to manage display of neg values in distributed mode
|
|
377
|
+
signedSeries: t.series.map((s) => s >= 0 ? 1 : -1),
|
|
378
|
+
absoluteIndex: l,
|
|
379
|
+
id: ll(),
|
|
380
|
+
color: a
|
|
381
|
+
};
|
|
382
|
+
})), Me = f(
|
|
383
|
+
() => Z.value.filter((t) => !D.value.includes(t.id) && !t.standalone)
|
|
384
|
+
), ut = f(
|
|
385
|
+
() => Z.value.filter((t) => !D.value.includes(t.id) && t.standalone)
|
|
386
|
+
), me = f(() => {
|
|
387
|
+
const t = Math.max(...Z.value.filter((l) => !D.value.includes(l.id)).map((l) => l.series.length));
|
|
388
|
+
return isFinite(t) ? t : Math.max(...Z.value.map((l) => l.series.length));
|
|
389
|
+
});
|
|
390
|
+
function Fl(t) {
|
|
391
|
+
Ye.value = t;
|
|
392
|
+
}
|
|
393
|
+
const c = h({
|
|
394
|
+
start: 0,
|
|
395
|
+
end: Math.max(...Nt.value.map((t) => t.series.length))
|
|
396
|
+
}), re = h({ start: 0, end: Math.max(...Nt.value.map((t) => t.series.length)) });
|
|
397
|
+
function Rt(t) {
|
|
398
|
+
return (c.value.start ?? 0) + (t ?? 0);
|
|
399
|
+
}
|
|
400
|
+
const Sa = f(() => e.value.style.chart.zoom.preview.enable && (re.value.start !== c.value.start || re.value.end !== c.value.end));
|
|
401
|
+
function Ma(t, l) {
|
|
402
|
+
re.value[t] = l;
|
|
403
|
+
}
|
|
404
|
+
function ct() {
|
|
405
|
+
const t = me.value;
|
|
406
|
+
let l = Math.max(0, Math.min(c.value.start ?? 0, t - 1)), a = Math.max(l + 1, Math.min(c.value.end ?? t, t));
|
|
407
|
+
(!Number.isFinite(l) || !Number.isFinite(a) || a <= l) && (l = 0, a = t), c.value.start = l, c.value.end = a, re.value.start = l, re.value.end = a, Oe.value && (Oe.value.setStartValue(l), Oe.value.setEndValue(a));
|
|
408
|
+
}
|
|
409
|
+
const Ue = h(null);
|
|
410
|
+
function El() {
|
|
411
|
+
return new Promise((t) => requestAnimationFrame(
|
|
412
|
+
() => requestAnimationFrame(() => t())
|
|
413
|
+
));
|
|
414
|
+
}
|
|
415
|
+
Xt(() => {
|
|
416
|
+
Ue.value && cancelAnimationFrame(Ue.value);
|
|
417
|
+
});
|
|
418
|
+
async function $a() {
|
|
419
|
+
mt(), await Gt(), Ue.value && cancelAnimationFrame(Ue.value), Ue.value = requestAnimationFrame(async () => {
|
|
420
|
+
await El(), mt();
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
const vt = f(() => Math.max(0, d.value.width / (c.value.end - c.value.start))), Ca = f(() => Qe(
|
|
424
|
+
Me.value.map((t) => ({ ...t, series: t.series.map((l) => l ?? 0) }))
|
|
425
|
+
).slice(c.value.start, c.value.end)), dt = f(() => D.value.length === Z.value.length), La = f(() => {
|
|
426
|
+
if (!e.value.style.chart.zoom.minimap.show) return [];
|
|
427
|
+
const t = Z.value.filter((n) => dt.value ? !0 : !D.value.includes(n.id) && !n.standalone);
|
|
428
|
+
if (t.length)
|
|
429
|
+
return Qe(
|
|
430
|
+
t.map((n) => ({
|
|
431
|
+
...n,
|
|
432
|
+
series: (n.series || []).map((o) => o ?? 0)
|
|
433
|
+
}))
|
|
434
|
+
);
|
|
435
|
+
const l = ut.value;
|
|
436
|
+
if (!l.length) return [];
|
|
437
|
+
const a = Math.max(...l.map((n) => n.series.length || 0));
|
|
438
|
+
return Array.from(
|
|
439
|
+
{ length: a },
|
|
440
|
+
(n, o) => l.reduce((r, y) => r + Math.abs(y.series[o] ?? 0), 0)
|
|
441
|
+
);
|
|
442
|
+
}), Rl = f(() => {
|
|
443
|
+
if (!e.value.style.chart.zoom.minimap.show) return [];
|
|
444
|
+
const l = Z.value.filter((o) => dt.value ? !0 : !D.value.includes(o.id) && !o.standalone), a = ut.value, s = l.length ? [{
|
|
445
|
+
name: "",
|
|
446
|
+
series: La.value,
|
|
447
|
+
color: "#000000",
|
|
448
|
+
isVisible: !0
|
|
449
|
+
}] : [], n = a.map((o) => ({
|
|
450
|
+
name: o.name || "",
|
|
451
|
+
series: (o.series || []).map((r) => r ?? 0),
|
|
452
|
+
color: o.color,
|
|
453
|
+
isVisible: !0
|
|
454
|
+
}));
|
|
455
|
+
return s.concat(n);
|
|
456
|
+
}), Ol = f(() => Qe(
|
|
457
|
+
Me.value.filter((t) => !D.value.includes(t.id)).map((t) => ({
|
|
458
|
+
...t,
|
|
459
|
+
series: t.series.map((l, a) => {
|
|
460
|
+
const s = l ?? 0;
|
|
461
|
+
return t.signedSeries[a] === -1 && s >= 0 ? -s : s;
|
|
462
|
+
})
|
|
463
|
+
}))
|
|
464
|
+
).slice(c.value.start, c.value.end)), Ne = f(() => {
|
|
465
|
+
const t = Me.value.filter((l) => !D.value.includes(l.id));
|
|
466
|
+
return {
|
|
467
|
+
positive: Qe(t.map((l) => ({
|
|
468
|
+
...l,
|
|
469
|
+
series: l.series.slice(c.value.start, c.value.end).map((a) => (a ?? 0) >= 0 ? a ?? 0 : 0)
|
|
470
|
+
}))),
|
|
471
|
+
negative: Qe(t.map((l) => ({
|
|
472
|
+
...l,
|
|
473
|
+
series: l.series.slice(c.value.start, c.value.end).map((a) => (a ?? 0) < 0 ? a ?? 0 : 0)
|
|
474
|
+
})))
|
|
475
|
+
};
|
|
476
|
+
}), Pe = f(() => {
|
|
477
|
+
const t = Math.max(0, c.value.end - c.value.start), l = Array(t).fill(0), a = Array(t).fill(0);
|
|
478
|
+
return ut.value.forEach((s) => {
|
|
479
|
+
for (let n = 0; n < t; n += 1) {
|
|
480
|
+
const o = s.series[c.value.start + n] ?? 0;
|
|
481
|
+
o > 0 && (l[n] = Math.max(l[n], o)), o < 0 && (a[n] = Math.min(a[n], o));
|
|
482
|
+
}
|
|
483
|
+
}), {
|
|
484
|
+
positive: l,
|
|
485
|
+
negative: a
|
|
486
|
+
};
|
|
487
|
+
}), Aa = f(() => Ol.value.map((t, l) => ({
|
|
488
|
+
value: t,
|
|
489
|
+
sign: t >= 0 ? 1 : -1
|
|
490
|
+
})));
|
|
491
|
+
function Dl() {
|
|
492
|
+
return { y0: Ie.value?.[0]?.zero ?? d.value.bottom };
|
|
493
|
+
}
|
|
494
|
+
function Vl(t) {
|
|
495
|
+
const { y0: l } = Dl(), a = e.value.style.chart.lines.totalValues, s = Math.max(2, a.fontSize * 1.3 + a.offsetY), n = (r) => Math.min(Math.max(r, d.value.top - e.value.style.chart.lines.totalValues.fontSize * 1.3), d.value.bottom + e.value.style.chart.lines.totalValues.fontSize * 2);
|
|
496
|
+
if ((Aa.value?.[t]?.value ?? 0) >= 0 || e.value.style.chart.lines.distributed) {
|
|
497
|
+
let r = 1 / 0;
|
|
498
|
+
for (const k of T.value || []) {
|
|
499
|
+
const A = k?.series?.[t], S = k?.topY?.[t];
|
|
500
|
+
(A ?? 0) > 0 && Number.isFinite(S) && S < r && (r = S);
|
|
501
|
+
}
|
|
502
|
+
const y = Number.isFinite(r) ? r : l;
|
|
503
|
+
return n(y - s - e.value.style.chart.lines.totalValues.offsetY);
|
|
504
|
+
} else {
|
|
505
|
+
let r = -1 / 0;
|
|
506
|
+
for (const k of T.value || []) {
|
|
507
|
+
const A = k?.series?.[t], S = k?.topY?.[t];
|
|
508
|
+
(A ?? 0) < 0 && Number.isFinite(S) && S > r && (r = S);
|
|
509
|
+
}
|
|
510
|
+
const y = Number.isFinite(r) ? r : l;
|
|
511
|
+
return n(y + s + a.fontSize * 0.7 + e.value.style.chart.lines.totalValues.offsetY);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
const Ie = f(() => {
|
|
515
|
+
const t = Math.max(...Ne.value.positive, 0), l = Math.min(...Ne.value.negative, 0), a = Math.max(...Pe.value.positive, 0), s = Math.min(...Pe.value.negative, 0), n = Math.max(t, a), o = Math.min(l, s), r = [-1 / 0, 1 / 0, NaN, void 0, null].includes(o) ? 0 : o, y = e.value.style.chart.grid.scale.scaleMin, k = e.value.style.chart.grid.scale.scaleMax, A = !e.value.style.chart.lines.distributed && (y !== null || k !== null), S = y !== null && !e.value.style.chart.lines.distributed ? y : r > 0 ? 0 : r, I = k !== null && !e.value.style.chart.lines.distributed ? k : n < 0 ? 0 : n, E = A ? kt(S, I, e.value.style.chart.grid.scale.ticks) : wt(S, I, e.value.style.chart.grid.scale.ticks), M = Math.abs(Number(E.min) || 0), u = (Number(E.max) || 0) + M, w = u === 0 || !Number.isFinite(u) ? 1 : u, V = Array.isArray(E.ticks) && E.ticks.length ? E.ticks : [0], g = d.value.bottom - d.value.height * (M / w);
|
|
516
|
+
return V.map(($) => {
|
|
517
|
+
const R = Number($) || 0, _ = d.value.bottom - d.value.height * ((R + M) / w);
|
|
518
|
+
return {
|
|
519
|
+
zero: g,
|
|
520
|
+
y: _,
|
|
521
|
+
x: ae.value.left - 8,
|
|
522
|
+
value: R
|
|
523
|
+
};
|
|
524
|
+
});
|
|
525
|
+
}), se = h([]), ze = h([]);
|
|
526
|
+
let Ta = 0;
|
|
527
|
+
pt(() => {
|
|
528
|
+
const t = ++Ta;
|
|
529
|
+
(async () => {
|
|
530
|
+
const l = await il({
|
|
531
|
+
values: e.value.style.chart.grid.x.timeLabels.values,
|
|
532
|
+
maxDatapoints: me.value,
|
|
533
|
+
formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
534
|
+
start: c.value.start,
|
|
535
|
+
end: c.value.end
|
|
536
|
+
});
|
|
537
|
+
t === Ta && (se.value = l);
|
|
538
|
+
})();
|
|
539
|
+
});
|
|
540
|
+
let Na = 0;
|
|
541
|
+
pt(() => {
|
|
542
|
+
const t = ++Na;
|
|
543
|
+
(async () => {
|
|
544
|
+
const l = await il({
|
|
545
|
+
values: e.value.style.chart.grid.x.timeLabels.values,
|
|
546
|
+
maxDatapoints: me.value,
|
|
547
|
+
formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
|
|
548
|
+
start: 0,
|
|
549
|
+
end: me.value
|
|
550
|
+
});
|
|
551
|
+
t === Na && (ze.value = l);
|
|
552
|
+
})();
|
|
553
|
+
});
|
|
554
|
+
const Bl = f(() => {
|
|
555
|
+
const t = e.value.style.chart.grid.x.timeLabels.modulo;
|
|
556
|
+
return se.value.length ? Math.min(t, [...new Set(se.value.map((l) => l.text))].length) : t;
|
|
557
|
+
}), ht = f(() => {
|
|
558
|
+
const t = e.value.style.chart.grid.x.timeLabels, l = se.value || [], a = ze.value || [], s = c.value.start ?? 0, n = b.value, o = me.value, r = l.map((k) => k?.text ?? ""), y = a.map((k) => k?.text ?? "");
|
|
559
|
+
return Cs(
|
|
560
|
+
!!t.showOnlyFirstAndLast,
|
|
561
|
+
!!t.showOnlyAtModulo,
|
|
562
|
+
Math.max(1, Bl.value || 1),
|
|
563
|
+
r,
|
|
564
|
+
y,
|
|
565
|
+
s,
|
|
566
|
+
n,
|
|
567
|
+
o
|
|
568
|
+
);
|
|
569
|
+
});
|
|
570
|
+
pt(() => {
|
|
571
|
+
e.value.style.chart.grid.x.timeLabels.show, e.value.style.chart.grid.x.timeLabels.fontSize, e.value.style.chart.grid.x.timeLabels.rotation, e.value.style.chart.grid.x.timeLabels.offsetY, (ht.value || []).map((t) => t?.text ?? "").join("|"), ne.value.width, ne.value.height, nt.value, ot.value, zl();
|
|
572
|
+
}, { flush: "post" });
|
|
573
|
+
const Pa = h({ months: [], shortMonths: [], days: [], shortDays: [] });
|
|
574
|
+
let Ia = 0;
|
|
575
|
+
pt(() => {
|
|
576
|
+
const t = ++Ia, l = e.value.style.chart.grid.x.timeLabels.datetimeFormatter;
|
|
577
|
+
(async () => {
|
|
578
|
+
const a = await ul(l.locale).catch(() => ul("en"));
|
|
579
|
+
t === Ia && (Pa.value = a.data);
|
|
580
|
+
})();
|
|
581
|
+
});
|
|
582
|
+
const za = f(() => {
|
|
583
|
+
const t = e.value.style.chart.grid.x.timeLabels.datetimeFormatter, l = Ds({
|
|
584
|
+
useUTC: t.useUTC,
|
|
585
|
+
locale: Pa.value,
|
|
586
|
+
januaryAsYear: t.januaryAsYear
|
|
587
|
+
});
|
|
588
|
+
return (a, s) => {
|
|
589
|
+
const o = e.value.style.chart.grid.x.timeLabels.values?.[a];
|
|
590
|
+
return o == null ? "" : l.formatDate(new Date(o), s);
|
|
591
|
+
};
|
|
592
|
+
}), _a = f(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, a) => ({
|
|
593
|
+
text: za.value(a, e.value.style.chart.zoom.timeFormat),
|
|
594
|
+
absoluteIndex: a
|
|
595
|
+
}))), Ot = f(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, a) => ({
|
|
596
|
+
text: za.value(a, e.value.style.chart.tooltip.timeFormat),
|
|
597
|
+
absoluteIndex: a
|
|
598
|
+
}))), Yl = f(() => {
|
|
599
|
+
if (!Ee.value && !de.value) return [];
|
|
600
|
+
const t = d.value.height, l = Ie.value[0] ? Ie.value[0].zero : d.value.bottom, a = c.value.start ?? 0, s = c.value.end ?? 0, n = Math.max(1, s - a), o = Math.max(...Ne.value.positive, 0), r = Math.min(...Ne.value.negative, 0), y = Math.max(...Pe.value.positive, 0), k = Math.min(...Pe.value.negative, 0), A = Math.max(o, y), S = Math.min(r, k), I = !e.value.style.chart.lines.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? kt(
|
|
601
|
+
e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : S > 0 ? 0 : S,
|
|
602
|
+
e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : A < 0 ? 0 : A,
|
|
603
|
+
e.value.style.chart.grid.scale.ticks
|
|
604
|
+
) : wt(
|
|
605
|
+
e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : S > 0 ? 0 : S,
|
|
606
|
+
e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : A < 0 ? 0 : A,
|
|
607
|
+
e.value.style.chart.grid.scale.ticks
|
|
608
|
+
), { min: E, max: M } = I, m = M + (E >= 0 ? 0 : Math.abs(E)) || 1, u = Array(n).fill(0), w = Array(n).fill(0), V = (g) => n <= 1 ? d.value.left + d.value.width / 2 : d.value.left + g / (n - 1) * d.value.width;
|
|
609
|
+
return Z.value.filter((g) => !D.value.includes(g.id)).map((g) => {
|
|
610
|
+
const $ = [], R = [], _ = [], z = new Array(n).fill(null), B = new Array(n).fill(null);
|
|
611
|
+
for (let p = 0; p < n; p += 1) {
|
|
612
|
+
const L = a + p, q = g.series?.[L], U = g.signedSeries?.[L], xe = q == null || Number.isNaN(q) ? 0 : q, el = g.standalone ? xe / m : e.value.style.chart.lines.distributed ? xe / (Ca.value[p] || 1) : xe / m;
|
|
613
|
+
if (xe >= 0) {
|
|
614
|
+
const je = t * Math.abs(el);
|
|
615
|
+
if (g.standalone)
|
|
616
|
+
z[p] = l, B[p] = l - je;
|
|
617
|
+
else {
|
|
618
|
+
const Je = u[p], Ke = Je + je;
|
|
619
|
+
z[p] = l - Je, B[p] = l - Ke, u[p] = Ke;
|
|
620
|
+
}
|
|
621
|
+
} else {
|
|
622
|
+
const je = t * Math.abs(el);
|
|
623
|
+
if (g.standalone)
|
|
624
|
+
z[p] = l, B[p] = l + je;
|
|
625
|
+
else {
|
|
626
|
+
const Je = w[p], Ke = Je + je;
|
|
627
|
+
z[p] = l + Je, B[p] = l + Ke, w[p] = Ke;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
$.push(p), R.push(xe), _.push(U ?? (xe >= 0 ? 1 : -1));
|
|
631
|
+
}
|
|
632
|
+
const H = $.map((p) => ({ x: V(p), y: B[p] })), Q = H.map((p) => p.x), J = R.reduce((p, L) => p + Math.abs(L || 0), 0), W = J === 0 ? 1 : J, O = R.map((p, L) => {
|
|
633
|
+
if (e.value.style.chart.lines.distributed && !g.standalone) {
|
|
634
|
+
const q = $[L], U = Ca.value[q] || 1;
|
|
635
|
+
return (p || 0) / U;
|
|
636
|
+
}
|
|
637
|
+
return (p || 0) / W;
|
|
638
|
+
});
|
|
639
|
+
return {
|
|
640
|
+
...g,
|
|
641
|
+
x: Q,
|
|
642
|
+
points: H,
|
|
643
|
+
baseY: $.map((p) => z[p]),
|
|
644
|
+
topY: $.map((p) => B[p]),
|
|
645
|
+
series: R,
|
|
646
|
+
signedSeries: _,
|
|
647
|
+
proportions: O,
|
|
648
|
+
rel: $,
|
|
649
|
+
fullSeries: Array.isArray(g.fullSeries) ? g.fullSeries : g.series
|
|
650
|
+
};
|
|
651
|
+
});
|
|
652
|
+
}), T = f(() => {
|
|
653
|
+
const t = (M) => typeof M == "string" ? M.replace(
|
|
654
|
+
/^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i,
|
|
655
|
+
""
|
|
656
|
+
).trim() : "", l = Math.max(...Ne.value.positive, 0), a = Math.min(...Ne.value.negative, 0), s = Math.max(...Pe.value.positive, 0), n = Math.min(...Pe.value.negative, 0), o = Math.max(l, s), r = Math.min(a, n), y = !e.value.style.chart.lines.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? kt(
|
|
657
|
+
e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : r > 0 ? 0 : r,
|
|
658
|
+
e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : o < 0 ? 0 : o,
|
|
659
|
+
e.value.style.chart.grid.scale.ticks
|
|
660
|
+
) : wt(
|
|
661
|
+
e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : r > 0 ? 0 : r,
|
|
662
|
+
e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : o < 0 ? 0 : o,
|
|
663
|
+
e.value.style.chart.grid.scale.ticks
|
|
664
|
+
), k = Number(y.min) || 0, A = Number(y.max) || 0, S = Math.abs(k), I = A + S || 1, E = (M) => {
|
|
665
|
+
if (e.value.style.chart.lines.distributed) {
|
|
666
|
+
const m = Math.max(0, Math.min(1, M));
|
|
667
|
+
return minimapH - minimapH * m;
|
|
668
|
+
}
|
|
669
|
+
return clampY(minimapH - minimapH * (((M ?? 0) + S) / I));
|
|
670
|
+
};
|
|
671
|
+
return Yl.value.map((M) => {
|
|
672
|
+
const m = M.x.length, u = Array.isArray(M.fullSeries) ? M.fullSeries : M.series, w = ({ left: W = 0, unitW: O }) => {
|
|
673
|
+
const p = u.length;
|
|
674
|
+
return !Number.isFinite(O) || O <= 0 || p <= 0 ? [] : p === 1 ? [W + O * 0.5] : u.map((L, q) => W + q * O);
|
|
675
|
+
}, V = ({ minimapH: W }) => !Number.isFinite(W) || W <= 0 ? [] : u.map((O) => E(O || 0)), g = ({ minimapH: W }) => {
|
|
676
|
+
if (!Number.isFinite(W) || W <= 0) return [];
|
|
677
|
+
const O = E(0);
|
|
678
|
+
return u.map(() => O);
|
|
679
|
+
};
|
|
680
|
+
if (m === 0)
|
|
681
|
+
return {
|
|
682
|
+
...M,
|
|
683
|
+
points: [],
|
|
684
|
+
smoothPath: "",
|
|
685
|
+
straightPath: "",
|
|
686
|
+
smoothArea: "",
|
|
687
|
+
straightArea: "",
|
|
688
|
+
xMinimap: w,
|
|
689
|
+
yMinimap: V,
|
|
690
|
+
yMinimapBase: g
|
|
691
|
+
};
|
|
692
|
+
const $ = M.x.map((W, O) => ({ x: W, y: M.topY[O] })), R = M.x.map((W, O) => ({ x: W, y: M.baseY[O] })), _ = m >= 2 ? we($) : `M${$[0].x},${$[0].y}`, z = m >= 2 ? Se($) : `M${$[0].x},${$[0].y}`, B = m >= 2 ? `M${t(_)}` : _, H = m >= 2 ? `M${t(z)}` : z;
|
|
693
|
+
let Q = "", J = "";
|
|
694
|
+
if (e.value.style.chart.lines.useArea && m >= 2) {
|
|
695
|
+
const W = we([...R].reverse()), O = Se([...R].reverse()), p = R[R.length - 1];
|
|
696
|
+
Q = `M${$[0].x},${$[0].y} ${t(_)} L${p.x},${p.y} ${t(W)} Z`, J = `M${$[0].x},${$[0].y} ${t(z)} L${p.x},${p.y} ${t(O)} Z`;
|
|
697
|
+
}
|
|
698
|
+
return {
|
|
699
|
+
...M,
|
|
700
|
+
points: $,
|
|
701
|
+
smoothPath: B,
|
|
702
|
+
straightPath: H,
|
|
703
|
+
smoothArea: Q,
|
|
704
|
+
straightArea: J,
|
|
705
|
+
xMinimap: w,
|
|
706
|
+
yMinimap: V,
|
|
707
|
+
yMinimapBase: g
|
|
708
|
+
};
|
|
709
|
+
});
|
|
710
|
+
}), qe = h(!1), Fa = h(!1);
|
|
711
|
+
function Ea(t) {
|
|
712
|
+
const l = me.value;
|
|
713
|
+
return t > l ? l : t < 0 || t < c.value.start ? e.value.style.chart.zoom.startIndex !== null ? c.value.start + 1 : 1 : t;
|
|
714
|
+
}
|
|
715
|
+
function mt() {
|
|
716
|
+
if (!qe.value) {
|
|
717
|
+
qe.value = !0;
|
|
718
|
+
try {
|
|
719
|
+
const { startIndex: t, endIndex: l } = e.value.style.chart.zoom, a = me.value, s = t ?? 0, n = l != null ? Math.min(Ea(l + 1), a) : a;
|
|
720
|
+
ft.value = !0, c.value.start = s, c.value.end = n, re.value.start = s, re.value.end = n, ct(), Fa.value = !0;
|
|
721
|
+
} finally {
|
|
722
|
+
queueMicrotask(() => {
|
|
723
|
+
ft.value = !1;
|
|
724
|
+
}), qe.value = !1;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
function Hl(t) {
|
|
729
|
+
qe.value || ft.value || t !== c.value.start && (c.value.start = t, re.value.start = t, ct());
|
|
730
|
+
}
|
|
731
|
+
function Wl(t) {
|
|
732
|
+
if (qe.value || ft.value) return;
|
|
733
|
+
const l = Ea(t);
|
|
734
|
+
l !== c.value.end && (c.value.end = l, re.value.end = l, ct());
|
|
735
|
+
}
|
|
736
|
+
const ae = f(() => ({
|
|
737
|
+
left: d.value.left,
|
|
738
|
+
right: d.value.right,
|
|
739
|
+
width: d.value.width
|
|
740
|
+
})), ft = h(!1), Ul = f(() => ne.value.width), ql = f(() => ne.value.height);
|
|
741
|
+
Gs({
|
|
742
|
+
timeLabelsEls: nt,
|
|
743
|
+
timeLabels: se,
|
|
744
|
+
slicer: c,
|
|
745
|
+
configRef: e,
|
|
746
|
+
rotationPath: ["style", "chart", "grid", "x", "timeLabels", "rotation"],
|
|
747
|
+
autoRotatePath: ["style", "chart", "grid", "x", "timeLabels", "autoRotate", "enable"],
|
|
748
|
+
isAutoSize: !1,
|
|
749
|
+
width: Ul,
|
|
750
|
+
height: ql,
|
|
751
|
+
rotation: e.value.style.chart.grid.x.timeLabels.autoRotate.angle
|
|
752
|
+
});
|
|
753
|
+
const yt = h(null);
|
|
754
|
+
function Ra(t) {
|
|
755
|
+
const l = he.value;
|
|
756
|
+
if (!l) return null;
|
|
757
|
+
if (l.createSVGPoint && l.getScreenCTM) {
|
|
758
|
+
const I = l.createSVGPoint();
|
|
759
|
+
I.x = t.clientX, I.y = t.clientY;
|
|
760
|
+
const E = l.getScreenCTM();
|
|
761
|
+
if (E) {
|
|
762
|
+
const M = I.matrixTransform(E.inverse());
|
|
763
|
+
return { x: M.x, y: M.y, ok: !0 };
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
const a = l.getBoundingClientRect(), s = l.viewBox?.baseVal || { x: 0, y: 0, width: a.width, height: a.height }, n = Math.min(a.width / s.width, a.height / s.height), o = s.width * n, r = s.height * n, y = (a.width - o) / 2, k = (a.height - r) / 2, A = (t.clientX - a.left - y) / n + s.x, S = (t.clientY - a.top - k) / n + s.y;
|
|
767
|
+
return { x: A, y: S, ok: !0 };
|
|
768
|
+
}
|
|
769
|
+
let $e = 0;
|
|
770
|
+
const Y = f(() => Math.max(1, c.value.end - c.value.start)), gt = f(
|
|
771
|
+
() => Y.value > 1 ? d.value.width / (Y.value - 1) : 0
|
|
772
|
+
);
|
|
773
|
+
function ie(t) {
|
|
774
|
+
return Y.value <= 1 ? d.value.left + d.value.width / 2 : d.value.left + t * gt.value;
|
|
775
|
+
}
|
|
776
|
+
function Oa(t) {
|
|
777
|
+
if (Y.value <= 1)
|
|
778
|
+
return { x: d.value.left, width: d.value.width };
|
|
779
|
+
const l = t === 0 ? d.value.left : (ie(t - 1) + ie(t)) / 2, a = t === Y.value - 1 ? d.value.left + d.value.width : (ie(t) + ie(t + 1)) / 2;
|
|
780
|
+
return { x: l, width: Math.max(0, a - l) };
|
|
781
|
+
}
|
|
782
|
+
function Xl(t) {
|
|
783
|
+
Ae.value || ($e && cancelAnimationFrame($e), $e = requestAnimationFrame(() => {
|
|
784
|
+
$e = 0;
|
|
785
|
+
const l = Ra(t);
|
|
786
|
+
if (!l || !he.value) {
|
|
787
|
+
Dt();
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
const { left: a, right: s, top: n, bottom: o } = d.value;
|
|
791
|
+
if (l.x < a || l.x > s || l.y < n || l.y > o) {
|
|
792
|
+
Dt();
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
795
|
+
let r = 0;
|
|
796
|
+
if (Y.value > 1) {
|
|
797
|
+
const y = (l.x - a) / gt.value;
|
|
798
|
+
r = Math.round(y);
|
|
799
|
+
} else
|
|
800
|
+
r = 0;
|
|
801
|
+
r < 0 && (r = 0), r > Y.value - 1 && (r = Y.value - 1), yt.value !== r && (yt.value = r, Bt(!0, r));
|
|
802
|
+
}));
|
|
803
|
+
}
|
|
804
|
+
function Gl(t) {
|
|
805
|
+
const l = Ra(t);
|
|
806
|
+
if (!l || !he.value) return;
|
|
807
|
+
const { left: a, right: s, top: n, bottom: o } = d.value;
|
|
808
|
+
if (l.x < a || l.x > s || l.y < n || l.y > o) return;
|
|
809
|
+
let r = 0;
|
|
810
|
+
if (Y.value > 1) {
|
|
811
|
+
const y = (l.x - a) / gt.value;
|
|
812
|
+
r = Math.round(y);
|
|
813
|
+
} else
|
|
814
|
+
r = 0;
|
|
815
|
+
r < 0 && (r = 0), r > Y.value - 1 && (r = Y.value - 1), Za({
|
|
816
|
+
seriesIndex: r,
|
|
817
|
+
datapoint: ja(r)
|
|
818
|
+
}), Da(r);
|
|
819
|
+
}
|
|
820
|
+
function Da(t) {
|
|
821
|
+
const l = JSON.parse(JSON.stringify(T.value)).map((a) => ({
|
|
822
|
+
name: a.name,
|
|
823
|
+
value: a.series[t] === 0 ? 0 : a.series[t] || null,
|
|
824
|
+
proportion: a.proportions[t] || null,
|
|
825
|
+
color: a.color,
|
|
826
|
+
id: a.id
|
|
827
|
+
}));
|
|
828
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: t + c.value.start }), ye("selectDatapoint", { datapoint: l, period: se.value[t] });
|
|
829
|
+
}
|
|
830
|
+
Fe(
|
|
831
|
+
() => [c.value.start, c.value.end, T.value.length],
|
|
832
|
+
() => {
|
|
833
|
+
const t = Y.value;
|
|
834
|
+
if (b.value != null) {
|
|
835
|
+
if (t <= 0) {
|
|
836
|
+
b.value = null;
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
b.value < 0 && (b.value = 0), b.value > t - 1 && (b.value = t - 1);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
);
|
|
843
|
+
function Dt() {
|
|
844
|
+
$e && (cancelAnimationFrame($e), $e = 0), yt.value = null, Bt(!1, null);
|
|
845
|
+
}
|
|
846
|
+
const b = h(null), Vt = f(() => {
|
|
847
|
+
const t = b.value, l = t == null ? null : Rt(t);
|
|
848
|
+
return T.value.map((a) => ({
|
|
849
|
+
slotAbsoluteIndex: a.absoluteIndex,
|
|
850
|
+
shape: a.shape || "circle",
|
|
851
|
+
name: a.name,
|
|
852
|
+
color: a.color,
|
|
853
|
+
value: t == null ? null : a.series.find((s, n) => n === t),
|
|
854
|
+
sourceValue: l == null ? null : a.seriesSource?.[l],
|
|
855
|
+
comments: a.comments || [],
|
|
856
|
+
id: a.id,
|
|
857
|
+
standalone: !!a.standalone
|
|
858
|
+
}));
|
|
859
|
+
}), jl = f(() => {
|
|
860
|
+
const t = e.value.style.chart.tooltip.customFormat, l = [...Vt.value].reverse(), a = l.filter((u) => !u.standalone), s = l.filter((u) => u.standalone), n = a.map((u) => u.value).filter((u) => Ls(u) && u !== null).reduce((u, w) => Math.abs(u) + Math.abs(w), 0);
|
|
861
|
+
if (As(t) && Ts(
|
|
862
|
+
() => t({
|
|
863
|
+
absoluteIndex: b.value + c.value.start,
|
|
864
|
+
seriesIndex: b.value,
|
|
865
|
+
datapoint: Vt.value,
|
|
866
|
+
series: Z.value,
|
|
867
|
+
config: e.value
|
|
868
|
+
})
|
|
869
|
+
))
|
|
870
|
+
return t({
|
|
871
|
+
absoluteIndex: b.value + c.value.start,
|
|
872
|
+
seriesIndex: b.value,
|
|
873
|
+
datapoint: Vt.value,
|
|
874
|
+
series: Z.value,
|
|
875
|
+
config: e.value
|
|
876
|
+
});
|
|
877
|
+
const {
|
|
878
|
+
showValue: o,
|
|
879
|
+
showTotal: r,
|
|
880
|
+
totalTranslation: y,
|
|
881
|
+
showPercentage: k,
|
|
882
|
+
borderColor: A,
|
|
883
|
+
roundingValue: S,
|
|
884
|
+
roundingPercentage: I
|
|
885
|
+
} = e.value.style.chart.tooltip, E = (u) => !u.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(u.shape) ? `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" fill="${u.color}" /></svg>` : u.shape === "star" ? `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" fill="${u.color}" points="${Fs({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>` : u.shape === "triangle" ? `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${at({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${u.color}" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : u.shape === "square" ? `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${at({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${u.color}" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : u.shape === "diamond" ? `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${at({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${u.color}" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : u.shape === "pentagon" ? `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${at({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${u.color}" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${at({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${u.color}" stroke="${e.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`, M = (u, w) => {
|
|
886
|
+
const V = w ? Ce({
|
|
887
|
+
v: isNaN((u.value ?? 0) / (n || 1)) ? 0 : Math.abs(u.value ?? 0) / (n || 1) * 100,
|
|
888
|
+
s: "%",
|
|
889
|
+
r: I
|
|
890
|
+
}) : "", g = o && w ? "(" : "", $ = o && w ? ")" : "";
|
|
891
|
+
return `
|
|
892
|
+
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
893
|
+
<div style="width:20px;height:20px;display:flex;align-items:center;justify-content:center;">${E(u)}</div>
|
|
894
|
+
${u.name}${o || w ? ":" : ""}
|
|
895
|
+
${o ? et(
|
|
896
|
+
e.value.style.chart.lines.dataLabels.formatter,
|
|
897
|
+
u.sourceValue,
|
|
898
|
+
Ce({
|
|
899
|
+
p: e.value.style.chart.lines.dataLabels.prefix,
|
|
900
|
+
v: u.sourceValue,
|
|
901
|
+
s: e.value.style.chart.lines.dataLabels.suffix,
|
|
902
|
+
r: S
|
|
903
|
+
})
|
|
904
|
+
) : ""} ${g}${V}${$}
|
|
905
|
+
</div>
|
|
906
|
+
`;
|
|
907
|
+
};
|
|
908
|
+
let m = "";
|
|
909
|
+
return (se.value[b.value] && se.value[b.value].text || Ot.value[b.value] && Ot.value[b.value].text && e.value.style.chart.tooltip.showTimeLabel) && (m += `<div style="width:100%;text-align:center;border-bottom:1px solid ${A};padding-bottom:6px;margin-bottom:3px;">${e.value.style.chart.tooltip.useDefaultTimeFormat ? se.value[b.value]?.text : Ot.value[b.value]?.text || ze.value[b.value]?.text || ""}</div>`), r && a.length > 1 && (m += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
910
|
+
<span>${y}:</span>
|
|
911
|
+
<span>${et(
|
|
912
|
+
e.value.style.chart.lines.dataLabels.formatter,
|
|
913
|
+
tt(n),
|
|
914
|
+
Ce({
|
|
915
|
+
p: e.value.style.chart.lines.dataLabels.prefix,
|
|
916
|
+
v: tt(n),
|
|
917
|
+
s: e.value.style.chart.lines.dataLabels.suffix,
|
|
918
|
+
r: S
|
|
919
|
+
}),
|
|
920
|
+
{ datapoint: { name: y, value: tt(n) } }
|
|
921
|
+
)}</span>
|
|
922
|
+
</div>`), a.forEach((u) => {
|
|
923
|
+
m += M(u, k);
|
|
924
|
+
}), s.length && (m += `<div style="border-top:1px solid ${Me.value.length ? A : "transparent"}; margin:${Me.value.length ? "6px 0" : "0"};"></div>`, s.forEach((u) => {
|
|
925
|
+
m += M(u, !1);
|
|
926
|
+
})), `<div>${m}</div>`;
|
|
927
|
+
});
|
|
928
|
+
function Bt(t, l = null, a = "pointer") {
|
|
929
|
+
if (dt.value) return;
|
|
930
|
+
Be.value = a, Re.value = t;
|
|
931
|
+
const s = T.value.map((n) => ({
|
|
932
|
+
name: n.name,
|
|
933
|
+
value: [null, void 0, NaN].includes(n.series[l]) ? null : n.series[l],
|
|
934
|
+
color: n.color
|
|
935
|
+
}));
|
|
936
|
+
t ? (ce.value = l, b.value = l, Za({ seriesIndex: l, datapoint: s }), e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: s, seriesIndex: l + c.value.start })) : (ce.value = null, b.value = null, ye("selectX", { seriesIndex: null, dataset: null, indexLabel: null }), e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: s, seriesIndex: l + c.value.start }));
|
|
937
|
+
}
|
|
938
|
+
function Va(t, l) {
|
|
939
|
+
const a = JSON.parse(JSON.stringify(T.value)).map((s) => ({
|
|
940
|
+
name: s.name,
|
|
941
|
+
value: s.series[l] === 0 ? 0 : (s.signedSeries[l] === -1 && s.series[l] >= 0 ? -s.series[l] : s.series[l]) || null,
|
|
942
|
+
proportion: s.proportions[l] || null,
|
|
943
|
+
color: s.color,
|
|
944
|
+
id: s.id
|
|
945
|
+
}));
|
|
946
|
+
ye("selectTimeLabel", {
|
|
947
|
+
datapoint: a,
|
|
948
|
+
absoluteIndex: t.absoluteIndex,
|
|
949
|
+
label: t.text
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
function Jl() {
|
|
953
|
+
D.value.length ? D.value = [] : Xe.value.forEach((t) => {
|
|
954
|
+
D.value.push(t.id);
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
function Yt(t) {
|
|
958
|
+
if (D.value.includes(t.id))
|
|
959
|
+
D.value = D.value.filter((l) => l !== t.id);
|
|
960
|
+
else {
|
|
961
|
+
if (D.value.length === Z.value.length - 1) return;
|
|
962
|
+
D.value.push(t.id);
|
|
963
|
+
}
|
|
964
|
+
ye("selectLegend", T.value);
|
|
965
|
+
}
|
|
966
|
+
const Xe = f(() => Z.value.map((t) => ({
|
|
967
|
+
...t,
|
|
968
|
+
opacity: D.value.includes(t.id) ? 0.5 : 1,
|
|
969
|
+
segregate: () => Yt(t),
|
|
970
|
+
isSegregated: D.value.includes(t.id)
|
|
971
|
+
}))), Kl = f(() => ({
|
|
972
|
+
cy: "stackline-legend",
|
|
973
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
974
|
+
color: e.value.style.chart.legend.color,
|
|
975
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
976
|
+
paddingBottom: 12,
|
|
977
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
978
|
+
}));
|
|
979
|
+
function Ba(t) {
|
|
980
|
+
if (!Z.value.length)
|
|
981
|
+
return e.value.debug && console.warn("VueUiStackline - There are no series to show."), null;
|
|
982
|
+
const l = Z.value.find((a) => a.name === t);
|
|
983
|
+
return l || (e.value.debug && console.warn(`VueUiStackline - Series name not found "${t}"`), null);
|
|
984
|
+
}
|
|
985
|
+
function Zl(t) {
|
|
986
|
+
const l = Ba(t);
|
|
987
|
+
l !== null && D.value.includes(l.id) && Yt({ id: l.id });
|
|
988
|
+
}
|
|
989
|
+
function Ql(t) {
|
|
990
|
+
const l = Ba(t);
|
|
991
|
+
l !== null && (D.value.includes(l.id) || Yt({ id: l.id }));
|
|
992
|
+
}
|
|
993
|
+
const Ya = f(() => {
|
|
994
|
+
if (T.value.length === 0)
|
|
995
|
+
return { head: [], body: [], config: {}, columnNames: [] };
|
|
996
|
+
const t = T.value.map(({ name: a, color: s }) => ({ label: a, color: s })), l = [];
|
|
997
|
+
return ht.value.forEach((a) => {
|
|
998
|
+
const s = a.absoluteIndex, o = [e.value.style.chart.grid.x.timeLabels.values?.[s] ? a.text : s + 1];
|
|
999
|
+
Z.value.forEach((r) => {
|
|
1000
|
+
const y = r.series?.[s], k = Number((y ?? 0).toFixed(e.value.table.td.roundingValue));
|
|
1001
|
+
o.push(k);
|
|
1002
|
+
}), l.push(o);
|
|
1003
|
+
}), { head: t, body: l };
|
|
1004
|
+
});
|
|
1005
|
+
function Ht(t = null) {
|
|
1006
|
+
const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = ["", ...Ya.value.head.map((r) => r.label)], s = Ya.value.body, n = l.concat([a]).concat(s), o = zs(n);
|
|
1007
|
+
t ? t(o) : _s({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-stackline" });
|
|
1008
|
+
}
|
|
1009
|
+
const _e = f(() => {
|
|
1010
|
+
const t = [""].concat(T.value.map((o) => o.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>'), l = [], a = Math.max(0, c.value.end - c.value.start);
|
|
1011
|
+
for (let o = 0; o < a; o += 1) {
|
|
1012
|
+
const r = Rt(o), y = e.value.style.chart.grid.x.timeLabels.values?.[r] ? se.value?.[o]?.text ?? r + 1 : r + 1, k = T.value.map((I) => {
|
|
1013
|
+
const E = I.series?.[o] ?? 0;
|
|
1014
|
+
return Number(E.toFixed(e.value.table.td.roundingValue));
|
|
1015
|
+
}), S = T.value.filter((I) => !I.standalone).map((I) => I.series?.[o] ?? 0).reduce((I, E) => I + E, 0);
|
|
1016
|
+
l.push([y].concat(k).concat(Number(S.toFixed(e.value.table.td.roundingValue))));
|
|
1017
|
+
}
|
|
1018
|
+
const s = {
|
|
1019
|
+
th: {
|
|
1020
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
1021
|
+
color: e.value.table.th.color,
|
|
1022
|
+
outline: e.value.table.th.outline
|
|
1023
|
+
},
|
|
1024
|
+
td: {
|
|
1025
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
1026
|
+
color: e.value.table.td.color,
|
|
1027
|
+
outline: e.value.table.td.outline
|
|
1028
|
+
},
|
|
1029
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
1030
|
+
}, n = [e.value.table.columnNames.period].concat(T.value.map((o) => o.name)).concat(e.value.table.columnNames.total);
|
|
1031
|
+
return { head: t, body: l, config: s, colNames: n };
|
|
1032
|
+
}), es = f(() => e.value.style.chart.backgroundColor), ts = f(() => e.value.style.chart.legend), as = f(() => e.value.style.chart.title), { exportSvg: ls, getSvg: ss } = Ws({
|
|
1033
|
+
svg: he,
|
|
1034
|
+
title: as,
|
|
1035
|
+
legend: ts,
|
|
1036
|
+
legendItems: Xe,
|
|
1037
|
+
backgroundColor: es
|
|
1038
|
+
});
|
|
1039
|
+
async function Ha({ isCb: t }) {
|
|
1040
|
+
st.value = !0, await Gt();
|
|
1041
|
+
try {
|
|
1042
|
+
if (t) {
|
|
1043
|
+
const { blob: l, url: a, text: s, dataUrl: n } = await ss();
|
|
1044
|
+
await Promise.resolve(e.value.userOptions.callbacks.svg({ blob: l, url: a, text: s, dataUrl: n }));
|
|
1045
|
+
} else
|
|
1046
|
+
await Promise.resolve(ls());
|
|
1047
|
+
} finally {
|
|
1048
|
+
st.value = !1;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
async function os({ scale: t = 2 } = {}) {
|
|
1052
|
+
if (!ue.value) return;
|
|
1053
|
+
const { width: l, height: a } = ue.value.getBoundingClientRect(), s = l / a, { imageUri: n, base64: o } = await Js({ domElement: ue.value, base64: !0, img: !0, scale: t });
|
|
1054
|
+
return {
|
|
1055
|
+
imageUri: n,
|
|
1056
|
+
base64: o,
|
|
1057
|
+
title: e.value.style.chart.title.text,
|
|
1058
|
+
width: l,
|
|
1059
|
+
height: a,
|
|
1060
|
+
aspectRatio: s
|
|
1061
|
+
};
|
|
1062
|
+
}
|
|
1063
|
+
const Ge = f(() => {
|
|
1064
|
+
const t = e.value.table.useDialog && !e.value.table.show, l = j.value.showTable;
|
|
1065
|
+
return {
|
|
1066
|
+
component: t ? bl : ml,
|
|
1067
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1068
|
+
props: t ? {
|
|
1069
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
1070
|
+
color: e.value.table.th.color,
|
|
1071
|
+
headerColor: e.value.table.th.color,
|
|
1072
|
+
headerBg: e.value.table.th.backgroundColor,
|
|
1073
|
+
isFullscreen: De.value,
|
|
1074
|
+
fullscreenParent: ue.value,
|
|
1075
|
+
forcedWidth: Math.min(800, window.innerWidth * 0.8),
|
|
1076
|
+
isCursorPointer: ve.value
|
|
1077
|
+
} : {
|
|
1078
|
+
hideDetails: !0,
|
|
1079
|
+
config: {
|
|
1080
|
+
open: l,
|
|
1081
|
+
maxHeight: 1e4,
|
|
1082
|
+
body: {
|
|
1083
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1084
|
+
color: e.value.style.chart.color
|
|
1085
|
+
},
|
|
1086
|
+
head: {
|
|
1087
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1088
|
+
color: e.value.style.chart.color
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
};
|
|
1093
|
+
});
|
|
1094
|
+
Fe(() => j.value.showTable, (t) => {
|
|
1095
|
+
e.value.table.show || (t && e.value.table.useDialog && Ve.value ? Ve.value.open() : "close" in Ve.value && Ve.value.close());
|
|
1096
|
+
});
|
|
1097
|
+
function Wa() {
|
|
1098
|
+
j.value.showTable = !1, $t.value && $t.value.setTableIconState(!1);
|
|
1099
|
+
}
|
|
1100
|
+
function Ua(t) {
|
|
1101
|
+
De.value = t, ea.value += 1;
|
|
1102
|
+
}
|
|
1103
|
+
function qa() {
|
|
1104
|
+
j.value.showTable = !j.value.showTable;
|
|
1105
|
+
}
|
|
1106
|
+
function Xa() {
|
|
1107
|
+
j.value.dataLabels.show = !j.value.dataLabels.show;
|
|
1108
|
+
}
|
|
1109
|
+
function Ga() {
|
|
1110
|
+
j.value.showTooltip = !j.value.showTooltip;
|
|
1111
|
+
}
|
|
1112
|
+
function ns() {
|
|
1113
|
+
return T.value;
|
|
1114
|
+
}
|
|
1115
|
+
function ja(t) {
|
|
1116
|
+
const l = t ?? 0, a = Rt(l);
|
|
1117
|
+
return JSON.parse(JSON.stringify(T.value)).map((s) => {
|
|
1118
|
+
const n = s.series[l], o = s.signedSeries?.[l], r = n === 0 ? 0 : (o === -1 && n >= 0 ? -n : n) || null;
|
|
1119
|
+
return {
|
|
1120
|
+
name: s.name,
|
|
1121
|
+
absoluteIndex: s.absoluteIndex,
|
|
1122
|
+
value: r,
|
|
1123
|
+
proportion: s.proportions?.[l] || null,
|
|
1124
|
+
color: s.color,
|
|
1125
|
+
id: s.id,
|
|
1126
|
+
timeLabel: ze.value?.[a] || null
|
|
1127
|
+
};
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
const rs = f(() => Array(me.value).fill(0).map((t, l) => ja(l)));
|
|
1131
|
+
Fe(() => G.selectedXIndex, (t) => {
|
|
1132
|
+
if ([null, void 0].includes(G.selectedXIndex)) {
|
|
1133
|
+
b.value = null;
|
|
1134
|
+
return;
|
|
1135
|
+
}
|
|
1136
|
+
const l = t - c.value.start;
|
|
1137
|
+
l < 0 || t >= c.value.end ? b.value = null : b.value = l ?? null;
|
|
1138
|
+
}, { immediate: !0 });
|
|
1139
|
+
const Ja = f(() => {
|
|
1140
|
+
if (e.value.style.chart.lines.distributed)
|
|
1141
|
+
return { min: -1, max: 1 };
|
|
1142
|
+
const t = Me.value, l = ut.value, a = Math.max(
|
|
1143
|
+
1,
|
|
1144
|
+
...[...t, ...l].map((m) => m.series?.length || 0)
|
|
1145
|
+
), s = Array(a).fill(0), n = Array(a).fill(0);
|
|
1146
|
+
t.forEach((m) => {
|
|
1147
|
+
for (let u = 0; u < a; u += 1) {
|
|
1148
|
+
const w = m.series[u] ?? 0;
|
|
1149
|
+
w >= 0 ? s[u] += w : n[u] += w;
|
|
1150
|
+
}
|
|
1151
|
+
});
|
|
1152
|
+
const o = Array(a).fill(0), r = Array(a).fill(0);
|
|
1153
|
+
l.forEach((m) => {
|
|
1154
|
+
for (let u = 0; u < a; u += 1) {
|
|
1155
|
+
const w = m.series[u] ?? 0;
|
|
1156
|
+
w > 0 && (o[u] = Math.max(o[u], w)), w < 0 && (r[u] = Math.min(r[u], w));
|
|
1157
|
+
}
|
|
1158
|
+
});
|
|
1159
|
+
const y = Math.max(0, ...s, ...o), k = Math.min(0, ...n, ...r), A = e.value.style.chart.grid.scale.scaleMin, S = e.value.style.chart.grid.scale.scaleMax, I = e.value.style.chart.grid.scale.ticks, M = !e.value.style.chart.lines.distributed && (A !== null || S !== null) ? kt(
|
|
1160
|
+
A !== null ? A : k > 0 ? 0 : k,
|
|
1161
|
+
S !== null ? S : y < 0 ? 0 : y,
|
|
1162
|
+
I
|
|
1163
|
+
) : wt(
|
|
1164
|
+
A !== null ? A : k > 0 ? 0 : k,
|
|
1165
|
+
S !== null ? S : y < 0 ? 0 : y,
|
|
1166
|
+
I
|
|
1167
|
+
);
|
|
1168
|
+
return { min: Number(M.min) || 0, max: Number(M.max) || 0 };
|
|
1169
|
+
});
|
|
1170
|
+
function is({ minimapH: t, unitW: l }) {
|
|
1171
|
+
const a = (m) => typeof m == "string" ? m.replace(/^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i, "").trim() : "";
|
|
1172
|
+
if (!Number.isFinite(t) || t <= 0 || !Number.isFinite(l) || l <= 0)
|
|
1173
|
+
return "";
|
|
1174
|
+
const s = T.value.filter((m) => !m.standalone), n = T.value.filter((m) => m.standalone), o = Math.max(0, ...T.value.map((m) => Array.isArray(m.fullSeries) ? m.fullSeries.length : m.series.length));
|
|
1175
|
+
if (o <= 0) return "";
|
|
1176
|
+
const r = o === 1 ? [l * 0.5] : Array.from({ length: o }, (m, u) => u * l);
|
|
1177
|
+
if (e.value.style.chart.lines.distributed) {
|
|
1178
|
+
const m = Array.from({ length: o }, (g, $) => {
|
|
1179
|
+
let R = 0;
|
|
1180
|
+
return s.forEach((_) => {
|
|
1181
|
+
const B = (Array.isArray(_.fullSeries) ? _.fullSeries : _.series)?.[$];
|
|
1182
|
+
B != null && !Number.isNaN(B) && (R += Math.abs(B));
|
|
1183
|
+
}), R || 1;
|
|
1184
|
+
}), u = (g) => {
|
|
1185
|
+
const $ = Math.max(0, Math.min(1, g || 0));
|
|
1186
|
+
return t - t * $;
|
|
1187
|
+
}, w = [], V = Array(o).fill(0);
|
|
1188
|
+
return s.forEach((g) => {
|
|
1189
|
+
const $ = Array.isArray(g.fullSeries) ? g.fullSeries : g.series, R = new Array(o), _ = new Array(o);
|
|
1190
|
+
for (let U = 0; U < o; U += 1) {
|
|
1191
|
+
const be = $?.[U], xe = be == null || Number.isNaN(be) ? 0 : Math.abs(be) / m[U];
|
|
1192
|
+
_[U] = V[U], V[U] += xe, R[U] = V[U];
|
|
1193
|
+
}
|
|
1194
|
+
const z = R.map(u), B = _.map(u), H = r.map((U, be) => ({ x: U, y: z[be] })), Q = r.map((U, be) => ({ x: U, y: B[be] })), J = we(H), W = we([...Q].reverse()), O = Se(H), p = Se([...Q].reverse()), L = Q[Q.length - 1];
|
|
1195
|
+
if (e.value.style.chart.lines.useArea) {
|
|
1196
|
+
const U = e.value.style.chart.lines.smooth ? `M${H[0].x},${H[0].y} ${a(J)} L${L.x},${L.y} ${a(W)} Z` : `M${H[0].x},${H[0].y} ${a(O)} L${L.x},${L.y} ${a(p)} Z`;
|
|
1197
|
+
w.push(
|
|
1198
|
+
`<path d="${U}"
|
|
1199
|
+
fill="${Zt.pattern ? `url(#pattern_${K.value}_${g.absoluteIndex})` : (e.value.style.chart.lines.gradient.show, g.color)}"
|
|
1200
|
+
opacity="${e.value.style.chart.lines.areaOpacity}"
|
|
1201
|
+
stroke="none" />`
|
|
1202
|
+
);
|
|
1203
|
+
}
|
|
1204
|
+
const q = e.value.style.chart.lines.smooth ? `M${H[0].x},${H[0].y} ${a(J)}` : `M${H[0].x},${H[0].y} ${a(O)}`;
|
|
1205
|
+
w.push(
|
|
1206
|
+
`<path d="${q}"
|
|
1207
|
+
fill="none"
|
|
1208
|
+
stroke="${g.color}"
|
|
1209
|
+
stroke-width="${e.value.style.chart.lines.strokeWidth}"
|
|
1210
|
+
stroke-linecap="round" />`
|
|
1211
|
+
);
|
|
1212
|
+
}), n.length && n.forEach((g) => {
|
|
1213
|
+
const $ = Array.isArray(g.fullSeries) ? g.fullSeries : g.series, R = Array.from({ length: o }, (Q, J) => u(Math.abs($?.[J] ?? 0) / m[J])), _ = r.map((Q, J) => ({ x: Q, y: R[J] })), z = we(_), B = Se(_), H = e.value.style.chart.lines.smooth ? `M${_[0].x},${_[0].y} ${a(z)}` : `M${_[0].x},${_[0].y} ${a(B)}`;
|
|
1214
|
+
w.push(
|
|
1215
|
+
`<path d="${H}"
|
|
1216
|
+
fill="none"
|
|
1217
|
+
stroke="${g.color}"
|
|
1218
|
+
stroke-width="${e.value.style.chart.lines.strokeWidth}"
|
|
1219
|
+
stroke-linecap="round" />`
|
|
1220
|
+
);
|
|
1221
|
+
}), w.join("");
|
|
1222
|
+
}
|
|
1223
|
+
const y = Ja.value.min, k = Ja.value.max, A = Math.abs(y), S = k + A || 1, I = (m) => Math.max(0, Math.min(t, m)), E = (m) => I(t - t * (((m ?? 0) + A) / S)), M = [];
|
|
1224
|
+
if (s.length) {
|
|
1225
|
+
const m = Array(o).fill(0), u = Array(o).fill(0);
|
|
1226
|
+
s.forEach((w) => {
|
|
1227
|
+
const V = Array.isArray(w.fullSeries) ? w.fullSeries : w.series, g = new Array(o), $ = new Array(o);
|
|
1228
|
+
for (let L = 0; L < o; L += 1) {
|
|
1229
|
+
const q = V?.[L] ?? 0;
|
|
1230
|
+
q >= 0 ? ($[L] = m[L], m[L] += q, g[L] = m[L]) : ($[L] = u[L], u[L] += q, g[L] = u[L]);
|
|
1231
|
+
}
|
|
1232
|
+
const R = g.map(E), _ = $.map(E), z = r.map((L, q) => ({ x: L, y: R[q] })), B = r.map((L, q) => ({ x: L, y: _[q] })), H = we(z), Q = we([...B].reverse()), J = Se(z), W = Se([...B].reverse()), O = B[B.length - 1];
|
|
1233
|
+
if (e.value.style.chart.lines.useArea) {
|
|
1234
|
+
const L = e.value.style.chart.lines.smooth ? `M${z[0].x},${z[0].y} ${a(H)} L${O.x},${O.y} ${a(Q)} Z` : `M${z[0].x},${z[0].y} ${a(J)} L${O.x},${O.y} ${a(W)} Z`;
|
|
1235
|
+
M.push(
|
|
1236
|
+
`<path d="${L}"
|
|
1237
|
+
fill="${Zt.pattern ? `url(#pattern_${K.value}_${w.absoluteIndex})` : (e.value.style.chart.lines.gradient.show, w.color)}"
|
|
1238
|
+
opacity="${e.value.style.chart.lines.areaOpacity}"
|
|
1239
|
+
stroke="none" />`
|
|
1240
|
+
);
|
|
1241
|
+
}
|
|
1242
|
+
const p = e.value.style.chart.lines.smooth ? `M${z[0].x},${z[0].y} ${a(H)}` : `M${z[0].x},${z[0].y} ${a(J)}`;
|
|
1243
|
+
M.push(
|
|
1244
|
+
`<path d="${p}"
|
|
1245
|
+
fill="none"
|
|
1246
|
+
stroke="${w.color}"
|
|
1247
|
+
stroke-width="${e.value.style.chart.lines.strokeWidth}"
|
|
1248
|
+
stroke-linecap="round" />`
|
|
1249
|
+
);
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
return n.length && n.forEach((m) => {
|
|
1253
|
+
const w = (Array.isArray(m.fullSeries) ? m.fullSeries : m.series).map(E), V = r.map((_, z) => ({ x: _, y: w[z] })), g = we(V), $ = Se(V), R = e.value.style.chart.lines.smooth ? `M${V[0].x},${V[0].y} ${a(g)}` : `M${V[0].x},${V[0].y} ${a($)}`;
|
|
1254
|
+
M.push(
|
|
1255
|
+
`<path d="${R}"
|
|
1256
|
+
fill="none"
|
|
1257
|
+
stroke="${m.color}"
|
|
1258
|
+
stroke-width="${e.value.style.chart.lines.strokeWidth}"
|
|
1259
|
+
stroke-linecap="round" />`
|
|
1260
|
+
);
|
|
1261
|
+
}), M.join("");
|
|
1262
|
+
}
|
|
1263
|
+
function us(t, l) {
|
|
1264
|
+
const a = e.value.style.chart.lines, s = a.dataLabels;
|
|
1265
|
+
return a.showDistributedPercentage && a.distributed ? ga.value ? l === 0 ? !s.hideEmptyPercentages : Math.abs(l) * 100 >= s.hideUnderPercentage : s.hideEmptyPercentages ? Math.abs(l) > 0 : !0 : ga.value ? (ya.value && Ft.value && console.warn("Vue Data UI - VueUiStackline - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), Math.abs(t) > cs.value * s.hideUnderPercentage / 100) : ya.value ? Math.abs(t) >= s.hideUnderValue : s.hideEmptyValues ? t !== 0 : !0;
|
|
1266
|
+
}
|
|
1267
|
+
const cs = f(() => Math.max(...T.value.flatMap((t) => t.series)));
|
|
1268
|
+
function Ka(t, l, a, s, n) {
|
|
1269
|
+
const o = n === -1 && t >= 0 ? -t : t;
|
|
1270
|
+
return et(
|
|
1271
|
+
e.value.style.chart.lines.dataLabels.formatter,
|
|
1272
|
+
o,
|
|
1273
|
+
Ce({
|
|
1274
|
+
p: e.value.style.chart.lines.dataLabels.prefix,
|
|
1275
|
+
v: o,
|
|
1276
|
+
s: e.value.style.chart.lines.dataLabels.suffix,
|
|
1277
|
+
r: e.value.style.chart.lines.dataLabels.rounding
|
|
1278
|
+
}),
|
|
1279
|
+
{ datapoint: l, seriesIndex: a, datapointIndex: s }
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1282
|
+
function vs(t, l, a, s) {
|
|
1283
|
+
return et(
|
|
1284
|
+
e.value.style.chart.lines.dataLabels.formatter,
|
|
1285
|
+
t,
|
|
1286
|
+
Ce({
|
|
1287
|
+
v: isNaN(t) ? 0 : t,
|
|
1288
|
+
s: "%",
|
|
1289
|
+
r: e.value.style.chart.lines.dataLabels.rounding
|
|
1290
|
+
}),
|
|
1291
|
+
{ datapoint: l, seriesIndex: a, datapointIndex: s }
|
|
1292
|
+
);
|
|
1293
|
+
}
|
|
1294
|
+
function Za({ seriesIndex: t, datapoint: l }) {
|
|
1295
|
+
const a = c.value.start + t;
|
|
1296
|
+
ye("selectX", {
|
|
1297
|
+
dataset: l,
|
|
1298
|
+
index: a,
|
|
1299
|
+
indexLabel: e.value.style.chart.grid.x.timeLabels.values[a]
|
|
1300
|
+
});
|
|
1301
|
+
}
|
|
1302
|
+
function ds(t) {
|
|
1303
|
+
if (t?.stage === "start") {
|
|
1304
|
+
lt.value = !0;
|
|
1305
|
+
return;
|
|
1306
|
+
}
|
|
1307
|
+
if (t?.stage === "end") {
|
|
1308
|
+
lt.value = !1;
|
|
1309
|
+
return;
|
|
1310
|
+
}
|
|
1311
|
+
ba();
|
|
1312
|
+
}
|
|
1313
|
+
async function Qa() {
|
|
1314
|
+
if (ye("copyAlt", {
|
|
1315
|
+
config: e.value,
|
|
1316
|
+
dataset: T.value
|
|
1317
|
+
}), !e.value.userOptions.callbacks.altCopy) {
|
|
1318
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1321
|
+
await Promise.resolve(e.value.userOptions.callbacks.altCopy({
|
|
1322
|
+
config: e.value,
|
|
1323
|
+
dataset: T.value
|
|
1324
|
+
}));
|
|
1325
|
+
}
|
|
1326
|
+
const Wt = h(!1);
|
|
1327
|
+
function hs() {
|
|
1328
|
+
ce.value = null, Wt.value = !0;
|
|
1329
|
+
}
|
|
1330
|
+
function ms() {
|
|
1331
|
+
ce.value = null, Be.value = "pointer", Re.value = !1, b.value = null, ye("selectX", { seriesIndex: null, datapoint: null }), Wt.value = !1;
|
|
1332
|
+
}
|
|
1333
|
+
function fs(t) {
|
|
1334
|
+
if (!he.value || Ae.value || document.activeElement !== he.value || dt.value || !Y.value) return;
|
|
1335
|
+
const l = t.key === "ArrowLeft", a = t.key === "ArrowRight", s = t.key === "Enter" || t.key === " ", n = t.key === "Escape";
|
|
1336
|
+
if (!l && !a && !s && !n) return;
|
|
1337
|
+
if (t.preventDefault(), t.stopPropagation(), n) {
|
|
1338
|
+
ce.value = null, Be.value = "pointer", Re.value = !1, b.value = null, ye("selectX", { seriesIndex: null, datapoint: null });
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
if (s) {
|
|
1342
|
+
if (ce.value === null) return;
|
|
1343
|
+
Da(ce.value);
|
|
1344
|
+
return;
|
|
1345
|
+
}
|
|
1346
|
+
let o = ce.value;
|
|
1347
|
+
const r = yt.value, y = o !== null && o >= 0 && o < Y.value, k = r !== null && r >= 0 && r < Y.value;
|
|
1348
|
+
y ? a ? (o += 1, o >= Y.value && (o = 0)) : l && (o -= 1, o < 0 && (o = Y.value - 1)) : k ? (o = a ? r + 1 : r - 1, o >= Y.value && (o = 0), o < 0 && (o = Y.value - 1)) : a ? o = 0 : o = Y.value - 1, ce.value = o, ys(o), Bt(!0, o, "keyboard");
|
|
1349
|
+
}
|
|
1350
|
+
function ys(t) {
|
|
1351
|
+
if (!Number.isFinite(t) || !he.value) return;
|
|
1352
|
+
const l = d.value.left + t * gt.value, a = d.value.top + d.value.height / 2, s = Es(l, a, he.value);
|
|
1353
|
+
s && (va.value = s);
|
|
1354
|
+
}
|
|
1355
|
+
const Ut = f(() => {
|
|
1356
|
+
const t = _e.value?.colNames ?? [], l = _e.value?.body ?? [];
|
|
1357
|
+
return { headers: t, rows: l };
|
|
1358
|
+
});
|
|
1359
|
+
return cl({
|
|
1360
|
+
getData: ns,
|
|
1361
|
+
getImage: os,
|
|
1362
|
+
generatePdf: pa,
|
|
1363
|
+
generateCsv: Ht,
|
|
1364
|
+
generateImage: ba,
|
|
1365
|
+
generateSvg: Ha,
|
|
1366
|
+
hideSeries: Ql,
|
|
1367
|
+
showSeries: Zl,
|
|
1368
|
+
toggleTable: qa,
|
|
1369
|
+
toggleLabels: Xa,
|
|
1370
|
+
toggleTooltip: Ga,
|
|
1371
|
+
toggleAnnotator: Tt,
|
|
1372
|
+
toggleFullscreen: Ua,
|
|
1373
|
+
copyAlt: Qa
|
|
1374
|
+
}), (t, l) => (i(), v("div", {
|
|
1375
|
+
id: `stackline_${K.value}`,
|
|
1376
|
+
ref_key: "stacklineChart",
|
|
1377
|
+
ref: ue,
|
|
1378
|
+
class: tl({ "vue-data-ui-component": !0, "vue-ui-stackline": !0, "vue-data-ui-wrapper-fullscreen": De.value }),
|
|
1379
|
+
style: ge(`background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
|
|
1380
|
+
onMouseenter: Ll,
|
|
1381
|
+
onMouseleave: Al
|
|
1382
|
+
}, [
|
|
1383
|
+
le("div", {
|
|
1384
|
+
id: `chart-instructions-${K.value}`,
|
|
1385
|
+
class: "sr-only"
|
|
1386
|
+
}, [
|
|
1387
|
+
le("p", null, fe(e.value.a11y.translations.keyboardNavigation), 1)
|
|
1388
|
+
], 8, oo),
|
|
1389
|
+
Ut.value?.rows?.length ? (i(), oe(eo, {
|
|
1390
|
+
key: 0,
|
|
1391
|
+
uid: K.value,
|
|
1392
|
+
head: Ut.value.headers,
|
|
1393
|
+
body: Ut.value.rows,
|
|
1394
|
+
notice: e.value.a11y.translations.tableAvailable,
|
|
1395
|
+
caption: e.value.a11y.translations.tableCaption
|
|
1396
|
+
}, null, 8, ["uid", "head", "body", "notice", "caption"])) : x("", !0),
|
|
1397
|
+
e.value.userOptions.buttons.annotator ? (i(), oe(C(yl), {
|
|
1398
|
+
key: 1,
|
|
1399
|
+
svgRef: C(he),
|
|
1400
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1401
|
+
color: e.value.style.chart.color,
|
|
1402
|
+
active: Ae.value,
|
|
1403
|
+
isCursorPointer: ve.value,
|
|
1404
|
+
onClose: Tt
|
|
1405
|
+
}, {
|
|
1406
|
+
"annotator-action-close": P(() => [
|
|
1407
|
+
N(t.$slots, "annotator-action-close", {}, void 0, !0)
|
|
1408
|
+
]),
|
|
1409
|
+
"annotator-action-color": P(({ color: a }) => [
|
|
1410
|
+
N(t.$slots, "annotator-action-color", ee(te({ color: a })), void 0, !0)
|
|
1411
|
+
]),
|
|
1412
|
+
"annotator-action-draw": P(({ mode: a }) => [
|
|
1413
|
+
N(t.$slots, "annotator-action-draw", ee(te({ mode: a })), void 0, !0)
|
|
1414
|
+
]),
|
|
1415
|
+
"annotator-action-undo": P(({ disabled: a }) => [
|
|
1416
|
+
N(t.$slots, "annotator-action-undo", ee(te({ disabled: a })), void 0, !0)
|
|
1417
|
+
]),
|
|
1418
|
+
"annotator-action-redo": P(({ disabled: a }) => [
|
|
1419
|
+
N(t.$slots, "annotator-action-redo", ee(te({ disabled: a })), void 0, !0)
|
|
1420
|
+
]),
|
|
1421
|
+
"annotator-action-delete": P(({ disabled: a }) => [
|
|
1422
|
+
N(t.$slots, "annotator-action-delete", ee(te({ disabled: a })), void 0, !0)
|
|
1423
|
+
]),
|
|
1424
|
+
_: 3
|
|
1425
|
+
}, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : x("", !0),
|
|
1426
|
+
N(t.$slots, "userConfig", {}, void 0, !0),
|
|
1427
|
+
Tl.value ? (i(), v("div", {
|
|
1428
|
+
key: 2,
|
|
1429
|
+
ref_key: "noTitle",
|
|
1430
|
+
ref: la,
|
|
1431
|
+
class: "vue-data-ui-no-title-space",
|
|
1432
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1433
|
+
}, null, 512)) : x("", !0),
|
|
1434
|
+
e.value.style.chart.title.text ? (i(), v("div", {
|
|
1435
|
+
key: 3,
|
|
1436
|
+
ref_key: "chartTitle",
|
|
1437
|
+
ref: ta,
|
|
1438
|
+
style: "width:100%;background:transparent;"
|
|
1439
|
+
}, [
|
|
1440
|
+
(i(), oe(Ks, {
|
|
1441
|
+
key: `title_${oa.value}`,
|
|
1442
|
+
config: {
|
|
1443
|
+
title: {
|
|
1444
|
+
cy: "stackline-title",
|
|
1445
|
+
...e.value.style.chart.title
|
|
1446
|
+
},
|
|
1447
|
+
subtitle: {
|
|
1448
|
+
cy: "stackline-subtitle",
|
|
1449
|
+
...e.value.style.chart.title.subtitle
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
}, null, 8, ["config"]))
|
|
1453
|
+
], 512)) : x("", !0),
|
|
1454
|
+
le("div", {
|
|
1455
|
+
id: `legend-top-${K.value}`
|
|
1456
|
+
}, null, 8, no),
|
|
1457
|
+
e.value.userOptions.show && Ee.value && (C(fa) || C(Pt)) ? (i(), oe(C(gl), {
|
|
1458
|
+
ref_key: "userOptionsRef",
|
|
1459
|
+
ref: $t,
|
|
1460
|
+
key: `user_option_${ea.value}`,
|
|
1461
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1462
|
+
color: e.value.style.chart.color,
|
|
1463
|
+
isPrinting: C(zt),
|
|
1464
|
+
isImaging: C(_t),
|
|
1465
|
+
uid: K.value,
|
|
1466
|
+
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
1467
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
1468
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
1469
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
1470
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
1471
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
1472
|
+
hasLabel: e.value.userOptions.buttons.labels,
|
|
1473
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
1474
|
+
hasAltCopy: e.value.userOptions.buttons.altCopy,
|
|
1475
|
+
isFullscreen: De.value,
|
|
1476
|
+
chartElement: ue.value,
|
|
1477
|
+
position: e.value.userOptions.position,
|
|
1478
|
+
isTooltip: j.value.showTooltip,
|
|
1479
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
1480
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
1481
|
+
isAnnotation: Ae.value,
|
|
1482
|
+
callbacks: e.value.userOptions.callbacks,
|
|
1483
|
+
printScale: e.value.userOptions.print.scale,
|
|
1484
|
+
tableDialog: e.value.table.useDialog,
|
|
1485
|
+
isCursorPointer: ve.value,
|
|
1486
|
+
onToggleFullscreen: Ua,
|
|
1487
|
+
onGeneratePdf: C(pa),
|
|
1488
|
+
onGenerateCsv: Ht,
|
|
1489
|
+
onGenerateImage: ds,
|
|
1490
|
+
onGenerateSvg: Ha,
|
|
1491
|
+
onToggleTable: qa,
|
|
1492
|
+
onToggleLabels: Xa,
|
|
1493
|
+
onToggleTooltip: Ga,
|
|
1494
|
+
onToggleAnnotator: Tt,
|
|
1495
|
+
onCopyAlt: Qa,
|
|
1496
|
+
style: ge({
|
|
1497
|
+
visibility: C(fa) ? C(Pt) ? "visible" : "hidden" : "visible"
|
|
1498
|
+
})
|
|
1499
|
+
}, jt({ _: 2 }, [
|
|
1500
|
+
t.$slots.menuIcon ? {
|
|
1501
|
+
name: "menuIcon",
|
|
1502
|
+
fn: P(({ isOpen: a, color: s }) => [
|
|
1503
|
+
N(t.$slots, "menuIcon", ee(te({ isOpen: a, color: s })), void 0, !0)
|
|
1504
|
+
]),
|
|
1505
|
+
key: "0"
|
|
1506
|
+
} : void 0,
|
|
1507
|
+
t.$slots.optionTooltip ? {
|
|
1508
|
+
name: "optionTooltip",
|
|
1509
|
+
fn: P(() => [
|
|
1510
|
+
N(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
1511
|
+
]),
|
|
1512
|
+
key: "1"
|
|
1513
|
+
} : void 0,
|
|
1514
|
+
t.$slots.optionPdf ? {
|
|
1515
|
+
name: "optionPdf",
|
|
1516
|
+
fn: P(() => [
|
|
1517
|
+
N(t.$slots, "optionPdf", {}, void 0, !0)
|
|
1518
|
+
]),
|
|
1519
|
+
key: "2"
|
|
1520
|
+
} : void 0,
|
|
1521
|
+
t.$slots.optionCsv ? {
|
|
1522
|
+
name: "optionCsv",
|
|
1523
|
+
fn: P(() => [
|
|
1524
|
+
N(t.$slots, "optionCsv", {}, void 0, !0)
|
|
1525
|
+
]),
|
|
1526
|
+
key: "3"
|
|
1527
|
+
} : void 0,
|
|
1528
|
+
t.$slots.optionImg ? {
|
|
1529
|
+
name: "optionImg",
|
|
1530
|
+
fn: P(() => [
|
|
1531
|
+
N(t.$slots, "optionImg", {}, void 0, !0)
|
|
1532
|
+
]),
|
|
1533
|
+
key: "4"
|
|
1534
|
+
} : void 0,
|
|
1535
|
+
t.$slots.optionSvg ? {
|
|
1536
|
+
name: "optionSvg",
|
|
1537
|
+
fn: P(() => [
|
|
1538
|
+
N(t.$slots, "optionSvg", {}, void 0, !0)
|
|
1539
|
+
]),
|
|
1540
|
+
key: "5"
|
|
1541
|
+
} : void 0,
|
|
1542
|
+
t.$slots.optionTable ? {
|
|
1543
|
+
name: "optionTable",
|
|
1544
|
+
fn: P(() => [
|
|
1545
|
+
N(t.$slots, "optionTable", {}, void 0, !0)
|
|
1546
|
+
]),
|
|
1547
|
+
key: "6"
|
|
1548
|
+
} : void 0,
|
|
1549
|
+
t.$slots.optionLabels ? {
|
|
1550
|
+
name: "optionLabels",
|
|
1551
|
+
fn: P(() => [
|
|
1552
|
+
N(t.$slots, "optionLabels", {}, void 0, !0)
|
|
1553
|
+
]),
|
|
1554
|
+
key: "7"
|
|
1555
|
+
} : void 0,
|
|
1556
|
+
t.$slots.optionFullscreen ? {
|
|
1557
|
+
name: "optionFullscreen",
|
|
1558
|
+
fn: P(({ toggleFullscreen: a, isFullscreen: s }) => [
|
|
1559
|
+
N(t.$slots, "optionFullscreen", ee(te({ toggleFullscreen: a, isFullscreen: s })), void 0, !0)
|
|
1560
|
+
]),
|
|
1561
|
+
key: "8"
|
|
1562
|
+
} : void 0,
|
|
1563
|
+
t.$slots.optionAnnotator ? {
|
|
1564
|
+
name: "optionAnnotator",
|
|
1565
|
+
fn: P(({ toggleAnnotator: a, isAnnotator: s }) => [
|
|
1566
|
+
N(t.$slots, "optionAnnotator", ee(te({ toggleAnnotator: a, isAnnotator: s })), void 0, !0)
|
|
1567
|
+
]),
|
|
1568
|
+
key: "9"
|
|
1569
|
+
} : void 0,
|
|
1570
|
+
t.$slots.optionAltCopy ? {
|
|
1571
|
+
name: "optionAltCopy",
|
|
1572
|
+
fn: P(({ altCopy: a }) => [
|
|
1573
|
+
N(t.$slots, "optionAltCopy", ee(te({ altCopy: a })), void 0, !0)
|
|
1574
|
+
]),
|
|
1575
|
+
key: "10"
|
|
1576
|
+
} : void 0
|
|
1577
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "hasAltCopy", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : x("", !0),
|
|
1578
|
+
le("div", ro, [
|
|
1579
|
+
(i(), v("svg", {
|
|
1580
|
+
ref_key: "svgRef",
|
|
1581
|
+
ref: he,
|
|
1582
|
+
"aria-describedby": `chart-instructions-${K.value}`,
|
|
1583
|
+
xmlns: C(Ns),
|
|
1584
|
+
viewBox: `0 0 ${d.value.chartWidth <= 0 ? 10 : d.value.chartWidth} ${d.value.chartHeight <= 0 ? 10 : d.value.chartHeight}`,
|
|
1585
|
+
class: tl({ "vue-data-ui-loading": C(de), "no-transition": !e.value.useCssAnimation }),
|
|
1586
|
+
style: ge(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`),
|
|
1587
|
+
role: "img",
|
|
1588
|
+
"aria-live": "polite",
|
|
1589
|
+
tabindex: "0",
|
|
1590
|
+
preserveAspectRatio: "xMidYMid",
|
|
1591
|
+
onMousemove: Xl,
|
|
1592
|
+
onMouseleave: Dt,
|
|
1593
|
+
onClick: Gl,
|
|
1594
|
+
onFocus: hs,
|
|
1595
|
+
onBlur: ms,
|
|
1596
|
+
onKeydown: fs
|
|
1597
|
+
}, [
|
|
1598
|
+
Ze(C(pl)),
|
|
1599
|
+
(i(!0), v(F, null, X(Me.value, (a) => (i(), v(F, null, [
|
|
1600
|
+
t.$slots.pattern ? (i(), v("defs", uo, [
|
|
1601
|
+
N(t.$slots, "pattern", bt({ ref_for: !0 }, { seriesIndex: a.absoluteIndex, patternId: `pattern_${K.value}_${a.absoluteIndex}` }), void 0, !0)
|
|
1602
|
+
])) : x("", !0)
|
|
1603
|
+
], 64))), 256)),
|
|
1604
|
+
t.$slots["chart-background"] ? (i(), v("foreignObject", {
|
|
1605
|
+
key: 0,
|
|
1606
|
+
x: ae.value.left,
|
|
1607
|
+
y: d.value.top,
|
|
1608
|
+
width: ae.value.width,
|
|
1609
|
+
height: d.value.height,
|
|
1610
|
+
style: {
|
|
1611
|
+
pointerEvents: "none"
|
|
1612
|
+
}
|
|
1613
|
+
}, [
|
|
1614
|
+
N(t.$slots, "chart-background", {}, void 0, !0)
|
|
1615
|
+
], 8, co)) : x("", !0),
|
|
1616
|
+
e.value.style.chart.lines.gradient.show ? (i(), v("defs", vo, [
|
|
1617
|
+
(i(!0), v(F, null, X(T.value, (a, s) => (i(), v("linearGradient", {
|
|
1618
|
+
id: `gradient_${a.id}`,
|
|
1619
|
+
x1: "0%",
|
|
1620
|
+
y1: "0%",
|
|
1621
|
+
x2: "0%",
|
|
1622
|
+
y2: "100%"
|
|
1623
|
+
}, [
|
|
1624
|
+
le("stop", {
|
|
1625
|
+
offset: "0%",
|
|
1626
|
+
"stop-color": a.color
|
|
1627
|
+
}, null, 8, mo),
|
|
1628
|
+
le("stop", {
|
|
1629
|
+
offset: "100%",
|
|
1630
|
+
"stop-color": C(Ps)(a.color, e.value.style.chart.lines.gradient.intensity / 100)
|
|
1631
|
+
}, null, 8, fo)
|
|
1632
|
+
], 8, ho))), 256))
|
|
1633
|
+
])) : x("", !0),
|
|
1634
|
+
e.value.style.chart.grid.x.showHorizontalLines ? (i(!0), v(F, { key: 2 }, X(Ie.value, (a, s) => (i(), v("line", {
|
|
1635
|
+
x1: ae.value.left,
|
|
1636
|
+
x2: ae.value.right,
|
|
1637
|
+
y1: a.y,
|
|
1638
|
+
y2: a.y,
|
|
1639
|
+
stroke: e.value.style.chart.grid.x.linesColor,
|
|
1640
|
+
"stroke-width": e.value.style.chart.grid.x.linesThickness,
|
|
1641
|
+
"stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
|
|
1642
|
+
"stroke-linecap": "round"
|
|
1643
|
+
}, null, 8, yo))), 256)) : x("", !0),
|
|
1644
|
+
e.value.style.chart.grid.y.showVerticalLines ? (i(!0), v(F, { key: 3 }, X(c.value.end - c.value.start, (a, s) => (i(), v("line", {
|
|
1645
|
+
x1: ie(s),
|
|
1646
|
+
x2: ie(s),
|
|
1647
|
+
y1: d.value.top,
|
|
1648
|
+
y2: d.value.bottom,
|
|
1649
|
+
stroke: e.value.style.chart.grid.y.linesColor,
|
|
1650
|
+
"stroke-width": e.value.style.chart.grid.y.linesThickness,
|
|
1651
|
+
"stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
|
|
1652
|
+
"stroke-linecap": "round"
|
|
1653
|
+
}, null, 8, go))), 256)) : x("", !0),
|
|
1654
|
+
e.value.style.chart.grid.x.showAxis ? (i(), v("line", {
|
|
1655
|
+
key: 4,
|
|
1656
|
+
x1: ae.value.left,
|
|
1657
|
+
x2: ae.value.right,
|
|
1658
|
+
y1: d.value.bottom,
|
|
1659
|
+
y2: d.value.bottom,
|
|
1660
|
+
stroke: e.value.style.chart.grid.x.axisColor,
|
|
1661
|
+
"stroke-width": e.value.style.chart.grid.x.axisThickness,
|
|
1662
|
+
"stroke-linecap": "round",
|
|
1663
|
+
"stroke-linejoin": "round"
|
|
1664
|
+
}, null, 8, po)) : x("", !0),
|
|
1665
|
+
e.value.style.chart.grid.y.showAxis && !e.value.style.chart.lines.distributed ? (i(), v("line", {
|
|
1666
|
+
key: 5,
|
|
1667
|
+
x1: ae.value.left,
|
|
1668
|
+
x2: ae.value.left,
|
|
1669
|
+
y1: d.value.top,
|
|
1670
|
+
y2: d.value.bottom,
|
|
1671
|
+
stroke: e.value.style.chart.grid.y.axisColor,
|
|
1672
|
+
"stroke-width": e.value.style.chart.grid.y.axisThickness,
|
|
1673
|
+
"stroke-linecap": "round",
|
|
1674
|
+
"stroke-linejoin": "round"
|
|
1675
|
+
}, null, 8, bo)) : x("", !0),
|
|
1676
|
+
e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (i(), v("text", {
|
|
1677
|
+
key: 6,
|
|
1678
|
+
ref_key: "xAxisLabel",
|
|
1679
|
+
ref: ot,
|
|
1680
|
+
x: d.value.left + d.value.width / 2,
|
|
1681
|
+
y: d.value.chartHeight - 3,
|
|
1682
|
+
"font-size": e.value.style.chart.grid.x.axisName.fontSize,
|
|
1683
|
+
fill: e.value.style.chart.grid.x.axisName.color,
|
|
1684
|
+
"font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
|
|
1685
|
+
"text-anchor": "middle"
|
|
1686
|
+
}, fe(e.value.style.chart.grid.x.axisName.text), 9, xo)) : x("", !0),
|
|
1687
|
+
e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (i(), v("text", {
|
|
1688
|
+
key: 7,
|
|
1689
|
+
ref_key: "yAxisLabel",
|
|
1690
|
+
ref: Ct,
|
|
1691
|
+
transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize}, ${d.value.top + d.value.height / 2}) rotate(-90)`,
|
|
1692
|
+
"font-size": e.value.style.chart.grid.y.axisName.fontSize,
|
|
1693
|
+
fill: e.value.style.chart.grid.y.axisName.color,
|
|
1694
|
+
"font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
|
|
1695
|
+
"text-anchor": "middle"
|
|
1696
|
+
}, fe(e.value.style.chart.grid.y.axisName.text), 9, ko)) : x("", !0),
|
|
1697
|
+
e.value.style.chart.grid.frame.show ? (i(), v("rect", {
|
|
1698
|
+
key: 8,
|
|
1699
|
+
style: { pointerEvents: "none", transition: "none", animation: "none !important" },
|
|
1700
|
+
x: ae.value.left,
|
|
1701
|
+
y: d.value.top,
|
|
1702
|
+
width: ae.value.width,
|
|
1703
|
+
height: d.value.height,
|
|
1704
|
+
fill: "transparent",
|
|
1705
|
+
stroke: e.value.style.chart.grid.frame.stroke,
|
|
1706
|
+
"stroke-width": e.value.style.chart.grid.frame.strokeWidth,
|
|
1707
|
+
"stroke-linecap": e.value.style.chart.grid.frame.strokeLinecap,
|
|
1708
|
+
"stroke-linejoin": e.value.style.chart.grid.frame.strokeLinejoin,
|
|
1709
|
+
"stroke-dasharray": e.value.style.chart.grid.frame.strokeDasharray
|
|
1710
|
+
}, null, 8, wo)) : x("", !0),
|
|
1711
|
+
(i(!0), v(F, null, X(T.value, (a) => (i(), v(F, null, [
|
|
1712
|
+
e.value.style.chart.lines.useArea && !a.standalone ? (i(), v("path", {
|
|
1713
|
+
key: 0,
|
|
1714
|
+
d: e.value.style.chart.lines.smooth ? a.smoothArea : a.straightArea,
|
|
1715
|
+
fill: t.$slots.pattern ? `url(#pattern_${K.value}_${a.absoluteIndex})` : e.value.style.chart.lines.gradient.show ? `url(#gradient_${a.id})` : a.color,
|
|
1716
|
+
opacity: e.value.style.chart.lines.areaOpacity,
|
|
1717
|
+
style: ge({
|
|
1718
|
+
transition: C(de) || !e.value.useCssAnimation ? void 0 : "all 0.3s ease-in-out"
|
|
1719
|
+
})
|
|
1720
|
+
}, null, 12, So)) : x("", !0)
|
|
1721
|
+
], 64))), 256)),
|
|
1722
|
+
(i(!0), v(F, null, X(T.value, (a) => (i(), v("path", {
|
|
1723
|
+
d: e.value.style.chart.lines.smooth ? a.smoothPath : a.straightPath,
|
|
1724
|
+
stroke: a.color,
|
|
1725
|
+
"stroke-width": e.value.style.chart.lines.strokeWidth,
|
|
1726
|
+
fill: "none",
|
|
1727
|
+
"stroke-linecap": "round",
|
|
1728
|
+
style: ge({
|
|
1729
|
+
transition: C(de) || !e.value.useCssAnimation ? void 0 : "all 0.3s ease-in-out"
|
|
1730
|
+
})
|
|
1731
|
+
}, null, 12, Mo))), 256)),
|
|
1732
|
+
e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.lines.distributed ? (i(), v("g", {
|
|
1733
|
+
key: 9,
|
|
1734
|
+
ref_key: "scaleLabels",
|
|
1735
|
+
ref: Lt
|
|
1736
|
+
}, [
|
|
1737
|
+
(i(!0), v(F, null, X(Ie.value, (a, s) => (i(), v("line", {
|
|
1738
|
+
x1: ae.value.left,
|
|
1739
|
+
x2: ae.value.left - 6,
|
|
1740
|
+
y1: a.y,
|
|
1741
|
+
y2: a.y,
|
|
1742
|
+
stroke: e.value.style.chart.grid.x.axisColor,
|
|
1743
|
+
"stroke-width": 1
|
|
1744
|
+
}, null, 8, $o))), 256)),
|
|
1745
|
+
(i(!0), v(F, null, X(Ie.value, (a, s) => (i(), v("text", {
|
|
1746
|
+
x: a.x,
|
|
1747
|
+
y: a.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
|
|
1748
|
+
"font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
|
|
1749
|
+
"font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
|
|
1750
|
+
fill: e.value.style.chart.grid.y.axisLabels.color,
|
|
1751
|
+
"text-anchor": "end"
|
|
1752
|
+
}, fe(C(et)(
|
|
1753
|
+
e.value.style.chart.grid.y.axisLabels.formatter,
|
|
1754
|
+
a.value,
|
|
1755
|
+
C(Ce)({
|
|
1756
|
+
p: e.value.style.chart.lines.dataLabels.prefix,
|
|
1757
|
+
v: a.value,
|
|
1758
|
+
s: e.value.style.chart.lines.dataLabels.suffix,
|
|
1759
|
+
r: e.value.style.chart.grid.y.axisLabels.rounding
|
|
1760
|
+
}),
|
|
1761
|
+
{ datapoint: a }
|
|
1762
|
+
)), 9, Co))), 256))
|
|
1763
|
+
], 512)) : x("", !0),
|
|
1764
|
+
e.value.style.chart.grid.x.timeLabels.show ? (i(), v("g", {
|
|
1765
|
+
key: 10,
|
|
1766
|
+
ref_key: "timeLabelsEls",
|
|
1767
|
+
ref: nt
|
|
1768
|
+
}, [
|
|
1769
|
+
t.$slots["time-label"] ? (i(), v("g", Lo, [
|
|
1770
|
+
(i(!0), v(F, null, X(ht.value, (a, s) => (i(), v("g", null, [
|
|
1771
|
+
N(t.$slots, "time-label", bt({ ref_for: !0 }, {
|
|
1772
|
+
x: d.value.left + vt.value * s + vt.value / 2,
|
|
1773
|
+
y: d.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
|
|
1774
|
+
fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1775
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1776
|
+
transform: `translate(${d.value.left + vt.value * s + vt.value / 2}, ${d.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
|
|
1777
|
+
absoluteIndex: a.absoluteIndex,
|
|
1778
|
+
content: a.text,
|
|
1779
|
+
textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1780
|
+
show: !0
|
|
1781
|
+
}), void 0, !0)
|
|
1782
|
+
]))), 256))
|
|
1783
|
+
])) : (i(), v("g", Ao, [
|
|
1784
|
+
(i(!0), v(F, null, X(ht.value, (a, s) => (i(), v("g", null, [
|
|
1785
|
+
String(a.text).includes(`
|
|
1786
|
+
`) ? (i(), v("text", {
|
|
1787
|
+
key: s + "-multi",
|
|
1788
|
+
"text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1789
|
+
"font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1790
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1791
|
+
transform: `
|
|
1792
|
+
translate(
|
|
1793
|
+
${ie(s)},
|
|
1794
|
+
${d.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}
|
|
1795
|
+
),
|
|
1796
|
+
rotate(${e.value.style.chart.grid.x.timeLabels.rotation})
|
|
1797
|
+
`,
|
|
1798
|
+
style: ge({ cursor: ve.value ? "pointer" : "default" }),
|
|
1799
|
+
innerHTML: t.createTSpansFromLineBreaksOnX({
|
|
1800
|
+
content: String(a.text),
|
|
1801
|
+
fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1802
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1803
|
+
x: 0,
|
|
1804
|
+
y: 0
|
|
1805
|
+
}),
|
|
1806
|
+
onClick: () => Va(a, s)
|
|
1807
|
+
}, null, 12, No)) : (i(), v("text", {
|
|
1808
|
+
class: "vue-data-ui-time-label",
|
|
1809
|
+
key: s,
|
|
1810
|
+
"text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
|
|
1811
|
+
"font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
|
|
1812
|
+
"font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
|
|
1813
|
+
fill: e.value.style.chart.grid.x.timeLabels.color,
|
|
1814
|
+
transform: `translate(${ie(s)}, ${d.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
|
|
1815
|
+
style: ge({ cursor: ve.value ? "pointer" : "default" }),
|
|
1816
|
+
onClick: () => Va(a, s)
|
|
1817
|
+
}, fe(a.text), 13, To))
|
|
1818
|
+
]))), 256))
|
|
1819
|
+
]))
|
|
1820
|
+
], 512)) : x("", !0),
|
|
1821
|
+
(Le.value || ![null, void 0].includes(b.value)) && !e.value.style.chart.highlighter.useLine ? (i(!0), v(F, { key: 11 }, X(c.value.end - c.value.start, (a, s) => (i(), v("g", {
|
|
1822
|
+
key: `tooltip_trap_highlighter_${s}`
|
|
1823
|
+
}, [
|
|
1824
|
+
le("rect", {
|
|
1825
|
+
x: Oa(s).x,
|
|
1826
|
+
y: d.value.top,
|
|
1827
|
+
height: d.value.height,
|
|
1828
|
+
width: Oa(s).width,
|
|
1829
|
+
fill: [Ye.value, b.value].includes(s) ? C(Is)(e.value.style.chart.highlighter.color, e.value.style.chart.highlighter.opacity) : "transparent",
|
|
1830
|
+
style: { transition: "none !important", animation: "none !important" }
|
|
1831
|
+
}, null, 8, Po)
|
|
1832
|
+
]))), 128)) : x("", !0),
|
|
1833
|
+
(Le.value || ![null, void 0].includes(b.value)) && e.value.style.chart.highlighter.useLine ? (i(), v(F, { key: 12 }, [
|
|
1834
|
+
![null, void 0].includes(b.value) || ![null, void 0].includes(Ye.value) ? (i(), v("g", Io, [
|
|
1835
|
+
le("line", {
|
|
1836
|
+
x1: ie((b.value ?? Ye.value) || 0),
|
|
1837
|
+
x2: ie((b.value ?? Ye.value) || 0),
|
|
1838
|
+
y1: C(tt)(d.value.top),
|
|
1839
|
+
y2: C(tt)(d.value.bottom),
|
|
1840
|
+
stroke: e.value.style.chart.highlighter.color,
|
|
1841
|
+
"stroke-width": e.value.style.chart.highlighter.lineWidth,
|
|
1842
|
+
"stroke-dasharray": e.value.style.chart.highlighter.lineDasharray,
|
|
1843
|
+
"stroke-linecap": "round",
|
|
1844
|
+
style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
|
|
1845
|
+
}, null, 8, zo)
|
|
1846
|
+
])) : x("", !0)
|
|
1847
|
+
], 64)) : x("", !0),
|
|
1848
|
+
(i(!0), v(F, null, X(T.value, (a) => (i(), v(F, null, [
|
|
1849
|
+
Le.value && c.value.end - c.value.start > e.value.style.chart.lines.dot.hideAboveMaxSerieLength ? (i(), v("g", _o, [
|
|
1850
|
+
b.value != null ? (i(), v(F, { key: 0 }, [
|
|
1851
|
+
a.rel.includes(b.value) && a.fullSeries?.[c.value.start + b.value] != null && !Number.isNaN(a.fullSeries?.[c.value.start + b.value]) ? (i(), oe(Kt, {
|
|
1852
|
+
key: 0,
|
|
1853
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(a.shape) ? a.shape : "circle",
|
|
1854
|
+
color: e.value.style.chart.lines.dot.useSerieColor ? a.color : e.value.style.chart.lines.dot.fill,
|
|
1855
|
+
plot: {
|
|
1856
|
+
x: C(rl)(a.points[a.rel.indexOf(b.value)].x),
|
|
1857
|
+
y: C(rl)(a.points[a.rel.indexOf(b.value)].y)
|
|
1858
|
+
},
|
|
1859
|
+
radius: e.value.style.chart.lines.dot.radius * 1.3,
|
|
1860
|
+
stroke: e.value.style.chart.lines.dot.useSerieColor ? e.value.style.chart.backgroundColor : a.color,
|
|
1861
|
+
strokeWidth: e.value.style.chart.lines.dot.strokeWidth,
|
|
1862
|
+
transition: C(de) ? void 0 : `all ${e.value.style.chart.lines.transitionDurationMs}ms ease-in-out`
|
|
1863
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : x("", !0)
|
|
1864
|
+
], 64)) : x("", !0)
|
|
1865
|
+
])) : x("", !0)
|
|
1866
|
+
], 64))), 256)),
|
|
1867
|
+
(i(!0), v(F, null, X(T.value, (a) => (i(), v(F, null, [
|
|
1868
|
+
c.value.end - c.value.start < e.value.style.chart.lines.dot.hideAboveMaxSerieLength ? (i(!0), v(F, { key: 0 }, X(a.points, (s, n) => (i(), v("g", { key: n }, [
|
|
1869
|
+
a.fullSeries?.[c.value.start + a.rel[n]] != null && !Number.isNaN(a.fullSeries?.[c.value.start + a.rel[n]]) ? (i(), oe(Kt, {
|
|
1870
|
+
key: 0,
|
|
1871
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(a.shape) ? a.shape : "circle",
|
|
1872
|
+
color: e.value.style.chart.lines.dot.useSerieColor ? a.color : e.value.style.chart.lines.dot.fill,
|
|
1873
|
+
plot: { x: s.x, y: s.y },
|
|
1874
|
+
radius: Le.value && b.value === a.rel[n] ? e.value.style.chart.lines.dot.radius * 1.3 : e.value.style.chart.lines.dot.radius,
|
|
1875
|
+
stroke: e.value.style.chart.lines.dot.useSerieColor ? e.value.style.chart.backgroundColor : a.color,
|
|
1876
|
+
strokeWidth: e.value.style.chart.lines.dot.strokeWidth,
|
|
1877
|
+
transition: C(de) ? void 0 : `all ${e.value.style.chart.lines.transitionDurationMs}ms ease-in-out`
|
|
1878
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : x("", !0)
|
|
1879
|
+
]))), 128)) : x("", !0)
|
|
1880
|
+
], 64))), 256)),
|
|
1881
|
+
j.value.dataLabels.show && e.value.style.chart.lines.dataLabels.hideAboveMaxSerieLength > c.value.end - c.value.start ? (i(), v(F, { key: 13 }, [
|
|
1882
|
+
(i(!0), v(F, null, X(T.value, (a, s) => (i(), v("g", { key: s }, [
|
|
1883
|
+
(i(!0), v(F, null, X(a.points, (n, o) => (i(), v(F, { key: o }, [
|
|
1884
|
+
us(a.series[o], a.proportions[o]) ? (i(), v("text", {
|
|
1885
|
+
key: 0,
|
|
1886
|
+
x: n.x,
|
|
1887
|
+
y: n.y + (a.series[o] >= 0 ? -e.value.style.chart.lines.dataLabels.fontSize / 2 + e.value.style.chart.lines.dataLabels.offsetY : e.value.style.chart.lines.dataLabels.fontSize * 1.2 - e.value.style.chart.lines.dataLabels.offsetY),
|
|
1888
|
+
"font-size": e.value.style.chart.lines.dataLabels.fontSize,
|
|
1889
|
+
fill: e.value.style.chart.lines.dataLabels.color,
|
|
1890
|
+
"font-weight": e.value.style.chart.lines.dataLabels.bold ? "bold" : "normal",
|
|
1891
|
+
"text-anchor": "middle"
|
|
1892
|
+
}, fe(e.value.style.chart.lines.showDistributedPercentage && e.value.style.chart.lines.distributed ? vs(a.proportions[o] * 100, a, s, a.rel[o]) : Ka(a.series[o], a, s, a.rel[o], a.signedSeries[o])), 9, Fo)) : x("", !0)
|
|
1893
|
+
], 64))), 128))
|
|
1894
|
+
]))), 128)),
|
|
1895
|
+
e.value.style.chart.lines.totalValues.show && T.value.length > 1 ? (i(), v("g", {
|
|
1896
|
+
key: 0,
|
|
1897
|
+
ref_key: "sumTop",
|
|
1898
|
+
ref: $l
|
|
1899
|
+
}, [
|
|
1900
|
+
(i(!0), v(F, null, X(Aa.value, (a, s) => (i(), v(F, null, [
|
|
1901
|
+
!e.value.style.chart.lines.dataLabels.hideEmptyValues || a.value !== 0 ? (i(), v("text", {
|
|
1902
|
+
key: 0,
|
|
1903
|
+
x: ie(s),
|
|
1904
|
+
y: Vl(s),
|
|
1905
|
+
"text-anchor": "middle",
|
|
1906
|
+
"font-size": e.value.style.chart.lines.totalValues.fontSize,
|
|
1907
|
+
"font-weight": e.value.style.chart.lines.totalValues.bold ? "bold" : "normal",
|
|
1908
|
+
fill: e.value.style.chart.lines.totalValues.color
|
|
1909
|
+
}, fe(Ka(a.value, a, s, s, a.sign)), 9, Eo)) : x("", !0)
|
|
1910
|
+
], 64))), 256))
|
|
1911
|
+
], 512)) : x("", !0)
|
|
1912
|
+
], 64)) : x("", !0),
|
|
1913
|
+
Sa.value ? (i(), v("rect", bt({ key: 14 }, _l.value, {
|
|
1914
|
+
"data-start": c.value.start,
|
|
1915
|
+
"data-end": c.value.end
|
|
1916
|
+
}), null, 16, Ro)) : x("", !0),
|
|
1917
|
+
N(t.$slots, "svg", {
|
|
1918
|
+
svg: {
|
|
1919
|
+
drawingArea: d.value,
|
|
1920
|
+
data: T.value,
|
|
1921
|
+
isPrintingImg: C(zt) | C(_t) | lt.value,
|
|
1922
|
+
isPrintingSvg: st.value
|
|
1923
|
+
}
|
|
1924
|
+
}, void 0, !0)
|
|
1925
|
+
], 46, io)),
|
|
1926
|
+
t.$slots.hint ? (i(), v("div", Oo, [
|
|
1927
|
+
N(t.$slots, "hint", ee(te({ hint: e.value.a11y.translations.keyboardNavigation, isVisible: Wt.value })), void 0, !0)
|
|
1928
|
+
])) : x("", !0)
|
|
1929
|
+
]),
|
|
1930
|
+
t.$slots.watermark ? (i(), v("div", Do, [
|
|
1931
|
+
N(t.$slots, "watermark", ee(te({ isPrinting: C(zt) || C(_t) || lt.value || st.value })), void 0, !0)
|
|
1932
|
+
])) : x("", !0),
|
|
1933
|
+
na.value ? (i(), oe(xs, {
|
|
1934
|
+
key: 6,
|
|
1935
|
+
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${K.value}` : `#legend-bottom-${K.value}`
|
|
1936
|
+
}, [
|
|
1937
|
+
le("div", {
|
|
1938
|
+
ref_key: "chartLegend",
|
|
1939
|
+
ref: aa
|
|
1940
|
+
}, [
|
|
1941
|
+
e.value.style.chart.legend.show ? (i(), oe(Qs, {
|
|
1942
|
+
key: 0,
|
|
1943
|
+
legendSet: Xe.value,
|
|
1944
|
+
config: Kl.value,
|
|
1945
|
+
isCursorPointer: ve.value,
|
|
1946
|
+
onClickMarker: l[0] || (l[0] = ({ legend: a }) => a.segregate())
|
|
1947
|
+
}, jt({
|
|
1948
|
+
item: P(({ legend: a }) => [
|
|
1949
|
+
C(de) ? x("", !0) : (i(), v("div", {
|
|
1950
|
+
key: 0,
|
|
1951
|
+
onClick: (s) => a.segregate(),
|
|
1952
|
+
style: ge(`opacity:${D.value.includes(a.id) ? 0.5 : 1}`)
|
|
1953
|
+
}, fe(a.name), 13, Vo))
|
|
1954
|
+
]),
|
|
1955
|
+
legendToggle: P(() => [
|
|
1956
|
+
Xe.value.length > 2 && e.value.style.chart.legend.selectAllToggle.show && !C(de) ? (i(), oe(ao, {
|
|
1957
|
+
key: 0,
|
|
1958
|
+
backgroundColor: e.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1959
|
+
color: e.value.style.chart.legend.selectAllToggle.color,
|
|
1960
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
1961
|
+
checked: D.value.length > 0,
|
|
1962
|
+
isCursorPointer: ve.value,
|
|
1963
|
+
onToggle: Jl
|
|
1964
|
+
}, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : x("", !0)
|
|
1965
|
+
]),
|
|
1966
|
+
_: 2
|
|
1967
|
+
}, [
|
|
1968
|
+
t.$slots.pattern ? {
|
|
1969
|
+
name: "legend-pattern",
|
|
1970
|
+
fn: P(({ legend: a, index: s }) => [
|
|
1971
|
+
Ze(Kt, {
|
|
1972
|
+
shape: a.shape,
|
|
1973
|
+
radius: 30,
|
|
1974
|
+
stroke: "none",
|
|
1975
|
+
plot: { x: 30, y: 30 },
|
|
1976
|
+
fill: `url(#pattern_${K.value}_${s})`
|
|
1977
|
+
}, null, 8, ["shape", "fill"])
|
|
1978
|
+
]),
|
|
1979
|
+
key: "0"
|
|
1980
|
+
} : void 0
|
|
1981
|
+
]), 1032, ["legendSet", "config", "isCursorPointer"])) : N(t.$slots, "legend", {
|
|
1982
|
+
key: 1,
|
|
1983
|
+
legend: Xe.value
|
|
1984
|
+
}, void 0, !0)
|
|
1985
|
+
], 512)
|
|
1986
|
+
], 8, ["to"])) : x("", !0),
|
|
1987
|
+
Ee.value && e.value.userOptions.buttons.table ? (i(), oe(ks(Ge.value.component), bt({ key: 7 }, Ge.value.props, {
|
|
1988
|
+
ref_key: "tableUnit",
|
|
1989
|
+
ref: Ve,
|
|
1990
|
+
onClose: Wa
|
|
1991
|
+
}), jt({
|
|
1992
|
+
content: P(() => [
|
|
1993
|
+
Ze(C(fl), {
|
|
1994
|
+
colNames: _e.value.colNames,
|
|
1995
|
+
head: _e.value.head,
|
|
1996
|
+
body: _e.value.body,
|
|
1997
|
+
config: _e.value.config,
|
|
1998
|
+
title: e.value.table.useDialog ? "" : Ge.value.title,
|
|
1999
|
+
withCloseButton: !e.value.table.useDialog,
|
|
2000
|
+
isCursorPointer: ve.value,
|
|
2001
|
+
onClose: Wa
|
|
2002
|
+
}, {
|
|
2003
|
+
th: P(({ th: a }) => [
|
|
2004
|
+
le("div", { innerHTML: a }, null, 8, Bo)
|
|
2005
|
+
]),
|
|
2006
|
+
td: P(({ td: a }) => [
|
|
2007
|
+
al(fe(isNaN(Number(a)) ? a : C(Ce)({
|
|
2008
|
+
p: e.value.style.chart.lines.dataLabels.prefix,
|
|
2009
|
+
v: a,
|
|
2010
|
+
s: e.value.style.chart.lines.dataLabels.suffix,
|
|
2011
|
+
r: e.value.table.td.roundingValue
|
|
2012
|
+
})), 1)
|
|
2013
|
+
]),
|
|
2014
|
+
_: 1
|
|
2015
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"])
|
|
2016
|
+
]),
|
|
2017
|
+
_: 2
|
|
2018
|
+
}, [
|
|
2019
|
+
e.value.table.useDialog ? {
|
|
2020
|
+
name: "title",
|
|
2021
|
+
fn: P(() => [
|
|
2022
|
+
al(fe(Ge.value.title), 1)
|
|
2023
|
+
]),
|
|
2024
|
+
key: "0"
|
|
2025
|
+
} : void 0,
|
|
2026
|
+
e.value.table.useDialog ? {
|
|
2027
|
+
name: "actions",
|
|
2028
|
+
fn: P(() => [
|
|
2029
|
+
le("button", {
|
|
2030
|
+
tabindex: "0",
|
|
2031
|
+
class: "vue-ui-user-options-button",
|
|
2032
|
+
onClick: l[1] || (l[1] = (a) => Ht(e.value.userOptions.callbacks.csv)),
|
|
2033
|
+
style: ge({ cursor: ve.value ? "pointer" : "default" })
|
|
2034
|
+
}, [
|
|
2035
|
+
Ze(C(hl), {
|
|
2036
|
+
name: "fileCsv",
|
|
2037
|
+
stroke: Ge.value.props.color
|
|
2038
|
+
}, null, 8, ["stroke"])
|
|
2039
|
+
], 4)
|
|
2040
|
+
]),
|
|
2041
|
+
key: "1"
|
|
2042
|
+
} : void 0
|
|
2043
|
+
]), 1040)) : x("", !0),
|
|
2044
|
+
e.value.style.chart.zoom.show && Ee.value && Fa.value && me.value > 6 ? (i(), oe(to, {
|
|
2045
|
+
key: 8,
|
|
2046
|
+
ref_key: "chartSlicer",
|
|
2047
|
+
ref: Oe,
|
|
2048
|
+
allMinimaps: Rl.value,
|
|
2049
|
+
background: e.value.style.chart.zoom.color,
|
|
2050
|
+
borderColor: e.value.style.chart.backgroundColor,
|
|
2051
|
+
customFormat: e.value.style.chart.zoom.customFormat,
|
|
2052
|
+
cutNullValues: !1,
|
|
2053
|
+
enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
|
|
2054
|
+
enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
|
|
2055
|
+
end: c.value.end,
|
|
2056
|
+
focusOnDrag: e.value.style.chart.zoom.focusOnDrag,
|
|
2057
|
+
focusRangeRatio: e.value.style.chart.zoom.focusRangeRatio,
|
|
2058
|
+
fontSize: e.value.style.chart.zoom.fontSize,
|
|
2059
|
+
immediate: !e.value.style.chart.zoom.preview.enable,
|
|
2060
|
+
inputColor: e.value.style.chart.zoom.color,
|
|
2061
|
+
isPreview: Sa.value,
|
|
2062
|
+
labelLeft: e.value.style.chart.grid.x.timeLabels.values[c.value.start] ? se.value?.[0]?.text ?? "" : "",
|
|
2063
|
+
labelRight: e.value.style.chart.grid.x.timeLabels.values[c.value.end - 1] ? se.value?.at(-1)?.text ?? "" : "",
|
|
2064
|
+
max: Math.max(...St.dataset.map((a) => a.series.length)),
|
|
2065
|
+
min: 0,
|
|
2066
|
+
minimap: La.value,
|
|
2067
|
+
minimapCompact: e.value.style.chart.zoom.minimap.compact,
|
|
2068
|
+
minimapFrameColor: e.value.style.chart.zoom.minimap.frameColor,
|
|
2069
|
+
minimapIndicatorColor: e.value.style.chart.zoom.minimap.indicatorColor,
|
|
2070
|
+
minimapMerged: !1,
|
|
2071
|
+
minimapSelectedColor: e.value.style.chart.zoom.minimap.selectedColor,
|
|
2072
|
+
minimapSelectedColorOpacity: e.value.style.chart.zoom.minimap.selectedColorOpacity,
|
|
2073
|
+
minimapSelectedIndex: b.value,
|
|
2074
|
+
minimapSelectionRadius: 1,
|
|
2075
|
+
preciseLabels: _a.value.length ? _a.value : ze.value,
|
|
2076
|
+
refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(...St.dataset.map((a) => a.series.length)),
|
|
2077
|
+
refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
|
|
2078
|
+
selectColor: e.value.style.chart.zoom.highlightColor,
|
|
2079
|
+
selectedSeries: rs.value,
|
|
2080
|
+
smoothMinimap: !1,
|
|
2081
|
+
start: c.value.start,
|
|
2082
|
+
textColor: e.value.style.chart.color,
|
|
2083
|
+
timeLabels: ze.value,
|
|
2084
|
+
usePreciseLabels: e.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !e.value.style.chart.zoom.useDefaultFormat,
|
|
2085
|
+
valueEnd: c.value.end,
|
|
2086
|
+
valueStart: c.value.start,
|
|
2087
|
+
verticalHandles: e.value.style.chart.zoom.minimap.verticalHandles,
|
|
2088
|
+
maxWidth: e.value.style.chart.zoom.maxWidth,
|
|
2089
|
+
isCursorPointer: ve.value,
|
|
2090
|
+
additionalMinimapHeight: e.value.style.chart.zoom.minimap.additionalHeight,
|
|
2091
|
+
handleType: e.value.style.chart.zoom.minimap.handleType,
|
|
2092
|
+
handleIconColor: e.value.style.chart.zoom.minimap.handleIconColor,
|
|
2093
|
+
handleBorderWidth: e.value.style.chart.zoom.minimap.handleBorderWidth,
|
|
2094
|
+
handleBorderColor: e.value.style.chart.zoom.minimap.handleBorderColor,
|
|
2095
|
+
handleFill: e.value.style.chart.zoom.minimap.handleFill,
|
|
2096
|
+
handleWidth: e.value.style.chart.zoom.minimap.handleWidth,
|
|
2097
|
+
"onUpdate:end": Wl,
|
|
2098
|
+
"onUpdate:start": Hl,
|
|
2099
|
+
onTrapMouse: Fl,
|
|
2100
|
+
onReset: $a,
|
|
2101
|
+
onFutureEnd: l[2] || (l[2] = (a) => Ma("end", a)),
|
|
2102
|
+
onFutureStart: l[3] || (l[3] = (a) => Ma("start", a))
|
|
2103
|
+
}, {
|
|
2104
|
+
"reset-action": P(({ reset: a }) => [
|
|
2105
|
+
N(t.$slots, "reset-action", ee(te({ reset: a })), void 0, !0)
|
|
2106
|
+
]),
|
|
2107
|
+
slotMap: P(({ width: a, height: s, unitW: n }) => [
|
|
2108
|
+
le("g", {
|
|
2109
|
+
innerHTML: is({ minimapH: s, unitW: n })
|
|
2110
|
+
}, null, 8, Yo)
|
|
2111
|
+
]),
|
|
2112
|
+
_: 3
|
|
2113
|
+
}, 8, ["allMinimaps", "background", "borderColor", "customFormat", "enableRangeHandles", "enableSelectionDrag", "end", "focusOnDrag", "focusRangeRatio", "fontSize", "immediate", "inputColor", "isPreview", "labelLeft", "labelRight", "max", "minimap", "minimapCompact", "minimapFrameColor", "minimapIndicatorColor", "minimapSelectedColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "preciseLabels", "refreshEndPoint", "refreshStartPoint", "selectColor", "selectedSeries", "start", "textColor", "timeLabels", "usePreciseLabels", "valueEnd", "valueStart", "verticalHandles", "maxWidth", "isCursorPointer", "additionalMinimapHeight", "handleType", "handleIconColor", "handleBorderWidth", "handleBorderColor", "handleFill", "handleWidth"])) : x("", !0),
|
|
2114
|
+
le("div", {
|
|
2115
|
+
id: `legend-bottom-${K.value}`
|
|
2116
|
+
}, null, 8, Ho),
|
|
2117
|
+
Ze(C(dl), {
|
|
2118
|
+
teleportTo: e.value.style.chart.tooltip.teleportTo,
|
|
2119
|
+
show: j.value.showTooltip && Re.value,
|
|
2120
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
2121
|
+
color: e.value.style.chart.tooltip.color,
|
|
2122
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
2123
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
2124
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
2125
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
2126
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
2127
|
+
position: e.value.style.chart.tooltip.position,
|
|
2128
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
2129
|
+
parent: ue.value,
|
|
2130
|
+
content: jl.value,
|
|
2131
|
+
isFullscreen: De.value,
|
|
2132
|
+
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
|
|
2133
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
2134
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
2135
|
+
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
2136
|
+
smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold,
|
|
2137
|
+
isA11yMode: Be.value === "keyboard",
|
|
2138
|
+
a11yPosition: va.value
|
|
2139
|
+
}, {
|
|
2140
|
+
"tooltip-before": P(() => [
|
|
2141
|
+
N(t.$slots, "tooltip-before", ee(te({ ...Qt.value })), void 0, !0)
|
|
2142
|
+
]),
|
|
2143
|
+
"tooltip-after": P(() => [
|
|
2144
|
+
N(t.$slots, "tooltip-after", ee(te({ ...Qt.value })), void 0, !0)
|
|
2145
|
+
]),
|
|
2146
|
+
_: 3
|
|
2147
|
+
}, 8, ["teleportTo", "show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold", "isA11yMode", "a11yPosition"]),
|
|
2148
|
+
t.$slots.source ? (i(), v("div", {
|
|
2149
|
+
key: 9,
|
|
2150
|
+
ref_key: "source",
|
|
2151
|
+
ref: sa,
|
|
2152
|
+
dir: "auto"
|
|
2153
|
+
}, [
|
|
2154
|
+
N(t.$slots, "source", {}, void 0, !0)
|
|
2155
|
+
], 512)) : x("", !0),
|
|
2156
|
+
N(t.$slots, "skeleton", {}, () => [
|
|
2157
|
+
C(de) ? (i(), oe(Ys, { key: 0 })) : x("", !0)
|
|
2158
|
+
], !0)
|
|
2159
|
+
], 46, so));
|
|
2160
|
+
}
|
|
2161
|
+
}, fn = /* @__PURE__ */ lo(Wo, [["__scopeId", "data-v-a4a2b837"]]);
|
|
2162
|
+
export {
|
|
2163
|
+
fn as default
|
|
2164
|
+
};
|