vue-data-ui 2.3.93 → 2.3.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-DvOpIAlY.cjs → Arrow-Dqk-HgBj.cjs} +1 -1
- package/dist/{Arrow-tI6NQ7Cn.js → Arrow-FQNwuQt_.js} +1 -1
- package/dist/{BaseIcon-4CP9SAhe.js → BaseIcon-CcOdzI48.js} +1 -1
- package/dist/{BaseIcon-CNOWc7Xz.cjs → BaseIcon-DhAyJ2rW.cjs} +1 -1
- package/dist/{DataTable-BUgJSK3f.js → DataTable-D1vDu_2B.js} +2 -2
- package/dist/{DataTable-DhUk55WP.cjs → DataTable-kOScyzFF.cjs} +1 -1
- package/dist/{Legend-WO0bF0ud.cjs → Legend-BJdr5n-o.cjs} +1 -1
- package/dist/{Legend-C2KtRxbi.js → Legend-CZk6McMv.js} +1 -1
- package/dist/{PackageVersion-Cy2QrPIN.js → PackageVersion-DDKechCD.js} +1 -1
- package/dist/{PackageVersion-B_T5VqI7.cjs → PackageVersion-Tm6EPIDH.cjs} +1 -1
- package/dist/{Shape-CvvlB7a8.cjs → Shape-CHWOgbhq.cjs} +1 -1
- package/dist/{Shape-ovEGVZTS.js → Shape-CY3Tsyaq.js} +1 -1
- package/dist/{Slicer-ChxIxUKY.cjs → Slicer-C0R4JA2q.cjs} +1 -1
- package/dist/{Slicer-C4yPLRzp.js → Slicer-DBVND1TR.js} +15 -15
- package/dist/{Title-CczWCvrd.js → Title-B6kWQmNb.js} +1 -1
- package/dist/{Title-BRktfjVS.cjs → Title-DAEaaXFr.cjs} +1 -1
- package/dist/{Tooltip-iisamh_I.cjs → Tooltip-Cb9jWppv.cjs} +1 -1
- package/dist/{Tooltip-CLelGHFy.js → Tooltip-Cwp4dS4t.js} +1 -1
- package/dist/{index-B9ExL-Ae.js → index-Bu852AzK.js} +725 -705
- package/dist/index-jAZxyteD.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -0
- package/dist/types/vue-data-ui.d.ts +1 -0
- package/dist/{useNestedProp-BI1wvb44.js → useNestedProp-1sCLAHuR.js} +1 -1
- package/dist/{useNestedProp-CQjoDc6x.cjs → useNestedProp-DksYpyh6.cjs} +1 -1
- package/dist/{usePrinter-CUStN20z.js → usePrinter-CaNEdNUc.js} +1 -1
- package/dist/{usePrinter-BYx8odJu.cjs → usePrinter-Cx-xmAjb.cjs} +1 -1
- package/dist/{vue-data-ui-CUhpUmv_.js → vue-data-ui-DRT0INR_.js} +57 -57
- package/dist/{vue-data-ui-Bn0hx7hG.cjs → vue-data-ui-DVWQuwQb.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +5 -5
- package/dist/{vue-ui-3d-bar-CxlYseaq.js → vue-ui-3d-bar-CwTmIafL.js} +8 -8
- package/dist/{vue-ui-3d-bar-BL-ZhuNx.cjs → vue-ui-3d-bar-fPokAY4t.cjs} +1 -1
- package/dist/{vue-ui-accordion-SZPrlCJb.js → vue-ui-accordion-CBwmD_zS.js} +3 -3
- package/dist/{vue-ui-accordion-DzbFctbI.cjs → vue-ui-accordion-WXKee19V.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-B1IVehHW.js → vue-ui-age-pyramid-BuJ384HP.js} +9 -9
- package/dist/{vue-ui-age-pyramid-vnFYLLSN.cjs → vue-ui-age-pyramid-CSlbHHIq.cjs} +1 -1
- package/dist/{vue-ui-annotator-DGedspml.js → vue-ui-annotator-CQQfgcyq.js} +1 -1
- package/dist/{vue-ui-annotator-Cv6XubR6.cjs → vue-ui-annotator-DqCVD1IT.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CIJdWFvp.cjs → vue-ui-candlestick-2uxcI-Xb.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DGN9u4Fc.js → vue-ui-candlestick-O0pBnymd.js} +10 -10
- package/dist/{vue-ui-carousel-table-BgDKAsLu.js → vue-ui-carousel-table-CpaHwBTF.js} +4 -4
- package/dist/{vue-ui-carousel-table-kawG2Va2.cjs → vue-ui-carousel-table-DJelccvO.cjs} +1 -1
- package/dist/{vue-ui-chestnut-mz-4OECX.cjs → vue-ui-chestnut-DoS0ZkSz.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CtFOgJmT.js → vue-ui-chestnut-bP29gPF2.js} +7 -7
- package/dist/{vue-ui-cursor-BJ2nafdy.js → vue-ui-cursor-BXsEO1jQ.js} +2 -2
- package/dist/{vue-ui-cursor-BVS2YR2w.cjs → vue-ui-cursor-DvrLmTy2.cjs} +1 -1
- package/dist/{vue-ui-dashboard-wvzwXNCc.cjs → vue-ui-dashboard-CtAtCuEu.cjs} +1 -1
- package/dist/{vue-ui-dashboard-D93KqjL8.js → vue-ui-dashboard-VQiRxgUe.js} +2 -2
- package/dist/{vue-ui-digits-CTpbhzau.js → vue-ui-digits-2h-uYg5M.js} +2 -2
- package/dist/{vue-ui-digits-2e8Z2Ynp.cjs → vue-ui-digits-DxwUUK2a.cjs} +1 -1
- package/dist/vue-ui-donut-CVkNiaR7.js +999 -0
- package/dist/vue-ui-donut-ClCDBTXq.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DJpu3Zul.cjs → vue-ui-donut-evolution-CVy-DhHk.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Cj4VUlYA.js → vue-ui-donut-evolution-D0HDE6fN.js} +53 -53
- package/dist/{vue-ui-dumbbell-DW9hFZTK.cjs → vue-ui-dumbbell-CblIThyd.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-B5K8A6JO.js → vue-ui-dumbbell-DIVxIXgO.js} +9 -9
- package/dist/{vue-ui-flow-D7G8pT5u.js → vue-ui-flow-Cy5HKKbs.js} +20 -20
- package/dist/{vue-ui-flow-BPZIx63s.cjs → vue-ui-flow-Dbw0yzSb.cjs} +1 -1
- package/dist/{vue-ui-galaxy-zxi6Dh6-.js → vue-ui-galaxy-CBR86BVE.js} +23 -23
- package/dist/{vue-ui-galaxy-CJwQngRy.cjs → vue-ui-galaxy-Z5-e5hHG.cjs} +1 -1
- package/dist/{vue-ui-gauge-Dl84wBq2.js → vue-ui-gauge-BwC9HPyF.js} +19 -19
- package/dist/{vue-ui-gauge-BCOp8MfJ.cjs → vue-ui-gauge-DAgx6nds.cjs} +1 -1
- package/dist/{vue-ui-gizmo-PUYvN73T.cjs → vue-ui-gizmo-5FygVg05.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BGeEyNk4.js → vue-ui-gizmo-D6U5riWt.js} +3 -3
- package/dist/{vue-ui-heatmap-B98p2zoa.js → vue-ui-heatmap-PVlvCw_B.js} +9 -9
- package/dist/{vue-ui-heatmap-9Upu_lU9.cjs → vue-ui-heatmap-XVVbgtw6.cjs} +1 -1
- package/dist/{vue-ui-kpi-BjucxBZ5.cjs → vue-ui-kpi-2eoTT0Hv.cjs} +1 -1
- package/dist/{vue-ui-kpi-1_lGwzeP.js → vue-ui-kpi-DiG34MXd.js} +3 -3
- package/dist/{vue-ui-mini-loader-B6595FMr.js → vue-ui-mini-loader-CVOfsZ-d.js} +2 -2
- package/dist/{vue-ui-mini-loader-OY5XrOYB.cjs → vue-ui-mini-loader-DpoTiQhx.cjs} +1 -1
- package/dist/{vue-ui-molecule-DaJsYbo1.js → vue-ui-molecule-85QzZoSm.js} +29 -29
- package/dist/{vue-ui-molecule-xmP8sBoH.cjs → vue-ui-molecule-Mt0YXGcP.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CB1zZjs3.cjs → vue-ui-mood-radar-B3xF0_xt.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CdGd-5lQ.js → vue-ui-mood-radar-Ds21V6oP.js} +21 -21
- package/dist/{vue-ui-nested-donuts-CYmpCetP.js → vue-ui-nested-donuts-BrMouz8T.js} +46 -46
- package/dist/{vue-ui-nested-donuts-BkKTALZ7.cjs → vue-ui-nested-donuts-DFrY4v-O.cjs} +1 -1
- package/dist/{vue-ui-onion-BuimOxUF.cjs → vue-ui-onion-CQu0-ZlV.cjs} +1 -1
- package/dist/{vue-ui-onion-BOi0j3dJ.js → vue-ui-onion-ZWa0bPAG.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-Bah-cYZ5.cjs → vue-ui-parallel-coordinate-plot-Cet-vJ3E.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DfRYipb8.js → vue-ui-parallel-coordinate-plot-SpCkXomG.js} +11 -11
- package/dist/{vue-ui-quadrant-CVUZ1p2G.cjs → vue-ui-quadrant-B1fnSqPf.cjs} +1 -1
- package/dist/{vue-ui-quadrant-39hB1-rW.js → vue-ui-quadrant-DwxUTnpH.js} +11 -11
- package/dist/{vue-ui-quick-chart-8aeQmszL.js → vue-ui-quick-chart-DDSDdZMZ.js} +8 -8
- package/dist/{vue-ui-quick-chart-DJET2y_F.cjs → vue-ui-quick-chart-DSOONkrO.cjs} +1 -1
- package/dist/{vue-ui-radar-mk61hrfQ.cjs → vue-ui-radar-CQJzxB9Y.cjs} +1 -1
- package/dist/{vue-ui-radar-BHV5OcIH.js → vue-ui-radar-Cc4hxNkF.js} +11 -11
- package/dist/{vue-ui-rating-D0eIeFuP.js → vue-ui-rating-CRs01ao2.js} +7 -7
- package/dist/{vue-ui-rating-Dt46yKur.cjs → vue-ui-rating-DRLfSg4n.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-D8tlElyL.cjs → vue-ui-relation-circle-BZcoHhTb.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CLWjo7gq.js → vue-ui-relation-circle-mlXpg86O.js} +6 -6
- package/dist/{vue-ui-rings-BrcZ1Q6y.js → vue-ui-rings-DHlbwWrt.js} +37 -37
- package/dist/{vue-ui-rings-CjOr2fTq.cjs → vue-ui-rings-OeMdVo_s.cjs} +1 -1
- package/dist/{vue-ui-scatter-DElf7q_o.cjs → vue-ui-scatter-D65sxQAb.cjs} +1 -1
- package/dist/{vue-ui-scatter-wq1Ygozo.js → vue-ui-scatter-DtX5NOb_.js} +34 -34
- package/dist/{vue-ui-screenshot-WpUmWa8T.cjs → vue-ui-screenshot-B1pv3wKU.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BD6eevS2.js → vue-ui-screenshot-BwgdW92q.js} +1 -1
- package/dist/{vue-ui-skeleton-DokgyuHD.js → vue-ui-skeleton-B-obKEDg.js} +49 -49
- package/dist/{vue-ui-skeleton-7g5Z7tL8.cjs → vue-ui-skeleton-C14g9G-o.cjs} +1 -1
- package/dist/{vue-ui-smiley-M433_VGc.cjs → vue-ui-smiley-CHY-BKbe.cjs} +1 -1
- package/dist/{vue-ui-smiley-BTzWzbXj.js → vue-ui-smiley-i8xqKjND.js} +2 -2
- package/dist/{vue-ui-spark-trend-DVYSjWgR.js → vue-ui-spark-trend-DzZsfML2.js} +20 -20
- package/dist/{vue-ui-spark-trend-CVY2563q.cjs → vue-ui-spark-trend-i3VmY_gx.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CW6U_9yF.js → vue-ui-sparkbar-7rOXvOgH.js} +4 -4
- package/dist/{vue-ui-sparkbar-B5bm048m.cjs → vue-ui-sparkbar-BnYKNJWQ.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-P6vT35bq.cjs → vue-ui-sparkgauge-BuOMrzYW.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Da2vhyRe.js → vue-ui-sparkgauge-DnphjNVE.js} +11 -11
- package/dist/{vue-ui-sparkhistogram-BRE4BZ1r.cjs → vue-ui-sparkhistogram-DZaNR3tu.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DgyNNNYs.js → vue-ui-sparkhistogram-DvLl4E_s.js} +5 -5
- package/dist/{vue-ui-sparkline-BNzFzh6O.cjs → vue-ui-sparkline-BpmqNCQy.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B6F6GG5I.js → vue-ui-sparkline-CPjnG7wg.js} +21 -21
- package/dist/{vue-ui-sparkstackbar-DAZsawIt.js → vue-ui-sparkstackbar-BGgNBuJz.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-uWzUzXeY.cjs → vue-ui-sparkstackbar-CJ17fiW5.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DuvFbd8S.cjs → vue-ui-stackbar-CFoe4XwZ.cjs} +1 -1
- package/dist/{vue-ui-stackbar-Dm2aCHhH.js → vue-ui-stackbar-SFKe9f6_.js} +11 -11
- package/dist/{vue-ui-strip-plot-XYPsVx2s.cjs → vue-ui-strip-plot-B8utOfmZ.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-B_j6rXqf.js → vue-ui-strip-plot-CGgheJ1-.js} +10 -10
- package/dist/{vue-ui-table-BZjBiutU.cjs → vue-ui-table-BpSsgihB.cjs} +1 -1
- package/dist/{vue-ui-table-Ba8yWxlH.js → vue-ui-table-JOi6x-Kt.js} +10 -10
- package/dist/{vue-ui-table-heatmap-B72rWSp8.js → vue-ui-table-heatmap-EeR8_0fs.js} +23 -23
- package/dist/{vue-ui-table-heatmap-ChZ4LL-2.cjs → vue-ui-table-heatmap-fNf5Hgfn.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-g1tiRXu-.js → vue-ui-table-sparkline-of9ZervK.js} +15 -15
- package/dist/{vue-ui-table-sparkline-D9KYyLun.cjs → vue-ui-table-sparkline-yjChfsNj.cjs} +1 -1
- package/dist/{vue-ui-thermometer-Bx9kCvPP.cjs → vue-ui-thermometer-Ct59Zrkd.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BUj-EXSI.js → vue-ui-thermometer-Hb5jQa3y.js} +6 -6
- package/dist/{vue-ui-timer-BMi1tOzP.js → vue-ui-timer-Duo6PjNq.js} +5 -5
- package/dist/{vue-ui-timer-DgVg5v8D.cjs → vue-ui-timer-nIKem40S.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-gGC8LSGo.cjs → vue-ui-tiremarks-D5vYyYcq.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-B8E61MPf.js → vue-ui-tiremarks-rxEA2WzL.js} +6 -6
- package/dist/{vue-ui-treemap-Cha1rQBU.cjs → vue-ui-treemap-DK5klTWq.cjs} +1 -1
- package/dist/{vue-ui-treemap-D5QTDSSq.js → vue-ui-treemap-DWDrLYPR.js} +10 -10
- package/dist/{vue-ui-vertical-bar-BL5Issc0.js → vue-ui-vertical-bar-3TzyIQBn.js} +10 -10
- package/dist/{vue-ui-vertical-bar-BSzFwrWa.cjs → vue-ui-vertical-bar-CCOjOr9t.cjs} +1 -1
- package/dist/{vue-ui-waffle-Dh08N5SM.js → vue-ui-waffle-CUiQJf4B.js} +23 -23
- package/dist/{vue-ui-waffle-DxTyNZYn.cjs → vue-ui-waffle-CzbWP2YI.cjs} +1 -1
- package/dist/{vue-ui-wheel-DyjcbZnB.cjs → vue-ui-wheel-BgLqSlSe.cjs} +1 -1
- package/dist/{vue-ui-wheel-DpywOj9b.js → vue-ui-wheel-DJe1aYWh.js} +6 -6
- package/dist/{vue-ui-word-cloud-C7cBuLEd.cjs → vue-ui-word-cloud-CS4EPwJc.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CEtvW8ZU.js → vue-ui-word-cloud-ouNY0ixo.js} +36 -36
- package/dist/{vue-ui-xy-WnaajCFT.cjs → vue-ui-xy-DkHIDMtO.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-nbhxY42M.js → vue-ui-xy-canvas-CGG7Levw.js} +34 -34
- package/dist/{vue-ui-xy-canvas-7YaG0Huj.cjs → vue-ui-xy-canvas-iMF1sItL.cjs} +1 -1
- package/dist/{vue-ui-xy-C1EbGmWi.js → vue-ui-xy-iQJGfaFk.js} +28 -28
- package/package.json +1 -1
- package/dist/index-CYdWUfPi.cjs +0 -4
- package/dist/vue-ui-donut-CJ4HeqiO.cjs +0 -1
- package/dist/vue-ui-donut-CjkJB0CP.js +0 -871
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { useCssVars as Ae, computed as p, openBlock as u, createElementBlock as f, createVNode as ee, renderSlot as m, createElementVNode as $, normalizeStyle as te, pushScopeId as We, popScopeId as Re, ref as n, watch as
|
|
2
|
-
import { u as Le,
|
|
3
|
-
import { _ as ot } from "./Title-
|
|
4
|
-
import { u as at, U as lt } from "./usePrinter-
|
|
1
|
+
import { useCssVars as Ae, computed as p, openBlock as u, createElementBlock as f, createVNode as ee, renderSlot as m, createElementVNode as $, normalizeStyle as te, pushScopeId as We, popScopeId as Re, ref as n, watch as Q, onMounted as Be, onBeforeUnmount as De, createBlock as A, createCommentVNode as z, unref as k, createSlots as Ve, withCtx as h, normalizeProps as W, guardReactiveProps as R, normalizeClass as me, Fragment as Ee, renderList as Ue, toDisplayString as fe, createTextVNode as Ge, nextTick as pe } from "vue";
|
|
2
|
+
import { u as Le, Z as Xe, v as je, c as ge, t as Ye, a as qe, p as L, o as He, e as ye, g as Ze, f as Je, X as Ke, q as Qe, r as et, x as tt } from "./index-Bu852AzK.js";
|
|
3
|
+
import { _ as ot } from "./Title-B6kWQmNb.js";
|
|
4
|
+
import { u as at, U as lt } from "./usePrinter-CaNEdNUc.js";
|
|
5
5
|
import { d as st, t as nt, u as rt } from "./useResponsive-NZB-WLRF.js";
|
|
6
|
-
import ut from "./vue-ui-accordion-
|
|
7
|
-
import { D as it } from "./DataTable-
|
|
8
|
-
import ct from "./BaseIcon-
|
|
6
|
+
import ut from "./vue-ui-accordion-CBwmD_zS.js";
|
|
7
|
+
import { D as it } from "./DataTable-D1vDu_2B.js";
|
|
8
|
+
import ct from "./BaseIcon-CcOdzI48.js";
|
|
9
9
|
import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
import { u as be } from "./useNestedProp-
|
|
11
|
-
import { _ as dt } from "./PackageVersion-
|
|
12
|
-
import { _ as vt } from "./Tooltip-
|
|
10
|
+
import { u as be } from "./useNestedProp-1sCLAHuR.js";
|
|
11
|
+
import { _ as dt } from "./PackageVersion-DDKechCD.js";
|
|
12
|
+
import { _ as vt } from "./Tooltip-Cwp4dS4t.js";
|
|
13
13
|
const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2canvas-ignore": "" }, ft = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "reset-wrapper"
|
|
@@ -146,8 +146,8 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
146
146
|
}
|
|
147
147
|
}), b = n(typeof s.dataset == "string" ? Xe(s.dataset) : s.dataset.map((t) => ({
|
|
148
148
|
...t,
|
|
149
|
-
value:
|
|
150
|
-
}))), P = n(ge()), I = n(0), C = n(null), w = n(null), g = n(0), S = n(0),
|
|
149
|
+
value: je(t.value)
|
|
150
|
+
}))), P = n(ge()), I = n(0), C = n(null), w = n(null), g = n(0), S = n(0), j = n(!1), e = p({
|
|
151
151
|
get: () => oe(),
|
|
152
152
|
set: (t) => t
|
|
153
153
|
});
|
|
@@ -158,14 +158,14 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
158
158
|
});
|
|
159
159
|
return t.theme ? {
|
|
160
160
|
...be({
|
|
161
|
-
userConfig:
|
|
161
|
+
userConfig: Ye.vue_ui_word_cloud[t.theme] || s.config,
|
|
162
162
|
defaultConfig: t
|
|
163
163
|
}),
|
|
164
164
|
customPalette: qe[t.theme] || L
|
|
165
165
|
} : t;
|
|
166
166
|
}
|
|
167
|
-
|
|
168
|
-
e.value = oe(), le(), g.value += 1, S.value += 1,
|
|
167
|
+
Q(() => s.config, (t) => {
|
|
168
|
+
e.value = oe(), le(), g.value += 1, S.value += 1, Y();
|
|
169
169
|
}, { deep: !0 });
|
|
170
170
|
const ae = n(null), T = n(0), r = n({
|
|
171
171
|
width: e.value.style.chart.width,
|
|
@@ -180,25 +180,25 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
180
180
|
});
|
|
181
181
|
r.value.width = t, r.value.height = a, pe(q);
|
|
182
182
|
});
|
|
183
|
-
|
|
183
|
+
Q(() => T.value, () => {
|
|
184
184
|
ke();
|
|
185
185
|
});
|
|
186
186
|
const ke = st(() => {
|
|
187
187
|
q();
|
|
188
188
|
}, 10);
|
|
189
|
-
function
|
|
189
|
+
function Y() {
|
|
190
190
|
T.value = ie.value;
|
|
191
191
|
}
|
|
192
192
|
const D = n(null);
|
|
193
193
|
Be(() => {
|
|
194
|
-
le(),
|
|
194
|
+
le(), Y();
|
|
195
195
|
});
|
|
196
196
|
function le() {
|
|
197
197
|
He(s.dataset) ? ye({
|
|
198
198
|
componentName: "VueUiWordCloud",
|
|
199
199
|
type: "dataset"
|
|
200
200
|
}) : b.value.forEach((t, a) => {
|
|
201
|
-
|
|
201
|
+
Ze({
|
|
202
202
|
datasetObject: t,
|
|
203
203
|
requiredAttributes: ["name", "value"]
|
|
204
204
|
}).forEach((o) => {
|
|
@@ -234,16 +234,16 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
234
234
|
function Se(t, a, o) {
|
|
235
235
|
const c = [], l = { x: -a / 2, y: -o / 2, width: a, height: o }, v = 0, _ = 0;
|
|
236
236
|
return t.forEach((N) => {
|
|
237
|
-
let
|
|
238
|
-
for (let G = 0; G < Math.max(a, o) / 2 && !
|
|
239
|
-
for (let
|
|
240
|
-
const he =
|
|
241
|
-
Ie && !Oe && (c.push(y),
|
|
237
|
+
let J = !1;
|
|
238
|
+
for (let G = 0; G < Math.max(a, o) / 2 && !J; G += e.value.style.chart.words.packingWeight)
|
|
239
|
+
for (let K = 0; K < 360 && !J; K += e.value.style.chart.words.packingWeight) {
|
|
240
|
+
const he = K * Math.PI / 180, ze = v + G * Math.cos(he) - N.width / 2, Pe = _ + G * Math.sin(he) - N.height / 2, y = { ...N, x: ze, y: Pe }, Ie = y.x >= l.x && y.y >= l.y && y.x + y.width <= l.x + l.width && y.y + y.height <= l.y + l.height, Oe = c.some((Me) => xe(y, Me));
|
|
241
|
+
Ie && !Oe && (c.push(y), J = !0);
|
|
242
242
|
}
|
|
243
243
|
}), c;
|
|
244
244
|
}
|
|
245
245
|
const O = n([]);
|
|
246
|
-
|
|
246
|
+
Q(() => s.dataset, q, { immediate: !0 });
|
|
247
247
|
const ie = p(() => Math.min(...b.value.map((t) => t.value))), Te = p(() => Math.max(...b.value.map((t) => t.value)));
|
|
248
248
|
function q() {
|
|
249
249
|
const t = [...b.value].filter((l) => l.value >= T.value).map((l) => l.value), a = Math.max(...t), o = Math.min(...t), c = [...b.value].filter((l) => l.value >= T.value).map((l, v) => {
|
|
@@ -270,7 +270,7 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
270
270
|
pe(() => {
|
|
271
271
|
const t = V.value.head.map((c, l) => [[
|
|
272
272
|
c.name
|
|
273
|
-
], [V.value.body[l]]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(t), o =
|
|
273
|
+
], [V.value.body[l]]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(t), o = Qe(a);
|
|
274
274
|
et({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
|
|
275
275
|
});
|
|
276
276
|
}
|
|
@@ -279,7 +279,7 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
279
279
|
e.value.table.columnNames.series,
|
|
280
280
|
e.value.table.columnNames.value
|
|
281
281
|
], a = V.value.head.map((l, v) => {
|
|
282
|
-
const _ =
|
|
282
|
+
const _ = Je({ p: e.value.table.td.prefix, v: V.value.body[v], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
|
|
283
283
|
return [
|
|
284
284
|
{
|
|
285
285
|
color: l.color,
|
|
@@ -330,10 +330,10 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
330
330
|
toggleTable: de,
|
|
331
331
|
toggleTooltip: ve
|
|
332
332
|
});
|
|
333
|
-
const F = n(null), M = n(!1), H = n(""),
|
|
333
|
+
const F = n(null), M = n(!1), H = n(""), Z = n(null);
|
|
334
334
|
function Ne(t) {
|
|
335
335
|
if (!d.value.showTooltip) return;
|
|
336
|
-
F.value = t.id,
|
|
336
|
+
F.value = t.id, Z.value = { datapoint: t, config: e.value };
|
|
337
337
|
const a = e.value.style.chart.tooltip.customFormat;
|
|
338
338
|
if (M.value = !1, tt(a))
|
|
339
339
|
try {
|
|
@@ -349,7 +349,7 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
349
349
|
let o = `<svg viewBox="0 0 10 10" height="${e.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${t.color}"/></svg><span>${t.name}:</span><b>${(t.value || 0).toFixed(e.value.style.chart.tooltip.roundingValue)}</b>`;
|
|
350
350
|
H.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${o}</div>`;
|
|
351
351
|
}
|
|
352
|
-
|
|
352
|
+
j.value = !0;
|
|
353
353
|
}
|
|
354
354
|
return (t, a) => (u(), f("div", {
|
|
355
355
|
class: "vue-ui-word-cloud",
|
|
@@ -441,7 +441,7 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
441
441
|
x.value ? (u(), f("svg", {
|
|
442
442
|
key: 2,
|
|
443
443
|
class: me({ "vue-data-ui-fullscreen--on": U.value, "vue-data-ui-fulscreen--off": !U.value }),
|
|
444
|
-
xmlns: k(
|
|
444
|
+
xmlns: k(Ke),
|
|
445
445
|
viewBox: `0 0 ${r.value.width <= 0 ? 10 : r.value.width} ${r.value.height <= 0 ? 10 : r.value.height}`,
|
|
446
446
|
style: "overflow:visible;background:transparent;"
|
|
447
447
|
}, [
|
|
@@ -463,7 +463,7 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
463
463
|
"dominant-baseline": "middle",
|
|
464
464
|
onMouseover: (l) => Ne(o),
|
|
465
465
|
onMouseleave: a[0] || (a[0] = (l) => {
|
|
466
|
-
F.value = null,
|
|
466
|
+
F.value = null, j.value = !1;
|
|
467
467
|
}),
|
|
468
468
|
style: te(`animation-delay:${c * e.value.animationDelayMs}ms !important;`)
|
|
469
469
|
}, fe(o.name), 47, St))
|
|
@@ -477,7 +477,7 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
477
477
|
m(t.$slots, "watermark", W(R({ isPrinting: k(se) || k(ne) })), void 0, !0)
|
|
478
478
|
])) : z("", !0),
|
|
479
479
|
ee(vt, {
|
|
480
|
-
show: d.value.showTooltip &&
|
|
480
|
+
show: d.value.showTooltip && j.value,
|
|
481
481
|
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
482
482
|
color: e.value.style.chart.tooltip.color,
|
|
483
483
|
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
@@ -492,10 +492,10 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
492
492
|
isCustom: M.value
|
|
493
493
|
}, {
|
|
494
494
|
"tooltip-before": h(() => [
|
|
495
|
-
m(t.$slots, "tooltip-before", W(R({ ...
|
|
495
|
+
m(t.$slots, "tooltip-before", W(R({ ...Z.value })), void 0, !0)
|
|
496
496
|
]),
|
|
497
497
|
"tooltip-after": h(() => [
|
|
498
|
-
m(t.$slots, "tooltip-after", W(R({ ...
|
|
498
|
+
m(t.$slots, "tooltip-after", W(R({ ...Z.value })), void 0, !0)
|
|
499
499
|
]),
|
|
500
500
|
_: 3
|
|
501
501
|
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
@@ -518,7 +518,7 @@ const ht = (i) => (We("data-v-3fd7d274"), i = i(), Re(), i), mt = { "data-html2c
|
|
|
518
518
|
background: e.value.style.chart.zoom.color,
|
|
519
519
|
borderColor: e.value.style.chart.backgroundColor,
|
|
520
520
|
source: e.value.style.chart.width,
|
|
521
|
-
onReset:
|
|
521
|
+
onReset: Y
|
|
522
522
|
}, {
|
|
523
523
|
"reset-action": h(({ reset: o }) => [
|
|
524
524
|
m(t.$slots, "reset-action", W(R({ reset: o })), void 0, !0)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CYdWUfPi.cjs"),B=require("./DataTable-DhUk55WP.cjs"),E=require("./Title-BRktfjVS.cjs"),G=require("./Tooltip-iisamh_I.cjs"),z=require("./usePrinter-BYx8odJu.cjs"),V=require("./Shape-CvvlB7a8.cjs"),P=require("./BaseIcon-CNOWc7Xz.cjs"),M=require("./vue-ui-table-sparkline-D9KYyLun.cjs"),T=require("./vue-ui-skeleton-7g5Z7tL8.cjs"),D=require("./Slicer-ChxIxUKY.cjs"),R=require("./vue-ui-accordion-DzbFctbI.cjs"),p=require("./useNestedProp-CQjoDc6x.cjs"),H=require("./PackageVersion-B_T5VqI7.cjs"),t=require("vue"),W=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=d.createUid(),Y={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},components:{DataTable:B.DataTable,Shape:V._sfc_main,Title:E._sfc_main,Tooltip:G._sfc_main,UserOptions:z.UserOptions,BaseIcon:P.default,TableSparkline:M.default,Skeleton:T.default,Slicer:D.Slicer,Accordion:R.default,PackageVersion:H._sfc_main},data(){this.dataset.forEach((n,m)=>{[null,void 0].includes(n.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:m})});const l=Math.max(...this.dataset.map(n=>n.series.length)),i={start:0,end:l};return{themePalettes:d.themePalettes,themes:d.themes,slicerStep:0,selectedScale:null,CTX:null,CANVAS:null,opacity:d.opacity,useSafeValues:!0,palette:d.palette,height:600,width:1e3,viewBox:"0 0 1000 600",clientPosition:{x:0,y:0},canvasClientPosition:{x:0,y:0},icons:{line:"line",bar:"bar",plot:"plot"},isFullscreen:!1,isPrinting:!1,isImaging:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},showTooltip:!0,showTable:!1,isStacked:!1,useIndividualScale:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:d.createUid(),step:0,tableStep:0,titleStep:0,slicer:i,__to__:null,maxX:l,showSparklineTable:!0,segregateStep:0,sliderId:q,fontSizes:{xAxis:18,yAxis:12,dataLabels:20,plotLabels:10},plotRadii:{plot:3,line:3},selectedMinimapIndex:null}},watch:{dataset:{handler(l,i){this.maxX=Math.max(...this.dataset.map(n=>n.series.length)),this.slicer={start:0,end:this.maxX},this.slicerStep+=1,this.segregateStep+=1},deep:!0},config:{handler(l,i){this.FINAL_CONFIG=this.prepareConfig(),this.prepareChart(),this.titleStep+=1,this.tableStep+=1},deep:!0}},computed:{minimap(){if(!this.FINAL_CONFIG.chart.zoom.minimap.show)return[];const l=this.datasetWithIds.filter(a=>!this.segregatedSeries.includes(a.id)),i=Math.max(...l.map(a=>a.series.length)),n=[];for(let a=0;a<i;a+=1)n.push(l.map(e=>e.series[a]||0).reduce((e,g)=>(e||0)+(g||0),0));const m=Math.min(...n);return n.map(a=>a+(m<0?Math.abs(m):0))},customPalette(){return this.convertCustomPalette(this.FINAL_CONFIG.customPalette)},backgroundColor(){return this.FINAL_CONFIG.chart.backgroundColor},slicerColor(){return this.FINAL_CONFIG.chart.zoom.color},allScales(){const l=this.lineSet.map(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height,autoScaleYLabels:a.autoScaleYLabels})),i=this.barSet.map(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height})),n=this.plotSet.map(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height})),m=[...l,...i,...n].flatMap(a=>a).length;return[...l,...i,...n].flatMap((a,e)=>({id:a.id,scaleLabel:a.scaleLabel,name:a.name,color:a.color,scale:a.scale,yOffset:a.yOffset,individualHeight:a.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/m*(e+1),yLabels:a.scaleYLabels||a.scale.ticks.map(g=>({y:g>=0?a.zero-a.individualHeight*(g/a.max):a.zero+a.individualHeight*Math.abs(g)/a.max,value:g}))}))},isDataset(){return!!this.dataset&&this.dataset.length},chartFont(){const l=document.getElementById(`vue-ui-xy_${this.uniqueId}`);return window.getComputedStyle(l,null).getPropertyValue("font-family")},FINAL_CONFIG:{get:function(){return this.prepareConfig()},set:function(l){return l}},hasHighlightArea(){return Array.isArray(this.FINAL_CONFIG.chart.highlightArea)?this.FINAL_CONFIG.chart.highlightArea.some(l=>l.show):this.FINAL_CONFIG.chart.highlightArea&&this.FINAL_CONFIG.chart.highlightArea.show},highlightAreas(){if(Array.isArray(this.FINAL_CONFIG.chart.highlightArea))return this.FINAL_CONFIG.chart.highlightArea.map(i=>({...i,span:i.from===i.to?1:i.to<i.from?0:i.to-i.from+1}));const l=this.FINAL_CONFIG.chart.highlightArea;return[{...l,span:l.from===l.to?1:l.to<l.from?0:l.to-l.from+1}]},xPadding(){return this.FINAL_CONFIG.chart.grid.position==="middle"?0:this.drawingArea.width/this.maxSeries/2},relativeZero(){return this.niceScale.min>=0?0:Math.abs(this.niceScale.min)},absoluteMax(){return this.niceScale.max+this.relativeZero},datasetWithIds(){return this.useSafeValues?this.dataset.map((l,i)=>({...l,id:`uniqueId_${i}`})):this.dataset},safeDataset(){return this.useSafeValues?this.dataset.map((l,i)=>({...l,series:l.series.map(n=>this.isSafeValue(n)?n:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(l.color?l.color:this.customPalette[i]?this.customPalette[i]:this.palette[i]),id:`uniqueId_${i}`})):this.dataset},relativeDataset(){return this.safeDataset.map((l,i)=>({...l,series:l.series.map(n=>n+this.relativeZero),absoluteValues:l.series})).filter(l=>!this.segregatedSeries.includes(l.id))},tableSparklineDataset(){return this.relativeDataset.map(l=>{const i=l.absoluteValues.map(n=>[void 0,null].includes(n)?0:n);return{id:l.id,name:l.name,color:l.color,values:this.fillArray(this.maxSeries,i)}})},tableSparklineConfig(){return{responsiveBreakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint,roundingValues:this.FINAL_CONFIG.table.rounding,showAverage:!1,showMedian:!1,showTotal:!1,fontFamily:this.FINAL_CONFIG.chart.fontFamily,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix,colNames:JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),thead:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},tbody:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},userOptions:{show:!1}}},absoluteDataset(){return this.safeDataset.map((l,i)=>({absoluteIndex:i,...l,series:l.series.map(n=>n+this.relativeZero),absoluteValues:l.series,segregate:()=>this.segregate(l),isSegregated:this.segregatedSeries.includes(l.id)}))},barSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="bar").map((l,i)=>{this.checkAutoScaleError(l);const n=Math.min(...l.absoluteValues.filter(c=>![null,void 0].includes(c))),m=Math.max(...l.absoluteValues.filter(c=>![null,void 0].includes(c))),e={ratios:l.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-n)/(m-n)),valueMin:n,valueMax:m<0?0:m},g={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues.filter(c=>![void 0,null].includes(c)))>0?0:Math.min(...l.absoluteValues.filter(c=>![null,void 0].includes(c)))},k=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,F=1.0000001,u=this.calculateNiceScaleWithExactExtremes(g.min,g.max===g.min?g.max*F:g.max,k),x=this.calculateNiceScaleWithExactExtremes(e.valueMin,e.valueMax===e.valueMin?e.valueMax*F:e.valueMax,k),L=u.min>=0?0:Math.abs(u.min),y=0,S=u.max+L,C=x.max+Math.abs(y),f=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,b=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,r=this.drawingArea.bottom-f-b*L/S,o=this.drawingArea.bottom-f-b*y/C,s=this.absoluteDataset.filter(c=>c.type==="bar").filter(c=>!this.segregatedSeries.includes(c.id)).length,h=l.series.map((c,N)=>{const O=this.mutableConfig.useIndividualScale?(l.absoluteValues[N]+L)/S:this.ratioToMax(c),v=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*N:this.drawingArea.left+this.slot.bar*i+this.slot.bar*N*s-this.barSlot/2-i*this.barPeriodGap;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(v),y:this.drawingArea.bottom-f-b*O,value:l.absoluteValues[N],zeroPosition:this.checkNaN(r),individualMax:this.checkNaN(S),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),w=l.absoluteValues.map(c=>x.min>=0?(c-Math.abs(x.min))/(x.max-Math.abs(x.min)):(c+Math.abs(x.min))/(x.max+Math.abs(x.min))),A=l.series.map((c,N)=>{const O=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*N:this.drawingArea.left-this.slot.bar/2+this.slot.bar*i+this.slot.bar*N*this.absoluteDataset.filter(v=>v.type==="bar").filter(v=>!this.segregatedSeries.includes(v.id)).length;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(O),y:this.checkNaN(this.drawingArea.bottom-this.checkNaN(f)-(this.checkNaN(b)*w[N]||0)),value:l.absoluteValues[N],zeroPosition:this.checkNaN(r),individualMax:this.checkNaN(S),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),I=u.ticks.map(c=>({y:c>=0?r-b*(c/S):r+b*Math.abs(c)/S,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),_=x.ticks.map(c=>{const N=(c-x.min)/(x.max-x.min);return{y:c>=0?o-b*N:o+b*N,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:f,autoScaleYLabels:_,individualHeight:b,scaleYLabels:l.autoScaling?_:I,individualScale:l.autoScaling?x:u,individualMax:l.autoScaling?C:S,zeroPosition:l.autoScaling?o:r,plots:l.autoScaling?A:h}})},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(l=>!this.segregatedSeries.includes(l.id)))},lineSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="line").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(c=>![void 0,null].includes(c))),n=Math.max(...l.absoluteValues.filter(c=>![void 0,null].includes(c)))||1,a={ratios:l.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-i)/(n-i)),valueMin:i,valueMax:n},e={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||(Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues))},g=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,k=1.0000001,F=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*k:e.max,g),u=this.calculateNiceScaleWithExactExtremes(a.valueMin,a.valueMax===a.valueMin?a.valueMax*k:a.valueMax,g),x=F.min>=0?0:Math.abs(F.min),L=0,y=F.max+Math.abs(x),S=u.max+Math.abs(L),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-C-f*x/y,r=this.drawingArea.bottom-C-f*L/S,o=l.series.map((c,N)=>{const O=this.mutableConfig.useIndividualScale?(l.absoluteValues[N]+Math.abs(x))/y:this.ratioToMax(c);return{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*N),y:this.checkNaN(this.drawingArea.bottom-C-f*O),value:l.absoluteValues[N],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),s=l.absoluteValues.map(c=>u.min>=0?(c-Math.abs(u.min))/(u.max-Math.abs(u.min)):(c+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=l.series.map((c,N)=>[void 0,null].includes(l.absoluteValues[N])?{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*N),y:b,value:l.absoluteValues[N],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}:{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*N),y:this.checkNaN(this.drawingArea.bottom-C-(f*s[N]||0)),value:l.absoluteValues[N],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}),w=this.createSmoothPath(o),A=this.createSmoothPath(h),I=F.ticks.map(c=>({y:c>=0?b-f*(c/y):b+f*Math.abs(c)/y,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),_=u.ticks.map(c=>{const N=(c-u.min)/(u.max-u.min);return{y:c>=0?r-f*N:r+f*N,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:C,autoScaleYLabels:_,individualHeight:f,scaleYLabels:l.autoScaling?_:I,individualScale:l.autoScaling?u:F,individualMax:l.autoScaling?S:y,zeroPosition:l.autoScaling?r:b,curve:l.autoScaling?A:w,plots:l.autoScaling?h:o,area:l.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(l.autoScaling?h:o,l.autoScaling?r:b):this.createArea(o):""}})},plotSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="plot").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(I=>![null,void 0].includes(I))),n=Math.max(...l.absoluteValues.filter(I=>![null,void 0].includes(I)))||1,a={ratios:l.absoluteValues.filter(I=>![null,void 0].includes(I)).map(I=>(I-i)/(n-i)),valueMin:i,valueMax:n},e={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues)},g=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,k=1.0000001,F=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*k:e.max,g),u=this.calculateNiceScaleWithExactExtremes(a.valueMin,a.valueMax===a.valueMin?a.valueMax*k:a.valueMax,g),x=F.min>=0?0:Math.abs(F.min),L=0,y=F.max+x,S=u.max+Math.abs(L),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-C-f*x/y,r=this.drawingArea.bottom-C-f*L/S,o=l.series.map((I,_)=>{const c=this.mutableConfig.useIndividualScale?(l.absoluteValues[_]+Math.abs(x))/y:this.ratioToMax(I);return{x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*_),y:this.checkNaN(this.drawingArea.bottom-C-f*c),value:l.absoluteValues[_],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[_]||""}}),s=l.absoluteValues.map(I=>u.min>=0?(I-Math.abs(u.min))/(u.max-Math.abs(u.min)):(I+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=l.series.map((I,_)=>({x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*_),y:this.checkNaN(this.drawingArea.bottom-C-(f*s[_]||0)),value:l.absoluteValues[_],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[_]||""})),w=F.ticks.map(I=>({y:I>=0?b-f*(I/y):b+f*Math.abs(I)/y,value:I,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),A=u.ticks.map(I=>{const _=(I-u.min)/(u.max-u.min);return{y:I>=0?r-f*_:r+f*_,value:I,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:C,autoScaleYLabels:A,individualHeight:f,scaleYLabels:l.autoScaling?A:w,individualScale:l.autoScaling?u:F,individualMax:l.autoScaling?S:y,zeroPosition:l.autoScaling?r:b,plots:l.autoScaling?h:o}})},drawingArea(){const l=this.mutableConfig.useIndividualScale&&this.FINAL_CONFIG.chart.grid.labels.show?this.absoluteDataset.filter(i=>!this.segregatedSeries.includes(i.id)).length*(this.mutableConfig.isStacked?0:this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth):0;return{top:this.FINAL_CONFIG.chart.padding.top,right:this.width-this.FINAL_CONFIG.chart.padding.right,bottom:this.height-this.FINAL_CONFIG.chart.padding.bottom,left:this.FINAL_CONFIG.chart.padding.left+l,height:this.height-(this.FINAL_CONFIG.chart.padding.top+this.FINAL_CONFIG.chart.padding.bottom),width:this.width-(this.FINAL_CONFIG.chart.padding.right+this.FINAL_CONFIG.chart.padding.left+l)}},max(){return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax?this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax:Math.max(...this.safeDataset.filter(l=>!this.segregatedSeries.includes(l.id)).map(l=>Math.max(...l.series)))},min(){if(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin!==null)return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin;const l=Math.min(...this.safeDataset.filter(i=>!this.segregatedSeries.includes(i.id)).map(i=>Math.min(...i.series)));return l>0?0:l},niceScale(){return this.calculateNiceScaleWithExactExtremes(this.min,this.max<0?0:this.max,this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps)},maxSeries(){return this.slicer.end-this.slicer.start},timeLabels(){return this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values.slice(this.slicer.start,this.slicer.end)},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(l=>l.type==="bar").filter(l=>!this.segregatedSeries.includes(l.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},barSlot(){const l=this.safeDataset.filter(i=>i.type==="bar").filter(i=>!this.segregatedSeries.includes(i.id)).length;return this.drawingArea.width/this.maxSeries/l-this.barPeriodGap*l},barPeriodGap(){return this.slot.line*this.FINAL_CONFIG.bar.periodGap},maxSlot(){return Math.max(...Object.values(this.slot).filter(l=>l!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=this.relativeDataset.map(n=>({label:n.name,color:n.color,type:n.type})),i=[];return this.timeLabels.forEach((n,m)=>{const a=[n];this.relativeDataset.forEach(e=>{a.push(this.canShowValue(e.absoluteValues[m])?Number(e.absoluteValues[m].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),i.push(a)}),{head:l,body:i}},dataTable(){const l=this.FINAL_CONFIG.table.showSum;let i=[""].concat(this.relativeDataset.map(e=>e.name));l&&(i=i.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>'));let n=[];for(let e=0;e<this.maxSeries;e+=1){const g=this.relativeDataset.map(k=>k.absoluteValues[e]??0).reduce((k,F)=>k+F,0);n.push([this.timeLabels[e]??"-"].concat(this.relativeDataset.map(k=>this.applyDataLabel(k.type==="line"?this.FINAL_CONFIG.line.labels.formatter:k.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,k.absoluteValues[e]??0,this.dataLabel({p:k.prefix||this.FINAL_CONFIG.chart.labels.prefix,v:k.absoluteValues[e]??0,s:k.suffix||this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.table.rounding})))).concat(l?(g??0).toFixed(this.FINAL_CONFIG.table.rounding):[]))}const m={th:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},td:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},breakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint},a=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(e=>e.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:i,body:n,config:m,colNames:a}},dataTooltipSlot(){return{datapoint:this.selectedSeries,seriesIndex:this.selectedSerieIndex,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}},selectedSeries(){return this.relativeDataset.map(l=>({shape:l.shape||null,name:l.name,color:l.color,type:l.type,value:l.absoluteValues.find((i,n)=>n===this.selectedSerieIndex),comments:l.comments||[],prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix}))},tooltipContent(){let l="",i=this.selectedSeries.map(a=>a.value).filter(a=>this.isSafeValue(a)&&a!==null).reduce((a,e)=>Math.abs(a)+Math.abs(e),0);const n=this.timeLabels[this.selectedSerieIndex],m=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(m)&&this.functionReturnsString(()=>m({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?m({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(n&&(l+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${n}</div>`),this.selectedSeries.forEach(a=>{if(this.isSafeValue(a.value)){let e="",g="";switch(this.icons[a.type]){case"bar":e=`<svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" rx="1" stroke="none" height="12" width="12" fill="${a.color}" /></svg>`;break;case"line":!a.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(a.shape)?g=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" />`:a.shape==="triangle"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="square"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="diamond"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="pentagon"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="hexagon"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="star"&&(g=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" points="${d.createStar({plot:{x:10,y:8},radius:4})}" />`),e=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="3" x="0" y="6" stroke="none" height="4" width="20" fill="${a.color}" />${g}</svg>`;break;case"plot":if(!a.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(a.shape)){e=`<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" /></svg>`;break}if(a.shape==="star"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" points="${d.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(a.shape==="triangle"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.shape==="square"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.shape==="diamond"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.shape==="pentagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.shape==="hexagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}}l+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${e}</div> ${a.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.applyDataLabel(a.type==="line"?this.FINAL_CONFIG.line.labels.formatter:a.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,a.value,this.dataLabel({p:a.prefix,v:a.value,s:a.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}),{datapoint:a}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${d.dataLabel({v:this.checkNaN(Math.abs(a.value)/i*100),s:"%",r:this.FINAL_CONFIG.chart.tooltip.roundingPercentage})})`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&a.comments.length&&a.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(l+=`<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]}</div>`)}}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${this.FINAL_CONFIG.chart.tooltip.color}">${l}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(l=>({y:l>=0?this.zero-this.drawingArea.height*this.ratioToMax(l):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(l)),value:l,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix}))},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){this.prepareChart(),document.addEventListener("mousemove",l=>{this.clientPosition={x:l.clientX,y:l.clientY}})},methods:{abbreviate:d.abbreviate,adaptColorToBackground:d.adaptColorToBackground,applyDataLabel:d.applyDataLabel,assignStackRatios:d.assignStackRatios,calcLinearProgression:d.calcLinearProgression,calculateNiceScaleWithExactExtremes:d.calculateNiceScaleWithExactExtremes,checkNaN:d.checkNaN,closestDecimal:d.closestDecimal,convertColorToHex:d.convertColorToHex,convertConfigColors:d.convertConfigColors,convertCustomPalette:d.convertCustomPalette,createCsvContent:d.createCsvContent,createSmoothPath:d.createSmoothPath,createTSpans:d.createTSpans,dataLabel:d.dataLabel,downloadCsv:d.downloadCsv,error:d.error,functionReturnsString:d.functionReturnsString,hasDeepProperty:d.hasDeepProperty,isFunction:d.isFunction,isSafeValue:d.isSafeValue,objectIsEmpty:d.objectIsEmpty,setOpacity:d.setOpacity,shiftHue:d.shiftHue,translateSize:d.translateSize,treeShake:d.treeShake,useMouse:G.useMouse,useNestedProp:p.useNestedProp,getHighlightAreaPosition(l){const i=this.drawingArea.left+this.drawingArea.width/this.maxSeries*(l.from-this.slicer.start),n=this.drawingArea.width/(this.slicer.end-this.slicer.start)*l.span<0?1e-5:this.drawingArea.width/(this.slicer.end-this.slicer.start)*l.span;return{x:i<this.drawingArea.left?this.drawingArea.left:i,width:n}},prepareConfig(){const l=d.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return l;const i=this.useNestedProp({userConfig:this.config,defaultConfig:l});return this.config&&this.hasDeepProperty(this.config,"chart.highlightArea")&&(Array.isArray(this.config.chart.highlightArea)?i.chart.highlightArea=this.config.chart.highlightArea:i.chart.highlightArea=[this.config.chart.highlightArea]),this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMin")?i.chart.grid.labels.yAxis.scaleMin=this.config.chart.grid.labels.yAxis.scaleMin:i.chart.grid.labels.yAxis.scaleMin=null,this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMax")?i.chart.grid.labels.yAxis.scaleMax=this.config.chart.grid.labels.yAxis.scaleMax:i.chart.grid.labels.yAxis.scaleMax=null,i.theme?{...p.useNestedProp({userConfig:this.themes.vue_ui_xy[i.theme]||this.config,defaultConfig:i}),customPalette:this.themePalettes[i.theme]||this.palette}:i},prepareChart(){if(this.objectIsEmpty(this.dataset)?this.error({componentName:"VueUiXy",type:"dataset"}):this.dataset.forEach((l,i)=>{[null,void 0].includes(l.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:i})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(l=>{l.series.forEach((i,n)=>{this.isSafeValue(i)||console.warn(`VueUiXy has detected an unsafe value in your dataset:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-jAZxyteD.cjs"),B=require("./DataTable-kOScyzFF.cjs"),E=require("./Title-DAEaaXFr.cjs"),G=require("./Tooltip-Cb9jWppv.cjs"),z=require("./usePrinter-Cx-xmAjb.cjs"),V=require("./Shape-CHWOgbhq.cjs"),P=require("./BaseIcon-DhAyJ2rW.cjs"),M=require("./vue-ui-table-sparkline-yjChfsNj.cjs"),T=require("./vue-ui-skeleton-C14g9G-o.cjs"),D=require("./Slicer-C0R4JA2q.cjs"),R=require("./vue-ui-accordion-WXKee19V.cjs"),p=require("./useNestedProp-DksYpyh6.cjs"),H=require("./PackageVersion-Tm6EPIDH.cjs"),t=require("vue"),W=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=d.createUid(),Y={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},components:{DataTable:B.DataTable,Shape:V._sfc_main,Title:E._sfc_main,Tooltip:G._sfc_main,UserOptions:z.UserOptions,BaseIcon:P.default,TableSparkline:M.default,Skeleton:T.default,Slicer:D.Slicer,Accordion:R.default,PackageVersion:H._sfc_main},data(){this.dataset.forEach((n,m)=>{[null,void 0].includes(n.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:m})});const l=Math.max(...this.dataset.map(n=>n.series.length)),i={start:0,end:l};return{themePalettes:d.themePalettes,themes:d.themes,slicerStep:0,selectedScale:null,CTX:null,CANVAS:null,opacity:d.opacity,useSafeValues:!0,palette:d.palette,height:600,width:1e3,viewBox:"0 0 1000 600",clientPosition:{x:0,y:0},canvasClientPosition:{x:0,y:0},icons:{line:"line",bar:"bar",plot:"plot"},isFullscreen:!1,isPrinting:!1,isImaging:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},showTooltip:!0,showTable:!1,isStacked:!1,useIndividualScale:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:d.createUid(),step:0,tableStep:0,titleStep:0,slicer:i,__to__:null,maxX:l,showSparklineTable:!0,segregateStep:0,sliderId:q,fontSizes:{xAxis:18,yAxis:12,dataLabels:20,plotLabels:10},plotRadii:{plot:3,line:3},selectedMinimapIndex:null}},watch:{dataset:{handler(l,i){this.maxX=Math.max(...this.dataset.map(n=>n.series.length)),this.slicer={start:0,end:this.maxX},this.slicerStep+=1,this.segregateStep+=1},deep:!0},config:{handler(l,i){this.FINAL_CONFIG=this.prepareConfig(),this.prepareChart(),this.titleStep+=1,this.tableStep+=1},deep:!0}},computed:{minimap(){if(!this.FINAL_CONFIG.chart.zoom.minimap.show)return[];const l=this.datasetWithIds.filter(a=>!this.segregatedSeries.includes(a.id)),i=Math.max(...l.map(a=>a.series.length)),n=[];for(let a=0;a<i;a+=1)n.push(l.map(e=>e.series[a]||0).reduce((e,g)=>(e||0)+(g||0),0));const m=Math.min(...n);return n.map(a=>a+(m<0?Math.abs(m):0))},customPalette(){return this.convertCustomPalette(this.FINAL_CONFIG.customPalette)},backgroundColor(){return this.FINAL_CONFIG.chart.backgroundColor},slicerColor(){return this.FINAL_CONFIG.chart.zoom.color},allScales(){const l=this.lineSet.map(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height,autoScaleYLabels:a.autoScaleYLabels})),i=this.barSet.map(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height})),n=this.plotSet.map(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height})),m=[...l,...i,...n].flatMap(a=>a).length;return[...l,...i,...n].flatMap((a,e)=>({id:a.id,scaleLabel:a.scaleLabel,name:a.name,color:a.color,scale:a.scale,yOffset:a.yOffset,individualHeight:a.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/m*(e+1),yLabels:a.scaleYLabels||a.scale.ticks.map(g=>({y:g>=0?a.zero-a.individualHeight*(g/a.max):a.zero+a.individualHeight*Math.abs(g)/a.max,value:g}))}))},isDataset(){return!!this.dataset&&this.dataset.length},chartFont(){const l=document.getElementById(`vue-ui-xy_${this.uniqueId}`);return window.getComputedStyle(l,null).getPropertyValue("font-family")},FINAL_CONFIG:{get:function(){return this.prepareConfig()},set:function(l){return l}},hasHighlightArea(){return Array.isArray(this.FINAL_CONFIG.chart.highlightArea)?this.FINAL_CONFIG.chart.highlightArea.some(l=>l.show):this.FINAL_CONFIG.chart.highlightArea&&this.FINAL_CONFIG.chart.highlightArea.show},highlightAreas(){if(Array.isArray(this.FINAL_CONFIG.chart.highlightArea))return this.FINAL_CONFIG.chart.highlightArea.map(i=>({...i,span:i.from===i.to?1:i.to<i.from?0:i.to-i.from+1}));const l=this.FINAL_CONFIG.chart.highlightArea;return[{...l,span:l.from===l.to?1:l.to<l.from?0:l.to-l.from+1}]},xPadding(){return this.FINAL_CONFIG.chart.grid.position==="middle"?0:this.drawingArea.width/this.maxSeries/2},relativeZero(){return this.niceScale.min>=0?0:Math.abs(this.niceScale.min)},absoluteMax(){return this.niceScale.max+this.relativeZero},datasetWithIds(){return this.useSafeValues?this.dataset.map((l,i)=>({...l,id:`uniqueId_${i}`})):this.dataset},safeDataset(){return this.useSafeValues?this.dataset.map((l,i)=>({...l,series:l.series.map(n=>this.isSafeValue(n)?n:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(l.color?l.color:this.customPalette[i]?this.customPalette[i]:this.palette[i]),id:`uniqueId_${i}`})):this.dataset},relativeDataset(){return this.safeDataset.map((l,i)=>({...l,series:l.series.map(n=>n+this.relativeZero),absoluteValues:l.series})).filter(l=>!this.segregatedSeries.includes(l.id))},tableSparklineDataset(){return this.relativeDataset.map(l=>{const i=l.absoluteValues.map(n=>[void 0,null].includes(n)?0:n);return{id:l.id,name:l.name,color:l.color,values:this.fillArray(this.maxSeries,i)}})},tableSparklineConfig(){return{responsiveBreakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint,roundingValues:this.FINAL_CONFIG.table.rounding,showAverage:!1,showMedian:!1,showTotal:!1,fontFamily:this.FINAL_CONFIG.chart.fontFamily,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix,colNames:JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),thead:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},tbody:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},userOptions:{show:!1}}},absoluteDataset(){return this.safeDataset.map((l,i)=>({absoluteIndex:i,...l,series:l.series.map(n=>n+this.relativeZero),absoluteValues:l.series,segregate:()=>this.segregate(l),isSegregated:this.segregatedSeries.includes(l.id)}))},barSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="bar").map((l,i)=>{this.checkAutoScaleError(l);const n=Math.min(...l.absoluteValues.filter(c=>![null,void 0].includes(c))),m=Math.max(...l.absoluteValues.filter(c=>![null,void 0].includes(c))),e={ratios:l.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-n)/(m-n)),valueMin:n,valueMax:m<0?0:m},g={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues.filter(c=>![void 0,null].includes(c)))>0?0:Math.min(...l.absoluteValues.filter(c=>![null,void 0].includes(c)))},k=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,F=1.0000001,u=this.calculateNiceScaleWithExactExtremes(g.min,g.max===g.min?g.max*F:g.max,k),x=this.calculateNiceScaleWithExactExtremes(e.valueMin,e.valueMax===e.valueMin?e.valueMax*F:e.valueMax,k),L=u.min>=0?0:Math.abs(u.min),y=0,S=u.max+L,C=x.max+Math.abs(y),f=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,b=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,r=this.drawingArea.bottom-f-b*L/S,o=this.drawingArea.bottom-f-b*y/C,s=this.absoluteDataset.filter(c=>c.type==="bar").filter(c=>!this.segregatedSeries.includes(c.id)).length,h=l.series.map((c,N)=>{const O=this.mutableConfig.useIndividualScale?(l.absoluteValues[N]+L)/S:this.ratioToMax(c),v=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*N:this.drawingArea.left+this.slot.bar*i+this.slot.bar*N*s-this.barSlot/2-i*this.barPeriodGap;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(v),y:this.drawingArea.bottom-f-b*O,value:l.absoluteValues[N],zeroPosition:this.checkNaN(r),individualMax:this.checkNaN(S),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),w=l.absoluteValues.map(c=>x.min>=0?(c-Math.abs(x.min))/(x.max-Math.abs(x.min)):(c+Math.abs(x.min))/(x.max+Math.abs(x.min))),A=l.series.map((c,N)=>{const O=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*N:this.drawingArea.left-this.slot.bar/2+this.slot.bar*i+this.slot.bar*N*this.absoluteDataset.filter(v=>v.type==="bar").filter(v=>!this.segregatedSeries.includes(v.id)).length;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(O),y:this.checkNaN(this.drawingArea.bottom-this.checkNaN(f)-(this.checkNaN(b)*w[N]||0)),value:l.absoluteValues[N],zeroPosition:this.checkNaN(r),individualMax:this.checkNaN(S),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),I=u.ticks.map(c=>({y:c>=0?r-b*(c/S):r+b*Math.abs(c)/S,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),_=x.ticks.map(c=>{const N=(c-x.min)/(x.max-x.min);return{y:c>=0?o-b*N:o+b*N,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:f,autoScaleYLabels:_,individualHeight:b,scaleYLabels:l.autoScaling?_:I,individualScale:l.autoScaling?x:u,individualMax:l.autoScaling?C:S,zeroPosition:l.autoScaling?o:r,plots:l.autoScaling?A:h}})},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(l=>!this.segregatedSeries.includes(l.id)))},lineSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="line").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(c=>![void 0,null].includes(c))),n=Math.max(...l.absoluteValues.filter(c=>![void 0,null].includes(c)))||1,a={ratios:l.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-i)/(n-i)),valueMin:i,valueMax:n},e={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||(Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues))},g=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,k=1.0000001,F=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*k:e.max,g),u=this.calculateNiceScaleWithExactExtremes(a.valueMin,a.valueMax===a.valueMin?a.valueMax*k:a.valueMax,g),x=F.min>=0?0:Math.abs(F.min),L=0,y=F.max+Math.abs(x),S=u.max+Math.abs(L),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-C-f*x/y,r=this.drawingArea.bottom-C-f*L/S,o=l.series.map((c,N)=>{const O=this.mutableConfig.useIndividualScale?(l.absoluteValues[N]+Math.abs(x))/y:this.ratioToMax(c);return{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*N),y:this.checkNaN(this.drawingArea.bottom-C-f*O),value:l.absoluteValues[N],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),s=l.absoluteValues.map(c=>u.min>=0?(c-Math.abs(u.min))/(u.max-Math.abs(u.min)):(c+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=l.series.map((c,N)=>[void 0,null].includes(l.absoluteValues[N])?{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*N),y:b,value:l.absoluteValues[N],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}:{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*N),y:this.checkNaN(this.drawingArea.bottom-C-(f*s[N]||0)),value:l.absoluteValues[N],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}),w=this.createSmoothPath(o),A=this.createSmoothPath(h),I=F.ticks.map(c=>({y:c>=0?b-f*(c/y):b+f*Math.abs(c)/y,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),_=u.ticks.map(c=>{const N=(c-u.min)/(u.max-u.min);return{y:c>=0?r-f*N:r+f*N,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:C,autoScaleYLabels:_,individualHeight:f,scaleYLabels:l.autoScaling?_:I,individualScale:l.autoScaling?u:F,individualMax:l.autoScaling?S:y,zeroPosition:l.autoScaling?r:b,curve:l.autoScaling?A:w,plots:l.autoScaling?h:o,area:l.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(l.autoScaling?h:o,l.autoScaling?r:b):this.createArea(o):""}})},plotSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="plot").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(I=>![null,void 0].includes(I))),n=Math.max(...l.absoluteValues.filter(I=>![null,void 0].includes(I)))||1,a={ratios:l.absoluteValues.filter(I=>![null,void 0].includes(I)).map(I=>(I-i)/(n-i)),valueMin:i,valueMax:n},e={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues)},g=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,k=1.0000001,F=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*k:e.max,g),u=this.calculateNiceScaleWithExactExtremes(a.valueMin,a.valueMax===a.valueMin?a.valueMax*k:a.valueMax,g),x=F.min>=0?0:Math.abs(F.min),L=0,y=F.max+x,S=u.max+Math.abs(L),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-C-f*x/y,r=this.drawingArea.bottom-C-f*L/S,o=l.series.map((I,_)=>{const c=this.mutableConfig.useIndividualScale?(l.absoluteValues[_]+Math.abs(x))/y:this.ratioToMax(I);return{x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*_),y:this.checkNaN(this.drawingArea.bottom-C-f*c),value:l.absoluteValues[_],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[_]||""}}),s=l.absoluteValues.map(I=>u.min>=0?(I-Math.abs(u.min))/(u.max-Math.abs(u.min)):(I+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=l.series.map((I,_)=>({x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*_),y:this.checkNaN(this.drawingArea.bottom-C-(f*s[_]||0)),value:l.absoluteValues[_],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[_]||""})),w=F.ticks.map(I=>({y:I>=0?b-f*(I/y):b+f*Math.abs(I)/y,value:I,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),A=u.ticks.map(I=>{const _=(I-u.min)/(u.max-u.min);return{y:I>=0?r-f*_:r+f*_,value:I,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:C,autoScaleYLabels:A,individualHeight:f,scaleYLabels:l.autoScaling?A:w,individualScale:l.autoScaling?u:F,individualMax:l.autoScaling?S:y,zeroPosition:l.autoScaling?r:b,plots:l.autoScaling?h:o}})},drawingArea(){const l=this.mutableConfig.useIndividualScale&&this.FINAL_CONFIG.chart.grid.labels.show?this.absoluteDataset.filter(i=>!this.segregatedSeries.includes(i.id)).length*(this.mutableConfig.isStacked?0:this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth):0;return{top:this.FINAL_CONFIG.chart.padding.top,right:this.width-this.FINAL_CONFIG.chart.padding.right,bottom:this.height-this.FINAL_CONFIG.chart.padding.bottom,left:this.FINAL_CONFIG.chart.padding.left+l,height:this.height-(this.FINAL_CONFIG.chart.padding.top+this.FINAL_CONFIG.chart.padding.bottom),width:this.width-(this.FINAL_CONFIG.chart.padding.right+this.FINAL_CONFIG.chart.padding.left+l)}},max(){return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax?this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax:Math.max(...this.safeDataset.filter(l=>!this.segregatedSeries.includes(l.id)).map(l=>Math.max(...l.series)))},min(){if(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin!==null)return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin;const l=Math.min(...this.safeDataset.filter(i=>!this.segregatedSeries.includes(i.id)).map(i=>Math.min(...i.series)));return l>0?0:l},niceScale(){return this.calculateNiceScaleWithExactExtremes(this.min,this.max<0?0:this.max,this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps)},maxSeries(){return this.slicer.end-this.slicer.start},timeLabels(){return this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values.slice(this.slicer.start,this.slicer.end)},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(l=>l.type==="bar").filter(l=>!this.segregatedSeries.includes(l.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},barSlot(){const l=this.safeDataset.filter(i=>i.type==="bar").filter(i=>!this.segregatedSeries.includes(i.id)).length;return this.drawingArea.width/this.maxSeries/l-this.barPeriodGap*l},barPeriodGap(){return this.slot.line*this.FINAL_CONFIG.bar.periodGap},maxSlot(){return Math.max(...Object.values(this.slot).filter(l=>l!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=this.relativeDataset.map(n=>({label:n.name,color:n.color,type:n.type})),i=[];return this.timeLabels.forEach((n,m)=>{const a=[n];this.relativeDataset.forEach(e=>{a.push(this.canShowValue(e.absoluteValues[m])?Number(e.absoluteValues[m].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),i.push(a)}),{head:l,body:i}},dataTable(){const l=this.FINAL_CONFIG.table.showSum;let i=[""].concat(this.relativeDataset.map(e=>e.name));l&&(i=i.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>'));let n=[];for(let e=0;e<this.maxSeries;e+=1){const g=this.relativeDataset.map(k=>k.absoluteValues[e]??0).reduce((k,F)=>k+F,0);n.push([this.timeLabels[e]??"-"].concat(this.relativeDataset.map(k=>this.applyDataLabel(k.type==="line"?this.FINAL_CONFIG.line.labels.formatter:k.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,k.absoluteValues[e]??0,this.dataLabel({p:k.prefix||this.FINAL_CONFIG.chart.labels.prefix,v:k.absoluteValues[e]??0,s:k.suffix||this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.table.rounding})))).concat(l?(g??0).toFixed(this.FINAL_CONFIG.table.rounding):[]))}const m={th:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},td:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},breakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint},a=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(e=>e.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:i,body:n,config:m,colNames:a}},dataTooltipSlot(){return{datapoint:this.selectedSeries,seriesIndex:this.selectedSerieIndex,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}},selectedSeries(){return this.relativeDataset.map(l=>({shape:l.shape||null,name:l.name,color:l.color,type:l.type,value:l.absoluteValues.find((i,n)=>n===this.selectedSerieIndex),comments:l.comments||[],prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix}))},tooltipContent(){let l="",i=this.selectedSeries.map(a=>a.value).filter(a=>this.isSafeValue(a)&&a!==null).reduce((a,e)=>Math.abs(a)+Math.abs(e),0);const n=this.timeLabels[this.selectedSerieIndex],m=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(m)&&this.functionReturnsString(()=>m({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?m({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(n&&(l+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${n}</div>`),this.selectedSeries.forEach(a=>{if(this.isSafeValue(a.value)){let e="",g="";switch(this.icons[a.type]){case"bar":e=`<svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" rx="1" stroke="none" height="12" width="12" fill="${a.color}" /></svg>`;break;case"line":!a.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(a.shape)?g=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" />`:a.shape==="triangle"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="square"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="diamond"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="pentagon"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="hexagon"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="star"&&(g=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" points="${d.createStar({plot:{x:10,y:8},radius:4})}" />`),e=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="3" x="0" y="6" stroke="none" height="4" width="20" fill="${a.color}" />${g}</svg>`;break;case"plot":if(!a.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(a.shape)){e=`<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" /></svg>`;break}if(a.shape==="star"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" points="${d.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(a.shape==="triangle"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.shape==="square"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.shape==="diamond"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.shape==="pentagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.shape==="hexagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}}l+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${e}</div> ${a.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.applyDataLabel(a.type==="line"?this.FINAL_CONFIG.line.labels.formatter:a.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,a.value,this.dataLabel({p:a.prefix,v:a.value,s:a.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}),{datapoint:a}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${d.dataLabel({v:this.checkNaN(Math.abs(a.value)/i*100),s:"%",r:this.FINAL_CONFIG.chart.tooltip.roundingPercentage})})`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&a.comments.length&&a.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(l+=`<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]}</div>`)}}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${this.FINAL_CONFIG.chart.tooltip.color}">${l}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(l=>({y:l>=0?this.zero-this.drawingArea.height*this.ratioToMax(l):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(l)),value:l,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix}))},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){this.prepareChart(),document.addEventListener("mousemove",l=>{this.clientPosition={x:l.clientX,y:l.clientY}})},methods:{abbreviate:d.abbreviate,adaptColorToBackground:d.adaptColorToBackground,applyDataLabel:d.applyDataLabel,assignStackRatios:d.assignStackRatios,calcLinearProgression:d.calcLinearProgression,calculateNiceScaleWithExactExtremes:d.calculateNiceScaleWithExactExtremes,checkNaN:d.checkNaN,closestDecimal:d.closestDecimal,convertColorToHex:d.convertColorToHex,convertConfigColors:d.convertConfigColors,convertCustomPalette:d.convertCustomPalette,createCsvContent:d.createCsvContent,createSmoothPath:d.createSmoothPath,createTSpans:d.createTSpans,dataLabel:d.dataLabel,downloadCsv:d.downloadCsv,error:d.error,functionReturnsString:d.functionReturnsString,hasDeepProperty:d.hasDeepProperty,isFunction:d.isFunction,isSafeValue:d.isSafeValue,objectIsEmpty:d.objectIsEmpty,setOpacity:d.setOpacity,shiftHue:d.shiftHue,translateSize:d.translateSize,treeShake:d.treeShake,useMouse:G.useMouse,useNestedProp:p.useNestedProp,getHighlightAreaPosition(l){const i=this.drawingArea.left+this.drawingArea.width/this.maxSeries*(l.from-this.slicer.start),n=this.drawingArea.width/(this.slicer.end-this.slicer.start)*l.span<0?1e-5:this.drawingArea.width/(this.slicer.end-this.slicer.start)*l.span;return{x:i<this.drawingArea.left?this.drawingArea.left:i,width:n}},prepareConfig(){const l=d.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return l;const i=this.useNestedProp({userConfig:this.config,defaultConfig:l});return this.config&&this.hasDeepProperty(this.config,"chart.highlightArea")&&(Array.isArray(this.config.chart.highlightArea)?i.chart.highlightArea=this.config.chart.highlightArea:i.chart.highlightArea=[this.config.chart.highlightArea]),this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMin")?i.chart.grid.labels.yAxis.scaleMin=this.config.chart.grid.labels.yAxis.scaleMin:i.chart.grid.labels.yAxis.scaleMin=null,this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMax")?i.chart.grid.labels.yAxis.scaleMax=this.config.chart.grid.labels.yAxis.scaleMax:i.chart.grid.labels.yAxis.scaleMax=null,i.theme?{...p.useNestedProp({userConfig:this.themes.vue_ui_xy[i.theme]||this.config,defaultConfig:i}),customPalette:this.themePalettes[i.theme]||this.palette}:i},prepareChart(){if(this.objectIsEmpty(this.dataset)?this.error({componentName:"VueUiXy",type:"dataset"}):this.dataset.forEach((l,i)=>{[null,void 0].includes(l.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:i})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(l=>{l.series.forEach((i,n)=>{this.isSafeValue(i)||console.warn(`VueUiXy has detected an unsafe value in your dataset:
|
|
2
2
|
-----> The serie '${l.name}' contains the value '${i}' at index ${n}.
|
|
3
3
|
'${i}' was converted to null to allow the chart to display.`)})}),this.mutableConfig={dataLabels:{show:!0},showTooltip:this.FINAL_CONFIG.chart.tooltip.show===!0,showTable:this.FINAL_CONFIG.showTable===!0,isStacked:this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked,useIndividualScale:this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale},this.FINAL_CONFIG.responsive){const i=this.$refs.chart.parentNode,{height:n,width:m}=i.getBoundingClientRect();let a=null,e=0;this.FINAL_CONFIG.chart.title.show&&(a=this.$refs.chartTitle,e=a.getBoundingClientRect().height);let g=null,k=0;this.FINAL_CONFIG.chart.zoom.show&&this.maxX>6&&this.isDataset&&(g=this.$refs.chartSlicer.$el,k=g.getBoundingClientRect().height);let F=null,u=0;this.FINAL_CONFIG.chart.legend.show&&(F=this.$refs.chartLegend,u=F.getBoundingClientRect().height),this.height=n-e-u-k,this.width=m,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes(),new ResizeObserver(L=>{for(const y of L)this.$refs.chartTitle&&(e=this.$refs.chartTitle.getBoundingClientRect().height),this.$refs.chartSlicer&&this.$refs.chartSlicer.$el&&(k=this.$refs.chartSlicer.$el.getBoundingClientRect().height),this.$refs.chartLegend&&(u=this.$refs.chartLegend.getBoundingClientRect().height),this.height=y.contentBoxSize[0].blockSize-e-u-k-24,this.width=y.contentBoxSize[0].inlineSize,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes()}).observe(i)}else this.height=this.FINAL_CONFIG.chart.height,this.width=this.FINAL_CONFIG.chart.width,this.viewBox=`0 0 ${this.width} ${this.height}`,this.fontSizes.dataLabels=this.FINAL_CONFIG.chart.grid.labels.fontSize,this.fontSizes.yAxis=this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,this.fontSizes.xAxis=this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,this.fontSizes.plotLabels=this.FINAL_CONFIG.chart.labels.fontSize,this.plotRadii.plot=this.FINAL_CONFIG.plot.radius,this.plotRadii.line=this.FINAL_CONFIG.line.radius},selectMinimapIndex(l){this.selectedMinimapIndex=l},convertSizes(){this.fontSizes.dataLabels=this.translateSize({relator:this.height,adjuster:400,source:this.FINAL_CONFIG.chart.grid.labels.fontSize,threshold:10,fallback:10}),this.fontSizes.yAxis=this.translateSize({relator:this.width,adjuster:1e3,source:this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,threshold:10,fallback:10}),this.fontSizes.xAxis=this.translateSize({relator:this.width,adjuster:1e3,source:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,threshold:10,fallback:10}),this.fontSizes.plotLabels=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.chart.labels.fontSize,threshold:10,fallback:10}),this.plotRadii.plot=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.plot.radius,threshold:1,fallback:1}),this.plotRadii.line=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.line.radius,threshold:1,fallback:1})},toggleStack(){this.mutableConfig.isStacked=!this.mutableConfig.isStacked,this.mutableConfig.isStacked?this.mutableConfig.useIndividualScale=!0:this.mutableConfig.useIndividualScale=this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale},toggleTable(){this.mutableConfig.showTable=!this.mutableConfig.showTable},toggleLabels(){this.mutableConfig.dataLabels.show=!this.mutableConfig.dataLabels.show},toggleTooltip(){this.mutableConfig.showTooltip=!this.mutableConfig.showTooltip},checkAutoScaleError(l){l.autoScaling&&(this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale||console.warn(`VueUiXy (datapoint: ${l.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`),this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked||console.warn(`VueUiXy (datapoint: ${l.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`))},createArea(l){if(!l[0])return[-10,-10,"",-10,-10];const i={x:l[0].x,y:this.zero},n={x:l.at(-1).x,y:this.zero},m=[];return l.forEach(a=>{m.push(`${a.x},${a.y} `)}),[i.x,i.y,...m,n.x,n.y].toString()},createIndividualArea(l,i){if(!l[0])return[-10,-10,"",-10,-10];const n={x:l[0]?l[0].x:Math.min(...l.filter(e=>!!e).map(e=>e.x)),y:i},m={x:l.at(-1)?l.at(-1).x:Math.min(...l.filter(e=>!!e).map(e=>e.x)),y:i},a=[];return l.filter(e=>!!e).forEach(e=>{a.push(`${e.x},${e.y} `)}),[n.x,n.y,...a,m.x,m.y].toString()},createStar:d.createStar,createPolygonPath:d.createPolygonPath,fillArray(l,i){let n=Array(l).fill(0);for(let m=0;m<i.length&&m<l;m+=1)n[m]=i[m];return n},refreshSlicer(){this.slicer={start:0,end:Math.max(...this.dataset.map(l=>l.series.length))},this.slicerStep+=1},calcRectHeight(l){return l.value>=0?this.checkNaN(this.zero-l.y<=0?1e-5:this.zero-l.y):this.checkNaN(l.y-this.zero<=0?1e-5:l.y-this.zero)},calcIndividualHeight(l){return l.value>=0?this.checkNaN(l.zeroPosition-l.y<=0?1e-5:l.zeroPosition-l.y):this.checkNaN(l.y-l.zeroPosition<=0?1e-5:l.zeroPosition-l.y)},calcRectWidth(){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.slot.line-this.drawingArea.width/this.maxSeries*.1:this.slot.bar},calcRectX(l){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?l.x+this.drawingArea.width/this.maxSeries*.05:l.x+this.slot.bar/2},calcRectY(l){return l.value>=0?l.y:this.zero},calcIndividualRectY(l){return l.value>=0?l.y:[null,void 0,NaN,1/0,-1/0].includes(l.zeroPosition)?0:l.zeroPosition},canShowValue(l){return![null,void 0,NaN,1/0,-1/0].includes(l)},findClosestValue(l,i){let n=i[0],m=Math.abs(l-i[0]);for(let a=1;a<i.length;a+=1){const e=Math.abs(l-i[a]);e<m&&i[a]<l&&(n=i[a],m=e)}return n},ratioToMax(l){return l/(this.canShowValue(this.absoluteMax)?this.absoluteMax:1)},selectX(l){this.$emit("selectX",{dataset:this.relativeDataset.map(i=>({name:i.name,value:[null,void 0,NaN].includes(i.absoluteValues[l])?null:i.absoluteValues[l],color:i.color,type:i.type})),index:l,indexLabel:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l]})},getData(){return this.absoluteDataset.map(l=>({values:l.absoluteValues,color:l.color,name:l.name,type:l.type}))},segregate(l){if(this.segregatedSeries.includes(l.id))this.segregatedSeries=this.segregatedSeries.filter(i=>i!==l.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(l.id)}this.$emit("selectLegend",this.relativeDataset.map(i=>({name:i.name,values:i.absoluteValues,color:i.color,type:i.type}))),this.segregateStep+=1},toggleTooltipVisibility(l,i=null){this.isTooltip=l,l?this.selectedSerieIndex=i:this.selectedSerieIndex=null},toggleFullscreen(l){this.isFullscreen=l,this.step+=1},showSpinnerPdf(){this.isPrinting=!0},async generatePdf(){this.showSpinnerPdf(),clearTimeout(this.__to__),this.isPrinting=!0,this.__to__=setTimeout(async()=>{try{const{default:l}=await Promise.resolve().then(()=>require("./pdf-9cRTLjY8.cjs"));await l({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"})}catch(l){console.error("Error generating PDF:",l)}finally{this.isPrinting=!1}},100)},generateCsv(){const l=[[this.FINAL_CONFIG.chart.title.text],[this.FINAL_CONFIG.chart.title.subtitle.text],[""]],i=["",...this.table.head.map(e=>e.label)],n=this.table.body,m=l.concat([i]).concat(n),a=this.createCsvContent(m);this.downloadCsv({csvContent:a,title:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"})},showSpinnerImage(){this.isImaging=!0},async generateImage(){this.showSpinnerImage(),clearTimeout(this.__to__),this.isImaging=!0,this.__to__=setTimeout(async()=>{try{const{default:l}=await Promise.resolve().then(()=>require("./img-BFCs759q.cjs"));await l({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy",format:"png"})}catch(l){console.error("Error generating image:",l)}finally{this.isImaging=!1}},100)}}},X=["id"],U=["viewBox"],Z={key:0},J={class:"vue-ui-xy-grid"},K=["stroke","x1","x2","y1","y2"],Q=["stroke","x1","x2","y1","y2"],j={key:1},$=["x1","x2","y1","y2","stroke"],ee=["x1","x2","y1","y2","stroke"],te=["x1","x2","y1","y2","stroke"],le={key:3},re=["x1","x2","y1","y2","stroke"],ae=["id"],ie=["stop-color"],se=["stop-color"],oe=["stop-color"],ne=["id"],ce=["stop-color"],he=["stop-color"],de=["stop-color"],ue=["id"],me=["stop-color"],ge=["stop-color"],Ne=["id"],fe=["stop-color"],ke=["stop-color"],Ie=["id"],xe=["stop-color"],be=["stop-color"],Fe=["x","y","height","width","fill"],ye=["x","y","width"],_e=["x","y","height","width","fill"],Ce=["x","y","height","width","rx","fill","stroke","stroke-width"],Se=["width","x","y"],Le={key:0},Ae=["id"],we=["fill"],Oe=["x1","x2","y1","y2","stroke","marker-end"],ve=["x","y","font-size","fill"],Ge=["stroke","x1","x2","y1","y2"],pe={key:2},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ee=["x","y","width","height","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray"],ze={key:4},Ve=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["fill","font-size","transform"],Me=["x1","x2","y1","y2","stroke"],Te=["x","y","font-size","fill"],De=["x1","x2","y1","y2","stroke"],Re=["x","y","font-size","fill"],He=["width","x","y"],We={style:{width:"100%"}},qe={key:0},Ye=["id"],Xe=["fill"],Ue=["x1","x2","y1","y2","stroke","marker-end"],Ze=["x","y","font-size","fill"],Je=["d","stroke","stroke-width","stroke-dasharray"],Ke={key:1},Qe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],je={key:0},$e=["d","fill"],et=["d","fill"],tt=["d","stroke","stroke-width","stroke-dasharray"],lt={key:2},rt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],at=["width","x","y"],it={style:{width:"100%"}},st={key:3},ot=["id"],nt=["fill"],ct=["x1","x2","y1","y2","stroke","marker-end"],ht=["x","y","font-size","fill"],dt={key:5},ut=["x","y","font-size","fill"],mt=["x","y","font-size","fill","font-weight"],gt={key:6},Nt=["x","y","font-size","fill"],ft=["x","y"],kt=["x","y"],It={key:7},xt=["x","y","font-size","fill"],bt=["x","y"],Ft=["x","y"],yt=["x","y","font-size","fill","innerHTML"],_t=["x","y","font-size","fill","innerHTML"],Ct=["x","y","font-size","fill","innerHTML"],St=["x","y","font-size","fill","innerHTML"],Lt=["x","y","width","height","fill","onMouseenter"],At=["font-size","fill","transform"],wt=["x","y","font-size","fill"],Ot={key:9},vt=["text-anchor","font-size","fill","transform"],Gt=["x","y","height","width","onMouseenter","onClick"],pt={key:10},Bt=["x","y"],Et=["cx","cy","r","fill"],zt={key:3,class:"vue-data-ui-watermark"},Vt=["onClick"],Pt={key:0,viewBox:"0 0 20 12",height:"14",width:"20"},Mt=["fill"],Tt={key:1,viewBox:"0 0 12 12",height:"14",width:"14"},Dt=["fill"],Rt={key:7,ref:"chartLegend"},Ht={style:{display:"flex","flex-direction":"row",gap:"6px","align-items":"center","padding-left":"6px"},"data-html2canvas-ignore":""},Wt=["innerHTML"];function qt(l,i,n,m,a,e){const g=t.resolveComponent("Title"),k=t.resolveComponent("UserOptions"),F=t.resolveComponent("PackageVersion"),u=t.resolveComponent("Shape"),x=t.resolveComponent("Skeleton"),L=t.resolveComponent("Slicer"),y=t.resolveComponent("Tooltip"),S=t.resolveComponent("BaseIcon"),C=t.resolveComponent("TableSparkline"),f=t.resolveComponent("DataTable"),b=t.resolveComponent("Accordion");return t.openBlock(),t.createElementBlock("div",{id:`vue-ui-xy_${a.uniqueId}`,class:t.normalizeClass(`vue-ui-xy ${a.isFullscreen?"vue-data-ui-wrapper-fullscreen":""} ${e.FINAL_CONFIG.useCssAnimation?"":"vue-ui-dna"}`),ref:"chart",style:t.normalizeStyle(`background:${e.FINAL_CONFIG.chart.backgroundColor}; color:${e.FINAL_CONFIG.chart.color};width:100%;${e.FINAL_CONFIG.chart.title.text?"":"padding-top:36px"};font-family:${e.FINAL_CONFIG.chart.fontFamily};${e.FINAL_CONFIG.responsive?"height: 100%":""}`)},[e.FINAL_CONFIG.chart.title.show?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"chartTitle",class:"vue-ui-xy-title",style:t.normalizeStyle(`font-family:${e.FINAL_CONFIG.chart.fontFamily}`)},[(t.openBlock(),t.createBlock(g,{key:`title_${a.titleStep}`,config:{title:{cy:"xy-div-title",...e.FINAL_CONFIG.chart.title},subtitle:{cy:"xy-div-subtitle",...e.FINAL_CONFIG.chart.title.subtitle}}},null,8,["config"]))],4)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.userOptions.show&&e.isDataset?(t.openBlock(),t.createBlock(k,{ref:"defails",key:`user_options_${a.step}`,backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color,isPrinting:a.isPrinting,isImaging:a.isImaging,uid:a.uniqueId,hasTooltip:e.FINAL_CONFIG.chart.userOptions.buttons.tooltip&&e.FINAL_CONFIG.chart.tooltip.show,hasPdf:e.FINAL_CONFIG.chart.userOptions.buttons.pdf,hasXls:e.FINAL_CONFIG.chart.userOptions.buttons.csv,hasImg:e.FINAL_CONFIG.chart.userOptions.buttons.img,hasLabel:e.FINAL_CONFIG.chart.userOptions.buttons.labels,hasTable:e.FINAL_CONFIG.chart.userOptions.buttons.table,hasStack:n.dataset.length>1&&e.FINAL_CONFIG.chart.userOptions.buttons.stack,hasFullscreen:e.FINAL_CONFIG.chart.userOptions.buttons.fullscreen,isStacked:a.mutableConfig.isStacked,isFullscreen:a.isFullscreen,chartElement:l.$refs.chart,position:e.FINAL_CONFIG.chart.userOptions.position,isTooltip:a.mutableConfig.showTooltip,titles:{...e.FINAL_CONFIG.chart.userOptions.buttonTitles},onToggleFullscreen:e.toggleFullscreen,onGeneratePdf:e.generatePdf,onGenerateCsv:e.generateCsv,onGenerateImage:e.generateImage,onToggleTable:e.toggleTable,onToggleLabels:e.toggleLabels,onToggleStack:e.toggleStack,onToggleTooltip:e.toggleTooltip},t.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionStack?{name:"optionStack",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:t.withCtx(({toggleFullscreen:r,isFullscreen:o})=>[t.renderSlot(l.$slots,"optionFullscreen",t.normalizeProps(t.guardReactiveProps({toggleFullscreen:r,isFullscreen:o})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasLabel","hasTable","hasStack","hasFullscreen","isStacked","isFullscreen","chartElement","position","isTooltip","titles","onToggleFullscreen","onGeneratePdf","onGenerateCsv","onGenerateImage","onToggleTable","onToggleLabels","onToggleStack","onToggleTooltip"])):t.createCommentVNode("",!0),e.isDataset?(t.openBlock(),t.createElementBlock("svg",{key:2,xmlns:"http://www.w3.org/2000/svg",class:t.normalizeClass([{"vue-data-ui-fullscreen--on":a.isFullscreen,"vue-data-ui-fulscreen--off":!a.isFullscreen},"vue-ui-xy-svg"]),width:"100%",viewBox:a.viewBox,style:t.normalizeStyle(`background: transparent; color:${e.FINAL_CONFIG.chart.color}; font-family:${e.FINAL_CONFIG.chart.fontFamily}`)},[t.createVNode(F),e.maxSeries>0?(t.openBlock(),t.createElementBlock("g",Z,[t.createElementVNode("g",J,[e.FINAL_CONFIG.chart.grid.labels.xAxis.showBaseline?(t.openBlock(),t.createElementBlock("line",{key:0,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.drawingArea.bottom,y2:e.drawingArea.bottom,"stroke-linecap":"round"},null,8,K)):t.createCommentVNode("",!0),a.mutableConfig.useIndividualScale?e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.allScales,r=>(t.openBlock(),t.createElementBlock("g",null,[r.id===a.selectedScale&&r.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.yLabels,o=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.checkNaN(o.y),y2:e.checkNaN(o.y),stroke:r.color,"stroke-width":.5,"stroke-linecap":"round"},null,8,ee))),256)):r.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(r.yLabels,o=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.checkNaN(o.y),y2:e.checkNaN(o.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,te))),256)):t.createCommentVNode("",!0)]))),256)):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.FINAL_CONFIG.chart.grid.labels.yAxis.showBaseline?(t.openBlock(),t.createElementBlock("line",{key:0,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.left+e.xPadding,y1:e.drawingArea.top,y2:e.drawingArea.bottom,"stroke-linecap":"round"},null,8,Q)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(),t.createElementBlock("g",j,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.yLabels,r=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.checkNaN(r.y),y2:e.checkNaN(r.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,$))),256))])):t.createCommentVNode("",!0)],64)),e.FINAL_CONFIG.chart.grid.showVerticalLines?(t.openBlock(),t.createElementBlock("g",le,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries+(e.FINAL_CONFIG.chart.grid.position==="middle"?1:0),(r,o)=>(t.openBlock(),t.createElementBlock("line",{key:`grid_vertical_line_${o}`,x1:e.drawingArea.width/e.maxSeries*o+e.drawingArea.left+e.xPadding,x2:e.drawingArea.width/e.maxSeries*o+e.drawingArea.left+e.xPadding,y1:e.drawingArea.top,y2:e.drawingArea.bottom,"stroke-width":"0.5",stroke:e.FINAL_CONFIG.chart.grid.stroke},null,8,re))),128))])):t.createCommentVNode("",!0)]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(r,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_rect_${o}`},[t.createElementVNode("linearGradient",{id:`rectGradient_pos_${o}_${a.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":r.color},null,8,ie),t.createElementVNode("stop",{offset:"62%","stop-color":`${e.shiftHue(r.color,.02)}`},null,8,se),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.shiftHue(r.color,.05)}`},null,8,oe)],8,ae),t.createElementVNode("linearGradient",{id:`rectGradient_neg_${o}_${a.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(r.color,.05)}`},null,8,ce),t.createElementVNode("stop",{offset:"38%","stop-color":`${e.shiftHue(r.color,.02)}`},null,8,he),t.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,de)],8,ne)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(r,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_plot_${o}`},[t.createElementVNode("radialGradient",{id:`plotGradient_${o}_${a.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(r.color,.05)}`},null,8,me),t.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,ge)],8,ue)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(r,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_line_${o}`},[t.createElementVNode("radialGradient",{id:`lineGradient_${o}_${a.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(r.color,.05)}`},null,8,fe),t.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,ke)],8,Ne),t.createElementVNode("linearGradient",{id:`areaGradient_${o}_${a.uniqueId}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.setOpacity(e.shiftHue(r.color,.03),e.FINAL_CONFIG.line.area.opacity)}`},null,8,xe),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.setOpacity(r.color,e.FINAL_CONFIG.line.area.opacity)}`},null,8,be)],8,Ie)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.highlightAreas,r=>(t.openBlock(),t.createElementBlock("g",null,[r.show?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.span,(o,s)=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("rect",{style:t.normalizeStyle({transition:"none",opacity:r.from+s>=a.slicer.start&&r.from+s<=a.slicer.end-1?1:0}),x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(r.from+s-a.slicer.start),y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:e.setOpacity(r.color,r.opacity)},null,12,Fe),r.caption.text&&s===0?(t.openBlock(),t.createElementBlock("foreignObject",{key:0,x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(r.from+s-a.slicer.start)-(r.caption.width==="auto"?0:r.caption.width/2-e.drawingArea.width/e.maxSeries*r.span/2),y:e.drawingArea.top+r.caption.offsetY,style:t.normalizeStyle({overflow:"visible",opacity:r.to>=a.slicer.start&&r.from<a.slicer.end?1:0}),height:"1",width:r.caption.width==="auto"?e.drawingArea.width/e.maxSeries*r.span:r.caption.width},[t.createElementVNode("div",{style:t.normalizeStyle(`padding:${r.caption.padding}px;text-align:${r.caption.textAlign};font-size:${r.caption.fontSize}px;color:${r.caption.color};font-weight:${r.caption.bold?"bold":"normal"}`)},t.toDisplayString(r.caption.text),5)],12,ye)):t.createCommentVNode("",!0)]))),256)):t.createCommentVNode("",!0)]))),256)),t.createElementVNode("g",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`tooltip_trap_${o}`},[t.createElementVNode("rect",{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*o,y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:[a.selectedMinimapIndex,a.selectedSerieIndex,a.selectedRowIndex].includes(o)?e.setOpacity(e.FINAL_CONFIG.chart.highlighter.color,e.FINAL_CONFIG.chart.highlighter.opacity):"transparent"},null,8,_e)]))),128))]),e.barSet.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.barSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_bar_${o}`,class:t.normalizeClass(`serie_bar_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`bar_plot_${o}_${h}`},[e.canShowValue(s.value)?(t.openBlock(),t.createElementBlock("rect",{key:0,x:e.calcRectX(s),y:a.mutableConfig.useIndividualScale?e.calcIndividualRectY(s):e.calcRectY(s),height:a.mutableConfig.useIndividualScale?Math.abs(e.calcIndividualHeight(s)):Math.abs(e.calcRectHeight(s)),width:e.calcRectWidth()-(a.mutableConfig.useIndividualScale&&a.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(a.mutableConfig.useIndividualScale&&a.mutableConfig.isStacked?0:e.barPeriodGap),rx:e.FINAL_CONFIG.bar.borderRadius,fill:e.FINAL_CONFIG.bar.useGradient?s.value>=0?`url(#rectGradient_pos_${o}_${a.uniqueId})`:`url(#rectGradient_neg_${o}_${a.uniqueId})`:r.color,stroke:e.FINAL_CONFIG.bar.border.useSerieColor?r.color:e.FINAL_CONFIG.bar.border.stroke,"stroke-width":e.FINAL_CONFIG.bar.border.strokeWidth},null,8,Ce)):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:(e.calcRectWidth()-(a.mutableConfig.useIndividualScale&&a.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(a.mutableConfig.useIndividualScale&&a.mutableConfig.isStacked?0:e.barPeriodGap)/2)+e.FINAL_CONFIG.chart.comments.width,x:e.calcRectX(s)-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:e.checkNaN(s.y)+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:r.color}},void 0,!0)],8,Se)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(e.calcLinearProgression(r.plots).trend)?(t.openBlock(),t.createElementBlock("g",Le,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`bar_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:r.color},null,8,we)],8,Ae)]),r.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(r.plots).x1,x2:e.calcLinearProgression(r.plots).x2,y1:e.calcLinearProgression(r.plots).y1,y2:e.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#bar_arrow_${o})`},null,8,Oe)):t.createCommentVNode("",!0),r.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(r.plots).x2,y:e.calcLinearProgression(r.plots).y2-6,"font-size":a.fontSizes.plotLabels,fill:r.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,ve)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)):t.createCommentVNode("",!0),!a.mutableConfig.useIndividualScale&&e.FINAL_CONFIG.chart.grid.labels.zeroLine.show?(t.openBlock(),t.createElementBlock("line",{key:1,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.checkNaN(e.zero),y2:e.checkNaN(e.zero),"stroke-linecap":"round"},null,8,Ge)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.highlighter.useLine&&(![null,void 0].includes(a.selectedSerieIndex)||a.selectedMinimapIndex!==null)?(t.openBlock(),t.createElementBlock("g",pe,[t.createElementVNode("line",{x1:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.selectedSerieIndex||a.selectedMinimapIndex)+e.drawingArea.width/e.maxSeries/2,x2:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.selectedSerieIndex||a.selectedMinimapIndex)+e.drawingArea.width/e.maxSeries/2,y1:e.drawingArea.top,y2:e.drawingArea.bottom,stroke:e.FINAL_CONFIG.chart.highlighter.color,"stroke-width":e.FINAL_CONFIG.chart.highlighter.lineWidth,"stroke-dasharray":e.FINAL_CONFIG.chart.highlighter.lineDasharray,"stroke-linecap":"round",style:{transition:"none !important",animation:"none !important","pointer-events":"none"}},null,8,Be)])):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.frame.show?(t.openBlock(),t.createElementBlock("rect",{key:3,style:{pointerEvents:"none",transition:"none"},x:e.drawingArea.left+e.xPadding<0?0:e.drawingArea.left+e.xPadding,y:e.drawingArea.top,width:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries)<0?0:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries),height:e.drawingArea.height<0?0:e.drawingArea.height,fill:"transparent",stroke:e.FINAL_CONFIG.chart.grid.frame.stroke,"stroke-width":e.FINAL_CONFIG.chart.grid.frame.strokeWidth,"stroke-linecap":e.FINAL_CONFIG.chart.grid.frame.strokeLinecap,"stroke-linejoin":e.FINAL_CONFIG.chart.grid.frame.strokeLinejoin,"stroke-dasharray":e.FINAL_CONFIG.chart.grid.frame.strokeDasharray},null,8,Ee)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.show?(t.openBlock(),t.createElementBlock("g",ze,[a.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,r=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("line",{x1:r.x+e.xPadding,x2:r.x+e.xPadding,y1:a.mutableConfig.isStacked?e.checkNaN(e.drawingArea.bottom-r.yOffset-r.individualHeight):e.checkNaN(e.drawingArea.top),y2:a.mutableConfig.isStacked?e.checkNaN(e.drawingArea.bottom-r.yOffset):e.checkNaN(e.drawingArea.bottom),stroke:r.color,"stroke-width":e.FINAL_CONFIG.chart.grid.stroke,"stroke-linecap":"round",style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},null,12,Ve)]))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,r=>(t.openBlock(),t.createElementBlock("g",{style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},[t.createElementVNode("text",{fill:r.color,"font-size":a.fontSizes.dataLabels,"text-anchor":"middle",transform:`translate(${r.x-e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+5}, ${a.mutableConfig.isStacked?e.drawingArea.bottom-r.yOffset-r.individualHeight/2:e.drawingArea.top+e.drawingArea.height/2}) rotate(-90)`},t.toDisplayString(r.name)+" "+t.toDisplayString(r.scaleLabel?`- ${r.scaleLabel}`:""),9,Pe),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.yLabels,(o,s)=>(t.openBlock(),t.createElementBlock("line",{x1:r.x-3+e.xPadding,x2:r.x+e.xPadding,y1:e.checkNaN(o.y),y2:e.checkNaN(o.y),stroke:r.color,"stroke-width":1,"stroke-linecap":"round"},null,8,Me))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.yLabels,(o,s)=>(t.openBlock(),t.createElementBlock("text",{x:r.x-5+e.xPadding,y:e.checkNaN(o.y)+a.fontSizes.dataLabels/3,"font-size":a.fontSizes.dataLabels,"text-anchor":"end",fill:r.color},t.toDisplayString(e.applyDataLabel(e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,o.value,e.dataLabel({p:o.prefix,v:o.value,s:o.suffix,r:1}),{datapoint:o.datapoint,seriesIndex:s})),9,Te))),256))],4))),256))],64)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.yLabels,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`yLabel_${o}`},[e.canShowValue(r)&&r.value>=e.niceScale.min&&r.value<=e.niceScale.max?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.left-5+e.xPadding,y1:e.checkNaN(r.y),y2:e.checkNaN(r.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1","stroke-linecap":"round"},null,8,De)):t.createCommentVNode("",!0),r.value>=e.niceScale.min&&r.value<=e.niceScale.max?(t.openBlock(),t.createElementBlock("text",{key:1,x:e.drawingArea.left-7+e.xPadding,y:e.checkNaN(r.y+a.fontSizes.dataLabels/3),"font-size":a.fontSizes.dataLabels,"text-anchor":"end",fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.canShowValue(r.value)?e.applyDataLabel(e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,r.value,e.dataLabel({p:r.prefix,v:r.value,s:r.suffix,r:1})):""),9,Re)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_plot_${o}`,class:t.normalizeClass(`serie_plot_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`circle_plot_${o}_${h}`},[s&&e.canShowValue(s.value)?(t.openBlock(),t.createBlock(u,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",color:e.FINAL_CONFIG.plot.useGradient?`url(#plotGradient_${o}_${a.uniqueId})`:e.FINAL_CONFIG.plot.dot.useSerieColor?r.color:e.FINAL_CONFIG.plot.dot.fill,plot:{x:e.checkNaN(s.x),y:e.checkNaN(s.y)},radius:a.selectedSerieIndex!==null&&a.selectedSerieIndex===h||a.selectedMinimapIndex!==null&&a.selectedMinimapIndex===h?(a.plotRadii.plot||6)*1.5:a.plotRadii.plot||6,stroke:e.FINAL_CONFIG.plot.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:r.color,strokeWidth:e.FINAL_CONFIG.plot.dot.strokeWidth},null,8,["shape","color","plot","radius","stroke","strokeWidth"])):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:e.FINAL_CONFIG.chart.comments.width,x:s.x-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:s.y+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.createElementVNode("div",We,[t.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:r.color}},void 0,!0)])],8,He)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(e.calcLinearProgression(r.plots).trend)?(t.openBlock(),t.createElementBlock("g",qe,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`plot_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:r.color},null,8,Xe)],8,Ye)]),r.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(r.plots).x1,x2:e.calcLinearProgression(r.plots).x2,y1:e.calcLinearProgression(r.plots).y1,y2:e.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#plot_arrow_${o})`},null,8,Ue)):t.createCommentVNode("",!0),r.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(r.plots).x2,y:e.calcLinearProgression(r.plots).y2-6,"font-size":a.fontSizes.plotLabels,fill:r.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,Ze)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${o}`,class:t.normalizeClass(`serie_line_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[r.smooth&&r.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${r.curve}`,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":r.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,Je)):r.plots.length>1?(t.openBlock(),t.createElementBlock("g",Ke,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`line_${o}_${h}`},[s&&h<r.plots.length-1&&r.plots[h+1]&&e.canShowValue(s.value)&&e.canShowValue(r.plots[h+1].value)?(t.openBlock(),t.createElementBlock("line",{key:0,x1:s.x,x2:r.plots[h+1].x,y1:s.y,y2:r.plots[h+1].y,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":r.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Qe)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0)],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${o}`,class:t.normalizeClass(`serie_line_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[r.useArea&&r.plots.length>1?(t.openBlock(),t.createElementBlock("g",je,[r.smooth?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M ${r.plots[0]?r.plots[0].x:Math.min(...r.plots.filter(s=>!!s).map(s=>s.x))},${a.mutableConfig.isStacked?e.drawingArea.bottom-r.yOffset:e.drawingArea.bottom} ${r.curve} L ${r.plots.at(-1)?r.plots.at(-1).x:e.drawingArea.left+e.slot.line*o+e.slot.line/2},${a.mutableConfig.isStacked?e.drawingArea.bottom-r.yOffset:e.drawingArea.bottom} Z`,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${o}_${a.uniqueId})`:e.setOpacity(r.color,e.FINAL_CONFIG.line.area.opacity)},null,8,$e)):(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${r.area}Z`,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${o}_${a.uniqueId})`:e.setOpacity(r.color,e.FINAL_CONFIG.line.area.opacity)},null,8,et))])):t.createCommentVNode("",!0),r.smooth&&r.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${r.curve}`,stroke:r.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":r.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,tt)):r.plots.length>1?(t.openBlock(),t.createElementBlock("g",lt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`line_${o}_${h}`},[s&&h<r.plots.length-1&&r.plots[h+1]&&e.canShowValue(s.value)&&e.canShowValue(r.plots[h+1].value)?(t.openBlock(),t.createElementBlock("line",{key:0,x1:s.x,x2:r.plots[h+1].x,y1:s.y,y2:r.plots[h+1].y,stroke:r.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":r.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,rt)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`circle_line_${o}_${h}`},[s&&e.canShowValue(s.value)?(t.openBlock(),t.createBlock(u,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",color:e.FINAL_CONFIG.line.useGradient?`url(#lineGradient_${o}_${a.uniqueId})`:e.FINAL_CONFIG.line.dot.useSerieColor?r.color:e.FINAL_CONFIG.line.dot.fill,plot:{x:e.checkNaN(s.x),y:e.checkNaN(s.y)},radius:a.selectedSerieIndex!==null&&a.selectedSerieIndex===h||a.selectedMinimapIndex!==null&&a.selectedMinimapIndex===h?(a.plotRadii.line||6)*1.5:a.plotRadii.line||6,stroke:e.FINAL_CONFIG.line.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:r.color,strokeWidth:e.FINAL_CONFIG.line.dot.strokeWidth},null,8,["shape","color","plot","radius","stroke","strokeWidth"])):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:e.FINAL_CONFIG.chart.comments.width,x:s.x-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:s.y+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.createElementVNode("div",it,[t.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:r.color}},void 0,!0)])],8,at)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(e.calcLinearProgression(r.plots).trend)?(t.openBlock(),t.createElementBlock("g",st,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`line_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:r.color},null,8,nt)],8,ot)]),r.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(r.plots).x1,x2:e.calcLinearProgression(r.plots).x2,y1:e.calcLinearProgression(r.plots).y1,y2:e.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#line_arrow_${o})`},null,8,ct)):t.createCommentVNode("",!0),r.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(r.plots).x2,y:e.calcLinearProgression(r.plots).y2-6,"font-size":a.fontSizes.plotLabels,fill:r.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,ht)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(e.FINAL_CONFIG.bar.labels.show||e.FINAL_CONFIG.bar.serieName.show)&&a.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",dt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_bar_${o}`,class:t.normalizeClass(`xLabel_bar_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_bar_${o}_${h}`},[s&&(!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0)&&e.FINAL_CONFIG.bar.labels.show?(t.openBlock(),t.createElementBlock("text",{key:0,x:a.mutableConfig.useIndividualScale&&a.mutableConfig.isStacked?s.x+e.slot.line/2:e.calcRectX(s)+e.calcRectWidth()/2-e.barPeriodGap/2,y:e.checkNaN(s.y)+(s.value>0?e.FINAL_CONFIG.bar.labels.offsetY:-e.FINAL_CONFIG.bar.labels.offsetY*3),"text-anchor":"middle","font-size":a.fontSizes.plotLabels,fill:e.FINAL_CONFIG.bar.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.bar.labels.formatter,s.value,e.dataLabel({p:r.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:r.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.bar.labels.rounding}),{datapoint:s,serie:r}):""),9,ut)):t.createCommentVNode("",!0),s&&e.FINAL_CONFIG.bar.serieName.show?(t.openBlock(),t.createElementBlock("text",{key:1,x:a.mutableConfig.useIndividualScale&&a.mutableConfig.isStacked?s.x+e.slot.line/2:s.x+e.calcRectWidth()*1.1,y:s.y+(s.value>0?e.FINAL_CONFIG.bar.serieName.offsetY:-e.FINAL_CONFIG.bar.serieName.offsetY*3),"text-anchor":"middle","font-size":a.fontSizes.plotLabels,fill:e.FINAL_CONFIG.bar.serieName.useSerieColor?r.color:e.FINAL_CONFIG.bar.serieName.color,"font-weight":e.FINAL_CONFIG.bar.serieName.bold?"bold":"normal"},t.toDisplayString(e.FINAL_CONFIG.bar.serieName.useAbbreviation?e.abbreviate({source:r.name,length:e.FINAL_CONFIG.bar.serieName.abbreviationSize}):r.name),9,mt)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),e.FINAL_CONFIG.plot.labels.show&&a.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",gt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}`,class:t.normalizeClass(`xLabel_plot_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}_${h}`},[s&&!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x,y:s.y+e.FINAL_CONFIG.plot.labels.offsetY,"text-anchor":"middle","font-size":a.fontSizes.plotLabels,fill:e.FINAL_CONFIG.plot.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.plot.labels.formatter,s.value,e.dataLabel({p:r.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:r.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.plot.labels.rounding}),{datapoint:s,serie:r}):""),9,Nt)):t.createCommentVNode("",!0),s&&h===0&&r.useTag&&r.useTag==="start"?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,x:s.x,y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(r.color,80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${a.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(r.name),5)],8,ft)):t.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.useTag&&r.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,x:s.x-r.name.length*(a.fontSizes.plotLabels/2),y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(r.color,80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${a.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(r.name),5)],8,kt)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),e.FINAL_CONFIG.line.labels.show&&a.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",It,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}`,class:t.normalizeClass(`xLabel_line_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}_${h}`},[s&&!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x,y:s.y+(s.value>0?e.FINAL_CONFIG.line.labels.offsetY:-e.FINAL_CONFIG.line.labels.offsetY*3),"text-anchor":"middle","font-size":a.fontSizes.plotLabels,fill:e.FINAL_CONFIG.line.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.line.labels.formatter,s.value,e.dataLabel({p:r.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:r.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.line.labels.rounding}),{datapoint:s,serie:r}):""),9,xt)):t.createCommentVNode("",!0),s&&h===0&&r.useTag&&r.useTag==="start"?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,x:s.x,y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(r.color,80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${a.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(r.name),5)],8,bt)):t.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.useTag&&r.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,x:s.x-r.name.length*(a.fontSizes.plotLabels/2),y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(r.color,80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${a.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(r.name),5)],8,Ft)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}`,class:t.normalizeClass(`xLabel_line_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}_${h}`},[s&&h===0&&r.showSerieName&&r.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x-a.fontSizes.plotLabels,y:s.y,"font-size":a.fontSizes.plotLabels,"text-anchor":"end",fill:r.color,innerHTML:e.createTSpans({content:r.name,fontSize:a.fontSizes.plotLabels,fill:r.color,x:s.x-a.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,yt)):t.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.showSerieName&&r.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:s.x+a.fontSizes.plotLabels,y:s.y,"font-size":a.fontSizes.plotLabels,"text-anchor":"start",fill:r.color,innerHTML:e.createTSpans({content:r.name,fontSize:a.fontSizes.plotLabels,fill:r.color,x:s.x+a.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,_t)):t.createCommentVNode("",!0)]))),128))],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}`,class:t.normalizeClass(`xLabel_plot_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}_${h}`},[s&&h===0&&r.showSerieName&&r.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x-a.fontSizes.plotLabels,y:s.y,"font-size":a.fontSizes.plotLabels,"text-anchor":"end",fill:r.color,innerHTML:e.createTSpans({content:r.name,fontSize:a.fontSizes.plotLabels,fill:r.color,x:s.x-a.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,Ct)):t.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.showSerieName&&r.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:s.x+a.fontSizes.plotLabels,y:s.y,"font-size":a.fontSizes.plotLabels,"text-anchor":"start",fill:r.color,innerHTML:e.createTSpans({content:r.name,fontSize:a.fontSizes.plotLabels,fill:r.color,x:s.x+a.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,St)):t.createCommentVNode("",!0)]))),128))],6))),128)),a.mutableConfig.useIndividualScale&&!a.mutableConfig.isStacked?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:8},t.renderList(e.allScales,r=>(t.openBlock(),t.createElementBlock("rect",{x:r.x-e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,y:e.drawingArea.top,width:e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,height:e.drawingArea.height<0?10:e.drawingArea.height,fill:a.selectedScale===r.id?e.setOpacity(r.color,20):"transparent",onMouseenter:o=>a.selectedScale=r.id,onMouseleave:i[0]||(i[0]=o=>a.selectedScale=null)},null,40,Lt))),256)):t.createCommentVNode("",!0),t.createElementVNode("g",null,[e.FINAL_CONFIG.chart.grid.labels.axis.yLabel&&!a.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock("text",{key:0,"font-size":a.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color,transform:`translate(${a.fontSizes.yAxis+e.FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${e.drawingArea.top+e.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle",style:{transition:"none"}},t.toDisplayString(e.FINAL_CONFIG.chart.grid.labels.axis.yLabel),9,At)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.axis.xLabel?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:a.width/2,y:e.drawingArea.bottom+a.fontSizes.yAxis+a.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,"font-size":a.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.FINAL_CONFIG.chart.grid.labels.axis.xLabel),9,wt)):t.createCommentVNode("",!0)]),e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show?(t.openBlock(),t.createElementBlock("g",Ot,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.timeLabels,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`time_label_${o}`},[r&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(o===0||o===e.timeLabels.length-1)&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&a.selectedSerieIndex===o&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo&&o%Math.floor((this.slicer.end-this.slicer.start)/e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo)===0?(t.openBlock(),t.createElementBlock("text",{key:0,"text-anchor":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation>0?"start":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation<0?"end":"middle","font-size":a.fontSizes.xAxis,fill:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,transform:`translate(${e.drawingArea.left+e.drawingArea.width/e.maxSeries*o+e.drawingArea.width/e.maxSeries/2}, ${e.drawingArea.bottom+a.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`},t.toDisplayString(r||""),9,vt)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),t.createElementVNode("g",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`tooltip_trap_${o}`},[t.createElementVNode("rect",{"data-cy-trap":"",x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*o,y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:"transparent",onMouseenter:s=>e.toggleTooltipVisibility(!0,o),onMouseleave:i[1]||(i[1]=s=>e.toggleTooltipVisibility(!1)),onClick:s=>e.selectX(o)},null,40,Gt)]))),128))]),e.FINAL_CONFIG.chart.timeTag.show&&![null,void 0].includes(a.selectedSerieIndex)?(t.openBlock(),t.createElementBlock("g",pt,[(t.openBlock(),t.createElementBlock("foreignObject",{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*a.selectedSerieIndex-100+e.drawingArea.width/e.maxSeries/2,y:e.drawingArea.bottom,width:"200",height:"40",style:{overflow:"visible !important"}},[t.createElementVNode("div",{class:"vue-ui-xy-time-tag",style:t.normalizeStyle(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${e.FINAL_CONFIG.chart.timeTag.backgroundColor};color:${e.FINAL_CONFIG.chart.timeTag.color};font-size:${e.FINAL_CONFIG.chart.timeTag.fontSize}px`)},t.toDisplayString(e.timeLabels[a.selectedSerieIndex]||a.selectedSerieIndex),5)],8,Bt)),t.createElementVNode("circle",{cx:e.drawingArea.left+e.drawingArea.width/e.maxSeries*a.selectedSerieIndex+e.drawingArea.width/e.maxSeries/2,cy:e.drawingArea.bottom,r:e.FINAL_CONFIG.chart.timeTag.circleMarker.radius,fill:e.FINAL_CONFIG.chart.timeTag.circleMarker.color},null,8,Et)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.renderSlot(l.$slots,"svg",{svg:e.svg},void 0,!0)],14,U)):t.createCommentVNode("",!0),l.$slots.watermark?(t.openBlock(),t.createElementBlock("div",zt,[t.renderSlot(l.$slots,"watermark",t.normalizeProps(t.guardReactiveProps({isPrinting:a.isPrinting||a.isImaging})),void 0,!0)])):t.createCommentVNode("",!0),e.isDataset?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(x,{key:4,config:{type:"line",style:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,line:{axis:{color:e.FINAL_CONFIG.chart.grid.stroke},path:{color:e.FINAL_CONFIG.chart.grid.stroke,strokeWidth:.5}}}}},null,8,["config"])),e.FINAL_CONFIG.chart.zoom.show&&a.maxX>6&&e.isDataset?(t.openBlock(),t.createBlock(L,{ref:"chartSlicer",key:`slicer_${a.slicerStep}`,background:e.FINAL_CONFIG.chart.zoom.color,fontSize:e.FINAL_CONFIG.chart.zoom.fontSize,useResetSlot:e.FINAL_CONFIG.chart.zoom.useResetSlot,labelLeft:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[a.slicer.start],labelRight:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[a.slicer.end-1],textColor:e.FINAL_CONFIG.chart.color,inputColor:e.FINAL_CONFIG.chart.zoom.color,selectColor:e.FINAL_CONFIG.chart.zoom.highlightColor,borderColor:e.FINAL_CONFIG.chart.backgroundColor,minimap:e.minimap,smoothMinimap:e.FINAL_CONFIG.chart.zoom.minimap.smooth,minimapSelectedColor:e.FINAL_CONFIG.chart.zoom.minimap.selectedColor,minimapSelectionRadius:e.FINAL_CONFIG.chart.zoom.minimap.selectionRadius,minimapLineColor:e.FINAL_CONFIG.chart.zoom.minimap.lineColor,minimapSelectedColorOpacity:e.FINAL_CONFIG.chart.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:a.selectedSerieIndex,minimapIndicatorColor:e.FINAL_CONFIG.chart.zoom.minimap.indicatorColor,max:a.maxX,min:0,valueStart:a.slicer.start,valueEnd:a.slicer.end,start:a.slicer.start,"onUpdate:start":i[2]||(i[2]=r=>a.slicer.start=r),end:a.slicer.end,"onUpdate:end":i[3]||(i[3]=r=>a.slicer.end=r),onReset:e.refreshSlicer,onTrapMouse:e.selectMinimapIndex},{"reset-action":t.withCtx(({reset:r})=>[t.renderSlot(l.$slots,"reset-action",t.normalizeProps(t.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","borderColor","minimap","smoothMinimap","minimapSelectedColor","minimapSelectionRadius","minimapLineColor","minimapSelectedColorOpacity","minimapSelectedIndex","minimapIndicatorColor","max","valueStart","valueEnd","start","end","onReset","onTrapMouse"])):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.legend.show?(t.openBlock(),t.createElementBlock("div",{key:6,ref:"chartLegend",class:"vue-ui-xy-legend",style:t.normalizeStyle(`font-size:${e.FINAL_CONFIG.chart.legend.fontSize}px`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.absoluteDataset,(r,o)=>(t.openBlock(),t.createElementBlock("div",{key:`div_legend_item_${o}`,onClick:s=>e.segregate(r),class:t.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":a.segregatedSeries.includes(r.id)})},[a.icons[r.type]==="line"?(t.openBlock(),t.createElementBlock("svg",Pt,[t.createElementVNode("rect",{x:"0",y:"7",rx:"3",stroke:"none",height:"4",width:"20",fill:r.color},null,8,Mt),t.createVNode(u,{plot:{x:10,y:9},radius:4,color:r.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",stroke:e.FINAL_CONFIG.chart.backgroundColor,strokeWidth:1},null,8,["color","shape","stroke"])])):(t.openBlock(),t.createElementBlock("svg",Tt,[a.icons[r.type]==="bar"?(t.openBlock(),t.createElementBlock("rect",{key:0,x:"0",y:"0",rx:"1",height:"12",width:"12",stroke:"none",fill:r.color},null,8,Dt)):(t.openBlock(),t.createBlock(u,{key:1,plot:{x:6,y:6},radius:5,color:r.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle"},null,8,["color","shape"]))])),t.createElementVNode("span",{style:t.normalizeStyle(`color:${e.FINAL_CONFIG.chart.legend.color}`)},t.toDisplayString(r.name),5)],10,Vt))),128))],4)):(t.openBlock(),t.createElementBlock("div",Rt,[t.renderSlot(l.$slots,"legend",{legend:e.absoluteDataset},void 0,!0)],512)),t.createVNode(y,{show:a.mutableConfig.showTooltip&&a.isTooltip,backgroundColor:e.FINAL_CONFIG.chart.tooltip.backgroundColor,color:e.FINAL_CONFIG.chart.tooltip.color,fontSize:e.FINAL_CONFIG.chart.tooltip.fontSize,borderRadius:e.FINAL_CONFIG.chart.tooltip.borderRadius,borderColor:e.FINAL_CONFIG.chart.tooltip.borderColor,borderWidth:e.FINAL_CONFIG.chart.tooltip.borderWidth,backgroundOpacity:e.FINAL_CONFIG.chart.tooltip.backgroundOpacity,position:e.FINAL_CONFIG.chart.tooltip.position,offsetY:e.FINAL_CONFIG.chart.tooltip.offsetY,parent:l.$refs.chart,content:e.tooltipContent,isCustom:e.FINAL_CONFIG.chart.tooltip.customFormat&&typeof e.FINAL_CONFIG.chart.tooltip.customFormat=="function"},{"tooltip-before":t.withCtx(()=>[t.renderSlot(l.$slots,"tooltip-before",t.normalizeProps(t.guardReactiveProps({...e.dataTooltipSlot})),void 0,!0)]),"tooltip-after":t.withCtx(()=>[t.renderSlot(l.$slots,"tooltip-after",t.normalizeProps(t.guardReactiveProps({...e.dataTooltipSlot})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.isDataset?(t.openBlock(),t.createBlock(b,{key:8,hideDetails:"",config:{open:a.mutableConfig.showTable,maxHeight:1e4,body:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color},head:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color}}},{content:t.withCtx(()=>[t.createElementVNode("div",{style:t.normalizeStyle(`${a.isPrinting?"":"max-height:400px"};overflow:auto;width:100%;margin-top:48px`)},[t.createElementVNode("div",Ht,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":i[4]||(i[4]=r=>a.showSparklineTable=r)},null,512),[[t.vModelCheckbox,a.showSparklineTable]]),t.createElementVNode("div",{onClick:i[5]||(i[5]=r=>a.showSparklineTable=!a.showSparklineTable),style:{cursor:"pointer"}},[t.createVNode(S,{name:"chartLine",size:20,stroke:e.FINAL_CONFIG.chart.color},null,8,["stroke"])])]),a.showSparklineTable?(t.openBlock(),t.createBlock(C,{key:`sparkline_${a.segregateStep}`,dataset:e.tableSparklineDataset,config:e.tableSparklineConfig},null,8,["dataset","config"])):(t.openBlock(),t.createBlock(f,{key:`table_${a.tableStep}`,colNames:e.dataTable.colNames,head:e.dataTable.head,body:e.dataTable.body,config:e.dataTable.config,title:`${e.FINAL_CONFIG.chart.title.text}${e.FINAL_CONFIG.chart.title.subtitle.text?` : ${e.FINAL_CONFIG.chart.title.subtitle.text}`:""}`,onClose:i[6]||(i[6]=r=>a.mutableConfig.showTable=!1)},{th:t.withCtx(({th:r})=>[t.createElementVNode("div",{innerHTML:r},null,8,Wt)]),td:t.withCtx(({td:r})=>[t.createTextVNode(t.toDisplayString(isNaN(Number(r))?r:e.dataLabel({p:e.FINAL_CONFIG.chart.labels.prefix,v:r,s:e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.table.rounding})),1)]),_:1},8,["colNames","head","body","config","title"]))],4)]),_:1},8,["config"])):t.createCommentVNode("",!0)],14,X)}const Yt=W._export_sfc(Y,[["render",qt],["__scopeId","data-v-0b37e892"]]);exports.default=Yt;
|