vue-data-ui 3.4.9 → 3.5.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 (151) hide show
  1. package/README.md +114 -37
  2. package/dist/{ColorPicker-J5wOPCeB.js → ColorPicker-ChuwChMo.js} +58 -56
  3. package/dist/{NonSvgPenAndPaper-C7TRn0_3.js → NonSvgPenAndPaper-DVgKKLIf.js} +1 -1
  4. package/dist/{PackageVersion-CTUqGqWV.js → PackageVersion-DQvyATVa.js} +1 -1
  5. package/dist/PenAndPaper-SZQIAgkg.js +388 -0
  6. package/dist/{Title-l36lOBMx.js → Title-isbiM8i8.js} +1 -1
  7. package/dist/components/vue-ui-3d-bar.js +1 -1
  8. package/dist/components/vue-ui-accordion.js +1 -1
  9. package/dist/components/vue-ui-age-pyramid.js +1 -1
  10. package/dist/components/vue-ui-annotator.js +1 -1
  11. package/dist/components/vue-ui-bullet.js +1 -1
  12. package/dist/components/vue-ui-candlestick.js +1 -1
  13. package/dist/components/vue-ui-carousel-table.js +1 -1
  14. package/dist/components/vue-ui-chestnut.js +1 -1
  15. package/dist/components/vue-ui-chord.js +1 -1
  16. package/dist/components/vue-ui-circle-pack.js +1 -1
  17. package/dist/components/vue-ui-cursor.js +1 -1
  18. package/dist/components/vue-ui-dashboard.js +1 -1
  19. package/dist/components/vue-ui-digits.js +1 -1
  20. package/dist/components/vue-ui-donut-evolution.js +1 -1
  21. package/dist/components/vue-ui-donut.js +1 -1
  22. package/dist/components/vue-ui-dumbbell.js +1 -1
  23. package/dist/components/vue-ui-flow.js +1 -1
  24. package/dist/components/vue-ui-funnel.js +1 -1
  25. package/dist/components/vue-ui-galaxy.js +1 -1
  26. package/dist/components/vue-ui-gauge.js +1 -1
  27. package/dist/components/vue-ui-gizmo.js +1 -1
  28. package/dist/components/vue-ui-heatmap.js +1 -1
  29. package/dist/components/vue-ui-history-plot.js +1 -1
  30. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  31. package/dist/components/vue-ui-kpi.js +1 -1
  32. package/dist/components/vue-ui-mini-loader.js +1 -1
  33. package/dist/components/vue-ui-molecule.js +1 -1
  34. package/dist/components/vue-ui-mood-radar.js +1 -1
  35. package/dist/components/vue-ui-nested-donuts.js +1 -1
  36. package/dist/components/vue-ui-onion.js +1 -1
  37. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  38. package/dist/components/vue-ui-quadrant.js +1 -1
  39. package/dist/components/vue-ui-quick-chart.js +1 -1
  40. package/dist/components/vue-ui-radar.js +1 -1
  41. package/dist/components/vue-ui-rating.js +1 -1
  42. package/dist/components/vue-ui-relation-circle.js +1 -1
  43. package/dist/components/vue-ui-ridgeline.js +1 -1
  44. package/dist/components/vue-ui-rings.js +1 -1
  45. package/dist/components/vue-ui-scatter.js +1 -1
  46. package/dist/components/vue-ui-skeleton.js +1 -1
  47. package/dist/components/vue-ui-smiley.js +1 -1
  48. package/dist/components/vue-ui-spark-trend.js +1 -1
  49. package/dist/components/vue-ui-sparkbar.js +1 -1
  50. package/dist/components/vue-ui-sparkgauge.js +1 -1
  51. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  52. package/dist/components/vue-ui-sparkline.js +1 -1
  53. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  54. package/dist/components/vue-ui-stackbar.js +1 -1
  55. package/dist/components/vue-ui-strip-plot.js +1 -1
  56. package/dist/components/vue-ui-table-heatmap.js +1 -1
  57. package/dist/components/vue-ui-table-sparkline.js +1 -1
  58. package/dist/components/vue-ui-table.js +1 -1
  59. package/dist/components/vue-ui-thermometer.js +1 -1
  60. package/dist/components/vue-ui-timer.js +1 -1
  61. package/dist/components/vue-ui-tiremarks.js +1 -1
  62. package/dist/components/vue-ui-treemap.js +1 -1
  63. package/dist/components/vue-ui-vertical-bar.js +1 -1
  64. package/dist/components/vue-ui-waffle.js +1 -1
  65. package/dist/components/vue-ui-wheel.js +1 -1
  66. package/dist/components/vue-ui-word-cloud.js +1 -1
  67. package/dist/components/vue-ui-world.js +1 -1
  68. package/dist/components/vue-ui-xy-canvas.js +1 -1
  69. package/dist/components/vue-ui-xy.js +1 -1
  70. package/dist/style.css +1 -1
  71. package/dist/types/vue-data-ui.d.ts +17 -8
  72. package/dist/{useNestedProp-BjZe1Y85.js → useNestedProp-DjGXw6S9.js} +22 -8
  73. package/dist/{vue-data-ui-DjxWWa78.js → vue-data-ui-B_RxfmEm.js} +113 -107
  74. package/dist/vue-data-ui.js +64 -64
  75. package/dist/{vue-ui-3d-bar-CLE7f9pl.js → vue-ui-3d-bar-CMNYyVa2.js} +454 -434
  76. package/dist/{vue-ui-accordion-CZ0thhxa.js → vue-ui-accordion-CqhVCfc2.js} +1 -1
  77. package/dist/{vue-ui-age-pyramid-D73uIOPm.js → vue-ui-age-pyramid-Vqa9iYXE.js} +180 -160
  78. package/dist/{vue-ui-annotator-BylDgUVb.js → vue-ui-annotator-nNv10fBm.js} +3 -3
  79. package/dist/{vue-ui-bullet-Bybo0xK2.js → vue-ui-bullet-BWEBeYV5.js} +190 -170
  80. package/dist/{vue-ui-candlestick-D_FyMdqH.js → vue-ui-candlestick-BoLzL0g1.js} +201 -181
  81. package/dist/{vue-ui-carousel-table-BvMlNdVo.js → vue-ui-carousel-table-Bi6wvUUU.js} +2 -2
  82. package/dist/{vue-ui-chestnut-DA0g0bDV.js → vue-ui-chestnut-BGz1TLXG.js} +375 -355
  83. package/dist/vue-ui-chord-CebhS7ln.js +1153 -0
  84. package/dist/{vue-ui-circle-pack-BPDm-ro5.js → vue-ui-circle-pack-7PJVyKjp.js} +289 -269
  85. package/dist/{vue-ui-cursor-ik59bfC4.js → vue-ui-cursor-qYLAwvzn.js} +1 -1
  86. package/dist/vue-ui-dashboard-DcmMvhgM.js +432 -0
  87. package/dist/{vue-ui-digits-ByNNcWXi.js → vue-ui-digits-DyE8eU1m.js} +1 -1
  88. package/dist/vue-ui-donut-CxZcJFTo.js +1681 -0
  89. package/dist/{vue-ui-donut-evolution-Ca3Svr0B.js → vue-ui-donut-evolution-BVYL-BUJ.js} +480 -444
  90. package/dist/{vue-ui-dumbbell-CxCE2luV.js → vue-ui-dumbbell-QxZn86A3.js} +210 -190
  91. package/dist/{vue-ui-flow-DEvwXd4W.js → vue-ui-flow-DEI5LRch.js} +339 -319
  92. package/dist/{vue-ui-funnel-Bgcx7xia.js → vue-ui-funnel-B_A5orFg.js} +218 -198
  93. package/dist/{vue-ui-galaxy-BWr1EMob.js → vue-ui-galaxy-CUoDRr-O.js} +313 -277
  94. package/dist/{vue-ui-gauge-DQricvo2.js → vue-ui-gauge-46tSRZN5.js} +311 -291
  95. package/dist/{vue-ui-gizmo-C-fKe3io.js → vue-ui-gizmo-BOgbsXao.js} +2 -2
  96. package/dist/{vue-ui-heatmap-B-o_i7Hu.js → vue-ui-heatmap-DKKjl1A2.js} +303 -283
  97. package/dist/{vue-ui-history-plot-DzQ9DPUJ.js → vue-ui-history-plot-C6p_aThr.js} +478 -442
  98. package/dist/{vue-ui-kpi-BGGff8LM.js → vue-ui-kpi-B1yJ83aF.js} +2 -2
  99. package/dist/{vue-ui-mini-loader-CSF-7TJL.js → vue-ui-mini-loader-BudcNBg-.js} +1 -1
  100. package/dist/{vue-ui-molecule-I2OhrCR2.js → vue-ui-molecule-L90GnHee.js} +156 -136
  101. package/dist/{vue-ui-mood-radar-BAT7kZUy.js → vue-ui-mood-radar-Dhigm5rw.js} +266 -246
  102. package/dist/{vue-ui-nested-donuts-CjhJDAQi.js → vue-ui-nested-donuts-D0MCLs5n.js} +597 -557
  103. package/dist/vue-ui-onion-B7yPJ3gL.js +915 -0
  104. package/dist/vue-ui-parallel-coordinate-plot-DY21ivNe.js +1051 -0
  105. package/dist/{vue-ui-quadrant-DGnasrCR.js → vue-ui-quadrant-b0vMRaq-.js} +532 -495
  106. package/dist/{vue-ui-quick-chart-Cam_sWet.js → vue-ui-quick-chart-VK2EN7sh.js} +288 -268
  107. package/dist/{vue-ui-radar-DNI9WI2R.js → vue-ui-radar-B5Vkoz9M.js} +412 -373
  108. package/dist/{vue-ui-rating-CiMoFM_c.js → vue-ui-rating-BH4DW1ZY.js} +1 -1
  109. package/dist/{vue-ui-relation-circle-Dj1jhcsl.js → vue-ui-relation-circle-XHbE-ZUX.js} +228 -208
  110. package/dist/{vue-ui-ridgeline-adIls6bj.js → vue-ui-ridgeline-CAMNq-p_.js} +517 -481
  111. package/dist/vue-ui-rings-ImGOqm_J.js +855 -0
  112. package/dist/vue-ui-scatter-CterNJYe.js +1590 -0
  113. package/dist/{vue-ui-skeleton-DUdI2uOO.js → vue-ui-skeleton-CykXHWj-.js} +2 -2
  114. package/dist/{vue-ui-smiley-sGFRbn31.js → vue-ui-smiley-DnGm6qrK.js} +1 -1
  115. package/dist/{vue-ui-spark-trend-DxpRfUJz.js → vue-ui-spark-trend-N1AsNQJA.js} +2 -2
  116. package/dist/{vue-ui-sparkbar-B44oER5n.js → vue-ui-sparkbar-Bvsi5DTT.js} +2 -2
  117. package/dist/{vue-ui-sparkgauge-ix12NZ7M.js → vue-ui-sparkgauge-DyJmWCWT.js} +2 -2
  118. package/dist/{vue-ui-sparkhistogram-Cs-QDYBR.js → vue-ui-sparkhistogram-5eKrkmSb.js} +143 -140
  119. package/dist/{vue-ui-sparkline-Cb8ZmyUq.js → vue-ui-sparkline-ChKAzlVq.js} +2 -2
  120. package/dist/vue-ui-sparkstackbar-BXNy6nuw.js +441 -0
  121. package/dist/vue-ui-stackbar-1IwvUYBO.js +1827 -0
  122. package/dist/{vue-ui-strip-plot-BjG-Jxnb.js → vue-ui-strip-plot-B1wGxP8-.js} +245 -225
  123. package/dist/{vue-ui-table-DdBdLrAL.js → vue-ui-table-DSsIrT4L.js} +3 -3
  124. package/dist/{vue-ui-table-heatmap-BqCEBoUf.js → vue-ui-table-heatmap-DXFHy7-E.js} +1 -1
  125. package/dist/{vue-ui-table-sparkline-EpCo2Be5.js → vue-ui-table-sparkline-DpqY_4ay.js} +2 -2
  126. package/dist/vue-ui-thermometer-CMKvSA8p.js +584 -0
  127. package/dist/{vue-ui-timer-Br3wp8hG.js → vue-ui-timer-BpdCY_wg.js} +3 -3
  128. package/dist/vue-ui-tiremarks-CNipzVli.js +450 -0
  129. package/dist/vue-ui-treemap-DPE8SY0_.js +1330 -0
  130. package/dist/{vue-ui-vertical-bar-yfbEfLqy.js → vue-ui-vertical-bar-ZU1GCbX0.js} +484 -448
  131. package/dist/{vue-ui-waffle-m-9sqQik.js → vue-ui-waffle-z7nuSuSV.js} +398 -362
  132. package/dist/vue-ui-wheel-DLRoRjeM.js +663 -0
  133. package/dist/{vue-ui-word-cloud-vNwswYZD.js → vue-ui-word-cloud-D2r5E3pP.js} +248 -228
  134. package/dist/{vue-ui-world-BsCNyZy_.js → vue-ui-world-goXYnTyM.js} +287 -267
  135. package/dist/{vue-ui-xy-CIrw1lWQ.js → vue-ui-xy-NDDbNbds.js} +1263 -1227
  136. package/dist/{vue-ui-xy-canvas-DXnLFwW3.js → vue-ui-xy-canvas-2a6NlQe3.js} +338 -322
  137. package/package.json +4 -4
  138. package/dist/PenAndPaper-DSvu9dwa.js +0 -373
  139. package/dist/vue-ui-chord-CDgzolI-.js +0 -1133
  140. package/dist/vue-ui-dashboard-CeJwbiON.js +0 -412
  141. package/dist/vue-ui-donut-DjQXHBJE.js +0 -1645
  142. package/dist/vue-ui-onion-DTY2p87s.js +0 -873
  143. package/dist/vue-ui-parallel-coordinate-plot-C8aWTcNn.js +0 -1014
  144. package/dist/vue-ui-rings-CnTMFK6R.js +0 -813
  145. package/dist/vue-ui-scatter-fzR2c0St.js +0 -1554
  146. package/dist/vue-ui-sparkstackbar-BiRZ51OU.js +0 -424
  147. package/dist/vue-ui-stackbar-DubS6Pg8.js +0 -1708
  148. package/dist/vue-ui-thermometer-DTnfnf9z.js +0 -564
  149. package/dist/vue-ui-tiremarks-CrC_tlIx.js +0 -430
  150. package/dist/vue-ui-treemap-kyuyi2ES.js +0 -1294
  151. package/dist/vue-ui-wheel-BasM7FWt.js +0 -643
