vue-data-ui 3.22.13 → 3.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +13 -1
  3. package/dist/{Arrow-DKx74WtM.js → Arrow-o2qHNvrC.js} +1 -1
  4. package/dist/{BaseDraggableDialog-3n8udWmh.js → BaseDraggableDialog-qTnfhLBz.js} +2 -2
  5. package/dist/{BaseIcon-CP5RWnqt.js → BaseIcon-91MZoczJ.js} +4 -3
  6. package/dist/{BaseLegendToggle-DsWphmIb.js → BaseLegendToggle-CtAPwzr2.js} +1 -1
  7. package/dist/{BaseZoomControls-C9_ygNN4.js → BaseZoomControls-rdzlicuz.js} +2 -2
  8. package/dist/{ColorPicker-3N_HVgXs.js → ColorPicker-CIAkdPrj.js} +2 -2
  9. package/dist/{DataTable-DzPEVvSo.js → DataTable-D4tM9s5Y.js} +2 -2
  10. package/dist/HillActions-BWhxHlrj.js +187 -0
  11. package/dist/{Legend-C0xAnJdO.js → Legend-CQTRlzK-.js} +2 -2
  12. package/dist/{NonSvgPenAndPaper-B_mE5UbR.js → NonSvgPenAndPaper-Cawacw1W.js} +19 -19
  13. package/dist/{PackageVersion-B6Hokxw9.js → PackageVersion--QCMh5k_.js} +1 -1
  14. package/dist/{PenAndPaper-CSMVXpg2.js → PenAndPaper-cE4J8-rA.js} +11 -11
  15. package/dist/{Shape-BfnXr1nJ.js → Shape-BPMV94Ij.js} +3 -3
  16. package/dist/{Slicer-C6qNUmZ4.js → Slicer-5yIrdoJv.js} +15 -15
  17. package/dist/SlicerPreview-DvjLV2TW.js +1689 -0
  18. package/dist/{SparkTooltip-uoUiL_P8.js → SparkTooltip-BaYtEKS6.js} +6 -6
  19. package/dist/Title-BODtwViI.js +87 -0
  20. package/dist/{Tooltip-CA1rtSyl.js → Tooltip-CMTGxeYO.js} +1 -1
  21. package/dist/{UserOptions-DzAFK9cY.js → UserOptions-3ujTo3LD.js} +2 -2
  22. package/dist/components/arrow.js +1 -1
  23. package/dist/components/vue-ui-3d-bar.js +1 -1
  24. package/dist/components/vue-ui-accordion.js +1 -1
  25. package/dist/components/vue-ui-age-pyramid.js +1 -1
  26. package/dist/components/vue-ui-annotator.js +1 -1
  27. package/dist/components/vue-ui-bullet.js +1 -1
  28. package/dist/components/vue-ui-bump.js +1 -1
  29. package/dist/components/vue-ui-candlestick.js +1 -1
  30. package/dist/components/vue-ui-carousel-table.js +1 -1
  31. package/dist/components/vue-ui-chestnut.js +1 -1
  32. package/dist/components/vue-ui-chord.js +1 -1
  33. package/dist/components/vue-ui-circle-pack.js +1 -1
  34. package/dist/components/vue-ui-cursor.js +1 -1
  35. package/dist/components/vue-ui-dag.js +1 -1
  36. package/dist/components/vue-ui-dashboard.js +1 -1
  37. package/dist/components/vue-ui-digits.js +1 -1
  38. package/dist/components/vue-ui-donut-evolution.js +1 -1
  39. package/dist/components/vue-ui-donut.js +1 -1
  40. package/dist/components/vue-ui-dumbbell.js +1 -1
  41. package/dist/components/vue-ui-flow.js +1 -1
  42. package/dist/components/vue-ui-funnel.js +1 -1
  43. package/dist/components/vue-ui-galaxy.js +1 -1
  44. package/dist/components/vue-ui-gauge.js +1 -1
  45. package/dist/components/vue-ui-geo.js +1 -1
  46. package/dist/components/vue-ui-gizmo.js +1 -1
  47. package/dist/components/vue-ui-heatmap.js +1 -1
  48. package/dist/components/vue-ui-hill.js +2 -0
  49. package/dist/components/vue-ui-history-plot.js +1 -1
  50. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  51. package/dist/components/vue-ui-icon.js +1 -1
  52. package/dist/components/vue-ui-kpi.js +1 -1
  53. package/dist/components/vue-ui-mini-loader.js +1 -1
  54. package/dist/components/vue-ui-molecule.js +1 -1
  55. package/dist/components/vue-ui-mood-radar.js +1 -1
  56. package/dist/components/vue-ui-nested-donuts.js +1 -1
  57. package/dist/components/vue-ui-onion.js +1 -1
  58. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  59. package/dist/components/vue-ui-quadrant.js +1 -1
  60. package/dist/components/vue-ui-quick-chart.js +1 -1
  61. package/dist/components/vue-ui-radar.js +1 -1
  62. package/dist/components/vue-ui-rating.js +1 -1
  63. package/dist/components/vue-ui-relation-circle.js +1 -1
  64. package/dist/components/vue-ui-ridgeline.js +1 -1
  65. package/dist/components/vue-ui-rings.js +1 -1
  66. package/dist/components/vue-ui-scatter.js +1 -1
  67. package/dist/components/vue-ui-skeleton.js +1 -1
  68. package/dist/components/vue-ui-smiley.js +1 -1
  69. package/dist/components/vue-ui-spark-trend.js +1 -1
  70. package/dist/components/vue-ui-sparkbar.js +1 -1
  71. package/dist/components/vue-ui-sparkgauge.js +1 -1
  72. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  73. package/dist/components/vue-ui-sparkline.js +1 -1
  74. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  75. package/dist/components/vue-ui-stackbar.js +1 -1
  76. package/dist/components/vue-ui-stackline.js +1 -1
  77. package/dist/components/vue-ui-strip-plot.js +1 -1
  78. package/dist/components/vue-ui-table-heatmap.js +1 -1
  79. package/dist/components/vue-ui-table-sparkline.js +1 -1
  80. package/dist/components/vue-ui-table.js +1 -1
  81. package/dist/components/vue-ui-thermometer.js +1 -1
  82. package/dist/components/vue-ui-timer.js +1 -1
  83. package/dist/components/vue-ui-tiremarks.js +1 -1
  84. package/dist/components/vue-ui-treemap.js +1 -1
  85. package/dist/components/vue-ui-vertical-bar.js +1 -1
  86. package/dist/components/vue-ui-waffle.js +1 -1
  87. package/dist/components/vue-ui-wheel.js +1 -1
  88. package/dist/components/vue-ui-word-cloud.js +1 -1
  89. package/dist/components/vue-ui-world.js +1 -1
  90. package/dist/components/vue-ui-xy-canvas.js +1 -1
  91. package/dist/components/vue-ui-xy.js +1 -1
  92. package/dist/{dom-to-png-BdAFKZQg.js → dom-to-png-4tdMNGPX.js} +1 -1
  93. package/dist/exposedLib-DWLRqRhv.js +25 -0
  94. package/dist/{img-Bikk1dGb.js → img-DIQG5q8T.js} +1 -1
  95. package/dist/{labelUtils-BUhssos9.js → labelUtils-C5lnc_xc.js} +1 -1
  96. package/dist/{lib-CFm_J26b.js → lib-BuMGJ_a0.js} +216 -173
  97. package/dist/{package-DmDydylu.js → package-BMc_ZieJ.js} +1 -1
  98. package/dist/{pdf-zmz3l2uy.js → pdf-Cnz4NKM9.js} +1 -1
  99. package/dist/{render-common-BIG8JYGK.js → render-common-Ktg2LZFG.js} +21 -21
  100. package/dist/ssr/vue-ui-donut.js +1 -1
  101. package/dist/ssr/vue-ui-xy.js +1 -1
  102. package/dist/ssr.js +2 -2
  103. package/dist/style.css +1 -1
  104. package/dist/types/vue-data-ui.d.ts +493 -0
  105. package/dist/types/vue-ui-hill.d.ts +90 -0
  106. package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +122 -0
  107. package/dist/{useConfig-C0V0eG7L.js → useConfig-BilxnBNr.js} +767 -476
  108. package/dist/useHints-Dq_w2E8B.js +66 -0
  109. package/dist/{useNestedProp-BY6DNN3i.js → useNestedProp--NSEmhOH.js} +1 -1
  110. package/dist/{useObjectBindings-Djwpii4d.js → useObjectBindings-Cwq7NcQz.js} +3 -2
  111. package/dist/{usePrinter-BH-xle1O.js → usePrinter-BFvi4jVy.js} +2 -2
  112. package/dist/useTransitions-g_zBREk2.js +39 -0
  113. package/dist/utils.js +14 -14
  114. package/dist/{vue-data-ui-rkzh6EkO.js → vue-data-ui-EsawKe_W.js} +85 -81
  115. package/dist/vue-data-ui.js +77 -76
  116. package/dist/vue-ui-3d-bar-RSUS2xpL.js +1849 -0
  117. package/dist/{vue-ui-accordion-UA88lv4d.js → vue-ui-accordion-61MlW-Ge.js} +4 -4
  118. package/dist/vue-ui-age-pyramid-CgnPWA93.js +1263 -0
  119. package/dist/vue-ui-annotator-DBRT85HG.js +2913 -0
  120. package/dist/vue-ui-bullet-Bc3-WaN1.js +724 -0
  121. package/dist/{vue-ui-bump-BS7RCf0Z.js → vue-ui-bump-Dvv3iSKr.js} +332 -295
  122. package/dist/{vue-ui-candlestick-BZSGDKrM.js → vue-ui-candlestick-DvvsrIdp.js} +464 -440
  123. package/dist/vue-ui-carousel-table-DtsNVim8.js +463 -0
  124. package/dist/vue-ui-chestnut-ArloORzP.js +2068 -0
  125. package/dist/{vue-ui-chord-D6G7ceE-.js → vue-ui-chord-xX5gWZy8.js} +430 -424
  126. package/dist/vue-ui-circle-pack-D8wykmqg.js +1638 -0
  127. package/dist/{vue-ui-cursor-BpN5MsXM.js → vue-ui-cursor-CxgE6Phh.js} +61 -61
  128. package/dist/{vue-ui-dag-BzgOgXzU.js → vue-ui-dag-C9Sf9vH7.js} +924 -916
  129. package/dist/vue-ui-dashboard-bGmaglAj.js +520 -0
  130. package/dist/{vue-ui-digits-OMPrn8fb.js → vue-ui-digits-DgDE-_Fn.js} +58 -50
  131. package/dist/vue-ui-donut-B_n6wF6B.js +2440 -0
  132. package/dist/{vue-ui-donut-Cp5NbZ1r.js → vue-ui-donut-Bmo149AR.js} +113 -113
  133. package/dist/{vue-ui-donut-evolution-DHVi5rOn.js → vue-ui-donut-evolution-D6vH_hfx.js} +528 -447
  134. package/dist/vue-ui-dumbbell-BX4Ao_wR.js +1582 -0
  135. package/dist/{vue-ui-flow-BusUK3H0.js → vue-ui-flow-Bshw8pT_.js} +415 -407
  136. package/dist/vue-ui-funnel-CjYosIik.js +797 -0
  137. package/dist/vue-ui-galaxy-CvXgy-dy.js +1111 -0
  138. package/dist/vue-ui-gauge-CByT0_vF.js +953 -0
  139. package/dist/{vue-ui-geo-CyFgFKlh.js → vue-ui-geo-C-gSZL2q.js} +378 -363
  140. package/dist/{vue-ui-gizmo-DdeXwCQp.js → vue-ui-gizmo-CJdxyPID.js} +57 -49
  141. package/dist/{vue-ui-heatmap-D8-qJ7fg.js → vue-ui-heatmap-DEEKv8ip.js} +498 -490
  142. package/dist/vue-ui-hill-D7LYAgAL.js +1768 -0
  143. package/dist/{vue-ui-history-plot-C2Aqk2ON.js → vue-ui-history-plot-BhcU94Pt.js} +553 -556
  144. package/dist/vue-ui-horizontal-bar-CfFye5tL.js +1733 -0
  145. package/dist/vue-ui-kpi-DCBnNfTb.js +104 -0
  146. package/dist/vue-ui-mini-loader-CtWpqnLW.js +133 -0
  147. package/dist/vue-ui-molecule-D3igGyOy.js +958 -0
  148. package/dist/{vue-ui-mood-radar-BiOjxFEN.js → vue-ui-mood-radar-sl6DMxqR.js} +349 -341
  149. package/dist/{vue-ui-nested-donuts-Cl1HVvDp.js → vue-ui-nested-donuts-aS4YzaB3.js} +449 -413
  150. package/dist/vue-ui-onion-EhPTZpW_.js +1258 -0
  151. package/dist/vue-ui-parallel-coordinate-plot-DE9wTmQQ.js +1455 -0
  152. package/dist/{vue-ui-quadrant-B21LkUc8.js → vue-ui-quadrant-SaY_RPSE.js} +625 -617
  153. package/dist/vue-ui-quick-chart-CJ9rejnj.js +2389 -0
  154. package/dist/{vue-ui-radar-CyzAyVos.js → vue-ui-radar-CaNen5Fj.js} +356 -310
  155. package/dist/vue-ui-rating--K7rX2an.js +360 -0
  156. package/dist/vue-ui-relation-circle-FLs8vOxQ.js +925 -0
  157. package/dist/vue-ui-ridgeline-Beg5hshN.js +1663 -0
  158. package/dist/{vue-ui-rings-FtcdX8xl.js → vue-ui-rings-BevKD8P-.js} +449 -423
  159. package/dist/{vue-ui-scatter-Cp_-2ahf.js → vue-ui-scatter-CNA7jF-o.js} +721 -702
  160. package/dist/{vue-ui-skeleton-COytVrfN.js → vue-ui-skeleton-B9ZP1w-i.js} +395 -387
  161. package/dist/{vue-ui-smiley-Da2jgkb7.js → vue-ui-smiley-DYnqqk6u.js} +128 -120
  162. package/dist/{vue-ui-spark-trend-DC2KUlEY.js → vue-ui-spark-trend-R0ebpg-G.js} +132 -117
  163. package/dist/{vue-ui-sparkbar-DdxQOFIF.js → vue-ui-sparkbar-DYC3By0v.js} +119 -111
  164. package/dist/{vue-ui-sparkgauge-DTA-fORH.js → vue-ui-sparkgauge-Bw6no-In.js} +76 -68
  165. package/dist/vue-ui-sparkhistogram-DvRKy8rq.js +590 -0
  166. package/dist/{vue-ui-sparkline-DcR_N-zT.js → vue-ui-sparkline-Dz1uzBos.js} +389 -364
  167. package/dist/vue-ui-sparkstackbar-DlnPdZih.js +692 -0
  168. package/dist/vue-ui-stackbar-B-THcavY.js +2350 -0
  169. package/dist/vue-ui-stackline-3dBPoI0h.js +2464 -0
  170. package/dist/{vue-ui-strip-plot-NLCwYvyw.js → vue-ui-strip-plot-ACeYOoHj.js} +505 -484
  171. package/dist/vue-ui-table-heatmap-DVwMqzje.js +364 -0
  172. package/dist/{vue-ui-table-AM9brdwU.js → vue-ui-table-rFy16bp0.js} +512 -504
  173. package/dist/{vue-ui-table-sparkline-BE6DAvur.js → vue-ui-table-sparkline-CABJzK8p.js} +207 -181
  174. package/dist/vue-ui-thermometer-CVQ-H69Q.js +777 -0
  175. package/dist/{vue-ui-timer-BZM5ITG9.js → vue-ui-timer-Bm8LpsnI.js} +66 -58
  176. package/dist/{vue-ui-tiremarks-BCncDpHX.js → vue-ui-tiremarks-DB3f5qiz.js} +127 -119
  177. package/dist/vue-ui-treemap-DP0Sx8Y8.js +1760 -0
  178. package/dist/vue-ui-waffle-iPpdk1Bm.js +1412 -0
  179. package/dist/vue-ui-wheel-BJkEYfLj.js +892 -0
  180. package/dist/{vue-ui-word-cloud-D7R7nhk1.js → vue-ui-word-cloud-B2sxtel9.js} +440 -432
  181. package/dist/{vue-ui-world-DZBt-07p.js → vue-ui-world-BBQZLnzm.js} +343 -335
  182. package/dist/vue-ui-xy-ChZg7AtI.js +1364 -0
  183. package/dist/{vue-ui-xy-CluEZ7lS.js → vue-ui-xy-DZj5DT-q.js} +1633 -1587
  184. package/dist/{vue-ui-xy-canvas-7YSYRdwr.js → vue-ui-xy-canvas-BN2u0bOJ.js} +456 -430
  185. package/dist/vue_ui_hill-dnltu0L-.js +368 -0
  186. package/package.json +2 -2
  187. package/dist/SlicerPreview-Cw6WMVhG.js +0 -1689
  188. package/dist/Title-BuPs74IB.js +0 -87
  189. package/dist/exposedLib-Ciw6TGtP.js +0 -25
  190. package/dist/useAutoSizeLabelsInsideViewbox-C9RNjsGv.js +0 -50
  191. package/dist/useMountedDelay-BAjrhRJb.js +0 -14
  192. package/dist/vue-ui-3d-bar-D5xHEWr1.js +0 -1824
  193. package/dist/vue-ui-age-pyramid-CAJg01c7.js +0 -1246
  194. package/dist/vue-ui-annotator-q3ZKx6ua.js +0 -2905
  195. package/dist/vue-ui-bullet-ByeaWGfI.js +0 -709
  196. package/dist/vue-ui-carousel-table-DO5NRXvX.js +0 -455
  197. package/dist/vue-ui-chestnut-BfeSPeEh.js +0 -2042
  198. package/dist/vue-ui-circle-pack-Cqmlw7AV.js +0 -1610
  199. package/dist/vue-ui-dashboard-DLvGJXJY.js +0 -512
  200. package/dist/vue-ui-donut-ZIRebAWc.js +0 -2418
  201. package/dist/vue-ui-dumbbell-gDYjU2oF.js +0 -1564
  202. package/dist/vue-ui-funnel-BtaYaU0r.js +0 -781
  203. package/dist/vue-ui-galaxy-BMp-HzDh.js +0 -1076
  204. package/dist/vue-ui-gauge-CBou0cFE.js +0 -925
  205. package/dist/vue-ui-horizontal-bar-BuwxI7d1.js +0 -1689
  206. package/dist/vue-ui-kpi-ByxoO01r.js +0 -96
  207. package/dist/vue-ui-mini-loader-D9pprk2c.js +0 -125
  208. package/dist/vue-ui-molecule-BqJJq49_.js +0 -932
  209. package/dist/vue-ui-onion-CRQOxurS.js +0 -1199
  210. package/dist/vue-ui-parallel-coordinate-plot-Dhn18RtR.js +0 -1412
  211. package/dist/vue-ui-quick-chart-DAhSXYnp.js +0 -2443
  212. package/dist/vue-ui-rating-DbxK-ftN.js +0 -352
  213. package/dist/vue-ui-relation-circle-Cb33DMZo.js +0 -917
  214. package/dist/vue-ui-ridgeline-D7aArzQk.js +0 -1627
  215. package/dist/vue-ui-sparkhistogram-D1oFTrvt.js +0 -575
  216. package/dist/vue-ui-sparkstackbar-BlFio0lP.js +0 -674
  217. package/dist/vue-ui-stackbar-Cu13EdVa.js +0 -2322
  218. package/dist/vue-ui-stackline-DKL0o_-3.js +0 -2427
  219. package/dist/vue-ui-table-heatmap-CSI482KG.js +0 -338
  220. package/dist/vue-ui-thermometer-D6Czx7Fb.js +0 -769
  221. package/dist/vue-ui-treemap-BOEYCOdk.js +0 -1727
  222. package/dist/vue-ui-waffle-BrM8IHdG.js +0 -1367
  223. package/dist/vue-ui-wheel-BNsajigQ.js +0 -884
  224. package/dist/vue-ui-xy-Dt_1bSBT.js +0 -1364
