vue-data-ui 3.3.3 → 3.4.1

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 (160) hide show
  1. package/dist/{Arrow-ayTeSvpe.js → Arrow-CRe_nKB4.js} +1 -1
  2. package/dist/{BaseDraggableDialog-Cysanw8-.js → BaseDraggableDialog-CbuLbfrc.js} +2 -2
  3. package/dist/{BaseIcon-DG6cvf2h.js → BaseIcon-B5KaGWWC.js} +1 -1
  4. package/dist/{ColorPicker-CA8kKZjZ.js → ColorPicker-BMztHpBp.js} +10 -10
  5. package/dist/{DataTable-DUpZ_s2c.js → DataTable-DOx3zgih.js} +2 -2
  6. package/dist/{Legend-CCBZ2x8T.js → Legend-C8u37J42.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-D2IMGwaN.js → NonSvgPenAndPaper-BcxfJ-r2.js} +3 -3
  8. package/dist/{PackageVersion-CQvYRebC.js → PackageVersion-VpPtLYhK.js} +1 -1
  9. package/dist/{PenAndPaper-D9LruJaM.js → PenAndPaper-Dj2diYr0.js} +3 -3
  10. package/dist/{Shape-BS9UGhNq.js → Shape-BhNvlGIN.js} +1 -1
  11. package/dist/{Slicer-BOki89CB.js → Slicer-BHgEsIBU.js} +111 -111
  12. package/dist/SlicerPreview-Cobmb_1S.js +1148 -0
  13. package/dist/{SparkTooltip-svd8Hb6c.js → SparkTooltip-CL3cNRQ_.js} +1 -1
  14. package/dist/{Title-B6rAo9Oz.js → Title-CFmv95In.js} +1 -1
  15. package/dist/{Tooltip-DaInVNiV.js → Tooltip-Cs4v8OnI.js} +1 -1
  16. package/dist/{UserOptions-CJXSEhan.js → UserOptions-C0YT60JN.js} +2 -2
  17. package/dist/components/arrow.js +1 -1
  18. package/dist/components/vue-ui-3d-bar.js +1 -1
  19. package/dist/components/vue-ui-accordion.js +1 -1
  20. package/dist/components/vue-ui-age-pyramid.js +1 -1
  21. package/dist/components/vue-ui-annotator.js +1 -1
  22. package/dist/components/vue-ui-bullet.js +1 -1
  23. package/dist/components/vue-ui-candlestick.js +1 -1
  24. package/dist/components/vue-ui-carousel-table.js +1 -1
  25. package/dist/components/vue-ui-chestnut.js +1 -1
  26. package/dist/components/vue-ui-chord.js +1 -1
  27. package/dist/components/vue-ui-circle-pack.js +1 -1
  28. package/dist/components/vue-ui-cursor.js +1 -1
  29. package/dist/components/vue-ui-dashboard.js +1 -1
  30. package/dist/components/vue-ui-digits.js +1 -1
  31. package/dist/components/vue-ui-donut-evolution.js +1 -1
  32. package/dist/components/vue-ui-donut.js +1 -1
  33. package/dist/components/vue-ui-dumbbell.js +1 -1
  34. package/dist/components/vue-ui-flow.js +1 -1
  35. package/dist/components/vue-ui-funnel.js +1 -1
  36. package/dist/components/vue-ui-galaxy.js +1 -1
  37. package/dist/components/vue-ui-gauge.js +1 -1
  38. package/dist/components/vue-ui-gizmo.js +1 -1
  39. package/dist/components/vue-ui-heatmap.js +1 -1
  40. package/dist/components/vue-ui-history-plot.js +1 -1
  41. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  42. package/dist/components/vue-ui-icon.js +1 -1
  43. package/dist/components/vue-ui-kpi.js +1 -1
  44. package/dist/components/vue-ui-mini-loader.js +1 -1
  45. package/dist/components/vue-ui-molecule.js +1 -1
  46. package/dist/components/vue-ui-mood-radar.js +1 -1
  47. package/dist/components/vue-ui-nested-donuts.js +1 -1
  48. package/dist/components/vue-ui-onion.js +1 -1
  49. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  50. package/dist/components/vue-ui-quadrant.js +1 -1
  51. package/dist/components/vue-ui-quick-chart.js +1 -1
  52. package/dist/components/vue-ui-radar.js +1 -1
  53. package/dist/components/vue-ui-rating.js +1 -1
  54. package/dist/components/vue-ui-relation-circle.js +1 -1
  55. package/dist/components/vue-ui-ridgeline.js +1 -1
  56. package/dist/components/vue-ui-rings.js +1 -1
  57. package/dist/components/vue-ui-scatter.js +1 -1
  58. package/dist/components/vue-ui-skeleton.js +1 -1
  59. package/dist/components/vue-ui-smiley.js +1 -1
  60. package/dist/components/vue-ui-spark-trend.js +1 -1
  61. package/dist/components/vue-ui-sparkbar.js +1 -1
  62. package/dist/components/vue-ui-sparkgauge.js +1 -1
  63. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  64. package/dist/components/vue-ui-sparkline.js +1 -1
  65. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  66. package/dist/components/vue-ui-stackbar.js +1 -1
  67. package/dist/components/vue-ui-strip-plot.js +1 -1
  68. package/dist/components/vue-ui-table-heatmap.js +1 -1
  69. package/dist/components/vue-ui-table-sparkline.js +1 -1
  70. package/dist/components/vue-ui-table.js +1 -1
  71. package/dist/components/vue-ui-thermometer.js +1 -1
  72. package/dist/components/vue-ui-timer.js +1 -1
  73. package/dist/components/vue-ui-tiremarks.js +1 -1
  74. package/dist/components/vue-ui-treemap.js +1 -1
  75. package/dist/components/vue-ui-vertical-bar.js +1 -1
  76. package/dist/components/vue-ui-waffle.js +1 -1
  77. package/dist/components/vue-ui-wheel.js +1 -1
  78. package/dist/components/vue-ui-word-cloud.js +1 -1
  79. package/dist/components/vue-ui-world.js +1 -1
  80. package/dist/components/vue-ui-xy-canvas.js +1 -1
  81. package/dist/components/vue-ui-xy.js +1 -1
  82. package/dist/{dom-to-png-Tq92GZKA.js → dom-to-png-xQ7LXrxp.js} +1 -1
  83. package/dist/{img-DI-W68vp.js → img-CFY3JivG.js} +1 -1
  84. package/dist/{lib-CSDxt1Zh.js → lib-BcBZIm6u.js} +439 -395
  85. package/dist/{pdf-BzVpWnNO.js → pdf-O34i6EQX.js} +1 -1
  86. package/dist/style.css +1 -1
  87. package/dist/types/vue-data-ui.d.ts +82 -8
  88. package/dist/{useAutoSizeLabelsInsideViewbox-CtQ7pJ8G.js → useAutoSizeLabelsInsideViewbox-BHq4FD8x.js} +1 -1
  89. package/dist/{useNestedProp-Dh-ldrr5.js → useNestedProp-B7CiTRDS.js} +327 -240
  90. package/dist/{usePrinter-Cq8Pt6Lh.js → usePrinter-C1GiglOH.js} +2 -2
  91. package/dist/{vue-data-ui-CDY7snWF.js → vue-data-ui-oDJui39L.js} +64 -64
  92. package/dist/vue-data-ui.js +100 -100
  93. package/dist/{vue-ui-3d-bar-DbpiTjGu.js → vue-ui-3d-bar-wycTM073.js} +56 -56
  94. package/dist/{vue-ui-accordion-CaClZrCp.js → vue-ui-accordion-BKkTS12x.js} +3 -3
  95. package/dist/{vue-ui-age-pyramid-DuIxXz5p.js → vue-ui-age-pyramid-C5NUZ_Y7.js} +39 -39
  96. package/dist/{vue-ui-annotator-C2efSKQK.js → vue-ui-annotator-DkSYrnwb.js} +7 -7
  97. package/dist/{vue-ui-bullet-qpcqLKmp.js → vue-ui-bullet-CIsX5UJw.js} +7 -7
  98. package/dist/vue-ui-candlestick-BRFx3_KK.js +1334 -0
  99. package/dist/{vue-ui-carousel-table-CCTtArFX.js → vue-ui-carousel-table-hJySHJTu.js} +29 -29
  100. package/dist/{vue-ui-chestnut-CbvxJ8hy.js → vue-ui-chestnut-D4GjvQh0.js} +70 -70
  101. package/dist/{vue-ui-chord-Cp9nyIdv.js → vue-ui-chord-By2NOs0N.js} +35 -35
  102. package/dist/{vue-ui-circle-pack-kHzd0UYO.js → vue-ui-circle-pack-OCmAkTNs.js} +59 -59
  103. package/dist/{vue-ui-cursor-DEvkJRCz.js → vue-ui-cursor-iuati4v1.js} +2 -2
  104. package/dist/{vue-ui-dashboard-k_mz9iwy.js → vue-ui-dashboard-C7fwU9xb.js} +67 -67
  105. package/dist/{vue-ui-digits-CqWCkEu2.js → vue-ui-digits-eYxf3UFN.js} +2 -2
  106. package/dist/{vue-ui-donut-CDKS6sVu.js → vue-ui-donut-dVVBUQJz.js} +189 -189
  107. package/dist/{vue-ui-donut-evolution-C6cGI_P3.js → vue-ui-donut-evolution-BoWGaQP0.js} +82 -82
  108. package/dist/{vue-ui-dumbbell-ZjJst3xs.js → vue-ui-dumbbell-YMPZ3CVA.js} +66 -66
  109. package/dist/{vue-ui-flow-sX1PYIkr.js → vue-ui-flow-BE62rVS3.js} +75 -75
  110. package/dist/{vue-ui-funnel--VViM9gH.js → vue-ui-funnel-kNpDFAWo.js} +63 -63
  111. package/dist/{vue-ui-galaxy-Du0V9GF8.js → vue-ui-galaxy-BBBiXXyk.js} +62 -62
  112. package/dist/{vue-ui-gauge-BAe4p2g-.js → vue-ui-gauge-PQNTTl3Y.js} +58 -58
  113. package/dist/{vue-ui-gizmo-CfjwAt38.js → vue-ui-gizmo-D3gQxQz3.js} +3 -3
  114. package/dist/{vue-ui-heatmap-Q0jrPM5h.js → vue-ui-heatmap-CKWQButF.js} +104 -104
  115. package/dist/{vue-ui-history-plot-CLSN3mPy.js → vue-ui-history-plot-DYFzdR4Z.js} +91 -91
  116. package/dist/{vue-ui-kpi-CBRgXD1s.js → vue-ui-kpi-N8s0i48S.js} +3 -3
  117. package/dist/{vue-ui-mini-loader-3yCeDEPK.js → vue-ui-mini-loader-Db-9iQcC.js} +2 -2
  118. package/dist/{vue-ui-molecule-Ddh4hbX0.js → vue-ui-molecule-Cklyb74B.js} +102 -102
  119. package/dist/{vue-ui-mood-radar-CK8UF-ka.js → vue-ui-mood-radar-Cvq4ZuLe.js} +28 -28
  120. package/dist/{vue-ui-nested-donuts-DO0FV0tU.js → vue-ui-nested-donuts-Bm78P1ES.js} +60 -60
  121. package/dist/{vue-ui-onion-DXLqoj-4.js → vue-ui-onion-Bh5jTb31.js} +46 -46
  122. package/dist/{vue-ui-parallel-coordinate-plot-BlffHAHB.js → vue-ui-parallel-coordinate-plot-BKdN2OsW.js} +64 -64
  123. package/dist/{vue-ui-quadrant-pw2ALj7p.js → vue-ui-quadrant-BPhJzots.js} +8 -8
  124. package/dist/{vue-ui-quick-chart-9oGbV593.js → vue-ui-quick-chart-DbJR9CN3.js} +86 -86
  125. package/dist/vue-ui-radar-CrenQprr.js +938 -0
  126. package/dist/{vue-ui-rating-C4yZY1sb.js → vue-ui-rating-fR2WRHYO.js} +2 -2
  127. package/dist/{vue-ui-relation-circle-Duxv-A4H.js → vue-ui-relation-circle-BJ5RuZ0j.js} +31 -31
  128. package/dist/{vue-ui-ridgeline-B-q7J-C0.js → vue-ui-ridgeline-CKuom5Bu.js} +97 -97
  129. package/dist/{vue-ui-rings-PRAcmP1H.js → vue-ui-rings-B84GAEf4.js} +50 -50
  130. package/dist/{vue-ui-scatter-BLW4MJtJ.js → vue-ui-scatter-CBX-g9w3.js} +100 -100
  131. package/dist/{vue-ui-skeleton-D0PF0jxa.js → vue-ui-skeleton-CZ8xxpEU.js} +3 -3
  132. package/dist/{vue-ui-smiley-Be44gMTh.js → vue-ui-smiley-BKXuAviQ.js} +2 -2
  133. package/dist/{vue-ui-spark-trend-B2XY2dRa.js → vue-ui-spark-trend-DOf7-cIf.js} +18 -18
  134. package/dist/{vue-ui-sparkbar-DWQN4gvR.js → vue-ui-sparkbar-D-MPA2zf.js} +3 -3
  135. package/dist/{vue-ui-sparkgauge-fDhQGQ12.js → vue-ui-sparkgauge-B9xRiVSU.js} +6 -6
  136. package/dist/{vue-ui-sparkhistogram-f7Acvipt.js → vue-ui-sparkhistogram-BWb0lqQP.js} +4 -4
  137. package/dist/{vue-ui-sparkline-Ys3JW7Ap.js → vue-ui-sparkline-BF-qr8Ti.js} +23 -23
  138. package/dist/{vue-ui-sparkstackbar-Dv0HeSna.js → vue-ui-sparkstackbar-DnCUpk50.js} +17 -17
  139. package/dist/vue-ui-stackbar-DvJ8Hahn.js +1695 -0
  140. package/dist/{vue-ui-strip-plot-DN13ntF-.js → vue-ui-strip-plot-SAh1gIs5.js} +52 -52
  141. package/dist/{vue-ui-table-Qb5tDX1n.js → vue-ui-table-BJdDfMYD.js} +18 -18
  142. package/dist/{vue-ui-table-heatmap-hMrgJ25a.js → vue-ui-table-heatmap-DU6GKPVy.js} +32 -32
  143. package/dist/{vue-ui-table-sparkline-CdkFyJjv.js → vue-ui-table-sparkline-BBFEJ8c6.js} +28 -28
  144. package/dist/{vue-ui-thermometer-D7U2C7kJ.js → vue-ui-thermometer-D8DH6QSN.js} +22 -22
  145. package/dist/{vue-ui-timer-KtA4M2mV.js → vue-ui-timer-CaUdAHBE.js} +29 -29
  146. package/dist/{vue-ui-tiremarks-C6GTGszq.js → vue-ui-tiremarks-_sUH1d3J.js} +14 -14
  147. package/dist/{vue-ui-treemap-rhnl1TW9.js → vue-ui-treemap-DXduzuW4.js} +78 -78
  148. package/dist/{vue-ui-vertical-bar-n_Lvbd_X.js → vue-ui-vertical-bar-JdjmgwQj.js} +94 -94
  149. package/dist/{vue-ui-waffle-D-4whGLN.js → vue-ui-waffle-h8zoi4Rc.js} +68 -68
  150. package/dist/{vue-ui-wheel-D92HLjfr.js → vue-ui-wheel-Ck1Mx37j.js} +21 -21
  151. package/dist/{vue-ui-word-cloud-Df9AMw6v.js → vue-ui-word-cloud-CjWvuukM.js} +47 -47
  152. package/dist/{vue-ui-world-Bg9S35ug.js → vue-ui-world-Dw71_Mu2.js} +6 -6
  153. package/dist/vue-ui-xy-canvas-Dct7tf8w.js +1548 -0
  154. package/dist/vue-ui-xy-tSMgXqqb.js +3375 -0
  155. package/package.json +2 -2
  156. package/dist/vue-ui-candlestick-DTWbbdGH.js +0 -1073
  157. package/dist/vue-ui-radar-Csznqw19.js +0 -891
  158. package/dist/vue-ui-stackbar-DUlN5QiM.js +0 -1457
  159. package/dist/vue-ui-xy-Da6oy2rm.js +0 -4527
  160. package/dist/vue-ui-xy-canvas-0CLSIKpO.js +0 -1305
