vue-data-ui 3.19.6 → 3.19.7

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 (158) hide show
  1. package/dist/{BaseDraggableDialog-BQcmQAK5.js → BaseDraggableDialog-DUUu2E2Q.js} +1 -1
  2. package/dist/{BaseIcon-CEmt3Ifx.js → BaseIcon-DM1x8hQF.js} +6 -3
  3. package/dist/{BaseLegendToggle-DUIqQmwM.js → BaseLegendToggle-CJTwLGXL.js} +1 -1
  4. package/dist/{BaseZoomControls-Ce1yqas1.js → BaseZoomControls-BkajQ8q9.js} +1 -1
  5. package/dist/{ColorPicker-DS_QkH3W.js → ColorPicker-DTQeqKUV.js} +1 -1
  6. package/dist/{DataTable-BvDJEAma.js → DataTable-DmE8Oo4i.js} +1 -1
  7. package/dist/{NonSvgPenAndPaper-D4Gh7O43.js → NonSvgPenAndPaper-tvWXeCsd.js} +2 -2
  8. package/dist/{PackageVersion-C7CvErYQ.js → PackageVersion-DUU5Aku2.js} +1 -1
  9. package/dist/{PenAndPaper-DwpL8Z0l.js → PenAndPaper-DNgm6y3l.js} +2 -2
  10. package/dist/{Slicer-BlfyiHHD.js → Slicer-CPWGgGSp.js} +1 -1
  11. package/dist/{SlicerPreview-CG1jpZqZ.js → SlicerPreview-BU3ZeHjR.js} +1 -1
  12. package/dist/{UserOptions-B57xo6D2.js → UserOptions-D7zR0tnR.js} +1 -1
  13. package/dist/components/vue-ui-3d-bar.js +1 -1
  14. package/dist/components/vue-ui-accordion.js +1 -1
  15. package/dist/components/vue-ui-age-pyramid.js +1 -1
  16. package/dist/components/vue-ui-annotator.js +1 -1
  17. package/dist/components/vue-ui-bullet.js +1 -1
  18. package/dist/components/vue-ui-bump.js +1 -1
  19. package/dist/components/vue-ui-candlestick.js +1 -1
  20. package/dist/components/vue-ui-carousel-table.js +1 -1
  21. package/dist/components/vue-ui-chestnut.js +1 -1
  22. package/dist/components/vue-ui-chord.js +1 -1
  23. package/dist/components/vue-ui-circle-pack.js +1 -1
  24. package/dist/components/vue-ui-cursor.js +1 -1
  25. package/dist/components/vue-ui-dag.js +1 -1
  26. package/dist/components/vue-ui-dashboard.js +1 -1
  27. package/dist/components/vue-ui-digits.js +1 -1
  28. package/dist/components/vue-ui-donut-evolution.js +1 -1
  29. package/dist/components/vue-ui-donut.js +1 -1
  30. package/dist/components/vue-ui-dumbbell.js +1 -1
  31. package/dist/components/vue-ui-flow.js +1 -1
  32. package/dist/components/vue-ui-funnel.js +1 -1
  33. package/dist/components/vue-ui-galaxy.js +1 -1
  34. package/dist/components/vue-ui-gauge.js +1 -1
  35. package/dist/components/vue-ui-geo.js +1 -1
  36. package/dist/components/vue-ui-gizmo.js +1 -1
  37. package/dist/components/vue-ui-heatmap.js +1 -1
  38. package/dist/components/vue-ui-history-plot.js +1 -1
  39. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  40. package/dist/components/vue-ui-icon.js +1 -1
  41. package/dist/components/vue-ui-kpi.js +1 -1
  42. package/dist/components/vue-ui-mini-loader.js +1 -1
  43. package/dist/components/vue-ui-molecule.js +1 -1
  44. package/dist/components/vue-ui-mood-radar.js +1 -1
  45. package/dist/components/vue-ui-nested-donuts.js +1 -1
  46. package/dist/components/vue-ui-onion.js +1 -1
  47. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  48. package/dist/components/vue-ui-quadrant.js +1 -1
  49. package/dist/components/vue-ui-quick-chart.js +1 -1
  50. package/dist/components/vue-ui-radar.js +1 -1
  51. package/dist/components/vue-ui-rating.js +1 -1
  52. package/dist/components/vue-ui-relation-circle.js +1 -1
  53. package/dist/components/vue-ui-ridgeline.js +1 -1
  54. package/dist/components/vue-ui-rings.js +1 -1
  55. package/dist/components/vue-ui-scatter.js +1 -1
  56. package/dist/components/vue-ui-skeleton.js +1 -1
  57. package/dist/components/vue-ui-smiley.js +1 -1
  58. package/dist/components/vue-ui-spark-trend.js +1 -1
  59. package/dist/components/vue-ui-sparkbar.js +1 -1
  60. package/dist/components/vue-ui-sparkgauge.js +1 -1
  61. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  62. package/dist/components/vue-ui-sparkline.js +1 -1
  63. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  64. package/dist/components/vue-ui-stackbar.js +1 -1
  65. package/dist/components/vue-ui-stackline.js +1 -1
  66. package/dist/components/vue-ui-strip-plot.js +1 -1
  67. package/dist/components/vue-ui-table-heatmap.js +1 -1
  68. package/dist/components/vue-ui-table-sparkline.js +1 -1
  69. package/dist/components/vue-ui-table.js +1 -1
  70. package/dist/components/vue-ui-thermometer.js +1 -1
  71. package/dist/components/vue-ui-timer.js +1 -1
  72. package/dist/components/vue-ui-tiremarks.js +1 -1
  73. package/dist/components/vue-ui-treemap.js +1 -1
  74. package/dist/components/vue-ui-vertical-bar.js +1 -1
  75. package/dist/components/vue-ui-waffle.js +1 -1
  76. package/dist/components/vue-ui-wheel.js +1 -1
  77. package/dist/components/vue-ui-word-cloud.js +1 -1
  78. package/dist/components/vue-ui-world.js +1 -1
  79. package/dist/components/vue-ui-xy-canvas.js +1 -1
  80. package/dist/components/vue-ui-xy.js +1 -1
  81. package/dist/style.css +1 -1
  82. package/dist/types/vue-data-ui.d.ts +11 -0
  83. package/dist/{useConfig-lKgU652n.js → useConfig-ByaaSKhz.js} +5 -0
  84. package/dist/{useObjectBindings-C3q0I8Zm.js → useObjectBindings-BR1sGimd.js} +1 -1
  85. package/dist/utils.js +1 -1
  86. package/dist/{vue-data-ui-BBnKbdCT.js → vue-data-ui-DBjj6t8B.js} +68 -68
  87. package/dist/vue-data-ui.js +69 -69
  88. package/dist/{vue-ui-3d-bar-gMuK6OMP.js → vue-ui-3d-bar-CmAc1xBL.js} +2 -2
  89. package/dist/{vue-ui-accordion-CNtzLReQ.js → vue-ui-accordion-BX9WL-QF.js} +2 -2
  90. package/dist/{vue-ui-age-pyramid-B_D1wPY4.js → vue-ui-age-pyramid-CFvux3-S.js} +2 -2
  91. package/dist/{vue-ui-annotator-KPkeXw8q.js → vue-ui-annotator-Be3VpH8Z.js} +4 -4
  92. package/dist/{vue-ui-bullet-Ci3tqx6A.js → vue-ui-bullet-C4xEb3fq.js} +2 -2
  93. package/dist/{vue-ui-bump-31Kryh02.js → vue-ui-bump-BW76g7ep.js} +3 -3
  94. package/dist/vue-ui-candlestick-ShTn9uzH.js +1826 -0
  95. package/dist/{vue-ui-carousel-table-D3j0UTQ1.js → vue-ui-carousel-table-DMan_IZb.js} +2 -2
  96. package/dist/{vue-ui-chestnut-Cgf0vAxo.js → vue-ui-chestnut-BIfaNOqy.js} +2 -2
  97. package/dist/{vue-ui-chord-DGma5NsS.js → vue-ui-chord-GDJiAjfD.js} +2 -2
  98. package/dist/{vue-ui-circle-pack-EvRfcXnZ.js → vue-ui-circle-pack-Bo4ljiP_.js} +2 -2
  99. package/dist/{vue-ui-cursor-BX8kHXVE.js → vue-ui-cursor-BuLoDOFw.js} +2 -2
  100. package/dist/{vue-ui-dag-DuOokTx4.js → vue-ui-dag-BmbwijZi.js} +3 -3
  101. package/dist/{vue-ui-dashboard-BeZCujZv.js → vue-ui-dashboard-CyzIaw6M.js} +67 -67
  102. package/dist/{vue-ui-digits-nIgbeL-K.js → vue-ui-digits-B33dTRHj.js} +2 -2
  103. package/dist/{vue-ui-donut-FzQwgIbN.js → vue-ui-donut-BIgvjStd.js} +3 -3
  104. package/dist/{vue-ui-donut-evolution-CwLYRDws.js → vue-ui-donut-evolution-DT5F88LK.js} +228 -218
  105. package/dist/{vue-ui-dumbbell-BmujSKH2.js → vue-ui-dumbbell-SwLKpHuh.js} +2 -2
  106. package/dist/{vue-ui-flow-D4jeyY5a.js → vue-ui-flow-BqTUyRBS.js} +2 -2
  107. package/dist/{vue-ui-funnel-DQ1fOfXW.js → vue-ui-funnel-GOx4FfhB.js} +2 -2
  108. package/dist/{vue-ui-galaxy-Wldw6HHG.js → vue-ui-galaxy-CTMyOfp7.js} +3 -3
  109. package/dist/{vue-ui-gauge-BzV3y_h3.js → vue-ui-gauge-Clz_TmiX.js} +2 -2
  110. package/dist/{vue-ui-geo-WLEkf2a9.js → vue-ui-geo-2kZK_UVF.js} +3 -3
  111. package/dist/{vue-ui-gizmo-C0vr-wLL.js → vue-ui-gizmo-BpNEwLo7.js} +2 -2
  112. package/dist/{vue-ui-heatmap-RmaAnr9m.js → vue-ui-heatmap-B6FLZij5.js} +3 -3
  113. package/dist/{vue-ui-history-plot-Dyf2Atb2.js → vue-ui-history-plot-DpGwqYyg.js} +3 -3
  114. package/dist/{vue-ui-horizontal-bar-DG4paRTj.js → vue-ui-horizontal-bar-BHFd966c.js} +4 -4
  115. package/dist/{vue-ui-kpi-TBQhSM0a.js → vue-ui-kpi-DyIqCISK.js} +2 -2
  116. package/dist/{vue-ui-mini-loader-BpLz9pDO.js → vue-ui-mini-loader-DDJUya9e.js} +1 -1
  117. package/dist/{vue-ui-molecule-Df4zCHL5.js → vue-ui-molecule-BtQOQ32e.js} +2 -2
  118. package/dist/{vue-ui-mood-radar-RQqmJU_9.js → vue-ui-mood-radar-CZSLnIMi.js} +2 -2
  119. package/dist/{vue-ui-nested-donuts-C7VIp7mz.js → vue-ui-nested-donuts-Lhteboo1.js} +3 -3
  120. package/dist/{vue-ui-onion-DP4NWU3Y.js → vue-ui-onion-uCUgmyF1.js} +3 -3
  121. package/dist/{vue-ui-parallel-coordinate-plot-a7OvbsVh.js → vue-ui-parallel-coordinate-plot-_u_VTAjF.js} +3 -3
  122. package/dist/{vue-ui-quadrant-C4GxyyE3.js → vue-ui-quadrant-CgalDMyS.js} +3 -3
  123. package/dist/{vue-ui-quick-chart-BNCkZiiG.js → vue-ui-quick-chart-BAWcSaDB.js} +4 -4
  124. package/dist/{vue-ui-radar-Dcq3bWA4.js → vue-ui-radar-64HPFASp.js} +3 -3
  125. package/dist/{vue-ui-rating-DBxf9Vwv.js → vue-ui-rating-D_QR_A3V.js} +1 -1
  126. package/dist/{vue-ui-relation-circle-CZ1UtEIM.js → vue-ui-relation-circle-DT4So4-6.js} +2 -2
  127. package/dist/{vue-ui-ridgeline-CsNDB48W.js → vue-ui-ridgeline-5fZANTS9.js} +3 -3
  128. package/dist/{vue-ui-rings-Bwd_i2eo.js → vue-ui-rings-QFY794j3.js} +3 -3
  129. package/dist/{vue-ui-scatter-DAa8MnhH.js → vue-ui-scatter-BPCY-u36.js} +3 -3
  130. package/dist/{vue-ui-skeleton-CPy9DsSC.js → vue-ui-skeleton-Dj_ZVfSX.js} +2 -2
  131. package/dist/{vue-ui-smiley-2xc8AwPP.js → vue-ui-smiley-rFdGxZK6.js} +1 -1
  132. package/dist/{vue-ui-spark-trend-CM06cEvG.js → vue-ui-spark-trend-DB0VHzm0.js} +2 -2
  133. package/dist/{vue-ui-sparkbar-CSDRWMhb.js → vue-ui-sparkbar-DVGRTFO5.js} +2 -2
  134. package/dist/{vue-ui-sparkgauge-CKeKTyBH.js → vue-ui-sparkgauge-3UFZaDF9.js} +2 -2
  135. package/dist/{vue-ui-sparkhistogram-BSnU2_Q0.js → vue-ui-sparkhistogram-DRmBVef7.js} +2 -2
  136. package/dist/{vue-ui-sparkline-DhkrfLYf.js → vue-ui-sparkline-vsqKnakQ.js} +2 -2
  137. package/dist/{vue-ui-sparkstackbar-D3vn49rn.js → vue-ui-sparkstackbar-BNUhunuQ.js} +3 -3
  138. package/dist/vue-ui-stackbar-9jP1s0MN.js +2267 -0
  139. package/dist/vue-ui-stackline-D1o_afno.js +2395 -0
  140. package/dist/{vue-ui-strip-plot-DLH2Jc91.js → vue-ui-strip-plot-CogQ8VSl.js} +2 -2
  141. package/dist/{vue-ui-table-DBWGRgw6.js → vue-ui-table-Bub1v0eM.js} +5 -5
  142. package/dist/{vue-ui-table-heatmap-D0SM6A1L.js → vue-ui-table-heatmap-BFKyJTr1.js} +2 -2
  143. package/dist/{vue-ui-table-sparkline-BShpt1UR.js → vue-ui-table-sparkline-BPts9wTR.js} +2 -2
  144. package/dist/{vue-ui-thermometer-BIH00QYu.js → vue-ui-thermometer-CJJ4cVt0.js} +2 -2
  145. package/dist/{vue-ui-timer-vcaC2CGp.js → vue-ui-timer-BEPXWd20.js} +3 -3
  146. package/dist/{vue-ui-tiremarks-BmhvsqeP.js → vue-ui-tiremarks-BC7bLLQD.js} +2 -2
  147. package/dist/{vue-ui-treemap-C-M5PHTS.js → vue-ui-treemap-Cja-vZoa.js} +4 -4
  148. package/dist/{vue-ui-waffle-DnpUe9aj.js → vue-ui-waffle-BRj-YBlz.js} +3 -3
  149. package/dist/{vue-ui-wheel-D21hTOn0.js → vue-ui-wheel-AOTFpTWN.js} +2 -2
  150. package/dist/{vue-ui-word-cloud-C4SPxSlX.js → vue-ui-word-cloud-dqfAdhW-.js} +3 -3
  151. package/dist/{vue-ui-world-DSq_cPCv.js → vue-ui-world-DqwsIYze.js} +3 -3
  152. package/dist/vue-ui-xy-Dhult6gR.js +4181 -0
  153. package/dist/{vue-ui-xy-canvas-DjTurM4m.js → vue-ui-xy-canvas-B06Rit63.js} +6 -6
  154. package/package.json +1 -1
  155. package/dist/vue-ui-candlestick-DU0MXtKT.js +0 -1814
  156. package/dist/vue-ui-stackbar-BR7tZmWR.js +0 -2253
  157. package/dist/vue-ui-stackline-Dj9N60Js.js +0 -2381
  158. package/dist/vue-ui-xy-Iep0AjyV.js +0 -4151