@@ -1,2443 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { At as t, C as n, Gt as r, K as i, Lt as a, N as o, Nt as s, Ot as c, W as l, Y as u, bt as ee, d, et as f, f as p, g as te, i as m, m as ne, qt as re, st as ie, t as ae, x as oe, y as h } from "./lib-CFm_J26b.js";
3
- import { t as se } from "./useTimeLabels-B9CEuiLZ.js";
4
- import { t as ce } from "./useConfig-C0V0eG7L.js";
5
- import { t as le } from "./usePrinter-BH-xle1O.js";
6
- import { n as ue, t as de } from "./BaseScanner-DZvpgOjM.js";
7
- import { t as fe } from "./useSvgExport-Ba9qBr9M.js";
8
- import { t as pe } from "./useNestedProp-BY6DNN3i.js";
9
- import { t as me } from "./useThemeCheck-C43Tcqmk.js";
10
- import { t as he } from "./useMountedDelay-BAjrhRJb.js";
11
- import { t as ge } from "./useTimeLabelCollider-AEcY4Ioe.js";
12
- import { t as _e } from "./img-Bikk1dGb.js";
13
- import { t as ve } from "./_plugin-vue_export-helper-B3ysoDQm.js";
14
- import { l as ye, t as be } from "./useResponsive-ZtArZtUf.js";
15
- import { t as xe } from "./BaseLegendToggle-DsWphmIb.js";
16
- import { t as Se } from "./A11yDataTable-DdRsVULz.js";
17
- import { t as Ce } from "./useChartAccessibility-DYqac8yF.js";
18
- import { t as we } from "./Slicer-C6qNUmZ4.js";
19
- import { t as Te } from "./vue_ui_quick_chart-mZBdml3Z.js";
20
- import { Fragment as g, Teleport as Ee, computed as _, createBlock as De, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as Oe, createVNode as ke, defineAsyncComponent as Ae, guardReactiveProps as x, mergeProps as je, nextTick as Me, normalizeClass as S, normalizeProps as C, normalizeStyle as w, onBeforeUnmount as Ne, onMounted as Pe, openBlock as T, ref as E, renderList as D, renderSlot as O, shallowRef as Fe, toDisplayString as k, toRefs as Ie, unref as A, watch as Le, watchEffect as Re, withCtx as j } from "vue";
21
- //#region src/chartDetector.js
22
- var M = {
23
- LINE: "LINE",
24
- BAR: "BAR",
25
- DONUT: "DONUT"
26
- }, ze = [
27
- "SERIE",
28
- "SERIES",
29
- "DATA",
30
- "VALUE",
31
- "VALUES",
32
- "NUM"
33
- ];
34
- function Be({ dataset: e, barLineSwitch: t = 6, debug: n = !0 }) {
35
- let r = null, i = null, a = 0;
36
- if ((typeof e == "number" || typeof e == "string") && n && console.warn(`The provided dataset (${e}) is not sufficient to build a chart`), He(e) && (Ue(e) && (r = e.length < t ? M.BAR : M.LINE, i = e, a = e.length), We(e))) {
37
- if (!Ke(e)) return n && console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."), !1;
38
- let o = Object.keys(e[0]), s = Object.values(e[0]);
39
- if (!o.some((e) => qe(e))) return n && console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."), !1;
40
- Je(s, (e) => typeof e == "number") && (r = M.DONUT, i = e), Je(s, (e) => Array.isArray(e) && Ue(e)) && (r = Ye(e) > t ? M.LINE : M.BAR, a = Ye(e), i = e.map((e) => ({
41
- ...e,
42
- data: Xe(e, (e) => Ue(e))
43
- }))), e = e.map((e) => Ze(e)), i = i.map((e) => Ze(e));
44
- }
45
- return {
46
- dataset: e,
47
- type: r,
48
- usableDataset: i,
49
- maxSeriesLength: a
50
- };
51
- }
52
- function Ve(e) {
53
- return !e || He(e) && !e.length;
54
- }
55
- function He(e) {
56
- return Array.isArray(e);
57
- }
58
- function Ue(e) {
59
- if (!He(e) || Ve(e)) return !1;
60
- let t = e.map((e) => Number(e));
61
- return ![...new Set(t.flatMap((e) => typeof e == "number" && !isNaN(e)))].includes(!1);
62
- }
63
- function We(e) {
64
- return !He(e) || Ve(e) || [...new Set(e.flatMap((e) => typeof e == "object" && !Array.isArray(e)))].includes(!1) ? !1 : !e.map((e) => Object.keys(e).length > 0).includes(!1);
65
- }
66
- function Ge(e, t) {
67
- let n = Object.keys(e).sort(), r = Object.keys(t).sort();
68
- if (n.length !== r.length) return !1;
69
- for (let i = 0; i < n.length; i += 1) {
70
- let a = n[i], o = r[i];
71
- if (a !== o || typeof e[a] != typeof t[o]) return !1;
72
- }
73
- return !0;
74
- }
75
- function Ke(e) {
76
- if (e.length <= 1) return !0;
77
- for (let t = 0; t < e.length; t += 1) for (let n = t + 1; n < e.length; n += 1) if (!Ge(e[t], e[n])) return !1;
78
- return !0;
79
- }
80
- function qe(e) {
81
- return ze.includes(e.toUpperCase());
82
- }
83
- function Je(e, t) {
84
- let n = [];
85
- for (let r = 0; r < e.length; r += 1) n.push(t(e[r]));
86
- return n.includes(!0);
87
- }
88
- function Ye(e) {
89
- return Math.max(...[...e].flatMap((e) => Object.values(e).filter((e) => Ue(e)).map((e) => e.length)));
90
- }
91
- function Xe(e, t) {
92
- return Object.values(e).filter((e) => t(e))[0];
93
- }
94
- function Ze(e) {
95
- let t = {};
96
- for (let n in e) e.hasOwnProperty(n) && (t[n.toUpperCase()] = e[n]);
97
- return t;
98
- }
99
- //#endregion
100
- //#region src/components/vue-ui-quick-chart.vue
101
- var N = /* @__PURE__ */ e({ default: () => P }), Qe = ["id"], $e = ["id"], et = ["id"], tt = { style: { position: "relative" } }, nt = [
102
- "xmlns",
103
- "aria-describedby",
104
- "viewBox"
105
- ], rt = [
106
- "x",
107
- "y",
108
- "width",
109
- "height"
110
- ], it = [
111
- "x",
112
- "y",
113
- "width",
114
- "height"
115
- ], at = ["width", "height"], ot = ["id"], st = ["id"], ct = ["id"], lt = ["flood-color"], ut = {
116
- key: 0,
117
- class: "donut-label-connectors"
118
- }, dt = [
119
- "d",
120
- "stroke",
121
- "stroke-width",
122
- "filter"
123
- ], ft = [
124
- "cx",
125
- "cy",
126
- "r",
127
- "fill",
128
- "filter"
129
- ], pt = { class: "donut" }, mt = [
130
- "d",
131
- "fill",
132
- "stroke",
133
- "stroke-width",
134
- "filter"
135
- ], ht = [
136
- "d",
137
- "onMouseenter",
138
- "onMouseout",
139
- "onClick"
140
- ], gt = {
141
- key: 1,
142
- class: "donut-labels quick-animation"
143
- }, _t = [
144
- "cx",
145
- "cy",
146
- "fill",
147
- "stroke",
148
- "filter"
149
- ], vt = [
150
- "text-anchor",
151
- "x",
152
- "y",
153
- "fill",
154
- "font-size",
155
- "filter"
156
- ], yt = [
157
- "text-anchor",
158
- "x",
159
- "y",
160
- "fill",
161
- "font-size",
162
- "filter"
163
- ], bt = {
164
- key: 2,
165
- class: "donut-hollow quick-animation"
166
- }, xt = [
167
- "x",
168
- "y",
169
- "font-size",
170
- "fill"
171
- ], St = [
172
- "x",
173
- "y",
174
- "font-size",
175
- "fill"
176
- ], Ct = {
177
- key: 0,
178
- class: "line-grid"
179
- }, wt = [
180
- "x1",
181
- "x2",
182
- "y1",
183
- "y2",
184
- "stroke",
185
- "stroke-width"
186
- ], Tt = [
187
- "x1",
188
- "x2",
189
- "y1",
190
- "y2",
191
- "stroke",
192
- "stroke-width"
193
- ], Et = {
194
- key: 1,
195
- class: "line-axis"
196
- }, Dt = [
197
- "x1",
198
- "x2",
199
- "y1",
200
- "y2",
201
- "stroke",
202
- "stroke-width"
203
- ], Ot = [
204
- "x1",
205
- "x2",
206
- "y1",
207
- "y2",
208
- "stroke",
209
- "stroke-width"
210
- ], kt = [
211
- "d",
212
- "stroke",
213
- "stroke-width"
214
- ], At = [
215
- "transform",
216
- "font-size",
217
- "fill"
218
- ], jt = {
219
- key: 3,
220
- class: "periodLabels"
221
- }, Mt = [
222
- "x1",
223
- "x2",
224
- "y1",
225
- "y2",
226
- "stroke",
227
- "stroke-width"
228
- ], Nt = { key: 0 }, Pt = [
229
- "font-size",
230
- "text-anchor",
231
- "fill",
232
- "transform"
233
- ], Ft = [
234
- "font-size",
235
- "text-anchor",
236
- "fill",
237
- "transform",
238
- "innerHTML"
239
- ], It = { class: "plots" }, Lt = [
240
- "d",
241
- "stroke",
242
- "stroke-width"
243
- ], Rt = [
244
- "d",
245
- "stroke",
246
- "stroke-width"
247
- ], zt = [
248
- "d",
249
- "stroke",
250
- "stroke-width"
251
- ], Bt = [
252
- "d",
253
- "stroke",
254
- "stroke-width"
255
- ], Vt = [
256
- "cx",
257
- "cy",
258
- "fill",
259
- "stroke"
260
- ], Ht = {
261
- key: 4,
262
- class: "dataLabels"
263
- }, Ut = [
264
- "font-size",
265
- "fill",
266
- "transform"
267
- ], Wt = {
268
- key: 5,
269
- class: "tooltip-traps"
270
- }, Gt = [
271
- "x",
272
- "y",
273
- "height",
274
- "width",
275
- "fill",
276
- "onMouseenter",
277
- "onMouseleave",
278
- "onClick"
279
- ], Kt = {
280
- key: 0,
281
- class: "line-grid"
282
- }, qt = [
283
- "x1",
284
- "x2",
285
- "y1",
286
- "y2",
287
- "stroke",
288
- "stroke-width"
289
- ], Jt = [
290
- "x1",
291
- "x2",
292
- "y1",
293
- "y2",
294
- "stroke",
295
- "stroke-width"
296
- ], Yt = {
297
- key: 1,
298
- class: "line-axis"
299
- }, Xt = [
300
- "x1",
301
- "x2",
302
- "y1",
303
- "y2",
304
- "stroke",
305
- "stroke-width"
306
- ], Zt = [
307
- "x1",
308
- "x2",
309
- "y1",
310
- "y2",
311
- "stroke",
312
- "stroke-width"
313
- ], Qt = [
314
- "d",
315
- "stroke",
316
- "stroke-width"
317
- ], $t = [
318
- "transform",
319
- "font-size",
320
- "fill"
321
- ], en = {
322
- key: 3,
323
- class: "periodLabels"
324
- }, tn = [
325
- "x1",
326
- "x2",
327
- "y1",
328
- "y2",
329
- "stroke",
330
- "stroke-width"
331
- ], nn = { key: 0 }, rn = [
332
- "font-size",
333
- "text-anchor",
334
- "fill",
335
- "transform"
336
- ], an = [
337
- "font-size",
338
- "text-anchor",
339
- "fill",
340
- "transform",
341
- "innerHTML"
342
- ], on = { class: "plots" }, sn = [
343
- "x",
344
- "width",
345
- "height",
346
- "y",
347
- "fill",
348
- "stroke",
349
- "stroke-width"
350
- ], cn = ["to"], ln = ["from", "to"], un = {
351
- key: 4,
352
- class: "dataLabels"
353
- }, dn = [
354
- "transform",
355
- "font-size",
356
- "fill"
357
- ], fn = {
358
- key: 5,
359
- class: "tooltip-traps"
360
- }, pn = [
361
- "x",
362
- "y",
363
- "height",
364
- "width",
365
- "fill",
366
- "onMouseenter",
367
- "onMouseleave",
368
- "onClick"
369
- ], mn = {
370
- key: 6,
371
- class: "axis-labels"
372
- }, hn = [
373
- "font-size",
374
- "fill",
375
- "x",
376
- "y"
377
- ], gn = [
378
- "font-size",
379
- "fill",
380
- "x",
381
- "y"
382
- ], _n = [
383
- "font-size",
384
- "fill",
385
- "transform"
386
- ], vn = [
387
- "font-size",
388
- "fill",
389
- "transform"
390
- ], yn = {
391
- key: 1,
392
- style: {
393
- position: "absolute",
394
- top: "100%",
395
- left: "0",
396
- width: "100%"
397
- },
398
- "data-dom-to-png-ignore": "",
399
- "aria-hidden": "true"
400
- }, bn = {
401
- key: 5,
402
- class: "vue-data-ui-watermark"
403
- }, xn = ["id"], Sn = ["onClick", "onKeydown"], Cn = ["onClick", "onKeydown"], wn = ["onClick", "onKeydown"], Tn = {
404
- key: 1,
405
- class: "vue-ui-quick-chart-not-processable"
406
- }, P = /*#__PURE__*/ ve({
407
- __name: "vue-ui-quick-chart",
408
- props: {
409
- config: {
410
- type: Object,
411
- default() {
412
- return {};
413
- }
414
- },
415
- dataset: {
416
- type: [
417
- Array,
418
- Object,
419
- String,
420
- Number
421
- ],
422
- default() {
423
- return null;
424
- }
425
- }
426
- },
427
- emits: [
428
- "selectDatapoint",
429
- "selectLegend",
430
- "copyAlt"
431
- ],
432
- setup(e, { expose: ve, emit: ze }) {
433
- let Ve = Ae(() => import("./BaseIcon-CP5RWnqt.js").then((e) => e.n)), He = Ae(() => import("./PackageVersion-B6Hokxw9.js").then((e) => e.t)), Ge = Ae(() => import("./PenAndPaper-CSMVXpg2.js").then((e) => e.t)), Ke = Ae(() => import("./Tooltip-CA1rtSyl.js")), qe = Ae(() => import("./UserOptions-DzAFK9cY.js").then((e) => e.n)), { vue_ui_quick_chart: Je } = ce(), { isThemeValid: Ye, warnInvalidTheme: Xe } = me(), { isReady: Ze } = he(300), N = e, P = E(null), En = E(null), Dn = E(null), On = E(null), F = E(i()), I = E(!1), kn = E(null), An = E(""), L = E(null), jn = E(null), Mn = E(null), R = E([]), Nn = E(0), Pn = E(0), Fn = E(!1), In = E(null), Ln = E(null), z = E(null), Rn = E(null), zn = E(null), Bn = E(null);
434
- E("#FFFFFF");
435
- let B = E(er()), Vn = _(() => !!B.value.debug), Hn = _(() => B.value.useCursorPointer), V = E(null), Un = E({
436
- x: 0,
437
- y: 0
438
- }), H = E("pointer"), Wn = E(!1), Gn = _(() => re({
439
- dafaultConfig: {
440
- backgroundColor: "#99999930",
441
- customPalette: ["#BABABA"],
442
- showDataLabels: !1,
443
- paletteStartIndex: 0,
444
- showUserOptions: !1,
445
- showTooltip: !1,
446
- xAxisLabel: "",
447
- yAxisLabel: "",
448
- xyAxisStroke: "#999999",
449
- xyGridStroke: "#99999950",
450
- xyPeriods: [],
451
- xyShowScale: !1,
452
- xyPaddingLeft: 6,
453
- xyPaddingBottom: 12,
454
- zoomXy: !1,
455
- zoomStartIndex: null,
456
- zoomEndIndex: null
457
- },
458
- userConfig: B.value.skeletonConfig ?? {}
459
- })), { loading: U, FINAL_DATASET: Kn, manualLoading: qn } = ue({
460
- ...Ie(N),
461
- FINAL_CONFIG: B,
462
- prepareConfig: er,
463
- callback: () => {
464
- Promise.resolve().then(async () => {
465
- await Me(), K.value === M.LINE && B.value.lineAnimated && !U.value && Rr({
466
- pathDuration: 1e3,
467
- pointDuration: 1200,
468
- labelDuration: 1200
469
- });
470
- });
471
- },
472
- skeletonDataset: N.config?.skeletonDataset ?? [
473
- 1,
474
- 2,
475
- 3,
476
- 5,
477
- 8,
478
- 13,
479
- 21,
480
- 34,
481
- 55,
482
- 89
483
- ],
484
- skeletonConfig: re({
485
- defaultConfig: B.value,
486
- userConfig: Gn.value
487
- })
488
- }), { svgRef: Jn } = Ce({ config: { text: B.value.title } }), Yn = _(() => B.value.showUserOptionsOnChartHover), Xn = _(() => B.value.keepUserOptionsStateOnChartLeave), Zn = E(!B.value.showUserOptionsOnChartHover), Qn = E(!1);
489
- function $n(e = !1) {
490
- Qn.value = e, Yn.value && (Zn.value = e);
491
- }
492
- function er() {
493
- let e = pe({
494
- userConfig: N.config,
495
- defaultConfig: Je
496
- }), t = {}, n = e.theme;
497
- if (n) if (!Ye.value(e)) Xe(e), t = e;
498
- else {
499
- let i = pe({
500
- userConfig: Te[n] || N.config,
501
- defaultConfig: e
502
- });
503
- t = {
504
- ...pe({
505
- userConfig: N.config,
506
- defaultConfig: i
507
- }),
508
- customPalette: e.customPalette.length ? e.customPalette : r[n] || s
509
- };
510
- }
511
- else t = e;
512
- return t;
513
- }
514
- Le(() => N.config, (e) => {
515
- U.value || (B.value = er()), q.value.width = B.value.width, q.value.height = B.value.height, Zn.value = !B.value.showUserOptionsOnChartHover, fr(), lr.value.showTooltip = B.value.showTooltip;
516
- }, { deep: !0 }), Le(() => N.dataset, (e) => {
517
- G.value = nr.value, X.value.start = 0, X.value.end = G.value.maxSeriesLength, Pn.value += 1;
518
- }, { deep: !0 }), Le(() => N.dataset, (e) => {
519
- Array.isArray(e) && e.length > 0 && (qn.value = !1);
520
- }, { immediate: !0 });
521
- let tr = _(() => n(B.value.customPalette)), W = ze, nr = _(() => {
522
- let e = Be({
523
- debug: Vn.value,
524
- dataset: a(Kn.value, [
525
- "serie",
526
- "series",
527
- "data",
528
- "value",
529
- "values",
530
- "num"
531
- ]),
532
- barLineSwitch: B.value.chartIsBarUnderDatasetLength
533
- });
534
- return !e && Vn.value && console.error("VueUiQuickChart : Dataset is not processable"), e;
535
- }), G = E(nr.value), rr = _(() => !!G.value), K = _(() => G.value ? G.value.type : null);
536
- Le(() => K.value, (e) => {
537
- e || f({
538
- componentName: "VueUiQuickChart",
539
- type: "dataset",
540
- debug: Vn.value
541
- });
542
- }, { immediate: !0 });
543
- let { isPrinting: ir, isImaging: ar, generatePdf: or, generateImage: sr } = le({
544
- elementId: `${K.value}_${F.value}`,
545
- fileName: B.value.title || K.value,
546
- options: B.value.userOptionsPrint
547
- }), cr = _(() => B.value.showUserOptions && !B.value.title), q = E({
548
- width: B.value.width,
549
- height: B.value.height
550
- }), lr = E({ showTooltip: B.value.showTooltip });
551
- Le(B, () => {
552
- lr.value = { showTooltip: B.value.showTooltip };
553
- }, { immediate: !0 });
554
- let ur = Fe(null), dr = Fe(null);
555
- Pe(async () => {
556
- Fn.value = !0, fr();
557
- });
558
- function fr() {
559
- if (t(N.dataset) || (qn.value = B.value.loading), B.value.responsive) {
560
- let e = ye(() => {
561
- let { width: e, height: t } = be({
562
- chart: P.value,
563
- title: B.value.title ? En.value : null,
564
- legend: B.value.showLegend ? Dn.value : null,
565
- slicer: [M.BAR, M.LINE].includes(K.value) && B.value.zoomXy && G.value.maxSeriesLength > 1 ? On.value : null,
566
- source: jn.value,
567
- noTitle: Mn.value
568
- });
569
- requestAnimationFrame(() => {
570
- q.value.width = e, q.value.height = t;
571
- });
572
- });
573
- ur.value && (dr.value && ur.value.unobserve(dr.value), ur.value.disconnect()), ur.value = new ResizeObserver(e), dr.value = P.value.parentNode, ur.value.observe(dr.value);
574
- }
575
- Er();
576
- }
577
- Ne(() => {
578
- ur.value && (dr.value && ur.value.unobserve(dr.value), ur.value.disconnect());
579
- });
580
- let pr = _(() => {
581
- switch (K.value) {
582
- case M.LINE: return `0 0 ${q.value.width <= 0 ? 10 : q.value.width} ${q.value.height <= 0 ? 10 : q.value.height}`;
583
- case M.BAR: return `0 0 ${q.value.width <= 0 ? 10 : q.value.width} ${q.value.height <= 0 ? 10 : q.value.height}`;
584
- case M.DONUT: return `0 0 ${q.value.width <= 0 ? 10 : q.value.width} ${q.value.height <= 0 ? 10 : q.value.height}`;
585
- default: return `0 0 ${q.value.width <= 0 ? 10 : q.value.width} ${q.value.height <= 0 ? 10 : q.value.height}`;
586
- }
587
- });
588
- function mr(e) {
589
- return [...e].map((e) => e.value).reduce((e, t) => e + t, 0);
590
- }
591
- function hr(e) {
592
- return B.value.blurOnHover && ![null, void 0].includes(L.value) && L.value !== e ? `url(#blur_${F.value})` : "";
593
- }
594
- function gr() {
595
- R.value.length ? R.value = [] : K.value === M.DONUT ? Y.value.legend.forEach((e) => {
596
- R.value.push(e.id);
597
- }) : K.value === M.LINE ? Z.value.legend.forEach((e) => {
598
- R.value.push(e.id);
599
- }) : K.value === M.BAR && Q.value.legend.forEach((e) => {
600
- R.value.push(e.id);
601
- }), K.value === M.DONUT ? W("selectLegend", Y.value.dataset) : K.value === M.LINE ? W("selectLegend", Z.value.dataset) : K.value === M.BAR && W("selectLegend", Q.value.dataset);
602
- }
603
- function _r(e, t) {
604
- R.value.includes(e) ? R.value = R.value.filter((t) => t !== e) : R.value.length < t && R.value.push(e);
605
- }
606
- let vr = E(null), yr = E(null), br = E(!1);
607
- function xr(e, t) {
608
- br.value = !0;
609
- let n = e.value, r = nr.value.dataset.find((t, n) => e.id === `donut_${n}`).VALUE;
610
- if (R.value.includes(e.id)) {
611
- R.value = R.value.filter((t) => t !== e.id);
612
- function t() {
613
- n > r ? (br.value = !1, cancelAnimationFrame(yr.value), G.value = {
614
- ...G.value,
615
- dataset: G.value.dataset.map((t, n) => e.id === `donut_${n}` ? {
616
- ...t,
617
- value: r,
618
- VALUE: r
619
- } : t)
620
- }, W("selectLegend", Y.value.dataset)) : (n += r * .025, G.value = {
621
- ...G.value,
622
- dataset: G.value.dataset.map((t, r) => e.id === `donut_${r}` ? {
623
- ...t,
624
- value: n,
625
- VALUE: n
626
- } : t)
627
- }, yr.value = requestAnimationFrame(t));
628
- }
629
- t();
630
- } else if (t.length > 1) {
631
- function t() {
632
- n < r / 100 ? (br.value = !1, cancelAnimationFrame(vr.value), R.value.push(e.id), G.value = {
633
- ...G.value,
634
- dataset: G.value.dataset.map((t, n) => e.id === `donut_${n}` ? {
635
- ...t,
636
- value: 0,
637
- VALUE: 0
638
- } : t)
639
- }, W("selectLegend", Y.value.dataset)) : (n /= 1.1, G.value = {
640
- ...G.value,
641
- dataset: G.value.dataset.map((t, r) => e.id === `donut_${r}` ? {
642
- ...t,
643
- value: n,
644
- VALUE: n
645
- } : t)
646
- }, vr.value = requestAnimationFrame(t));
647
- }
648
- t();
649
- } else W("selectLegend", Y.value.dataset);
650
- }
651
- let J = E(null);
652
- function Sr(e) {
653
- J.value = e;
654
- }
655
- let Cr = _(() => B.value.donutThicknessRatio < .01 ? .01 : B.value.donutThicknessRatio > .4 ? .4 : B.value.donutThicknessRatio), Y = _(() => {
656
- if (K.value !== M.DONUT) return null;
657
- let e = G.value.dataset.map((e, t) => ({
658
- ...e,
659
- value: e.VALUE || e.DATA || e.SERIE || e.VALUES || e.NUM || 0,
660
- name: e.NAME || e.DESCRIPTION || e.TITLE || e.LABEL || `Serie ${t}`,
661
- id: `donut_${t}`
662
- })).map((e, t) => ({
663
- ...e,
664
- color: e.COLOR ? oe(e.COLOR) : tr.value[t + B.value.paletteStartIndex] || s[t + B.value.paletteStartIndex] || s[(t + B.value.paletteStartIndex) % s.length],
665
- immutableValue: e.value
666
- }));
667
- function t(e, t) {
668
- return u({
669
- v: isNaN(e.value / mr(t)) ? 0 : e.value / mr(t) * 100,
670
- s: "%",
671
- r: B.value.dataLabelRoundingPercentage
672
- });
673
- }
674
- function n(e) {
675
- return e.proportion * 100 > B.value.donutHideLabelUnderPercentage;
676
- }
677
- function r(e, t) {
678
- let n = nr.value.dataset.find((t, n) => `donut_${n}` === e).VALUE;
679
- return Math.abs(String(Number(n.toFixed(0))).length - String(Number(t.toFixed(0))).length);
680
- }
681
- function i({ datapoint: t, seriesIndex: n, triggerMode: r = "pointer" }) {
682
- kn.value = {
683
- datapoint: t,
684
- seriesIndex: n,
685
- config: B.value,
686
- dataset: e
687
- }, L.value = t.id, V.value = n, H.value = r;
688
- let i = B.value.tooltipCustomFormat;
689
- if (B.value.events.datapointEnter && B.value.events.datapointEnter({
690
- datapoint: t,
691
- seriesIndex: n
692
- }), ee(i) && ie(() => i({
693
- datapoint: t,
694
- seriesIndex: n,
695
- series: e,
696
- config: B.value
697
- }))) An.value = i({
698
- datapoint: t,
699
- seriesIndex: n,
700
- series: e,
701
- config: B.value
702
- });
703
- else {
704
- let e = "";
705
- e += `<div style="width:100%;text-align:center;border-bottom:1px solid ${B.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, e += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, e += `<b>${m(B.value.formatter, t.value, u({
706
- p: B.value.valuePrefix,
707
- v: t.value,
708
- s: B.value.valueSuffix,
709
- r: B.value.dataLabelRoundingValue
710
- }), {
711
- datapoint: t,
712
- seriesIndex: n
713
- })}</b>`, e += `<span>(${u({
714
- v: t.proportion * 100,
715
- s: "%",
716
- r: B.value.dataLabelRoundingPercentage
717
- })})</span></div>`, An.value = `<div>${e}</div>`;
718
- }
719
- I.value = !0;
720
- }
721
- function a({ datapoint: e, seriesIndex: t }) {
722
- B.value.events.datapointLeave && B.value.events.datapointLeave({
723
- datapoint: e,
724
- seriesIndex: t
725
- }), I.value = !1, L.value = null, J.value = null, V.value = null, H.value = "pointer";
726
- }
727
- function o({ datapoint: e, seriesIndex: t }) {
728
- B.value.events.datapointClick && B.value.events.datapointClick({
729
- datapoint: e,
730
- seriesIndex: t
731
- }), W("selectDatapoint", e);
732
- }
733
- let l = {
734
- centerX: q.value.width / 2,
735
- centerY: q.value.height / 2
736
- }, d = e.filter((e) => !R.value.includes(e.id)).map((e) => e.value || 0).reduce((e, t) => e + t, 0), f = e.map((e, t) => ({
737
- ...e,
738
- proportion: (e.value || 0) / d,
739
- value: e.value || 0,
740
- absoluteValue: nr.value.dataset.find((t, n) => `donut_${n}` === e.id).VALUE,
741
- shape: "circle"
742
- })), p = q.value.width / 2, te = q.value.height / 2, ne = q.value.height * B.value.donutRadiusRatio;
743
- return {
744
- dataset: f.filter((e) => !R.value.includes(e.id)),
745
- legend: f,
746
- drawingArea: l,
747
- displayArcPercentage: t,
748
- isArcBigEnough: n,
749
- useTooltip: i,
750
- killTooltip: a,
751
- selectDatapoint: o,
752
- getSpaces: r,
753
- total: d,
754
- cx: p,
755
- cy: te,
756
- radius: ne,
757
- chart: c({ series: e.filter((e) => !R.value.includes(e.id)) }, p, te, ne, ne, 1.99999, 2, 1, 360, 105.25, q.value.height * Cr.value)
758
- };
759
- }), X = E({
760
- start: 0,
761
- end: G.value.maxSeriesLength
762
- });
763
- function wr() {
764
- Er();
765
- }
766
- let Tr = E(null);
767
- async function Er() {
768
- await Me(), await Me();
769
- let { zoomStartIndex: e, zoomEndIndex: t } = B.value, n = Tr.value;
770
- (e != null || t != null) && n ? (e != null && n.setStartValue(e), t != null && n.setEndValue(Dr(t + 1))) : (X.value = {
771
- start: 0,
772
- end: G.value.maxSeriesLength
773
- }, Pn.value += 1);
774
- }
775
- function Dr(e) {
776
- let t = G.value.maxSeriesLength;
777
- return e > t ? t : e < 0 || B.value.zoomStartIndex !== null && e < B.value.zoomStartIndex ? B.value.zoomStartIndex === null ? 1 : B.value.zoomStartIndex + 1 : e;
778
- }
779
- let Or = _(() => {
780
- if (!B.value.zoomMinimap.show || K.value === M.DONUT) return [];
781
- let e = [];
782
- Ue(G.value.dataset) && (e = G.value.dataset), We(G.value.dataset) && (e = G.value.dataset.map((e, t) => ({
783
- values: e.VALUE || e.DATA || e.SERIE || e.SERIES || e.VALUES || e.NUM || 0,
784
- id: K.value === M.LINE ? `line_${t}` : `bar_${t}`
785
- })).filter((e) => !R.value.includes(e.id)));
786
- let t = Ue(e) ? e.length : Math.max(...e.map((e) => e.values.length)), n = [];
787
- if (Ue(e)) n = e;
788
- else for (let r = 0; r < t; r += 1) n.push(e.map((e) => e.values[r] || 0).reduce((e, t) => (e || 0) + (t || 0), 0));
789
- let r = Math.min(...n);
790
- return n.map((e) => e + (r < 0 ? Math.abs(r) : 0));
791
- });
792
- function kr() {
793
- let e = 0;
794
- return Rn.value && (e = Array.from(Rn.value.querySelectorAll("text")).reduce((e, t) => {
795
- let n = t.getComputedTextLength();
796
- return n > e ? n : e;
797
- }, 0)), e + 4;
798
- }
799
- let Ar = E(0), jr = ye((e) => {
800
- Ar.value = e;
801
- }, 100);
802
- Re((e) => {
803
- let t = z.value;
804
- if (!t) return;
805
- let n = new ResizeObserver((e) => {
806
- jr(e[0].contentRect.height);
807
- });
808
- n.observe(t), e(() => n.disconnect());
809
- }), Ne(() => {
810
- Ar.value = 0;
811
- });
812
- let Mr = _(() => {
813
- let e = 0;
814
- return z.value && (e = Ar.value), 0 + e;
815
- }), Z = _(() => {
816
- if (K.value !== M.LINE) return null;
817
- let e = {
818
- height: q.value.height,
819
- width: q.value.width
820
- }, t = kr();
821
- if (z.value) {
822
- let e = z.value.getBBox().x;
823
- e < 0 && (t += Math.abs(e));
824
- }
825
- let n = {
826
- left: t + B.value.xyPaddingLeft,
827
- top: B.value.xyPaddingTop,
828
- right: e.width - B.value.xyPaddingRight,
829
- bottom: e.height - B.value.xyPaddingBottom - Mr.value,
830
- width: Math.max(10, e.width - B.value.xyPaddingLeft - B.value.xyPaddingRight - t),
831
- height: Math.max(10, e.height - B.value.xyPaddingTop - B.value.xyPaddingBottom - Mr.value)
832
- }, r = [];
833
- Ue(G.value.dataset) && (r = [{
834
- values: G.value.dataset.slice(X.value.start, X.value.end),
835
- absoluteValues: G.value.dataset,
836
- absoluteIndices: G.value.dataset.map((e, t) => t).slice(X.value.start, X.value.end),
837
- name: B.value.title,
838
- color: tr.value[B.value.paletteStartIndex] || s[B.value.paletteStartIndex],
839
- id: "line_0"
840
- }]), We(G.value.dataset) && (r = G.value.dataset.map((e, t) => ({
841
- ...e,
842
- values: e.VALUE || e.DATA || e.SERIE || e.SERIES || e.VALUES || e.NUM || 0,
843
- name: e.NAME || e.DESCRIPTION || e.TITLE || e.LABEL || `Serie ${t}`,
844
- id: `line_${t}`
845
- })).map((e, t) => ({
846
- ...e,
847
- color: e.COLOR ? oe(e.COLOR) : tr.value[t + B.value.paletteStartIndex] || s[t + B.value.paletteStartIndex] || s[(t + B.value.paletteStartIndex) % s.length],
848
- values: e.values.slice(X.value.start, X.value.end),
849
- absoluteValues: e.values,
850
- absoluteIndices: e.values.map((e, t) => t).slice(X.value.start, X.value.end)
851
- })));
852
- let i = {
853
- max: Math.max(...r.filter((e) => !R.value.includes(e.id)).flatMap((e) => e.values)),
854
- min: Math.min(...r.filter((e) => !R.value.includes(e.id)).flatMap((e) => e.values)),
855
- maxSeries: Math.max(...r.map((e) => e.values.length))
856
- }, a = i.max === i.min ? te(i.min, i.min + 1, B.value.xyScaleSegments) : te(i.min < 0 ? i.min : 0, i.max < 0 ? 0 : i.max, B.value.xyScaleSegments), o = i.min < 0 ? Math.abs(i.min) : 0, c = i.max < 0 ? n.top : n.bottom - o / (a.max + o) * n.height, l = n.width / i.maxSeries, d = a.ticks.map((e) => ({
857
- y: n.bottom - n.height * ((e + o) / (a.max + o)),
858
- x: n.left - 8,
859
- value: e
860
- })), f = r.map((e, t) => ({
861
- ...e,
862
- shape: "circle",
863
- coordinates: e.values.map((e, t) => ({
864
- x: n.left + l * (t + 1) - l / 2,
865
- y: n.bottom - (e + o) / (a.max + o) * n.height,
866
- value: e
867
- }))
868
- })).map((e) => {
869
- let t = [];
870
- return e.coordinates.forEach((e) => {
871
- t.push(`${e.x},${e.y} `);
872
- }), {
873
- ...e,
874
- linePath: t.join(" ")
875
- };
876
- });
877
- function p(e) {
878
- return r.map((t) => ({
879
- ...t,
880
- value: t.values[e],
881
- absoluteIndex: t.absoluteIndices[e]
882
- })).filter((e) => !R.value.includes(e.id));
883
- }
884
- function ne(e, t = "pointer") {
885
- L.value = e, J.value = e, V.value = e, H.value = t;
886
- let n = p(e);
887
- kn.value = {
888
- datapoint: n,
889
- seriesIndex: e,
890
- config: B.value,
891
- dataset: r
892
- };
893
- let i = B.value.tooltipCustomFormat;
894
- if (B.value.events.datapointEnter && B.value.events.datapointEnter({
895
- datapoint: n,
896
- seriesIndex: e + X.value.start
897
- }), ee(i) && ie(() => i({
898
- datapoint: n,
899
- seriesIndex: e,
900
- series: r,
901
- config: B.value
902
- }))) An.value = i({
903
- datapoint: n,
904
- seriesIndex: e,
905
- series: r,
906
- config: B.value
907
- });
908
- else {
909
- let e = "";
910
- $.value[n[0].absoluteIndex] && (e += `<div style="border-bottom:1px solid ${B.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${$.value[n[0].absoluteIndex].text}</div>`), n.forEach((t, n) => {
911
- e += `
912
- <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
913
- <svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>
914
- <span>${t.name}:</span>
915
- <b>${m(B.value.formatter, t.value, u({
916
- p: B.value.valuePrefix,
917
- v: t.value,
918
- s: B.value.valueSuffix,
919
- r: B.value.dataLabelRoundingValue
920
- }), {
921
- datapoint: t,
922
- seriesIndex: n
923
- })}
924
- </b>
925
- </div>
926
- `;
927
- }), An.value = e;
928
- }
929
- I.value = !0;
930
- }
931
- function re(e) {
932
- let t = p(e);
933
- B.value.events.datapointLeave && B.value.events.datapointLeave({
934
- datapoint: t,
935
- seriesIndex: e + X.value.start
936
- }), L.value = null, J.value = null, I.value = !1, V.value = null, H.value = "pointer";
937
- }
938
- function ae(e) {
939
- let t = p(e);
940
- B.value.events.datapointClick && B.value.events.datapointClick({
941
- datapoint: t,
942
- seriesIndex: e + X.value.start
943
- }), W("selectDatapoint", t);
944
- }
945
- return {
946
- absoluteZero: c,
947
- dataset: f.filter((e) => !R.value.includes(e.id)),
948
- legend: f,
949
- drawingArea: n,
950
- extremes: i,
951
- slotSize: l,
952
- yLabels: d,
953
- useTooltip: ne,
954
- killTooltip: re,
955
- selectDatapoint: ae
956
- };
957
- }), Q = _(() => {
958
- if (K.value !== M.BAR) return null;
959
- let e = {
960
- height: q.value.height,
961
- width: q.value.width
962
- }, t = kr();
963
- if (z.value) {
964
- let e = z.value.getBBox().x;
965
- e < 0 && (t += Math.abs(e));
966
- }
967
- let n = {
968
- left: t + B.value.xyPaddingLeft,
969
- top: B.value.xyPaddingTop,
970
- right: e.width - B.value.xyPaddingRight,
971
- bottom: e.height - B.value.xyPaddingBottom - Mr.value,
972
- width: Math.max(10, e.width - B.value.xyPaddingLeft - B.value.xyPaddingRight - t),
973
- height: Math.max(10, e.height - B.value.xyPaddingTop - B.value.xyPaddingBottom - Mr.value)
974
- }, r = [];
975
- Ue(G.value.dataset) && (r = [{
976
- values: G.value.dataset.slice(X.value.start, X.value.end),
977
- absoluteValues: G.value.dataset,
978
- absoluteIndices: G.value.dataset.map((e, t) => t).slice(X.value.start, X.value.end),
979
- name: B.value.title,
980
- color: tr.value[B.value.paletteStartIndex] || s[B.value.paletteStartIndex],
981
- id: "bar_0"
982
- }]), We(G.value.dataset) && (r = G.value.dataset.map((e, t) => ({
983
- ...e,
984
- values: e.VALUE || e.DATA || e.SERIE || e.SERIES || e.VALUES || e.NUM || 0,
985
- name: e.NAME || e.DESCRIPTION || e.TITLE || e.LABEL || `Serie ${t}`,
986
- id: `bar_${t}`
987
- })).map((e, t) => ({
988
- ...e,
989
- color: e.COLOR ? oe(e.COLOR) : tr.value[t + B.value.paletteStartIndex] || s[t + B.value.paletteStartIndex] || s[(t + B.value.paletteStartIndex) % s.length],
990
- values: e.values.slice(X.value.start, X.value.end),
991
- absoluteValues: e.values,
992
- absoluteIndices: e.values.map((e, t) => t).slice(X.value.start, X.value.end)
993
- })));
994
- let i = {
995
- max: Math.max(...r.filter((e) => !R.value.includes(e.id)).flatMap((e) => e.values)) < 0 ? 0 : Math.max(...r.filter((e) => !R.value.includes(e.id)).flatMap((e) => e.values)) ?? 1,
996
- min: Math.min(...r.filter((e) => !R.value.includes(e.id)).flatMap((e) => e.values)) ?? 0,
997
- maxSeries: Math.max(...r.filter((e) => !R.value.includes(e.id)).map((e) => e.values.length)) ?? 0
998
- }, a = i.min === i.max ? te(i.min, i.min + 1, B.value.xyScaleSegments) : te(i.min < 0 ? i.min : 0, i.max, B.value.xyScaleSegments), o = a.min < 0 ? Math.abs(a.min) : 0, c = n.bottom - o / (a.max + o) * n.height, l = n.width / i.maxSeries, d = a.ticks.map((e) => ({
999
- y: n.bottom - n.height * ((e + o) / (a.max + o)),
1000
- x: n.left - 8,
1001
- value: e
1002
- })), f = r.map((e, t) => ({
1003
- ...e,
1004
- shape: "square",
1005
- coordinates: e.values.map((e, a) => {
1006
- let s = (e + o) / (i.max + o) * n.height, u = Math.abs(e) / Math.abs(i.min) * (n.height - c), ee = o / (i.max + o) * n.height, d = l / r.filter((e) => !R.value.includes(e.id)).length - B.value.barGap / r.filter((e) => !R.value.includes(e.id)).length;
1007
- return {
1008
- x: n.left + l * a + d * t + B.value.barGap / 2,
1009
- y: e > 0 ? n.bottom - s : c,
1010
- height: e > 0 ? s - ee : u,
1011
- value: e,
1012
- width: d
1013
- };
1014
- })
1015
- })), p = r.filter((e) => !R.value.includes(e.id)).map((e, t) => ({
1016
- ...e,
1017
- coordinates: e.values.map((e, a) => {
1018
- let s = (e + o) / (i.max + o) * n.height, u = Math.abs(e) / (i.max + o) * n.height, ee = o / (i.max + o) * n.height, d = l / r.filter((e) => !R.value.includes(e.id)).length - B.value.barGap / r.filter((e) => !R.value.includes(e.id)).length;
1019
- return {
1020
- x: n.left + l * a + d * t + B.value.barGap / 2,
1021
- y: e > 0 ? n.bottom - s : c,
1022
- height: e > 0 ? s - ee : u,
1023
- value: e,
1024
- width: d
1025
- };
1026
- })
1027
- }));
1028
- function ne(e) {
1029
- return r.map((t) => ({
1030
- ...t,
1031
- value: t.values[e],
1032
- absoluteIndex: t.absoluteIndices[e]
1033
- })).filter((e) => !R.value.includes(e.id));
1034
- }
1035
- function re(e, t = "pointer") {
1036
- L.value = e, J.value = e, V.value = e, H.value = t;
1037
- let n = ne(e);
1038
- kn.value = {
1039
- datapoint: n,
1040
- seriesIndex: e,
1041
- config: B.value,
1042
- dataset: r
1043
- };
1044
- let i = B.value.tooltipCustomFormat;
1045
- if (B.value.events.datapointEnter && B.value.events.datapointEnter({
1046
- datapoint: n,
1047
- seriesIndex: e + X.value.start
1048
- }), ee(i) && ie(() => i({
1049
- datapoint: n,
1050
- seriesIndex: e,
1051
- series: r,
1052
- config: B.value
1053
- }))) An.value = i({
1054
- point: n,
1055
- seriesIndex: e,
1056
- series: r,
1057
- config: B.value
1058
- });
1059
- else {
1060
- let e = "";
1061
- $.value[n[0].absoluteIndex] && (e += `<div style="border-bottom:1px solid ${B.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${$.value[n[0].absoluteIndex].text}</div>`), n.forEach((t, n) => {
1062
- e += `
1063
- <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
1064
- <svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${t.color}"/></svg>
1065
- <span>${t.name}:</span>
1066
- <b>${m(B.value.formatter, t.value, u({
1067
- p: B.value.valuePrefix,
1068
- v: t.value,
1069
- s: B.value.valueSuffix,
1070
- r: B.value.dataLabelRoundingValue
1071
- }), {
1072
- datapoint: t,
1073
- seriesIndex: n
1074
- })}
1075
- </b>
1076
- </div>
1077
- `;
1078
- }), An.value = e;
1079
- }
1080
- I.value = !0;
1081
- }
1082
- function ae(e) {
1083
- let t = ne(e);
1084
- B.value.events.datapointLeave && B.value.events.datapointLeave({
1085
- datapoint: t,
1086
- seriesIndex: e + X.value.start
1087
- }), I.value = !1, L.value = null, J.value = null, V.value = null, H.value = "pointer";
1088
- }
1089
- function h(e) {
1090
- let t = ne(e);
1091
- B.value.events.datapointClick && B.value.events.datapointClick({
1092
- datapoint: t,
1093
- seriesIndex: e + X.value.start
1094
- }), W("selectDatapoint", t);
1095
- }
1096
- return {
1097
- absoluteZero: c,
1098
- dataset: p.filter((e) => !R.value.includes(e.id)),
1099
- absoluteDataset: p,
1100
- legend: f,
1101
- drawingArea: n,
1102
- extremes: i,
1103
- slotSize: l,
1104
- yLabels: d,
1105
- useTooltip: re,
1106
- killTooltip: ae,
1107
- selectDatapoint: h
1108
- };
1109
- });
1110
- function Nr(e) {
1111
- if (!e) return;
1112
- let t = e.getTotalLength();
1113
- e.style.transition = "none", e.style.strokeDasharray = `${t}`, e.style.strokeDashoffset = `${t}`;
1114
- }
1115
- function Pr(e, { fromOpacity: t = "0", fromScale: n = "0.85" } = {}) {
1116
- e.forEach((e) => {
1117
- e.style.animation = "none", e.style.transition = "none", e.style.opacity = t, e.style.transform = `scale(${n})`, e.style.transformBox = "fill-box", e.style.transformOrigin = "50% 50%";
1118
- });
1119
- }
1120
- function Fr(e) {
1121
- return e.cx?.baseVal?.value ?? parseFloat(e.getAttribute("cx"));
1122
- }
1123
- function Ir(e) {
1124
- let t = e.getAttribute("x");
1125
- if (t != null) return parseFloat(t);
1126
- let n = e.getCTM?.();
1127
- return n ? n.e : 0;
1128
- }
1129
- function Lr(e, t) {
1130
- if (!e.length) return [];
1131
- let n = e.map((e) => ({
1132
- el: e,
1133
- x: t(e)
1134
- })).filter((e) => Number.isFinite(e.x));
1135
- n.sort((e, t) => e.x - t.x);
1136
- let r = Infinity;
1137
- for (let e = 1; e < n.length; e++) {
1138
- let t = n[e].x - n[e - 1].x;
1139
- t > 0 && t < r && (r = t);
1140
- }
1141
- let i = (r === Infinity ? 1 : r) / 2, a = [], o = {
1142
- x: n[0].x,
1143
- items: [n[0].el]
1144
- };
1145
- for (let e = 1; e < n.length; e++) {
1146
- let { x: t, el: r } = n[e];
1147
- Math.abs(t - o.x) <= i ? o.items.push(r) : (a.push(o), o = {
1148
- x: t,
1149
- items: [r]
1150
- });
1151
- }
1152
- return a.push(o), a;
1153
- }
1154
- function Rr({ pathDuration: e, pathEasing: t = "ease-in-out", pointDuration: n, labelDuration: r, pointDelay: i = 0, labelDelay: a = 0, pointStep: o = 0, labelStep: s = 0, intraSeriesStep: c = 0 } = {}) {
1155
- let l = Array.isArray(In?.value) ? In.value : [In?.value].filter(Boolean), u = Array.isArray(Ln?.value) ? Ln.value : [Ln?.value].filter(Boolean), ee = [...l, ...u].filter(Boolean), d = P?.value || null, f = d ? Array.from(d.querySelectorAll(".vue-ui-quick-chart-plot")) : [], p = d ? Array.from(d.querySelectorAll(".vue-ui-quick-chart-label")) : [];
1156
- ee.forEach(Nr), Pr(f, {
1157
- fromOpacity: "0",
1158
- fromScale: "0.75"
1159
- }), Pr(p, {
1160
- fromOpacity: "0",
1161
- fromScale: "0.98"
1162
- }), f.forEach((e) => e.classList.remove("quick-animation")), p.forEach((e) => e.classList.remove("quick-animation")), d && d.offsetWidth;
1163
- let te = f.length ? Lr(f, Fr) : [], m = p.length ? Lr(p, Ir) : [];
1164
- requestAnimationFrame(() => {
1165
- requestAnimationFrame(() => {
1166
- ee.forEach((n) => {
1167
- n.style.transition = `stroke-dashoffset ${e}ms ${t}`, n.style.strokeDashoffset = "0";
1168
- }), te.forEach((e, t) => {
1169
- e.items.forEach((e, r) => {
1170
- let a = i + t * o + r * c;
1171
- e.style.transition = `opacity ${n}ms ease-out ${a}ms, transform ${n}ms ease-out ${a}ms`, e.style.opacity = "1", e.style.transform = "scale(1)";
1172
- });
1173
- }), m.forEach((e, t) => {
1174
- e.items.forEach((e, n) => {
1175
- let i = a + t * s + n * c;
1176
- e.style.transition = `opacity ${r}ms ease-out ${i}ms, transform ${r}ms ease-out ${i}ms`, e.style.opacity = "1", e.style.transform = "scale(1)";
1177
- });
1178
- });
1179
- });
1180
- });
1181
- }
1182
- let zr = _(() => {
1183
- if (K.value === M.LINE) return Z.value.legend.map((e) => (Math.min(...e.absoluteValues.map((e) => e ?? 0)), {
1184
- ...e,
1185
- isVisible: !R.value.includes(e.id),
1186
- type: "line",
1187
- series: e.absoluteValues
1188
- }));
1189
- if (K.value === M.BAR) return Q.value.legend.map((e) => (Math.min(...e.absoluteValues.map((e) => e ?? 0)), {
1190
- ...e,
1191
- isVisible: !R.value.includes(e.id),
1192
- type: "bar",
1193
- series: e.absoluteValues
1194
- }));
1195
- }), $ = E([]), Br = 0;
1196
- Re(() => {
1197
- let e = ++Br;
1198
- (async () => {
1199
- let t = await se({
1200
- values: B.value.xyPeriods,
1201
- maxDatapoints: G.value.maxSeriesLength,
1202
- formatter: B.value.datetimeFormatter,
1203
- start: X.value.start,
1204
- end: X.value.end
1205
- });
1206
- e === Br && ($.value = t);
1207
- })();
1208
- });
1209
- let Vr = _(() => {
1210
- let e = B.value.xyPeriodsModulo;
1211
- return B.value.xyPeriods.length ? Math.min(e, [...new Set($.value.map((e) => e.text))].length) : e;
1212
- }), Hr = E(!1);
1213
- function Ur(e) {
1214
- Hr.value = e, Nn.value += 1;
1215
- }
1216
- function Wr() {
1217
- lr.value.showTooltip = !lr.value.showTooltip;
1218
- }
1219
- let Gr = E(!1);
1220
- function Kr() {
1221
- Gr.value = !Gr.value;
1222
- }
1223
- async function qr({ scale: e = 2 } = {}) {
1224
- if (!P.value) return;
1225
- let { width: t, height: n } = P.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await _e({
1226
- domElement: P.value,
1227
- base64: !0,
1228
- img: !0,
1229
- scale: e
1230
- });
1231
- return {
1232
- imageUri: i,
1233
- base64: a,
1234
- title: B.value.title,
1235
- width: t,
1236
- height: n,
1237
- aspectRatio: r
1238
- };
1239
- }
1240
- let Jr = _(() => q.value.width), Yr = _(() => q.value.height);
1241
- ge({
1242
- timeLabelsEls: z,
1243
- timeLabels: $,
1244
- slicer: X,
1245
- configRef: B,
1246
- rotationPath: ["xyPeriodLabelsRotation"],
1247
- autoRotatePath: ["xyPeriodLabelsAutoRotate", "enable"],
1248
- isAutoSize: !1,
1249
- rotation: B.value.xyPeriodLabelsAutoRotate.angle,
1250
- height: Yr.value,
1251
- width: Jr.value
1252
- });
1253
- let Xr = _(() => B.value.backgroundColor), Zr = _(() => K.value === M.DONUT ? Y.value.legend : K.value === M.LINE ? Z.value.legend : Q.value.legend), Qr = _(() => ({
1254
- show: B.value.showLegend,
1255
- bold: !1,
1256
- backgroundColor: B.value.backgroundColor,
1257
- color: B.value.color,
1258
- fontSize: B.value.legendFontSize,
1259
- position: B.value.legendPosition
1260
- })), { exportSvg: $r, getSvg: ei } = fe({
1261
- svg: Jn,
1262
- title: _(() => ({
1263
- text: B.value.title,
1264
- color: B.value.color,
1265
- fontSize: B.value.titleFontSize,
1266
- bold: B.value.titleBold,
1267
- textAlign: B.value.titleTextAlign,
1268
- subtitle: { text: "" }
1269
- })),
1270
- legend: Qr,
1271
- legendItems: Zr,
1272
- backgroundColor: Xr
1273
- });
1274
- async function ti({ isCb: e }) {
1275
- if (e) {
1276
- let { blob: e, url: t, text: n, dataUrl: r } = await ei();
1277
- B.value.userOptionsCallbacks.svg({
1278
- blob: e,
1279
- url: t,
1280
- text: n,
1281
- dataUrl: r
1282
- });
1283
- } else $r();
1284
- }
1285
- async function ni() {
1286
- if (W("copyAlt", {
1287
- config: B.value,
1288
- dataset: {
1289
- line: Z.value,
1290
- bar: Q.value,
1291
- donut: Y.value
1292
- }
1293
- }), !B.value.userOptionsCallbacks.altCopy) {
1294
- console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1295
- return;
1296
- }
1297
- await Promise.resolve(B.value.userOptionsCallbacks.altCopy({
1298
- config: B.value,
1299
- dataset: {
1300
- line: Z.value,
1301
- bar: Q.value,
1302
- donut: Y.value
1303
- }
1304
- }));
1305
- }
1306
- function ri(e, t) {
1307
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
1308
- }
1309
- let ii = _(() => K.value === M.DONUT ? Y.value?.chart?.length ?? 0 : K.value === M.LINE ? Z.value?.extremes?.maxSeries ?? 0 : K.value === M.BAR ? Q.value?.extremes?.maxSeries ?? 0 : 0);
1310
- function ai() {
1311
- V.value = null, Wn.value = !0;
1312
- }
1313
- function oi() {
1314
- V.value = null, H.value = "pointer", I.value = !1, L.value = null, J.value = null, Wn.value = !1;
1315
- }
1316
- function si(e) {
1317
- if (!Jn.value || Gr.value || document.activeElement !== Jn.value || !ii.value) return;
1318
- let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1319
- if (!t && !n && !r && !i) return;
1320
- if (e.preventDefault(), e.stopPropagation(), i) {
1321
- V.value = null, H.value = "pointer", I.value = !1, L.value = null, J.value = null;
1322
- return;
1323
- }
1324
- if (r) {
1325
- if (V.value === null) return;
1326
- if (K.value === M.DONUT) {
1327
- let e = Y.value?.chart?.[V.value];
1328
- if (!e) return;
1329
- Y.value.selectDatapoint({
1330
- datapoint: e,
1331
- seriesIndex: V.value
1332
- });
1333
- return;
1334
- }
1335
- if (K.value === M.LINE) {
1336
- Z.value?.selectDatapoint(V.value);
1337
- return;
1338
- }
1339
- if (K.value === M.BAR) {
1340
- Q.value?.selectDatapoint(V.value);
1341
- return;
1342
- }
1343
- return;
1344
- }
1345
- let a = V.value, o = J.value, s = a !== null && a >= 0 && a < ii.value, c = o !== null && o >= 0 && o < ii.value;
1346
- if (s ? n ? (a += 1, a >= ii.value && (a = 0)) : t && (--a, a < 0 && (a = ii.value - 1)) : c ? (a = n ? o + 1 : o - 1, a >= ii.value && (a = 0), a < 0 && (a = ii.value - 1)) : a = n ? 0 : ii.value - 1, K.value === M.DONUT) {
1347
- let e = Y.value?.chart?.[a];
1348
- if (!e) return;
1349
- ci(a), Y.value.useTooltip({
1350
- datapoint: e,
1351
- seriesIndex: a,
1352
- triggerMode: "keyboard"
1353
- });
1354
- return;
1355
- }
1356
- if (K.value === M.LINE) {
1357
- ci(a), Z.value?.useTooltip(a, "keyboard");
1358
- return;
1359
- }
1360
- K.value === M.BAR && (ci(a), Q.value?.useTooltip(a, "keyboard"));
1361
- }
1362
- function ci(e) {
1363
- if (!Number.isFinite(e) || !Jn.value) return;
1364
- let t = 0, n = 0;
1365
- if (K.value === M.DONUT) {
1366
- let r = Y.value?.chart?.[e];
1367
- if (!r) return;
1368
- t = d(r, !0).x, n = p(r);
1369
- }
1370
- if (K.value === M.LINE) {
1371
- let r = Z.value?.drawingArea, i = Z.value?.slotSize;
1372
- if (!r || !i) return;
1373
- t = r.left + i * (e + 1) - i / 2, n = r.top + r.height / 2;
1374
- }
1375
- if (K.value === M.BAR) {
1376
- let r = Q.value?.drawingArea, i = Q.value?.slotSize;
1377
- if (!r || !i) return;
1378
- t = r.left + i * (e + 1) - i / 2, n = r.top + r.height / 2;
1379
- }
1380
- let r = Jn.value.getBoundingClientRect();
1381
- Un.value = {
1382
- x: r.left + t / q.value.width * r.width,
1383
- y: r.top + n / q.value.height * r.height
1384
- };
1385
- }
1386
- let li = _(() => {
1387
- if (K.value === M.DONUT) return {
1388
- headers: [
1389
- "Series",
1390
- "Value",
1391
- "Percentage"
1392
- ],
1393
- rows: (Y.value?.dataset ?? []).map((e) => {
1394
- let t = Y.value?.total ? u({
1395
- v: e.value / Y.value.total * 100,
1396
- s: "%",
1397
- r: B.value.dataLabelRoundingPercentage
1398
- }) : "0%";
1399
- return [
1400
- e.name,
1401
- m(B.value.formatter, e.value, u({
1402
- p: B.value.valuePrefix,
1403
- v: e.value,
1404
- s: B.value.valueSuffix,
1405
- r: B.value.dataLabelRoundingValue
1406
- })),
1407
- t
1408
- ];
1409
- })
1410
- };
1411
- if (K.value === M.LINE || K.value === M.BAR) {
1412
- let e = K.value === M.LINE ? Z.value?.dataset ?? [] : Q.value?.dataset ?? [], t = K.value === M.LINE ? Z.value?.extremes?.maxSeries ?? 0 : Q.value?.extremes?.maxSeries ?? 0;
1413
- return {
1414
- headers: ["Index", ...e.map((e) => e.name)],
1415
- rows: Array.from({ length: t }, (t, n) => [$.value?.[n + X.value.start]?.text ?? String(n + X.value.start), ...e.map((e) => {
1416
- let t = e.values?.[n];
1417
- return m(B.value.formatter, t, u({
1418
- p: B.value.valuePrefix,
1419
- v: t,
1420
- s: B.value.valueSuffix,
1421
- r: B.value.dataLabelRoundingValue
1422
- }));
1423
- })])
1424
- };
1425
- }
1426
- return {
1427
- headers: [],
1428
- rows: []
1429
- };
1430
- });
1431
- return ve({
1432
- getImage: qr,
1433
- generatePdf: or,
1434
- generateImage: sr,
1435
- generateSvg: ti,
1436
- toggleTooltip: Wr,
1437
- toggleAnnotator: Kr,
1438
- toggleFullscreen: Ur,
1439
- copyAlt: ni
1440
- }), (e, t) => rr.value ? (T(), y("div", {
1441
- key: 0,
1442
- id: `${K.value}_${F.value}`,
1443
- ref_key: "quickChart",
1444
- ref: P,
1445
- class: S({
1446
- "vue-data-ui-component": !0,
1447
- "vue-ui-quick-chart": !0,
1448
- "vue-data-ui-wrapper-fullscreen": Hr.value
1449
- }),
1450
- style: w(`background:${B.value.backgroundColor};color:${B.value.color};font-family:${B.value.fontFamily}; position: relative; ${B.value.responsive ? "height: 100%" : ""}`),
1451
- onMouseenter: t[2] ||= () => $n(!0),
1452
- onMouseleave: t[3] ||= () => $n(!1)
1453
- }, [
1454
- b("div", {
1455
- id: `chart-instructions-${F.value}`,
1456
- class: "sr-only"
1457
- }, [b("p", null, k(B.value.a11y.translations.keyboardNavigation), 1)], 8, $e),
1458
- li.value.rows.length ? (T(), De(Se, {
1459
- key: 0,
1460
- uid: F.value,
1461
- head: li.value.headers,
1462
- body: li.value.rows,
1463
- notice: B.value.a11y.translations.tableAvailable,
1464
- caption: B.value.a11y.translations.tableCaption
1465
- }, null, 8, [
1466
- "uid",
1467
- "head",
1468
- "body",
1469
- "notice",
1470
- "caption"
1471
- ])) : v("", !0),
1472
- B.value.userOptionsButtons.annotator ? (T(), De(A(Ge), {
1473
- key: 1,
1474
- svgRef: A(Jn),
1475
- backgroundColor: B.value.backgroundColor,
1476
- color: B.value.color,
1477
- active: Gr.value,
1478
- isCursorPointer: Hn.value,
1479
- onClose: Kr
1480
- }, {
1481
- "annotator-action-close": j(() => [O(e.$slots, "annotator-action-close", {}, void 0, !0)]),
1482
- "annotator-action-color": j(({ color: t }) => [O(e.$slots, "annotator-action-color", C(x({ color: t })), void 0, !0)]),
1483
- "annotator-action-draw": j(({ mode: t }) => [O(e.$slots, "annotator-action-draw", C(x({ mode: t })), void 0, !0)]),
1484
- "annotator-action-undo": j(({ disabled: t }) => [O(e.$slots, "annotator-action-undo", C(x({ disabled: t })), void 0, !0)]),
1485
- "annotator-action-redo": j(({ disabled: t }) => [O(e.$slots, "annotator-action-redo", C(x({ disabled: t })), void 0, !0)]),
1486
- "annotator-action-delete": j(({ disabled: t }) => [O(e.$slots, "annotator-action-delete", C(x({ disabled: t })), void 0, !0)]),
1487
- _: 3
1488
- }, 8, [
1489
- "svgRef",
1490
- "backgroundColor",
1491
- "color",
1492
- "active",
1493
- "isCursorPointer"
1494
- ])) : v("", !0),
1495
- cr.value ? (T(), y("div", {
1496
- key: 2,
1497
- ref_key: "noTitle",
1498
- ref: Mn,
1499
- class: "vue-data-ui-no-title-space",
1500
- style: "height:36px; width: 100%;background:transparent"
1501
- }, null, 512)) : v("", !0),
1502
- B.value.showUserOptions && (Xn.value || Zn.value) ? (T(), De(A(qe), {
1503
- ref: "details",
1504
- key: `user_option_${Nn.value}`,
1505
- backgroundColor: B.value.backgroundColor,
1506
- color: B.value.color,
1507
- isPrinting: A(ir),
1508
- isImaging: A(ar),
1509
- uid: F.value,
1510
- hasTooltip: B.value.userOptionsButtons.tooltip && B.value.showTooltip,
1511
- hasPdf: B.value.userOptionsButtons.pdf,
1512
- hasImg: B.value.userOptionsButtons.img,
1513
- hasSvg: B.value.userOptionsButtons.svg,
1514
- hasFullscreen: B.value.userOptionsButtons.fullscreen,
1515
- hasAltCopy: B.value.userOptionsButtons.altCopy,
1516
- hasXls: !1,
1517
- isTooltip: lr.value.showTooltip,
1518
- isFullscreen: Hr.value,
1519
- titles: { ...B.value.userOptionsButtonTitles },
1520
- chartElement: P.value,
1521
- position: B.value.userOptionsPosition,
1522
- hasAnnotator: B.value.userOptionsButtons.annotator,
1523
- isAnnotation: Gr.value,
1524
- callbacks: B.value.userOptionsCallbacks,
1525
- printScale: B.value.userOptionsPrint.scale,
1526
- isCursorPointer: Hn.value,
1527
- onToggleFullscreen: Ur,
1528
- onGeneratePdf: A(or),
1529
- onGenerateImage: A(sr),
1530
- onGenerateSvg: ti,
1531
- onToggleTooltip: Wr,
1532
- onToggleAnnotator: Kr,
1533
- onCopyAlt: ni,
1534
- style: w({ visibility: Xn.value ? Zn.value ? "visible" : "hidden" : "visible" })
1535
- }, Oe({ _: 2 }, [
1536
- e.$slots.menuIcon ? {
1537
- name: "menuIcon",
1538
- fn: j(({ isOpen: t, color: n }) => [O(e.$slots, "menuIcon", C(x({
1539
- isOpen: t,
1540
- color: n
1541
- })), void 0, !0)]),
1542
- key: "0"
1543
- } : void 0,
1544
- e.$slots.optionTooltip ? {
1545
- name: "optionTooltip",
1546
- fn: j(() => [O(e.$slots, "optionTooltip", {}, void 0, !0)]),
1547
- key: "1"
1548
- } : void 0,
1549
- e.$slots.optionPdf ? {
1550
- name: "optionPdf",
1551
- fn: j(() => [O(e.$slots, "optionPdf", {}, void 0, !0)]),
1552
- key: "2"
1553
- } : void 0,
1554
- e.$slots.optionImg ? {
1555
- name: "optionImg",
1556
- fn: j(() => [O(e.$slots, "optionImg", {}, void 0, !0)]),
1557
- key: "3"
1558
- } : void 0,
1559
- e.$slots.optionSvg ? {
1560
- name: "optionSvg",
1561
- fn: j(() => [O(e.$slots, "optionSvg", {}, void 0, !0)]),
1562
- key: "4"
1563
- } : void 0,
1564
- e.$slots.optionFullscreen ? {
1565
- name: "optionFullscreen",
1566
- fn: j(({ toggleFullscreen: t, isFullscreen: n }) => [O(e.$slots, "optionFullscreen", C(x({
1567
- toggleFullscreen: t,
1568
- isFullscreen: n
1569
- })), void 0, !0)]),
1570
- key: "5"
1571
- } : void 0,
1572
- e.$slots.optionAnnotator ? {
1573
- name: "optionAnnotator",
1574
- fn: j(({ toggleAnnotator: t, isAnnotator: n }) => [O(e.$slots, "optionAnnotator", C(x({
1575
- toggleAnnotator: t,
1576
- isAnnotator: n
1577
- })), void 0, !0)]),
1578
- key: "6"
1579
- } : void 0,
1580
- e.$slots.optionAltCopy ? {
1581
- name: "optionAltCopy",
1582
- fn: j(({ altCopy: t }) => [O(e.$slots, "optionAltCopy", C(x({ altCopy: t })), void 0, !0)]),
1583
- key: "7"
1584
- } : void 0,
1585
- e.$slots["custom-menu-before"] ? {
1586
- name: "custom-menu-before",
1587
- fn: j(() => [O(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1588
- key: "8"
1589
- } : void 0,
1590
- e.$slots["custom-menu-after"] ? {
1591
- name: "custom-menu-after",
1592
- fn: j(() => [O(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1593
- key: "9"
1594
- } : void 0
1595
- ]), 1032, [
1596
- "backgroundColor",
1597
- "color",
1598
- "isPrinting",
1599
- "isImaging",
1600
- "uid",
1601
- "hasTooltip",
1602
- "hasPdf",
1603
- "hasImg",
1604
- "hasSvg",
1605
- "hasFullscreen",
1606
- "hasAltCopy",
1607
- "isTooltip",
1608
- "isFullscreen",
1609
- "titles",
1610
- "chartElement",
1611
- "position",
1612
- "hasAnnotator",
1613
- "isAnnotation",
1614
- "callbacks",
1615
- "printScale",
1616
- "isCursorPointer",
1617
- "onGeneratePdf",
1618
- "onGenerateImage",
1619
- "style"
1620
- ])) : v("", !0),
1621
- B.value.title ? (T(), y("div", {
1622
- key: 4,
1623
- ref_key: "quickChartTitle",
1624
- ref: En,
1625
- class: "vue-ui-quick-chart-title",
1626
- style: w(`background:transparent;color:${B.value.color};font-size:${B.value.titleFontSize}px;font-weight:${B.value.titleBold ? "bold" : "normal"};text-align:${B.value.titleTextAlign}`)
1627
- }, k(B.value.title), 5)) : v("", !0),
1628
- b("div", { id: `legend-top-${F.value}` }, null, 8, et),
1629
- b("div", tt, [K.value ? (T(), y("svg", {
1630
- key: 0,
1631
- ref_key: "svgRef",
1632
- ref: Jn,
1633
- xmlns: A(ae),
1634
- "aria-describedby": `chart-instructions-${F.value}`,
1635
- viewBox: pr.value,
1636
- style: w(`max-width:100%;overflow:visible;background:transparent;color:${B.value.color}`),
1637
- tabindex: "0",
1638
- onFocus: ai,
1639
- onBlur: oi,
1640
- onKeydown: si
1641
- }, [
1642
- ke(A(He)),
1643
- e.$slots["chart-background"] && K.value === M.BAR ? (T(), y("foreignObject", {
1644
- key: 0,
1645
- x: Q.value.drawingArea.left,
1646
- y: Q.value.drawingArea.top,
1647
- width: Q.value.drawingArea.width,
1648
- height: Q.value.drawingArea.height,
1649
- style: { pointerEvents: "none" }
1650
- }, [O(e.$slots, "chart-background", {}, void 0, !0)], 8, rt)) : v("", !0),
1651
- e.$slots["chart-background"] && K.value === M.LINE ? (T(), y("foreignObject", {
1652
- key: 1,
1653
- x: Z.value.drawingArea.left,
1654
- y: Z.value.drawingArea.top,
1655
- width: Z.value.drawingArea.width,
1656
- height: Z.value.drawingArea.height,
1657
- style: { pointerEvents: "none" }
1658
- }, [O(e.$slots, "chart-background", {}, void 0, !0)], 8, it)) : v("", !0),
1659
- e.$slots["chart-background"] && K.value === M.DONUT ? (T(), y("foreignObject", {
1660
- key: 2,
1661
- x: 0,
1662
- y: 0,
1663
- width: q.value.width,
1664
- height: q.value.height,
1665
- style: { pointerEvents: "none" }
1666
- }, [O(e.$slots, "chart-background", {}, void 0, !0)], 8, at)) : v("", !0),
1667
- b("defs", null, [b("filter", {
1668
- id: `blur_${F.value}`,
1669
- x: "-50%",
1670
- y: "-50%",
1671
- width: "200%",
1672
- height: "200%"
1673
- }, [b("feGaussianBlur", {
1674
- in: "SourceGraphic",
1675
- stdDeviation: 2,
1676
- id: `blur_std_${F.value}`
1677
- }, null, 8, st), t[4] ||= b("feColorMatrix", {
1678
- type: "saturate",
1679
- values: "0"
1680
- }, null, -1)], 8, ot), b("filter", {
1681
- id: `shadow_${F.value}`,
1682
- "color-interpolation-filters": "sRGB"
1683
- }, [b("feDropShadow", {
1684
- dx: "0",
1685
- dy: "0",
1686
- stdDeviation: "10",
1687
- "flood-opacity": "0.5",
1688
- "flood-color": B.value.donutShadowColor
1689
- }, null, 8, lt)], 8, ct)]),
1690
- K.value === M.DONUT ? (T(), y(g, { key: 3 }, [
1691
- B.value.showDataLabels ? (T(), y("g", ut, [(T(!0), y(g, null, D(Y.value.chart, (e, t) => (T(), y(g, null, [Y.value.isArcBigEnough(e) ? (T(), y("path", {
1692
- key: 0,
1693
- d: A(ne)(e, {
1694
- x: q.value.width / 2,
1695
- y: q.value.height / 2
1696
- }, 16, 16, !1, !1, q.value.height * Cr.value, 12, B.value.donutCurvedMarkers),
1697
- stroke: e.color,
1698
- "stroke-width": B.value.donutLabelMarkerStrokeWidth,
1699
- "stroke-linecap": "round",
1700
- "stroke-linejoin": "round",
1701
- fill: "none",
1702
- filter: hr(e.id)
1703
- }, null, 8, dt)) : v("", !0)], 64))), 256))])) : v("", !0),
1704
- b("circle", {
1705
- cx: Y.value.cx,
1706
- cy: Y.value.cy,
1707
- r: Y.value.radius,
1708
- fill: B.value.backgroundColor,
1709
- filter: B.value.donutUseShadow ? `url(#shadow_${F.value})` : ""
1710
- }, null, 8, ft),
1711
- b("g", pt, [(T(!0), y(g, null, D(Y.value.chart, (e, t) => (T(), y("path", {
1712
- d: e.arcSlice,
1713
- fill: e.color,
1714
- stroke: B.value.donutStroke || B.value.backgroundColor,
1715
- "stroke-width": B.value.donutStrokeWidth,
1716
- filter: hr(e.id)
1717
- }, null, 8, mt))), 256)), (T(!0), y(g, null, D(Y.value.chart, (e, t) => (T(), y("path", {
1718
- d: e.arcSlice,
1719
- fill: "transparent",
1720
- onMouseenter: (n) => Y.value.useTooltip({
1721
- datapoint: e,
1722
- seriesIndex: t,
1723
- triggerMode: "pointer"
1724
- }),
1725
- onMouseout: (n) => Y.value.killTooltip({
1726
- datapoint: e,
1727
- seriesIndex: t
1728
- }),
1729
- onClick: (n) => Y.value.selectDatapoint({
1730
- datapoint: e,
1731
- seriesIndex: t
1732
- })
1733
- }, null, 40, ht))), 256))]),
1734
- B.value.showDataLabels ? (T(), y("g", gt, [(T(!0), y(g, null, D(Y.value.chart, (e, t) => (T(), y(g, null, [
1735
- Y.value.isArcBigEnough(e) ? (T(), y("circle", {
1736
- key: 0,
1737
- cx: A(d)(e).x,
1738
- cy: A(p)(e) - 3.7,
1739
- fill: e.color,
1740
- stroke: B.value.backgroundColor,
1741
- "stroke-width": 1,
1742
- r: 3,
1743
- filter: hr(e.id)
1744
- }, null, 8, _t)) : v("", !0),
1745
- Y.value.isArcBigEnough(e) ? (T(), y("text", {
1746
- key: 1,
1747
- "text-anchor": A(d)(e, !0, 20).anchor,
1748
- x: A(d)(e, !0).x,
1749
- y: A(p)(e),
1750
- fill: B.value.color,
1751
- "font-size": B.value.dataLabelFontSize,
1752
- filter: hr(e.id)
1753
- }, k(Y.value.displayArcPercentage(e, Y.value.chart)) + " (" + k(A(m)(B.value.formatter, e.value, A(u)({
1754
- p: B.value.valuePrefix,
1755
- v: e.value,
1756
- s: B.value.valueSuffix,
1757
- r: B.value.dataLabelRoundingValue
1758
- }), {
1759
- datapoint: e,
1760
- seriesIndex: t
1761
- })) + ") ", 9, vt)) : v("", !0),
1762
- Y.value.isArcBigEnough(e, !0, 20) ? (T(), y("text", {
1763
- key: 2,
1764
- "text-anchor": A(d)(e).anchor,
1765
- x: A(d)(e, !0).x,
1766
- y: A(p)(e) + B.value.dataLabelFontSize,
1767
- fill: B.value.color,
1768
- "font-size": B.value.dataLabelFontSize,
1769
- filter: hr(e.id)
1770
- }, k(e.name), 9, yt)) : v("", !0)
1771
- ], 64))), 256))])) : v("", !0),
1772
- B.value.donutShowTotal ? (T(), y("g", bt, [b("text", {
1773
- "text-anchor": "middle",
1774
- x: Y.value.drawingArea.centerX,
1775
- y: Y.value.drawingArea.centerY - B.value.donutTotalLabelFontSize / 2,
1776
- "font-size": B.value.donutTotalLabelFontSize,
1777
- fill: B.value.color
1778
- }, k(B.value.donutTotalLabelText), 9, xt), b("text", {
1779
- "text-anchor": "middle",
1780
- x: Y.value.drawingArea.centerX,
1781
- y: Y.value.drawingArea.centerY + B.value.donutTotalLabelFontSize,
1782
- "font-size": B.value.donutTotalLabelFontSize,
1783
- fill: B.value.color
1784
- }, k(A(u)({
1785
- p: B.value.valuePrefix,
1786
- v: Y.value.total,
1787
- s: B.value.valueSuffix,
1788
- r: B.value.dataLabelRoundingValue
1789
- })), 9, St)])) : v("", !0)
1790
- ], 64)) : v("", !0),
1791
- K.value === M.LINE ? (T(), y(g, { key: 4 }, [
1792
- B.value.xyShowGrid ? (T(), y("g", Ct, [(T(!0), y(g, null, D(Z.value.yLabels, (e) => (T(), y(g, null, [e.y <= Z.value.drawingArea.bottom ? (T(), y("line", {
1793
- key: 0,
1794
- x1: Z.value.drawingArea.left,
1795
- x2: Z.value.drawingArea.right,
1796
- y1: e.y,
1797
- y2: e.y,
1798
- stroke: B.value.xyGridStroke,
1799
- "stroke-width": B.value.xyGridStrokeWidth,
1800
- "stroke-linecap": "round"
1801
- }, null, 8, wt)) : v("", !0)], 64))), 256)), (T(!0), y(g, null, D(Z.value.extremes.maxSeries + 1, (e, t) => (T(), y("line", {
1802
- x1: Z.value.drawingArea.left + Z.value.slotSize * t,
1803
- x2: Z.value.drawingArea.left + Z.value.slotSize * t,
1804
- y1: Z.value.drawingArea.top,
1805
- y2: Z.value.drawingArea.bottom,
1806
- stroke: B.value.xyGridStroke,
1807
- "stroke-width": B.value.xyGridStrokeWidth,
1808
- "stroke-linecap": "round"
1809
- }, null, 8, Tt))), 256))])) : v("", !0),
1810
- B.value.xyShowAxis ? (T(), y("g", Et, [b("line", {
1811
- x1: Z.value.drawingArea.left,
1812
- x2: Z.value.drawingArea.left,
1813
- y1: Z.value.drawingArea.top,
1814
- y2: Z.value.drawingArea.bottom,
1815
- stroke: B.value.xyAxisStroke,
1816
- "stroke-width": B.value.xyAxisStrokeWidth,
1817
- "stroke-linecap": "round"
1818
- }, null, 8, Dt), b("line", {
1819
- x1: Z.value.drawingArea.left,
1820
- x2: Z.value.drawingArea.right,
1821
- y1: isNaN(Z.value.absoluteZero) ? Z.value.drawingArea.bottom : Z.value.absoluteZero,
1822
- y2: isNaN(Z.value.absoluteZero) ? Z.value.drawingArea.bottom : Z.value.absoluteZero,
1823
- stroke: B.value.xyAxisStroke,
1824
- "stroke-width": B.value.xyAxisStrokeWidth,
1825
- "stroke-linecap": "round"
1826
- }, null, 8, Ot)])) : v("", !0),
1827
- B.value.xyShowScale ? (T(), y("g", {
1828
- key: 2,
1829
- class: "yLabels",
1830
- ref_key: "scaleLabels",
1831
- ref: Rn
1832
- }, [(T(!0), y(g, null, D(Z.value.yLabels, (e, t) => (T(), y(g, { key: `sl_${t}` }, [e.y <= Z.value.drawingArea.bottom ? (T(), y("path", {
1833
- key: 0,
1834
- class: S({ "vue-data-ui-datalabel": A(Ze) }),
1835
- d: `M${e.x + 4},${e.y} ${Z.value.drawingArea.left},${e.y}`,
1836
- stroke: B.value.xyAxisStroke,
1837
- "stroke-width": B.value.xyAxisStrokeWidth,
1838
- "stroke-linecap": "round"
1839
- }, null, 10, kt)) : v("", !0), e.y <= Z.value.drawingArea.bottom ? (T(), y("text", {
1840
- key: 1,
1841
- class: S({ "vue-data-ui-datalabel": A(Ze) }),
1842
- transform: `translate(${e.x}, ${e.y + B.value.xyLabelsYFontSize / 3})`,
1843
- "text-anchor": "end",
1844
- "font-size": B.value.xyLabelsYFontSize,
1845
- fill: B.value.color
1846
- }, k(A(m)(B.value.formatter, e.value, A(u)({
1847
- p: B.value.valuePrefix,
1848
- v: e.value,
1849
- s: B.value.valueSuffix,
1850
- r: B.value.dataLabelRoundingValue
1851
- }), {
1852
- datapoint: e,
1853
- seriesIndex: t
1854
- })), 11, At)) : v("", !0)], 64))), 128))], 512)) : v("", !0),
1855
- B.value.xyShowScale && B.value.xyPeriods.length ? (T(), y("g", jt, [(T(!0), y(g, null, D($.value.map((e) => e.text), (e, t) => (T(), y(g, null, [!B.value.xyPeriodsShowOnlyAtModulo || B.value.xyPeriodsShowOnlyAtModulo && t % Math.floor((X.value.end - X.value.start) / Vr.value) === 0 || X.value.end - X.value.start <= Vr.value ? (T(), y("line", {
1856
- key: 0,
1857
- x1: Z.value.drawingArea.left + Z.value.slotSize * (t + 1) - Z.value.slotSize / 2,
1858
- x2: Z.value.drawingArea.left + Z.value.slotSize * (t + 1) - Z.value.slotSize / 2,
1859
- y1: Z.value.drawingArea.bottom,
1860
- y2: Z.value.drawingArea.bottom + 4,
1861
- stroke: B.value.xyAxisStroke,
1862
- "stroke-width": B.value.xyAxisStrokeWidth,
1863
- "stroke-linecap": "round"
1864
- }, null, 8, Mt)) : v("", !0)], 64))), 256)), b("g", {
1865
- ref_key: "timeLabelsEls",
1866
- ref: z
1867
- }, [(T(!0), y(g, null, D($.value.map((e) => e.text), (e, t) => (T(), y(g, null, [!B.value.xyPeriodsShowOnlyAtModulo || B.value.xyPeriodsShowOnlyAtModulo && t % Math.floor((X.value.end - X.value.start) / Vr.value) === 0 || X.value.end - X.value.start <= Vr.value ? (T(), y("g", Nt, [String(e).includes("\n") ? (T(), y("text", {
1868
- key: 1,
1869
- class: "vue-data-ui-time-label",
1870
- "font-size": B.value.xyLabelsXFontSize,
1871
- "text-anchor": B.value.xyPeriodLabelsRotation > 0 ? "start" : B.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
1872
- fill: B.value.color,
1873
- transform: `translate(${Z.value.drawingArea.left + Z.value.slotSize * (t + 1) - Z.value.slotSize / 2}, ${Z.value.drawingArea.bottom + B.value.xyLabelsXFontSize + 6}), rotate(${B.value.xyPeriodLabelsRotation})`,
1874
- innerHTML: A(l)({
1875
- content: String(e),
1876
- fontSize: B.value.xyLabelsXFontSize,
1877
- fill: B.value.color,
1878
- x: 0,
1879
- y: 0
1880
- })
1881
- }, null, 8, Ft)) : (T(), y("text", {
1882
- key: 0,
1883
- class: "vue-data-ui-time-label",
1884
- "font-size": B.value.xyLabelsXFontSize,
1885
- "text-anchor": B.value.xyPeriodLabelsRotation > 0 ? "start" : B.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
1886
- fill: B.value.color,
1887
- transform: `translate(${Z.value.drawingArea.left + Z.value.slotSize * (t + 1) - Z.value.slotSize / 2}, ${Z.value.drawingArea.bottom + B.value.xyLabelsXFontSize + 6}), rotate(${B.value.xyPeriodLabelsRotation})`
1888
- }, k(e), 9, Pt))])) : v("", !0)], 64))), 256))], 512)])) : v("", !0),
1889
- b("g", It, [(T(!0), y(g, null, D(Z.value.dataset, (e, t) => (T(), y("g", {
1890
- key: `serie_${e.id}`,
1891
- class: "line-plot-series"
1892
- }, [B.value.lineSmooth ? (T(), y(g, { key: 0 }, [b("path", {
1893
- ref_for: !0,
1894
- ref_key: "pathWrapper",
1895
- ref: In,
1896
- d: `M ${A(o)(e.coordinates)}`,
1897
- stroke: B.value.backgroundColor,
1898
- "stroke-width": B.value.lineStrokeWidth + 1,
1899
- "stroke-linecap": "round",
1900
- fill: "none",
1901
- class: S({
1902
- "quick-animation": !A(U),
1903
- "vue-data-ui-line-animated": B.value.lineAnimated && !A(U)
1904
- }),
1905
- style: w({ transition: A(U) ? void 0 : "all 0.2s ease-in-out" })
1906
- }, null, 14, Lt), b("path", {
1907
- ref_for: !0,
1908
- ref_key: "pathTop",
1909
- ref: Ln,
1910
- d: `M ${A(o)(e.coordinates)}`,
1911
- stroke: e.color,
1912
- "stroke-width": B.value.lineStrokeWidth,
1913
- "stroke-linecap": "round",
1914
- fill: "none",
1915
- class: S({
1916
- "quick-animation": !A(U),
1917
- "vue-data-ui-line-animated": B.value.lineAnimated && !A(U)
1918
- }),
1919
- style: w({ transition: A(U) ? void 0 : "all 0.2s ease-in-out" })
1920
- }, null, 14, Rt)], 64)) : (T(), y(g, { key: 1 }, [b("path", {
1921
- ref_for: !0,
1922
- ref_key: "pathWrapper",
1923
- ref: In,
1924
- d: `M ${e.linePath}`,
1925
- stroke: B.value.backgroundColor,
1926
- "stroke-width": B.value.lineStrokeWidth + 1,
1927
- "stroke-linecap": "round",
1928
- fill: "none",
1929
- class: S({
1930
- "quick-animation": !A(U),
1931
- "vue-data-ui-line-animated": B.value.lineAnimated && !A(U)
1932
- }),
1933
- style: w({ transition: A(U) ? void 0 : "all 0.2s ease-in-out" })
1934
- }, null, 14, zt), b("path", {
1935
- ref_for: !0,
1936
- ref_key: "pathTop",
1937
- ref: Ln,
1938
- d: `M ${e.linePath}`,
1939
- stroke: e.color,
1940
- "stroke-width": B.value.lineStrokeWidth,
1941
- "stroke-linecap": "round",
1942
- fill: "none",
1943
- class: S({
1944
- "quick-animation": !A(U),
1945
- "vue-data-ui-line-animated": B.value.lineAnimated && !A(U)
1946
- }),
1947
- style: w({ transition: A(U) ? void 0 : "all 0.2s ease-in-out" })
1948
- }, null, 14, Bt)], 64)), (T(!0), y(g, null, D(e.coordinates, (t, n) => (T(), y("circle", {
1949
- key: `dp_${e.id}_${n + X.value.start}`,
1950
- cx: t.x,
1951
- cy: A(h)(t.y),
1952
- r: 3,
1953
- fill: e.color,
1954
- stroke: B.value.backgroundColor,
1955
- "stroke-width": "0.5",
1956
- class: S({ "vue-ui-quick-chart-plot": !0 }),
1957
- style: w({ transition: A(U) ? void 0 : "all 0.2s ease-in-out" })
1958
- }, null, 12, Vt))), 128))]))), 128))]),
1959
- B.value.showDataLabels ? (T(), y("g", Ht, [(T(!0), y(g, null, D(Z.value.dataset, (e, t) => (T(), y(g, { key: `ds_${e.id}` }, [(T(!0), y(g, null, D(e.coordinates, (t, n) => (T(), y("text", {
1960
- class: S(["vue-ui-quick-chart-label", { "vue-data-ui-datalabel": A(Ze) }]),
1961
- key: `plot_${e.id}_${n + X.value.start}`,
1962
- "text-anchor": "middle",
1963
- "font-size": B.value.dataLabelFontSize,
1964
- fill: e.color,
1965
- transform: `translate(${t.x}, ${A(h)(t.y) - B.value.dataLabelFontSize / 2})`,
1966
- style: w({ transition: A(U) ? void 0 : "all 0.2s ease-in-out" })
1967
- }, k(A(m)(B.value.formatter, A(h)(t.value), A(u)({
1968
- p: B.value.valuePrefix,
1969
- v: A(h)(t.value),
1970
- s: B.value.valueSuffix,
1971
- r: B.value.dataLabelRoundingValue
1972
- }), {
1973
- datapoint: t,
1974
- seriesIndex: n
1975
- })), 15, Ut))), 128))], 64))), 128))])) : v("", !0),
1976
- Qn.value ? (T(), y("g", Wt, [(T(!0), y(g, null, D(Z.value.extremes.maxSeries, (e, t) => (T(), y("rect", {
1977
- x: Z.value.drawingArea.left + t * Z.value.slotSize,
1978
- y: Z.value.drawingArea.top,
1979
- height: Z.value.drawingArea.height <= 0 ? 1e-5 : Z.value.drawingArea.height,
1980
- width: Z.value.slotSize <= 0 ? 1e-5 : Z.value.slotSize,
1981
- fill: [L.value, J.value].includes(t) ? B.value.xyHighlighterColor : "transparent",
1982
- style: w(`opacity:${B.value.xyHighlighterOpacity}`),
1983
- onMouseenter: (e) => Z.value.useTooltip(t, "pointer"),
1984
- onMouseleave: (e) => Z.value.killTooltip(t),
1985
- onClick: (e) => Z.value.selectDatapoint(t)
1986
- }, null, 44, Gt))), 256))])) : v("", !0)
1987
- ], 64)) : v("", !0),
1988
- K.value === M.BAR ? (T(), y(g, { key: 5 }, [
1989
- B.value.xyShowGrid ? (T(), y("g", Kt, [(T(!0), y(g, null, D(Q.value.yLabels, (e) => (T(), y(g, null, [e.y <= Q.value.drawingArea.bottom ? (T(), y("line", {
1990
- key: 0,
1991
- x1: Q.value.drawingArea.left,
1992
- x2: Q.value.drawingArea.right,
1993
- y1: e.y,
1994
- y2: e.y,
1995
- stroke: B.value.xyGridStroke,
1996
- "stroke-width": B.value.xyGridStrokeWidth,
1997
- "stroke-linecap": "round"
1998
- }, null, 8, qt)) : v("", !0)], 64))), 256)), R.value.length < Q.value.legend.length ? (T(!0), y(g, { key: 0 }, D(Q.value.extremes.maxSeries + 1, (e, t) => (T(), y("line", {
1999
- x1: Q.value.drawingArea.left + Q.value.slotSize * t,
2000
- x2: Q.value.drawingArea.left + Q.value.slotSize * t,
2001
- y1: Q.value.drawingArea.top,
2002
- y2: Q.value.drawingArea.bottom,
2003
- stroke: B.value.xyGridStroke,
2004
- "stroke-width": B.value.xyGridStrokeWidth,
2005
- "stroke-linecap": "round"
2006
- }, null, 8, Jt))), 256)) : v("", !0)])) : v("", !0),
2007
- B.value.xyShowAxis ? (T(), y("g", Yt, [b("line", {
2008
- x1: Q.value.drawingArea.left,
2009
- x2: Q.value.drawingArea.left,
2010
- y1: Q.value.drawingArea.top,
2011
- y2: Q.value.drawingArea.bottom,
2012
- stroke: B.value.xyAxisStroke,
2013
- "stroke-width": B.value.xyAxisStrokeWidth,
2014
- "stroke-linecap": "round"
2015
- }, null, 8, Xt), b("line", {
2016
- x1: Q.value.drawingArea.left,
2017
- x2: Q.value.drawingArea.right,
2018
- y1: isNaN(Q.value.absoluteZero) ? Q.value.drawingArea.bottom : Q.value.absoluteZero,
2019
- y2: isNaN(Q.value.absoluteZero) ? Q.value.drawingArea.bottom : Q.value.absoluteZero,
2020
- stroke: B.value.xyAxisStroke,
2021
- "stroke-width": B.value.xyAxisStrokeWidth,
2022
- "stroke-linecap": "round"
2023
- }, null, 8, Zt)])) : v("", !0),
2024
- B.value.xyShowScale ? (T(), y("g", {
2025
- key: 2,
2026
- class: "yLabels",
2027
- ref_key: "scaleLabels",
2028
- ref: Rn
2029
- }, [(T(!0), y(g, null, D(Q.value.yLabels, (e, t) => (T(), y(g, { key: `sl_${t}` }, [e.y <= Q.value.drawingArea.bottom ? (T(), y("path", {
2030
- key: 0,
2031
- class: S({ "vue-data-ui-datalabel": A(Ze) }),
2032
- d: `M${e.x + 4},${e.y} ${Q.value.drawingArea.left},${e.y}`,
2033
- stroke: B.value.xyAxisStroke,
2034
- "stroke-width": B.value.xyAxisStrokeWidth,
2035
- "stroke-linecap": "round"
2036
- }, null, 10, Qt)) : v("", !0), e.y <= Q.value.drawingArea.bottom ? (T(), y("text", {
2037
- key: 1,
2038
- class: S({ "vue-data-ui-datalabel": A(Ze) }),
2039
- transform: `translate(${e.x}, ${e.y + B.value.xyLabelsYFontSize / 3})`,
2040
- "text-anchor": "end",
2041
- "font-size": B.value.xyLabelsYFontSize,
2042
- fill: B.value.color
2043
- }, k(A(m)(B.value.formatter, e.value, A(u)({
2044
- p: B.value.valuePrefix,
2045
- v: e.value,
2046
- s: B.value.valueSuffix,
2047
- r: B.value.dataLabelRoundingValue
2048
- }), {
2049
- datapoint: e,
2050
- seriesIndex: t
2051
- })), 11, $t)) : v("", !0)], 64))), 128))], 512)) : v("", !0),
2052
- B.value.xyShowScale && B.value.xyPeriods.length ? (T(), y("g", en, [(T(!0), y(g, null, D(B.value.xyPeriods.slice(X.value.start, X.value.end), (e, t) => (T(), y("line", {
2053
- x1: Q.value.drawingArea.left + Q.value.slotSize * (t + 1) - Q.value.slotSize / 2,
2054
- x2: Q.value.drawingArea.left + Q.value.slotSize * (t + 1) - Q.value.slotSize / 2,
2055
- y1: Q.value.drawingArea.bottom,
2056
- y2: Q.value.drawingArea.bottom + 4,
2057
- stroke: B.value.xyAxisStroke,
2058
- "stroke-width": B.value.xyAxisStrokeWidth,
2059
- "stroke-linecap": "round"
2060
- }, null, 8, tn))), 256)), b("g", {
2061
- ref_key: "timeLabelsEls",
2062
- ref: z
2063
- }, [(T(!0), y(g, null, D($.value.map((e) => e.text), (e, t) => (T(), y(g, null, [!B.value.xyPeriodsShowOnlyAtModulo || B.value.xyPeriodsShowOnlyAtModulo && t % Math.floor((X.value.end - X.value.start) / Vr.value) === 0 || X.value.end - X.value.start <= Vr.value ? (T(), y("g", nn, [String(e).includes("\n") ? (T(), y("text", {
2064
- key: 1,
2065
- class: "vue-data-ui-time-label",
2066
- "font-size": B.value.xyLabelsXFontSize,
2067
- "text-anchor": B.value.xyPeriodLabelsRotation > 0 ? "start" : B.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
2068
- fill: B.value.color,
2069
- transform: `translate(${Q.value.drawingArea.left + Q.value.slotSize * (t + 1) - Q.value.slotSize / 2}, ${Q.value.drawingArea.bottom + B.value.xyLabelsXFontSize + 6}), rotate(${B.value.xyPeriodLabelsRotation})`,
2070
- innerHTML: A(l)({
2071
- content: String(e),
2072
- fontSize: B.value.xyLabelsXFontSize,
2073
- fill: B.value.color,
2074
- x: 0,
2075
- y: 0
2076
- })
2077
- }, null, 8, an)) : (T(), y("text", {
2078
- key: 0,
2079
- class: "vue-data-ui-time-label",
2080
- "font-size": B.value.xyLabelsXFontSize,
2081
- "text-anchor": B.value.xyPeriodLabelsRotation > 0 ? "start" : B.value.xyPeriodLabelsRotation < 0 ? "end" : "middle",
2082
- fill: B.value.color,
2083
- transform: `translate(${Q.value.drawingArea.left + Q.value.slotSize * (t + 1) - Q.value.slotSize / 2}, ${Q.value.drawingArea.bottom + B.value.xyLabelsXFontSize + 6}), rotate(${B.value.xyPeriodLabelsRotation})`
2084
- }, k(e), 9, rn))])) : v("", !0)], 64))), 256))], 512)])) : v("", !0),
2085
- b("g", on, [(T(!0), y(g, null, D(Q.value.dataset, (e, t) => (T(), y(g, null, [(T(!0), y(g, null, D(e.coordinates, (t, n) => (T(), y("rect", {
2086
- x: t.x,
2087
- width: t.width <= 0 ? 1e-5 : t.width,
2088
- height: A(h)(t.height <= 0 ? 1e-5 : t.height),
2089
- y: A(h)(t.y),
2090
- fill: e.color,
2091
- stroke: B.value.backgroundColor,
2092
- "stroke-width": B.value.barStrokeWidth,
2093
- "stroke-linecap": "round",
2094
- class: S({ "vue-data-ui-bar-animated": B.value.barAnimated && t.value < 0 && !A(U) })
2095
- }, [B.value.barAnimated && t.value > 0 && !A(ir) && !A(ar) ? (T(), y("animate", {
2096
- key: 0,
2097
- attributeName: "height",
2098
- from: 0,
2099
- to: t.height,
2100
- dur: "0.5s"
2101
- }, null, 8, cn)) : v("", !0), B.value.barAnimated && t.value > 0 && !A(ir) && !A(ar) ? (T(), y("animate", {
2102
- key: 1,
2103
- attributeName: "y",
2104
- from: Q.value.absoluteZero,
2105
- to: Q.value.absoluteZero - t.height,
2106
- dur: "0.5s"
2107
- }, null, 8, ln)) : v("", !0)], 10, sn))), 256))], 64))), 256))]),
2108
- B.value.showDataLabels ? (T(), y("g", un, [(T(!0), y(g, null, D(Q.value.dataset, (e, t) => (T(), y(g, { key: `ds_${e.id}` }, [(T(!0), y(g, null, D(e.coordinates, (t, n) => (T(), y("text", {
2109
- key: `plot_${n + X.value.start}`,
2110
- transform: `translate(${t.x + t.width / 2}, ${A(h)(t.y) - B.value.dataLabelFontSize / 2})`,
2111
- "text-anchor": "middle",
2112
- "font-size": B.value.dataLabelFontSize,
2113
- fill: e.color
2114
- }, k(A(m)(B.value.formatter, A(h)(t.value), A(u)({
2115
- p: B.value.valuePrefix,
2116
- v: A(h)(t.value),
2117
- s: B.value.valueSuffix,
2118
- r: B.value.dataLabelRoundingValue
2119
- }), {
2120
- datapoint: t,
2121
- seriesIndex: n
2122
- })), 9, dn))), 128))], 64))), 128))])) : v("", !0),
2123
- Qn.value && R.value.length < Q.value.legend.length ? (T(), y("g", fn, [(T(!0), y(g, null, D(Q.value.extremes.maxSeries, (e, t) => (T(), y("rect", {
2124
- x: Q.value.drawingArea.left + t * Q.value.slotSize,
2125
- y: Q.value.drawingArea.top,
2126
- height: Q.value.drawingArea.height <= 0 ? 1e-5 : Q.value.drawingArea.height,
2127
- width: Q.value.slotSize <= 0 ? 1e-5 : Q.value.slotSize,
2128
- fill: [L.value, J.value].includes(t) ? B.value.xyHighlighterColor : "transparent",
2129
- style: w(`opacity:${B.value.xyHighlighterOpacity}`),
2130
- onMouseenter: (e) => Q.value.useTooltip(t, "pointer"),
2131
- onMouseleave: (e) => Q.value.killTooltip(t),
2132
- onClick: (e) => Q.value.selectDatapoint(t)
2133
- }, null, 44, pn))), 256))])) : v("", !0)
2134
- ], 64)) : v("", !0),
2135
- [M.LINE, M.BAR].includes(K.value) ? (T(), y("g", mn, [
2136
- B.value.xAxisLabel && K.value === M.LINE ? (T(), y("g", {
2137
- key: 0,
2138
- ref_key: "xAxisLabel",
2139
- ref: zn
2140
- }, [b("text", {
2141
- "font-size": B.value.axisLabelsFontSize,
2142
- fill: B.value.color,
2143
- "text-anchor": "middle",
2144
- x: Z.value.drawingArea.left + Z.value.drawingArea.width / 2,
2145
- y: q.value.height - B.value.axisLabelsFontSize / 3
2146
- }, k(B.value.xAxisLabel), 9, hn)], 512)) : v("", !0),
2147
- B.value.xAxisLabel && K.value === M.BAR ? (T(), y("g", {
2148
- key: 1,
2149
- ref_key: "xAxisLabel",
2150
- ref: zn
2151
- }, [b("text", {
2152
- "font-size": B.value.axisLabelsFontSize,
2153
- fill: B.value.color,
2154
- "text-anchor": "middle",
2155
- x: Q.value.drawingArea.left + Q.value.drawingArea.width / 2,
2156
- y: q.value.height - B.value.axisLabelsFontSize / 3
2157
- }, k(B.value.xAxisLabel), 9, gn)], 512)) : v("", !0),
2158
- B.value.yAxisLabel && K.value === M.LINE ? (T(), y("g", {
2159
- key: 2,
2160
- ref_key: "yAxisLabel",
2161
- ref: Bn
2162
- }, [b("text", {
2163
- "font-size": B.value.axisLabelsFontSize,
2164
- fill: B.value.color,
2165
- transform: `translate(${B.value.axisLabelsFontSize}, ${Z.value.drawingArea.top + Z.value.drawingArea.height / 2}) rotate(-90)`,
2166
- "text-anchor": "middle"
2167
- }, k(B.value.yAxisLabel), 9, _n)], 512)) : v("", !0),
2168
- B.value.yAxisLabel && K.value === M.BAR ? (T(), y("g", {
2169
- key: 3,
2170
- ref_key: "yAxisLabel",
2171
- ref: Bn
2172
- }, [b("text", {
2173
- "font-size": B.value.axisLabelsFontSize,
2174
- fill: B.value.color,
2175
- transform: `translate(${B.value.axisLabelsFontSize}, ${Q.value.drawingArea.top + Q.value.drawingArea.height / 2}) rotate(-90)`,
2176
- "text-anchor": "middle"
2177
- }, k(B.value.yAxisLabel), 9, vn)], 512)) : v("", !0)
2178
- ])) : v("", !0)
2179
- ], 44, nt)) : v("", !0), e.$slots.hint ? (T(), y("div", yn, [O(e.$slots, "hint", C(x({
2180
- hint: B.value.a11y.translations.keyboardNavigation,
2181
- isVisible: Wn.value
2182
- })), void 0, !0)])) : v("", !0)]),
2183
- e.$slots.watermark ? (T(), y("div", bn, [O(e.$slots, "watermark", C(x({ isPrinting: A(ir) || A(ar) })), void 0, !0)])) : v("", !0),
2184
- [M.BAR, M.LINE].includes(K.value) && B.value.zoomXy && G.value.maxSeriesLength > 1 ? (T(), y("div", {
2185
- key: `slicer_${Pn.value}`,
2186
- ref_key: "quickChartSlicer",
2187
- ref: On
2188
- }, [(T(), De(we, {
2189
- ref_key: "slicerComponent",
2190
- ref: Tr,
2191
- key: `slicer_${Pn.value}`,
2192
- background: B.value.zoomColor,
2193
- borderColor: B.value.backgroundColor,
2194
- fontSize: B.value.zoomFontSize,
2195
- useResetSlot: B.value.zoomUseResetSlot,
2196
- labelLeft: B.value.xyPeriods[X.value.start] && $.value[0] ? $.value[0].text : "",
2197
- labelRight: B.value.xyPeriods[X.value.end - 1] && $.value?.length ? $.value.at(-1).text : "",
2198
- textColor: B.value.color,
2199
- inputColor: B.value.zoomColor,
2200
- selectColor: B.value.zoomHighlightColor,
2201
- max: G.value.maxSeriesLength,
2202
- min: 0,
2203
- valueStart: X.value.start,
2204
- valueEnd: X.value.end,
2205
- smoothMinimap: B.value.zoomMinimap.smooth,
2206
- minimapSelectedColor: B.value.zoomMinimap.selectedColor,
2207
- minimapSelectedColorOpacity: B.value.zoomMinimap.selectedColorOpacity,
2208
- minimapSelectionRadius: B.value.zoomMinimap.selectionRadius,
2209
- minimapLineColor: B.value.zoomMinimap.lineColor,
2210
- minimap: Or.value,
2211
- minimapIndicatorColor: B.value.zoomMinimap.indicatorColor,
2212
- verticalHandles: B.value.zoomMinimap.verticalHandles,
2213
- minimapSelectedIndex: J.value,
2214
- start: X.value.start,
2215
- "onUpdate:start": t[0] ||= (e) => X.value.start = e,
2216
- end: X.value.end,
2217
- "onUpdate:end": t[1] ||= (e) => X.value.end = e,
2218
- refreshStartPoint: B.value.zoomStartIndex === null ? 0 : B.value.zoomStartIndex,
2219
- refreshEndPoint: B.value.zoomEndIndex === null ? G.value.maxSeriesLength : B.value.zoomEndIndex + 1,
2220
- enableRangeHandles: B.value.zoomEnableRangeHandles,
2221
- enableSelectionDrag: B.value.zoomEnableSelectionDrag,
2222
- minimapCompact: B.value.zoomMinimap.compact,
2223
- minimapMerged: B.value.zoomMinimap.merged,
2224
- allMinimaps: zr.value,
2225
- minimapFrameColor: B.value.zoomMinimap.frameColor,
2226
- additionalMinimapHeight: B.value.zoomMinimap.additionalHeight,
2227
- handleType: B.value.zoomMinimap.handleType,
2228
- handleWidth: B.value.zoomMinimap.handleWidth,
2229
- handleBorderWidth: B.value.zoomMinimap.handleBorderWidth,
2230
- handleIconColor: B.value.zoomMinimap.handleIconColor,
2231
- handleBorderColor: B.value.zoomMinimap.handleBorderColor,
2232
- handleFill: B.value.zoomMinimap.handleFill,
2233
- focusOnDrag: B.value.zoomFocusOnDrag,
2234
- focusRangeRatio: B.value.zoomFocusRangeRatio,
2235
- maxWidth: B.value.zoomMaxWidth,
2236
- onReset: wr,
2237
- onTrapMouse: Sr
2238
- }, {
2239
- "reset-action": j(({ reset: t }) => [O(e.$slots, "reset-action", C(x({ reset: t })), void 0, !0)]),
2240
- _: 3
2241
- }, 8, /* @__PURE__ */ "background.borderColor.fontSize.useResetSlot.labelLeft.labelRight.textColor.inputColor.selectColor.max.valueStart.valueEnd.smoothMinimap.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectionRadius.minimapLineColor.minimap.minimapIndicatorColor.verticalHandles.minimapSelectedIndex.start.end.refreshStartPoint.refreshEndPoint.enableRangeHandles.enableSelectionDrag.minimapCompact.minimapMerged.allMinimaps.minimapFrameColor.additionalMinimapHeight.handleType.handleWidth.handleBorderWidth.handleIconColor.handleBorderColor.handleFill.focusOnDrag.focusRangeRatio.maxWidth".split(".")))])) : v("", !0),
2242
- b("div", { id: `legend-bottom-${F.value}` }, null, 8, xn),
2243
- Fn.value && B.value.showLegend ? (T(), De(Ee, {
2244
- key: 7,
2245
- to: B.value.legendPosition === "top" ? `#legend-top-${F.value}` : `#legend-bottom-${F.value}`
2246
- }, [B.value.showLegend ? (T(), y("div", {
2247
- key: 0,
2248
- ref_key: "quickChartLegend",
2249
- ref: Dn,
2250
- class: "vue-ui-quick-chart-legend",
2251
- style: w(`background:transparent;color:${B.value.color}`)
2252
- }, [
2253
- (Y.value?.legend?.length > 2 || Z.value?.legend?.length > 2 || Q.value?.legend?.length > 2) && B.value.showLegendSelectAllToggle && !A(U) ? (T(), De(xe, {
2254
- key: 0,
2255
- backgroundColor: B.value.legendSelectAllToggleBackgroundColor,
2256
- color: B.value.legendSelectAllToggleColor,
2257
- fontSize: B.value.legendFontSize,
2258
- checked: R.value.length > 0,
2259
- isCursorPointer: Hn.value,
2260
- onToggle: gr
2261
- }, null, 8, [
2262
- "backgroundColor",
2263
- "color",
2264
- "fontSize",
2265
- "checked",
2266
- "isCursorPointer"
2267
- ])) : v("", !0),
2268
- K.value === M.DONUT ? (T(!0), y(g, { key: 1 }, D(Y.value.legend, (t, n) => (T(), y("div", {
2269
- class: "vue-ui-quick-chart-legend-item",
2270
- onClick: (e) => xr(t, Y.value.dataset),
2271
- style: w(`cursor: ${Y.value.legend.length > 1 && Hn.value ? "pointer" : "default"}; opacity:${R.value.includes(t.id) ? "0.5" : "1"}`),
2272
- role: "button",
2273
- tabindex: "0",
2274
- onKeydown: (e) => {
2275
- ri(e, () => {
2276
- xr(t, Y.value.dataset);
2277
- });
2278
- }
2279
- }, [B.value.useCustomLegend ? O(e.$slots, "legend", je({ ref_for: !0 }, { legend: {
2280
- ...t,
2281
- isSegregated: R.value.includes(t.id),
2282
- segregate: () => {
2283
- xr(t, Y.value.dataset);
2284
- }
2285
- } }), void 0, !0, 0) : (T(), y(g, { key: 1 }, [
2286
- ke(A(Ve), {
2287
- name: B.value.legendIcon,
2288
- stroke: t.color,
2289
- size: B.value.legendIconSize
2290
- }, null, 8, [
2291
- "name",
2292
- "stroke",
2293
- "size"
2294
- ]),
2295
- b("span", { style: w(`font-size:${B.value.legendFontSize}px`) }, k(t.name), 5),
2296
- b("span", { style: w(`font-size:${B.value.legendFontSize}px;font-variant-numeric:tabular-nums`) }, k(R.value.includes(t.id) ? "-" : A(m)(B.value.formatter, t.absoluteValue, A(u)({
2297
- p: B.value.valuePrefix,
2298
- v: t.absoluteValue,
2299
- s: B.value.valueSuffix,
2300
- r: B.value.dataLabelRoundingValue
2301
- }), {
2302
- datapoint: t,
2303
- seriesIndex: n
2304
- })), 5),
2305
- R.value.includes(t.id) ? (T(), y("span", {
2306
- key: 0,
2307
- style: w(`font-size:${B.value.legendFontSize}px`)
2308
- }, " ( - % ) ", 4)) : br.value ? (T(), y("span", {
2309
- key: 1,
2310
- style: w(`font-size:${B.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)
2311
- }, " ( - % ) ", 4)) : (T(), y("span", {
2312
- key: 2,
2313
- style: w(`font-size:${B.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)
2314
- }, " (" + k(A(u)({
2315
- v: t.value / Y.value.total * 100,
2316
- s: "%",
2317
- r: B.value.dataLabelRoundingPercentage
2318
- })) + ") ", 5))
2319
- ], 64))], 44, Sn))), 256)) : v("", !0),
2320
- K.value === M.LINE ? (T(!0), y(g, { key: 2 }, D(Z.value.legend, (t, n) => (T(), y("div", {
2321
- class: "vue-ui-quick-chart-legend-item",
2322
- onClick: (e) => {
2323
- _r(t.id, Z.value.legend.length - 1), W("selectLegend", Z.value.dataset);
2324
- },
2325
- style: w(`cursor: ${Z.value.legend.length > 1 && Hn.value ? "pointer" : "default"}; opacity:${R.value.includes(t.id) ? "0.5" : "1"}`),
2326
- role: "button",
2327
- tabindex: "0",
2328
- onKeydown: (e) => {
2329
- ri(e, () => {
2330
- _r(t.id, Z.value.legend.length - 1), W("selectLegend", Z.value.dataset);
2331
- });
2332
- }
2333
- }, [B.value.useCustomLegend ? O(e.$slots, "legend", je({ ref_for: !0 }, { legend: {
2334
- ...t,
2335
- isSegregated: R.value.includes(t.id),
2336
- segregate: () => {
2337
- _r(t.id, Z.value.legend.length - 1), W("selectLegend", Z.value.dataset);
2338
- }
2339
- } }), void 0, !0, 0) : (T(), y(g, { key: 1 }, [ke(A(Ve), {
2340
- name: B.value.legendIcon,
2341
- stroke: t.color,
2342
- size: B.value.legendIconSize
2343
- }, null, 8, [
2344
- "name",
2345
- "stroke",
2346
- "size"
2347
- ]), b("span", { style: w(`font-size:${B.value.legendFontSize}px`) }, k(t.name), 5)], 64))], 44, Cn))), 256)) : v("", !0),
2348
- K.value === M.BAR ? (T(!0), y(g, { key: 3 }, D(Q.value.legend, (t, n) => (T(), y("div", {
2349
- class: "vue-ui-quick-chart-legend-item",
2350
- onClick: (e) => {
2351
- _r(t.id, Q.value.legend.length - 1), W("selectLegend", Q.value.dataset);
2352
- },
2353
- style: w(`cursor: ${Q.value.legend.length > 1 && Hn.value ? "pointer" : "default"}; opacity:${R.value.includes(t.id) ? "0.5" : "1"}`),
2354
- role: "button",
2355
- tabindex: "0",
2356
- onKeydown: (e) => {
2357
- ri(e, () => {
2358
- _r(t.id, Q.value.legend.length - 1), W("selectLegend", Q.value.dataset);
2359
- });
2360
- }
2361
- }, [B.value.useCustomLegend ? O(e.$slots, "legend", je({ ref_for: !0 }, { legend: {
2362
- ...t,
2363
- isSegregated: R.value.includes(t.id),
2364
- segregate: () => {
2365
- _r(t.id, Q.value.legend.length - 1), W("selectLegend", Q.value.dataset);
2366
- }
2367
- } }), void 0, !0, 0) : (T(), y(g, { key: 1 }, [ke(A(Ve), {
2368
- name: B.value.legendIcon,
2369
- stroke: t.color,
2370
- size: B.value.legendIconSize
2371
- }, null, 8, [
2372
- "name",
2373
- "stroke",
2374
- "size"
2375
- ]), b("span", { style: w(`font-size:${B.value.legendFontSize}px`) }, k(t.name), 5)], 64))], 44, wn))), 256)) : v("", !0)
2376
- ], 4)) : v("", !0)], 8, ["to"])) : v("", !0),
2377
- e.$slots.source ? (T(), y("div", {
2378
- key: 8,
2379
- ref_key: "source",
2380
- ref: jn,
2381
- dir: "auto"
2382
- }, [O(e.$slots, "source", {}, void 0, !0)], 512)) : v("", !0),
2383
- ke(A(Ke), {
2384
- teleportTo: B.value.tooltipTeleportTo,
2385
- show: lr.value.showTooltip && I.value,
2386
- backgroundColor: B.value.backgroundColor,
2387
- color: B.value.color,
2388
- borderRadius: B.value.tooltipBorderRadius,
2389
- borderColor: B.value.tooltipBorderColor,
2390
- borderWidth: B.value.tooltipBorderWidth,
2391
- fontSize: B.value.tooltipFontSize,
2392
- backgroundOpacity: B.value.tooltipBackgroundOpacity,
2393
- position: B.value.tooltipPosition,
2394
- offsetX: B.value.tooltipOffsetX,
2395
- offsetY: B.value.tooltipOffsetY,
2396
- parent: P.value,
2397
- content: An.value,
2398
- isFullscreen: Hr.value,
2399
- isCustom: A(ee)(B.value.tooltipCustomFormat),
2400
- smooth: B.value.tooltipSmooth,
2401
- smoothForce: B.value.tooltipSmoothForce,
2402
- smoothSnapThreshold: B.value.tooltipSmoothSnapThreshold,
2403
- backdropFilter: B.value.tooltipBackdropFilter,
2404
- isA11yMode: H.value === "keyboard",
2405
- a11yPosition: Un.value
2406
- }, {
2407
- "tooltip-before": j(() => [O(e.$slots, "tooltip-before", C(x({ ...kn.value })), void 0, !0)]),
2408
- tooltip: j(() => [O(e.$slots, "tooltip", C(x({ ...kn.value })), void 0, !0)]),
2409
- "tooltip-after": j(() => [O(e.$slots, "tooltip-after", C(x({ ...kn.value })), void 0, !0)]),
2410
- _: 3
2411
- }, 8, [
2412
- "teleportTo",
2413
- "show",
2414
- "backgroundColor",
2415
- "color",
2416
- "borderRadius",
2417
- "borderColor",
2418
- "borderWidth",
2419
- "fontSize",
2420
- "backgroundOpacity",
2421
- "position",
2422
- "offsetX",
2423
- "offsetY",
2424
- "parent",
2425
- "content",
2426
- "isFullscreen",
2427
- "isCustom",
2428
- "smooth",
2429
- "smoothForce",
2430
- "smoothSnapThreshold",
2431
- "backdropFilter",
2432
- "isA11yMode",
2433
- "a11yPosition"
2434
- ]),
2435
- O(e.$slots, "skeleton", {}, () => [A(U) ? (T(), De(de, { key: 0 })) : v("", !0)], !0)
2436
- ], 46, Qe)) : (T(), y("div", Tn, [ke(A(Ve), {
2437
- name: "circleCancel",
2438
- stroke: "red"
2439
- }), t[5] ||= b("span", null, "Dataset is not processable", -1)]));
2440
- }
2441
- }, [["__scopeId", "data-v-b3c8ddac"]]);
2442
- //#endregion
2443
- export { N as n, P as t };