@@ -1,1457 +0,0 @@
1
- import { defineAsyncComponent as H, useSlots as Ia, computed as m, ref as y, onMounted as Rt, toRefs as Na, watch as ze, shallowRef as It, onBeforeUnmount as Nt, watchEffect as Ot, nextTick as Pt, createElementBlock as o, openBlock as r, unref as v, normalizeStyle as j, normalizeClass as le, createBlock as B, createCommentVNode as d, renderSlot as L, createElementVNode as D, createVNode as he, createSlots as Ge, withCtx as C, normalizeProps as W, guardReactiveProps as Y, Fragment as b, renderList as p, mergeProps as Ce, toDisplayString as T, Teleport as Oa, resolveDynamicComponent as Pa, createTextVNode as Vt } from "vue";
2
- import { u as Va, a as Dt } from "./useNestedProp-Dh-ldrr5.js";
3
- import { c as Et, t as Da, b as Ea, p as Se, B as se, e as Fa, o as Ft, f as Ut, g as Ua, h as Ha, a8 as _e, a9 as Ht, C as Bt, X as Ba, m as Wa, a4 as $e, E as Wt, a as Te, d as ee, L as Ya, H as Xa, z as Yt, x as Ga, y as Ja, A as qa } from "./lib-CSDxt1Zh.js";
4
- import { t as Je, u as Za } from "./useResponsive-DfdjqQps.js";
5
- import { u as Ka } from "./usePrinter-Cq8Pt6Lh.js";
6
- import { u as Qa, B as ja } from "./BaseScanner-BgWxam9d.js";
7
- import { u as el } from "./useSvgExport-DrjCWun4.js";
8
- import { u as tl } from "./useTimeLabels-BGFjWgrv.js";
9
- import { u as al } from "./useUserOptionState-BIvW1Kz7.js";
10
- import { u as ll } from "./useChartAccessibility-9icAAmYg.js";
11
- import { u as sl } from "./useTimeLabelCollider-CIsgDrl9.js";
12
- import rl from "./img-DI-W68vp.js";
13
- import ol from "./Title-B6rAo9Oz.js";
14
- import { _ as nl } from "./Shape-BS9UGhNq.js";
15
- import { t as il } from "./themes-Dw-dDudK.js";
16
- import ul from "./Legend-CCBZ2x8T.js";
17
- import { S as cl } from "./Slicer-BOki89CB.js";
18
- import { _ as hl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
19
- const vl = ["id"], dl = ["id"], gl = ["xmlns", "viewBox"], yl = ["x", "y", "width", "height"], bl = { key: 1 }, fl = ["id"], ml = ["stop-color"], pl = ["stop-color"], xl = ["stop-color"], kl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], wl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ll = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], zl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Cl = { key: 0 }, Sl = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], _l = { key: 0 }, $l = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], Tl = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], Ml = { key: 0 }, Al = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], Rl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Il = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Nl = ["x", "y", "font-size", "fill", "font-weight"], Ol = ["transform", "font-size", "fill", "font-weight"], Pl = ["x", "y", "font-size", "fill", "font-weight"], Vl = ["x", "y", "font-size", "font-weight", "fill"], Dl = ["x", "y", "font-size", "fill", "font-weight"], El = ["x", "y", "font-size", "font-weight", "fill"], Fl = ["x1", "x2", "y1", "y2", "stroke"], Ul = ["x", "y", "font-size", "font-weight", "fill"], Hl = ["x1", "x2", "y1", "y2", "stroke"], Bl = ["font-size", "font-weight", "fill", "text-anchor", "transform"], Wl = { key: 0 }, Yl = { key: 1 }, Xl = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], Gl = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], Jl = { key: 0 }, ql = { key: 1 }, Zl = ["font-size", "font-weight", "fill", "x", "y", "onClick"], Kl = ["font-size", "font-weight", "fill", "x", "y", "onClick", "innerHTML"], Ql = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], jl = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], es = {
20
- key: 3,
21
- class: "vue-data-ui-watermark"
22
- }, ts = ["id"], as = ["onClick"], ls = ["innerHTML"], ss = {
23
- __name: "vue-ui-stackbar",
24
- props: {
25
- config: {
26
- type: Object,
27
- default() {
28
- return {};
29
- }
30
- },
31
- dataset: {
32
- type: Array,
33
- default() {
34
- return [];
35
- }
36
- }
37
- },
38
- emits: ["selectDatapoint", "selectLegend", "selectTimeLabel"],
39
- setup(Me, { expose: Xt, emit: Gt }) {
40
- const Jt = H(() => import("./Tooltip-DaInVNiV.js")), qt = H(() => import("./BaseIcon-DG6cvf2h.js")), Zt = H(() => import("./vue-ui-accordion-CaClZrCp.js")), Kt = H(() => import("./DataTable-DUpZ_s2c.js")), Qt = H(() => import("./PenAndPaper-D9LruJaM.js")), jt = H(() => import("./UserOptions-CJXSEhan.js")), ea = H(() => import("./PackageVersion-CQvYRebC.js")), ta = H(() => import("./BaseDraggableDialog-Cysanw8-.js")), { vue_ui_stackbar: aa } = Va(), la = Ia(), f = Me, Ae = Gt, ve = m({
41
- get() {
42
- return !!f.dataset && f.dataset.length;
43
- },
44
- set(a) {
45
- return a;
46
- }
47
- }), O = y(null), M = y(Et()), Re = y(!1), Ie = y(null), Ne = y(""), _ = y([]), qe = y(0), Ze = y(null), Ke = y(null), Qe = y(null), je = y(null), et = y(0), re = y(!1), de = y(null), X = y(!1), tt = y(0), sa = y(0), ra = y(0), at = y(null), lt = y(!1), oe = y(null), Oe = y(null), Pe = y(null), Ve = y(null), G = y(null), J = y(null), oa = y(null), st = y(null);
48
- Rt(() => {
49
- lt.value = !0, He();
50
- });
51
- const e = y(Fe()), { loading: ne, FINAL_DATASET: ge, manualLoading: ye } = Qa({
52
- ...Na(f),
53
- FINAL_CONFIG: e,
54
- prepareConfig: Fe,
55
- callback: () => {
56
- Promise.resolve().then(async () => {
57
- await Be();
58
- });
59
- },
60
- skeletonDataset: [
61
- {
62
- name: "",
63
- series: [2, 3, 5, 8, 13, 21],
64
- color: "#BABABA"
65
- },
66
- {
67
- name: "",
68
- series: [1, 2, 3, 5, 8, 13],
69
- color: "#CACACA"
70
- }
71
- ],
72
- skeletonConfig: Da({
73
- defaultConfig: e.value,
74
- userConfig: {
75
- userOptions: { show: !1 },
76
- useCssAnimation: !1,
77
- table: { show: !1 },
78
- tooltip: { show: !1 },
79
- style: {
80
- chart: {
81
- backgroundColor: "#99999930",
82
- bars: {
83
- totalValues: { show: !1 },
84
- dataLabels: { show: !1 }
85
- },
86
- grid: {
87
- scale: {
88
- scaleMin: 0,
89
- scaleMax: 40
90
- },
91
- x: {
92
- axisColor: "#6A6A6A",
93
- linesColor: "#6A6A6A",
94
- axisName: { show: !1 },
95
- timeLabels: { show: !1 }
96
- },
97
- y: {
98
- axisColor: "#6A6A6A",
99
- linesColor: "#6A6A6A",
100
- axisName: { show: !1 },
101
- axisLabels: { show: !1 }
102
- }
103
- },
104
- legend: {
105
- backgroundColor: "transparent"
106
- },
107
- padding: {
108
- left: 24,
109
- right: 24,
110
- bottom: 12
111
- },
112
- zoom: {
113
- show: !1,
114
- startIndex: null,
115
- endIndex: null
116
- }
117
- }
118
- }
119
- }
120
- })
121
- }), { userOptionsVisible: De, setUserOptionsVisibility: rt, keepUserOptionState: ot } = al({ config: e.value }), { svgRef: Ee } = ll({ config: e.value.style.chart.title });
122
- function Fe() {
123
- const a = Dt({
124
- userConfig: f.config,
125
- defaultConfig: aa
126
- });
127
- let l = {};
128
- return a.theme ? l = {
129
- ...Dt({
130
- userConfig: il.vue_ui_stackbar[a.theme] || f.config,
131
- defaultConfig: a
132
- }),
133
- customPalette: Ea[a.theme] || Se
134
- } : l = a, f.config && se(f.config, "style.chart.grid.scale.scaleMin") ? l.style.chart.grid.scale.scaleMin = f.config.style.chart.grid.scale.scaleMin : l.style.chart.grid.scale.scaleMin = null, f.config && se(f.config, "style.chart.grid.scale.scaleMax") ? l.style.chart.grid.scale.scaleMax = f.config.style.chart.grid.scale.scaleMax : l.style.chart.grid.scale.scaleMax = null, f.config && se(f.config, "style.chart.zoom.startIndex") ? l.style.chart.zoom.startIndex = f.config.style.chart.zoom.startIndex : l.style.chart.zoom.startIndex = null, f.config && se(f.config, "style.chart.zoom.endIndex") ? l.style.chart.zoom.endIndex = f.config.style.chart.zoom.endIndex : l.style.chart.zoom.endIndex = null, f.config && se(f.config, "style.chart.bars.dataLabels.hideUnderValue") ? l.style.chart.bars.dataLabels.hideUnderValue = f.config.style.chart.bars.dataLabels.hideUnderValue : l.style.chart.bars.dataLabels.hideUnderValue = null, f.config && se(f.config, "style.chart.bars.dataLabels.hideUnderPercentage") ? l.style.chart.bars.dataLabels.hideUnderPercentage = f.config.style.chart.bars.dataLabels.hideUnderPercentage : l.style.chart.bars.dataLabels.hideUnderPercentage = null, l;
135
- }
136
- const nt = m(() => e.value.style.chart.bars.dataLabels.hideUnderValue !== null), it = m(() => e.value.style.chart.bars.dataLabels.hideUnderPercentage !== null);
137
- ze(() => f.config, (a) => {
138
- ne.value || (e.value = Fe()), De.value = !e.value.userOptions.showOnChartHover, He(), tt.value += 1, sa.value += 1, ra.value += 1, z.value.dataLabels.show = e.value.style.chart.bars.dataLabels.show, z.value.showTable = e.value.table.show, z.value.showTooltip = e.value.style.chart.tooltip.show;
139
- }, { deep: !0 }), ze(() => f.dataset, (a) => {
140
- Array.isArray(a) && a.length > 0 && (ye.value = !1), yt();
141
- }, { deep: !0 });
142
- const z = y({
143
- dataLabels: {
144
- show: e.value.style.chart.bars.dataLabels.show
145
- },
146
- showTable: e.value.table.show,
147
- showTooltip: e.value.style.chart.tooltip.show
148
- });
149
- ze(e, () => {
150
- z.value = {
151
- dataLabels: {
152
- show: e.value.style.chart.bars.dataLabels.show
153
- },
154
- showTable: e.value.table.show,
155
- showTooltip: e.value.style.chart.tooltip.show
156
- };
157
- }, { immediate: !0 });
158
- const { isPrinting: ut, isImaging: ct, generatePdf: ht, generateImage: vt } = Ka({
159
- elementId: `stackbar_${M.value}`,
160
- fileName: e.value.style.chart.title.text || "vue-ui-stackbar",
161
- options: e.value.userOptions.print
162
- }), te = y({
163
- width: e.value.style.chart.width,
164
- height: e.value.style.chart.height,
165
- paddingRatio: {
166
- top: e.value.style.chart.padding.top / e.value.style.chart.height,
167
- right: e.value.style.chart.padding.right / e.value.style.chart.width,
168
- bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
169
- left: e.value.style.chart.padding.left / e.value.style.chart.width
170
- }
171
- }), na = m(() => Fa(e.value.customPalette)), E = It(null), ae = It(null), dt = y(null);
172
- Rt(() => {
173
- He();
174
- });
175
- const Ue = m(() => !!e.value.debug);
176
- function He() {
177
- if (Ft(f.dataset) ? (Ut({
178
- componentName: "VueUiStackbar",
179
- type: "dataset",
180
- debug: Ue.value
181
- }), ye.value = !0) : f.dataset.forEach((a, l) => {
182
- Ua({
183
- datasetObject: a,
184
- requiredAttributes: ["name", "series"]
185
- }).forEach((t) => {
186
- ve.value = !1, Ut({
187
- componentName: "VueUiStackbar",
188
- type: "datasetSerieAttribute",
189
- property: t,
190
- index: l,
191
- debug: Ue.value
192
- }), ye.value = !0;
193
- });
194
- }), Ft(f.dataset) || (ye.value = e.value.loading), setTimeout(() => {
195
- X.value = !0;
196
- }, 10), e.value.responsive) {
197
- const a = Je(() => {
198
- X.value = !1;
199
- const { width: l, height: t } = Za({
200
- chart: O.value,
201
- title: e.value.style.chart.title.text ? Ze.value : null,
202
- legend: e.value.style.chart.legend.show ? Ke.value : null,
203
- slicer: e.value.style.chart.zoom.show && U.value > 1 ? Qe.value : null,
204
- source: je.value
205
- });
206
- requestAnimationFrame(() => {
207
- te.value.width = l, te.value.height = t - 12, clearTimeout(dt.value), dt.value = setTimeout(() => {
208
- X.value = !0;
209
- }, 10);
210
- });
211
- });
212
- E.value && (ae.value && E.value.unobserve(ae.value), E.value.disconnect()), E.value = new ResizeObserver(a), ae.value = O.value.parentNode, E.value.observe(ae.value);
213
- }
214
- Be();
215
- }
216
- Nt(() => {
217
- E.value && (ae.value && E.value.unobserve(ae.value), E.value.disconnect());
218
- });
219
- function ia() {
220
- let a = 0;
221
- e.value.orientation === "vertical" && G.value && (a = Array.from(G.value.querySelectorAll("text")).reduce((s, c) => {
222
- const u = c.getComputedTextLength();
223
- return u > s ? u : s;
224
- }, 0)), e.value.orientation === "horizontal" && J.value && (a = Array.from(J.value.querySelectorAll("text")).reduce((s, c) => {
225
- const u = c.getComputedTextLength();
226
- return u > s ? u : s;
227
- }, 0));
228
- const l = Ve.value ? Ve.value.getBoundingClientRect().width : 0;
229
- return a + l + (l ? 24 : 0);
230
- }
231
- const be = y(0), fe = y(0), ua = Je((a) => {
232
- be.value = a;
233
- }, 100);
234
- Ot((a) => {
235
- const l = e.value.orientation === "vertical" ? J.value : G.value;
236
- if (!l) return;
237
- const t = new ResizeObserver((s) => {
238
- ua(s[0].contentRect.height);
239
- });
240
- t.observe(l), a(() => t.disconnect());
241
- });
242
- const ca = Je((a) => {
243
- fe.value = a + e.value.style.chart.bars.totalValues.fontSize;
244
- }, 100);
245
- Ot((a) => {
246
- if (e.value.orientation === "vertical") return;
247
- const l = st.value;
248
- if (!l) return;
249
- const t = new ResizeObserver((s) => {
250
- ca(s[0].contentRect.width);
251
- });
252
- t.observe(l), a(() => t.disconnect());
253
- }), Nt(() => {
254
- be.value = 0, fe.value = 0;
255
- });
256
- const gt = m(() => {
257
- let a = 0;
258
- Pe.value && (a = Pe.value.getBBox().height);
259
- let l = 0;
260
- return e.value.orientation === "vertical" && J.value && (l = be.value), e.value.orientation === "horizontal" && G.value && (l = be.value), a + l;
261
- }), n = m(() => {
262
- const { height: a, width: l } = te.value, { right: t } = te.value.paddingRatio;
263
- let s = e.value.style.chart.bars.totalValues.show && f.dataset && f.dataset.length > 1 ? e.value.style.chart.bars.totalValues.fontSize * 1.3 : 0, c = 0;
264
- e.value.style.chart.grid.y.axisLabels.show && (c = ia());
265
- const u = e.value.style.chart.padding.top + s, S = l - l * t - fe.value, q = a - e.value.style.chart.padding.bottom - gt.value - s, Z = e.value.style.chart.padding.left + c, K = l - Z - l * t - fe.value, P = a - u - e.value.style.chart.padding.bottom - gt.value - s;
266
- return {
267
- chartHeight: a,
268
- chartWidth: l,
269
- top: u,
270
- right: S,
271
- bottom: q,
272
- left: Z,
273
- width: Math.max(0, K),
274
- height: Math.max(0, P)
275
- };
276
- }), F = m(() => ge.value.map((a, l) => {
277
- const t = Ha(a.color) || na.value[l] || Se[l] || Se[l % Se.length];
278
- return {
279
- ...a,
280
- // In distributed mode, all values are converted to positive
281
- series: JSON.parse(JSON.stringify(a.series)).map((s) => e.value.style.chart.bars.distributed ? Math.abs(s) : s),
282
- // Store signs to manage display of neg values in distributed mode
283
- signedSeries: a.series.map((s) => s >= 0 ? 1 : -1),
284
- absoluteIndex: l,
285
- id: Et(),
286
- color: t
287
- };
288
- })), U = m(() => Math.max(...F.value.filter((a) => !_.value.includes(a.id)).map((a) => a.series.length))), h = y({
289
- start: 0,
290
- end: Math.max(...ge.value.map((a) => a.series.length))
291
- });
292
- function yt() {
293
- Be();
294
- }
295
- async function Be() {
296
- await Pt(), await Pt();
297
- const { startIndex: a, endIndex: l } = e.value.style.chart.zoom, t = at.value, s = Math.max(...ge.value.map((c) => c.series.length));
298
- h.value = { start: 0, end: s }, (a != null || l != null) && t ? (a != null ? t.setStartValue(a) : (h.value.start = 0, t.setStartValue(0)), l != null ? t.setEndValue(ha(l + 1)) : (h.value.end = s, t.setEndValue(s))) : (h.value = { start: 0, end: s }, et.value += 1);
299
- }
300
- function ha(a) {
301
- const l = Math.max(...ge.value.map((t) => t.series.length));
302
- return a > l ? l : a < 0 || e.value.style.chart.zoom.startIndex !== null && a < e.value.style.chart.zoom.startIndex ? e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex + 1 : 1 : a;
303
- }
304
- const g = m(() => {
305
- let a;
306
- return e.value.orientation === "vertical" ? a = n.value.width / (h.value.end - h.value.start) : a = n.value.height / (h.value.end - h.value.start), a <= 0 ? 0 : a;
307
- }), ie = m(() => _e(F.value.filter((a) => !_.value.includes(a.id))).slice(h.value.start, h.value.end)), va = m(() => _e(F.value.filter((a) => !_.value.includes(a.id)).map((a) => ({
308
- ...a,
309
- series: a.series.map((l, t) => a.signedSeries[t] === -1 && l >= 0 ? -l : l)
310
- }))).slice(h.value.start, h.value.end)), me = m(() => {
311
- const a = F.value.filter((l) => !_.value.includes(l.id));
312
- return {
313
- positive: _e(a.map((l) => ({
314
- ...l,
315
- series: l.series.slice(h.value.start, h.value.end).map((t) => t >= 0 ? t : 0)
316
- }))),
317
- negative: _e(a.map((l) => ({
318
- ...l,
319
- series: l.series.slice(h.value.start, h.value.end).map((t) => t < 0 ? t : 0)
320
- })))
321
- };
322
- }), N = m(() => {
323
- const a = e.value.style.chart.grid.scale.scaleMax !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMax : Math.max(...me.value.positive), l = Math.min(...me.value.negative), t = e.value.style.chart.grid.scale.scaleMin !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMin : [-1 / 0, 1 / 0, NaN, void 0, null].includes(l) ? 0 : l, s = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? Ht(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks) : Bt(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks);
324
- return s.ticks.map((c) => ({
325
- zero: n.value.bottom - n.value.height * (Math.abs(s.min) / (s.max + Math.abs(s.min))),
326
- y: n.value.bottom - n.value.height * ((c + Math.abs(s.min)) / (s.max + Math.abs(s.min))),
327
- x: n.value.left - 8,
328
- horizontal_zero: n.value.left + n.value.width * (Math.abs(s.min) / (s.max + Math.abs(s.min))),
329
- horizontal_x: n.value.left + n.value.width * ((c + Math.abs(s.min)) / (s.max + Math.abs(s.min))),
330
- horizontal_y: n.value.bottom - 8,
331
- value: c
332
- }));
333
- }), $ = m(() => tl({
334
- values: e.value.style.chart.grid.x.timeLabels.values,
335
- maxDatapoints: U.value,
336
- formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
337
- start: h.value.start,
338
- end: h.value.end
339
- })), w = m(() => {
340
- if (!ve.value && !ne.value) return [];
341
- let a = Array(U.value).fill(0), l = Array(U.value).fill(0), t = Array(U.value).fill(0), s = Array(U.value).fill(0);
342
- const c = Math.max(...me.value.positive) || 0, u = Math.min(...me.value.negative), S = [-1 / 0, 1 / 0, NaN, void 0, null].includes(u) ? 0 : u, q = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? Ht(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : S > 0 ? 0 : S, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks) : Bt(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : S > 0 ? 0 : S, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks), { min: Z, max: K } = q, P = K + (Z >= 0 ? 0 : Math.abs(Z)) || 1, A = n.value.height, Le = n.value.width, Mt = N.value[0] ? N.value[0].zero : n.value.bottom, At = N.value[0] ? N.value[0].horizontal_zero : n.value.left;
343
- return F.value.filter((ce) => !_.value.includes(ce.id)).map((ce) => {
344
- const V = ce.series.slice(h.value.start, h.value.end), Ca = ce.signedSeries.slice(h.value.start, h.value.end), Sa = V.map((x, k) => n.value.left + g.value * k + g.value * e.value.style.chart.bars.gapRatio / 4), _a = V.map((x, k) => n.value.top + g.value * k + g.value * e.value.style.chart.bars.gapRatio / 4), $a = V.map((x, k) => {
345
- const R = e.value.style.chart.bars.distributed ? (x || 0) / ie.value[k] : (x || 0) / P;
346
- let Q, I;
347
- return x > 0 ? (I = A * R, Q = Mt - I - a[k], a[k] += I) : (I = A * R, Q = Mt + t[k], t[k] += Math.abs(I)), Q;
348
- }), Ta = V.map((x, k) => {
349
- const R = e.value.style.chart.bars.distributed ? (x || 0) / ie.value[k] : (x || 0) / P;
350
- let Q, I;
351
- return x > 0 ? (I = Le * R, Q = At + l[k], l[k] += I) : (I = Le * R, Q = At - Math.abs(I) - s[k], s[k] += Math.abs(I)), Q;
352
- }), Ma = V.map((x, k) => {
353
- const R = e.value.style.chart.bars.distributed ? (x || 0) / ie.value[k] : (x || 0) / P;
354
- return x > 0 ? A * R : A * Math.abs(R);
355
- }), Aa = V.map((x, k) => {
356
- const R = e.value.style.chart.bars.distributed ? (x || 0) / ie.value[k] : (x || 0) / P;
357
- return x > 0 ? Le * R : Le * Math.abs(R);
358
- }), Ra = V.map((x) => Math.abs(x)).reduce((x, k) => x + k, 0);
359
- return {
360
- ...ce,
361
- proportions: V.map((x, k) => e.value.style.chart.bars.distributed ? (x || 0) / ie.value[k] : (x || 0) / Ra),
362
- series: V,
363
- signedSeries: Ca,
364
- x: Sa,
365
- y: $a,
366
- height: Ma,
367
- horizontal_width: Aa,
368
- horizontal_y: _a,
369
- horizontal_x: Ta
370
- };
371
- });
372
- }), bt = m(() => va.value.map((a, l) => ({
373
- value: a,
374
- sign: a >= 0 ? 1 : -1
375
- })));
376
- function pe(a, l, t, s, c) {
377
- const u = c === -1 && a >= 0 ? -a : a;
378
- return Te(
379
- e.value.style.chart.bars.dataLabels.formatter,
380
- u,
381
- ee({
382
- p: e.value.style.chart.bars.dataLabels.prefix,
383
- v: u,
384
- s: e.value.style.chart.bars.dataLabels.suffix,
385
- r: e.value.style.chart.bars.dataLabels.rounding
386
- }),
387
- { datapoint: l, seriesIndex: t, datapointIndex: s }
388
- );
389
- }
390
- function ft(a, l, t, s) {
391
- return Te(
392
- e.value.style.chart.bars.dataLabels.formatter,
393
- a,
394
- ee({
395
- v: isNaN(a) ? 0 : a,
396
- s: "%",
397
- r: e.value.style.chart.bars.dataLabels.rounding
398
- }),
399
- { datapoint: l, seriesIndex: t, datapointIndex: s }
400
- );
401
- }
402
- function mt(a) {
403
- const l = JSON.parse(JSON.stringify(w.value)).map((t) => ({
404
- name: t.name,
405
- value: t.series[a] === 0 ? 0 : t.series[a] || null,
406
- proportion: t.proportions[a] || null,
407
- color: t.color,
408
- id: t.id
409
- }));
410
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: a + h.value.start }), Ae("selectDatapoint", { datapoint: l, period: $.value[a] });
411
- }
412
- function pt(a) {
413
- return JSON.parse(JSON.stringify(w.value)).map((l) => ({
414
- name: l.name,
415
- absoluteIndex: l.absoluteIndex,
416
- value: l.series[a] === 0 ? 0 : (l.signedSeries[a] === -1 && l.series[a] >= 0 ? -l.series[a] : l.series[a]) || null,
417
- proportion: l.proportions[a] || null,
418
- color: l.color,
419
- id: l.id
420
- }));
421
- }
422
- function xt(a) {
423
- if (e.value.events.datapointLeave) {
424
- const l = pt(a);
425
- e.value.events.datapointLeave({ datapoint: l, seriesIndex: a + h.value.start });
426
- }
427
- Re.value = null, de.value = null;
428
- }
429
- function kt(a) {
430
- de.value = a, Re.value = !0;
431
- const l = e.value.style.chart.tooltip.customFormat, t = pt(a);
432
- e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: a + h.value.start }), Ie.value = {
433
- datapoint: t,
434
- seriesIndex: a,
435
- config: e.value,
436
- series: w.value
437
- };
438
- const s = t.map((c) => Math.abs(c.value)).reduce((c, u) => c + u, 0);
439
- if (Yt(l) && qa(() => l({
440
- seriesIndex: a,
441
- datapoint: t,
442
- series: w.value,
443
- config: e.value
444
- })))
445
- Ne.value = l({
446
- seriesIndex: a,
447
- datapoint: t,
448
- series: w.value,
449
- config: e.value
450
- });
451
- else {
452
- const {
453
- showValue: c,
454
- showPercentage: u,
455
- borderColor: S,
456
- roundingValue: q,
457
- roundingPercentage: Z
458
- } = e.value.style.chart.tooltip;
459
- let K = "";
460
- $.value[a] && $.value[a].text && e.value.style.chart.tooltip.showTimeLabel && (K += `<div style="width:100%;text-align:center;border-bottom:1px solid ${S};padding-bottom:6px;margin-bottom:3px;">${$.value[a].text}</div>`);
461
- const P = [
462
- c && u ? "(" : "",
463
- c && u ? ")" : ""
464
- ];
465
- t.reverse().forEach((A) => {
466
- K += `
467
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
468
- <svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${e.value.style.chart.bars.gradient.show ? `url(#gradient_${A.id})` : A.color}"/>${la.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${M.value}_${A.absoluteIndex})"/>` : ""}</svg>
469
- ${A.name}${c || u ? ":" : ""} ${c ? ee({
470
- p: e.value.style.chart.bars.dataLabels.prefix,
471
- v: A.value,
472
- s: e.value.style.chart.bars.dataLabels.suffix,
473
- r: q
474
- }) : ""} ${P[0]}${u ? ee({
475
- v: isNaN(A.value / s) ? 0 : Math.abs(A.value) / s * 100,
476
- // Negs are absed to show relative proportion to absolute total. It's opinionated.
477
- s: "%",
478
- r: Z
479
- }) : ""}${P[1]}
480
- </div>
481
- `;
482
- }), Ne.value = `<div>${K}</div>`;
483
- }
484
- }
485
- const da = m(() => te.value.width), ga = m(() => te.value.height);
486
- sl({
487
- timeLabelsEls: e.value.orientation === "vertical" ? J : G,
488
- timeLabels: $,
489
- slicer: h,
490
- configRef: e,
491
- rotationPath: ["style", "chart", "grid", "x", "timeLabels", "rotation"],
492
- autoRotatePath: ["style", "chart", "grid", "x", "timeLabels", "autoRotate", "enable"],
493
- isAutoSize: !1,
494
- width: da,
495
- height: ga,
496
- rotation: e.value.style.chart.grid.x.timeLabels.autoRotate.angle
497
- });
498
- function wt(a) {
499
- re.value = a, qe.value += 1;
500
- }
501
- function Lt() {
502
- z.value.showTable = !z.value.showTable;
503
- }
504
- function zt() {
505
- z.value.dataLabels.show = !z.value.dataLabels.show;
506
- }
507
- function Ct() {
508
- z.value.showTooltip = !z.value.showTooltip;
509
- }
510
- function ya() {
511
- return w.value;
512
- }
513
- const St = m(() => {
514
- if (w.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
515
- const a = w.value.map(({ name: t, color: s }) => ({
516
- label: t,
517
- color: s
518
- })), l = [];
519
- return $.value.forEach((t) => {
520
- const s = [e.value.style.chart.grid.x.timeLabels.values[t.absoluteIndex] ? t.text : i + 1];
521
- F.value.forEach((c) => {
522
- s.push(Number((c.series[t.absoluteIndex] || 0).toFixed(e.value.table.td.roundingValue)));
523
- }), l.push(s);
524
- }), { head: a, body: l };
525
- });
526
- function We(a = null) {
527
- const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], t = ["", ...St.value.head.map((S) => S.label)], s = St.value.body, c = l.concat([t]).concat(s), u = Ga(c);
528
- a ? a(u) : Ja({ csvContent: u, title: e.value.style.chart.title.text || "vue-ui-stackbar" });
529
- }
530
- const xe = m(() => {
531
- const a = [""].concat(w.value.map((c) => c.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');
532
- let l = [];
533
- for (let c = 0; c < U.value; c += 1) {
534
- const u = w.value.map((S) => S.series[c] ?? 0).reduce((S, q) => S + q, 0);
535
- l.push([e.value.style.chart.grid.x.timeLabels.values.slice(h.value.start, h.value.end)[c] ? $.value[c].text : c + 1].concat(w.value.map((S) => (S.series[c] ?? 0).toFixed(e.value.table.td.roundingValue))).concat((u ?? 0).toFixed(e.value.table.td.roundingValue)));
536
- }
537
- const t = {
538
- th: {
539
- backgroundColor: e.value.table.th.backgroundColor,
540
- color: e.value.table.th.color,
541
- outline: e.value.table.th.outline
542
- },
543
- td: {
544
- backgroundColor: e.value.table.td.backgroundColor,
545
- color: e.value.table.td.color,
546
- outline: e.value.table.td.outline
547
- },
548
- breakpoint: e.value.table.responsiveBreakpoint
549
- }, s = [e.value.table.columnNames.period].concat(w.value.map((c) => c.name)).concat(e.value.table.columnNames.total);
550
- return { head: a, body: l.slice(0, h.value.end - h.value.start), config: t, colNames: s };
551
- });
552
- function ba(a, l) {
553
- if (Ae("selectLegend", w.value.find((t) => t.absoluteIndex === a)), _.value.includes(l.id))
554
- _.value = _.value.filter((t) => t !== l.id);
555
- else {
556
- if (_.value.length === F.value.length - 1) return;
557
- _.value.push(l.id);
558
- }
559
- }
560
- const Ye = m(() => F.value.map((a, l) => ({
561
- ...a,
562
- shape: "square"
563
- })).map((a) => ({
564
- ...a,
565
- opacity: _.value.includes(a.id) ? 0.5 : 1,
566
- segregate: () => ba(a.absoluteIndex, a),
567
- isSegregated: _.value.includes(a.id)
568
- }))), fa = m(() => ({
569
- cy: "stackbar-legend",
570
- backgroundColor: e.value.style.chart.legend.backgroundColor,
571
- color: e.value.style.chart.legend.color,
572
- fontSize: e.value.style.chart.legend.fontSize,
573
- paddingBottom: 12,
574
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
575
- })), ke = y(!1);
576
- function Xe() {
577
- ke.value = !ke.value;
578
- }
579
- function we(a, l) {
580
- const t = JSON.parse(JSON.stringify(w.value)).map((s) => ({
581
- name: s.name,
582
- value: s.series[l] === 0 ? 0 : (s.signedSeries[l] === -1 && s.series[l] >= 0 ? -s.series[l] : s.series[l]) || null,
583
- proportion: s.proportions[l] || null,
584
- color: s.color,
585
- id: s.id
586
- }));
587
- Ae("selectTimeLabel", {
588
- datapoint: t,
589
- absoluteIndex: a.absoluteIndex,
590
- label: a.text
591
- });
592
- }
593
- const ma = m(() => Math.max(...w.value.flatMap((a) => a.series)));
594
- function _t(a, l) {
595
- return e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? it.value ? l * 100 >= e.value.style.chart.bars.dataLabels.hideUnderPercentage : e.value.style.chart.bars.dataLabels.hideEmptyPercentages ? l > 0 : !0 : it.value ? (nt.value && Ue.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."), a > ma.value * e.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : nt.value ? Math.abs(a) >= e.value.style.chart.bars.dataLabels.hideUnderValue : e.value.style.chart.bars.dataLabels.hideEmptyValues ? a !== 0 : !0;
596
- }
597
- async function pa({ scale: a = 2 } = {}) {
598
- if (!O.value) return;
599
- const { width: l, height: t } = O.value.getBoundingClientRect(), s = l / t, { imageUri: c, base64: u } = await rl({ domElement: O.value, base64: !0, img: !0, scale: a });
600
- return {
601
- imageUri: c,
602
- base64: u,
603
- title: e.value.style.chart.title.text,
604
- width: l,
605
- height: t,
606
- aspectRatio: s
607
- };
608
- }
609
- const ue = m(() => {
610
- const a = e.value.table.useDialog && !e.value.table.show, l = z.value.showTable;
611
- return {
612
- component: a ? ta : Zt,
613
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
614
- props: a ? {
615
- backgroundColor: e.value.table.th.backgroundColor,
616
- color: e.value.table.th.color,
617
- headerColor: e.value.table.th.color,
618
- headerBg: e.value.table.th.backgroundColor,
619
- isFullscreen: re.value,
620
- fullscreenParent: O.value,
621
- forcedWidth: Math.min(800, window.innerWidth * 0.8)
622
- } : {
623
- hideDetails: !0,
624
- config: {
625
- open: l,
626
- maxHeight: 1e4,
627
- body: {
628
- backgroundColor: e.value.style.chart.backgroundColor,
629
- color: e.value.style.chart.color
630
- },
631
- head: {
632
- backgroundColor: e.value.style.chart.backgroundColor,
633
- color: e.value.style.chart.color
634
- }
635
- }
636
- }
637
- };
638
- });
639
- ze(() => z.value.showTable, (a) => {
640
- e.value.table.show || (a && e.value.table.useDialog && oe.value ? oe.value.open() : "close" in oe.value && oe.value.close());
641
- });
642
- function $t() {
643
- z.value.showTable = !1, Oe.value && Oe.value.setTableIconState(!1);
644
- }
645
- const xa = m(() => e.value.style.chart.backgroundColor), ka = m(() => e.value.style.chart.legend), wa = m(() => e.value.style.chart.title), { exportSvg: La, getSvg: za } = el({
646
- svg: Ee,
647
- title: wa,
648
- legend: ka,
649
- legendItems: Ye,
650
- backgroundColor: xa
651
- });
652
- async function Tt({ isCb: a }) {
653
- if (a) {
654
- const { blob: l, url: t, text: s, dataUrl: c } = await za();
655
- e.value.userOptions.callbacks.svg({ blob: l, url: t, text: s, dataUrl: c });
656
- } else
657
- La();
658
- }
659
- return Xt({
660
- getData: ya,
661
- getImage: pa,
662
- generatePdf: ht,
663
- generateCsv: We,
664
- generateImage: vt,
665
- generateSvg: Tt,
666
- toggleTable: Lt,
667
- toggleLabels: zt,
668
- toggleTooltip: Ct,
669
- toggleAnnotator: Xe,
670
- toggleFullscreen: wt
671
- }), (a, l) => (r(), o("div", {
672
- id: `stackbar_${M.value}`,
673
- ref_key: "stackbarChart",
674
- ref: O,
675
- class: le({ "vue-data-ui-component": !0, "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": re.value }),
676
- style: j(`background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
677
- onMouseenter: l[4] || (l[4] = () => v(rt)(!0)),
678
- onMouseleave: l[5] || (l[5] = () => v(rt)(!1))
679
- }, [
680
- e.value.userOptions.buttons.annotator ? (r(), B(v(Qt), {
681
- key: 0,
682
- svgRef: v(Ee),
683
- backgroundColor: e.value.style.chart.backgroundColor,
684
- color: e.value.style.chart.color,
685
- active: ke.value,
686
- onClose: Xe
687
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : d("", !0),
688
- L(a.$slots, "userConfig", {}, void 0, !0),
689
- e.value.style.chart.title.text ? (r(), o("div", {
690
- key: 1,
691
- ref_key: "chartTitle",
692
- ref: Ze,
693
- style: "width:100%;background:transparent;padding-bottom:24px"
694
- }, [
695
- (r(), B(ol, {
696
- key: `title_${tt.value}`,
697
- config: {
698
- title: {
699
- cy: "stackbar-title",
700
- ...e.value.style.chart.title
701
- },
702
- subtitle: {
703
- cy: "stackbar-subtitle",
704
- ...e.value.style.chart.title.subtitle
705
- }
706
- }
707
- }, null, 8, ["config"]))
708
- ], 512)) : d("", !0),
709
- D("div", {
710
- id: `legend-top-${M.value}`
711
- }, null, 8, dl),
712
- e.value.userOptions.show && ve.value && (v(ot) || v(De)) ? (r(), B(v(jt), {
713
- ref_key: "userOptionsRef",
714
- ref: Oe,
715
- key: `user_option_${qe.value}`,
716
- backgroundColor: e.value.style.chart.backgroundColor,
717
- color: e.value.style.chart.color,
718
- isPrinting: v(ut),
719
- isImaging: v(ct),
720
- uid: M.value,
721
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
722
- hasPdf: e.value.userOptions.buttons.pdf,
723
- hasImg: e.value.userOptions.buttons.img,
724
- hasSvg: e.value.userOptions.buttons.svg,
725
- hasXls: e.value.userOptions.buttons.csv,
726
- hasTable: e.value.userOptions.buttons.table,
727
- hasLabel: e.value.userOptions.buttons.labels,
728
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
729
- isFullscreen: re.value,
730
- chartElement: O.value,
731
- position: e.value.userOptions.position,
732
- isTooltip: z.value.showTooltip,
733
- titles: { ...e.value.userOptions.buttonTitles },
734
- hasAnnotator: e.value.userOptions.buttons.annotator,
735
- isAnnotation: ke.value,
736
- callbacks: e.value.userOptions.callbacks,
737
- printScale: e.value.userOptions.print.scale,
738
- tableDialog: e.value.table.useDialog,
739
- onToggleFullscreen: wt,
740
- onGeneratePdf: v(ht),
741
- onGenerateCsv: We,
742
- onGenerateImage: v(vt),
743
- onGenerateSvg: Tt,
744
- onToggleTable: Lt,
745
- onToggleLabels: zt,
746
- onToggleTooltip: Ct,
747
- onToggleAnnotator: Xe,
748
- style: j({
749
- visibility: v(ot) ? v(De) ? "visible" : "hidden" : "visible"
750
- })
751
- }, Ge({ _: 2 }, [
752
- a.$slots.menuIcon ? {
753
- name: "menuIcon",
754
- fn: C(({ isOpen: t, color: s }) => [
755
- L(a.$slots, "menuIcon", W(Y({ isOpen: t, color: s })), void 0, !0)
756
- ]),
757
- key: "0"
758
- } : void 0,
759
- a.$slots.optionTooltip ? {
760
- name: "optionTooltip",
761
- fn: C(() => [
762
- L(a.$slots, "optionTooltip", {}, void 0, !0)
763
- ]),
764
- key: "1"
765
- } : void 0,
766
- a.$slots.optionPdf ? {
767
- name: "optionPdf",
768
- fn: C(() => [
769
- L(a.$slots, "optionPdf", {}, void 0, !0)
770
- ]),
771
- key: "2"
772
- } : void 0,
773
- a.$slots.optionCsv ? {
774
- name: "optionCsv",
775
- fn: C(() => [
776
- L(a.$slots, "optionCsv", {}, void 0, !0)
777
- ]),
778
- key: "3"
779
- } : void 0,
780
- a.$slots.optionImg ? {
781
- name: "optionImg",
782
- fn: C(() => [
783
- L(a.$slots, "optionImg", {}, void 0, !0)
784
- ]),
785
- key: "4"
786
- } : void 0,
787
- a.$slots.optionTable ? {
788
- name: "optionTable",
789
- fn: C(() => [
790
- L(a.$slots, "optionTable", {}, void 0, !0)
791
- ]),
792
- key: "5"
793
- } : void 0,
794
- a.$slots.optionLabels ? {
795
- name: "optionLabels",
796
- fn: C(() => [
797
- L(a.$slots, "optionLabels", {}, void 0, !0)
798
- ]),
799
- key: "6"
800
- } : void 0,
801
- a.$slots.optionFullscreen ? {
802
- name: "optionFullscreen",
803
- fn: C(({ toggleFullscreen: t, isFullscreen: s }) => [
804
- L(a.$slots, "optionFullscreen", W(Y({ toggleFullscreen: t, isFullscreen: s })), void 0, !0)
805
- ]),
806
- key: "7"
807
- } : void 0,
808
- a.$slots.optionAnnotator ? {
809
- name: "optionAnnotator",
810
- fn: C(({ toggleAnnotator: t, isAnnotator: s }) => [
811
- L(a.$slots, "optionAnnotator", W(Y({ toggleAnnotator: t, isAnnotator: s })), void 0, !0)
812
- ]),
813
- key: "8"
814
- } : void 0
815
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : d("", !0),
816
- (r(), o("svg", {
817
- ref_key: "svgRef",
818
- ref: Ee,
819
- xmlns: v(Ba),
820
- viewBox: `0 0 ${n.value.chartWidth <= 0 ? 10 : n.value.chartWidth} ${n.value.chartHeight <= 0 ? 10 : n.value.chartHeight}`,
821
- class: le({ "vue-data-ui-loading": v(ne) }),
822
- style: j(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
823
- }, [
824
- he(v(ea)),
825
- a.$slots["chart-background"] ? (r(), o("foreignObject", {
826
- key: 0,
827
- x: n.value.left,
828
- y: n.value.top,
829
- width: n.value.width <= 0 ? 10 : n.value.width,
830
- height: n.value.height <= 0 ? 10 : n.value.height,
831
- style: {
832
- pointerEvents: "none"
833
- }
834
- }, [
835
- L(a.$slots, "chart-background", {}, void 0, !0)
836
- ], 8, yl)) : d("", !0),
837
- e.value.style.chart.bars.gradient.show ? (r(), o("defs", bl, [
838
- (r(!0), o(b, null, p(w.value, (t, s) => (r(), o("linearGradient", {
839
- id: `gradient_${t.id}`,
840
- x1: "0%",
841
- y1: "0%",
842
- x2: "0%",
843
- y2: "100%"
844
- }, [
845
- D("stop", {
846
- offset: "0%",
847
- "stop-color": t.color
848
- }, null, 8, ml),
849
- D("stop", {
850
- offset: "61.8%",
851
- "stop-color": v(Wa)(t.color, e.value.style.chart.bars.gradient.intensity / 100)
852
- }, null, 8, pl),
853
- D("stop", {
854
- offset: "100%",
855
- "stop-color": t.color
856
- }, null, 8, xl)
857
- ], 8, fl))), 256))
858
- ])) : d("", !0),
859
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "vertical" ? (r(!0), o(b, { key: 2 }, p(N.value, (t, s) => (r(), o("line", {
860
- x1: n.value.left,
861
- x2: n.value.right,
862
- y1: t.y,
863
- y2: t.y,
864
- stroke: e.value.style.chart.grid.x.linesColor,
865
- "stroke-width": e.value.style.chart.grid.x.linesThickness,
866
- "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
867
- "stroke-linecap": "round"
868
- }, null, 8, kl))), 256)) : d("", !0),
869
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (r(!0), o(b, { key: 3 }, p(h.value.end - h.value.start + 1, (t, s) => (r(), o("line", {
870
- x1: n.value.left,
871
- x2: n.value.right,
872
- y1: n.value.top + g.value * s,
873
- y2: n.value.top + g.value * s,
874
- stroke: e.value.style.chart.grid.x.linesColor,
875
- "stroke-width": e.value.style.chart.grid.x.linesThickness,
876
- "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
877
- "stroke-linecap": "round"
878
- }, null, 8, wl))), 256)) : d("", !0),
879
- e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "vertical" ? (r(!0), o(b, { key: 4 }, p(h.value.end - h.value.start + 1, (t, s) => (r(), o("line", {
880
- x1: n.value.left + g.value * s,
881
- x2: n.value.left + g.value * s,
882
- y1: n.value.top,
883
- y2: n.value.bottom,
884
- stroke: e.value.style.chart.grid.y.linesColor,
885
- "stroke-width": e.value.style.chart.grid.y.linesThickness,
886
- "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
887
- "stroke-linecap": "round"
888
- }, null, 8, Ll))), 256)) : d("", !0),
889
- e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "horizontal" ? (r(!0), o(b, { key: 5 }, p(N.value, (t, s) => (r(), o("line", {
890
- x1: t.horizontal_x,
891
- x2: t.horizontal_x,
892
- y1: n.value.top,
893
- y2: n.value.bottom,
894
- stroke: e.value.style.chart.grid.y.linesColor,
895
- "stroke-width": e.value.style.chart.grid.y.linesThickness,
896
- "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
897
- "stroke-linecap": "round"
898
- }, null, 8, zl))), 256)) : d("", !0),
899
- (r(!0), o(b, null, p(w.value, (t, s) => (r(), o("g", null, [
900
- a.$slots.pattern ? (r(), o("defs", Cl, [
901
- L(a.$slots, "pattern", Ce({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${M.value}_${t.absoluteIndex}` }), void 0, !0)
902
- ])) : d("", !0),
903
- e.value.orientation === "vertical" ? (r(), o(b, { key: 1 }, [
904
- (r(!0), o(b, null, p(t.x, (c, u) => (r(), o("rect", {
905
- x: c,
906
- y: t.y[u] < 0 ? 0 : t.y[u],
907
- height: t.height[u] < 0 ? 1e-4 : t.height[u] || 0,
908
- rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
909
- width: g.value * (1 - e.value.style.chart.bars.gapRatio / 2),
910
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
911
- stroke: e.value.style.chart.backgroundColor,
912
- "stroke-width": e.value.style.chart.bars.strokeWidth,
913
- "stroke-linecap": "round",
914
- "stroke-linejoin": "round",
915
- class: le({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": X.value })
916
- }, null, 10, Sl))), 256)),
917
- a.$slots.pattern ? (r(), o("g", _l, [
918
- (r(!0), o(b, null, p(t.x, (c, u) => (r(), o("rect", {
919
- x: c,
920
- y: t.y[u] < 0 ? 0 : t.y[u],
921
- height: t.height[u] < 0 ? 1e-4 : t.height[u] || 0,
922
- rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
923
- width: g.value * (1 - e.value.style.chart.bars.gapRatio / 2),
924
- fill: `url(#pattern_${M.value}_${t.absoluteIndex})`,
925
- stroke: e.value.style.chart.backgroundColor,
926
- "stroke-width": e.value.style.chart.bars.strokeWidth,
927
- "stroke-linecap": "round",
928
- "stroke-linejoin": "round",
929
- class: le({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": X.value })
930
- }, null, 10, $l))), 256))
931
- ])) : d("", !0)
932
- ], 64)) : (r(), o(b, { key: 2 }, [
933
- (r(!0), o(b, null, p(t.horizontal_x, (c, u) => (r(), o("rect", {
934
- x: v($e)(c, n.value.left),
935
- y: t.horizontal_y[u] < 0 ? 0 : t.horizontal_y[u],
936
- width: v($e)(t.horizontal_width[u] < 0 ? 1e-4 : t.horizontal_width[u]),
937
- rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
938
- height: g.value * (1 - e.value.style.chart.bars.gapRatio / 2),
939
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
940
- stroke: e.value.style.chart.backgroundColor,
941
- "stroke-width": e.value.style.chart.bars.strokeWidth,
942
- "stroke-linecap": "round",
943
- "stroke-linejoin": "round",
944
- class: le({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": X.value })
945
- }, null, 10, Tl))), 256)),
946
- a.$slots.pattern ? (r(), o("g", Ml, [
947
- (r(!0), o(b, null, p(t.horizontal_x, (c, u) => (r(), o("rect", {
948
- x: v($e)(c, n.value.left),
949
- y: t.horizontal_y[u] < 0 ? 0 : t.horizontal_y[u],
950
- width: v($e)(t.horizontal_width[u] < 0 ? 1e-4 : t.horizontal_width[u]),
951
- rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
952
- height: g.value * (1 - e.value.style.chart.bars.gapRatio / 2),
953
- fill: `url(#pattern_${M.value}_${t.absoluteIndex})`,
954
- stroke: e.value.style.chart.backgroundColor,
955
- "stroke-width": e.value.style.chart.bars.strokeWidth,
956
- "stroke-linecap": "round",
957
- "stroke-linejoin": "round",
958
- class: le({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": X.value })
959
- }, null, 10, Al))), 256))
960
- ])) : d("", !0)
961
- ], 64))
962
- ]))), 256)),
963
- e.value.style.chart.grid.x.showAxis ? (r(), o("line", {
964
- key: 6,
965
- x1: n.value.left,
966
- x2: n.value.right,
967
- y1: n.value.bottom,
968
- y2: n.value.bottom,
969
- stroke: e.value.style.chart.grid.x.axisColor,
970
- "stroke-width": e.value.style.chart.grid.x.axisThickness,
971
- "stroke-linecap": "round",
972
- "stroke-linejoin": "round"
973
- }, null, 8, Rl)) : d("", !0),
974
- e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (r(), o("line", {
975
- key: 7,
976
- x1: n.value.left,
977
- x2: n.value.left,
978
- y1: n.value.top,
979
- y2: n.value.bottom,
980
- stroke: e.value.style.chart.grid.y.axisColor,
981
- "stroke-width": e.value.style.chart.grid.y.axisThickness,
982
- "stroke-linecap": "round",
983
- "stroke-linejoin": "round"
984
- }, null, 8, Il)) : d("", !0),
985
- e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (r(), o("text", {
986
- key: 8,
987
- ref_key: "xAxisLabel",
988
- ref: Pe,
989
- x: n.value.left + n.value.width / 2,
990
- y: n.value.chartHeight - 3,
991
- "font-size": e.value.style.chart.grid.x.axisName.fontSize,
992
- fill: e.value.style.chart.grid.x.axisName.color,
993
- "font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
994
- "text-anchor": "middle"
995
- }, T(e.value.style.chart.grid.x.axisName.text), 9, Nl)) : d("", !0),
996
- e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (r(), o("text", {
997
- key: 9,
998
- ref_key: "yAxisLabel",
999
- ref: Ve,
1000
- transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize}, ${n.value.top + n.value.height / 2}) rotate(-90)`,
1001
- "font-size": e.value.style.chart.grid.y.axisName.fontSize,
1002
- fill: e.value.style.chart.grid.y.axisName.color,
1003
- "font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
1004
- "text-anchor": "middle"
1005
- }, T(e.value.style.chart.grid.y.axisName.text), 9, Ol)) : d("", !0),
1006
- z.value.dataLabels.show && e.value.orientation === "vertical" ? (r(), o(b, { key: 10 }, [
1007
- (r(!0), o(b, null, p(w.value, (t, s) => (r(), o("g", null, [
1008
- (r(!0), o(b, null, p(t.x, (c, u) => (r(), o(b, null, [
1009
- _t(t.series[u], t.proportions[u]) ? (r(), o("text", {
1010
- key: 0,
1011
- x: c + g.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
1012
- y: t.y[u] + t.height[u] / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
1013
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
1014
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? v(Wt)(t.color) : e.value.style.chart.bars.dataLabels.color,
1015
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1016
- "text-anchor": "middle"
1017
- }, T(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? ft(t.proportions[u] * 100, t, s, u) : pe(t.series[u], t, s, u, t.signedSeries[u])), 9, Pl)) : d("", !0)
1018
- ], 64))), 256))
1019
- ]))), 256)),
1020
- e.value.style.chart.bars.totalValues.show && w.value.length > 1 ? (r(), o("g", {
1021
- key: 0,
1022
- ref_key: "sumTop",
1023
- ref: oa
1024
- }, [
1025
- (r(!0), o(b, null, p(bt.value, (t, s) => (r(), o(b, null, [
1026
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (r(), o("text", {
1027
- key: 0,
1028
- x: n.value.left + g.value * s + g.value / 2,
1029
- y: e.value.style.chart.bars.totalValues.fontSize,
1030
- "text-anchor": "middle",
1031
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
1032
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1033
- fill: e.value.style.chart.bars.totalValues.color
1034
- }, T(pe(t.value, t, s, t.sign)), 9, Vl)) : d("", !0)
1035
- ], 64))), 256))
1036
- ], 512)) : d("", !0)
1037
- ], 64)) : d("", !0),
1038
- z.value.dataLabels.show && e.value.orientation === "horizontal" ? (r(), o(b, { key: 11 }, [
1039
- (r(!0), o(b, null, p(w.value, (t, s) => (r(), o("g", null, [
1040
- (r(!0), o(b, null, p(t.horizontal_x, (c, u) => (r(), o(b, null, [
1041
- _t(t.series[u], t.proportions[u]) ? (r(), o("text", {
1042
- key: 0,
1043
- x: c + (t.horizontal_width[u] < 0 ? 1e-4 : t.horizontal_width[u]) / 2,
1044
- y: t.horizontal_y[u] + g.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
1045
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
1046
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? v(Wt)(t.color) : e.value.style.chart.bars.dataLabels.color,
1047
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1048
- "text-anchor": "middle"
1049
- }, T(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? ft(t.proportions[u] * 100, t, s, u) : pe(t.series[u], t, s, u, t.signedSeries[u])), 9, Dl)) : d("", !0)
1050
- ], 64))), 256))
1051
- ]))), 256)),
1052
- e.value.style.chart.bars.totalValues.show && w.value.length > 1 ? (r(), o("g", {
1053
- key: 0,
1054
- ref_key: "sumRight",
1055
- ref: st
1056
- }, [
1057
- (r(!0), o(b, null, p(bt.value, (t, s) => (r(), o(b, null, [
1058
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (r(), o("text", {
1059
- key: 0,
1060
- x: n.value.right + e.value.style.chart.bars.totalValues.fontSize / 3,
1061
- y: n.value.top + g.value * s + g.value / 2,
1062
- "text-anchor": "start",
1063
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
1064
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1065
- fill: e.value.style.chart.bars.totalValues.color
1066
- }, T(pe(t.value, t, s, t.sign)), 9, El)) : d("", !0)
1067
- ], 64))), 256))
1068
- ], 512)) : d("", !0)
1069
- ], 64)) : d("", !0),
1070
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "vertical" ? (r(), o("g", {
1071
- key: 12,
1072
- ref_key: "scaleLabels",
1073
- ref: G
1074
- }, [
1075
- (r(!0), o(b, null, p(N.value, (t, s) => (r(), o("line", {
1076
- x1: n.value.left,
1077
- x2: n.value.left - 6,
1078
- y1: t.y,
1079
- y2: t.y,
1080
- stroke: e.value.style.chart.grid.x.axisColor,
1081
- "stroke-width": 1
1082
- }, null, 8, Fl))), 256)),
1083
- (r(!0), o(b, null, p(N.value, (t, s) => (r(), o("text", {
1084
- x: t.x,
1085
- y: t.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1086
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1087
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1088
- fill: e.value.style.chart.grid.y.axisLabels.color,
1089
- "text-anchor": "end"
1090
- }, T(v(Te)(
1091
- e.value.style.chart.grid.y.axisLabels.formatter,
1092
- t.value,
1093
- v(ee)({
1094
- p: e.value.style.chart.bars.dataLabels.prefix,
1095
- v: t.value,
1096
- s: e.value.style.chart.bars.dataLabels.suffix,
1097
- r: e.value.style.chart.grid.y.axisLabels.rounding
1098
- }),
1099
- { datapoint: t }
1100
- )), 9, Ul))), 256))
1101
- ], 512)) : d("", !0),
1102
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "horizontal" ? (r(), o("g", {
1103
- key: 13,
1104
- ref_key: "scaleLabels",
1105
- ref: G
1106
- }, [
1107
- (r(!0), o(b, null, p(N.value, (t, s) => (r(), o("line", {
1108
- x1: t.horizontal_x,
1109
- x2: t.horizontal_x,
1110
- y1: n.value.bottom,
1111
- y2: n.value.bottom + 6,
1112
- stroke: e.value.style.chart.grid.x.axisColor,
1113
- "stroke-width": 1,
1114
- "stroke-linecap": "round"
1115
- }, null, 8, Hl))), 256)),
1116
- (r(!0), o(b, null, p(N.value, (t, s) => (r(), o("text", {
1117
- class: "vue-data-ui-time-label",
1118
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1119
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1120
- fill: e.value.style.chart.grid.y.axisLabels.color,
1121
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1122
- transform: `translate(${t.horizontal_x}, ${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`
1123
- }, T(v(Te)(
1124
- e.value.style.chart.grid.y.axisLabels.formatter,
1125
- t.value,
1126
- v(ee)({
1127
- p: e.value.style.chart.bars.dataLabels.prefix,
1128
- v: t.value,
1129
- s: e.value.style.chart.bars.dataLabels.suffix,
1130
- r: e.value.style.chart.grid.y.axisLabels.rounding
1131
- }),
1132
- { datapoint: t }
1133
- )), 9, Bl))), 256))
1134
- ], 512)) : d("", !0),
1135
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "vertical" ? (r(), o("g", {
1136
- key: 14,
1137
- ref_key: "timeLabelsEls",
1138
- ref: J
1139
- }, [
1140
- a.$slots["time-label"] ? (r(), o("g", Wl, [
1141
- (r(!0), o(b, null, p($.value, (t, s) => (r(), o("g", null, [
1142
- L(a.$slots, "time-label", Ce({ ref_for: !0 }, {
1143
- x: n.value.left + g.value * s + g.value / 2,
1144
- y: n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
1145
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1146
- fill: e.value.style.chart.grid.x.timeLabels.color,
1147
- transform: `translate(${n.value.left + g.value * s + g.value / 2}, ${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
1148
- absoluteIndex: t.absoluteIndex,
1149
- content: t.text,
1150
- textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1151
- show: !0
1152
- }), void 0, !0)
1153
- ]))), 256))
1154
- ])) : (r(), o("g", Yl, [
1155
- (r(!0), o(b, null, p($.value, (t, s) => (r(), o("g", null, [
1156
- String(t.text).includes(`
1157
- `) ? (r(), o("text", {
1158
- key: s + "-multi",
1159
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1160
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1161
- fill: e.value.style.chart.grid.x.timeLabels.color,
1162
- transform: `
1163
- translate(
1164
- ${n.value.left + g.value * s + g.value / 2},
1165
- ${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}
1166
- ),
1167
- rotate(${e.value.style.chart.grid.x.timeLabels.rotation})
1168
- `,
1169
- style: { cursor: "pointer" },
1170
- innerHTML: v(Ya)({
1171
- content: String(t.text),
1172
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1173
- fill: e.value.style.chart.grid.x.timeLabels.color,
1174
- x: 0,
1175
- y: 0
1176
- }),
1177
- onClick: () => we(t, s)
1178
- }, null, 8, Gl)) : (r(), o("text", {
1179
- class: "vue-data-ui-time-label",
1180
- key: s,
1181
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1182
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1183
- "font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
1184
- fill: e.value.style.chart.grid.x.timeLabels.color,
1185
- transform: `translate(${n.value.left + g.value * s + g.value / 2}, ${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
1186
- style: { cursor: "pointer" },
1187
- onClick: () => we(t, s)
1188
- }, T(t.text), 9, Xl))
1189
- ]))), 256))
1190
- ]))
1191
- ], 512)) : d("", !0),
1192
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "horizontal" ? (r(), o("g", {
1193
- key: 15,
1194
- ref_key: "timeLabelsEls",
1195
- ref: J
1196
- }, [
1197
- a.$slots["time-label"] ? (r(), o("g", Jl, [
1198
- (r(!0), o(b, null, p($.value, (t, s) => (r(), o("g", null, [
1199
- L(a.$slots, "time-label", Ce({ ref_for: !0 }, {
1200
- x: n.value.left - 8,
1201
- y: n.value.top + g.value * s + g.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1202
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1203
- fill: e.value.style.chart.grid.x.timeLabels.color,
1204
- transform: null,
1205
- absoluteIndex: t.absoluteIndex,
1206
- content: t.text,
1207
- textAnchor: "end",
1208
- show: !0
1209
- }), void 0, !0)
1210
- ]))), 256))
1211
- ])) : (r(), o("g", ql, [
1212
- (r(!0), o(b, null, p($.value, (t, s) => (r(), o("g", null, [
1213
- String(t.text).includes(`
1214
- `) ? (r(), o("text", {
1215
- key: 1,
1216
- "text-anchor": "end",
1217
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1218
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1219
- fill: e.value.style.chart.grid.y.axisLabels.color,
1220
- x: n.value.left - 8,
1221
- y: n.value.top + g.value * s + g.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1222
- style: { cursor: "pointer" },
1223
- onClick: () => we(t, s),
1224
- innerHTML: v(Xa)({
1225
- content: String(t.text),
1226
- fontSize: e.value.style.chart.grid.y.axisLabels.fontSize,
1227
- fill: e.value.style.chart.grid.y.axisLabels.color,
1228
- x: n.value.left - 8,
1229
- y: 0
1230
- })
1231
- }, null, 8, Kl)) : (r(), o("text", {
1232
- key: 0,
1233
- "text-anchor": "end",
1234
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1235
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1236
- fill: e.value.style.chart.grid.y.axisLabels.color,
1237
- x: n.value.left - 8,
1238
- y: n.value.top + g.value * s + g.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1239
- style: {
1240
- cursor: "pointer"
1241
- },
1242
- onClick: () => we(t, s)
1243
- }, T(t.text), 9, Zl))
1244
- ]))), 256))
1245
- ]))
1246
- ], 512)) : d("", !0),
1247
- z.value.showTooltip && e.value.orientation === "vertical" ? (r(!0), o(b, { key: 16 }, p(h.value.end - h.value.start, (t, s) => (r(), o("rect", {
1248
- x: n.value.left + s * g.value,
1249
- y: n.value.top,
1250
- width: g.value,
1251
- height: n.value.height < 0 ? 0 : n.value.height,
1252
- onClick: () => mt(s),
1253
- onMouseenter: () => kt(s),
1254
- onMouseleave: () => xt(s),
1255
- fill: s === de.value ? e.value.style.chart.highlighter.color : "transparent",
1256
- style: j({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1257
- }, null, 44, Ql))), 256)) : d("", !0),
1258
- z.value.showTooltip && e.value.orientation === "horizontal" ? (r(!0), o(b, { key: 17 }, p(h.value.end - h.value.start, (t, s) => (r(), o("rect", {
1259
- x: n.value.left,
1260
- y: n.value.top + s * g.value,
1261
- width: n.value.width < 0 ? 0 : n.value.width,
1262
- height: g.value,
1263
- onClick: () => mt(s),
1264
- onMouseenter: () => kt(s),
1265
- onMouseleave: () => xt(s),
1266
- fill: s === de.value ? e.value.style.chart.highlighter.color : "transparent",
1267
- style: j({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1268
- }, null, 44, jl))), 256)) : d("", !0),
1269
- L(a.$slots, "svg", W(Y({ ...n.value })), void 0, !0)
1270
- ], 14, gl)),
1271
- a.$slots.watermark ? (r(), o("div", es, [
1272
- L(a.$slots, "watermark", W(Y({ isPrinting: v(ut) || v(ct) })), void 0, !0)
1273
- ])) : d("", !0),
1274
- D("div", {
1275
- ref_key: "chartSlicer",
1276
- ref: Qe,
1277
- style: j(`width:100%;background:${e.value.style.chart.backgroundColor}`),
1278
- "data-dom-to-png-ignore": ""
1279
- }, [
1280
- e.value.style.chart.zoom.show && U.value > 1 ? (r(), B(cl, {
1281
- ref_key: "slicerComponent",
1282
- ref: at,
1283
- key: `slicer_${et.value}`,
1284
- background: e.value.style.chart.zoom.color,
1285
- borderColor: e.value.style.chart.backgroundColor,
1286
- fontSize: e.value.style.chart.zoom.fontSize,
1287
- useResetSlot: e.value.style.chart.zoom.useResetSlot,
1288
- labelLeft: e.value.style.chart.grid.x.timeLabels.values[h.value.start] ? $.value[0].text : "",
1289
- labelRight: e.value.style.chart.grid.x.timeLabels.values[h.value.end - 1] ? $.value.at(-1).text : "",
1290
- textColor: e.value.style.chart.color,
1291
- inputColor: e.value.style.chart.zoom.color,
1292
- selectColor: e.value.style.chart.zoom.highlightColor,
1293
- max: Math.max(...Me.dataset.map((t) => t.series.length)),
1294
- min: 0,
1295
- valueStart: h.value.start,
1296
- valueEnd: h.value.end,
1297
- start: h.value.start,
1298
- "onUpdate:start": l[0] || (l[0] = (t) => h.value.start = t),
1299
- end: h.value.end,
1300
- "onUpdate:end": l[1] || (l[1] = (t) => h.value.end = t),
1301
- refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
1302
- refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(...Me.dataset.map((t) => t.series.length)),
1303
- enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
1304
- enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
1305
- focusOnDrag: e.value.style.chart.zoom.focusOnDrag,
1306
- focusRangeRatio: e.value.style.chart.zoom.focusRangeRatio,
1307
- onReset: yt
1308
- }, {
1309
- "reset-action": C(({ reset: t }) => [
1310
- L(a.$slots, "reset-action", W(Y({ reset: t })), void 0, !0)
1311
- ]),
1312
- _: 3
1313
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag", "focusOnDrag", "focusRangeRatio"])) : d("", !0)
1314
- ], 4),
1315
- he(v(Jt), {
1316
- show: z.value.showTooltip && Re.value,
1317
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1318
- color: e.value.style.chart.tooltip.color,
1319
- fontSize: e.value.style.chart.tooltip.fontSize,
1320
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1321
- borderColor: e.value.style.chart.tooltip.borderColor,
1322
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1323
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1324
- position: e.value.style.chart.tooltip.position,
1325
- offsetY: e.value.style.chart.tooltip.offsetY,
1326
- parent: O.value,
1327
- content: Ne.value,
1328
- isFullscreen: re.value,
1329
- isCustom: v(Yt)(e.value.style.chart.tooltip.customFormat),
1330
- smooth: e.value.style.chart.tooltip.smooth,
1331
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1332
- smoothForce: e.value.style.chart.tooltip.smoothForce,
1333
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
1334
- }, {
1335
- "tooltip-before": C(() => [
1336
- L(a.$slots, "tooltip-before", W(Y({ ...Ie.value })), void 0, !0)
1337
- ]),
1338
- "tooltip-after": C(() => [
1339
- L(a.$slots, "tooltip-after", W(Y({ ...Ie.value })), void 0, !0)
1340
- ]),
1341
- _: 3
1342
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1343
- D("div", {
1344
- id: `legend-bottom-${M.value}`
1345
- }, null, 8, ts),
1346
- lt.value ? (r(), B(Oa, {
1347
- key: 4,
1348
- to: e.value.style.chart.legend.position === "top" ? `#legend-top-${M.value}` : `#legend-bottom-${M.value}`
1349
- }, [
1350
- D("div", {
1351
- ref_key: "chartLegend",
1352
- ref: Ke
1353
- }, [
1354
- e.value.style.chart.legend.show ? (r(), B(ul, {
1355
- key: 0,
1356
- legendSet: Ye.value,
1357
- config: fa.value,
1358
- onClickMarker: l[2] || (l[2] = ({ legend: t }) => t.segregate())
1359
- }, Ge({
1360
- item: C(({ legend: t }) => [
1361
- v(ne) ? d("", !0) : (r(), o("div", {
1362
- key: 0,
1363
- onClick: (s) => t.segregate(),
1364
- style: j(`opacity:${_.value.includes(t.id) ? 0.5 : 1}`)
1365
- }, T(t.name), 13, as))
1366
- ]),
1367
- _: 2
1368
- }, [
1369
- a.$slots.pattern ? {
1370
- name: "legend-pattern",
1371
- fn: C(({ legend: t, index: s }) => [
1372
- he(nl, {
1373
- shape: t.shape,
1374
- radius: 30,
1375
- stroke: "none",
1376
- plot: { x: 30, y: 30 },
1377
- fill: `url(#pattern_${M.value}_${s})`
1378
- }, null, 8, ["shape", "fill"])
1379
- ]),
1380
- key: "0"
1381
- } : void 0
1382
- ]), 1032, ["legendSet", "config"])) : L(a.$slots, "legend", {
1383
- key: 1,
1384
- legend: Ye.value
1385
- }, void 0, !0)
1386
- ], 512)
1387
- ], 8, ["to"])) : d("", !0),
1388
- a.$slots.source ? (r(), o("div", {
1389
- key: 5,
1390
- ref_key: "source",
1391
- ref: je,
1392
- dir: "auto"
1393
- }, [
1394
- L(a.$slots, "source", {}, void 0, !0)
1395
- ], 512)) : d("", !0),
1396
- ve.value && e.value.userOptions.buttons.table ? (r(), B(Pa(ue.value.component), Ce({ key: 6 }, ue.value.props, {
1397
- ref_key: "tableUnit",
1398
- ref: oe,
1399
- onClose: $t
1400
- }), Ge({
1401
- content: C(() => [
1402
- he(v(Kt), {
1403
- colNames: xe.value.colNames,
1404
- head: xe.value.head,
1405
- body: xe.value.body,
1406
- config: xe.value.config,
1407
- title: e.value.table.useDialog ? "" : ue.value.title,
1408
- withCloseButton: !e.value.table.useDialog,
1409
- onClose: $t
1410
- }, {
1411
- th: C(({ th: t }) => [
1412
- D("div", { innerHTML: t }, null, 8, ls)
1413
- ]),
1414
- td: C(({ td: t }) => [
1415
- Vt(T(isNaN(Number(t)) ? t : v(ee)({
1416
- p: e.value.style.chart.bars.dataLabels.prefix,
1417
- v: t,
1418
- s: e.value.style.chart.bars.dataLabels.suffix,
1419
- r: e.value.table.td.roundingValue
1420
- })), 1)
1421
- ]),
1422
- _: 1
1423
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"])
1424
- ]),
1425
- _: 2
1426
- }, [
1427
- e.value.table.useDialog ? {
1428
- name: "title",
1429
- fn: C(() => [
1430
- Vt(T(ue.value.title), 1)
1431
- ]),
1432
- key: "0"
1433
- } : void 0,
1434
- e.value.table.useDialog ? {
1435
- name: "actions",
1436
- fn: C(() => [
1437
- D("button", {
1438
- tabindex: "0",
1439
- class: "vue-ui-user-options-button",
1440
- onClick: l[3] || (l[3] = (t) => We(e.value.userOptions.callbacks.csv))
1441
- }, [
1442
- he(v(qt), {
1443
- name: "excel",
1444
- stroke: ue.value.props.color
1445
- }, null, 8, ["stroke"])
1446
- ])
1447
- ]),
1448
- key: "1"
1449
- } : void 0
1450
- ]), 1040)) : d("", !0),
1451
- v(ne) ? (r(), B(ja, { key: 7 })) : d("", !0)
1452
- ], 46, vl));
1453
- }
1454
- }, Ls = /* @__PURE__ */ hl(ss, [["__scopeId", "data-v-7beeea3c"]]);
1455
- export {
1456
- Ls as default
1457
- };