@@ -1,2381 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
- import { D as t, Ft as n, G as r, H as i, I as a, It as o, J as s, Lt as c, P as l, S as u, St as d, Tt as f, X as p, et as m, g as h, h as g, i as _, jt as ee, k as v, mt as te, nt as ne, ot as re, pt as ie, s as ae, t as oe, v as se, x as ce, y as le, yt as ue, zt as de } from "./lib-BkiwukKO.js";
3
- import { n as fe, r as pe, t as me } from "./useTimeLabels-C0x7zUXP.js";
4
- import { t as he } from "./useConfig-lKgU652n.js";
5
- import { t as ge } from "./usePrinter-X0yWOynH.js";
6
- import { n as _e, t as ve } from "./BaseScanner-C7dmAref.js";
7
- import { t as ye } from "./useSvgExport-Dtu973wa.js";
8
- import { t as be } from "./useNestedProp-Ck4hsrpu.js";
9
- import { t as xe } from "./useThemeCheck-rFK9Zlb_.js";
10
- import { t as Se } from "./useStableElementSize-0I1IpHPl.js";
11
- import { t as Ce } from "./useTimeLabelCollider-Dm55Emzg.js";
12
- import { t as we } from "./img-BjOr008R.js";
13
- import { n as Te } from "./Title-__gWq2g6.js";
14
- import { t as Ee } from "./Shape-DEGOZ6GG.js";
15
- import { t as De } from "./_plugin-vue_export-helper-Dq1MygBL.js";
16
- import { c as Oe } from "./canvas-lib-DTaADQOK.js";
17
- import { t as ke } from "./useResponsive-CrAInupd.js";
18
- import { t as Ae } from "./SlicerPreview-CG1jpZqZ.js";
19
- import { t as je } from "./BaseLegendToggle-DUIqQmwM.js";
20
- import { t as Me } from "./A11yDataTable-q2-8fSlJ.js";
21
- import { t as Ne } from "./useUserOptionState-CjPJPTg2.js";
22
- import { t as Pe } from "./useChartAccessibility-Do37qcw2.js";
23
- import { t as Fe } from "./Legend-Gg5Q4Clb.js";
24
- import { t as Ie } from "./vue_ui_stackline-DXxzibUd.js";
25
- import { Fragment as y, Teleport as Le, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createSlots as Re, createTextVNode as ze, createVNode as Be, defineAsyncComponent as Ve, guardReactiveProps as T, mergeProps as He, nextTick as Ue, normalizeClass as We, normalizeProps as E, normalizeStyle as Ge, onBeforeUnmount as Ke, onMounted as qe, openBlock as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as Je, shallowRef as Ye, toDisplayString as Xe, toRefs as Ze, unref as j, useSlots as Qe, watch as $e, watchEffect as et, withCtx as M } from "vue";
26
- //#region src/components/vue-ui-stackline.vue
27
- var tt = /* @__PURE__ */ e({ default: () => Vt }), nt = ["id"], rt = ["id"], it = ["id"], at = { style: { position: "relative" } }, ot = [
28
- "aria-describedby",
29
- "xmlns",
30
- "viewBox"
31
- ], st = { key: 0 }, ct = [
32
- "x",
33
- "y",
34
- "width",
35
- "height"
36
- ], lt = { key: 1 }, ut = ["id"], dt = ["stop-color"], ft = ["stop-color"], pt = [
37
- "x1",
38
- "x2",
39
- "y1",
40
- "y2",
41
- "stroke",
42
- "stroke-width",
43
- "stroke-dasharray"
44
- ], mt = [
45
- "x1",
46
- "x2",
47
- "y1",
48
- "y2",
49
- "stroke",
50
- "stroke-width",
51
- "stroke-dasharray"
52
- ], ht = [
53
- "x1",
54
- "x2",
55
- "y1",
56
- "y2",
57
- "stroke",
58
- "stroke-width"
59
- ], gt = [
60
- "x1",
61
- "x2",
62
- "y1",
63
- "y2",
64
- "stroke",
65
- "stroke-width"
66
- ], _t = [
67
- "x",
68
- "y",
69
- "font-size",
70
- "fill",
71
- "font-weight"
72
- ], vt = [
73
- "transform",
74
- "font-size",
75
- "fill",
76
- "font-weight"
77
- ], yt = [
78
- "x",
79
- "y",
80
- "width",
81
- "height",
82
- "stroke",
83
- "stroke-width",
84
- "stroke-linecap",
85
- "stroke-linejoin",
86
- "stroke-dasharray"
87
- ], bt = [
88
- "d",
89
- "fill",
90
- "opacity"
91
- ], xt = [
92
- "d",
93
- "stroke",
94
- "stroke-width"
95
- ], St = [
96
- "x1",
97
- "x2",
98
- "y1",
99
- "y2",
100
- "stroke"
101
- ], Ct = [
102
- "x",
103
- "y",
104
- "font-size",
105
- "font-weight",
106
- "fill"
107
- ], wt = { key: 0 }, Tt = { key: 1 }, Et = [
108
- "text-anchor",
109
- "font-size",
110
- "font-weight",
111
- "fill",
112
- "transform",
113
- "onClick"
114
- ], Dt = [
115
- "text-anchor",
116
- "font-size",
117
- "fill",
118
- "transform",
119
- "innerHTML",
120
- "onClick"
121
- ], Ot = [
122
- "x",
123
- "y",
124
- "height",
125
- "width",
126
- "fill"
127
- ], kt = { key: 0 }, At = [
128
- "x1",
129
- "x2",
130
- "y1",
131
- "y2",
132
- "stroke",
133
- "stroke-width",
134
- "stroke-dasharray"
135
- ], jt = { key: 0 }, Mt = [
136
- "x",
137
- "y",
138
- "font-size",
139
- "fill",
140
- "font-weight"
141
- ], Nt = [
142
- "x",
143
- "y",
144
- "font-size",
145
- "font-weight",
146
- "fill"
147
- ], Pt = ["data-start", "data-end"], Ft = {
148
- key: 0,
149
- style: {
150
- position: "absolute",
151
- top: "100%",
152
- left: "0",
153
- width: "100%"
154
- },
155
- "data-dom-to-png-ignore": "",
156
- "aria-hidden": "true"
157
- }, It = {
158
- key: 5,
159
- class: "vue-data-ui-watermark"
160
- }, Lt = ["onClick"], Rt = ["innerHTML"], zt = ["innerHTML"], Bt = ["id"], Vt = /* @__PURE__ */ De({
161
- __name: "vue-ui-stackline",
162
- props: {
163
- config: {
164
- type: Object,
165
- default() {
166
- return {};
167
- }
168
- },
169
- dataset: {
170
- type: Array,
171
- default() {
172
- return [];
173
- }
174
- },
175
- selectedXIndex: {
176
- type: Number,
177
- default: void 0
178
- }
179
- },
180
- emits: [
181
- "selectDatapoint",
182
- "selectLegend",
183
- "selectTimeLabel",
184
- "selectX",
185
- "copyAlt"
186
- ],
187
- setup(e, { expose: De, emit: tt }) {
188
- let Vt = Ve(() => import("./Tooltip-CuWEYGr3.js")), Ht = Ve(() => import("./BaseIcon-CEmt3Ifx.js").then((e) => e.n)), Ut = Ve(() => import("./vue-ui-accordion-CNtzLReQ.js").then((e) => e.n)), Wt = Ve(() => import("./DataTable-BvDJEAma.js")), Gt = Ve(() => import("./PenAndPaper-DwpL8Z0l.js").then((e) => e.t)), Kt = Ve(() => import("./UserOptions-B57xo6D2.js").then((e) => e.n)), qt = Ve(() => import("./PackageVersion-C7CvErYQ.js").then((e) => e.t)), Jt = Ve(() => import("./BaseDraggableDialog-BQcmQAK5.js").then((e) => e.n)), { vue_ui_stackline: Yt } = he(), { isThemeValid: Xt, warnInvalidTheme: Zt } = xe(), Qt = Qe(), N = e, $t = tt, en = b({
189
- get() {
190
- return !!N.dataset && N.dataset.length;
191
- },
192
- set(e) {
193
- return e;
194
- }
195
- }), P = O(null), F = O(i()), tn = O(!1), I = O([]), nn = O(0), rn = O(null), an = O(null), on = O(null), sn = O(null), cn = O(null), ln = O(!1), un = O(!1), dn = O(0), fn = O(0), pn = O(0), mn = O(!1), hn = O(null), gn = O(null), _n = O(!1), vn = O(!1), yn = O(!1), bn = O(null), xn = O(null), Sn = O(null), Cn = O(null), wn = O(null), Tn = Ye(null), En = O(!1), Dn = O(0), On = O(0), L = O(null), kn = O({
196
- x: 0,
197
- y: 0
198
- }), An = O("pointer"), jn = Se({
199
- elementRef: Tn,
200
- minimumWidth: 2,
201
- minimumHeight: 2,
202
- stableFramesRequired: 2,
203
- once: !1,
204
- onSizeAccepted: () => {
205
- Pn();
206
- }
207
- });
208
- function Mn() {
209
- Tn.value = P.value?.parentNode ?? null;
210
- }
211
- function Nn() {
212
- return new Promise((e) => {
213
- requestAnimationFrame(() => {
214
- requestAnimationFrame(e);
215
- });
216
- });
217
- }
218
- async function Pn() {
219
- let e = ++On.value;
220
- En.value = !1, await Ue(), await Nn(), await Nn(), e === On.value && (Dn.value += 1, En.value = !0);
221
- }
222
- let Fn = O(null), In = O(!1);
223
- function Ln() {
224
- In.value = !In.value;
225
- }
226
- qe(() => {
227
- Mn(), jn.start(), mn.value = !0, ar(), Pn();
228
- });
229
- let R = O(Kn()), z = b(() => R.value.userOptions.useCursorPointer), Rn = b(() => de({
230
- defaultConfig: {
231
- userOptions: { show: !1 },
232
- useCssAnimation: !1,
233
- table: { show: !1 },
234
- tooltip: { show: !1 },
235
- style: { chart: {
236
- backgroundColor: "#99999930",
237
- lines: {
238
- totalValues: { show: !1 },
239
- dataLabels: { show: !1 }
240
- },
241
- grid: {
242
- frame: { stroke: "#6A6A6A" },
243
- scale: {
244
- scaleMin: 0,
245
- scaleMax: 144
246
- },
247
- x: {
248
- axisColor: "#6A6A6A",
249
- linesColor: "#6A6A6A",
250
- axisName: { show: !1 },
251
- timeLabels: { show: !1 }
252
- },
253
- y: {
254
- axisColor: "#6A6A6A",
255
- linesColor: "#6A6A6A",
256
- axisName: { show: !1 },
257
- axisLabels: { show: !1 }
258
- }
259
- },
260
- legend: { backgroundColor: "transparent" },
261
- padding: {
262
- left: 24,
263
- right: 24,
264
- bottom: 12
265
- },
266
- zoom: {
267
- show: !1,
268
- startIndex: null,
269
- endIndex: null,
270
- keepState: !1
271
- }
272
- } }
273
- },
274
- userConfig: R.value.skeletonConfig ?? {}
275
- })), { loading: B, FINAL_DATASET: zn, manualLoading: Bn } = _e({
276
- ...Ze(N),
277
- FINAL_CONFIG: R,
278
- prepareConfig: Kn,
279
- callback: () => {
280
- Promise.resolve().then(async () => {
281
- (!R.value.style.chart.zoom.keepState || !Xr.value || q.value.start === 0 && q.value.end === 0) && await Qr();
282
- });
283
- },
284
- skeletonDataset: N.config?.skeletonDataset ?? [{
285
- name: "",
286
- series: [
287
- 3,
288
- 2,
289
- 1,
290
- 5,
291
- 13,
292
- 21,
293
- 8,
294
- 89,
295
- 34,
296
- 55
297
- ],
298
- color: "#8A8A8A"
299
- }, {
300
- name: "",
301
- series: [
302
- 1,
303
- 2,
304
- 3,
305
- 5,
306
- 8,
307
- 13,
308
- 21,
309
- 34,
310
- 55,
311
- 89
312
- ],
313
- color: "#CACACA"
314
- }],
315
- skeletonConfig: de({
316
- defaultConfig: R.value,
317
- userConfig: Rn.value
318
- })
319
- }), { userOptionsVisible: Vn, setUserOptionsVisibility: Hn, keepUserOptionState: Un } = Ne({ config: R.value }), { svgRef: V } = Pe({ config: R.value.style.chart.title });
320
- function Wn() {
321
- _n.value = !0, Hn(!0);
322
- }
323
- function Gn() {
324
- Hn(!1), _n.value = !1, L.value = null, An.value = "pointer", tn.value = !1, $.value = null, $t("selectX", {
325
- seriesIndex: null,
326
- datapoint: null
327
- });
328
- }
329
- function Kn() {
330
- let e = be({
331
- userConfig: N.config,
332
- defaultConfig: Yt
333
- }), t = {}, n = e.theme;
334
- if (n) if (!Xt.value(e)) Zt(e), t = e;
335
- else {
336
- let r = be({
337
- userConfig: Ie[n] || N.config,
338
- defaultConfig: e
339
- });
340
- t = {
341
- ...be({
342
- userConfig: N.config,
343
- defaultConfig: r
344
- }),
345
- customPalette: e.customPalette.length ? e.customPalette : c[n] || f
346
- };
347
- }
348
- else t = e;
349
- return t;
350
- }
351
- let qn = b(() => R.value.style.chart.lines.dataLabels.hideUnderValue !== null), Jn = b(() => R.value.style.chart.lines.dataLabels.hideUnderPercentage !== null);
352
- $e(() => N.config, (e) => {
353
- B.value || (R.value = Kn()), Vn.value = !R.value.userOptions.showOnChartHover, ar({ resetSlicer: !R.value.style.chart.zoom.keepState }), dn.value += 1, fn.value += 1, pn.value += 1, H.value.dataLabels.show = R.value.style.chart.lines.dataLabels.show, H.value.showTable = R.value.table.show, H.value.showTooltip = R.value.style.chart.tooltip.show, U.value.width = R.value.style.chart.width, U.value.height = R.value.style.chart.height, U.value.paddingRatio = {
354
- top: R.value.style.chart.padding.top / R.value.style.chart.height,
355
- right: R.value.style.chart.padding.right / R.value.style.chart.width,
356
- bottom: R.value.style.chart.padding.bottom / R.value.style.chart.height,
357
- left: R.value.style.chart.padding.left / R.value.style.chart.width
358
- }, Mn(), Pn(), !R.value.style.chart.zoom.keepState || !Xr.value || q.value.start === 0 && q.value.end === 0 ? Qr() : br();
359
- }, { deep: !0 }), $e(() => N.dataset, (e) => {
360
- Array.isArray(e) && e.length > 0 && (Bn.value = !1), R.value.style.chart.zoom.keepState ? br() : Cr(), Mn(), Pn();
361
- }, { deep: !0 });
362
- let H = O({
363
- dataLabels: { show: R.value.style.chart.lines.dataLabels.show },
364
- showTable: R.value.table.show,
365
- showTooltip: R.value.style.chart.tooltip.show
366
- });
367
- $e(R, () => {
368
- H.value = {
369
- dataLabels: { show: R.value.style.chart.lines.dataLabels.show },
370
- showTable: R.value.table.show,
371
- showTooltip: R.value.style.chart.tooltip.show
372
- };
373
- }, { immediate: !0 });
374
- let { isPrinting: Yn, isImaging: Xn, generatePdf: Zn, generateImage: Qn } = ge({
375
- elementId: `stackline_${F.value}`,
376
- fileName: R.value.style.chart.title.text || "vue-ui-stackline",
377
- options: R.value.userOptions.print
378
- }), $n = b(() => R.value.userOptions.show && !R.value.style.chart.title.text), U = O({
379
- width: R.value.style.chart.width,
380
- height: R.value.style.chart.height,
381
- paddingRatio: {
382
- top: R.value.style.chart.padding.top / R.value.style.chart.height,
383
- right: R.value.style.chart.padding.right / R.value.style.chart.width,
384
- bottom: R.value.style.chart.padding.bottom / R.value.style.chart.height,
385
- left: R.value.style.chart.padding.left / R.value.style.chart.width
386
- }
387
- }), er = b(() => ce(R.value.customPalette)), tr = Ye(null), nr = Ye(null), rr = O(null), ir = b(() => !!R.value.debug);
388
- function ar({ resetSlicer: e = !0 } = {}) {
389
- if (d(N.dataset) ? (p({
390
- componentName: "VueUiStackline",
391
- type: "dataset",
392
- debug: ir.value
393
- }), Bn.value = !0) : N.dataset.forEach((e, t) => {
394
- re({
395
- datasetObject: e,
396
- requiredAttributes: ["name", "series"]
397
- }).forEach((e) => {
398
- en.value = !1, p({
399
- componentName: "VueUiStackline",
400
- type: "datasetSerieAttribute",
401
- property: e,
402
- index: t,
403
- debug: ir.value
404
- }), Bn.value = !0;
405
- });
406
- }), d(N.dataset) || (Bn.value = R.value.loading), setTimeout(() => {
407
- un.value = !0;
408
- }, 10), R.value.responsive) {
409
- let e = Oe(() => {
410
- un.value = !1;
411
- let { width: e, height: t } = ke({
412
- chart: P.value,
413
- noTitle: sn.value,
414
- title: R.value.style.chart.title.text ? rn.value : null,
415
- legend: R.value.style.chart.legend.show ? an.value : null,
416
- slicer: R.value.style.chart.zoom.show && K.value > 6 ? on.value.$el : null,
417
- source: cn.value
418
- });
419
- requestAnimationFrame(() => {
420
- U.value.width = e, U.value.height = t - 12, clearTimeout(rr.value), rr.value = setTimeout(() => {
421
- un.value = !0;
422
- }, 10);
423
- });
424
- });
425
- tr.value && (nr.value && tr.value.unobserve(nr.value), tr.value.disconnect()), tr.value = new ResizeObserver(e), nr.value = P.value.parentNode, tr.value.observe(nr.value);
426
- }
427
- e && Qr();
428
- }
429
- Ke(() => {
430
- jn.stop(), tr.value && (nr.value && tr.value.unobserve(nr.value), tr.value.disconnect());
431
- });
432
- function or() {
433
- let e = 0;
434
- Sn.value && (e = Array.from(Sn.value.querySelectorAll("text")).reduce((e, t) => {
435
- let n = t.getComputedTextLength();
436
- return n > e ? n : e;
437
- }, 0));
438
- let t = xn.value ? xn.value.getBoundingClientRect().width : 0;
439
- return e + t + (t ? 24 : 0);
440
- }
441
- let sr = O(0), cr = O(0), lr = O(0);
442
- function ur() {
443
- let e = Cn.value;
444
- if (!e) {
445
- cr.value = 0;
446
- return;
447
- }
448
- try {
449
- let t = e.getBBox();
450
- cr.value = Number.isFinite(t?.height) ? t.height : 0;
451
- } catch {
452
- cr.value = 0;
453
- }
454
- }
455
- function dr() {
456
- lr.value && cancelAnimationFrame(lr.value), lr.value = requestAnimationFrame(() => {
457
- requestAnimationFrame(() => {
458
- ur();
459
- });
460
- });
461
- }
462
- Ke(() => {
463
- lr.value && cancelAnimationFrame(lr.value), cr.value = 0, sr.value = 0;
464
- });
465
- let fr = b(() => {
466
- let e = 0;
467
- if (bn.value) try {
468
- e = bn.value.getBBox().height;
469
- } catch {
470
- e = 0;
471
- }
472
- let t = R.value.style.chart.grid.x.timeLabels.show ? cr.value : 0;
473
- return e + t;
474
- }), W = b(() => {
475
- Dn.value;
476
- let { height: e, width: t } = U.value, { right: n } = U.value.paddingRatio, r = R.value.style.chart.lines.totalValues.show && N.dataset && N.dataset.length > 1 ? R.value.style.chart.lines.totalValues.fontSize * 1.3 : 0, i = 0;
477
- R.value.style.chart.grid.y.axisLabels.show && (i = or());
478
- let a = R.value.style.chart.padding.top + r, o = t - t * n - sr.value, s = e - R.value.style.chart.padding.bottom - fr.value - r, c = R.value.style.chart.padding.left + i, l = t - c - t * n - sr.value, u = e - a - R.value.style.chart.padding.bottom - fr.value - r;
479
- return {
480
- chartHeight: Math.max(0, e),
481
- chartWidth: Math.max(0, t),
482
- top: a,
483
- right: Math.max(0, o),
484
- bottom: Math.max(0, s),
485
- left: Math.max(0, c),
486
- width: Math.max(0, l),
487
- height: Math.max(0, u)
488
- };
489
- }), pr = b(() => {
490
- let { left: e, top: t, width: n, height: r } = W.value, i = q.value.start, a = q.value.end, o = Math.max(1, a - i), s = Math.max(0, Math.min(o, (J.value.start ?? i) - i)), c = Math.max(0, Math.min(o, (J.value.end ?? a) - i)), l = Math.max(0, c - s), u = {
491
- fill: R.value.style.chart.zoom.preview.fill,
492
- stroke: R.value.style.chart.zoom.preview.stroke,
493
- "stroke-width": R.value.style.chart.zoom.preview.strokeWidth,
494
- "stroke-dasharray": R.value.style.chart.zoom.preview.strokeDasharray,
495
- "stroke-linecap": "round",
496
- "stroke-linejoin": "round",
497
- style: {
498
- pointerEvents: "none",
499
- transition: "none !important",
500
- animation: "none !important"
501
- }
502
- }, d = n / o;
503
- return {
504
- x: e + s * d,
505
- y: t,
506
- width: l * d,
507
- height: r,
508
- ...u
509
- };
510
- }), G = b(() => zn.value.map((e, t) => {
511
- let n = `stackline_serie_${t}`, r = le(e.color) || er.value[t] || f[t] || f[t % f.length];
512
- return {
513
- ...e,
514
- shape: e.shape || "circle",
515
- standalone: !!e.standalone,
516
- series: JSON.parse(JSON.stringify(e.series)).map((e) => R.value.style.chart.lines.distributed ? Math.abs(e) : e),
517
- seriesSource: e.series,
518
- signedSeries: e.series.map((e) => e >= 0 ? 1 : -1),
519
- absoluteIndex: t,
520
- id: n,
521
- color: r
522
- };
523
- })), mr = b(() => G.value.filter((e) => !I.value.includes(e.id) && !e.standalone)), hr = b(() => G.value.filter((e) => !I.value.includes(e.id) && e.standalone)), K = b(() => {
524
- let e = Math.max(...G.value.filter((e) => !I.value.includes(e.id)).map((e) => e.series.length));
525
- return isFinite(e) ? e : Math.max(...G.value.map((e) => e.series.length));
526
- });
527
- function gr(e) {
528
- Fn.value = e;
529
- }
530
- let q = O({
531
- start: 0,
532
- end: Math.max(...zn.value.map((e) => e.series.length))
533
- }), J = O({
534
- start: 0,
535
- end: Math.max(...zn.value.map((e) => e.series.length))
536
- });
537
- function _r(e) {
538
- return (q.value.start ?? 0) + (e ?? 0);
539
- }
540
- let vr = b(() => R.value.style.chart.zoom.preview.enable && (J.value.start !== q.value.start || J.value.end !== q.value.end));
541
- function yr(e, t) {
542
- J.value[e] = t;
543
- }
544
- function br() {
545
- let e = K.value, t = Math.max(0, Math.min(q.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(q.value.end ?? e, e));
546
- (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), q.value.start = t, q.value.end = n, J.value.start = t, J.value.end = n, on.value && (on.value.setStartValue(t), on.value.setEndValue(n));
547
- }
548
- let xr = O(null);
549
- function Sr() {
550
- return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
551
- }
552
- Ke(() => {
553
- xr.value && cancelAnimationFrame(xr.value);
554
- });
555
- async function Cr({ force: e = !1 } = {}) {
556
- if (R.value.style.chart.zoom.keepState && !e && Xr.value && !(q.value.start === 0 && q.value.end === 0)) {
557
- br();
558
- return;
559
- }
560
- Qr(), await Ue(), xr.value && cancelAnimationFrame(xr.value), xr.value = requestAnimationFrame(async () => {
561
- await Sr(), Qr();
562
- });
563
- }
564
- let wr = b(() => Math.max(0, W.value.width / (q.value.end - q.value.start))), Tr = b(() => n(mr.value.map((e) => ({
565
- ...e,
566
- series: e.series.map((e) => e ?? 0)
567
- }))).slice(q.value.start, q.value.end)), Er = b(() => I.value.length === G.value.length), Dr = b(() => {
568
- if (!R.value.style.chart.zoom.minimap.show) return [];
569
- let e = G.value.filter((e) => Er.value ? !0 : !I.value.includes(e.id) && !e.standalone);
570
- if (e.length) return n(e.map((e) => ({
571
- ...e,
572
- series: (e.series || []).map((e) => e ?? 0)
573
- })));
574
- let t = hr.value;
575
- if (!t.length) return [];
576
- let r = Math.max(...t.map((e) => e.series.length || 0));
577
- return Array.from({ length: r }, (e, n) => t.reduce((e, t) => e + Math.abs(t.series[n] ?? 0), 0));
578
- }), Or = b(() => {
579
- if (!R.value.style.chart.zoom.minimap.show) return [];
580
- let e = G.value.filter((e) => Er.value ? !0 : !I.value.includes(e.id) && !e.standalone), t = hr.value, n = e.length ? [{
581
- name: "",
582
- series: Dr.value,
583
- color: "#000000",
584
- isVisible: !0
585
- }] : [], r = t.map((e) => ({
586
- name: e.name || "",
587
- series: (e.series || []).map((e) => e ?? 0),
588
- color: e.color,
589
- isVisible: !0
590
- }));
591
- return n.concat(r);
592
- }), kr = b(() => n(mr.value.filter((e) => !I.value.includes(e.id)).map((e) => ({
593
- ...e,
594
- series: e.series.map((t, n) => {
595
- let r = t ?? 0;
596
- return e.signedSeries[n] === -1 && r >= 0 ? -r : r;
597
- })
598
- }))).slice(q.value.start, q.value.end)), Ar = b(() => {
599
- let e = mr.value.filter((e) => !I.value.includes(e.id));
600
- return {
601
- positive: n(e.map((e) => ({
602
- ...e,
603
- series: e.series.slice(q.value.start, q.value.end).map((e) => (e ?? 0) >= 0 ? e ?? 0 : 0)
604
- }))),
605
- negative: n(e.map((e) => ({
606
- ...e,
607
- series: e.series.slice(q.value.start, q.value.end).map((e) => (e ?? 0) < 0 ? e ?? 0 : 0)
608
- })))
609
- };
610
- }), jr = b(() => {
611
- let e = Math.max(0, q.value.end - q.value.start), t = Array(e).fill(0), n = Array(e).fill(0);
612
- return hr.value.forEach((r) => {
613
- for (let i = 0; i < e; i += 1) {
614
- let e = r.series[q.value.start + i] ?? 0;
615
- e > 0 && (t[i] = Math.max(t[i], e)), e < 0 && (n[i] = Math.min(n[i], e));
616
- }
617
- }), {
618
- positive: t,
619
- negative: n
620
- };
621
- }), Mr = b(() => kr.value.map((e, t) => ({
622
- value: e,
623
- sign: e >= 0 ? 1 : -1
624
- })));
625
- function Nr() {
626
- return { y0: Fr.value?.[0]?.zero ?? W.value.bottom };
627
- }
628
- function Pr(e) {
629
- let { y0: t } = Nr(), n = R.value.style.chart.lines.totalValues, r = Math.max(2, n.fontSize * 1.3 + n.offsetY), i = (e) => Math.min(Math.max(e, W.value.top - R.value.style.chart.lines.totalValues.fontSize * 1.3), W.value.bottom + R.value.style.chart.lines.totalValues.fontSize * 2);
630
- if ((Mr.value?.[e]?.value ?? 0) >= 0 || R.value.style.chart.lines.distributed) {
631
- let n = Infinity;
632
- for (let t of Y.value || []) {
633
- let r = t?.series?.[e], i = t?.topY?.[e];
634
- (r ?? 0) > 0 && Number.isFinite(i) && i < n && (n = i);
635
- }
636
- return i((Number.isFinite(n) ? n : t) - r - R.value.style.chart.lines.totalValues.offsetY);
637
- } else {
638
- let a = -Infinity;
639
- for (let t of Y.value || []) {
640
- let n = t?.series?.[e], r = t?.topY?.[e];
641
- (n ?? 0) < 0 && Number.isFinite(r) && r > a && (a = r);
642
- }
643
- return i((Number.isFinite(a) ? a : t) + r + n.fontSize * .7 + R.value.style.chart.lines.totalValues.offsetY);
644
- }
645
- }
646
- let Fr = b(() => {
647
- let e = Math.max(...Ar.value.positive, 0), t = Math.min(...Ar.value.negative, 0), n = Math.max(...jr.value.positive, 0), r = Math.min(...jr.value.negative, 0), i = Math.max(e, n), a = Math.min(t, r), o = [
648
- -Infinity,
649
- Infinity,
650
- NaN,
651
- void 0,
652
- null
653
- ].includes(a) ? 0 : a, s = R.value.style.chart.grid.scale.scaleMin, c = R.value.style.chart.grid.scale.scaleMax, l = !R.value.style.chart.lines.distributed && (s !== null || c !== null), u = s !== null && !R.value.style.chart.lines.distributed ? s : o > 0 ? 0 : o, d = c !== null && !R.value.style.chart.lines.distributed ? c : i < 0 ? 0 : i, f = l ? h(u, d, R.value.style.chart.grid.scale.ticks) : g(u, d, R.value.style.chart.grid.scale.ticks), p = Math.abs(Number(f.min) || 0), m = (Number(f.max) || 0) + p, _ = m === 0 || !Number.isFinite(m) ? 1 : m, ee = Array.isArray(f.ticks) && f.ticks.length ? f.ticks : [0], v = W.value.bottom - W.value.height * (p / _);
654
- return ee.map((e) => {
655
- let t = Number(e) || 0;
656
- return {
657
- zero: v,
658
- y: W.value.bottom - W.value.height * ((t + p) / _),
659
- x: X.value.left - 8,
660
- value: t
661
- };
662
- });
663
- }), Ir = O([]), Lr = O([]), Rr = 0;
664
- et(() => {
665
- let e = ++Rr;
666
- (async () => {
667
- let t = await me({
668
- values: R.value.style.chart.grid.x.timeLabels.values,
669
- maxDatapoints: K.value,
670
- formatter: R.value.style.chart.grid.x.timeLabels.datetimeFormatter,
671
- start: q.value.start,
672
- end: q.value.end
673
- });
674
- e === Rr && (Ir.value = t);
675
- })();
676
- });
677
- let zr = 0;
678
- et(() => {
679
- let e = ++zr;
680
- (async () => {
681
- let t = await me({
682
- values: R.value.style.chart.grid.x.timeLabels.values,
683
- maxDatapoints: K.value,
684
- formatter: R.value.style.chart.grid.x.timeLabels.datetimeFormatter,
685
- start: 0,
686
- end: K.value
687
- });
688
- e === zr && (Lr.value = t);
689
- })();
690
- });
691
- let Br = b(() => {
692
- let e = R.value.style.chart.grid.x.timeLabels.modulo;
693
- return Ir.value.length ? Math.min(e, [...new Set(Ir.value.map((e) => e.text))].length) : e;
694
- }), Vr = b(() => {
695
- let e = R.value.style.chart.grid.x.timeLabels, t = Ir.value || [], n = Lr.value || [], r = q.value.start ?? 0, i = $.value, a = K.value, o = t.map((e) => e?.text ?? ""), s = n.map((e) => e?.text ?? "");
696
- return ae(!!e.showOnlyFirstAndLast, !!e.showOnlyAtModulo, Math.max(1, Br.value || 1), o, s, r, i, a);
697
- });
698
- et(() => {
699
- R.value.style.chart.grid.x.timeLabels.show, R.value.style.chart.grid.x.timeLabels.fontSize, R.value.style.chart.grid.x.timeLabels.rotation, R.value.style.chart.grid.x.timeLabels.offsetY, (Vr.value || []).map((e) => e?.text ?? "").join("|"), U.value.width, U.value.height, Cn.value, bn.value, dr();
700
- }, { flush: "post" });
701
- let Hr = O({
702
- months: [],
703
- shortMonths: [],
704
- days: [],
705
- shortDays: []
706
- }), Ur = 0;
707
- et(() => {
708
- let e = ++Ur, t = R.value.style.chart.grid.x.timeLabels.datetimeFormatter;
709
- (async () => {
710
- let n = await pe(t.locale).catch(() => pe("en"));
711
- e === Ur && (Hr.value = n.data);
712
- })();
713
- });
714
- let Wr = b(() => {
715
- let e = R.value.style.chart.grid.x.timeLabels.datetimeFormatter, t = fe({
716
- useUTC: e.useUTC,
717
- locale: Hr.value,
718
- januaryAsYear: e.januaryAsYear
719
- });
720
- return (e, n) => {
721
- let r = R.value.style.chart.grid.x.timeLabels.values?.[e];
722
- return r == null ? "" : t.formatDate(new Date(r), n);
723
- };
724
- }), Gr = b(() => (R.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
725
- text: Wr.value(t, R.value.style.chart.zoom.timeFormat),
726
- absoluteIndex: t
727
- }))), Kr = b(() => (R.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
728
- text: Wr.value(t, R.value.style.chart.tooltip.timeFormat),
729
- absoluteIndex: t
730
- }))), qr = b(() => {
731
- if (!en.value && !B.value) return [];
732
- let e = W.value.height, t = Fr.value[0] ? Fr.value[0].zero : W.value.bottom, n = q.value.start ?? 0, r = q.value.end ?? 0, i = Math.max(1, r - n), a = Math.max(...Ar.value.positive, 0), o = Math.min(...Ar.value.negative, 0), s = Math.max(...jr.value.positive, 0), c = Math.min(...jr.value.negative, 0), l = Math.max(a, s), u = Math.min(o, c), { min: d, max: f } = !R.value.style.chart.lines.distributed && (R.value.style.chart.grid.scale.scaleMax !== null || R.value.style.chart.grid.scale.scaleMin !== null) ? h(R.value.style.chart.grid.scale.scaleMin === null ? u > 0 ? 0 : u : R.value.style.chart.grid.scale.scaleMin, R.value.style.chart.grid.scale.scaleMax === null ? l < 0 ? 0 : l : R.value.style.chart.grid.scale.scaleMax, R.value.style.chart.grid.scale.ticks) : g(R.value.style.chart.grid.scale.scaleMin === null ? u > 0 ? 0 : u : R.value.style.chart.grid.scale.scaleMin, R.value.style.chart.grid.scale.scaleMax === null ? l < 0 ? 0 : l : R.value.style.chart.grid.scale.scaleMax, R.value.style.chart.grid.scale.ticks), p = f + (d >= 0 ? 0 : Math.abs(d)) || 1, m = Array(i).fill(0), _ = Array(i).fill(0), ee = (e) => i <= 1 ? W.value.left + W.value.width / 2 : W.value.left + e / (i - 1) * W.value.width;
733
- return G.value.filter((e) => !I.value.includes(e.id)).map((r) => {
734
- let a = [], o = [], s = [], c = Array(i).fill(null), l = Array(i).fill(null);
735
- for (let u = 0; u < i; u += 1) {
736
- let i = n + u, d = r.series?.[i], f = r.signedSeries?.[i], h = d == null || Number.isNaN(d) ? 0 : d, g = r.standalone ? h / p : R.value.style.chart.lines.distributed ? h / (Tr.value[u] || 1) : h / p;
737
- if (h >= 0) {
738
- let n = e * Math.abs(g);
739
- if (r.standalone) c[u] = t, l[u] = t - n;
740
- else {
741
- let e = m[u], r = e + n;
742
- c[u] = t - e, l[u] = t - r, m[u] = r;
743
- }
744
- } else {
745
- let n = e * Math.abs(g);
746
- if (r.standalone) c[u] = t, l[u] = t + n;
747
- else {
748
- let e = _[u], r = e + n;
749
- c[u] = t + e, l[u] = t + r, _[u] = r;
750
- }
751
- }
752
- a.push(u), o.push(h), s.push(f ?? (h >= 0 ? 1 : -1));
753
- }
754
- let u = a.map((e) => ({
755
- x: ee(e),
756
- y: l[e]
757
- })), d = u.map((e) => e.x), f = o.reduce((e, t) => e + Math.abs(t || 0), 0), h = f === 0 ? 1 : f, g = o.map((e, t) => {
758
- if (R.value.style.chart.lines.distributed && !r.standalone) {
759
- let n = a[t], r = Tr.value[n] || 1;
760
- return (e || 0) / r;
761
- }
762
- return (e || 0) / h;
763
- });
764
- return {
765
- ...r,
766
- x: d,
767
- points: u,
768
- baseY: a.map((e) => c[e]),
769
- topY: a.map((e) => l[e]),
770
- series: o,
771
- signedSeries: s,
772
- proportions: g,
773
- rel: a,
774
- fullSeries: Array.isArray(r.fullSeries) ? r.fullSeries : r.series
775
- };
776
- });
777
- }), Y = b(() => {
778
- let e = (e) => typeof e == "string" ? e.replace(/^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i, "").trim() : "", t = Math.max(...Ar.value.positive, 0), n = Math.min(...Ar.value.negative, 0), r = Math.max(...jr.value.positive, 0), i = Math.min(...jr.value.negative, 0), o = Math.max(t, r), s = Math.min(n, i), c = !R.value.style.chart.lines.distributed && (R.value.style.chart.grid.scale.scaleMax !== null || R.value.style.chart.grid.scale.scaleMin !== null) ? h(R.value.style.chart.grid.scale.scaleMin === null ? s > 0 ? 0 : s : R.value.style.chart.grid.scale.scaleMin, R.value.style.chart.grid.scale.scaleMax === null ? o < 0 ? 0 : o : R.value.style.chart.grid.scale.scaleMax, R.value.style.chart.grid.scale.ticks) : g(R.value.style.chart.grid.scale.scaleMin === null ? s > 0 ? 0 : s : R.value.style.chart.grid.scale.scaleMin, R.value.style.chart.grid.scale.scaleMax === null ? o < 0 ? 0 : o : R.value.style.chart.grid.scale.scaleMax, R.value.style.chart.grid.scale.ticks), l = Number(c.min) || 0, u = Number(c.max) || 0, d = Math.abs(l), f = u + d || 1, p = (e) => {
779
- if (R.value.style.chart.lines.distributed) {
780
- let t = Math.max(0, Math.min(1, e));
781
- return minimapH - minimapH * t;
782
- }
783
- return clampY(minimapH - minimapH * (((e ?? 0) + d) / f));
784
- };
785
- return qr.value.map((t) => {
786
- let n = t.x.length, r = Array.isArray(t.fullSeries) ? t.fullSeries : t.series, i = ({ left: e = 0, unitW: t }) => {
787
- let n = r.length;
788
- return !Number.isFinite(t) || t <= 0 || n <= 0 ? [] : n === 1 ? [e + t * .5] : r.map((n, r) => e + r * t);
789
- }, o = ({ minimapH: e }) => !Number.isFinite(e) || e <= 0 ? [] : r.map((t) => p(t || 0, e)), s = ({ minimapH: e }) => {
790
- if (!Number.isFinite(e) || e <= 0) return [];
791
- let t = p(0, e);
792
- return r.map(() => t);
793
- };
794
- if (n === 0) return {
795
- ...t,
796
- points: [],
797
- smoothPath: "",
798
- straightPath: "",
799
- smoothArea: "",
800
- straightArea: "",
801
- xMinimap: i,
802
- yMinimap: o,
803
- yMinimapBase: s
804
- };
805
- let c = t.x.map((e, n) => ({
806
- x: e,
807
- y: t.topY[n]
808
- })), l = t.x.map((e, n) => ({
809
- x: e,
810
- y: t.baseY[n]
811
- })), u = n >= 2 ? v(c) : `M${c[0].x},${c[0].y}`, d = n >= 2 ? a(c) : `M${c[0].x},${c[0].y}`, f = n >= 2 ? `M${e(u)}` : u, m = n >= 2 ? `M${e(d)}` : d, h = "", g = "";
812
- if (R.value.style.chart.lines.useArea && n >= 2) {
813
- let t = v([...l].reverse()), n = a([...l].reverse()), r = l[l.length - 1];
814
- h = `M${c[0].x},${c[0].y} ${e(u)} L${r.x},${r.y} ${e(t)} Z`, g = `M${c[0].x},${c[0].y} ${e(d)} L${r.x},${r.y} ${e(n)} Z`;
815
- }
816
- return {
817
- ...t,
818
- points: c,
819
- smoothPath: f,
820
- straightPath: m,
821
- smoothArea: h,
822
- straightArea: g,
823
- xMinimap: i,
824
- yMinimap: o,
825
- yMinimapBase: s
826
- };
827
- });
828
- }), Jr = b(() => $.value === null || $.value === void 0 ? null : {
829
- timeLabel: fi($.value),
830
- absoluteIndex: $.value + q.value.start,
831
- seriesIndex: $.value,
832
- datapoint: di.value,
833
- series: Y.value,
834
- config: R.value
835
- }), Yr = O(!1), Xr = O(!1);
836
- function Zr(e) {
837
- let t = K.value;
838
- return e > t ? t : e < 0 || e < q.value.start ? R.value.style.chart.zoom.startIndex === null ? 1 : q.value.start + 1 : e;
839
- }
840
- function Qr() {
841
- if (!Yr.value) {
842
- Yr.value = !0;
843
- try {
844
- let { startIndex: e, endIndex: t, keepState: n } = R.value.style.chart.zoom, r = n ? Math.max(0, K.value) : K.value;
845
- if (n && r <= 0) return;
846
- let i = e ?? 0, a = t == null ? r : Math.min(Zr(t + 1), r);
847
- ti.value = !0, q.value.start = i, q.value.end = a, J.value.start = i, J.value.end = a, br(), Xr.value = !0;
848
- } finally {
849
- queueMicrotask(() => {
850
- ti.value = !1;
851
- }), Yr.value = !1;
852
- }
853
- }
854
- }
855
- function $r(e) {
856
- Yr.value || ti.value || e !== q.value.start && (q.value.start = e, J.value.start = e, br());
857
- }
858
- function ei(e) {
859
- if (Yr.value || ti.value) return;
860
- let t = Zr(e);
861
- t !== q.value.end && (q.value.end = t, J.value.end = t, br());
862
- }
863
- let X = b(() => ({
864
- left: W.value.left,
865
- right: W.value.right,
866
- width: W.value.width
867
- })), ti = O(!1);
868
- Ce({
869
- timeLabelsEls: Cn,
870
- timeLabels: Ir,
871
- slicer: q,
872
- configRef: R,
873
- rotationPath: [
874
- "style",
875
- "chart",
876
- "grid",
877
- "x",
878
- "timeLabels",
879
- "rotation"
880
- ],
881
- autoRotatePath: [
882
- "style",
883
- "chart",
884
- "grid",
885
- "x",
886
- "timeLabels",
887
- "autoRotate",
888
- "enable"
889
- ],
890
- isAutoSize: !1,
891
- width: b(() => U.value.width),
892
- height: b(() => U.value.height),
893
- rotation: R.value.style.chart.grid.x.timeLabels.autoRotate.angle
894
- });
895
- let ni = O(null);
896
- function ri(e) {
897
- let t = V.value;
898
- if (!t) return null;
899
- if (t.createSVGPoint && t.getScreenCTM) {
900
- let n = t.createSVGPoint();
901
- n.x = e.clientX, n.y = e.clientY;
902
- let r = t.getScreenCTM();
903
- if (r) {
904
- let e = n.matrixTransform(r.inverse());
905
- return {
906
- x: e.x,
907
- y: e.y,
908
- ok: !0
909
- };
910
- }
911
- }
912
- let n = t.getBoundingClientRect(), r = t.viewBox?.baseVal || {
913
- x: 0,
914
- y: 0,
915
- width: n.width,
916
- height: n.height
917
- }, i = Math.min(n.width / r.width, n.height / r.height), a = r.width * i, o = r.height * i, s = (n.width - a) / 2, c = (n.height - o) / 2;
918
- return {
919
- x: (e.clientX - n.left - s) / i + r.x,
920
- y: (e.clientY - n.top - c) / i + r.y,
921
- ok: !0
922
- };
923
- }
924
- let ii = 0, Z = b(() => Math.max(1, q.value.end - q.value.start)), ai = b(() => Z.value > 1 ? W.value.width / (Z.value - 1) : 0);
925
- function Q(e) {
926
- return Z.value <= 1 ? W.value.left + W.value.width / 2 : W.value.left + e * ai.value;
927
- }
928
- function oi(e) {
929
- if (Z.value <= 1) return {
930
- x: W.value.left,
931
- width: W.value.width
932
- };
933
- let t = e === 0 ? W.value.left : (Q(e - 1) + Q(e)) / 2, n = e === Z.value - 1 ? W.value.left + W.value.width : (Q(e) + Q(e + 1)) / 2;
934
- return {
935
- x: t,
936
- width: Math.max(0, n - t)
937
- };
938
- }
939
- function si(e) {
940
- In.value || (ii && cancelAnimationFrame(ii), ii = requestAnimationFrame(() => {
941
- ii = 0;
942
- let t = ri(e);
943
- if (!t || !V.value) {
944
- ui();
945
- return;
946
- }
947
- let { left: n, right: r, top: i, bottom: a } = W.value;
948
- if (t.x < n || t.x > r || t.y < i || t.y > a) {
949
- ui();
950
- return;
951
- }
952
- let o = 0;
953
- if (Z.value > 1) {
954
- let e = (t.x - n) / ai.value;
955
- o = Math.round(e);
956
- } else o = 0;
957
- o < 0 && (o = 0), o > Z.value - 1 && (o = Z.value - 1), ni.value !== o && (ni.value = o, mi(!0, o));
958
- }));
959
- }
960
- function ci(e) {
961
- let t = ri(e);
962
- if (!t || !V.value) return;
963
- let { left: n, right: r, top: i, bottom: a } = W.value;
964
- if (t.x < n || t.x > r || t.y < i || t.y > a) return;
965
- let o = 0;
966
- if (Z.value > 1) {
967
- let e = (t.x - n) / ai.value;
968
- o = Math.round(e);
969
- } else o = 0;
970
- o < 0 && (o = 0), o > Z.value - 1 && (o = Z.value - 1), qi({
971
- seriesIndex: o,
972
- datapoint: zi(o)
973
- }), li(o);
974
- }
975
- function li(e) {
976
- let t = JSON.parse(JSON.stringify(Y.value)).map((t) => ({
977
- name: t.name,
978
- value: t.series[e] === 0 ? 0 : t.series[e] || null,
979
- proportion: t.proportions[e] || null,
980
- color: t.color,
981
- id: t.id
982
- }));
983
- R.value.events.datapointClick && R.value.events.datapointClick({
984
- datapoint: t,
985
- seriesIndex: e + q.value.start
986
- }), $t("selectDatapoint", {
987
- datapoint: t,
988
- period: Ir.value[e]
989
- });
990
- }
991
- $e(() => [
992
- q.value.start,
993
- q.value.end,
994
- Y.value.length
995
- ], () => {
996
- let e = Z.value;
997
- if ($.value != null) {
998
- if (e <= 0) {
999
- $.value = null;
1000
- return;
1001
- }
1002
- $.value < 0 && ($.value = 0), $.value > e - 1 && ($.value = e - 1);
1003
- }
1004
- });
1005
- function ui() {
1006
- ii &&= (cancelAnimationFrame(ii), 0), ni.value = null, mi(!1, null);
1007
- }
1008
- let $ = O(null), di = b(() => {
1009
- let e = $.value, t = e == null ? null : _r(e);
1010
- return Y.value.map((n) => ({
1011
- slotAbsoluteIndex: n.absoluteIndex,
1012
- shape: n.shape || "circle",
1013
- name: n.name,
1014
- color: n.color,
1015
- value: e == null ? null : n.series.find((t, n) => n === e),
1016
- sourceValue: t == null ? null : n.seriesSource?.[t],
1017
- comments: n.comments || [],
1018
- id: n.id,
1019
- standalone: !!n.standalone
1020
- }));
1021
- });
1022
- function fi(e) {
1023
- if (e == null || !R.value.style.chart.tooltip.showTimeLabel) return null;
1024
- let t = Ir.value?.[e]?.text || null, n = Kr.value?.[e]?.text || null, r = Lr.value?.[e]?.text || null;
1025
- return R.value.style.chart.tooltip.useDefaultTimeFormat ? t : n || r;
1026
- }
1027
- let pi = b(() => {
1028
- let e = R.value.style.chart.tooltip.customFormat, n = [...di.value].reverse(), i = n.filter((e) => !e.standalone), a = n.filter((e) => e.standalone), o = i.map((e) => e.value).filter((e) => te(e) && e !== null).reduce((e, t) => Math.abs(e) + Math.abs(t), 0);
1029
- if (ie(e) && ne(() => e({
1030
- absoluteIndex: $.value + q.value.start,
1031
- seriesIndex: $.value,
1032
- datapoint: di.value,
1033
- series: G.value,
1034
- config: R.value
1035
- }))) return e({
1036
- absoluteIndex: $.value + q.value.start,
1037
- seriesIndex: $.value,
1038
- datapoint: di.value,
1039
- series: G.value,
1040
- config: R.value
1041
- });
1042
- let { showValue: s, showTotal: c, totalTranslation: u, showPercentage: d, borderColor: f, roundingValue: p, roundingPercentage: h } = R.value.style.chart.tooltip, g = (e) => !e.shape || ![
1043
- "star",
1044
- "triangle",
1045
- "square",
1046
- "diamond",
1047
- "pentagon",
1048
- "hexagon"
1049
- ].includes(e.shape) ? `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${R.value.style.chart.tooltip.backgroundColor}" stroke-width="1" fill="${e.color}" /></svg>` : e.shape === "star" ? `<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><polygon stroke="${R.value.style.chart.tooltip.backgroundColor}" stroke-width="1" fill="${e.color}" points="${l({
1050
- plot: {
1051
- x: 6,
1052
- y: 6
1053
- },
1054
- radius: 5
1055
- })}" /></svg>` : e.shape === "triangle" ? `<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${t({
1056
- plot: {
1057
- x: 6,
1058
- y: 6
1059
- },
1060
- radius: 6,
1061
- sides: 3,
1062
- rotation: .52
1063
- }).path}" fill="${e.color}" stroke="${R.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : e.shape === "square" ? `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${t({
1064
- plot: {
1065
- x: 6,
1066
- y: 6
1067
- },
1068
- radius: 6,
1069
- sides: 4,
1070
- rotation: .8
1071
- }).path}" fill="${e.color}" stroke="${R.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : e.shape === "diamond" ? `<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${t({
1072
- plot: {
1073
- x: 6,
1074
- y: 6
1075
- },
1076
- radius: 5,
1077
- sides: 4,
1078
- rotation: 0
1079
- }).path}" fill="${e.color}" stroke="${R.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : e.shape === "pentagon" ? `<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${t({
1080
- plot: {
1081
- x: 6,
1082
- y: 6
1083
- },
1084
- radius: 5,
1085
- sides: 5,
1086
- rotation: .95
1087
- }).path}" fill="${e.color}" stroke="${R.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : `<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${t({
1088
- plot: {
1089
- x: 6,
1090
- y: 6
1091
- },
1092
- radius: 5,
1093
- sides: 6,
1094
- rotation: 0
1095
- }).path}" fill="${e.color}" stroke="${R.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`, ee = (e, t) => {
1096
- let n = t ? r({
1097
- v: isNaN((e.value ?? 0) / (o || 1)) ? 0 : Math.abs(e.value ?? 0) / (o || 1) * 100,
1098
- s: "%",
1099
- r: h
1100
- }) : "", i = s && t ? "(" : "", a = s && t ? ")" : "";
1101
- return `
1102
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
1103
- <div style="width:20px;height:20px;display:flex;align-items:center;justify-content:center;">${g(e)}</div>
1104
- ${e.name}${s || t ? ":" : ""}
1105
- ${s ? _(R.value.style.chart.lines.dataLabels.formatter, e.sourceValue, r({
1106
- p: R.value.style.chart.lines.dataLabels.prefix,
1107
- v: e.sourceValue,
1108
- s: R.value.style.chart.lines.dataLabels.suffix,
1109
- r: p
1110
- }, { datapoint: e })) : ""} ${i}${n}${a}
1111
- </div>
1112
- `;
1113
- }, v = "", re = fi($.value);
1114
- return re && (v += `<div style="width:100%;text-align:center;border-bottom:1px solid ${f};padding-bottom:6px;margin-bottom:3px;">${re}</div>`), c && i.length > 1 && (v += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
1115
- <span>${u}:</span>
1116
- <span>${_(R.value.style.chart.lines.dataLabels.formatter, m(o), r({
1117
- p: R.value.style.chart.lines.dataLabels.prefix,
1118
- v: m(o),
1119
- s: R.value.style.chart.lines.dataLabels.suffix,
1120
- r: p
1121
- }), { datapoint: {
1122
- name: u,
1123
- value: m(o)
1124
- } })}</span>
1125
- </div>`), i.forEach((e) => {
1126
- v += ee(e, d);
1127
- }), a.length && (v += `<div style="border-top:1px solid ${mr.value.length ? f : "transparent"}; margin:${mr.value.length ? "6px 0" : "0"};"></div>`, a.forEach((e) => {
1128
- v += ee(e, !1);
1129
- })), `<div>${v}</div>`;
1130
- });
1131
- function mi(e, t = null, n = "pointer") {
1132
- if (Er.value) return;
1133
- An.value = n, tn.value = e;
1134
- let r = Y.value.map((e) => ({
1135
- name: e.name,
1136
- value: [
1137
- null,
1138
- void 0,
1139
- NaN
1140
- ].includes(e.series[t]) ? null : e.series[t],
1141
- color: e.color
1142
- }));
1143
- e ? (L.value = t, $.value = t, qi({
1144
- seriesIndex: t,
1145
- datapoint: r
1146
- }), R.value.events.datapointEnter && R.value.events.datapointEnter({
1147
- datapoint: r,
1148
- seriesIndex: t + q.value.start
1149
- })) : (L.value = null, $.value = null, $t("selectX", {
1150
- seriesIndex: null,
1151
- dataset: null,
1152
- indexLabel: null
1153
- }), R.value.events.datapointLeave && R.value.events.datapointLeave({
1154
- datapoint: r,
1155
- seriesIndex: t + q.value.start
1156
- }));
1157
- }
1158
- function hi(e, t) {
1159
- $t("selectTimeLabel", {
1160
- datapoint: JSON.parse(JSON.stringify(Y.value)).map((e) => ({
1161
- name: e.name,
1162
- value: e.series[t] === 0 ? 0 : (e.signedSeries[t] === -1 && e.series[t] >= 0 ? -e.series[t] : e.series[t]) || null,
1163
- proportion: e.proportions[t] || null,
1164
- color: e.color,
1165
- id: e.id
1166
- })),
1167
- absoluteIndex: e.absoluteIndex,
1168
- label: e.text
1169
- });
1170
- }
1171
- function gi() {
1172
- I.value.length ? I.value = [] : vi.value.forEach((e) => {
1173
- I.value.push(e.id);
1174
- });
1175
- }
1176
- function _i(e) {
1177
- if (I.value.includes(e.id)) I.value = I.value.filter((t) => t !== e.id);
1178
- else {
1179
- if (I.value.length === G.value.length - 1) return;
1180
- I.value.push(e.id);
1181
- }
1182
- $t("selectLegend", Y.value);
1183
- }
1184
- let vi = b(() => G.value.map((e) => ({
1185
- ...e,
1186
- opacity: I.value.includes(e.id) ? .5 : 1,
1187
- segregate: () => _i(e),
1188
- isSegregated: I.value.includes(e.id)
1189
- }))), yi = b(() => ({
1190
- cy: "stackline-legend",
1191
- backgroundColor: R.value.style.chart.legend.backgroundColor,
1192
- color: R.value.style.chart.legend.color,
1193
- fontSize: R.value.style.chart.legend.fontSize,
1194
- paddingBottom: 12,
1195
- fontWeight: R.value.style.chart.legend.bold ? "bold" : ""
1196
- }));
1197
- function bi(e) {
1198
- return G.value.length ? G.value.find((t) => t.name === e) || (R.value.debug && console.warn(`VueUiStackline - Series name not found "${e}"`), null) : (R.value.debug && console.warn("VueUiStackline - There are no series to show."), null);
1199
- }
1200
- function xi(e) {
1201
- let t = bi(e);
1202
- t !== null && I.value.includes(t.id) && _i({ id: t.id });
1203
- }
1204
- function Si(e) {
1205
- let t = bi(e);
1206
- t !== null && (I.value.includes(t.id) || _i({ id: t.id }));
1207
- }
1208
- let Ci = b(() => {
1209
- if (Y.value.length === 0) return {
1210
- head: [],
1211
- body: [],
1212
- config: {},
1213
- columnNames: []
1214
- };
1215
- let e = Y.value.map(({ name: e, color: t }) => ({
1216
- label: e,
1217
- color: t
1218
- })), t = [];
1219
- return Vr.value.forEach((e) => {
1220
- let n = e.absoluteIndex, r = [R.value.style.chart.grid.x.timeLabels.values?.[n] ? e.text : n + 1];
1221
- G.value.forEach((e) => {
1222
- let t = e.series?.[n], i = Number((t ?? 0).toFixed(R.value.table.td.roundingValue));
1223
- r.push(i);
1224
- }), t.push(r);
1225
- }), {
1226
- head: e,
1227
- body: t
1228
- };
1229
- });
1230
- function wi(e = null) {
1231
- let t = [
1232
- [R.value.style.chart.title.text],
1233
- [R.value.style.chart.title.subtitle.text],
1234
- [""]
1235
- ], n = ["", ...Ci.value.head.map((e) => e.label)], r = Ci.value.body, i = u(t.concat([n]).concat(r));
1236
- e ? e(i) : s({
1237
- csvContent: i,
1238
- title: R.value.style.chart.title.text || "vue-ui-stackline"
1239
- });
1240
- }
1241
- let Ti = b(() => {
1242
- let e = [""].concat(Y.value.map((e) => e.name), " <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>"), t = [], n = Math.max(0, q.value.end - q.value.start);
1243
- for (let e = 0; e < n; e += 1) {
1244
- let n = _r(e), r = R.value.style.chart.grid.x.timeLabels.values?.[n] ? Ir.value?.[e]?.text ?? n + 1 : n + 1, i = Y.value.map((t) => {
1245
- let n = t.series?.[e] ?? 0;
1246
- return Number(n.toFixed(R.value.table.td.roundingValue));
1247
- }), a = Y.value.filter((e) => !e.standalone).map((t) => t.series?.[e] ?? 0).reduce((e, t) => e + t, 0);
1248
- t.push([r].concat(i, Number(a.toFixed(R.value.table.td.roundingValue))));
1249
- }
1250
- return {
1251
- head: e,
1252
- body: t,
1253
- config: {
1254
- th: {
1255
- backgroundColor: R.value.table.th.backgroundColor,
1256
- color: R.value.table.th.color,
1257
- outline: R.value.table.th.outline
1258
- },
1259
- td: {
1260
- backgroundColor: R.value.table.td.backgroundColor,
1261
- color: R.value.table.td.color,
1262
- outline: R.value.table.td.outline
1263
- },
1264
- breakpoint: R.value.table.responsiveBreakpoint
1265
- },
1266
- colNames: [R.value.table.columnNames.period].concat(Y.value.map((e) => e.name), R.value.table.columnNames.total)
1267
- };
1268
- }), Ei = b(() => R.value.style.chart.backgroundColor), Di = b(() => R.value.style.chart.legend), { exportSvg: Oi, getSvg: ki } = ye({
1269
- svg: V,
1270
- title: b(() => R.value.style.chart.title),
1271
- legend: Di,
1272
- legendItems: vi,
1273
- backgroundColor: Ei
1274
- });
1275
- async function Ai({ isCb: e }) {
1276
- yn.value = !0, await Ue();
1277
- try {
1278
- if (e) {
1279
- let { blob: e, url: t, text: n, dataUrl: r } = await ki();
1280
- await Promise.resolve(R.value.userOptions.callbacks.svg({
1281
- blob: e,
1282
- url: t,
1283
- text: n,
1284
- dataUrl: r
1285
- }));
1286
- } else await Promise.resolve(Oi());
1287
- } finally {
1288
- yn.value = !1;
1289
- }
1290
- }
1291
- async function ji({ scale: e = 2 } = {}) {
1292
- if (!P.value) return;
1293
- let { width: t, height: n } = P.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await we({
1294
- domElement: P.value,
1295
- base64: !0,
1296
- img: !0,
1297
- scale: e
1298
- });
1299
- return {
1300
- imageUri: i,
1301
- base64: a,
1302
- title: R.value.style.chart.title.text,
1303
- width: t,
1304
- height: n,
1305
- aspectRatio: r
1306
- };
1307
- }
1308
- let Mi = b(() => {
1309
- let e = R.value.table.useDialog && !R.value.table.show, t = H.value.showTable;
1310
- return {
1311
- component: e ? Jt : Ut,
1312
- title: `${R.value.style.chart.title.text}${R.value.style.chart.title.subtitle.text ? `: ${R.value.style.chart.title.subtitle.text}` : ""}`,
1313
- props: e ? {
1314
- backgroundColor: R.value.table.th.backgroundColor,
1315
- color: R.value.table.th.color,
1316
- headerColor: R.value.table.th.color,
1317
- headerBg: R.value.table.th.backgroundColor,
1318
- isFullscreen: ln.value,
1319
- fullscreenParent: P.value,
1320
- forcedWidth: Math.min(800, window.innerWidth * .8),
1321
- isCursorPointer: z.value
1322
- } : {
1323
- hideDetails: !0,
1324
- config: {
1325
- open: t,
1326
- maxHeight: 1e4,
1327
- body: {
1328
- backgroundColor: R.value.style.chart.backgroundColor,
1329
- color: R.value.style.chart.color
1330
- },
1331
- head: {
1332
- backgroundColor: R.value.style.chart.backgroundColor,
1333
- color: R.value.style.chart.color
1334
- }
1335
- }
1336
- }
1337
- };
1338
- });
1339
- $e(() => H.value.showTable, (e) => {
1340
- R.value.table.show || (e && R.value.table.useDialog && hn.value ? hn.value.open() : "close" in hn.value && hn.value.close());
1341
- });
1342
- function Ni() {
1343
- H.value.showTable = !1, gn.value && gn.value.setTableIconState(!1);
1344
- }
1345
- function Pi(e) {
1346
- ln.value = e, nn.value += 1;
1347
- }
1348
- function Fi() {
1349
- H.value.showTable = !H.value.showTable;
1350
- }
1351
- function Ii() {
1352
- H.value.dataLabels.show = !H.value.dataLabels.show;
1353
- }
1354
- function Li() {
1355
- H.value.showTooltip = !H.value.showTooltip;
1356
- }
1357
- function Ri() {
1358
- return Y.value;
1359
- }
1360
- function zi(e) {
1361
- let t = e ?? 0, n = _r(t);
1362
- return JSON.parse(JSON.stringify(Y.value)).map((e) => {
1363
- let r = e.series[t], i = e.signedSeries?.[t], a = r === 0 ? 0 : (i === -1 && r >= 0 ? -r : r) || null;
1364
- return {
1365
- name: e.name,
1366
- absoluteIndex: e.absoluteIndex,
1367
- value: a,
1368
- proportion: e.proportions?.[t] || null,
1369
- color: e.color,
1370
- id: e.id,
1371
- timeLabel: Lr.value?.[n] || null
1372
- };
1373
- });
1374
- }
1375
- let Bi = b(() => Array(K.value).fill(0).map((e, t) => zi(t)));
1376
- $e(() => N.selectedXIndex, (e) => {
1377
- if ([null, void 0].includes(N.selectedXIndex)) {
1378
- $.value = null;
1379
- return;
1380
- }
1381
- let t = e - q.value.start;
1382
- t < 0 || e >= q.value.end ? $.value = null : $.value = t ?? null;
1383
- }, { immediate: !0 });
1384
- let Vi = b(() => {
1385
- if (R.value.style.chart.lines.distributed) return {
1386
- min: -1,
1387
- max: 1
1388
- };
1389
- let e = mr.value, t = hr.value, n = Math.max(1, ...[...e, ...t].map((e) => e.series?.length || 0)), r = Array(n).fill(0), i = Array(n).fill(0);
1390
- e.forEach((e) => {
1391
- for (let t = 0; t < n; t += 1) {
1392
- let n = e.series[t] ?? 0;
1393
- n >= 0 ? r[t] += n : i[t] += n;
1394
- }
1395
- });
1396
- let a = Array(n).fill(0), o = Array(n).fill(0);
1397
- t.forEach((e) => {
1398
- for (let t = 0; t < n; t += 1) {
1399
- let n = e.series[t] ?? 0;
1400
- n > 0 && (a[t] = Math.max(a[t], n)), n < 0 && (o[t] = Math.min(o[t], n));
1401
- }
1402
- });
1403
- let s = Math.max(0, ...r, ...a), c = Math.min(0, ...i, ...o), l = R.value.style.chart.grid.scale.scaleMin, u = R.value.style.chart.grid.scale.scaleMax, d = R.value.style.chart.grid.scale.ticks, f = !R.value.style.chart.lines.distributed && (l !== null || u !== null) ? h(l === null ? c > 0 ? 0 : c : l, u === null ? s < 0 ? 0 : s : u, d) : g(l === null ? c > 0 ? 0 : c : l, u === null ? s < 0 ? 0 : s : u, d);
1404
- return {
1405
- min: Number(f.min) || 0,
1406
- max: Number(f.max) || 0
1407
- };
1408
- });
1409
- function Hi({ minimapH: e, unitW: t }) {
1410
- let n = (e) => typeof e == "string" ? e.replace(/^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i, "").trim() : "";
1411
- if (!Number.isFinite(e) || e <= 0 || !Number.isFinite(t) || t <= 0) return "";
1412
- let r = Y.value.filter((e) => !e.standalone), i = Y.value.filter((e) => e.standalone), o = Math.max(0, ...Y.value.map((e) => Array.isArray(e.fullSeries) ? e.fullSeries.length : e.series.length));
1413
- if (o <= 0) return "";
1414
- let s = o === 1 ? [t * .5] : Array.from({ length: o }, (e, n) => n * t);
1415
- if (R.value.style.chart.lines.distributed) {
1416
- let t = Array.from({ length: o }, (e, t) => {
1417
- let n = 0;
1418
- return r.forEach((e) => {
1419
- let r = (Array.isArray(e.fullSeries) ? e.fullSeries : e.series)?.[t];
1420
- r != null && !Number.isNaN(r) && (n += Math.abs(r));
1421
- }), n || 1;
1422
- }), c = (t) => e - e * Math.max(0, Math.min(1, t || 0)), l = [], u = Array(o).fill(0);
1423
- return r.forEach((e) => {
1424
- let r = Array.isArray(e.fullSeries) ? e.fullSeries : e.series, i = Array(o), d = Array(o);
1425
- for (let e = 0; e < o; e += 1) {
1426
- let n = r?.[e], a = n == null || Number.isNaN(n) ? 0 : Math.abs(n) / t[e];
1427
- d[e] = u[e], u[e] += a, i[e] = u[e];
1428
- }
1429
- let f = i.map(c), p = d.map(c), m = s.map((e, t) => ({
1430
- x: e,
1431
- y: f[t]
1432
- })), h = s.map((e, t) => ({
1433
- x: e,
1434
- y: p[t]
1435
- })), g = v(m), _ = v([...h].reverse()), ee = a(m), te = a([...h].reverse()), ne = h[h.length - 1];
1436
- if (R.value.style.chart.lines.useArea) {
1437
- let t = R.value.style.chart.lines.smooth ? `M${m[0].x},${m[0].y} ${n(g)} L${ne.x},${ne.y} ${n(_)} Z` : `M${m[0].x},${m[0].y} ${n(ee)} L${ne.x},${ne.y} ${n(te)} Z`;
1438
- l.push(`<path d="${t}"
1439
- fill="${Qt.pattern ? `url(#pattern_${F.value}_${e.absoluteIndex})` : (R.value.style.chart.lines.gradient.show, e.color)}"
1440
- opacity="${R.value.style.chart.lines.areaOpacity}"
1441
- stroke="none" />`);
1442
- }
1443
- let re = R.value.style.chart.lines.smooth ? `M${m[0].x},${m[0].y} ${n(g)}` : `M${m[0].x},${m[0].y} ${n(ee)}`;
1444
- l.push(`<path d="${re}"
1445
- fill="none"
1446
- stroke="${e.color}"
1447
- stroke-width="${R.value.style.chart.lines.strokeWidth}"
1448
- stroke-linecap="round" />`);
1449
- }), i.length && i.forEach((e) => {
1450
- let r = Array.isArray(e.fullSeries) ? e.fullSeries : e.series, i = Array.from({ length: o }, (e, n) => c(Math.abs(r?.[n] ?? 0) / t[n])), u = s.map((e, t) => ({
1451
- x: e,
1452
- y: i[t]
1453
- })), d = v(u), f = a(u), p = R.value.style.chart.lines.smooth ? `M${u[0].x},${u[0].y} ${n(d)}` : `M${u[0].x},${u[0].y} ${n(f)}`;
1454
- l.push(`<path d="${p}"
1455
- fill="none"
1456
- stroke="${e.color}"
1457
- stroke-width="${R.value.style.chart.lines.strokeWidth}"
1458
- stroke-linecap="round" />`);
1459
- }), l.join("");
1460
- }
1461
- let c = Vi.value.min, l = Vi.value.max, u = Math.abs(c), d = l + u || 1, f = (t) => Math.max(0, Math.min(e, t)), p = (t) => f(e - e * (((t ?? 0) + u) / d)), m = [];
1462
- if (r.length) {
1463
- let e = Array(o).fill(0), t = Array(o).fill(0);
1464
- r.forEach((r) => {
1465
- let i = Array.isArray(r.fullSeries) ? r.fullSeries : r.series, c = Array(o), l = Array(o);
1466
- for (let n = 0; n < o; n += 1) {
1467
- let r = i?.[n] ?? 0;
1468
- r >= 0 ? (l[n] = e[n], e[n] += r, c[n] = e[n]) : (l[n] = t[n], t[n] += r, c[n] = t[n]);
1469
- }
1470
- let u = c.map(p), d = l.map(p), f = s.map((e, t) => ({
1471
- x: e,
1472
- y: u[t]
1473
- })), h = s.map((e, t) => ({
1474
- x: e,
1475
- y: d[t]
1476
- })), g = v(f), _ = v([...h].reverse()), ee = a(f), te = a([...h].reverse()), ne = h[h.length - 1];
1477
- if (R.value.style.chart.lines.useArea) {
1478
- let e = R.value.style.chart.lines.smooth ? `M${f[0].x},${f[0].y} ${n(g)} L${ne.x},${ne.y} ${n(_)} Z` : `M${f[0].x},${f[0].y} ${n(ee)} L${ne.x},${ne.y} ${n(te)} Z`;
1479
- m.push(`<path d="${e}"
1480
- fill="${Qt.pattern ? `url(#pattern_${F.value}_${r.absoluteIndex})` : (R.value.style.chart.lines.gradient.show, r.color)}"
1481
- opacity="${R.value.style.chart.lines.areaOpacity}"
1482
- stroke="none" />`);
1483
- }
1484
- let re = R.value.style.chart.lines.smooth ? `M${f[0].x},${f[0].y} ${n(g)}` : `M${f[0].x},${f[0].y} ${n(ee)}`;
1485
- m.push(`<path d="${re}"
1486
- fill="none"
1487
- stroke="${r.color}"
1488
- stroke-width="${R.value.style.chart.lines.strokeWidth}"
1489
- stroke-linecap="round" />`);
1490
- });
1491
- }
1492
- return i.length && i.forEach((e) => {
1493
- let t = (Array.isArray(e.fullSeries) ? e.fullSeries : e.series).map(p), r = s.map((e, n) => ({
1494
- x: e,
1495
- y: t[n]
1496
- })), i = v(r), o = a(r), c = R.value.style.chart.lines.smooth ? `M${r[0].x},${r[0].y} ${n(i)}` : `M${r[0].x},${r[0].y} ${n(o)}`;
1497
- m.push(`<path d="${c}"
1498
- fill="none"
1499
- stroke="${e.color}"
1500
- stroke-width="${R.value.style.chart.lines.strokeWidth}"
1501
- stroke-linecap="round" />`);
1502
- }), m.join("");
1503
- }
1504
- function Ui(e, t) {
1505
- let n = R.value.style.chart.lines, r = n.dataLabels;
1506
- return n.showDistributedPercentage && n.distributed ? Jn.value ? t === 0 ? !r.hideEmptyPercentages : Math.abs(t) * 100 >= r.hideUnderPercentage : r.hideEmptyPercentages ? Math.abs(t) > 0 : !0 : Jn.value ? (qn.value && ir.value && console.warn("Vue Data UI - VueUiStackline - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), Math.abs(e) > Wi.value * r.hideUnderPercentage / 100) : qn.value ? Math.abs(e) >= r.hideUnderValue : r.hideEmptyValues ? e !== 0 : !0;
1507
- }
1508
- let Wi = b(() => Math.max(...Y.value.flatMap((e) => e.series)));
1509
- function Gi(e, t, n, i, a) {
1510
- let o = a === -1 && e >= 0 ? -e : e;
1511
- return _(R.value.style.chart.lines.dataLabels.formatter, o, r({
1512
- p: R.value.style.chart.lines.dataLabels.prefix,
1513
- v: o,
1514
- s: R.value.style.chart.lines.dataLabels.suffix,
1515
- r: R.value.style.chart.lines.dataLabels.rounding
1516
- }), {
1517
- datapoint: t,
1518
- seriesIndex: n,
1519
- datapointIndex: i
1520
- });
1521
- }
1522
- function Ki(e, t, n, i) {
1523
- return _(R.value.style.chart.lines.dataLabels.formatter, e, r({
1524
- v: isNaN(e) ? 0 : e,
1525
- s: "%",
1526
- r: R.value.style.chart.lines.dataLabels.rounding
1527
- }), {
1528
- datapoint: t,
1529
- seriesIndex: n,
1530
- datapointIndex: i
1531
- });
1532
- }
1533
- function qi({ seriesIndex: e, datapoint: t }) {
1534
- let n = q.value.start + e;
1535
- $t("selectX", {
1536
- dataset: t,
1537
- index: n,
1538
- indexLabel: R.value.style.chart.grid.x.timeLabels.values[n]
1539
- });
1540
- }
1541
- function Ji(e) {
1542
- if (e?.stage === "start") {
1543
- vn.value = !0;
1544
- return;
1545
- }
1546
- if (e?.stage === "end") {
1547
- vn.value = !1;
1548
- return;
1549
- }
1550
- Qn();
1551
- }
1552
- async function Yi() {
1553
- if ($t("copyAlt", {
1554
- config: R.value,
1555
- dataset: Y.value
1556
- }), !R.value.userOptions.callbacks.altCopy) {
1557
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1558
- return;
1559
- }
1560
- await Promise.resolve(R.value.userOptions.callbacks.altCopy({
1561
- config: R.value,
1562
- dataset: Y.value
1563
- }));
1564
- }
1565
- let Xi = O(!1);
1566
- function Zi() {
1567
- L.value = null, Xi.value = !0;
1568
- }
1569
- function Qi() {
1570
- L.value = null, An.value = "pointer", tn.value = !1, $.value = null, $t("selectX", {
1571
- seriesIndex: null,
1572
- datapoint: null
1573
- }), Xi.value = !1;
1574
- }
1575
- function $i(e) {
1576
- if (!V.value || In.value || document.activeElement !== V.value || Er.value || !Z.value) return;
1577
- let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1578
- if (!t && !n && !r && !i) return;
1579
- if (e.preventDefault(), e.stopPropagation(), i) {
1580
- L.value = null, An.value = "pointer", tn.value = !1, $.value = null, $t("selectX", {
1581
- seriesIndex: null,
1582
- datapoint: null
1583
- });
1584
- return;
1585
- }
1586
- if (r) {
1587
- if (L.value === null) return;
1588
- li(L.value);
1589
- return;
1590
- }
1591
- let a = L.value, o = ni.value, s = a !== null && a >= 0 && a < Z.value, c = o !== null && o >= 0 && o < Z.value;
1592
- s ? n ? (a += 1, a >= Z.value && (a = 0)) : t && (--a, a < 0 && (a = Z.value - 1)) : c ? (a = n ? o + 1 : o - 1, a >= Z.value && (a = 0), a < 0 && (a = Z.value - 1)) : a = n ? 0 : Z.value - 1, L.value = a, ea(a), mi(!0, a, "keyboard");
1593
- }
1594
- function ea(e) {
1595
- if (!Number.isFinite(e) || !V.value) return;
1596
- let t = o(W.value.left + e * ai.value, W.value.top + W.value.height / 2, V.value);
1597
- t && (kn.value = t);
1598
- }
1599
- let ta = b(() => ({
1600
- headers: Ti.value?.colNames ?? [],
1601
- rows: Ti.value?.body ?? []
1602
- }));
1603
- return De({
1604
- getData: Ri,
1605
- getImage: ji,
1606
- generatePdf: Zn,
1607
- generateCsv: wi,
1608
- generateImage: Qn,
1609
- generateSvg: Ai,
1610
- hideSeries: Si,
1611
- showSeries: xi,
1612
- toggleTable: Fi,
1613
- toggleLabels: Ii,
1614
- toggleTooltip: Li,
1615
- toggleAnnotator: Ln,
1616
- toggleFullscreen: Pi,
1617
- copyAlt: Yi
1618
- }), (t, n) => (D(), C("div", {
1619
- id: `stackline_${F.value}`,
1620
- ref_key: "stacklineChart",
1621
- ref: P,
1622
- class: We({
1623
- "vue-data-ui-component": !0,
1624
- "vue-ui-stackline": !0,
1625
- "vue-data-ui-wrapper-fullscreen": ln.value
1626
- }),
1627
- style: Ge(`background:${R.value.style.chart.backgroundColor};color:${R.value.style.chart.color};font-family:${R.value.style.fontFamily}; position: relative; ${R.value.responsive ? "height: 100%" : ""}`),
1628
- onMouseenter: Wn,
1629
- onMouseleave: Gn
1630
- }, [
1631
- w("div", {
1632
- id: `chart-instructions-${F.value}`,
1633
- class: "sr-only"
1634
- }, [w("p", null, Xe(R.value.a11y.translations.keyboardNavigation), 1)], 8, rt),
1635
- ta.value?.rows?.length ? (D(), x(Me, {
1636
- key: 0,
1637
- uid: F.value,
1638
- head: ta.value.headers,
1639
- body: ta.value.rows,
1640
- notice: R.value.a11y.translations.tableAvailable,
1641
- caption: R.value.a11y.translations.tableCaption
1642
- }, null, 8, [
1643
- "uid",
1644
- "head",
1645
- "body",
1646
- "notice",
1647
- "caption"
1648
- ])) : S("", !0),
1649
- R.value.userOptions.buttons.annotator ? (D(), x(j(Gt), {
1650
- key: 1,
1651
- svgRef: j(V),
1652
- backgroundColor: R.value.style.chart.backgroundColor,
1653
- color: R.value.style.chart.color,
1654
- active: In.value,
1655
- isCursorPointer: z.value,
1656
- onClose: Ln
1657
- }, {
1658
- "annotator-action-close": M(() => [A(t.$slots, "annotator-action-close", {}, void 0, !0)]),
1659
- "annotator-action-color": M(({ color: e }) => [A(t.$slots, "annotator-action-color", E(T({ color: e })), void 0, !0)]),
1660
- "annotator-action-draw": M(({ mode: e }) => [A(t.$slots, "annotator-action-draw", E(T({ mode: e })), void 0, !0)]),
1661
- "annotator-action-undo": M(({ disabled: e }) => [A(t.$slots, "annotator-action-undo", E(T({ disabled: e })), void 0, !0)]),
1662
- "annotator-action-redo": M(({ disabled: e }) => [A(t.$slots, "annotator-action-redo", E(T({ disabled: e })), void 0, !0)]),
1663
- "annotator-action-delete": M(({ disabled: e }) => [A(t.$slots, "annotator-action-delete", E(T({ disabled: e })), void 0, !0)]),
1664
- _: 3
1665
- }, 8, [
1666
- "svgRef",
1667
- "backgroundColor",
1668
- "color",
1669
- "active",
1670
- "isCursorPointer"
1671
- ])) : S("", !0),
1672
- A(t.$slots, "userConfig", {}, void 0, !0),
1673
- $n.value ? (D(), C("div", {
1674
- key: 2,
1675
- ref_key: "noTitle",
1676
- ref: sn,
1677
- class: "vue-data-ui-no-title-space",
1678
- style: "height:36px; width: 100%;background:transparent"
1679
- }, null, 512)) : S("", !0),
1680
- R.value.style.chart.title.text ? (D(), C("div", {
1681
- key: 3,
1682
- ref_key: "chartTitle",
1683
- ref: rn,
1684
- style: "width:100%;background:transparent;"
1685
- }, [(D(), x(Te, {
1686
- key: `title_${dn.value}`,
1687
- config: {
1688
- title: {
1689
- cy: "stackline-title",
1690
- ...R.value.style.chart.title
1691
- },
1692
- subtitle: {
1693
- cy: "stackline-subtitle",
1694
- ...R.value.style.chart.title.subtitle
1695
- }
1696
- }
1697
- }, null, 8, ["config"]))], 512)) : S("", !0),
1698
- w("div", { id: `legend-top-${F.value}` }, null, 8, it),
1699
- R.value.userOptions.show && en.value && (j(Un) || j(Vn)) ? (D(), x(j(Kt), {
1700
- ref_key: "userOptionsRef",
1701
- ref: gn,
1702
- key: `user_option_${nn.value}`,
1703
- backgroundColor: R.value.style.chart.backgroundColor,
1704
- color: R.value.style.chart.color,
1705
- isPrinting: j(Yn),
1706
- isImaging: j(Xn),
1707
- uid: F.value,
1708
- hasTooltip: R.value.style.chart.tooltip.show && R.value.userOptions.buttons.tooltip,
1709
- hasPdf: R.value.userOptions.buttons.pdf,
1710
- hasImg: R.value.userOptions.buttons.img,
1711
- hasSvg: R.value.userOptions.buttons.svg,
1712
- hasXls: R.value.userOptions.buttons.csv,
1713
- hasTable: R.value.userOptions.buttons.table,
1714
- hasLabel: R.value.userOptions.buttons.labels,
1715
- hasFullscreen: R.value.userOptions.buttons.fullscreen,
1716
- hasAltCopy: R.value.userOptions.buttons.altCopy,
1717
- isFullscreen: ln.value,
1718
- chartElement: P.value,
1719
- position: R.value.userOptions.position,
1720
- isTooltip: H.value.showTooltip,
1721
- titles: { ...R.value.userOptions.buttonTitles },
1722
- hasAnnotator: R.value.userOptions.buttons.annotator,
1723
- isAnnotation: In.value,
1724
- callbacks: R.value.userOptions.callbacks,
1725
- printScale: R.value.userOptions.print.scale,
1726
- tableDialog: R.value.table.useDialog,
1727
- isCursorPointer: z.value,
1728
- onToggleFullscreen: Pi,
1729
- onGeneratePdf: j(Zn),
1730
- onGenerateCsv: wi,
1731
- onGenerateImage: Ji,
1732
- onGenerateSvg: Ai,
1733
- onToggleTable: Fi,
1734
- onToggleLabels: Ii,
1735
- onToggleTooltip: Li,
1736
- onToggleAnnotator: Ln,
1737
- onCopyAlt: Yi,
1738
- style: Ge({ visibility: j(Un) ? j(Vn) ? "visible" : "hidden" : "visible" })
1739
- }, Re({ _: 2 }, [
1740
- t.$slots.menuIcon ? {
1741
- name: "menuIcon",
1742
- fn: M(({ isOpen: e, color: n }) => [A(t.$slots, "menuIcon", E(T({
1743
- isOpen: e,
1744
- color: n
1745
- })), void 0, !0)]),
1746
- key: "0"
1747
- } : void 0,
1748
- t.$slots.optionTooltip ? {
1749
- name: "optionTooltip",
1750
- fn: M(() => [A(t.$slots, "optionTooltip", {}, void 0, !0)]),
1751
- key: "1"
1752
- } : void 0,
1753
- t.$slots.optionPdf ? {
1754
- name: "optionPdf",
1755
- fn: M(() => [A(t.$slots, "optionPdf", {}, void 0, !0)]),
1756
- key: "2"
1757
- } : void 0,
1758
- t.$slots.optionCsv ? {
1759
- name: "optionCsv",
1760
- fn: M(() => [A(t.$slots, "optionCsv", {}, void 0, !0)]),
1761
- key: "3"
1762
- } : void 0,
1763
- t.$slots.optionImg ? {
1764
- name: "optionImg",
1765
- fn: M(() => [A(t.$slots, "optionImg", {}, void 0, !0)]),
1766
- key: "4"
1767
- } : void 0,
1768
- t.$slots.optionSvg ? {
1769
- name: "optionSvg",
1770
- fn: M(() => [A(t.$slots, "optionSvg", {}, void 0, !0)]),
1771
- key: "5"
1772
- } : void 0,
1773
- t.$slots.optionTable ? {
1774
- name: "optionTable",
1775
- fn: M(() => [A(t.$slots, "optionTable", {}, void 0, !0)]),
1776
- key: "6"
1777
- } : void 0,
1778
- t.$slots.optionLabels ? {
1779
- name: "optionLabels",
1780
- fn: M(() => [A(t.$slots, "optionLabels", {}, void 0, !0)]),
1781
- key: "7"
1782
- } : void 0,
1783
- t.$slots.optionFullscreen ? {
1784
- name: "optionFullscreen",
1785
- fn: M(({ toggleFullscreen: e, isFullscreen: n }) => [A(t.$slots, "optionFullscreen", E(T({
1786
- toggleFullscreen: e,
1787
- isFullscreen: n
1788
- })), void 0, !0)]),
1789
- key: "8"
1790
- } : void 0,
1791
- t.$slots.optionAnnotator ? {
1792
- name: "optionAnnotator",
1793
- fn: M(({ toggleAnnotator: e, isAnnotator: n }) => [A(t.$slots, "optionAnnotator", E(T({
1794
- toggleAnnotator: e,
1795
- isAnnotator: n
1796
- })), void 0, !0)]),
1797
- key: "9"
1798
- } : void 0,
1799
- t.$slots.optionAltCopy ? {
1800
- name: "optionAltCopy",
1801
- fn: M(({ altCopy: e }) => [A(t.$slots, "optionAltCopy", E(T({ altCopy: e })), void 0, !0)]),
1802
- key: "10"
1803
- } : void 0,
1804
- t.$slots["custom-menu-before"] ? {
1805
- name: "custom-menu-before",
1806
- fn: M(() => [A(t.$slots, "custom-menu-before", {}, void 0, !0)]),
1807
- key: "11"
1808
- } : void 0,
1809
- t.$slots["custom-menu-after"] ? {
1810
- name: "custom-menu-after",
1811
- fn: M(() => [A(t.$slots, "custom-menu-after", {}, void 0, !0)]),
1812
- key: "12"
1813
- } : void 0
1814
- ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : S("", !0),
1815
- w("div", at, [(D(), C("svg", {
1816
- ref_key: "svgRef",
1817
- ref: V,
1818
- "aria-describedby": `chart-instructions-${F.value}`,
1819
- xmlns: j(oe),
1820
- viewBox: `0 0 ${W.value.chartWidth <= 0 ? 10 : W.value.chartWidth} ${W.value.chartHeight <= 0 ? 10 : W.value.chartHeight}`,
1821
- class: We({
1822
- "vue-data-ui-loading": j(B),
1823
- "no-transition": !R.value.useCssAnimation
1824
- }),
1825
- style: Ge(`max-width:100%;overflow:visible;background:transparent;color:${R.value.style.chart.color}`),
1826
- role: "img",
1827
- "aria-live": "polite",
1828
- tabindex: "0",
1829
- preserveAspectRatio: "xMidYMid",
1830
- onMousemove: si,
1831
- onMouseleave: ui,
1832
- onClick: ci,
1833
- onFocus: Zi,
1834
- onBlur: Qi,
1835
- onKeydown: $i
1836
- }, [
1837
- Be(j(qt)),
1838
- (D(!0), C(y, null, k(mr.value, (e) => (D(), C(y, null, [t.$slots.pattern ? (D(), C("defs", st, [A(t.$slots, "pattern", He({ ref_for: !0 }, {
1839
- seriesIndex: e.absoluteIndex,
1840
- patternId: `pattern_${F.value}_${e.absoluteIndex}`
1841
- }), void 0, !0)])) : S("", !0)], 64))), 256)),
1842
- t.$slots["chart-background"] ? (D(), C("foreignObject", {
1843
- key: 0,
1844
- x: X.value.left,
1845
- y: W.value.top,
1846
- width: X.value.width,
1847
- height: W.value.height,
1848
- style: { pointerEvents: "none" }
1849
- }, [A(t.$slots, "chart-background", {}, void 0, !0)], 8, ct)) : S("", !0),
1850
- R.value.style.chart.lines.gradient.show ? (D(), C("defs", lt, [(D(!0), C(y, null, k(Y.value, (e, t) => (D(), C("linearGradient", {
1851
- id: `gradient_${e.id}`,
1852
- x1: "0%",
1853
- y1: "0%",
1854
- x2: "0%",
1855
- y2: "100%"
1856
- }, [w("stop", {
1857
- offset: "0%",
1858
- "stop-color": e.color
1859
- }, null, 8, dt), w("stop", {
1860
- offset: "100%",
1861
- "stop-color": j(ue)(e.color, R.value.style.chart.lines.gradient.intensity / 100)
1862
- }, null, 8, ft)], 8, ut))), 256))])) : S("", !0),
1863
- R.value.style.chart.grid.x.showHorizontalLines ? (D(!0), C(y, { key: 2 }, k(Fr.value, (e, t) => (D(), C("line", {
1864
- x1: X.value.left,
1865
- x2: X.value.right,
1866
- y1: e.y,
1867
- y2: e.y,
1868
- stroke: R.value.style.chart.grid.x.linesColor,
1869
- "stroke-width": R.value.style.chart.grid.x.linesThickness,
1870
- "stroke-dasharray": R.value.style.chart.grid.x.linesStrokeDasharray,
1871
- "stroke-linecap": "round"
1872
- }, null, 8, pt))), 256)) : S("", !0),
1873
- R.value.style.chart.grid.y.showVerticalLines ? (D(!0), C(y, { key: 3 }, k(q.value.end - q.value.start, (e, t) => (D(), C("line", {
1874
- x1: Q(t),
1875
- x2: Q(t),
1876
- y1: W.value.top,
1877
- y2: W.value.bottom,
1878
- stroke: R.value.style.chart.grid.y.linesColor,
1879
- "stroke-width": R.value.style.chart.grid.y.linesThickness,
1880
- "stroke-dasharray": R.value.style.chart.grid.y.linesStrokeDasharray,
1881
- "stroke-linecap": "round"
1882
- }, null, 8, mt))), 256)) : S("", !0),
1883
- R.value.style.chart.grid.x.showAxis ? (D(), C("line", {
1884
- key: 4,
1885
- x1: X.value.left,
1886
- x2: X.value.right,
1887
- y1: W.value.bottom,
1888
- y2: W.value.bottom,
1889
- stroke: R.value.style.chart.grid.x.axisColor,
1890
- "stroke-width": R.value.style.chart.grid.x.axisThickness,
1891
- "stroke-linecap": "round",
1892
- "stroke-linejoin": "round"
1893
- }, null, 8, ht)) : S("", !0),
1894
- R.value.style.chart.grid.y.showAxis && !R.value.style.chart.lines.distributed ? (D(), C("line", {
1895
- key: 5,
1896
- x1: X.value.left,
1897
- x2: X.value.left,
1898
- y1: W.value.top,
1899
- y2: W.value.bottom,
1900
- stroke: R.value.style.chart.grid.y.axisColor,
1901
- "stroke-width": R.value.style.chart.grid.y.axisThickness,
1902
- "stroke-linecap": "round",
1903
- "stroke-linejoin": "round"
1904
- }, null, 8, gt)) : S("", !0),
1905
- R.value.style.chart.grid.x.axisName.show && R.value.style.chart.grid.x.axisName.text ? (D(), C("text", {
1906
- key: 6,
1907
- ref_key: "xAxisLabel",
1908
- ref: bn,
1909
- x: W.value.left + W.value.width / 2,
1910
- y: W.value.chartHeight - 3,
1911
- "font-size": R.value.style.chart.grid.x.axisName.fontSize,
1912
- fill: R.value.style.chart.grid.x.axisName.color,
1913
- "font-weight": R.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
1914
- "text-anchor": "middle"
1915
- }, Xe(R.value.style.chart.grid.x.axisName.text), 9, _t)) : S("", !0),
1916
- R.value.style.chart.grid.y.axisName.show && R.value.style.chart.grid.y.axisName.text ? (D(), C("text", {
1917
- key: 7,
1918
- ref_key: "yAxisLabel",
1919
- ref: xn,
1920
- transform: `translate(${R.value.style.chart.grid.y.axisName.fontSize}, ${W.value.top + W.value.height / 2}) rotate(-90)`,
1921
- "font-size": R.value.style.chart.grid.y.axisName.fontSize,
1922
- fill: R.value.style.chart.grid.y.axisName.color,
1923
- "font-weight": R.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
1924
- "text-anchor": "middle"
1925
- }, Xe(R.value.style.chart.grid.y.axisName.text), 9, vt)) : S("", !0),
1926
- R.value.style.chart.grid.frame.show ? (D(), C("rect", {
1927
- key: 8,
1928
- style: {
1929
- pointerEvents: "none",
1930
- transition: "none",
1931
- animation: "none !important"
1932
- },
1933
- x: X.value.left,
1934
- y: W.value.top,
1935
- width: X.value.width,
1936
- height: W.value.height,
1937
- fill: "transparent",
1938
- stroke: R.value.style.chart.grid.frame.stroke,
1939
- "stroke-width": R.value.style.chart.grid.frame.strokeWidth,
1940
- "stroke-linecap": R.value.style.chart.grid.frame.strokeLinecap,
1941
- "stroke-linejoin": R.value.style.chart.grid.frame.strokeLinejoin,
1942
- "stroke-dasharray": R.value.style.chart.grid.frame.strokeDasharray
1943
- }, null, 8, yt)) : S("", !0),
1944
- (D(!0), C(y, null, k(Y.value, (e) => (D(), C(y, null, [R.value.style.chart.lines.useArea && !e.standalone ? (D(), C("path", {
1945
- key: 0,
1946
- d: R.value.style.chart.lines.smooth ? e.smoothArea : e.straightArea,
1947
- fill: t.$slots.pattern ? `url(#pattern_${F.value}_${e.absoluteIndex})` : R.value.style.chart.lines.gradient.show ? `url(#gradient_${e.id})` : e.color,
1948
- opacity: R.value.style.chart.lines.areaOpacity,
1949
- style: Ge({ transition: j(B) || !R.value.useCssAnimation ? void 0 : "all 0.3s ease-in-out" })
1950
- }, null, 12, bt)) : S("", !0)], 64))), 256)),
1951
- (D(!0), C(y, null, k(Y.value, (e) => (D(), C("path", {
1952
- d: R.value.style.chart.lines.smooth ? e.smoothPath : e.straightPath,
1953
- stroke: R.value.style.chart.lines.path.useSerieColor ? e.color : R.value.style.chart.lines.path.stroke,
1954
- "stroke-width": R.value.style.chart.lines.strokeWidth,
1955
- fill: "none",
1956
- "stroke-linecap": "round",
1957
- style: Ge({ transition: j(B) || !R.value.useCssAnimation ? void 0 : "all 0.3s ease-in-out" })
1958
- }, null, 12, xt))), 256)),
1959
- R.value.style.chart.grid.y.axisLabels.show && !R.value.style.chart.lines.distributed ? (D(), C("g", {
1960
- key: 9,
1961
- ref_key: "scaleLabels",
1962
- ref: Sn
1963
- }, [(D(!0), C(y, null, k(Fr.value, (e, t) => (D(), C("line", {
1964
- x1: X.value.left,
1965
- x2: X.value.left - 6,
1966
- y1: e.y,
1967
- y2: e.y,
1968
- stroke: R.value.style.chart.grid.x.axisColor,
1969
- "stroke-width": 1
1970
- }, null, 8, St))), 256)), (D(!0), C(y, null, k(Fr.value, (e, t) => (D(), C("text", {
1971
- x: e.x,
1972
- y: e.y + R.value.style.chart.grid.y.axisLabels.fontSize / 3,
1973
- "font-size": R.value.style.chart.grid.y.axisLabels.fontSize,
1974
- "font-weight": R.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1975
- fill: R.value.style.chart.grid.y.axisLabels.color,
1976
- "text-anchor": "end"
1977
- }, Xe(j(_)(R.value.style.chart.grid.y.axisLabels.formatter, e.value, j(r)({
1978
- p: R.value.style.chart.lines.dataLabels.prefix,
1979
- v: e.value,
1980
- s: R.value.style.chart.lines.dataLabels.suffix,
1981
- r: R.value.style.chart.grid.y.axisLabels.rounding
1982
- }), { datapoint: e })), 9, Ct))), 256))], 512)) : S("", !0),
1983
- R.value.style.chart.grid.x.timeLabels.show ? (D(), C("g", {
1984
- key: 10,
1985
- ref_key: "timeLabelsEls",
1986
- ref: Cn
1987
- }, [t.$slots["time-label"] ? (D(), C("g", wt, [(D(!0), C(y, null, k(Vr.value, (e, n) => (D(), C("g", null, [A(t.$slots, "time-label", He({ ref_for: !0 }, {
1988
- x: W.value.left + wr.value * n + wr.value / 2,
1989
- y: W.value.bottom + R.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + R.value.style.chart.grid.x.timeLabels.offsetY,
1990
- fontSize: R.value.style.chart.grid.x.timeLabels.fontSize,
1991
- fill: R.value.style.chart.grid.x.timeLabels.color,
1992
- transform: `translate(${W.value.left + wr.value * n + wr.value / 2}, ${W.value.bottom + R.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + R.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${R.value.style.chart.grid.x.timeLabels.rotation})`,
1993
- absoluteIndex: e.absoluteIndex,
1994
- content: e.text,
1995
- textAnchor: R.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : R.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1996
- show: !0
1997
- }), void 0, !0)]))), 256))])) : (D(), C("g", Tt, [(D(!0), C(y, null, k(Vr.value, (e, n) => (D(), C("g", null, [String(e.text).includes("\n") ? (D(), C("text", {
1998
- key: n + "-multi",
1999
- "text-anchor": R.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : R.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
2000
- "font-size": R.value.style.chart.grid.x.timeLabels.fontSize,
2001
- fill: R.value.style.chart.grid.x.timeLabels.color,
2002
- transform: `
2003
- translate(
2004
- ${Q(n)},
2005
- ${W.value.bottom + R.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + R.value.style.chart.grid.x.timeLabels.offsetY}
2006
- ),
2007
- rotate(${R.value.style.chart.grid.x.timeLabels.rotation})
2008
- `,
2009
- style: Ge({ cursor: z.value ? "pointer" : "default" }),
2010
- innerHTML: t.createTSpansFromLineBreaksOnX({
2011
- content: String(e.text),
2012
- fontSize: R.value.style.chart.grid.x.timeLabels.fontSize,
2013
- fill: R.value.style.chart.grid.x.timeLabels.color,
2014
- x: 0,
2015
- y: 0
2016
- }),
2017
- onClick: () => hi(e, n)
2018
- }, null, 12, Dt)) : (D(), C("text", {
2019
- class: "vue-data-ui-time-label",
2020
- key: n,
2021
- "text-anchor": R.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : R.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
2022
- "font-size": R.value.style.chart.grid.x.timeLabels.fontSize,
2023
- "font-weight": R.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
2024
- fill: R.value.style.chart.grid.x.timeLabels.color,
2025
- transform: `translate(${Q(n)}, ${W.value.bottom + R.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + R.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${R.value.style.chart.grid.x.timeLabels.rotation})`,
2026
- style: Ge({ cursor: z.value ? "pointer" : "default" }),
2027
- onClick: () => hi(e, n)
2028
- }, Xe(e.text), 13, Et))]))), 256))]))], 512)) : S("", !0),
2029
- (_n.value || ![null, void 0].includes($.value)) && !R.value.style.chart.highlighter.useLine ? (D(!0), C(y, { key: 11 }, k(q.value.end - q.value.start, (e, t) => (D(), C("g", { key: `tooltip_trap_highlighter_${t}` }, [w("rect", {
2030
- x: oi(t).x,
2031
- y: W.value.top,
2032
- height: W.value.height,
2033
- width: oi(t).width,
2034
- fill: [Fn.value, $.value].includes(t) ? j(ee)(R.value.style.chart.highlighter.color, R.value.style.chart.highlighter.opacity) : "transparent",
2035
- style: {
2036
- transition: "none !important",
2037
- animation: "none !important"
2038
- }
2039
- }, null, 8, Ot)]))), 128)) : S("", !0),
2040
- (_n.value || ![null, void 0].includes($.value)) && R.value.style.chart.highlighter.useLine ? (D(), C(y, { key: 12 }, [![null, void 0].includes($.value) || ![null, void 0].includes(Fn.value) ? (D(), C("g", kt, [w("line", {
2041
- x1: Q(($.value ?? Fn.value) || 0),
2042
- x2: Q(($.value ?? Fn.value) || 0),
2043
- y1: j(m)(W.value.top),
2044
- y2: j(m)(W.value.bottom),
2045
- stroke: R.value.style.chart.highlighter.color,
2046
- "stroke-width": R.value.style.chart.highlighter.lineWidth,
2047
- "stroke-dasharray": R.value.style.chart.highlighter.lineDasharray,
2048
- "stroke-linecap": "round",
2049
- style: {
2050
- transition: "none !important",
2051
- animation: "none !important",
2052
- "pointer-events": "none"
2053
- }
2054
- }, null, 8, At)])) : S("", !0)], 64)) : S("", !0),
2055
- (D(!0), C(y, null, k(Y.value, (e) => (D(), C(y, null, [_n.value && q.value.end - q.value.start > R.value.style.chart.lines.dot.hideAboveMaxSerieLength ? (D(), C("g", jt, [$.value == null ? S("", !0) : (D(), C(y, { key: 0 }, [e.rel.includes($.value) && e.fullSeries?.[q.value.start + $.value] != null && !Number.isNaN(e.fullSeries?.[q.value.start + $.value]) ? (D(), x(Ee, {
2056
- key: 0,
2057
- shape: [
2058
- "triangle",
2059
- "square",
2060
- "diamond",
2061
- "pentagon",
2062
- "hexagon",
2063
- "star"
2064
- ].includes(e.shape) ? e.shape : "circle",
2065
- color: R.value.style.chart.lines.dot.useSerieColor ? e.color : R.value.style.chart.lines.dot.fill,
2066
- plot: {
2067
- x: j(se)(e.points[e.rel.indexOf($.value)].x),
2068
- y: j(se)(e.points[e.rel.indexOf($.value)].y)
2069
- },
2070
- radius: R.value.style.chart.lines.dot.radius * 1.3,
2071
- stroke: R.value.style.chart.lines.dot.useSerieColor ? R.value.style.chart.lines.dot.stroke : e.color,
2072
- strokeWidth: R.value.style.chart.lines.dot.strokeWidth,
2073
- transition: j(B) ? void 0 : `all ${R.value.style.chart.lines.transitionDurationMs}ms ease-in-out`
2074
- }, null, 8, [
2075
- "shape",
2076
- "color",
2077
- "plot",
2078
- "radius",
2079
- "stroke",
2080
- "strokeWidth",
2081
- "transition"
2082
- ])) : S("", !0)], 64))])) : S("", !0)], 64))), 256)),
2083
- (D(!0), C(y, null, k(Y.value, (e) => (D(), C(y, null, [q.value.end - q.value.start < R.value.style.chart.lines.dot.hideAboveMaxSerieLength ? (D(!0), C(y, { key: 0 }, k(e.points, (t, n) => (D(), C("g", { key: n }, [e.fullSeries?.[q.value.start + e.rel[n]] != null && !Number.isNaN(e.fullSeries?.[q.value.start + e.rel[n]]) ? (D(), x(Ee, {
2084
- key: 0,
2085
- shape: [
2086
- "triangle",
2087
- "square",
2088
- "diamond",
2089
- "pentagon",
2090
- "hexagon",
2091
- "star"
2092
- ].includes(e.shape) ? e.shape : "circle",
2093
- color: R.value.style.chart.lines.dot.useSerieColor ? e.color : R.value.style.chart.lines.dot.fill,
2094
- plot: {
2095
- x: t.x,
2096
- y: t.y
2097
- },
2098
- radius: _n.value && $.value === e.rel[n] ? R.value.style.chart.lines.dot.radius * 1.3 : R.value.style.chart.lines.dot.radius,
2099
- stroke: R.value.style.chart.lines.dot.useSerieColor ? R.value.style.chart.lines.dot.stroke : e.color,
2100
- strokeWidth: R.value.style.chart.lines.dot.strokeWidth,
2101
- transition: j(B) ? void 0 : `all ${R.value.style.chart.lines.transitionDurationMs}ms ease-in-out`
2102
- }, null, 8, [
2103
- "shape",
2104
- "color",
2105
- "plot",
2106
- "radius",
2107
- "stroke",
2108
- "strokeWidth",
2109
- "transition"
2110
- ])) : S("", !0)]))), 128)) : S("", !0)], 64))), 256)),
2111
- H.value.dataLabels.show && R.value.style.chart.lines.dataLabels.hideAboveMaxSerieLength > q.value.end - q.value.start ? (D(), C(y, { key: 13 }, [(D(!0), C(y, null, k(Y.value, (e, t) => (D(), C("g", { key: t }, [(D(!0), C(y, null, k(e.points, (n, r) => (D(), C(y, { key: r }, [Ui(e.series[r], e.proportions[r]) ? (D(), C("text", {
2112
- key: 0,
2113
- x: n.x,
2114
- y: n.y + (e.series[r] >= 0 ? -R.value.style.chart.lines.dataLabels.fontSize / 2 + R.value.style.chart.lines.dataLabels.offsetY : R.value.style.chart.lines.dataLabels.fontSize * 1.2 - R.value.style.chart.lines.dataLabels.offsetY),
2115
- "font-size": R.value.style.chart.lines.dataLabels.fontSize,
2116
- fill: R.value.style.chart.lines.dataLabels.color,
2117
- "font-weight": R.value.style.chart.lines.dataLabels.bold ? "bold" : "normal",
2118
- "text-anchor": "middle"
2119
- }, Xe(R.value.style.chart.lines.showDistributedPercentage && R.value.style.chart.lines.distributed ? Ki(e.proportions[r] * 100, e, t, e.rel[r]) : Gi(e.series[r], e, t, e.rel[r], e.signedSeries[r])), 9, Mt)) : S("", !0)], 64))), 128))]))), 128)), R.value.style.chart.lines.totalValues.show && Y.value.length > 1 ? (D(), C("g", {
2120
- key: 0,
2121
- ref_key: "sumTop",
2122
- ref: wn
2123
- }, [(D(!0), C(y, null, k(Mr.value, (e, t) => (D(), C(y, null, [!R.value.style.chart.lines.dataLabels.hideEmptyValues || e.value !== 0 ? (D(), C("text", {
2124
- key: 0,
2125
- x: Q(t),
2126
- y: Pr(t),
2127
- "text-anchor": "middle",
2128
- "font-size": R.value.style.chart.lines.totalValues.fontSize,
2129
- "font-weight": R.value.style.chart.lines.totalValues.bold ? "bold" : "normal",
2130
- fill: R.value.style.chart.lines.totalValues.color
2131
- }, Xe(Gi(e.value, e, t, t, e.sign)), 9, Nt)) : S("", !0)], 64))), 256))], 512)) : S("", !0)], 64)) : S("", !0),
2132
- vr.value ? (D(), C("rect", He({ key: 14 }, pr.value, {
2133
- "data-start": q.value.start,
2134
- "data-end": q.value.end
2135
- }), null, 16, Pt)) : S("", !0),
2136
- A(t.$slots, "svg", { svg: {
2137
- drawingArea: W.value,
2138
- data: Y.value,
2139
- isPrintingImg: j(Yn) || j(Xn) || vn.value,
2140
- isPrintingSvg: yn.value
2141
- } }, void 0, !0)
2142
- ], 46, ot)), t.$slots.hint ? (D(), C("div", Ft, [A(t.$slots, "hint", E(T({
2143
- hint: R.value.a11y.translations.keyboardNavigation,
2144
- isVisible: Xi.value
2145
- })), void 0, !0)])) : S("", !0)]),
2146
- t.$slots.watermark ? (D(), C("div", It, [A(t.$slots, "watermark", E(T({ isPrinting: j(Yn) || j(Xn) || vn.value || yn.value })), void 0, !0)])) : S("", !0),
2147
- mn.value && (R.value.style.chart.legend.show || t.$slots.legend) ? (D(), x(Le, {
2148
- key: 6,
2149
- to: R.value.style.chart.legend.position === "top" ? `#legend-top-${F.value}` : `#legend-bottom-${F.value}`
2150
- }, [w("div", {
2151
- ref_key: "chartLegend",
2152
- ref: an
2153
- }, [A(t.$slots, "legend", { legend: vi.value }, () => [R.value.style.chart.legend.show ? (D(), x(Fe, {
2154
- key: 0,
2155
- legendSet: vi.value,
2156
- config: yi.value,
2157
- isCursorPointer: z.value,
2158
- onClickMarker: n[0] ||= ({ legend: e }) => e.segregate()
2159
- }, Re({
2160
- item: M(({ legend: e }) => [j(B) ? S("", !0) : (D(), C("div", {
2161
- key: 0,
2162
- onClick: (t) => e.segregate(),
2163
- style: Ge(`opacity:${I.value.includes(e.id) ? .5 : 1}`)
2164
- }, Xe(e.name), 13, Lt))]),
2165
- legendToggle: M(() => [vi.value.length > 2 && R.value.style.chart.legend.selectAllToggle.show && !j(B) ? (D(), x(je, {
2166
- key: 0,
2167
- backgroundColor: R.value.style.chart.legend.selectAllToggle.backgroundColor,
2168
- color: R.value.style.chart.legend.selectAllToggle.color,
2169
- fontSize: R.value.style.chart.legend.fontSize,
2170
- checked: I.value.length > 0,
2171
- isCursorPointer: z.value,
2172
- onToggle: gi
2173
- }, null, 8, [
2174
- "backgroundColor",
2175
- "color",
2176
- "fontSize",
2177
- "checked",
2178
- "isCursorPointer"
2179
- ])) : S("", !0)]),
2180
- _: 2
2181
- }, [t.$slots.pattern ? {
2182
- name: "legend-pattern",
2183
- fn: M(({ legend: e, index: t }) => [Be(Ee, {
2184
- shape: e.shape,
2185
- radius: 30,
2186
- stroke: "none",
2187
- plot: {
2188
- x: 30,
2189
- y: 30
2190
- },
2191
- fill: `url(#pattern_${F.value}_${t})`
2192
- }, null, 8, ["shape", "fill"])]),
2193
- key: "0"
2194
- } : void 0]), 1032, [
2195
- "legendSet",
2196
- "config",
2197
- "isCursorPointer"
2198
- ])) : S("", !0)], !0)], 512)], 8, ["to"])) : S("", !0),
2199
- en.value && R.value.userOptions.buttons.table ? (D(), x(Je(Mi.value.component), He({ key: 7 }, Mi.value.props, {
2200
- ref_key: "tableUnit",
2201
- ref: hn,
2202
- onClose: Ni
2203
- }), Re({
2204
- content: M(() => [Be(j(Wt), {
2205
- colNames: Ti.value.colNames,
2206
- head: Ti.value.head,
2207
- body: Ti.value.body,
2208
- config: Ti.value.config,
2209
- title: R.value.table.useDialog ? "" : Mi.value.title,
2210
- withCloseButton: !R.value.table.useDialog,
2211
- isCursorPointer: z.value,
2212
- onClose: Ni
2213
- }, {
2214
- th: M(({ th: e }) => [w("div", { innerHTML: e }, null, 8, Rt)]),
2215
- td: M(({ td: e }) => [ze(Xe(isNaN(Number(e)) ? e : j(r)({
2216
- p: R.value.style.chart.lines.dataLabels.prefix,
2217
- v: e,
2218
- s: R.value.style.chart.lines.dataLabels.suffix,
2219
- r: R.value.table.td.roundingValue
2220
- })), 1)]),
2221
- _: 1
2222
- }, 8, [
2223
- "colNames",
2224
- "head",
2225
- "body",
2226
- "config",
2227
- "title",
2228
- "withCloseButton",
2229
- "isCursorPointer"
2230
- ])]),
2231
- _: 2
2232
- }, [R.value.table.useDialog ? {
2233
- name: "title",
2234
- fn: M(() => [ze(Xe(Mi.value.title), 1)]),
2235
- key: "0"
2236
- } : void 0, R.value.table.useDialog ? {
2237
- name: "actions",
2238
- fn: M(() => [w("button", {
2239
- tabindex: "0",
2240
- class: "vue-ui-user-options-button",
2241
- onClick: n[1] ||= (e) => wi(R.value.userOptions.callbacks.csv),
2242
- style: Ge({ cursor: z.value ? "pointer" : "default" })
2243
- }, [Be(j(Ht), {
2244
- name: "fileCsv",
2245
- stroke: Mi.value.props.color
2246
- }, null, 8, ["stroke"])], 4)]),
2247
- key: "1"
2248
- } : void 0]), 1040)) : S("", !0),
2249
- R.value.style.chart.zoom.show && en.value && Xr.value && K.value > 6 ? (D(), x(Ae, {
2250
- key: 8,
2251
- ref_key: "chartSlicer",
2252
- ref: on,
2253
- allMinimaps: Or.value,
2254
- background: R.value.style.chart.zoom.color,
2255
- borderColor: R.value.style.chart.backgroundColor,
2256
- customFormat: R.value.style.chart.zoom.customFormat,
2257
- cutNullValues: !1,
2258
- enableRangeHandles: R.value.style.chart.zoom.enableRangeHandles,
2259
- enableSelectionDrag: R.value.style.chart.zoom.enableSelectionDrag,
2260
- end: q.value.end,
2261
- focusOnDrag: R.value.style.chart.zoom.focusOnDrag,
2262
- focusRangeRatio: R.value.style.chart.zoom.focusRangeRatio,
2263
- fontSize: R.value.style.chart.zoom.fontSize,
2264
- immediate: !R.value.style.chart.zoom.preview.enable,
2265
- inputColor: R.value.style.chart.zoom.color,
2266
- isPreview: vr.value,
2267
- labelLeft: R.value.style.chart.grid.x.timeLabels.values[q.value.start] ? Ir.value?.[0]?.text ?? "" : "",
2268
- labelRight: R.value.style.chart.grid.x.timeLabels.values[q.value.end - 1] ? Ir.value?.at(-1)?.text ?? "" : "",
2269
- max: Math.max(...e.dataset.map((e) => e.series.length)),
2270
- min: 0,
2271
- minimap: Dr.value,
2272
- minimapCompact: R.value.style.chart.zoom.minimap.compact,
2273
- minimapFrameColor: R.value.style.chart.zoom.minimap.frameColor,
2274
- minimapIndicatorColor: R.value.style.chart.zoom.minimap.indicatorColor,
2275
- minimapMerged: !1,
2276
- minimapSelectedColor: R.value.style.chart.zoom.minimap.selectedColor,
2277
- minimapSelectedColorOpacity: R.value.style.chart.zoom.minimap.selectedColorOpacity,
2278
- minimapSelectedIndex: $.value,
2279
- minimapSelectionRadius: 1,
2280
- preciseLabels: Gr.value.length ? Gr.value : Lr.value,
2281
- refreshEndPoint: R.value.style.chart.zoom.endIndex === null ? Math.max(...e.dataset.map((e) => e.series.length)) : R.value.style.chart.zoom.endIndex + 1,
2282
- refreshStartPoint: R.value.style.chart.zoom.startIndex === null ? 0 : R.value.style.chart.zoom.startIndex,
2283
- selectColor: R.value.style.chart.zoom.highlightColor,
2284
- selectedSeries: Bi.value,
2285
- smoothMinimap: !1,
2286
- start: q.value.start,
2287
- textColor: R.value.style.chart.color,
2288
- timeLabels: Lr.value,
2289
- usePreciseLabels: R.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !R.value.style.chart.zoom.useDefaultFormat,
2290
- valueEnd: q.value.end,
2291
- valueStart: q.value.start,
2292
- verticalHandles: R.value.style.chart.zoom.minimap.verticalHandles,
2293
- maxWidth: R.value.style.chart.zoom.maxWidth,
2294
- isCursorPointer: z.value,
2295
- additionalMinimapHeight: R.value.style.chart.zoom.minimap.additionalHeight,
2296
- handleType: R.value.style.chart.zoom.minimap.handleType,
2297
- handleIconColor: R.value.style.chart.zoom.minimap.handleIconColor,
2298
- handleBorderWidth: R.value.style.chart.zoom.minimap.handleBorderWidth,
2299
- handleBorderColor: R.value.style.chart.zoom.minimap.handleBorderColor,
2300
- handleFill: R.value.style.chart.zoom.minimap.handleFill,
2301
- handleWidth: R.value.style.chart.zoom.minimap.handleWidth,
2302
- "onUpdate:end": ei,
2303
- "onUpdate:start": $r,
2304
- onTrapMouse: gr,
2305
- onReset: n[2] ||= () => Cr({ force: !0 }),
2306
- onFutureEnd: n[3] ||= (e) => yr("end", e),
2307
- onFutureStart: n[4] ||= (e) => yr("start", e)
2308
- }, {
2309
- "reset-action": M(({ reset: e }) => [A(t.$slots, "reset-action", E(T({ reset: e })), void 0, !0)]),
2310
- slotMap: M(({ width: e, height: t, unitW: n }) => [w("g", { innerHTML: Hi({
2311
- minimapW: e,
2312
- minimapH: t,
2313
- unitW: n
2314
- }) }, null, 8, zt)]),
2315
- _: 3
2316
- }, 8, /* @__PURE__ */ "allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.maxWidth.isCursorPointer.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : S("", !0),
2317
- w("div", { id: `legend-bottom-${F.value}` }, null, 8, Bt),
2318
- Be(j(Vt), {
2319
- teleportTo: R.value.style.chart.tooltip.teleportTo,
2320
- show: H.value.showTooltip && tn.value,
2321
- backgroundColor: R.value.style.chart.tooltip.backgroundColor,
2322
- color: R.value.style.chart.tooltip.color,
2323
- fontSize: R.value.style.chart.tooltip.fontSize,
2324
- borderRadius: R.value.style.chart.tooltip.borderRadius,
2325
- borderColor: R.value.style.chart.tooltip.borderColor,
2326
- borderWidth: R.value.style.chart.tooltip.borderWidth,
2327
- backgroundOpacity: R.value.style.chart.tooltip.backgroundOpacity,
2328
- position: R.value.style.chart.tooltip.position,
2329
- offsetX: R.value.style.chart.tooltip.offsetX,
2330
- offsetY: R.value.style.chart.tooltip.offsetY,
2331
- parent: P.value,
2332
- content: pi.value,
2333
- isFullscreen: ln.value,
2334
- isCustom: R.value.style.chart.tooltip.customFormat && typeof R.value.style.chart.tooltip.customFormat == "function",
2335
- smooth: R.value.style.chart.tooltip.smooth,
2336
- backdropFilter: R.value.style.chart.tooltip.backdropFilter,
2337
- smoothForce: R.value.style.chart.tooltip.smoothForce,
2338
- smoothSnapThreshold: R.value.style.chart.tooltip.smoothSnapThreshold,
2339
- isA11yMode: An.value === "keyboard",
2340
- a11yPosition: kn.value
2341
- }, {
2342
- "tooltip-before": M(() => [A(t.$slots, "tooltip-before", E(T({ ...Jr.value })), void 0, !0)]),
2343
- tooltip: M(() => [A(t.$slots, "tooltip", E(T({ ...Jr.value })), void 0, !0)]),
2344
- "tooltip-after": M(() => [A(t.$slots, "tooltip-after", E(T({ ...Jr.value })), void 0, !0)]),
2345
- _: 3
2346
- }, 8, [
2347
- "teleportTo",
2348
- "show",
2349
- "backgroundColor",
2350
- "color",
2351
- "fontSize",
2352
- "borderRadius",
2353
- "borderColor",
2354
- "borderWidth",
2355
- "backgroundOpacity",
2356
- "position",
2357
- "offsetX",
2358
- "offsetY",
2359
- "parent",
2360
- "content",
2361
- "isFullscreen",
2362
- "isCustom",
2363
- "smooth",
2364
- "backdropFilter",
2365
- "smoothForce",
2366
- "smoothSnapThreshold",
2367
- "isA11yMode",
2368
- "a11yPosition"
2369
- ]),
2370
- t.$slots.source ? (D(), C("div", {
2371
- key: 9,
2372
- ref_key: "source",
2373
- ref: cn,
2374
- dir: "auto"
2375
- }, [A(t.$slots, "source", {}, void 0, !0)], 512)) : S("", !0),
2376
- A(t.$slots, "skeleton", {}, () => [j(B) ? (D(), x(ve, { key: 0 })) : S("", !0)], !0)
2377
- ], 46, nt));
2378
- }
2379
- }, [["__scopeId", "data-v-a565866d"]]);
2380
- //#endregion
2381
- export { tt as n, Vt as t };