vue-data-ui 3.0.22 → 3.1.0

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.
Files changed (109) hide show
  1. package/dist/{Arrow-C3_2GkYQ.js → Arrow-DvG07exK.js} +1 -1
  2. package/dist/{BaseDraggableDialog-BhxUDwEm.js → BaseDraggableDialog-O7900pGp.js} +72 -59
  3. package/dist/{BaseIcon-B717hnWR.js → BaseIcon-DHtro8us.js} +1 -1
  4. package/dist/{useLoading-D7YHNtLX.js → BaseScanner-BgWxam9d.js} +11 -11
  5. package/dist/{ColorPicker-CH5_RNaK.js → ColorPicker-CpWzNn4r.js} +2 -2
  6. package/dist/DataTable-DJjA2_wf.js +140 -0
  7. package/dist/Legend-2-dC7DVb.js +72 -0
  8. package/dist/{NonSvgPenAndPaper-DCJGSteM.js → NonSvgPenAndPaper-DHeE4Yuv.js} +3 -3
  9. package/dist/{PackageVersion-CE7HSich.js → PackageVersion-DU12WH3O.js} +1 -1
  10. package/dist/{PenAndPaper-BMHsOtT8.js → PenAndPaper-B7QEDgx4.js} +3 -3
  11. package/dist/{Shape-C3J8aKNH.js → Shape-Dj2Hl33H.js} +1 -1
  12. package/dist/{Slicer-BEBDljWA.js → Slicer-D99HytqX.js} +2 -2
  13. package/dist/{SparkTooltip-CVSZQtoP.js → SparkTooltip-B-wL07rI.js} +1 -1
  14. package/dist/{Title-BL-IjQmj.js → Title-Dq2_Z9kR.js} +1 -1
  15. package/dist/{Tooltip-CCnDaboi.js → Tooltip-Y219DXZO.js} +1 -1
  16. package/dist/{UserOptions-BWMV0_Ze.js → UserOptions-BuGfCdAY.js} +2 -2
  17. package/dist/{dom-to-png-DwUGURhV.js → dom-to-png-BhciAKaM.js} +1 -1
  18. package/dist/{img-DsVqerdt.js → img-JOqdlnUs.js} +1 -1
  19. package/dist/{index-BHb_mcWF.js → index-CDQbCd41.js} +37 -2
  20. package/dist/{pdf-Ckt8JtYf.js → pdf-Dd-LIJqz.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +35 -0
  23. package/dist/types/vue-data-ui.d.ts +35 -0
  24. package/dist/{useAutoSizeLabelsInsideViewbox-Cy946l1e.js → useAutoSizeLabelsInsideViewbox-Bky5KGFZ.js} +1 -1
  25. package/dist/{useNestedProp-aC9S6EFJ.js → useNestedProp-BPEHGiYX.js} +1 -1
  26. package/dist/{usePrinter-B7rhbRrT.js → usePrinter-Bnl1YeUU.js} +2 -2
  27. package/dist/{vue-data-ui-Bu7qDtf0.js → vue-data-ui-DcNYz3cZ.js} +64 -64
  28. package/dist/vue-data-ui.js +1 -1
  29. package/dist/vue-ui-3d-bar-BNIFAeN-.js +1369 -0
  30. package/dist/{vue-ui-accordion-DsnF0JuK.js → vue-ui-accordion-Bf_LHFFX.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-s8xyb3Gf.js → vue-ui-age-pyramid-Bz-l1afR.js} +333 -286
  32. package/dist/{vue-ui-annotator-DRacM62z.js → vue-ui-annotator-BcfRH2BF.js} +2 -2
  33. package/dist/{vue-ui-bullet-DdDrdyOJ.js → vue-ui-bullet-DK1aM9fX.js} +8 -8
  34. package/dist/{vue-ui-candlestick-BsNnInNt.js → vue-ui-candlestick-D6mMjvtu.js} +453 -406
  35. package/dist/{vue-ui-carousel-table-Ci9mrUBd.js → vue-ui-carousel-table-Vp5f238W.js} +4 -4
  36. package/dist/{vue-ui-chestnut-fHfJNK0V.js → vue-ui-chestnut-BKc4v-lf.js} +509 -459
  37. package/dist/vue-ui-chord-CquhRjf0.js +1100 -0
  38. package/dist/vue-ui-circle-pack-D6zLgxa3.js +755 -0
  39. package/dist/{vue-ui-cursor-Bk5LHg5V.js → vue-ui-cursor-DIXb2S93.js} +2 -2
  40. package/dist/{vue-ui-dashboard-CjZMEYs6.js → vue-ui-dashboard-DmiriAK7.js} +62 -62
  41. package/dist/{vue-ui-digits-nDIvHyRB.js → vue-ui-digits-CLAIo9gW.js} +2 -2
  42. package/dist/{vue-ui-donut-CF9FdxfC.js → vue-ui-donut-C8h_tCSO.js} +477 -431
  43. package/dist/{vue-ui-donut-evolution-f5k-Yu3N.js → vue-ui-donut-evolution-C3r0YhKz.js} +482 -435
  44. package/dist/{vue-ui-dumbbell-Dm3gsrzi.js → vue-ui-dumbbell-D-t4M00E.js} +443 -398
  45. package/dist/vue-ui-flow-D7_D_UNm.js +900 -0
  46. package/dist/vue-ui-funnel-B0QOfZRz.js +666 -0
  47. package/dist/vue-ui-galaxy-Ccw5uNes.js +744 -0
  48. package/dist/{vue-ui-gauge-DkDpUAN7.js → vue-ui-gauge-DvW7nFmK.js} +8 -8
  49. package/dist/{vue-ui-gizmo-BD5fLs8r.js → vue-ui-gizmo-WGQxvGPy.js} +4 -4
  50. package/dist/vue-ui-heatmap-BQkLujyp.js +1127 -0
  51. package/dist/{vue-ui-history-plot-ICoBBO-y.js → vue-ui-history-plot-eU33r_Ot.js} +408 -361
  52. package/dist/{vue-ui-kpi-Dp2M2EFo.js → vue-ui-kpi-CKg2i71M.js} +3 -3
  53. package/dist/{vue-ui-mini-loader-C5672jjA.js → vue-ui-mini-loader-BmkGQsm_.js} +2 -2
  54. package/dist/vue-ui-molecule-Dlu0hjSg.js +702 -0
  55. package/dist/{vue-ui-mood-radar-B-qhYUcB.js → vue-ui-mood-radar-DQaxfw9R.js} +342 -291
  56. package/dist/{vue-ui-nested-donuts-V6BvP3pF.js → vue-ui-nested-donuts-Djj9Aw_i.js} +548 -502
  57. package/dist/{vue-ui-onion-BKqqbWbg.js → vue-ui-onion-ZgsErXis.js} +363 -317
  58. package/dist/vue-ui-parallel-coordinate-plot-B5fB22Jc.js +979 -0
  59. package/dist/vue-ui-quadrant-CMevCtXH.js +1483 -0
  60. package/dist/{vue-ui-quick-chart-BVZSdQeT.js → vue-ui-quick-chart-DcparKSX.js} +7 -7
  61. package/dist/vue-ui-radar-DFbxoKCK.js +858 -0
  62. package/dist/{vue-ui-rating-CncrxDCY.js → vue-ui-rating-ZUpxCWrk.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-VYM1dclx.js → vue-ui-relation-circle-eNKJY4Sx.js} +8 -8
  64. package/dist/vue-ui-ridgeline-D4shpQZd.js +1204 -0
  65. package/dist/vue-ui-rings-TdTHMbsa.js +785 -0
  66. package/dist/{vue-ui-scatter-D2b-u5dv.js → vue-ui-scatter-CVuV9ljU.js} +594 -548
  67. package/dist/{vue-ui-skeleton-BTuBaaE_.js → vue-ui-skeleton-CFxBU2-p.js} +3 -3
  68. package/dist/{vue-ui-smiley-D1UxJNbV.js → vue-ui-smiley-Har3B3aQ.js} +2 -2
  69. package/dist/{vue-ui-spark-trend-BCP0BWMI.js → vue-ui-spark-trend-FPk-XEwI.js} +4 -4
  70. package/dist/{vue-ui-sparkbar-eBo-RSvE.js → vue-ui-sparkbar-V3eJ0w0t.js} +4 -4
  71. package/dist/{vue-ui-sparkgauge-DberOXWX.js → vue-ui-sparkgauge-DKTGkWnJ.js} +4 -4
  72. package/dist/{vue-ui-sparkhistogram-CoKQGG5X.js → vue-ui-sparkhistogram-DJsgFwHs.js} +5 -5
  73. package/dist/{vue-ui-sparkline-B_L4UNES.js → vue-ui-sparkline-Dmrm5SL5.js} +4 -4
  74. package/dist/{vue-ui-sparkstackbar-iAaRIyqb.js → vue-ui-sparkstackbar-B0Pl7VMI.js} +4 -4
  75. package/dist/{vue-ui-stackbar-B_0PJ7R2.js → vue-ui-stackbar-CNsgBPhj.js} +525 -479
  76. package/dist/{vue-ui-strip-plot-CWkA4l9P.js → vue-ui-strip-plot-CYAWwYOM.js} +390 -343
  77. package/dist/{vue-ui-table-CILVy7YP.js → vue-ui-table-Dn6H98rP.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-DL2n2Z7p.js → vue-ui-table-heatmap-COI9LRqC.js} +5 -5
  79. package/dist/{vue-ui-table-sparkline-DOt2EKpe.js → vue-ui-table-sparkline-B7Gg5FfJ.js} +4 -4
  80. package/dist/{vue-ui-thermometer-BTP1ic_T.js → vue-ui-thermometer-Bgynq5El.js} +8 -8
  81. package/dist/{vue-ui-timer-Bc-zJH9j.js → vue-ui-timer-CXng51v5.js} +5 -5
  82. package/dist/{vue-ui-tiremarks-B9n528e1.js → vue-ui-tiremarks-Cy1U3hO1.js} +7 -7
  83. package/dist/vue-ui-treemap-BsvIvRmE.js +1092 -0
  84. package/dist/{vue-ui-vertical-bar-CK2j09gJ.js → vue-ui-vertical-bar-DHqWeDIf.js} +512 -464
  85. package/dist/{vue-ui-waffle-DJkqgqlR.js → vue-ui-waffle-D1Mscj3N.js} +416 -370
  86. package/dist/{vue-ui-wheel-CcbgpIUr.js → vue-ui-wheel-DpV-N5tF.js} +7 -7
  87. package/dist/vue-ui-word-cloud-MaNQ3Kdk.js +811 -0
  88. package/dist/{vue-ui-world-DLmB_Z96.js → vue-ui-world-DYz6zw3x.js} +512 -466
  89. package/dist/{vue-ui-xy-KmrNT6qh.js → vue-ui-xy-B1nqNbzw.js} +1559 -1508
  90. package/dist/vue-ui-xy-canvas-D4wd-Asd.js +1291 -0
  91. package/package.json +1 -1
  92. package/dist/DataTable-Y5T9UxMO.js +0 -133
  93. package/dist/Legend-DkU3at-b.js +0 -72
  94. package/dist/vue-ui-3d-bar-CBfQ3Pcb.js +0 -1323
  95. package/dist/vue-ui-chord-0wf798ls.js +0 -1049
  96. package/dist/vue-ui-circle-pack-CuRHG8gr.js +0 -709
  97. package/dist/vue-ui-flow-K7UBguES.js +0 -852
  98. package/dist/vue-ui-funnel-DoDZbsTp.js +0 -620
  99. package/dist/vue-ui-galaxy-BsDlHxzE.js +0 -691
  100. package/dist/vue-ui-heatmap-DOT2tBy_.js +0 -1078
  101. package/dist/vue-ui-molecule-DgqVh2k0.js +0 -656
  102. package/dist/vue-ui-parallel-coordinate-plot-BZf24Zur.js +0 -927
  103. package/dist/vue-ui-quadrant-S58B2LrQ.js +0 -1432
  104. package/dist/vue-ui-radar-Dh67mQ9E.js +0 -807
  105. package/dist/vue-ui-ridgeline-CsByERvm.js +0 -1157
  106. package/dist/vue-ui-rings-CR2UfgnV.js +0 -739
  107. package/dist/vue-ui-treemap-Cl9qo9O-.js +0 -1046
  108. package/dist/vue-ui-word-cloud-CZ_TRf4o.js +0 -765
  109. package/dist/vue-ui-xy-canvas-6VYNyX6a.js +0 -1243
@@ -0,0 +1,1291 @@
1
+ import { defineAsyncComponent as ee, ref as c, computed as L, useSlots as Kl, onMounted as vl, watch as P, nextTick as cl, shallowRef as Ie, onBeforeUnmount as Ql, createElementBlock as de, openBlock as S, unref as p, normalizeClass as ea, normalizeStyle as le, createCommentVNode as H, createElementVNode as Y, createBlock as D, createSlots as dl, withCtx as b, renderSlot as k, normalizeProps as V, guardReactiveProps as G, createVNode as hl, Teleport as la, toDisplayString as Me, resolveDynamicComponent as aa, mergeProps as ta, createTextVNode as yl } from "vue";
2
+ import { u as oa, c as ua, a as ra, p as Z, b as sa, C as xe, d as na, D as Oe, k as ae, i as te, e as fl, a4 as ia, G as va, ae as ca, o as da, f as ha, y as gl, v as ya, w as fa, z as ga, s as he, l as pa } from "./index-CDQbCd41.js";
3
+ import { d as ba, t as ma, u as xa, c as La, a as pl, l as C, r as Re, b as F, p as bl } from "./useResponsive-DfdjqQps.js";
4
+ import { u as ml } from "./useNestedProp-BPEHGiYX.js";
5
+ import { u as ka } from "./usePrinter-Bnl1YeUU.js";
6
+ import { u as Ca } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as wa } from "./useChartAccessibility-9icAAmYg.js";
8
+ import Sa from "./Legend-2-dC7DVb.js";
9
+ import za from "./Title-Dq2_Z9kR.js";
10
+ import { S as $a } from "./Slicer-D99HytqX.js";
11
+ import Ta from "./vue-ui-accordion-Bf_LHFFX.js";
12
+ import { u as Ia } from "./useTimeLabels-BGFjWgrv.js";
13
+ import Ma from "./img-JOqdlnUs.js";
14
+ import Oa from "./BaseIcon-DHtro8us.js";
15
+ import { _ as Ra } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
+ const Pa = ["id"], Da = ["id"], Fa = ["id"], Ea = ["onClick"], Aa = {
17
+ key: 3,
18
+ class: "vue-data-ui-watermark"
19
+ }, Na = ["innerHTML"], Ha = {
20
+ __name: "vue-ui-xy-canvas",
21
+ props: {
22
+ dataset: {
23
+ type: Array,
24
+ default() {
25
+ return [];
26
+ }
27
+ },
28
+ config: {
29
+ type: Object,
30
+ default() {
31
+ return {};
32
+ }
33
+ }
34
+ },
35
+ emits: ["selectLegend"],
36
+ setup(Pe, { expose: xl, emit: Ll }) {
37
+ const kl = ee(() => import("./DataTable-DJjA2_wf.js")), Cl = ee(() => import("./NonSvgPenAndPaper-DHeE4Yuv.js")), wl = ee(() => import("./vue-ui-skeleton-CFxBU2-p.js")), Sl = ee(() => import("./Tooltip-Y219DXZO.js")), zl = ee(() => import("./UserOptions-BuGfCdAY.js")), $l = ee(() => import("./BaseDraggableDialog-O7900pGp.js")), { vue_ui_xy_canvas: Tl } = oa(), g = Pe, B = c(ua()), I = c(null), oe = c(null), n = c(null), y = c(1), E = c(1), ye = c(!1), d = c(null), fe = c(""), De = c(null), $ = c([]), j = c(1), U = c(!0), q = c(!0), Le = c(null), Fe = c(0), Ee = c(0), ue = c(!1), Ae = c(null), Ne = c(null), He = c(null), Ye = c(null), ke = c(0), Ce = c(0), we = c(0), M = c(null), Be = c(!1), re = c(null), ge = L(() => !!g.dataset && g.dataset.length), Il = Ll, Ml = Kl();
38
+ vl(() => {
39
+ Ml["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
40
+ });
41
+ const l = L({
42
+ get: () => Xe(),
43
+ set: (e) => e
44
+ }), { userOptionsVisible: Se, setUserOptionsVisibility: Ue, keepUserOptionState: We } = Ca({ config: l.value }), { svgRef: O } = wa({ config: l.value.style.chart.title });
45
+ function Xe() {
46
+ const e = ml({
47
+ userConfig: g.config,
48
+ defaultConfig: Tl
49
+ });
50
+ let a = {};
51
+ return e.theme ? a = {
52
+ ...ml({
53
+ userConfig: sa.vue_ui_xy_canvas[e.theme] || g.config,
54
+ defaultConfig: e
55
+ }),
56
+ customPalette: ra[e.theme] || Z
57
+ } : a = e, g.config && xe(g.config, "style.chart.scale.min") ? a.style.chart.scale.min = g.config.style.chart.scale.min : a.style.chart.scale.min = null, g.config && xe(g.config, "style.chart.scale.max") ? a.style.chart.scale.max = g.config.style.chart.scale.max : a.style.chart.scale.max = null, g.config && xe(g.config, "style.chart.zoom.startIndex") ? a.style.chart.zoom.startIndex = g.config.style.chart.zoom.startIndex : a.style.chart.zoom.startIndex = null, g.config && xe(g.config, "style.chart.zoom.endIndex") ? a.style.chart.zoom.endIndex = g.config.style.chart.zoom.endIndex : a.style.chart.zoom.endIndex = null, a;
58
+ }
59
+ P(() => g.config, (e) => {
60
+ l.value = Xe(), Se.value = !l.value.userOptions.showOnChartHover, ze(), ke.value += 1, Ce.value += 1, we.value += 1, r.value.showTable = l.value.table.show, r.value.showDataLabels = l.value.style.chart.dataLabels.show, r.value.stacked = l.value.style.chart.stacked, r.value.showTooltip = l.value.style.chart.tooltip.show;
61
+ }, { deep: !0 }), P(() => g.dataset, () => {
62
+ ze(), ke.value += 1, Ce.value += 1, we.value += 1;
63
+ }, { deep: !0 });
64
+ const _e = c(l.value.style.chart.aspectRatio), { isPrinting: Ve, isImaging: Ge, generatePdf: Ze, generateImage: je } = ka({
65
+ elementId: `xy_canvas_${B.value}`,
66
+ fileName: l.value.style.chart.title.text || "vue-ui-xy-canvas",
67
+ options: l.value.userOptions.print
68
+ }), r = c({
69
+ showTable: l.value.table.show,
70
+ showDataLabels: l.value.style.chart.dataLabels.show,
71
+ stacked: l.value.style.chart.stacked,
72
+ showTooltip: l.value.style.chart.tooltip.show
73
+ });
74
+ function qe(e) {
75
+ ue.value = e, Ee.value += 1;
76
+ }
77
+ const Je = L(() => na(l.value.customPalette)), T = L(() => J.value ? Math.max(...J.value.filter((e, a) => !$.value.includes(e.absoluteIndex)).map((e) => e.series.length)) : 0), t = L(() => {
78
+ const e = y.value - y.value * (l.value.style.chart.paddingProportions.left + l.value.style.chart.paddingProportions.right);
79
+ return {
80
+ canvasWidth: y.value,
81
+ canvasHeight: E.value,
82
+ left: y.value * l.value.style.chart.paddingProportions.left,
83
+ top: E.value * l.value.style.chart.paddingProportions.top,
84
+ right: y.value - y.value * l.value.style.chart.paddingProportions.right,
85
+ bottom: E.value - E.value * l.value.style.chart.paddingProportions.bottom,
86
+ width: e,
87
+ height: E.value - E.value * (l.value.style.chart.paddingProportions.top + l.value.style.chart.paddingProportions.bottom),
88
+ slot: e / (u.value.end - u.value.start)
89
+ };
90
+ });
91
+ function Ke(e, a) {
92
+ return e / a;
93
+ }
94
+ function Ol({ hasAutoScale: e, series: a, min: o, max: s, scale: i, yOffset: x, individualHeight: v, stackIndex: f = null }) {
95
+ return a.map((X, z) => {
96
+ const N = i.min < 0 ? Math.abs(i.min) : 0, _ = Ke(X + N, N + i.max);
97
+ let ve, ce;
98
+ e && (ve = i.min, ce = Ke(X - ve, i.max - ve));
99
+ let R = 0;
100
+ return f === null ? R = t.value.bottom - t.value.height * (e ? ce : _) : R = t.value.bottom - x - v * (e ? ce : _), {
101
+ x: t.value.left + t.value.slot * z + t.value.slot / 2,
102
+ y: R,
103
+ value: X
104
+ };
105
+ });
106
+ }
107
+ const m = L(() => {
108
+ const e = l.value.style.chart.scale.min !== null ? l.value.style.chart.scale.min : Math.min(...J.value.filter((v, f) => !$.value.includes(v.absoluteIndex)).flatMap((v) => v.series.slice(u.value.start, u.value.end))), a = l.value.style.chart.scale.max !== null ? l.value.style.chart.scale.max : Math.max(...J.value.filter((v, f) => !$.value.includes(v.absoluteIndex)).flatMap((v) => v.series.slice(u.value.start, u.value.end))), o = Oe(e < 0 ? e : 0, a === e ? e + 1 < 0 ? 0 : e + 1 : a < 0 ? 0 : a, l.value.style.chart.scale.ticks), s = o.min < 0 ? Math.abs(o.min) : 0, i = t.value.bottom - t.value.height * (s / (o.max + s)), x = o.ticks.map((v) => ({
109
+ y: t.value.bottom - t.value.height * ((v + s) / (o.max + s)),
110
+ x: t.value.left - 8,
111
+ value: v
112
+ }));
113
+ return {
114
+ absoluteMin: s,
115
+ max: a,
116
+ min: e,
117
+ scale: o,
118
+ yLabels: x,
119
+ zero: i
120
+ };
121
+ }), Rl = L(() => h.value.map((e) => `
122
+ <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
123
+ <svg viewBox="0 0 10 10" height="12" width="12">
124
+ <circle cx="5" cy="5" r="5" fill="${e.color}"/>
125
+ </svg>
126
+ <span>${e.name ? e.name + ": " : ""}</span>
127
+ <span>${ae(
128
+ l.value.style.chart.dataLabels.formatter,
129
+ e.series[d.value],
130
+ te({
131
+ p: e.prefix || "",
132
+ v: e.series[d.value],
133
+ s: e.suffix || "",
134
+ r: e.rounding || 0
135
+ }),
136
+ { datapoint: e, seriesIndex: d.value }
137
+ )}</span>
138
+ </div>
139
+ `)), J = L(() => g.dataset.map((e, a) => ({
140
+ ...e,
141
+ series: ia({
142
+ data: va(e.series),
143
+ threshold: l.value.downsample.threshold
144
+ }),
145
+ absoluteIndex: a,
146
+ color: fl(e.color || Je.value[a] || Z[a] || Z[a % Z.length])
147
+ })));
148
+ P(T, (e) => {
149
+ e && Qe();
150
+ });
151
+ const h = L(() => ca(J.value.filter((e, a) => !$.value.includes(e.absoluteIndex))).map((e, a) => ({
152
+ ...e,
153
+ series: e.series.slice(u.value.start, u.value.end)
154
+ })).map((e, a) => {
155
+ let o = [null, void 0].includes(e.scaleMin) ? Math.min(...e.series) || 0 : e.scaleMin, s = [null, void 0].includes(e.scaleMax) ? Math.max(...e.series) || 1 : e.scaleMax;
156
+ o === s && (o = o >= 0 ? s - 1 : o, s = s >= 0 ? s : o + 1), e.series.filter((R) => ![null, void 0].includes(R)).map((R) => (R - o) / (s - o));
157
+ const i = {
158
+ valueMin: o,
159
+ valueMax: s
160
+ }, x = e.scaleSteps || l.value.style.chart.scale.ticks;
161
+ let v;
162
+ e.autoScaling ? v = Oe(i.valueMin, i.valueMax, x) : v = Oe(i.valueMin < 0 ? i.valueMin : 0, i.valueMax <= 0 ? 0 : i.valueMax, x);
163
+ const f = r.value.stacked ? t.value.height * (1 - e.cumulatedStackRatio) : 0, X = r.value.stacked ? t.value.height / l.value.style.chart.stackGap : 0, z = r.value.stacked ? t.value.height * e.stackRatio - X : t.value.height, N = v.min < 0 ? Math.abs(v.min) : 0;
164
+ let _;
165
+ e.autoScaling && r.value.stacked && s <= 0 ? _ = t.value.bottom - f - z : _ = t.value.bottom - f - z * (N / (v.max + N));
166
+ const ve = v.ticks.map((R, Jl) => ({
167
+ y: t.value.bottom - f - z * (Jl / (v.ticks.length - 1)),
168
+ x: t.value.left - 8,
169
+ value: R
170
+ })), ce = Ol({
171
+ hasAutoScale: r.value.stacked && e.autoScaling,
172
+ series: e.series,
173
+ min: r.value.stacked ? o : m.value.min,
174
+ max: r.value.stacked ? s : m.value.max,
175
+ scale: r.value.stacked ? v : m.value.scale,
176
+ yOffset: f,
177
+ individualHeight: z,
178
+ stackIndex: r.value.stacked ? a : null
179
+ });
180
+ return {
181
+ ...e,
182
+ coordinatesLine: ce,
183
+ min: o,
184
+ max: s,
185
+ localScale: v,
186
+ localZero: _,
187
+ localMin: N,
188
+ localYLabels: ve,
189
+ yOffset: f,
190
+ individualHeight: z
191
+ };
192
+ })), u = c({
193
+ start: 0,
194
+ end: T.value
195
+ });
196
+ function Qe() {
197
+ ll();
198
+ }
199
+ const el = c(null);
200
+ async function ll() {
201
+ await cl(), await cl();
202
+ const { startIndex: e, endIndex: a } = l.value.style.chart.zoom, o = el.value, s = T.value;
203
+ u.value = { start: 0, end: s }, (e != null || a != null) && o ? (e != null ? o.setStartValue(e) : (u.value.start = 0, o.setStartValue(0)), a != null ? o.setEndValue(Pl(a + 1)) : (u.value.end = s, o.setEndValue(s))) : (u.value = { start: 0, end: s }, Fe.value += 1);
204
+ }
205
+ function Pl(e) {
206
+ const a = T.value;
207
+ return e > a ? a : e < 0 || l.value.style.chart.zoom.startIndex !== null && e < l.value.style.chart.zoom.startIndex ? l.value.style.chart.zoom.startIndex !== null ? l.value.style.chart.zoom.startIndex + 1 : 1 : e;
208
+ }
209
+ const Dl = L(() => h.value.filter((e) => ["line", "plot", void 0].includes(e.type))), w = L(() => h.value.filter((e) => e.type === "bar"));
210
+ function Fl() {
211
+ if (!O.value)
212
+ return;
213
+ const e = oe.value.offsetWidth, a = oe.value.offsetHeight;
214
+ O.value.width = e * j.value * 2, O.value.height = a * j.value * 2, y.value = e * j.value * 2, E.value = a * j.value * 2, n.value.scale(j.value, j.value), se();
215
+ }
216
+ function El() {
217
+ if (n.value.clearRect(0, 0, 1e4, 1e4), n.value.fillStyle = l.value.style.chart.backgroundColor, n.value.fillRect(0, 0, t.value.canvasWidth, t.value.canvasHeight), r.value.stacked)
218
+ l.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start < l.value.style.chart.grid.y.verticalLines.hideUnderXLength ? h.value.forEach((e) => {
219
+ for (let a = 0; a < u.value.end - u.value.start + 1; a += 1)
220
+ C(
221
+ n.value,
222
+ [
223
+ {
224
+ x: t.value.left + t.value.slot * a,
225
+ y: t.value.bottom - e.yOffset - e.individualHeight
226
+ },
227
+ {
228
+ x: t.value.left + t.value.slot * a,
229
+ y: t.value.bottom - e.yOffset
230
+ }
231
+ ],
232
+ {
233
+ color: l.value.style.chart.grid.y.verticalLines.color
234
+ }
235
+ );
236
+ }) : l.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start >= l.value.style.chart.grid.y.verticalLines.hideUnderXLength && h.value.forEach((e) => {
237
+ for (let a = u.value.start; a < u.value.end; a += 1)
238
+ a % Math.floor((u.value.end - u.value.start) / l.value.style.chart.grid.y.timeLabels.modulo) === 0 && C(
239
+ n.value,
240
+ [
241
+ {
242
+ x: t.value.left + t.value.slot * (a - u.value.start) + t.value.slot / 2,
243
+ y: t.value.bottom - e.yOffset - e.individualHeight
244
+ },
245
+ {
246
+ x: t.value.left + t.value.slot * (a - u.value.start) + t.value.slot / 2,
247
+ y: t.value.bottom - e.yOffset
248
+ }
249
+ ],
250
+ {
251
+ color: l.value.style.chart.grid.y.verticalLines.color
252
+ }
253
+ );
254
+ }), l.value.style.chart.grid.x.horizontalLines.show && (l.value.style.chart.grid.x.horizontalLines.alternate ? h.value.forEach((e) => {
255
+ e.localYLabels.forEach((a, o) => {
256
+ o < e.localYLabels.length - 1 && Re(
257
+ n.value,
258
+ [
259
+ { x: t.value.left, y: a.y },
260
+ { x: t.value.right, y: a.y },
261
+ { x: t.value.right, y: e.localYLabels[o + 1].y },
262
+ { x: t.value.left, y: e.localYLabels[o + 1].y }
263
+ ],
264
+ {
265
+ fillColor: o % 2 === 0 ? "transparent" : he(l.value.style.chart.grid.x.horizontalLines.color, l.value.style.chart.grid.x.horizontalLines.opacity),
266
+ strokeColor: "transparent"
267
+ }
268
+ );
269
+ });
270
+ }) : h.value.forEach((e) => {
271
+ e.localYLabels.slice(u.value.start, u.value.end).forEach((a) => {
272
+ C(
273
+ n.value,
274
+ [
275
+ { x: t.value.left, y: a.y },
276
+ { x: t.value.right, y: a.y }
277
+ ],
278
+ {
279
+ color: l.value.style.chart.grid.x.horizontalLines.color
280
+ }
281
+ );
282
+ });
283
+ })), l.value.style.chart.grid.zeroLine.show && h.value.forEach((e) => {
284
+ C(
285
+ n.value,
286
+ [
287
+ { x: t.value.left, y: e.localZero },
288
+ { x: t.value.right, y: e.localZero }
289
+ ],
290
+ {
291
+ color: l.value.style.chart.grid.zeroLine.color,
292
+ lineDash: l.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
293
+ }
294
+ );
295
+ }), l.value.style.chart.grid.y.axisLabels.show && h.value.forEach((e) => {
296
+ C(
297
+ n.value,
298
+ [
299
+ { x: t.value.left, y: t.value.bottom - e.yOffset },
300
+ { x: t.value.left, y: t.value.bottom - e.yOffset - e.individualHeight }
301
+ ],
302
+ {
303
+ color: e.color
304
+ }
305
+ ), C(
306
+ n.value,
307
+ [
308
+ { x: t.value.right, y: t.value.bottom - e.yOffset },
309
+ { x: t.value.right, y: t.value.bottom - e.yOffset - e.individualHeight }
310
+ ],
311
+ {
312
+ color: e.color
313
+ }
314
+ );
315
+ }), h.value.forEach((e) => {
316
+ F(
317
+ n.value,
318
+ e.name,
319
+ y.value / 35,
320
+ t.value.bottom - e.yOffset - e.individualHeight / 2,
321
+ {
322
+ align: "center",
323
+ rotation: -90,
324
+ color: e.color,
325
+ font: `${Math.round(y.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`
326
+ }
327
+ );
328
+ });
329
+ else {
330
+ if (l.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start < l.value.style.chart.grid.y.verticalLines.hideUnderXLength)
331
+ for (let e = 0; e < u.value.end - u.value.start + 1; e += 1)
332
+ C(
333
+ n.value,
334
+ [
335
+ { x: t.value.left + t.value.slot * e, y: t.value.top },
336
+ { x: t.value.left + t.value.slot * e, y: t.value.bottom }
337
+ ],
338
+ {
339
+ color: l.value.style.chart.grid.y.verticalLines.color
340
+ }
341
+ );
342
+ else if (l.value.style.chart.grid.y.verticalLines.show && u.value.end - u.value.start >= l.value.style.chart.grid.y.verticalLines.hideUnderXLength)
343
+ for (let e = u.value.start; e < u.value.end; e += 1)
344
+ e % Math.floor((u.value.end - u.value.start) / l.value.style.chart.grid.y.timeLabels.modulo) === 0 && C(
345
+ n.value,
346
+ [
347
+ { x: t.value.left + t.value.slot * (e - u.value.start) + t.value.slot / 2, y: t.value.top },
348
+ { x: t.value.left + t.value.slot * (e - u.value.start) + t.value.slot / 2, y: t.value.bottom }
349
+ ],
350
+ {
351
+ color: l.value.style.chart.grid.y.verticalLines.color
352
+ }
353
+ );
354
+ l.value.style.chart.grid.x.horizontalLines.show && (l.value.style.chart.grid.x.horizontalLines.alternate ? m.value.yLabels.forEach((e, a) => {
355
+ a < m.value.yLabels.length - 1 && Re(
356
+ n.value,
357
+ [
358
+ { x: t.value.left, y: e.y },
359
+ { x: t.value.right, y: e.y },
360
+ { x: t.value.right, y: m.value.yLabels[a + 1].y },
361
+ { x: t.value.left, y: m.value.yLabels[a + 1].y }
362
+ ],
363
+ {
364
+ fillColor: a % 2 === 0 ? "transparent" : he(l.value.style.chart.grid.x.horizontalLines.color, l.value.style.chart.grid.x.horizontalLines.opacity),
365
+ strokeColor: "transparent"
366
+ }
367
+ );
368
+ }) : m.value.yLabels.forEach((e) => {
369
+ C(
370
+ n.value,
371
+ [
372
+ { x: t.value.left, y: e.y },
373
+ { x: t.value.right, y: e.y }
374
+ ],
375
+ {
376
+ color: l.value.style.chart.grid.x.horizontalLines.color
377
+ }
378
+ );
379
+ })), l.value.style.chart.grid.y.showAxis && C(
380
+ n.value,
381
+ [
382
+ { x: t.value.left, y: t.value.top },
383
+ { x: t.value.left, y: t.value.bottom }
384
+ ],
385
+ {
386
+ color: l.value.style.chart.grid.y.axisColor,
387
+ lineWidth: l.value.style.chart.grid.y.axisThickness
388
+ }
389
+ ), l.value.style.chart.grid.x.showAxis && C(
390
+ n.value,
391
+ [
392
+ { x: t.value.left, y: t.value.bottom },
393
+ { x: t.value.right, y: t.value.bottom }
394
+ ],
395
+ {
396
+ color: l.value.style.chart.grid.x.axisColor,
397
+ lineWidth: l.value.style.chart.grid.x.axisThickness
398
+ }
399
+ ), l.value.style.chart.grid.zeroLine.show && C(
400
+ n.value,
401
+ [
402
+ { x: t.value.left, y: m.value.zero },
403
+ { x: t.value.right, y: m.value.zero }
404
+ ],
405
+ {
406
+ color: l.value.style.chart.grid.zeroLine.color,
407
+ lineDash: l.value.style.chart.grid.zeroLine.dashed ? [10, 10] : [0, 0]
408
+ }
409
+ );
410
+ }
411
+ l.value.style.chart.grid.y.axisName && F(
412
+ n.value,
413
+ l.value.style.chart.grid.y.axisName,
414
+ y.value - y.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio * 1.2,
415
+ t.value.bottom - t.value.height / 2,
416
+ {
417
+ font: `${l.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
418
+ color: l.value.style.chart.color,
419
+ align: "center",
420
+ rotation: 90
421
+ }
422
+ ), l.value.style.chart.grid.x.axisName && F(
423
+ n.value,
424
+ l.value.style.chart.grid.x.axisName,
425
+ y.value / 2,
426
+ E.value,
427
+ {
428
+ font: `${l.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
429
+ color: l.value.style.chart.color,
430
+ align: "center"
431
+ }
432
+ );
433
+ }
434
+ function Al(e) {
435
+ for (let a = 0; a < e.coordinatesLine.length; a += 1) {
436
+ const o = (d.value === a ? y.value / 150 : l.value.style.chart.line.plots.show ? y.value / 200 : 0) * l.value.style.chart.line.plots.radiusRatio;
437
+ pl(
438
+ n.value,
439
+ { x: e.coordinatesLine[a].x, y: e.coordinatesLine[a].y },
440
+ o,
441
+ {
442
+ color: l.value.style.chart.backgroundColor,
443
+ fillStyle: e.color
444
+ }
445
+ );
446
+ }
447
+ }
448
+ function Nl() {
449
+ h.value.forEach((e) => {
450
+ e.showYMarker && ne(e) && F(
451
+ n.value,
452
+ ae(
453
+ l.value.style.chart.dataLabels.formatter,
454
+ ne(e).value,
455
+ te({
456
+ p: e.prefix || l.value.style.chart.grid.y.axisLabels.prefix || "",
457
+ v: ne(e).value,
458
+ s: e.suffix || l.value.style.chart.grid.y.axisLabels.suffix || "",
459
+ r: e.rounding || l.value.style.chart.grid.y.axisLabels.rounding || 0
460
+ }),
461
+ { datapoint: ne(e), seriesIndex: null }
462
+ ),
463
+ t.value.left - 8 + l.value.style.chart.grid.y.axisLabels.offsetX,
464
+ ne(e).y,
465
+ {
466
+ align: "right",
467
+ font: `${l.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
468
+ color: e.color
469
+ }
470
+ );
471
+ });
472
+ }
473
+ function Hl() {
474
+ l.value.style.chart.grid.y.axisLabels.show && (r.value.stacked ? h.value.forEach((e) => {
475
+ e.localYLabels.forEach((a, o) => {
476
+ F(
477
+ n.value,
478
+ ae(
479
+ l.value.style.chart.dataLabels.formatter,
480
+ a.value,
481
+ te({
482
+ p: e.prefix || l.value.style.chart.grid.y.axisLabels.prefix || "",
483
+ v: a.value,
484
+ s: e.suffix || l.value.style.chart.grid.y.axisLabels.suffix || "",
485
+ r: e.rounding || l.value.style.chart.grid.y.axisLabels.rounding || 0
486
+ }),
487
+ { datapoint: a, seriesIndex: o }
488
+ ),
489
+ a.x + l.value.style.chart.grid.y.axisLabels.offsetX,
490
+ a.y,
491
+ {
492
+ align: "right",
493
+ font: `${l.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
494
+ color: e.color,
495
+ globalAlpha: e.showYMarker && ![null, void 0].includes(d.value) ? 0.2 : 1
496
+ }
497
+ );
498
+ });
499
+ }) : m.value.yLabels.forEach((e, a) => {
500
+ F(
501
+ n.value,
502
+ ae(
503
+ l.value.style.chart.dataLabels.formatter,
504
+ e.value,
505
+ te({
506
+ p: l.value.style.chart.grid.y.axisLabels.prefix || "",
507
+ v: e.value,
508
+ s: l.value.style.chart.grid.y.axisLabels.suffix || "",
509
+ r: l.value.style.chart.grid.y.axisLabels.rounding || 0
510
+ }),
511
+ { datapoint: e, seriesIndex: a }
512
+ ),
513
+ e.x + l.value.style.chart.grid.y.axisLabels.offsetX,
514
+ e.y,
515
+ {
516
+ align: "right",
517
+ font: `${l.value.style.chart.grid.y.axisLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
518
+ color: l.value.style.chart.grid.y.axisLabels.color,
519
+ globalAlpha: h.value.some((o) => o.showYMarker) && ![null, void 0].includes(d.value) ? 0.2 : 1
520
+ }
521
+ );
522
+ }));
523
+ }
524
+ function Yl(e) {
525
+ for (let a = 0; a < e.coordinatesLine.length; a += 1)
526
+ F(
527
+ n.value,
528
+ ae(
529
+ l.value.style.chart.dataLabels.formatter,
530
+ e.coordinatesLine[a].value,
531
+ te({
532
+ p: e.prefix || "",
533
+ v: e.coordinatesLine[a].value,
534
+ s: e.suffix || "",
535
+ r: e.rounding || 0
536
+ }),
537
+ { datapoint: e.coordinatesLine[a], seriesIndex: a }
538
+ ),
539
+ e.coordinatesLine[a].x,
540
+ e.coordinatesLine[a].y + l.value.style.chart.dataLabels.offsetY,
541
+ {
542
+ align: "center",
543
+ font: `${l.value.style.chart.dataLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * l.value.style.chart.dataLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
544
+ color: l.value.style.chart.dataLabels.useSerieColor ? e.color : l.value.style.chart.dataLabels.color
545
+ }
546
+ );
547
+ }
548
+ const W = L(() => Ia({
549
+ values: l.value.style.chart.grid.y.timeLabels.values,
550
+ maxDatapoints: T.value,
551
+ formatter: l.value.style.chart.grid.y.timeLabels.datetimeFormatter,
552
+ start: 0,
553
+ end: l.value.style.chart.grid.y.timeLabels.values.length
554
+ }));
555
+ function Bl() {
556
+ for (let e = u.value.start; e < u.value.end; e += 1)
557
+ (u.value.end - u.value.start < l.value.style.chart.grid.y.timeLabels.modulo || u.value.end - u.value.start >= l.value.style.chart.grid.y.timeLabels.modulo && (e % Math.floor((u.value.end - u.value.start) / l.value.style.chart.grid.y.timeLabels.modulo) === 0 || e === d.value + u.value.start && l.value.style.chart.grid.y.timeLabels.showMarker)) && F(
558
+ n.value,
559
+ W.value[e] ? W.value[e].text : e + 1,
560
+ t.value.left + t.value.slot * (e - u.value.start) + t.value.slot / 2,
561
+ t.value.bottom + y.value / l.value.style.chart.grid.y.timeLabels.offsetY,
562
+ {
563
+ align: l.value.style.chart.grid.y.timeLabels.rotation === 0 ? "center" : l.value.style.chart.grid.y.timeLabels.rotation > 0 ? "left" : "right",
564
+ font: `${l.value.style.chart.grid.y.timeLabels.bold ? "bold " : ""}${Math.round(y.value / 40 * l.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
565
+ color: l.value.style.chart.grid.y.timeLabels.showMarker ? he(l.value.style.chart.grid.y.timeLabels.color, d.value !== null ? d.value + u.value.start === e ? 100 : 20 : 100) : l.value.style.chart.grid.y.timeLabels.color,
566
+ rotation: l.value.style.chart.grid.y.timeLabels.rotation
567
+ }
568
+ );
569
+ }
570
+ function al() {
571
+ C(
572
+ n.value,
573
+ [
574
+ { x: t.value.left + t.value.slot * d.value + t.value.slot / 2, y: t.value.top },
575
+ { x: t.value.left + t.value.slot * d.value + t.value.slot / 2, y: t.value.bottom }
576
+ ],
577
+ {
578
+ color: l.value.style.chart.selector.color,
579
+ lineDash: l.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
580
+ lineWidth: 2
581
+ }
582
+ );
583
+ }
584
+ function Ul() {
585
+ M.value && C(
586
+ n.value,
587
+ [
588
+ { x: t.value.left, y: M.value },
589
+ { x: t.value.right, y: M.value }
590
+ ],
591
+ {
592
+ color: l.value.style.chart.selector.color,
593
+ lineDash: l.value.style.chart.selector.dashed ? [8, 8] : [0, 0],
594
+ lineWidth: 2
595
+ }
596
+ );
597
+ }
598
+ function Wl() {
599
+ w.value.forEach((e, a) => {
600
+ for (let o = 0; o < e.coordinatesLine.length; o += 1)
601
+ Re(
602
+ n.value,
603
+ [
604
+ {
605
+ x: t.value.left + t.value.slot * o + t.value.slot / 10 + (r.value.stacked ? 0 : t.value.slot / w.value.length * a - (a === 0 ? 0 : t.value.slot / (5 * w.value.length) * a)),
606
+ y: r.value.stacked ? e.localZero : m.value.zero
607
+ },
608
+ {
609
+ x: t.value.left + t.value.slot * o + t.value.slot / 10 + (r.value.stacked ? 0 : t.value.slot / w.value.length * a - (a === 0 ? 0 : t.value.slot / (5 * w.value.length) * a)) + t.value.slot * 0.8 / (r.value.stacked ? 1 : w.value.length),
610
+ y: r.value.stacked ? e.localZero : m.value.zero
611
+ },
612
+ {
613
+ x: t.value.left + t.value.slot * o + t.value.slot / 10 + (r.value.stacked ? 0 : t.value.slot / w.value.length * a - (a === 0 ? 0 : t.value.slot / (5 * w.value.length) * a)) + t.value.slot * 0.8 / (r.value.stacked ? 1 : w.value.length),
614
+ y: e.coordinatesLine[o].y
615
+ },
616
+ {
617
+ x: t.value.left + t.value.slot * o + t.value.slot / 10 + (r.value.stacked ? 0 : t.value.slot / w.value.length * a - (a === 0 ? 0 : t.value.slot / (5 * w.value.length) * a)),
618
+ y: e.coordinatesLine[o].y
619
+ }
620
+ ],
621
+ {
622
+ strokeColor: l.value.style.chart.backgroundColor,
623
+ gradient: {
624
+ type: "linear",
625
+ start: {
626
+ x: e.coordinatesLine[o].x,
627
+ y: e.coordinatesLine[o].y
628
+ },
629
+ end: {
630
+ x: e.coordinatesLine[o].x,
631
+ y: r.value.stacked ? e.localZero : m.value.zero
632
+ },
633
+ stops: [
634
+ { offset: 0, color: e.color },
635
+ { offset: 1, color: l.value.style.chart.bar.gradient.show ? pa(e.color, 0.5) : e.color }
636
+ ]
637
+ }
638
+ }
639
+ ), r.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && F(
640
+ n.value,
641
+ ae(
642
+ l.value.style.chart.dataLabels.formatter,
643
+ e.coordinatesLine[o].value,
644
+ te({
645
+ p: e.prefix || "",
646
+ v: e.coordinatesLine[o].value,
647
+ s: e.suffix || "",
648
+ r: e.rounding || 0
649
+ }),
650
+ { datapoint: e.coordinatesLine[o], seriesIndex: o }
651
+ ),
652
+ t.value.left + t.value.slot * o + t.value.slot / 10 + (r.value.stacked ? 0 : t.value.slot / w.value.length * a - (a === 0 ? 0 : t.value.slot / (5 * w.value.length) * a)) + t.value.slot * 0.4 / (r.value.stacked ? 1 : w.value.length),
653
+ (e.coordinatesLine[o].value < 0 ? r.value.stacked ? e.localZero : m.value.zero : e.coordinatesLine[o].y) + l.value.style.chart.dataLabels.offsetY,
654
+ {
655
+ align: "center",
656
+ font: `${Math.round(y.value / 40 * l.value.style.chart.dataLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,
657
+ color: l.value.style.chart.dataLabels.useSerieColor ? e.color : l.value.style.chart.dataLabels.color,
658
+ strokeColor: l.value.style.chart.backgroundColor,
659
+ lineWidth: 0.8
660
+ }
661
+ );
662
+ });
663
+ }
664
+ function Xl(e) {
665
+ e.useArea ? r.value.stacked ? bl(
666
+ n.value,
667
+ [{ x: e.coordinatesLine[0].x, y: e.localZero }, ...e.coordinatesLine, { x: e.coordinatesLine.at(-1).x, y: e.localZero }],
668
+ {
669
+ fillColor: he(e.color, l.value.style.chart.area.opacity),
670
+ strokeColor: "transparent"
671
+ }
672
+ ) : bl(
673
+ n.value,
674
+ [{ x: e.coordinatesLine[0].x, y: m.value.zero }, ...e.coordinatesLine, { x: e.coordinatesLine.at(-1).x, y: m.value.zero }],
675
+ {
676
+ fillColor: he(e.color, l.value.style.chart.area.opacity),
677
+ strokeColor: "transparent"
678
+ }
679
+ ) : C(n.value, e.coordinatesLine, {
680
+ color: e.color,
681
+ lineWidth: 3
682
+ });
683
+ }
684
+ function _l() {
685
+ h.value.forEach((e, a) => {
686
+ C(
687
+ n.value,
688
+ [
689
+ { x: t.value.left, y: t.value.bottom - e.yOffset },
690
+ { x: t.value.right, y: t.value.bottom - e.yOffset }
691
+ ],
692
+ {
693
+ color: l.value.style.chart.grid.x.horizontalLines.color,
694
+ lineWidth: 1
695
+ }
696
+ );
697
+ });
698
+ }
699
+ function se() {
700
+ El(), U.value ? (d.value !== null && l.value.style.chart.selector.show && al(), Wl(), r.value.stacked && l.value.style.chart.grid.x.showAxis && _l(), Dl.value.forEach((e) => {
701
+ (e.type === "line" || !e.type) && Xl(e), q.value && (Al(e), r.value.showDataLabels && [!0, void 0].includes(e.dataLabels) && Yl(e));
702
+ }), Le.value = La(O.value)) : (Le.value && (n.value.clearRect(0, 0, 1e4, 1e4), n.value.drawImage(Le.value, 0, 0)), d.value !== null && l.value.style.chart.selector.show && al(), d.value !== null && h.value.forEach((e) => {
703
+ if (e.type === "line" || !e.type || e.type === "plot") {
704
+ if (!e.coordinatesLine[d.value]) return;
705
+ e.coordinatesLine[d.value].x !== void 0 && e.coordinatesLine[d.value].y !== void 0 && pl(
706
+ n.value,
707
+ {
708
+ x: e.coordinatesLine[d.value].x,
709
+ y: e.coordinatesLine[d.value].y
710
+ },
711
+ y.value / 150 * l.value.style.chart.line.plots.radiusRatio,
712
+ {
713
+ color: l.value.style.chart.backgroundColor,
714
+ fillStyle: e.color
715
+ }
716
+ );
717
+ }
718
+ })), l.value.style.chart.grid.y.timeLabels.show && Bl(), l.value.style.chart.selector.show && l.value.style.chart.selector.showHorizontalSelector && Ul(), Hl(), Nl(), U.value = !1;
719
+ }
720
+ const pe = ba(() => {
721
+ q.value = !0, Fl();
722
+ }, T.value > 200 ? 10 : 1, !q.value);
723
+ function ne(e) {
724
+ if ([null, void 0].includes(d.value) || !e.coordinatesLine[d.value]) return !1;
725
+ const { y: a, value: o } = e.coordinatesLine[d.value];
726
+ return { y: a, value: o };
727
+ }
728
+ function Vl(e) {
729
+ const { left: a, top: o } = O.value.getBoundingClientRect(), s = e.clientX - a;
730
+ if (M.value = (e.clientY - o) * 2, (M.value < t.value.top || M.value > t.value.bottom) && (M.value = null), s * 2 < t.value.left || s * 2 > t.value.right) {
731
+ ye.value = !1, d.value = null;
732
+ return;
733
+ }
734
+ const i = s * 2 - t.value.left;
735
+ if (d.value = Math.floor(i / t.value.slot), ye.value = !0, !q.value) return;
736
+ let x = "";
737
+ const v = l.value.style.chart.tooltip.customFormat;
738
+ gl(v) && ga(() => v({
739
+ seriesIndex: d.value,
740
+ datapoint: h.value.map((f) => ({
741
+ shape: f.shape || null,
742
+ name: f.name,
743
+ color: f.color,
744
+ type: f.type || "line",
745
+ value: f.series.find((X, z) => z === d.value)
746
+ })),
747
+ series: h.value,
748
+ config: l.value
749
+ })) ? fe.value = v({
750
+ seriesIndex: d.value,
751
+ datapoint: h.value.map((f) => ({
752
+ shape: f.shape || null,
753
+ name: f.name,
754
+ color: f.color,
755
+ type: f.type || "line",
756
+ value: f.series.find((X, z) => z === d.value)
757
+ })),
758
+ series: h.value,
759
+ config: l.value
760
+ }) : (l.value.style.chart.grid.y.timeLabels.values.slice(u.value.start, u.value.end)[d.value] && (x += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${l.value.style.chart.tooltip.borderColor}; width:100%">${W.value.slice(u.value.start, u.value.end)[d.value].text}</div>`), x += Rl.value.join(""), fe.value = x), q.value = !1;
761
+ }
762
+ P(() => d.value, (e) => {
763
+ pe();
764
+ }), P(() => u.value, (e) => {
765
+ U.value = !0, se();
766
+ }, {
767
+ deep: !0
768
+ }), P(() => r.value.showDataLabels, (e) => {
769
+ U.value = !0, se();
770
+ }), P(() => M.value, (e) => {
771
+ e && se();
772
+ }), P(() => r.value.stacked, (e) => {
773
+ U.value = !0, q.value = !0, pe();
774
+ });
775
+ function Gl() {
776
+ ye.value = !1, d.value = null, fe.value = "", M.value = null, se();
777
+ }
778
+ const A = Ie(null), K = Ie(null), Q = Ie(null);
779
+ vl(() => {
780
+ Be.value = !0, ze();
781
+ });
782
+ function ze() {
783
+ if (da(g.dataset) ? ha({
784
+ componentName: "VueUiXyCanvas",
785
+ type: "dataset"
786
+ }) : O.value && (n.value = O.value.getContext("2d", { willReadFrequently: !0 })), l.value.responsive) {
787
+ const e = ma(() => {
788
+ const { width: a, height: o } = xa({
789
+ chart: I.value,
790
+ title: l.value.style.chart.title.text ? Ae.value : null,
791
+ legend: l.value.style.chart.legend.show ? Ne.value : null,
792
+ slicer: l.value.style.chart.zoom.show && T.value > 1 ? He.value : null,
793
+ source: Ye.value
794
+ });
795
+ requestAnimationFrame(() => {
796
+ _e.value = `${a} / ${o}`;
797
+ });
798
+ });
799
+ A.value && (K.value && A.value.unobserve(K.value), A.value.disconnect()), A.value = new ResizeObserver(e), K.value = I.value.parentNode, A.value.observe(K.value);
800
+ }
801
+ Q.value && Q.value.disconnect(), Q.value = new ResizeObserver((e) => {
802
+ for (const a of e)
803
+ a.contentBoxSize && oe.value && (U.value = !0, pe());
804
+ }), Q.value.observe(oe.value), ll();
805
+ }
806
+ Ql(() => {
807
+ Q.value && Q.value.disconnect(), A.value && (K.value && A.value.unobserve(K.value), A.value.disconnect());
808
+ });
809
+ function tl(e) {
810
+ Il("selectLegend", h.value.find((a) => a.absoluteIndex === e)), $.value.includes(e) ? $.value = $.value.filter((a) => a !== e) : $.value.push(e), U.value = !0, pe();
811
+ }
812
+ const ol = L(() => J.value.map((e, a) => ({
813
+ ...e,
814
+ name: e.name,
815
+ color: fl(e.color) || Je.value[a] || Z[a] || Z[a % Z.length],
816
+ shape: e.shape || "circle",
817
+ prefix: e.prefix || "",
818
+ suffix: e.suffix || "",
819
+ rounding: e.rounding || 0
820
+ })).map((e) => ({
821
+ ...e,
822
+ opacity: $.value.includes(e.absoluteIndex) ? 0.5 : 1,
823
+ segregate: () => tl(e.absoluteIndex),
824
+ isSegregated: $.value.includes(e.absoluteIndex)
825
+ }))), Zl = L(() => ({
826
+ cy: "donut-div-legend",
827
+ backgroundColor: l.value.style.chart.legend.backgroundColor,
828
+ color: l.value.style.chart.legend.color,
829
+ fontSize: l.value.style.chart.legend.fontSize,
830
+ paddingBottom: 12,
831
+ fontWeight: l.value.style.chart.legend.bold ? "bold" : ""
832
+ })), be = L(() => {
833
+ const e = [""].concat(h.value.map((i) => i.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');
834
+ let a = [];
835
+ for (let i = 0; i < T.value; i += 1) {
836
+ const x = h.value.map((v) => v.series[i] ?? 0).reduce((v, f) => v + f, 0);
837
+ a.push([l.value.style.chart.grid.y.timeLabels.values.slice(u.value.start, u.value.end)[i] ? W.value.slice(u.value.start, u.value.end)[i].text : i + 1].concat(h.value.map((v) => (v.series[i] ?? 0).toFixed(l.value.table.rounding))).concat((x ?? 0).toFixed(l.value.table.rounding)));
838
+ }
839
+ const o = {
840
+ th: {
841
+ backgroundColor: l.value.table.th.backgroundColor,
842
+ color: l.value.table.th.color,
843
+ outline: l.value.table.th.outline
844
+ },
845
+ td: {
846
+ backgroundColor: l.value.table.td.backgroundColor,
847
+ color: l.value.table.td.color,
848
+ outline: l.value.table.td.outline
849
+ },
850
+ breakpoint: l.value.table.responsiveBreakpoint
851
+ }, s = [l.value.table.columnNames.period].concat(h.value.map((i) => i.name)).concat(l.value.table.columnNames.total);
852
+ return { head: e, body: a.slice(0, u.value.end - u.value.start), config: o, colNames: s };
853
+ }), ul = L(() => {
854
+ if (h.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
855
+ const e = h.value.map((o) => ({
856
+ label: o.name,
857
+ color: o.color,
858
+ type: o.type
859
+ })), a = [];
860
+ for (let o = u.value.start; o < u.value.end; o += 1) {
861
+ const s = [l.value.style.chart.grid.y.timeLabels.values[o] ? W.value[o].text : o + 1];
862
+ h.value.forEach((i) => {
863
+ s.push(Number((i.series[o] || 0).toFixed(l.value.table.rounding)));
864
+ }), a.push(s);
865
+ }
866
+ return { head: e, body: a };
867
+ });
868
+ function $e(e = null) {
869
+ const a = [[l.value.style.chart.title.text], [l.value.style.chart.title.subtitle.text], [""]], o = ["", ...ul.value.head.map((v) => v.label)], s = ul.value.body, i = a.concat([o]).concat(s), x = ya(i);
870
+ e ? e(x) : fa({ csvContent: x, title: l.value.style.chart.title.text || "vue-ui-xy-canvas" });
871
+ }
872
+ function jl() {
873
+ return h.value;
874
+ }
875
+ function rl() {
876
+ r.value.showTable = !r.value.showTable;
877
+ }
878
+ function sl() {
879
+ r.value.showDataLabels = !r.value.showDataLabels;
880
+ }
881
+ function nl() {
882
+ r.value.stacked = !r.value.stacked;
883
+ }
884
+ function il() {
885
+ r.value.showTooltip = !r.value.showTooltip;
886
+ }
887
+ const me = c(!1);
888
+ function Te() {
889
+ me.value = !me.value;
890
+ }
891
+ async function ql({ scale: e = 2 } = {}) {
892
+ if (!I.value) return;
893
+ const { width: a, height: o } = I.value.getBoundingClientRect(), s = a / o, { imageUri: i, base64: x } = await Ma({ domElement: I.value, base64: !0, img: !0, scale: e });
894
+ return {
895
+ imageUri: i,
896
+ base64: x,
897
+ title: l.value.style.chart.title.text,
898
+ width: a,
899
+ height: o,
900
+ aspectRatio: s
901
+ };
902
+ }
903
+ const ie = L(() => {
904
+ const e = l.value.table.useDialog && !l.value.table.show, a = r.value.showTable;
905
+ return {
906
+ component: e ? $l : Ta,
907
+ title: `${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text ? `: ${l.value.style.chart.title.subtitle.text}` : ""}`,
908
+ props: e ? {
909
+ backgroundColor: l.value.table.th.backgroundColor,
910
+ color: l.value.table.th.color,
911
+ headerColor: l.value.table.th.color,
912
+ headerBg: l.value.table.th.backgroundColor,
913
+ isFullscreen: ue.value,
914
+ fullscreenParent: I.value,
915
+ forcedWidth: Math.min(800, window.innerWidth * 0.8)
916
+ } : {
917
+ hideDetails: !0,
918
+ config: {
919
+ open: a,
920
+ maxHeight: 1e4,
921
+ body: {
922
+ backgroundColor: l.value.style.chart.backgroundColor,
923
+ color: l.value.style.chart.color
924
+ },
925
+ head: {
926
+ backgroundColor: l.value.style.chart.backgroundColor,
927
+ color: l.value.style.chart.color
928
+ }
929
+ }
930
+ }
931
+ };
932
+ });
933
+ return P(() => r.value.showTable, (e) => {
934
+ l.value.table.show || (e && l.value.table.useDialog && re.value ? re.value.open() : "close" in re.value && re.value.close());
935
+ }), xl({
936
+ getData: jl,
937
+ getImage: ql,
938
+ generateCsv: $e,
939
+ generatePdf: Ze,
940
+ generateImage: je,
941
+ toggleTable: rl,
942
+ toggleLabels: sl,
943
+ toggleStack: nl,
944
+ toggleTooltip: il,
945
+ toggleAnnotator: Te,
946
+ toggleFullscreen: qe
947
+ }), (e, a) => (S(), de("div", {
948
+ style: le(`width:100%; position:relative; ${l.value.responsive ? "height: 100%" : ""}`),
949
+ ref_key: "xy",
950
+ ref: I,
951
+ id: `xy_canvas_${B.value}`,
952
+ class: ea(`vue-ui-donut ${ue.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
953
+ onMouseenter: a[7] || (a[7] = () => p(Ue)(!0)),
954
+ onMouseleave: a[8] || (a[8] = () => p(Ue)(!1))
955
+ }, [
956
+ l.value.style.chart.title.text ? (S(), de("div", {
957
+ key: 0,
958
+ ref_key: "chartTitle",
959
+ ref: Ae,
960
+ style: le(`width:100%;background:${l.value.style.chart.backgroundColor};`)
961
+ }, [
962
+ (S(), D(za, {
963
+ key: `title_${ke.value}`,
964
+ config: {
965
+ title: {
966
+ cy: "xy-canvas-title",
967
+ ...l.value.style.chart.title
968
+ },
969
+ subtitle: {
970
+ cy: "xy-canvas-subtitle",
971
+ ...l.value.style.chart.title.subtitle
972
+ }
973
+ }
974
+ }, null, 8, ["config"]))
975
+ ], 4)) : H("", !0),
976
+ Y("div", {
977
+ id: `legend-top-${B.value}`
978
+ }, null, 8, Da),
979
+ l.value.userOptions.show && ge.value && (p(We) || p(Se)) ? (S(), D(p(zl), {
980
+ ref: "details",
981
+ key: `user_option_${Ee.value}`,
982
+ backgroundColor: l.value.style.chart.backgroundColor,
983
+ color: l.value.style.chart.color,
984
+ isPrinting: p(Ve),
985
+ isImaging: p(Ge),
986
+ uid: B.value,
987
+ hasTooltip: l.value.userOptions.buttons.tooltip && l.value.style.chart.tooltip.show,
988
+ hasPdf: l.value.userOptions.buttons.pdf,
989
+ hasImg: l.value.userOptions.buttons.img,
990
+ hasXls: l.value.userOptions.buttons.csv,
991
+ hasLabel: l.value.userOptions.buttons.labels,
992
+ hasStack: Pe.dataset.length > 1 && l.value.userOptions.buttons.stack,
993
+ hasFullscreen: l.value.userOptions.buttons.fullscreen,
994
+ hasTable: u.value.end - u.value.start <= 730 && l.value.userOptions.buttons.table,
995
+ isFullscreen: ue.value,
996
+ isTooltip: r.value.showTooltip,
997
+ isStacked: r.value.stacked,
998
+ titles: { ...l.value.userOptions.buttonTitles },
999
+ chartElement: I.value,
1000
+ position: l.value.userOptions.position,
1001
+ hasAnnotator: l.value.userOptions.buttons.annotator,
1002
+ isAnnotation: me.value,
1003
+ callbacks: l.value.userOptions.callbacks,
1004
+ printScale: l.value.userOptions.print.scale,
1005
+ onToggleFullscreen: qe,
1006
+ onGeneratePdf: p(Ze),
1007
+ onGenerateCsv: $e,
1008
+ onGenerateImage: p(je),
1009
+ onToggleTable: rl,
1010
+ onToggleLabels: sl,
1011
+ onToggleStack: nl,
1012
+ onToggleTooltip: il,
1013
+ onToggleAnnotator: Te,
1014
+ style: le({
1015
+ visibility: p(We) ? p(Se) ? "visible" : "hidden" : "visible"
1016
+ })
1017
+ }, dl({ _: 2 }, [
1018
+ e.$slots.menuIcon ? {
1019
+ name: "menuIcon",
1020
+ fn: b(({ isOpen: o, color: s }) => [
1021
+ k(e.$slots, "menuIcon", V(G({ isOpen: o, color: s })), void 0, !0)
1022
+ ]),
1023
+ key: "0"
1024
+ } : void 0,
1025
+ e.$slots.optionTooltip ? {
1026
+ name: "optionTooltip",
1027
+ fn: b(() => [
1028
+ k(e.$slots, "optionTooltip", {}, void 0, !0)
1029
+ ]),
1030
+ key: "1"
1031
+ } : void 0,
1032
+ e.$slots.optionPdf ? {
1033
+ name: "optionPdf",
1034
+ fn: b(() => [
1035
+ k(e.$slots, "optionPdf", {}, void 0, !0)
1036
+ ]),
1037
+ key: "2"
1038
+ } : void 0,
1039
+ e.$slots.optionCsv ? {
1040
+ name: "optionCsv",
1041
+ fn: b(() => [
1042
+ k(e.$slots, "optionCsv", {}, void 0, !0)
1043
+ ]),
1044
+ key: "3"
1045
+ } : void 0,
1046
+ e.$slots.optionImg ? {
1047
+ name: "optionImg",
1048
+ fn: b(() => [
1049
+ k(e.$slots, "optionImg", {}, void 0, !0)
1050
+ ]),
1051
+ key: "4"
1052
+ } : void 0,
1053
+ e.$slots.optionTable ? {
1054
+ name: "optionTable",
1055
+ fn: b(() => [
1056
+ k(e.$slots, "optionTable", {}, void 0, !0)
1057
+ ]),
1058
+ key: "5"
1059
+ } : void 0,
1060
+ e.$slots.optionLabels ? {
1061
+ name: "optionLabels",
1062
+ fn: b(() => [
1063
+ k(e.$slots, "optionLabels", {}, void 0, !0)
1064
+ ]),
1065
+ key: "6"
1066
+ } : void 0,
1067
+ e.$slots.optionStack ? {
1068
+ name: "optionStack",
1069
+ fn: b(() => [
1070
+ k(e.$slots, "optionStack", {}, void 0, !0)
1071
+ ]),
1072
+ key: "7"
1073
+ } : void 0,
1074
+ e.$slots.optionFullscreen ? {
1075
+ name: "optionFullscreen",
1076
+ fn: b(({ toggleFullscreen: o, isFullscreen: s }) => [
1077
+ k(e.$slots, "optionFullscreen", V(G({ toggleFullscreen: o, isFullscreen: s })), void 0, !0)
1078
+ ]),
1079
+ key: "8"
1080
+ } : void 0,
1081
+ e.$slots.optionAnnotator ? {
1082
+ name: "optionAnnotator",
1083
+ fn: b(({ toggleAnnotator: o, isAnnotator: s }) => [
1084
+ k(e.$slots, "optionAnnotator", V(G({ toggleAnnotator: o, isAnnotator: s })), void 0, !0)
1085
+ ]),
1086
+ key: "9"
1087
+ } : void 0
1088
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasLabel", "hasStack", "hasFullscreen", "hasTable", "isFullscreen", "isTooltip", "isStacked", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : H("", !0),
1089
+ Y("div", {
1090
+ class: "vue-ui-xy-canvas",
1091
+ style: le(`position: relative; aspect-ratio: ${_e.value}`),
1092
+ ref_key: "container",
1093
+ ref: oe
1094
+ }, [
1095
+ ge.value ? (S(), de("canvas", {
1096
+ key: 0,
1097
+ ref_key: "canvas",
1098
+ ref: O,
1099
+ style: { width: "100%", height: "100%" },
1100
+ onMousemove: a[0] || (a[0] = (o) => Vl(o)),
1101
+ onMouseleave: Gl
1102
+ }, null, 544)) : (S(), D(p(wl), {
1103
+ key: 1,
1104
+ config: {
1105
+ type: "line",
1106
+ style: {
1107
+ backgroundColor: l.value.style.chart.backgroundColor,
1108
+ line: {
1109
+ axis: {
1110
+ color: "#CCCCCC"
1111
+ },
1112
+ path: {
1113
+ color: "#CCCCCC",
1114
+ strokeWidth: 0.5
1115
+ }
1116
+ }
1117
+ }
1118
+ }
1119
+ }, null, 8, ["config"])),
1120
+ hl(p(Sl), {
1121
+ show: r.value.showTooltip && ye.value,
1122
+ backgroundColor: l.value.style.chart.tooltip.backgroundColor,
1123
+ color: l.value.style.chart.tooltip.color,
1124
+ fontSize: l.value.style.chart.tooltip.fontSize,
1125
+ borderRadius: l.value.style.chart.tooltip.borderRadius,
1126
+ borderColor: l.value.style.chart.tooltip.borderColor,
1127
+ borderWidth: l.value.style.chart.tooltip.borderWidth,
1128
+ position: l.value.style.chart.tooltip.position,
1129
+ offsetY: l.value.style.chart.tooltip.offsetY,
1130
+ parent: p(O),
1131
+ content: fe.value,
1132
+ isFullscreen: ue.value,
1133
+ backgroundOpacity: l.value.style.chart.tooltip.backgroundOpacity,
1134
+ isCustom: p(gl)(l.value.style.chart.tooltip.customFormat),
1135
+ smooth: l.value.style.chart.tooltip.smooth,
1136
+ backdropFilter: l.value.style.chart.tooltip.backdropFilter
1137
+ }, {
1138
+ "tooltip-before": b(() => [
1139
+ k(e.$slots, "tooltip-before", V(G({ ...De.value })), void 0, !0)
1140
+ ]),
1141
+ "tooltip-after": b(() => [
1142
+ k(e.$slots, "tooltip-after", V(G({ ...De.value })), void 0, !0)
1143
+ ]),
1144
+ _: 3
1145
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "position", "offsetY", "parent", "content", "isFullscreen", "backgroundOpacity", "isCustom", "smooth", "backdropFilter"])
1146
+ ], 4),
1147
+ Y("div", {
1148
+ ref_key: "chartSlicer",
1149
+ ref: He,
1150
+ style: le(`width:100%;background:${l.value.style.chart.backgroundColor}`),
1151
+ "data-dom-to-png-ignore": ""
1152
+ }, [
1153
+ l.value.style.chart.zoom.show && T.value > 1 ? (S(), D($a, {
1154
+ ref_key: "slicerComponent",
1155
+ ref: el,
1156
+ key: `slicer_${Fe.value}`,
1157
+ background: l.value.style.chart.zoom.color,
1158
+ borderColor: l.value.style.chart.backgroundColor,
1159
+ fontSize: l.value.style.chart.zoom.fontSize,
1160
+ useResetSlot: l.value.style.chart.zoom.useResetSlot,
1161
+ labelLeft: l.value.style.chart.grid.y.timeLabels.values[u.value.start] ? W.value[u.value.start].text : "",
1162
+ labelRight: l.value.style.chart.grid.y.timeLabels.values[u.value.end - 1] ? W.value[u.value.end - 1].text : "",
1163
+ textColor: l.value.style.chart.color,
1164
+ inputColor: l.value.style.chart.zoom.color,
1165
+ selectColor: l.value.style.chart.zoom.highlightColor,
1166
+ max: T.value,
1167
+ min: 0,
1168
+ valueStart: u.value.start,
1169
+ valueEnd: u.value.end,
1170
+ start: u.value.start,
1171
+ "onUpdate:start": a[1] || (a[1] = (o) => u.value.start = o),
1172
+ end: u.value.end,
1173
+ "onUpdate:end": a[2] || (a[2] = (o) => u.value.end = o),
1174
+ refreshStartPoint: l.value.style.chart.zoom.startIndex !== null ? l.value.style.chart.zoom.startIndex : 0,
1175
+ refreshEndPoint: l.value.style.chart.zoom.endIndex !== null ? l.value.style.chart.zoom.endIndex + 1 : T.value,
1176
+ enableRangeHandles: l.value.style.chart.zoom.enableRangeHandles,
1177
+ enableSelectionDrag: l.value.style.chart.zoom.enableSelectionDrag,
1178
+ onReset: Qe
1179
+ }, {
1180
+ "reset-action": b(({ reset: o }) => [
1181
+ k(e.$slots, "reset-action", V(G({ reset: o })), void 0, !0)
1182
+ ]),
1183
+ _: 3
1184
+ }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : H("", !0)
1185
+ ], 4),
1186
+ Y("div", {
1187
+ id: `legend-bottom-${B.value}`
1188
+ }, null, 8, Fa),
1189
+ Be.value ? (S(), D(la, {
1190
+ key: 2,
1191
+ to: l.value.style.chart.legend.position === "top" ? `#legend-top-${B.value}` : `#legend-bottom-${B.value}`
1192
+ }, [
1193
+ Y("div", {
1194
+ ref_key: "chartLegend",
1195
+ ref: Ne
1196
+ }, [
1197
+ l.value.style.chart.legend.show && ge.value ? (S(), D(Sa, {
1198
+ legendSet: ol.value,
1199
+ config: Zl.value,
1200
+ key: `legend_${we.value}`,
1201
+ onClickMarker: a[3] || (a[3] = ({ i: o }) => tl(o))
1202
+ }, {
1203
+ item: b(({ legend: o, index: s }) => [
1204
+ Y("div", {
1205
+ onClick: (i) => o.segregate(),
1206
+ style: le(`opacity:${$.value.includes(s) ? 0.5 : 1}`)
1207
+ }, Me(o.name), 13, Ea)
1208
+ ]),
1209
+ _: 1
1210
+ }, 8, ["legendSet", "config"])) : k(e.$slots, "legend", {
1211
+ key: 1,
1212
+ legend: ol.value
1213
+ }, void 0, !0)
1214
+ ], 512)
1215
+ ], 8, ["to"])) : H("", !0),
1216
+ e.$slots.watermark ? (S(), de("div", Aa, [
1217
+ k(e.$slots, "watermark", V(G({ isPrinting: p(Ve) || p(Ge) })), void 0, !0)
1218
+ ])) : H("", !0),
1219
+ e.$slots.source ? (S(), de("div", {
1220
+ key: 4,
1221
+ ref_key: "source",
1222
+ ref: Ye,
1223
+ dir: "auto"
1224
+ }, [
1225
+ k(e.$slots, "source", {}, void 0, !0)
1226
+ ], 512)) : H("", !0),
1227
+ ge.value ? (S(), D(aa(ie.value.component), ta({ key: 5 }, ie.value.props, {
1228
+ ref_key: "tableUnit",
1229
+ ref: re,
1230
+ onClose: a[6] || (a[6] = (o) => r.value.showTable = !1)
1231
+ }), dl({
1232
+ content: b(() => [
1233
+ (S(), D(p(kl), {
1234
+ key: `table_${Ce.value}`,
1235
+ colNames: be.value.colNames,
1236
+ head: be.value.head,
1237
+ body: be.value.body,
1238
+ config: be.value.config,
1239
+ title: l.value.table.useDialog ? "" : ie.value.title,
1240
+ withCloseButton: !l.value.table.useDialog,
1241
+ onClose: a[5] || (a[5] = (o) => r.value.showTable = !1)
1242
+ }, {
1243
+ th: b(({ th: o }) => [
1244
+ Y("div", { innerHTML: o }, null, 8, Na)
1245
+ ]),
1246
+ td: b(({ td: o }) => [
1247
+ yl(Me(o), 1)
1248
+ ]),
1249
+ _: 1
1250
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
1251
+ ]),
1252
+ _: 2
1253
+ }, [
1254
+ l.value.table.useDialog ? {
1255
+ name: "title",
1256
+ fn: b(() => [
1257
+ yl(Me(ie.value.title), 1)
1258
+ ]),
1259
+ key: "0"
1260
+ } : void 0,
1261
+ l.value.table.useDialog ? {
1262
+ name: "actions",
1263
+ fn: b(() => [
1264
+ Y("button", {
1265
+ tabindex: "0",
1266
+ class: "vue-ui-user-options-button",
1267
+ onClick: a[4] || (a[4] = (o) => $e(l.value.userOptions.callbacks.csv))
1268
+ }, [
1269
+ hl(Oa, {
1270
+ name: "excel",
1271
+ stroke: ie.value.props.color
1272
+ }, null, 8, ["stroke"])
1273
+ ])
1274
+ ]),
1275
+ key: "1"
1276
+ } : void 0
1277
+ ]), 1040)) : H("", !0),
1278
+ l.value.userOptions.buttons.annotator && h.value.length ? (S(), D(p(Cl), {
1279
+ key: 6,
1280
+ parent: I.value,
1281
+ backgroundColor: l.value.style.chart.backgroundColor,
1282
+ color: l.value.style.chart.color,
1283
+ active: me.value,
1284
+ onClose: Te
1285
+ }, null, 8, ["parent", "backgroundColor", "color", "active"])) : H("", !0)
1286
+ ], 46, Pa));
1287
+ }
1288
+ }, lt = /* @__PURE__ */ Ra(Ha, [["__scopeId", "data-v-7eb0be8b"]]);
1289
+ export {
1290
+ lt as default
1291
+ };