@@ -1,1708 +0,0 @@
1
- import { defineAsyncComponent as J, useSlots as pl, computed as g, ref as d, onMounted as sa, toRefs as xl, watch as we, shallowRef as ra, onBeforeUnmount as ct, watchEffect as oa, nextTick as kl, createElementBlock as n, openBlock as r, normalizeStyle as ae, normalizeClass as ue, createBlock as Z, createCommentVNode as b, renderSlot as C, createElementVNode as Q, createVNode as Le, unref as f, createSlots as vt, withCtx as M, normalizeProps as le, guardReactiveProps as se, Fragment as p, renderList as k, mergeProps as Se, toDisplayString as F, Teleport as wl, resolveDynamicComponent as Ll, createTextVNode as na } from "vue";
2
- import { u as Sl, a as ia } from "./useNestedProp-BjZe1Y85.js";
3
- import { c as ua, t as zl, b as Cl, p as Ee, O as ce, e as _l, o as ca, f as va, g as Ml, h as Tl, aj as ze, n as ha, m as da, v as $l, X as Al, S as Pl, r as Ve, J as ya, a as Ue, d as re, M as Nl, $ as Rl, G as ga, P as Ol, Q as Il, H as Fl } from "./lib-C_mNZmhD.js";
4
- import { t as ht, u as Dl } from "./useResponsive-DfdjqQps.js";
5
- import { u as El } from "./usePrinter-DTzqpYKF.js";
6
- import { u as Vl, B as Ul } from "./BaseScanner-BgWxam9d.js";
7
- import { u as ba, a as Bl, l as Hl } from "./useTimeLabels-BGFjWgrv.js";
8
- import { u as Xl } from "./useSvgExport-DrjCWun4.js";
9
- import { u as Wl } from "./useUserOptionState-BIvW1Kz7.js";
10
- import { u as Yl } from "./useChartAccessibility-9icAAmYg.js";
11
- import { u as Gl } from "./useTimeLabelCollider-CIsgDrl9.js";
12
- import ql from "./img-BecE5qXd.js";
13
- import Jl from "./Title-l36lOBMx.js";
14
- import { _ as Zl } from "./Shape-CNXKB8O0.js";
15
- import { t as Ql } from "./themes-AUNCOb2G.js";
16
- import Kl from "./Legend-G6GMcdAc.js";
17
- import { S as jl } from "./SlicerPreview-ij72TAs6.js";
18
- import { _ as es } from "./_plugin-vue_export-helper-CHgC5LLL.js";
19
- const ts = ["id"], as = ["id"], ls = ["xmlns", "viewBox"], ss = ["x", "y", "width", "height"], rs = { key: 1 }, os = ["id"], ns = ["stop-color"], is = ["stop-color"], us = ["stop-color"], cs = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], vs = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], hs = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ds = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ys = { key: 0 }, gs = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], bs = { key: 0 }, ms = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], fs = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], ps = { key: 0 }, xs = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], ks = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ws = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ls = ["x", "y", "font-size", "fill", "font-weight"], Ss = ["transform", "font-size", "fill", "font-weight"], zs = ["x", "y", "font-size", "fill", "font-weight"], Cs = ["x", "y", "font-size", "font-weight", "fill"], _s = ["x", "y", "font-size", "fill", "font-weight"], Ms = ["x", "y", "font-size", "font-weight", "fill"], Ts = ["x1", "x2", "y1", "y2", "stroke"], $s = ["x", "y", "font-size", "font-weight", "fill"], As = ["x1", "x2", "y1", "y2", "stroke"], Ps = ["font-size", "font-weight", "fill", "text-anchor", "transform"], Ns = { key: 0 }, Rs = { key: 1 }, Os = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], Is = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], Fs = { key: 0 }, Ds = { key: 1 }, Es = ["font-size", "font-weight", "fill", "x", "y", "onClick"], Vs = ["font-size", "font-weight", "fill", "x", "y", "onClick", "innerHTML"], Us = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], Bs = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], Hs = ["data-start", "data-end"], Xs = {
20
- key: 3,
21
- class: "vue-data-ui-watermark"
22
- }, Ws = ["x", "y", "height", "width", "fill", "stroke"], Ys = ["id"], Gs = ["onClick"], qs = ["innerHTML"], Js = {
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
- selectedXIndex: {
38
- type: Number,
39
- default: void 0
40
- }
41
- },
42
- emits: ["selectDatapoint", "selectLegend", "selectTimeLabel", "selectX"],
43
- setup(Be, { expose: ma, emit: fa }) {
44
- const pa = J(() => import("./Tooltip-oWCO1HKy.js")), xa = J(() => import("./BaseIcon-BmMbm4d0.js")), ka = J(() => import("./vue-ui-accordion-CZ0thhxa.js")), wa = J(() => import("./DataTable-BT7VF2ua.js")), La = J(() => import("./PenAndPaper-DSvu9dwa.js")), Sa = J(() => import("./UserOptions-CGnQt6Fd.js")), za = J(() => import("./PackageVersion-CTUqGqWV.js")), Ca = J(() => import("./BaseDraggableDialog-ymf2sfB8.js")), { vue_ui_stackbar: _a } = Sl(), Ma = pl(), x = Be, ve = fa, he = g({
45
- get() {
46
- return !!x.dataset && x.dataset.length;
47
- },
48
- set(a) {
49
- return a;
50
- }
51
- }), X = d(null), D = d(ua()), He = d(!1), Xe = d(null), We = d(""), N = d([]), dt = d(0), yt = d(null), gt = d(null), de = d(null), bt = d(null), ye = d(!1), U = d(null), K = d(!1), mt = d(0), Ta = d(0), $a = d(0), ft = d(!1), ge = d(null), Ye = d(null), Ge = d(null), qe = d(null), j = d(null), ee = d(null), Aa = d(null), pt = d(null), Je = d(null);
52
- sa(() => {
53
- ft.value = !0, tt();
54
- });
55
- const e = d(je()), { loading: be, FINAL_DATASET: Ze, manualLoading: Ce } = Vl({
56
- ...xl(x),
57
- FINAL_CONFIG: e,
58
- prepareConfig: je,
59
- callback: () => {
60
- Promise.resolve().then(async () => {
61
- await Oe();
62
- });
63
- },
64
- skeletonDataset: [
65
- {
66
- name: "",
67
- series: [2, 3, 5, 8, 13, 21],
68
- color: "#BABABA"
69
- },
70
- {
71
- name: "",
72
- series: [1, 2, 3, 5, 8, 13],
73
- color: "#CACACA"
74
- }
75
- ],
76
- skeletonConfig: zl({
77
- defaultConfig: e.value,
78
- userConfig: {
79
- userOptions: { show: !1 },
80
- useCssAnimation: !1,
81
- table: { show: !1 },
82
- tooltip: { show: !1 },
83
- style: {
84
- chart: {
85
- backgroundColor: "#99999930",
86
- bars: {
87
- totalValues: { show: !1 },
88
- dataLabels: { show: !1 }
89
- },
90
- grid: {
91
- scale: {
92
- scaleMin: 0,
93
- scaleMax: 40
94
- },
95
- x: {
96
- axisColor: "#6A6A6A",
97
- linesColor: "#6A6A6A",
98
- axisName: { show: !1 },
99
- timeLabels: { show: !1 }
100
- },
101
- y: {
102
- axisColor: "#6A6A6A",
103
- linesColor: "#6A6A6A",
104
- axisName: { show: !1 },
105
- axisLabels: { show: !1 }
106
- }
107
- },
108
- legend: {
109
- backgroundColor: "transparent"
110
- },
111
- padding: {
112
- left: 24,
113
- right: 24,
114
- bottom: 12
115
- },
116
- zoom: {
117
- show: !1,
118
- startIndex: null,
119
- endIndex: null
120
- }
121
- }
122
- }
123
- }
124
- })
125
- }), { userOptionsVisible: Qe, setUserOptionsVisibility: xt, keepUserOptionState: kt } = Wl({ config: e.value }), { svgRef: Ke } = Yl({ config: e.value.style.chart.title });
126
- function Pa() {
127
- xt(!0);
128
- }
129
- function Na() {
130
- xt(!1), ve("selectX", { seriesIndex: null, datapoint: null }), U.value = null;
131
- }
132
- function je() {
133
- const a = ia({
134
- userConfig: x.config,
135
- defaultConfig: _a
136
- });
137
- let l = {};
138
- return a.theme ? l = {
139
- ...ia({
140
- userConfig: Ql.vue_ui_stackbar[a.theme] || x.config,
141
- defaultConfig: a
142
- }),
143
- customPalette: Cl[a.theme] || Ee
144
- } : l = a, x.config && ce(x.config, "style.chart.grid.scale.scaleMin") ? l.style.chart.grid.scale.scaleMin = x.config.style.chart.grid.scale.scaleMin : l.style.chart.grid.scale.scaleMin = null, x.config && ce(x.config, "style.chart.grid.scale.scaleMax") ? l.style.chart.grid.scale.scaleMax = x.config.style.chart.grid.scale.scaleMax : l.style.chart.grid.scale.scaleMax = null, x.config && ce(x.config, "style.chart.zoom.startIndex") ? l.style.chart.zoom.startIndex = x.config.style.chart.zoom.startIndex : l.style.chart.zoom.startIndex = null, x.config && ce(x.config, "style.chart.zoom.endIndex") ? l.style.chart.zoom.endIndex = x.config.style.chart.zoom.endIndex : l.style.chart.zoom.endIndex = null, x.config && ce(x.config, "style.chart.bars.dataLabels.hideUnderValue") ? l.style.chart.bars.dataLabels.hideUnderValue = x.config.style.chart.bars.dataLabels.hideUnderValue : l.style.chart.bars.dataLabels.hideUnderValue = null, x.config && ce(x.config, "style.chart.bars.dataLabels.hideUnderPercentage") ? l.style.chart.bars.dataLabels.hideUnderPercentage = x.config.style.chart.bars.dataLabels.hideUnderPercentage : l.style.chart.bars.dataLabels.hideUnderPercentage = null, l;
145
- }
146
- const wt = g(() => e.value.style.chart.bars.dataLabels.hideUnderValue !== null), Lt = g(() => e.value.style.chart.bars.dataLabels.hideUnderPercentage !== null);
147
- we(() => x.config, (a) => {
148
- be.value || (e.value = je()), Qe.value = !e.value.userOptions.showOnChartHover, tt(), mt.value += 1, Ta.value += 1, $a.value += 1, T.value.dataLabels.show = e.value.style.chart.bars.dataLabels.show, T.value.showTable = e.value.table.show, T.value.showTooltip = e.value.style.chart.tooltip.show, Te();
149
- }, { deep: !0 }), we(() => x.dataset, (a) => {
150
- Array.isArray(a) && a.length > 0 && (Ce.value = !1), Pt();
151
- }, { deep: !0 });
152
- const T = d({
153
- dataLabels: {
154
- show: e.value.style.chart.bars.dataLabels.show
155
- },
156
- showTable: e.value.table.show,
157
- showTooltip: e.value.style.chart.tooltip.show
158
- });
159
- we(e, () => {
160
- T.value = {
161
- dataLabels: {
162
- show: e.value.style.chart.bars.dataLabels.show
163
- },
164
- showTable: e.value.table.show,
165
- showTooltip: e.value.style.chart.tooltip.show
166
- };
167
- }, { immediate: !0 });
168
- const { isPrinting: St, isImaging: zt, generatePdf: Ct, generateImage: _t } = El({
169
- elementId: `stackbar_${D.value}`,
170
- fileName: e.value.style.chart.title.text || "vue-ui-stackbar",
171
- options: e.value.userOptions.print
172
- }), oe = d({
173
- width: e.value.style.chart.width,
174
- height: e.value.style.chart.height,
175
- paddingRatio: {
176
- top: e.value.style.chart.padding.top / e.value.style.chart.height,
177
- right: e.value.style.chart.padding.right / e.value.style.chart.width,
178
- bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
179
- left: e.value.style.chart.padding.left / e.value.style.chart.width
180
- }
181
- }), Ra = g(() => _l(e.value.customPalette)), G = ra(null), ne = ra(null), Mt = d(null);
182
- sa(() => {
183
- tt();
184
- });
185
- const et = g(() => !!e.value.debug);
186
- function tt() {
187
- if (ca(x.dataset) ? (va({
188
- componentName: "VueUiStackbar",
189
- type: "dataset",
190
- debug: et.value
191
- }), Ce.value = !0) : x.dataset.forEach((a, l) => {
192
- Ml({
193
- datasetObject: a,
194
- requiredAttributes: ["name", "series"]
195
- }).forEach((t) => {
196
- he.value = !1, va({
197
- componentName: "VueUiStackbar",
198
- type: "datasetSerieAttribute",
199
- property: t,
200
- index: l,
201
- debug: et.value
202
- }), Ce.value = !0;
203
- });
204
- }), ca(x.dataset) || (Ce.value = e.value.loading), setTimeout(() => {
205
- K.value = !0;
206
- }, 10), e.value.responsive) {
207
- const a = ht(() => {
208
- K.value = !1;
209
- const { width: l, height: t } = Dl({
210
- chart: X.value,
211
- title: e.value.style.chart.title.text ? yt.value : null,
212
- legend: e.value.style.chart.legend.show ? gt.value : null,
213
- slicer: e.value.style.chart.zoom.show && A.value > 6 ? de.value.$el : null,
214
- source: bt.value
215
- });
216
- requestAnimationFrame(() => {
217
- oe.value.width = l, oe.value.height = t - 12, clearTimeout(Mt.value), Mt.value = setTimeout(() => {
218
- K.value = !0;
219
- }, 10);
220
- });
221
- });
222
- G.value && (ne.value && G.value.unobserve(ne.value), G.value.disconnect()), G.value = new ResizeObserver(a), ne.value = X.value.parentNode, G.value.observe(ne.value);
223
- }
224
- Oe();
225
- }
226
- ct(() => {
227
- G.value && (ne.value && G.value.unobserve(ne.value), G.value.disconnect());
228
- });
229
- function Oa() {
230
- let a = 0;
231
- e.value.orientation === "vertical" && j.value && (a = Array.from(j.value.querySelectorAll("text")).reduce((s, c) => {
232
- const o = c.getComputedTextLength();
233
- return o > s ? o : s;
234
- }, 0)), e.value.orientation === "horizontal" && ee.value && (a = Array.from(ee.value.querySelectorAll("text")).reduce((s, c) => {
235
- const o = c.getComputedTextLength();
236
- return o > s ? o : s;
237
- }, 0));
238
- const l = qe.value ? qe.value.getBoundingClientRect().width : 0;
239
- return a + l + (l ? 24 : 0);
240
- }
241
- const _e = d(0), Me = d(0), Ia = ht((a) => {
242
- _e.value = a;
243
- }, 100);
244
- oa((a) => {
245
- const l = e.value.orientation === "vertical" ? ee.value : j.value;
246
- if (!l) return;
247
- const t = new ResizeObserver((s) => {
248
- Ia(s[0].contentRect.height);
249
- });
250
- t.observe(l), a(() => t.disconnect());
251
- });
252
- const Fa = ht((a) => {
253
- Me.value = a + e.value.style.chart.bars.totalValues.fontSize;
254
- }, 100);
255
- oa((a) => {
256
- if (e.value.orientation === "vertical") return;
257
- const l = pt.value;
258
- if (!l) return;
259
- const t = new ResizeObserver((s) => {
260
- Fa(s[0].contentRect.width);
261
- });
262
- t.observe(l), a(() => t.disconnect());
263
- }), ct(() => {
264
- _e.value = 0, Me.value = 0;
265
- });
266
- const Tt = g(() => {
267
- let a = 0;
268
- Ge.value && (a = Ge.value.getBBox().height);
269
- let l = 0;
270
- return e.value.orientation === "vertical" && ee.value && (l = _e.value), e.value.orientation === "horizontal" && j.value && (l = _e.value), a + l;
271
- }), u = g(() => {
272
- const { height: a, width: l } = oe.value, { right: t } = oe.value.paddingRatio;
273
- let s = e.value.style.chart.bars.totalValues.show && x.dataset && x.dataset.length > 1 ? e.value.style.chart.bars.totalValues.fontSize * 1.3 : 0, c = 0;
274
- e.value.style.chart.grid.y.axisLabels.show && (c = Oa());
275
- const o = e.value.style.chart.padding.top + s, w = l - l * t - Me.value, _ = a - e.value.style.chart.padding.bottom - Tt.value - s, I = e.value.style.chart.padding.left + c, H = l - I - l * t - Me.value, E = a - o - e.value.style.chart.padding.bottom - Tt.value - s;
276
- return {
277
- chartHeight: a,
278
- chartWidth: l,
279
- top: o,
280
- right: w,
281
- bottom: _,
282
- left: I,
283
- width: Math.max(0, H),
284
- height: Math.max(0, E)
285
- };
286
- }), Da = g(() => {
287
- const { left: a, top: l, width: t, height: s } = u.value, c = v.value.start, o = v.value.end, w = Math.max(1, o - c), _ = Math.max(0, Math.min(w, (O.value.start ?? c) - c)), I = Math.max(0, Math.min(w, (O.value.end ?? o) - c)), H = Math.max(0, I - _), E = {
288
- fill: e.value.style.chart.zoom.preview.fill,
289
- stroke: e.value.style.chart.zoom.preview.stroke,
290
- "stroke-width": e.value.style.chart.zoom.preview.strokeWidth,
291
- "stroke-dasharray": e.value.style.chart.zoom.preview.strokeDasharray,
292
- "stroke-linecap": "round",
293
- "stroke-linejoin": "round",
294
- style: {
295
- pointerEvents: "none",
296
- transition: "none !important",
297
- animation: "none !important"
298
- }
299
- };
300
- if (e.value.orientation === "horizontal") {
301
- const $ = s / w;
302
- return {
303
- x: a,
304
- y: l + _ * $,
305
- width: t,
306
- height: H * $,
307
- ...E
308
- };
309
- } else {
310
- const $ = t / w;
311
- return {
312
- x: a + _ * $,
313
- y: l,
314
- width: H * $,
315
- height: s,
316
- ...E
317
- };
318
- }
319
- }), W = g(() => Ze.value.map((a, l) => {
320
- const t = Tl(a.color) || Ra.value[l] || Ee[l] || Ee[l % Ee.length];
321
- return {
322
- ...a,
323
- // In distributed mode, all values are converted to positive
324
- series: JSON.parse(JSON.stringify(a.series)).map((s) => e.value.style.chart.bars.distributed ? Math.abs(s) : s),
325
- // Store signs to manage display of neg values in distributed mode
326
- signedSeries: a.series.map((s) => s >= 0 ? 1 : -1),
327
- absoluteIndex: l,
328
- id: ua(),
329
- color: t
330
- };
331
- })), A = g(() => Math.max(...W.value.filter((a) => !N.value.includes(a.id)).map((a) => a.series.length)));
332
- function Ea(a) {
333
- Je.value = a;
334
- }
335
- const v = d({
336
- start: 0,
337
- end: Math.max(...Ze.value.map((a) => a.series.length))
338
- }), O = d({ start: 0, end: Math.max(...Ze.value.map((a) => a.series.length)) }), $t = g(() => e.value.style.chart.zoom.preview.enable && (O.value.start !== v.value.start || O.value.end !== v.value.end));
339
- function At(a, l) {
340
- O.value[a] = l;
341
- }
342
- function Te() {
343
- const a = A.value;
344
- let l = Math.max(0, Math.min(v.value.start ?? 0, a - 1)), t = Math.max(l + 1, Math.min(v.value.end ?? a, a));
345
- (!Number.isFinite(l) || !Number.isFinite(t) || t <= l) && (l = 0, t = a), v.value.start = l, v.value.end = t, O.value.start = l, O.value.end = t, de.value && (de.value.setStartValue(l), de.value.setEndValue(t));
346
- }
347
- const me = d(null);
348
- function Va() {
349
- return new Promise((a) => requestAnimationFrame(
350
- () => requestAnimationFrame(() => a())
351
- ));
352
- }
353
- ct(() => {
354
- me.value && cancelAnimationFrame(me.value);
355
- });
356
- async function Pt() {
357
- Oe(), await kl(), me.value && cancelAnimationFrame(me.value), me.value = requestAnimationFrame(async () => {
358
- await Va(), Oe();
359
- });
360
- }
361
- const m = g(() => {
362
- let a;
363
- return e.value.orientation === "vertical" ? a = u.value.width / (v.value.end - v.value.start) : a = u.value.height / (v.value.end - v.value.start), a <= 0 ? 0 : a;
364
- }), fe = g(() => ze(W.value.filter((a) => !N.value.includes(a.id))).slice(v.value.start, v.value.end)), te = g(() => e.value.style.chart.zoom.minimap.show ? ze(W.value.filter((a) => !N.value.includes(a.id))) : []), Ua = g(() => e.value.style.chart.zoom.minimap.show ? [{
365
- name: "",
366
- series: te.value,
367
- color: "#000000",
368
- isVisible: !0
369
- }] : []), Ba = g(() => ze(W.value.filter((a) => !N.value.includes(a.id)).map((a) => ({
370
- ...a,
371
- series: a.series.map((l, t) => a.signedSeries[t] === -1 && l >= 0 ? -l : l)
372
- }))).slice(v.value.start, v.value.end)), $e = g(() => {
373
- const a = W.value.filter((l) => !N.value.includes(l.id));
374
- return {
375
- positive: ze(a.map((l) => ({
376
- ...l,
377
- series: l.series.slice(v.value.start, v.value.end).map((t) => t >= 0 ? t : 0)
378
- }))),
379
- negative: ze(a.map((l) => ({
380
- ...l,
381
- series: l.series.slice(v.value.start, v.value.end).map((t) => t < 0 ? t : 0)
382
- })))
383
- };
384
- }), B = g(() => {
385
- 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(...$e.value.positive), l = Math.min(...$e.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) ? ha(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks) : da(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks);
386
- return s.ticks.map((c) => ({
387
- zero: u.value.bottom - u.value.height * (Math.abs(s.min) / (s.max + Math.abs(s.min))),
388
- y: u.value.bottom - u.value.height * ((c + Math.abs(s.min)) / (s.max + Math.abs(s.min))),
389
- x: u.value.left - 8,
390
- horizontal_zero: u.value.left + u.value.width * (Math.abs(s.min) / (s.max + Math.abs(s.min))),
391
- horizontal_x: u.value.left + u.value.width * ((c + Math.abs(s.min)) / (s.max + Math.abs(s.min))),
392
- horizontal_y: u.value.bottom - 8,
393
- value: c
394
- }));
395
- }), R = g(() => ba({
396
- values: e.value.style.chart.grid.x.timeLabels.values,
397
- maxDatapoints: A.value,
398
- formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
399
- start: v.value.start,
400
- end: v.value.end
401
- })), pe = g(() => ba({
402
- values: e.value.style.chart.grid.x.timeLabels.values,
403
- maxDatapoints: A.value,
404
- formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
405
- start: 0,
406
- end: A.value
407
- })), Ha = g(() => {
408
- const a = e.value.style.chart.grid.x.timeLabels.modulo;
409
- return R.value.length ? Math.min(a, [...new Set(R.value.map((l) => l.text))].length) : a;
410
- }), Nt = g(() => {
411
- const a = e.value.style.chart.grid.x.timeLabels, l = R.value || [], t = pe.value || [], s = v.value.start ?? 0, c = U.value, o = A.value, w = l.map((I) => I?.text ?? ""), _ = t.map((I) => I?.text ?? "");
412
- return $l(
413
- !!a.showOnlyFirstAndLast,
414
- !!a.showOnlyAtModulo,
415
- Math.max(1, Ha.value || 1),
416
- w,
417
- _,
418
- s,
419
- c,
420
- o
421
- );
422
- }), Rt = g(() => {
423
- const a = e.value.style.chart.grid.x.timeLabels.datetimeFormatter, l = Bl({
424
- useUTC: a.useUTC,
425
- locale: Hl[a.locale] || { months: [], shortMonths: [], days: [], shortDays: [] },
426
- januaryAsYear: a.januaryAsYear
427
- });
428
- return (t, s) => {
429
- const o = e.value.style.chart.grid.x.timeLabels.values?.[t];
430
- return o == null ? "" : (l.formatDate(new Date(o), s), l.formatDate(new Date(o), s));
431
- };
432
- }), Ot = g(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, t) => ({
433
- text: Rt.value(t, e.value.style.chart.zoom.timeFormat),
434
- absoluteIndex: t
435
- }))), at = g(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, t) => ({
436
- text: Rt.value(t, e.value.style.chart.tooltip.timeFormat),
437
- absoluteIndex: t
438
- }))), L = g(() => {
439
- if (!he.value && !be.value) return [];
440
- let a = Array(A.value).fill(0), l = Array(A.value).fill(0), t = Array(A.value).fill(0), s = Array(A.value).fill(0);
441
- const c = Math.max(...$e.value.positive) || 0, o = Math.min(...$e.value.negative), w = [-1 / 0, 1 / 0, NaN, void 0, null].includes(o) ? 0 : o, _ = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? ha(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : w > 0 ? 0 : w, 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) : da(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : w > 0 ? 0 : w, 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: I, max: H } = _, E = H + (I >= 0 ? 0 : Math.abs(I)) || 1, $ = u.value.height, Fe = u.value.width, Qt = B.value[0] ? B.value[0].zero : u.value.bottom, Kt = B.value[0] ? B.value[0].horizontal_zero : u.value.left;
442
- let jt = Array(te.value.length).fill(0), ea = Array(te.value.length).fill(0);
443
- return W.value.filter((ie) => !N.value.includes(ie.id)).map((ie) => {
444
- const q = ie.series.slice(), ta = q.map((h, y) => jt[y]), ol = q.map((h, y) => ea[y]);
445
- q.forEach((h, y) => {
446
- (Number(h) || 0) >= 0 ? jt[y] += Number(h) || 0 : ea[y] += Math.abs(Number(h) || 0);
447
- });
448
- const Y = ie.series.slice(v.value.start, v.value.end), nl = ie.signedSeries.slice(v.value.start, v.value.end), il = Y.map((h, y) => u.value.left + m.value * y + m.value * e.value.style.chart.bars.gapRatio / 4), De = (te.value || []).filter(Number.isFinite), nt = De.length ? Math.max(...De) : 0, it = De.length ? Math.min(...De) : 0;
449
- function aa({ minimapH: h }) {
450
- const S = nt > 0, P = it < 0;
451
- if (S && P) {
452
- const V = Math.max(nt, Math.abs(it)) || 1e-9;
453
- return {
454
- pxPerUnit: h / 2 / V,
455
- zero: h / 2
456
- };
457
- }
458
- if (S) {
459
- const V = Math.max(1e-9, nt);
460
- return {
461
- pxPerUnit: h / V,
462
- zero: h
463
- };
464
- }
465
- const z = Math.max(1e-9, Math.abs(it));
466
- return {
467
- pxPerUnit: h / z,
468
- zero: 0
469
- };
470
- }
471
- const ul = ({ left: h, unitW: y }) => {
472
- const S = y * (e.value.style.chart.bars.gapRatio / 4);
473
- return q.map((P, z) => h + y * z + S);
474
- }, cl = Y.map((h, y) => u.value.top + m.value * y + m.value * e.value.style.chart.bars.gapRatio / 4), vl = Y.map((h, y) => {
475
- const S = e.value.style.chart.bars.distributed ? (h || 0) / fe.value[y] : (h || 0) / E;
476
- let P, z;
477
- return h > 0 ? (z = $ * S, P = Qt - z - a[y], a[y] += z) : (z = $ * S, P = Qt + t[y], t[y] += Math.abs(z)), P;
478
- }), hl = ({ minimapH: h }) => {
479
- if (e.value.style.chart.bars.distributed)
480
- return q.map((z, V) => {
481
- const ut = Math.abs(Number(z) || 0), la = Math.abs(te.value?.[V] || 0) || 1e-9, fl = (ta[V] + ut) / la;
482
- return h - fl * h;
483
- });
484
- const { pxPerUnit: y, zero: S } = aa({ minimapH: h });
485
- return q.map((P, z) => {
486
- const V = Number(P) || 0;
487
- return V >= 0 ? S - (ta[z] + V) * y : S + ol[z] * y;
488
- });
489
- }, dl = Y.map((h, y) => {
490
- const S = e.value.style.chart.bars.distributed ? (h || 0) / fe.value[y] : (h || 0) / E;
491
- let P, z;
492
- return h > 0 ? (z = Fe * S, P = Kt + l[y], l[y] += z) : (z = Fe * S, P = Kt - Math.abs(z) - s[y], s[y] += Math.abs(z)), P;
493
- }), yl = Y.map((h, y) => {
494
- const S = e.value.style.chart.bars.distributed ? (h || 0) / fe.value[y] : (h || 0) / E;
495
- return h > 0 ? $ * S : $ * Math.abs(S);
496
- }), gl = ({ minimapH: h }) => {
497
- if (e.value.style.chart.bars.distributed)
498
- return q.map((P, z) => {
499
- const V = Math.abs(Number(P) || 0), ut = Math.abs(te.value?.[z] || 0) || 1e-9;
500
- return V / ut * h;
501
- });
502
- const { pxPerUnit: y } = aa({ minimapH: h });
503
- return q.map((S) => Math.abs(Number(S) || 0) * y);
504
- }, bl = Y.map((h, y) => {
505
- const S = e.value.style.chart.bars.distributed ? (h || 0) / fe.value[y] : (h || 0) / E;
506
- return h > 0 ? Fe * S : Fe * Math.abs(S);
507
- }), ml = Y.map((h) => Math.abs(h)).reduce((h, y) => h + y, 0);
508
- return {
509
- ...ie,
510
- proportions: Y.map((h, y) => e.value.style.chart.bars.distributed ? (h || 0) / fe.value[y] : (h || 0) / ml),
511
- series: Y,
512
- signedSeries: nl,
513
- x: il,
514
- y: vl,
515
- height: yl,
516
- horizontal_width: bl,
517
- horizontal_y: cl,
518
- horizontal_x: dl,
519
- xMinimap: ul,
520
- yMinimap: hl,
521
- heightMinimap: gl
522
- };
523
- });
524
- }), It = g(() => Ba.value.map((a, l) => ({
525
- value: a,
526
- sign: a >= 0 ? 1 : -1
527
- })));
528
- function Ae(a, l, t, s, c) {
529
- const o = c === -1 && a >= 0 ? -a : a;
530
- return Ue(
531
- e.value.style.chart.bars.dataLabels.formatter,
532
- o,
533
- re({
534
- p: e.value.style.chart.bars.dataLabels.prefix,
535
- v: o,
536
- s: e.value.style.chart.bars.dataLabels.suffix,
537
- r: e.value.style.chart.bars.dataLabels.rounding
538
- }),
539
- { datapoint: l, seriesIndex: t, datapointIndex: s }
540
- );
541
- }
542
- function Ft(a, l, t, s) {
543
- return Ue(
544
- e.value.style.chart.bars.dataLabels.formatter,
545
- a,
546
- re({
547
- v: isNaN(a) ? 0 : a,
548
- s: "%",
549
- r: e.value.style.chart.bars.dataLabels.rounding
550
- }),
551
- { datapoint: l, seriesIndex: t, datapointIndex: s }
552
- );
553
- }
554
- function Dt(a) {
555
- const l = JSON.parse(JSON.stringify(L.value)).map((t) => ({
556
- name: t.name,
557
- value: t.series[a] === 0 ? 0 : t.series[a] || null,
558
- proportion: t.proportions[a] || null,
559
- color: t.color,
560
- id: t.id
561
- }));
562
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: a + v.value.start }), ve("selectDatapoint", { datapoint: l, period: R.value[a] });
563
- }
564
- function lt(a) {
565
- return JSON.parse(JSON.stringify(L.value)).map((l) => ({
566
- name: l.name,
567
- absoluteIndex: l.absoluteIndex,
568
- value: l.series[a] === 0 ? 0 : (l.signedSeries[a] === -1 && l.series[a] >= 0 ? -l.series[a] : l.series[a]) || null,
569
- proportion: l.proportions[a] || null,
570
- color: l.color,
571
- id: l.id,
572
- timeLabel: pe.value[a]
573
- }));
574
- }
575
- function Et(a) {
576
- if (e.value.events.datapointLeave) {
577
- const l = lt(a);
578
- e.value.events.datapointLeave({ datapoint: l, seriesIndex: a + v.value.start });
579
- }
580
- He.value = null, U.value = null;
581
- }
582
- const Xa = g(() => Array(A.value).fill(0).map((a, l) => lt(l)));
583
- we(() => x.selectedXIndex, (a) => {
584
- if ([null, void 0].includes(x.selectedXIndex)) {
585
- U.value = null;
586
- return;
587
- }
588
- const l = a - v.value.start;
589
- l < 0 || a >= v.value.end ? U.value = null : U.value = l ?? null;
590
- }, { immediate: !0 });
591
- function Vt(a) {
592
- U.value = a, He.value = !0;
593
- const l = e.value.style.chart.tooltip.customFormat, t = lt(a);
594
- rl({ seriesIndex: a, datapoint: t }), e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: a + v.value.start }), Xe.value = {
595
- datapoint: t,
596
- seriesIndex: a,
597
- config: e.value,
598
- series: L.value
599
- };
600
- const s = t.map((c) => Math.abs(c.value)).reduce((c, o) => c + o, 0);
601
- if (ga(l) && Fl(() => l({
602
- seriesIndex: a,
603
- datapoint: t,
604
- series: L.value,
605
- config: e.value
606
- })))
607
- We.value = l({
608
- seriesIndex: a,
609
- datapoint: t,
610
- series: L.value,
611
- config: e.value
612
- });
613
- else {
614
- const {
615
- showValue: c,
616
- showPercentage: o,
617
- borderColor: w,
618
- roundingValue: _,
619
- roundingPercentage: I
620
- } = e.value.style.chart.tooltip;
621
- let H = "";
622
- (R.value[a] && R.value[a].text || at.value[a] && at.value[a].text && e.value.style.chart.tooltip.showTimeLabel) && (H += `<div style="width:100%;text-align:center;border-bottom:1px solid ${w};padding-bottom:6px;margin-bottom:3px;">${e.value.style.chart.tooltip.useDefaultTimeFormat ? R.value[a]?.text : at.value[a]?.text || pe.value[a]?.text || ""}</div>`);
623
- const E = [
624
- c && o ? "(" : "",
625
- c && o ? ")" : ""
626
- ];
627
- t.reverse().forEach(($) => {
628
- H += `
629
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
630
- <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_${$.id})` : $.color}"/>${Ma.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${D.value}_${$.absoluteIndex})"/>` : ""}</svg>
631
- ${$.name}${c || o ? ":" : ""} ${c ? re({
632
- p: e.value.style.chart.bars.dataLabels.prefix,
633
- v: $.value,
634
- s: e.value.style.chart.bars.dataLabels.suffix,
635
- r: _
636
- }) : ""} ${E[0]}${o ? re({
637
- v: isNaN($.value / s) ? 0 : Math.abs($.value) / s * 100,
638
- // Negs are absed to show relative proportion to absolute total. It's opinionated.
639
- s: "%",
640
- r: I
641
- }) : ""}${E[1]}
642
- </div>
643
- `;
644
- }), We.value = `<div>${H}</div>`;
645
- }
646
- }
647
- const Wa = g(() => oe.value.width), Ya = g(() => oe.value.height);
648
- Gl({
649
- timeLabelsEls: e.value.orientation === "vertical" ? ee : j,
650
- timeLabels: R,
651
- slicer: v,
652
- configRef: e,
653
- rotationPath: ["style", "chart", "grid", "x", "timeLabels", "rotation"],
654
- autoRotatePath: ["style", "chart", "grid", "x", "timeLabels", "autoRotate", "enable"],
655
- isAutoSize: !1,
656
- width: Wa,
657
- height: Ya,
658
- rotation: e.value.style.chart.grid.x.timeLabels.autoRotate.angle
659
- });
660
- function Ut(a) {
661
- ye.value = a, dt.value += 1;
662
- }
663
- function Bt() {
664
- T.value.showTable = !T.value.showTable;
665
- }
666
- function Ht() {
667
- T.value.dataLabels.show = !T.value.dataLabels.show;
668
- }
669
- function Xt() {
670
- T.value.showTooltip = !T.value.showTooltip;
671
- }
672
- function Ga() {
673
- return L.value;
674
- }
675
- const Wt = g(() => {
676
- if (L.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
677
- const a = L.value.map(({ name: t, color: s }) => ({
678
- label: t,
679
- color: s
680
- })), l = [];
681
- return R.value.forEach((t) => {
682
- const s = [e.value.style.chart.grid.x.timeLabels.values[t.absoluteIndex] ? t.text : i + 1];
683
- W.value.forEach((c) => {
684
- s.push(Number((c.series[t.absoluteIndex] || 0).toFixed(e.value.table.td.roundingValue)));
685
- }), l.push(s);
686
- }), { head: a, body: l };
687
- });
688
- function st(a = null) {
689
- const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], t = ["", ...Wt.value.head.map((w) => w.label)], s = Wt.value.body, c = l.concat([t]).concat(s), o = Ol(c);
690
- a ? a(o) : Il({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-stackbar" });
691
- }
692
- const Pe = g(() => {
693
- const a = [""].concat(L.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>');
694
- let l = [];
695
- for (let c = 0; c < A.value; c += 1) {
696
- const o = L.value.map((w) => w.series[c] ?? 0).reduce((w, _) => w + _, 0);
697
- l.push([e.value.style.chart.grid.x.timeLabels.values.slice(v.value.start, v.value.end)[c] ? R.value[c].text : c + 1].concat(L.value.map((w) => (w.series[c] ?? 0).toFixed(e.value.table.td.roundingValue))).concat((o ?? 0).toFixed(e.value.table.td.roundingValue)));
698
- }
699
- const t = {
700
- th: {
701
- backgroundColor: e.value.table.th.backgroundColor,
702
- color: e.value.table.th.color,
703
- outline: e.value.table.th.outline
704
- },
705
- td: {
706
- backgroundColor: e.value.table.td.backgroundColor,
707
- color: e.value.table.td.color,
708
- outline: e.value.table.td.outline
709
- },
710
- breakpoint: e.value.table.responsiveBreakpoint
711
- }, s = [e.value.table.columnNames.period].concat(L.value.map((c) => c.name)).concat(e.value.table.columnNames.total);
712
- return { head: a, body: l.slice(0, v.value.end - v.value.start), config: t, colNames: s };
713
- });
714
- function qa(a, l) {
715
- if (N.value.includes(l.id))
716
- N.value = N.value.filter((t) => t !== l.id);
717
- else {
718
- if (N.value.length === W.value.length - 1) return;
719
- N.value.push(l.id);
720
- }
721
- ve("selectLegend", L.value);
722
- }
723
- const rt = g(() => W.value.map((a, l) => ({
724
- ...a,
725
- shape: "square"
726
- })).map((a) => ({
727
- ...a,
728
- opacity: N.value.includes(a.id) ? 0.5 : 1,
729
- segregate: () => qa(a.absoluteIndex, a),
730
- isSegregated: N.value.includes(a.id)
731
- }))), Ja = g(() => ({
732
- cy: "stackbar-legend",
733
- backgroundColor: e.value.style.chart.legend.backgroundColor,
734
- color: e.value.style.chart.legend.color,
735
- fontSize: e.value.style.chart.legend.fontSize,
736
- paddingBottom: 12,
737
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
738
- })), Ne = d(!1);
739
- function ot() {
740
- Ne.value = !Ne.value;
741
- }
742
- function Re(a, l) {
743
- const t = JSON.parse(JSON.stringify(L.value)).map((s) => ({
744
- name: s.name,
745
- value: s.series[l] === 0 ? 0 : (s.signedSeries[l] === -1 && s.series[l] >= 0 ? -s.series[l] : s.series[l]) || null,
746
- proportion: s.proportions[l] || null,
747
- color: s.color,
748
- id: s.id
749
- }));
750
- ve("selectTimeLabel", {
751
- datapoint: t,
752
- absoluteIndex: a.absoluteIndex,
753
- label: a.text
754
- });
755
- }
756
- const Za = g(() => Math.max(...L.value.flatMap((a) => a.series)));
757
- function Yt(a, l) {
758
- return e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Lt.value ? l * 100 >= e.value.style.chart.bars.dataLabels.hideUnderPercentage : e.value.style.chart.bars.dataLabels.hideEmptyPercentages ? l > 0 : !0 : Lt.value ? (wt.value && et.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 > Za.value * e.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : wt.value ? Math.abs(a) >= e.value.style.chart.bars.dataLabels.hideUnderValue : e.value.style.chart.bars.dataLabels.hideEmptyValues ? a !== 0 : !0;
759
- }
760
- async function Qa({ scale: a = 2 } = {}) {
761
- if (!X.value) return;
762
- const { width: l, height: t } = X.value.getBoundingClientRect(), s = l / t, { imageUri: c, base64: o } = await ql({ domElement: X.value, base64: !0, img: !0, scale: a });
763
- return {
764
- imageUri: c,
765
- base64: o,
766
- title: e.value.style.chart.title.text,
767
- width: l,
768
- height: t,
769
- aspectRatio: s
770
- };
771
- }
772
- const xe = g(() => {
773
- const a = e.value.table.useDialog && !e.value.table.show, l = T.value.showTable;
774
- return {
775
- component: a ? Ca : ka,
776
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
777
- props: a ? {
778
- backgroundColor: e.value.table.th.backgroundColor,
779
- color: e.value.table.th.color,
780
- headerColor: e.value.table.th.color,
781
- headerBg: e.value.table.th.backgroundColor,
782
- isFullscreen: ye.value,
783
- fullscreenParent: X.value,
784
- forcedWidth: Math.min(800, window.innerWidth * 0.8)
785
- } : {
786
- hideDetails: !0,
787
- config: {
788
- open: l,
789
- maxHeight: 1e4,
790
- body: {
791
- backgroundColor: e.value.style.chart.backgroundColor,
792
- color: e.value.style.chart.color
793
- },
794
- head: {
795
- backgroundColor: e.value.style.chart.backgroundColor,
796
- color: e.value.style.chart.color
797
- }
798
- }
799
- }
800
- };
801
- });
802
- we(() => T.value.showTable, (a) => {
803
- e.value.table.show || (a && e.value.table.useDialog && ge.value ? ge.value.open() : "close" in ge.value && ge.value.close());
804
- });
805
- function Gt() {
806
- T.value.showTable = !1, Ye.value && Ye.value.setTableIconState(!1);
807
- }
808
- const Ka = g(() => e.value.style.chart.backgroundColor), ja = g(() => e.value.style.chart.legend), el = g(() => e.value.style.chart.title), { exportSvg: tl, getSvg: al } = Xl({
809
- svg: Ke,
810
- title: el,
811
- legend: ja,
812
- legendItems: rt,
813
- backgroundColor: Ka
814
- });
815
- async function qt({ isCb: a }) {
816
- if (a) {
817
- const { blob: l, url: t, text: s, dataUrl: c } = await al();
818
- e.value.userOptions.callbacks.svg({ blob: l, url: t, text: s, dataUrl: c });
819
- } else
820
- tl();
821
- }
822
- function Jt(a) {
823
- const l = A.value;
824
- return a > l ? l : a < 0 || a < v.value.start ? e.value.style.chart.zoom.startIndex !== null ? v.value.start + 1 : 1 : a;
825
- }
826
- const ke = d(!1), Zt = d(!1);
827
- function Oe() {
828
- if (!ke.value) {
829
- ke.value = !0;
830
- try {
831
- const { startIndex: a, endIndex: l } = e.value.style.chart.zoom, t = A.value, s = a ?? 0, c = l != null ? Math.min(Jt(l + 1), t) : t;
832
- Ie.value = !0, v.value.start = s, v.value.end = c, O.value.start = s, O.value.end = c, Te(), Zt.value = !0;
833
- } finally {
834
- queueMicrotask(() => {
835
- Ie.value = !1;
836
- }), ke.value = !1;
837
- }
838
- }
839
- }
840
- const Ie = d(!1);
841
- function ll(a) {
842
- ke.value || Ie.value || a !== v.value.start && (v.value.start = a, O.value.start = a, Te());
843
- }
844
- function sl(a) {
845
- if (ke.value || Ie.value) return;
846
- const l = Jt(a);
847
- l !== v.value.end && (v.value.end = l, O.value.end = l, Te());
848
- }
849
- function rl({ seriesIndex: a, datapoint: l }) {
850
- const t = v.value.start + a;
851
- ve("selectX", {
852
- dataset: l,
853
- index: t,
854
- indexLabel: e.value.style.chart.grid.x.timeLabels.values[t]
855
- });
856
- }
857
- return ma({
858
- getData: Ga,
859
- getImage: Qa,
860
- generatePdf: Ct,
861
- generateCsv: st,
862
- generateImage: _t,
863
- generateSvg: qt,
864
- toggleTable: Bt,
865
- toggleLabels: Ht,
866
- toggleTooltip: Xt,
867
- toggleAnnotator: ot,
868
- toggleFullscreen: Ut
869
- }), (a, l) => (r(), n("div", {
870
- id: `stackbar_${D.value}`,
871
- ref_key: "stackbarChart",
872
- ref: X,
873
- class: ue({ "vue-data-ui-component": !0, "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": ye.value }),
874
- style: ae(`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%" : ""}`),
875
- onMouseenter: Pa,
876
- onMouseleave: Na
877
- }, [
878
- e.value.userOptions.buttons.annotator ? (r(), Z(f(La), {
879
- key: 0,
880
- svgRef: f(Ke),
881
- backgroundColor: e.value.style.chart.backgroundColor,
882
- color: e.value.style.chart.color,
883
- active: Ne.value,
884
- onClose: ot
885
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : b("", !0),
886
- C(a.$slots, "userConfig", {}, void 0, !0),
887
- e.value.style.chart.title.text ? (r(), n("div", {
888
- key: 1,
889
- ref_key: "chartTitle",
890
- ref: yt,
891
- style: "width:100%;background:transparent;padding-bottom:24px"
892
- }, [
893
- (r(), Z(Jl, {
894
- key: `title_${mt.value}`,
895
- config: {
896
- title: {
897
- cy: "stackbar-title",
898
- ...e.value.style.chart.title
899
- },
900
- subtitle: {
901
- cy: "stackbar-subtitle",
902
- ...e.value.style.chart.title.subtitle
903
- }
904
- }
905
- }, null, 8, ["config"]))
906
- ], 512)) : b("", !0),
907
- Q("div", {
908
- id: `legend-top-${D.value}`
909
- }, null, 8, as),
910
- e.value.userOptions.show && he.value && (f(kt) || f(Qe)) ? (r(), Z(f(Sa), {
911
- ref_key: "userOptionsRef",
912
- ref: Ye,
913
- key: `user_option_${dt.value}`,
914
- backgroundColor: e.value.style.chart.backgroundColor,
915
- color: e.value.style.chart.color,
916
- isPrinting: f(St),
917
- isImaging: f(zt),
918
- uid: D.value,
919
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
920
- hasPdf: e.value.userOptions.buttons.pdf,
921
- hasImg: e.value.userOptions.buttons.img,
922
- hasSvg: e.value.userOptions.buttons.svg,
923
- hasXls: e.value.userOptions.buttons.csv,
924
- hasTable: e.value.userOptions.buttons.table,
925
- hasLabel: e.value.userOptions.buttons.labels,
926
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
927
- isFullscreen: ye.value,
928
- chartElement: X.value,
929
- position: e.value.userOptions.position,
930
- isTooltip: T.value.showTooltip,
931
- titles: { ...e.value.userOptions.buttonTitles },
932
- hasAnnotator: e.value.userOptions.buttons.annotator,
933
- isAnnotation: Ne.value,
934
- callbacks: e.value.userOptions.callbacks,
935
- printScale: e.value.userOptions.print.scale,
936
- tableDialog: e.value.table.useDialog,
937
- onToggleFullscreen: Ut,
938
- onGeneratePdf: f(Ct),
939
- onGenerateCsv: st,
940
- onGenerateImage: f(_t),
941
- onGenerateSvg: qt,
942
- onToggleTable: Bt,
943
- onToggleLabels: Ht,
944
- onToggleTooltip: Xt,
945
- onToggleAnnotator: ot,
946
- style: ae({
947
- visibility: f(kt) ? f(Qe) ? "visible" : "hidden" : "visible"
948
- })
949
- }, vt({ _: 2 }, [
950
- a.$slots.menuIcon ? {
951
- name: "menuIcon",
952
- fn: M(({ isOpen: t, color: s }) => [
953
- C(a.$slots, "menuIcon", le(se({ isOpen: t, color: s })), void 0, !0)
954
- ]),
955
- key: "0"
956
- } : void 0,
957
- a.$slots.optionTooltip ? {
958
- name: "optionTooltip",
959
- fn: M(() => [
960
- C(a.$slots, "optionTooltip", {}, void 0, !0)
961
- ]),
962
- key: "1"
963
- } : void 0,
964
- a.$slots.optionPdf ? {
965
- name: "optionPdf",
966
- fn: M(() => [
967
- C(a.$slots, "optionPdf", {}, void 0, !0)
968
- ]),
969
- key: "2"
970
- } : void 0,
971
- a.$slots.optionCsv ? {
972
- name: "optionCsv",
973
- fn: M(() => [
974
- C(a.$slots, "optionCsv", {}, void 0, !0)
975
- ]),
976
- key: "3"
977
- } : void 0,
978
- a.$slots.optionImg ? {
979
- name: "optionImg",
980
- fn: M(() => [
981
- C(a.$slots, "optionImg", {}, void 0, !0)
982
- ]),
983
- key: "4"
984
- } : void 0,
985
- a.$slots.optionSvg ? {
986
- name: "optionSvg",
987
- fn: M(() => [
988
- C(a.$slots, "optionSvg", {}, void 0, !0)
989
- ]),
990
- key: "5"
991
- } : void 0,
992
- a.$slots.optionTable ? {
993
- name: "optionTable",
994
- fn: M(() => [
995
- C(a.$slots, "optionTable", {}, void 0, !0)
996
- ]),
997
- key: "6"
998
- } : void 0,
999
- a.$slots.optionLabels ? {
1000
- name: "optionLabels",
1001
- fn: M(() => [
1002
- C(a.$slots, "optionLabels", {}, void 0, !0)
1003
- ]),
1004
- key: "7"
1005
- } : void 0,
1006
- a.$slots.optionFullscreen ? {
1007
- name: "optionFullscreen",
1008
- fn: M(({ toggleFullscreen: t, isFullscreen: s }) => [
1009
- C(a.$slots, "optionFullscreen", le(se({ toggleFullscreen: t, isFullscreen: s })), void 0, !0)
1010
- ]),
1011
- key: "8"
1012
- } : void 0,
1013
- a.$slots.optionAnnotator ? {
1014
- name: "optionAnnotator",
1015
- fn: M(({ toggleAnnotator: t, isAnnotator: s }) => [
1016
- C(a.$slots, "optionAnnotator", le(se({ toggleAnnotator: t, isAnnotator: s })), void 0, !0)
1017
- ]),
1018
- key: "9"
1019
- } : void 0
1020
- ]), 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"])) : b("", !0),
1021
- (r(), n("svg", {
1022
- ref_key: "svgRef",
1023
- ref: Ke,
1024
- xmlns: f(Al),
1025
- viewBox: `0 0 ${u.value.chartWidth <= 0 ? 10 : u.value.chartWidth} ${u.value.chartHeight <= 0 ? 10 : u.value.chartHeight}`,
1026
- class: ue({ "vue-data-ui-loading": f(be) }),
1027
- style: ae(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
1028
- }, [
1029
- Le(f(za)),
1030
- a.$slots["chart-background"] ? (r(), n("foreignObject", {
1031
- key: 0,
1032
- x: u.value.left,
1033
- y: u.value.top,
1034
- width: u.value.width <= 0 ? 10 : u.value.width,
1035
- height: u.value.height <= 0 ? 10 : u.value.height,
1036
- style: {
1037
- pointerEvents: "none"
1038
- }
1039
- }, [
1040
- C(a.$slots, "chart-background", {}, void 0, !0)
1041
- ], 8, ss)) : b("", !0),
1042
- e.value.style.chart.bars.gradient.show ? (r(), n("defs", rs, [
1043
- (r(!0), n(p, null, k(L.value, (t, s) => (r(), n("linearGradient", {
1044
- id: `gradient_${t.id}`,
1045
- x1: "0%",
1046
- y1: "0%",
1047
- x2: "0%",
1048
- y2: "100%"
1049
- }, [
1050
- Q("stop", {
1051
- offset: "0%",
1052
- "stop-color": t.color
1053
- }, null, 8, ns),
1054
- Q("stop", {
1055
- offset: "61.8%",
1056
- "stop-color": f(Pl)(t.color, e.value.style.chart.bars.gradient.intensity / 100)
1057
- }, null, 8, is),
1058
- Q("stop", {
1059
- offset: "100%",
1060
- "stop-color": t.color
1061
- }, null, 8, us)
1062
- ], 8, os))), 256))
1063
- ])) : b("", !0),
1064
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "vertical" ? (r(!0), n(p, { key: 2 }, k(B.value, (t, s) => (r(), n("line", {
1065
- x1: u.value.left,
1066
- x2: u.value.right,
1067
- y1: t.y,
1068
- y2: t.y,
1069
- stroke: e.value.style.chart.grid.x.linesColor,
1070
- "stroke-width": e.value.style.chart.grid.x.linesThickness,
1071
- "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
1072
- "stroke-linecap": "round"
1073
- }, null, 8, cs))), 256)) : b("", !0),
1074
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (r(!0), n(p, { key: 3 }, k(v.value.end - v.value.start + 1, (t, s) => (r(), n("line", {
1075
- x1: u.value.left,
1076
- x2: u.value.right,
1077
- y1: u.value.top + m.value * s,
1078
- y2: u.value.top + m.value * s,
1079
- stroke: e.value.style.chart.grid.x.linesColor,
1080
- "stroke-width": e.value.style.chart.grid.x.linesThickness,
1081
- "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
1082
- "stroke-linecap": "round"
1083
- }, null, 8, vs))), 256)) : b("", !0),
1084
- e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "vertical" ? (r(!0), n(p, { key: 4 }, k(v.value.end - v.value.start + 1, (t, s) => (r(), n("line", {
1085
- x1: u.value.left + m.value * s,
1086
- x2: u.value.left + m.value * s,
1087
- y1: u.value.top,
1088
- y2: u.value.bottom,
1089
- stroke: e.value.style.chart.grid.y.linesColor,
1090
- "stroke-width": e.value.style.chart.grid.y.linesThickness,
1091
- "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
1092
- "stroke-linecap": "round"
1093
- }, null, 8, hs))), 256)) : b("", !0),
1094
- e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "horizontal" ? (r(!0), n(p, { key: 5 }, k(B.value, (t, s) => (r(), n("line", {
1095
- x1: t.horizontal_x,
1096
- x2: t.horizontal_x,
1097
- y1: u.value.top,
1098
- y2: u.value.bottom,
1099
- stroke: e.value.style.chart.grid.y.linesColor,
1100
- "stroke-width": e.value.style.chart.grid.y.linesThickness,
1101
- "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
1102
- "stroke-linecap": "round"
1103
- }, null, 8, ds))), 256)) : b("", !0),
1104
- (r(!0), n(p, null, k(L.value, (t, s) => (r(), n("g", null, [
1105
- a.$slots.pattern ? (r(), n("defs", ys, [
1106
- C(a.$slots, "pattern", Se({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${D.value}_${t.absoluteIndex}` }), void 0, !0)
1107
- ])) : b("", !0),
1108
- e.value.orientation === "vertical" ? (r(), n(p, { key: 1 }, [
1109
- (r(!0), n(p, null, k(t.x, (c, o) => (r(), n("rect", {
1110
- x: c,
1111
- y: t.y[o] < 0 ? 0 : t.y[o],
1112
- height: t.height[o] < 0 ? 1e-4 : t.height[o] || 0,
1113
- rx: e.value.style.chart.bars.borderRadius > t.height[o] / 2 ? (t.height[o] < 0 ? 0 : t.height[o]) / 2 : e.value.style.chart.bars.borderRadius,
1114
- width: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1115
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
1116
- stroke: e.value.style.chart.backgroundColor,
1117
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1118
- "stroke-linecap": "round",
1119
- "stroke-linejoin": "round",
1120
- class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": K.value })
1121
- }, null, 10, gs))), 256)),
1122
- a.$slots.pattern ? (r(), n("g", bs, [
1123
- (r(!0), n(p, null, k(t.x, (c, o) => (r(), n("rect", {
1124
- x: c,
1125
- y: t.y[o] < 0 ? 0 : t.y[o],
1126
- height: t.height[o] < 0 ? 1e-4 : t.height[o] || 0,
1127
- rx: e.value.style.chart.bars.borderRadius > t.height[o] / 2 ? (t.height[o] < 0 ? 0 : t.height[o]) / 2 : e.value.style.chart.bars.borderRadius,
1128
- width: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1129
- fill: `url(#pattern_${D.value}_${t.absoluteIndex})`,
1130
- stroke: e.value.style.chart.backgroundColor,
1131
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1132
- "stroke-linecap": "round",
1133
- "stroke-linejoin": "round",
1134
- class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": K.value })
1135
- }, null, 10, ms))), 256))
1136
- ])) : b("", !0)
1137
- ], 64)) : (r(), n(p, { key: 2 }, [
1138
- (r(!0), n(p, null, k(t.horizontal_x, (c, o) => (r(), n("rect", {
1139
- x: f(Ve)(c, u.value.left),
1140
- y: t.horizontal_y[o] < 0 ? 0 : t.horizontal_y[o],
1141
- width: f(Ve)(t.horizontal_width[o] < 0 ? 1e-4 : t.horizontal_width[o]),
1142
- rx: e.value.style.chart.bars.borderRadius > t.height[o] / 2 ? (t.height[o] < 0 ? 0 : t.height[o]) / 2 : e.value.style.chart.bars.borderRadius,
1143
- height: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1144
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
1145
- stroke: e.value.style.chart.backgroundColor,
1146
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1147
- "stroke-linecap": "round",
1148
- "stroke-linejoin": "round",
1149
- class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": K.value })
1150
- }, null, 10, fs))), 256)),
1151
- a.$slots.pattern ? (r(), n("g", ps, [
1152
- (r(!0), n(p, null, k(t.horizontal_x, (c, o) => (r(), n("rect", {
1153
- x: f(Ve)(c, u.value.left),
1154
- y: t.horizontal_y[o] < 0 ? 0 : t.horizontal_y[o],
1155
- width: f(Ve)(t.horizontal_width[o] < 0 ? 1e-4 : t.horizontal_width[o]),
1156
- rx: e.value.style.chart.bars.borderRadius > t.height[o] / 2 ? (t.height[o] < 0 ? 0 : t.height[o]) / 2 : e.value.style.chart.bars.borderRadius,
1157
- height: m.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1158
- fill: `url(#pattern_${D.value}_${t.absoluteIndex})`,
1159
- stroke: e.value.style.chart.backgroundColor,
1160
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1161
- "stroke-linecap": "round",
1162
- "stroke-linejoin": "round",
1163
- class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": K.value })
1164
- }, null, 10, xs))), 256))
1165
- ])) : b("", !0)
1166
- ], 64))
1167
- ]))), 256)),
1168
- e.value.style.chart.grid.x.showAxis ? (r(), n("line", {
1169
- key: 6,
1170
- x1: u.value.left,
1171
- x2: u.value.right,
1172
- y1: u.value.bottom,
1173
- y2: u.value.bottom,
1174
- stroke: e.value.style.chart.grid.x.axisColor,
1175
- "stroke-width": e.value.style.chart.grid.x.axisThickness,
1176
- "stroke-linecap": "round",
1177
- "stroke-linejoin": "round"
1178
- }, null, 8, ks)) : b("", !0),
1179
- e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (r(), n("line", {
1180
- key: 7,
1181
- x1: u.value.left,
1182
- x2: u.value.left,
1183
- y1: u.value.top,
1184
- y2: u.value.bottom,
1185
- stroke: e.value.style.chart.grid.y.axisColor,
1186
- "stroke-width": e.value.style.chart.grid.y.axisThickness,
1187
- "stroke-linecap": "round",
1188
- "stroke-linejoin": "round"
1189
- }, null, 8, ws)) : b("", !0),
1190
- e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (r(), n("text", {
1191
- key: 8,
1192
- ref_key: "xAxisLabel",
1193
- ref: Ge,
1194
- x: u.value.left + u.value.width / 2,
1195
- y: u.value.chartHeight - 3,
1196
- "font-size": e.value.style.chart.grid.x.axisName.fontSize,
1197
- fill: e.value.style.chart.grid.x.axisName.color,
1198
- "font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
1199
- "text-anchor": "middle"
1200
- }, F(e.value.style.chart.grid.x.axisName.text), 9, Ls)) : b("", !0),
1201
- e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (r(), n("text", {
1202
- key: 9,
1203
- ref_key: "yAxisLabel",
1204
- ref: qe,
1205
- transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize}, ${u.value.top + u.value.height / 2}) rotate(-90)`,
1206
- "font-size": e.value.style.chart.grid.y.axisName.fontSize,
1207
- fill: e.value.style.chart.grid.y.axisName.color,
1208
- "font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
1209
- "text-anchor": "middle"
1210
- }, F(e.value.style.chart.grid.y.axisName.text), 9, Ss)) : b("", !0),
1211
- T.value.dataLabels.show && e.value.orientation === "vertical" ? (r(), n(p, { key: 10 }, [
1212
- (r(!0), n(p, null, k(L.value, (t, s) => (r(), n("g", null, [
1213
- (r(!0), n(p, null, k(t.x, (c, o) => (r(), n(p, null, [
1214
- Yt(t.series[o], t.proportions[o]) ? (r(), n("text", {
1215
- key: 0,
1216
- x: c + m.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
1217
- y: t.y[o] + t.height[o] / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
1218
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
1219
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? f(ya)(t.color) : e.value.style.chart.bars.dataLabels.color,
1220
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1221
- "text-anchor": "middle"
1222
- }, F(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Ft(t.proportions[o] * 100, t, s, o) : Ae(t.series[o], t, s, o, t.signedSeries[o])), 9, zs)) : b("", !0)
1223
- ], 64))), 256))
1224
- ]))), 256)),
1225
- e.value.style.chart.bars.totalValues.show && L.value.length > 1 ? (r(), n("g", {
1226
- key: 0,
1227
- ref_key: "sumTop",
1228
- ref: Aa
1229
- }, [
1230
- (r(!0), n(p, null, k(It.value, (t, s) => (r(), n(p, null, [
1231
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (r(), n("text", {
1232
- key: 0,
1233
- x: u.value.left + m.value * s + m.value / 2,
1234
- y: e.value.style.chart.bars.totalValues.fontSize,
1235
- "text-anchor": "middle",
1236
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
1237
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1238
- fill: e.value.style.chart.bars.totalValues.color
1239
- }, F(Ae(t.value, t, s, t.sign)), 9, Cs)) : b("", !0)
1240
- ], 64))), 256))
1241
- ], 512)) : b("", !0)
1242
- ], 64)) : b("", !0),
1243
- T.value.dataLabels.show && e.value.orientation === "horizontal" ? (r(), n(p, { key: 11 }, [
1244
- (r(!0), n(p, null, k(L.value, (t, s) => (r(), n("g", null, [
1245
- (r(!0), n(p, null, k(t.horizontal_x, (c, o) => (r(), n(p, null, [
1246
- Yt(t.series[o], t.proportions[o]) ? (r(), n("text", {
1247
- key: 0,
1248
- x: c + (t.horizontal_width[o] < 0 ? 1e-4 : t.horizontal_width[o]) / 2,
1249
- y: t.horizontal_y[o] + m.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
1250
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
1251
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? f(ya)(t.color) : e.value.style.chart.bars.dataLabels.color,
1252
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1253
- "text-anchor": "middle"
1254
- }, F(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Ft(t.proportions[o] * 100, t, s, o) : Ae(t.series[o], t, s, o, t.signedSeries[o])), 9, _s)) : b("", !0)
1255
- ], 64))), 256))
1256
- ]))), 256)),
1257
- e.value.style.chart.bars.totalValues.show && L.value.length > 1 ? (r(), n("g", {
1258
- key: 0,
1259
- ref_key: "sumRight",
1260
- ref: pt
1261
- }, [
1262
- (r(!0), n(p, null, k(It.value, (t, s) => (r(), n(p, null, [
1263
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (r(), n("text", {
1264
- key: 0,
1265
- x: u.value.right + e.value.style.chart.bars.totalValues.fontSize / 3,
1266
- y: u.value.top + m.value * s + m.value / 2,
1267
- "text-anchor": "start",
1268
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
1269
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1270
- fill: e.value.style.chart.bars.totalValues.color
1271
- }, F(Ae(t.value, t, s, t.sign)), 9, Ms)) : b("", !0)
1272
- ], 64))), 256))
1273
- ], 512)) : b("", !0)
1274
- ], 64)) : b("", !0),
1275
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "vertical" ? (r(), n("g", {
1276
- key: 12,
1277
- ref_key: "scaleLabels",
1278
- ref: j
1279
- }, [
1280
- (r(!0), n(p, null, k(B.value, (t, s) => (r(), n("line", {
1281
- x1: u.value.left,
1282
- x2: u.value.left - 6,
1283
- y1: t.y,
1284
- y2: t.y,
1285
- stroke: e.value.style.chart.grid.x.axisColor,
1286
- "stroke-width": 1
1287
- }, null, 8, Ts))), 256)),
1288
- (r(!0), n(p, null, k(B.value, (t, s) => (r(), n("text", {
1289
- x: t.x,
1290
- y: t.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1291
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1292
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1293
- fill: e.value.style.chart.grid.y.axisLabels.color,
1294
- "text-anchor": "end"
1295
- }, F(f(Ue)(
1296
- e.value.style.chart.grid.y.axisLabels.formatter,
1297
- t.value,
1298
- f(re)({
1299
- p: e.value.style.chart.bars.dataLabels.prefix,
1300
- v: t.value,
1301
- s: e.value.style.chart.bars.dataLabels.suffix,
1302
- r: e.value.style.chart.grid.y.axisLabels.rounding
1303
- }),
1304
- { datapoint: t }
1305
- )), 9, $s))), 256))
1306
- ], 512)) : b("", !0),
1307
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "horizontal" ? (r(), n("g", {
1308
- key: 13,
1309
- ref_key: "scaleLabels",
1310
- ref: j
1311
- }, [
1312
- (r(!0), n(p, null, k(B.value, (t, s) => (r(), n("line", {
1313
- x1: t.horizontal_x,
1314
- x2: t.horizontal_x,
1315
- y1: u.value.bottom,
1316
- y2: u.value.bottom + 6,
1317
- stroke: e.value.style.chart.grid.x.axisColor,
1318
- "stroke-width": 1,
1319
- "stroke-linecap": "round"
1320
- }, null, 8, As))), 256)),
1321
- (r(!0), n(p, null, k(B.value, (t, s) => (r(), n("text", {
1322
- class: "vue-data-ui-time-label",
1323
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1324
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1325
- fill: e.value.style.chart.grid.y.axisLabels.color,
1326
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1327
- transform: `translate(${t.horizontal_x}, ${u.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})`
1328
- }, F(f(Ue)(
1329
- e.value.style.chart.grid.y.axisLabels.formatter,
1330
- t.value,
1331
- f(re)({
1332
- p: e.value.style.chart.bars.dataLabels.prefix,
1333
- v: t.value,
1334
- s: e.value.style.chart.bars.dataLabels.suffix,
1335
- r: e.value.style.chart.grid.y.axisLabels.rounding
1336
- }),
1337
- { datapoint: t }
1338
- )), 9, Ps))), 256))
1339
- ], 512)) : b("", !0),
1340
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "vertical" ? (r(), n("g", {
1341
- key: 14,
1342
- ref_key: "timeLabelsEls",
1343
- ref: ee
1344
- }, [
1345
- a.$slots["time-label"] ? (r(), n("g", Ns, [
1346
- (r(!0), n(p, null, k(Nt.value, (t, s) => (r(), n("g", null, [
1347
- C(a.$slots, "time-label", Se({ ref_for: !0 }, {
1348
- x: u.value.left + m.value * s + m.value / 2,
1349
- y: u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
1350
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1351
- fill: e.value.style.chart.grid.x.timeLabels.color,
1352
- transform: `translate(${u.value.left + m.value * s + m.value / 2}, ${u.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})`,
1353
- absoluteIndex: t.absoluteIndex,
1354
- content: t.text,
1355
- textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1356
- show: !0
1357
- }), void 0, !0)
1358
- ]))), 256))
1359
- ])) : (r(), n("g", Rs, [
1360
- (r(!0), n(p, null, k(Nt.value, (t, s) => (r(), n("g", null, [
1361
- String(t.text).includes(`
1362
- `) ? (r(), n("text", {
1363
- key: s + "-multi",
1364
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1365
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1366
- fill: e.value.style.chart.grid.x.timeLabels.color,
1367
- transform: `
1368
- translate(
1369
- ${u.value.left + m.value * s + m.value / 2},
1370
- ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}
1371
- ),
1372
- rotate(${e.value.style.chart.grid.x.timeLabels.rotation})
1373
- `,
1374
- style: { cursor: "pointer" },
1375
- innerHTML: f(Nl)({
1376
- content: String(t.text),
1377
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1378
- fill: e.value.style.chart.grid.x.timeLabels.color,
1379
- x: 0,
1380
- y: 0
1381
- }),
1382
- onClick: () => Re(t, s)
1383
- }, null, 8, Is)) : (r(), n("text", {
1384
- class: "vue-data-ui-time-label",
1385
- key: s,
1386
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1387
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1388
- "font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
1389
- fill: e.value.style.chart.grid.x.timeLabels.color,
1390
- transform: `translate(${u.value.left + m.value * s + m.value / 2}, ${u.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})`,
1391
- style: { cursor: "pointer" },
1392
- onClick: () => Re(t, s)
1393
- }, F(t.text), 9, Os))
1394
- ]))), 256))
1395
- ]))
1396
- ], 512)) : b("", !0),
1397
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "horizontal" ? (r(), n("g", {
1398
- key: 15,
1399
- ref_key: "timeLabelsEls",
1400
- ref: ee
1401
- }, [
1402
- a.$slots["time-label"] ? (r(), n("g", Fs, [
1403
- (r(!0), n(p, null, k(R.value, (t, s) => (r(), n("g", null, [
1404
- C(a.$slots, "time-label", Se({ ref_for: !0 }, {
1405
- x: u.value.left - 8,
1406
- y: u.value.top + m.value * s + m.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1407
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1408
- fill: e.value.style.chart.grid.x.timeLabels.color,
1409
- transform: null,
1410
- absoluteIndex: t.absoluteIndex,
1411
- content: t.text,
1412
- textAnchor: "end",
1413
- show: !0
1414
- }), void 0, !0)
1415
- ]))), 256))
1416
- ])) : (r(), n("g", Ds, [
1417
- (r(!0), n(p, null, k(R.value, (t, s) => (r(), n("g", null, [
1418
- String(t.text).includes(`
1419
- `) ? (r(), n("text", {
1420
- key: 1,
1421
- "text-anchor": "end",
1422
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1423
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1424
- fill: e.value.style.chart.grid.y.axisLabels.color,
1425
- x: u.value.left - 8,
1426
- y: u.value.top + m.value * s + m.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1427
- style: { cursor: "pointer" },
1428
- onClick: () => Re(t, s),
1429
- innerHTML: f(Rl)({
1430
- content: String(t.text),
1431
- fontSize: e.value.style.chart.grid.y.axisLabels.fontSize,
1432
- fill: e.value.style.chart.grid.y.axisLabels.color,
1433
- x: u.value.left - 8,
1434
- y: 0
1435
- })
1436
- }, null, 8, Vs)) : (r(), n("text", {
1437
- key: 0,
1438
- "text-anchor": "end",
1439
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1440
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1441
- fill: e.value.style.chart.grid.y.axisLabels.color,
1442
- x: u.value.left - 8,
1443
- y: u.value.top + m.value * s + m.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1444
- style: {
1445
- cursor: "pointer"
1446
- },
1447
- onClick: () => Re(t, s)
1448
- }, F(t.text), 9, Es))
1449
- ]))), 256))
1450
- ]))
1451
- ], 512)) : b("", !0),
1452
- T.value.showTooltip && e.value.orientation === "vertical" ? (r(!0), n(p, { key: 16 }, k(v.value.end - v.value.start, (t, s) => (r(), n("rect", {
1453
- x: u.value.left + s * m.value,
1454
- y: u.value.top,
1455
- width: m.value,
1456
- height: u.value.height < 0 ? 0 : u.value.height,
1457
- onClick: () => Dt(s),
1458
- onMouseenter: () => Vt(s),
1459
- onMouseleave: () => Et(s),
1460
- fill: s === U.value || s === Je.value ? e.value.style.chart.highlighter.color : "transparent",
1461
- style: ae({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1462
- }, null, 44, Us))), 256)) : b("", !0),
1463
- T.value.showTooltip && e.value.orientation === "horizontal" ? (r(!0), n(p, { key: 17 }, k(v.value.end - v.value.start, (t, s) => (r(), n("rect", {
1464
- x: u.value.left,
1465
- y: u.value.top + s * m.value,
1466
- width: u.value.width < 0 ? 0 : u.value.width,
1467
- height: m.value,
1468
- onClick: () => Dt(s),
1469
- onMouseenter: () => Vt(s),
1470
- onMouseleave: () => Et(s),
1471
- fill: s === U.value || s === Je.value ? e.value.style.chart.highlighter.color : "transparent",
1472
- style: ae({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1473
- }, null, 44, Bs))), 256)) : b("", !0),
1474
- $t.value ? (r(), n("rect", Se({ key: 18 }, Da.value, {
1475
- "data-start": v.value.start,
1476
- "data-end": v.value.end
1477
- }), null, 16, Hs)) : b("", !0),
1478
- C(a.$slots, "svg", {
1479
- svg: {
1480
- drawingArea: u.value,
1481
- data: L.value
1482
- }
1483
- }, void 0, !0)
1484
- ], 14, ls)),
1485
- a.$slots.watermark ? (r(), n("div", Xs, [
1486
- C(a.$slots, "watermark", le(se({ isPrinting: f(St) || f(zt) })), void 0, !0)
1487
- ])) : b("", !0),
1488
- e.value.style.chart.zoom.show && A.value > 6 && he.value && Zt.value ? (r(), Z(jl, {
1489
- key: 4,
1490
- ref_key: "chartSlicer",
1491
- ref: de,
1492
- allMinimaps: Ua.value,
1493
- background: e.value.style.chart.zoom.color,
1494
- borderColor: e.value.style.chart.backgroundColor,
1495
- customFormat: e.value.style.chart.zoom.customFormat,
1496
- cutNullValues: !1,
1497
- enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
1498
- enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
1499
- end: v.value.end,
1500
- focusOnDrag: e.value.style.chart.zoom.focusOnDrag,
1501
- focusRangeRatio: e.value.style.chart.zoom.focusRangeRatio,
1502
- fontSize: e.value.style.chart.zoom.fontSize,
1503
- immediate: !e.value.style.chart.zoom.preview.enable,
1504
- inputColor: e.value.style.chart.zoom.color,
1505
- isPreview: $t.value,
1506
- labelLeft: e.value.style.chart.grid.x.timeLabels.values[v.value.start] ? R.value[0].text : "",
1507
- labelRight: e.value.style.chart.grid.x.timeLabels.values[v.value.end - 1] ? R.value.at(-1).text : "",
1508
- max: Math.max(...Be.dataset.map((t) => t.series.length)),
1509
- min: 0,
1510
- minimap: te.value,
1511
- minimapCompact: e.value.style.chart.zoom.minimap.compact,
1512
- minimapFrameColor: e.value.style.chart.zoom.minimap.frameColor,
1513
- minimapIndicatorColor: e.value.style.chart.zoom.minimap.indicatorColor,
1514
- minimapMerged: !1,
1515
- minimapSelectedColor: e.value.style.chart.zoom.minimap.selectedColor,
1516
- minimapSelectedColorOpacity: e.value.style.chart.zoom.minimap.selectedColorOpacity,
1517
- minimapSelectedIndex: U.value,
1518
- minimapSelectionRadius: 1,
1519
- preciseLabels: Ot.value.length ? Ot.value : pe.value,
1520
- refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(...Be.dataset.map((t) => t.series.length)),
1521
- refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
1522
- selectColor: e.value.style.chart.zoom.highlightColor,
1523
- selectedSeries: Xa.value,
1524
- smoothMinimap: !1,
1525
- start: v.value.start,
1526
- textColor: e.value.style.chart.color,
1527
- timeLabels: pe.value,
1528
- usePreciseLabels: e.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !e.value.style.chart.zoom.useDefaultFormat,
1529
- valueEnd: v.value.end,
1530
- valueStart: v.value.start,
1531
- verticalHandles: e.value.style.chart.zoom.minimap.verticalHandles,
1532
- "onUpdate:end": sl,
1533
- "onUpdate:start": ll,
1534
- onTrapMouse: Ea,
1535
- onReset: Pt,
1536
- onFutureEnd: l[0] || (l[0] = (t) => At("end", t)),
1537
- onFutureStart: l[1] || (l[1] = (t) => At("start", t))
1538
- }, {
1539
- "reset-action": M(({ reset: t }) => [
1540
- C(a.$slots, "reset-action", le(se({ reset: t })), void 0, !0)
1541
- ]),
1542
- slotMap: M(({ width: t, height: s, unitW: c }) => [
1543
- (r(!0), n(p, null, k(L.value, (o) => (r(), n("g", {
1544
- key: o.id
1545
- }, [
1546
- (r(!0), n(p, null, k(o.xMinimap({ left: 0, unitW: c }), (w, _) => (r(), n("rect", {
1547
- key: _,
1548
- x: _ === 0 ? w - c * (e.value.style.chart.bars.gapRatio / 4) : w - c / 2,
1549
- y: Math.max(0, Math.min(s, o.yMinimap({ minimapH: s })[_])),
1550
- height: o.heightMinimap({ minimapH: s })[_],
1551
- width: [0, A.value - 1].includes(_) ? c * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 : c * (1 - e.value.style.chart.bars.gapRatio / 2),
1552
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${o.id})` : o.color,
1553
- stroke: e.value.style.chart.backgroundColor,
1554
- "stroke-width": 0.5,
1555
- rx: "0",
1556
- "stroke-linecap": "round",
1557
- "stroke-linejoin": "round",
1558
- style: ae({
1559
- opacity: _ >= O.value.start && _ <= O.value.end ? 1 : 0.62
1560
- })
1561
- }, null, 12, Ws))), 128))
1562
- ]))), 128))
1563
- ]),
1564
- _: 3
1565
- }, 8, ["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"])) : b("", !0),
1566
- Le(f(pa), {
1567
- show: T.value.showTooltip && He.value,
1568
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1569
- color: e.value.style.chart.tooltip.color,
1570
- fontSize: e.value.style.chart.tooltip.fontSize,
1571
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1572
- borderColor: e.value.style.chart.tooltip.borderColor,
1573
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1574
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1575
- position: e.value.style.chart.tooltip.position,
1576
- offsetY: e.value.style.chart.tooltip.offsetY,
1577
- parent: X.value,
1578
- content: We.value,
1579
- isFullscreen: ye.value,
1580
- isCustom: f(ga)(e.value.style.chart.tooltip.customFormat),
1581
- smooth: e.value.style.chart.tooltip.smooth,
1582
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1583
- smoothForce: e.value.style.chart.tooltip.smoothForce,
1584
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
1585
- }, {
1586
- "tooltip-before": M(() => [
1587
- C(a.$slots, "tooltip-before", le(se({ ...Xe.value })), void 0, !0)
1588
- ]),
1589
- "tooltip-after": M(() => [
1590
- C(a.$slots, "tooltip-after", le(se({ ...Xe.value })), void 0, !0)
1591
- ]),
1592
- _: 3
1593
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1594
- Q("div", {
1595
- id: `legend-bottom-${D.value}`
1596
- }, null, 8, Ys),
1597
- ft.value ? (r(), Z(wl, {
1598
- key: 5,
1599
- to: e.value.style.chart.legend.position === "top" ? `#legend-top-${D.value}` : `#legend-bottom-${D.value}`
1600
- }, [
1601
- Q("div", {
1602
- ref_key: "chartLegend",
1603
- ref: gt
1604
- }, [
1605
- e.value.style.chart.legend.show ? (r(), Z(Kl, {
1606
- key: 0,
1607
- legendSet: rt.value,
1608
- config: Ja.value,
1609
- onClickMarker: l[2] || (l[2] = ({ legend: t }) => t.segregate())
1610
- }, vt({
1611
- item: M(({ legend: t }) => [
1612
- f(be) ? b("", !0) : (r(), n("div", {
1613
- key: 0,
1614
- onClick: (s) => t.segregate(),
1615
- style: ae(`opacity:${N.value.includes(t.id) ? 0.5 : 1}`)
1616
- }, F(t.name), 13, Gs))
1617
- ]),
1618
- _: 2
1619
- }, [
1620
- a.$slots.pattern ? {
1621
- name: "legend-pattern",
1622
- fn: M(({ legend: t, index: s }) => [
1623
- Le(Zl, {
1624
- shape: t.shape,
1625
- radius: 30,
1626
- stroke: "none",
1627
- plot: { x: 30, y: 30 },
1628
- fill: `url(#pattern_${D.value}_${s})`
1629
- }, null, 8, ["shape", "fill"])
1630
- ]),
1631
- key: "0"
1632
- } : void 0
1633
- ]), 1032, ["legendSet", "config"])) : C(a.$slots, "legend", {
1634
- key: 1,
1635
- legend: rt.value
1636
- }, void 0, !0)
1637
- ], 512)
1638
- ], 8, ["to"])) : b("", !0),
1639
- a.$slots.source ? (r(), n("div", {
1640
- key: 6,
1641
- ref_key: "source",
1642
- ref: bt,
1643
- dir: "auto"
1644
- }, [
1645
- C(a.$slots, "source", {}, void 0, !0)
1646
- ], 512)) : b("", !0),
1647
- he.value && e.value.userOptions.buttons.table ? (r(), Z(Ll(xe.value.component), Se({ key: 7 }, xe.value.props, {
1648
- ref_key: "tableUnit",
1649
- ref: ge,
1650
- onClose: Gt
1651
- }), vt({
1652
- content: M(() => [
1653
- Le(f(wa), {
1654
- colNames: Pe.value.colNames,
1655
- head: Pe.value.head,
1656
- body: Pe.value.body,
1657
- config: Pe.value.config,
1658
- title: e.value.table.useDialog ? "" : xe.value.title,
1659
- withCloseButton: !e.value.table.useDialog,
1660
- onClose: Gt
1661
- }, {
1662
- th: M(({ th: t }) => [
1663
- Q("div", { innerHTML: t }, null, 8, qs)
1664
- ]),
1665
- td: M(({ td: t }) => [
1666
- na(F(isNaN(Number(t)) ? t : f(re)({
1667
- p: e.value.style.chart.bars.dataLabels.prefix,
1668
- v: t,
1669
- s: e.value.style.chart.bars.dataLabels.suffix,
1670
- r: e.value.table.td.roundingValue
1671
- })), 1)
1672
- ]),
1673
- _: 1
1674
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"])
1675
- ]),
1676
- _: 2
1677
- }, [
1678
- e.value.table.useDialog ? {
1679
- name: "title",
1680
- fn: M(() => [
1681
- na(F(xe.value.title), 1)
1682
- ]),
1683
- key: "0"
1684
- } : void 0,
1685
- e.value.table.useDialog ? {
1686
- name: "actions",
1687
- fn: M(() => [
1688
- Q("button", {
1689
- tabindex: "0",
1690
- class: "vue-ui-user-options-button",
1691
- onClick: l[3] || (l[3] = (t) => st(e.value.userOptions.callbacks.csv))
1692
- }, [
1693
- Le(f(xa), {
1694
- name: "excel",
1695
- stroke: xe.value.props.color
1696
- }, null, 8, ["stroke"])
1697
- ])
1698
- ]),
1699
- key: "1"
1700
- } : void 0
1701
- ]), 1040)) : b("", !0),
1702
- f(be) ? (r(), Z(Ul, { key: 8 })) : b("", !0)
1703
- ], 46, ts));
1704
- }
1705
- }, gr = /* @__PURE__ */ es(Js, [["__scopeId", "data-v-f39bd21b"]]);
1706
- export {
1707
- gr as default
1708
- };