vue-data-ui 3.22.10 → 3.22.12

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