vue-data-ui 3.5.0 → 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 (144) hide show
  1. package/README.md +26 -0
  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-Cyx_s25h.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-DxgRqCAo.js → vue-data-ui-B_RxfmEm.js} +63 -63
  74. package/dist/vue-data-ui.js +64 -64
  75. package/dist/{vue-ui-3d-bar-DmNJp8SY.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-CPAP3sNY.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-Ce6uvCQJ.js → vue-ui-bullet-BWEBeYV5.js} +190 -170
  80. package/dist/{vue-ui-candlestick-DewevWV_.js → vue-ui-candlestick-BoLzL0g1.js} +201 -181
  81. package/dist/{vue-ui-carousel-table-Dv1CDfE5.js → vue-ui-carousel-table-Bi6wvUUU.js} +2 -2
  82. package/dist/{vue-ui-chestnut-D9sdFZ4E.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-Be74QB_0.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-BRGFcgxS.js → vue-ui-donut-CxZcJFTo.js} +462 -442
  89. package/dist/{vue-ui-donut-evolution-DJ0C-7jH.js → vue-ui-donut-evolution-BVYL-BUJ.js} +293 -273
  90. package/dist/{vue-ui-dumbbell-iQJ0BUhm.js → vue-ui-dumbbell-QxZn86A3.js} +210 -190
  91. package/dist/{vue-ui-flow-CTYFoib3.js → vue-ui-flow-DEI5LRch.js} +339 -319
  92. package/dist/{vue-ui-funnel-CG55Xcdy.js → vue-ui-funnel-B_A5orFg.js} +218 -198
  93. package/dist/{vue-ui-galaxy-BQrxjKZJ.js → vue-ui-galaxy-CUoDRr-O.js} +201 -181
  94. package/dist/{vue-ui-gauge-Tc-0NI0Y.js → vue-ui-gauge-46tSRZN5.js} +311 -291
  95. package/dist/{vue-ui-gizmo-P8h-gnLd.js → vue-ui-gizmo-BOgbsXao.js} +2 -2
  96. package/dist/{vue-ui-heatmap-BZimPzsL.js → vue-ui-heatmap-DKKjl1A2.js} +303 -283
  97. package/dist/{vue-ui-history-plot-BVzbuqYY.js → vue-ui-history-plot-C6p_aThr.js} +229 -209
  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-BALqwB8c.js → vue-ui-molecule-L90GnHee.js} +156 -136
  101. package/dist/{vue-ui-mood-radar-QJ5nlZby.js → vue-ui-mood-radar-Dhigm5rw.js} +266 -246
  102. package/dist/{vue-ui-nested-donuts-CmUabkkQ.js → vue-ui-nested-donuts-D0MCLs5n.js} +506 -486
  103. package/dist/{vue-ui-onion-DAOCf3f8.js → vue-ui-onion-B7yPJ3gL.js} +220 -200
  104. package/dist/{vue-ui-parallel-coordinate-plot-D8jTuFjq.js → vue-ui-parallel-coordinate-plot-DY21ivNe.js} +235 -215
  105. package/dist/{vue-ui-quadrant-CO52mSRY.js → vue-ui-quadrant-b0vMRaq-.js} +463 -443
  106. package/dist/{vue-ui-quick-chart-DEaVSldE.js → vue-ui-quick-chart-VK2EN7sh.js} +288 -268
  107. package/dist/{vue-ui-radar-C5V4hhbW.js → vue-ui-radar-B5Vkoz9M.js} +331 -311
  108. package/dist/{vue-ui-rating-CiMoFM_c.js → vue-ui-rating-BH4DW1ZY.js} +1 -1
  109. package/dist/{vue-ui-relation-circle-CbMM0Jka.js → vue-ui-relation-circle-XHbE-ZUX.js} +228 -208
  110. package/dist/{vue-ui-ridgeline-CXCIRDq6.js → vue-ui-ridgeline-CAMNq-p_.js} +242 -222
  111. package/dist/{vue-ui-rings-BpUcyqo7.js → vue-ui-rings-ImGOqm_J.js} +189 -169
  112. package/dist/{vue-ui-scatter--Dxe-hfO.js → vue-ui-scatter-CterNJYe.js} +275 -255
  113. package/dist/{vue-ui-skeleton-BWq-VDzg.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-T4J_YOa_.js → vue-ui-spark-trend-N1AsNQJA.js} +2 -2
  116. package/dist/{vue-ui-sparkbar-DnKP55Vu.js → vue-ui-sparkbar-Bvsi5DTT.js} +2 -2
  117. package/dist/{vue-ui-sparkgauge-BDQLP-zi.js → vue-ui-sparkgauge-DyJmWCWT.js} +2 -2
  118. package/dist/{vue-ui-sparkhistogram-Dm7QXrA-.js → vue-ui-sparkhistogram-5eKrkmSb.js} +143 -140
  119. package/dist/{vue-ui-sparkline-tXGDLHRy.js → vue-ui-sparkline-ChKAzlVq.js} +2 -2
  120. package/dist/{vue-ui-sparkstackbar-M53Nt07M.js → vue-ui-sparkstackbar-BXNy6nuw.js} +2 -2
  121. package/dist/vue-ui-stackbar-1IwvUYBO.js +1827 -0
  122. package/dist/{vue-ui-strip-plot-BX9i3wMn.js → vue-ui-strip-plot-B1wGxP8-.js} +245 -225
  123. package/dist/{vue-ui-table-7r02N9R9.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-DZaAh10E.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-Ds-MJoW2.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-BEvl8hiw.js → vue-ui-treemap-DPE8SY0_.js} +453 -433
  130. package/dist/{vue-ui-vertical-bar-D8dtM8sw.js → vue-ui-vertical-bar-ZU1GCbX0.js} +323 -303
  131. package/dist/{vue-ui-waffle-B3q-2SCR.js → vue-ui-waffle-z7nuSuSV.js} +219 -199
  132. package/dist/vue-ui-wheel-DLRoRjeM.js +663 -0
  133. package/dist/{vue-ui-word-cloud-ChT7uLbN.js → vue-ui-word-cloud-D2r5E3pP.js} +248 -228
  134. package/dist/{vue-ui-world-CdP4g_3_.js → vue-ui-world-goXYnTyM.js} +287 -267
  135. package/dist/{vue-ui-xy-B68qQ-gX.js → vue-ui-xy-NDDbNbds.js} +389 -369
  136. package/dist/{vue-ui-xy-canvas-DDngEA1s.js → vue-ui-xy-canvas-2a6NlQe3.js} +4 -4
  137. package/package.json +4 -4
  138. package/dist/PenAndPaper-DSvu9dwa.js +0 -373
  139. package/dist/vue-ui-chord-BG4dxKNA.js +0 -1133
  140. package/dist/vue-ui-dashboard-C4BLwHey.js +0 -412
  141. package/dist/vue-ui-stackbar-CkBOjryQ.js +0 -1724
  142. package/dist/vue-ui-thermometer-CFPt3MOv.js +0 -564
  143. package/dist/vue-ui-tiremarks-2eIQ6vxu.js +0 -430
  144. package/dist/vue-ui-wheel-BpirIgAG.js +0 -643
@@ -1,1724 +0,0 @@
1
- import { defineAsyncComponent as J, useSlots as wl, computed as g, ref as d, onMounted as oa, toRefs as Ll, watch as we, shallowRef as na, onBeforeUnmount as vt, watchEffect as ia, nextTick as Sl, 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 m, createSlots as ht, withCtx as M, normalizeProps as le, guardReactiveProps as se, Fragment as p, renderList as k, mergeProps as Se, toDisplayString as F, Teleport as zl, resolveDynamicComponent as Cl, createTextVNode as ua } from "vue";
2
- import { u as _l, a as ca } from "./useNestedProp-BjZe1Y85.js";
3
- import { c as va, t as Ml, b as Tl, p as Ve, O as ce, e as $l, o as ha, f as da, g as Al, h as Pl, aj as ze, n as ya, m as ga, v as Nl, X as Rl, S as Ol, r as Ee, J as ba, a as Ue, d as re, M as Il, $ as Fl, G as fa, P as Dl, Q as Vl, H as El } from "./lib-C_mNZmhD.js";
4
- import { t as dt, u as Ul } from "./useResponsive-DfdjqQps.js";
5
- import { u as Bl } from "./usePrinter-DTzqpYKF.js";
6
- import { u as Hl, B as Xl } from "./BaseScanner-BgWxam9d.js";
7
- import { u as ma, a as Wl, l as Yl } from "./useTimeLabels-BGFjWgrv.js";
8
- import { u as Gl } from "./useSvgExport-DrjCWun4.js";
9
- import { u as ql } from "./useUserOptionState-BIvW1Kz7.js";
10
- import { u as Jl } from "./useChartAccessibility-9icAAmYg.js";
11
- import { u as Zl } from "./useTimeLabelCollider-CIsgDrl9.js";
12
- import Ql from "./img-BecE5qXd.js";
13
- import Kl from "./Title-l36lOBMx.js";
14
- import { _ as jl } from "./Shape-CNXKB8O0.js";
15
- import { t as es } from "./themes-AUNCOb2G.js";
16
- import ts from "./Legend-G6GMcdAc.js";
17
- import { S as as } from "./SlicerPreview-ij72TAs6.js";
18
- import { _ as ls } from "./_plugin-vue_export-helper-CHgC5LLL.js";
19
- const ss = ["id"], rs = ["id"], os = ["xmlns", "viewBox"], ns = ["x", "y", "width", "height"], is = { key: 1 }, us = ["id"], cs = ["stop-color"], vs = ["stop-color"], hs = ["stop-color"], ds = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ys = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], gs = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], bs = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], fs = { key: 0 }, ms = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], ps = { key: 0 }, xs = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], ks = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], ws = { key: 0 }, Ls = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], Ss = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], zs = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Cs = ["x", "y", "font-size", "fill", "font-weight"], _s = ["transform", "font-size", "fill", "font-weight"], Ms = ["x", "y", "font-size", "fill", "font-weight"], Ts = ["x", "y", "font-size", "font-weight", "fill"], $s = ["x", "y", "font-size", "fill", "font-weight"], As = ["x", "y", "font-size", "font-weight", "fill"], Ps = ["x1", "x2", "y1", "y2", "stroke"], Ns = ["x", "y", "font-size", "font-weight", "fill"], Rs = ["x1", "x2", "y1", "y2", "stroke"], Os = ["font-size", "font-weight", "fill", "text-anchor", "transform"], Is = { key: 0 }, Fs = { key: 1 }, Ds = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], Vs = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], Es = { key: 0 }, Us = { key: 1 }, Bs = ["font-size", "font-weight", "fill", "x", "y", "onClick"], Hs = ["font-size", "font-weight", "fill", "x", "y", "onClick", "innerHTML"], Xs = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], Ws = ["x", "y", "width", "height", "onClick", "onMouseenter", "onMouseleave", "fill"], Ys = ["data-start", "data-end"], Gs = {
20
- key: 3,
21
- class: "vue-data-ui-watermark"
22
- }, qs = ["x", "y", "height", "width", "fill", "stroke"], Js = ["id"], Zs = ["onClick"], Qs = ["innerHTML"], Ks = {
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: pa, emit: xa }) {
44
- const ka = J(() => import("./Tooltip-oWCO1HKy.js")), wa = J(() => import("./BaseIcon-BmMbm4d0.js")), La = J(() => import("./vue-ui-accordion-CZ0thhxa.js")), Sa = J(() => import("./DataTable-BT7VF2ua.js")), za = J(() => import("./PenAndPaper-DSvu9dwa.js")), Ca = J(() => import("./UserOptions-CGnQt6Fd.js")), _a = J(() => import("./PackageVersion-Cyx_s25h.js")), Ma = J(() => import("./BaseDraggableDialog-ymf2sfB8.js")), { vue_ui_stackbar: Ta } = _l(), $a = wl(), x = Be, ve = xa, he = g({
45
- get() {
46
- return !!x.dataset && x.dataset.length;
47
- },
48
- set(a) {
49
- return a;
50
- }
51
- }), W = d(null), D = d(va()), He = d(!1), Xe = d(null), We = d(""), A = d([]), yt = d(0), gt = d(null), bt = d(null), de = d(null), ft = d(null), ye = d(!1), B = d(null), K = d(!1), mt = d(0), Aa = d(0), Pa = d(0), pt = d(!1), ge = d(null), Ye = d(null), Ge = d(null), qe = d(null), j = d(null), ee = d(null), Na = d(null), xt = d(null), Je = d(null);
52
- oa(() => {
53
- pt.value = !0, tt();
54
- });
55
- const e = d(je()), { loading: be, FINAL_DATASET: Ze, manualLoading: Ce } = Hl({
56
- ...Ll(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: Ml({
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: kt, keepUserOptionState: wt } = ql({ config: e.value }), { svgRef: Ke } = Jl({ config: e.value.style.chart.title });
126
- function Ra() {
127
- kt(!0);
128
- }
129
- function Oa() {
130
- kt(!1), ve("selectX", { seriesIndex: null, datapoint: null }), B.value = null;
131
- }
132
- function je() {
133
- const a = ca({
134
- userConfig: x.config,
135
- defaultConfig: Ta
136
- });
137
- let l = {};
138
- return a.theme ? l = {
139
- ...ca({
140
- userConfig: es.vue_ui_stackbar[a.theme] || x.config,
141
- defaultConfig: a
142
- }),
143
- customPalette: Tl[a.theme] || Ve
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 Lt = g(() => e.value.style.chart.bars.dataLabels.hideUnderValue !== null), St = 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, Aa.value += 1, Pa.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), Nt();
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: zt, isImaging: Ct, generatePdf: _t, generateImage: Mt } = Bl({
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
- }), Ia = g(() => $l(e.value.customPalette)), G = na(null), ne = na(null), Tt = d(null);
182
- oa(() => {
183
- tt();
184
- });
185
- const et = g(() => !!e.value.debug);
186
- function tt() {
187
- if (ha(x.dataset) ? (da({
188
- componentName: "VueUiStackbar",
189
- type: "dataset",
190
- debug: et.value
191
- }), Ce.value = !0) : x.dataset.forEach((a, l) => {
192
- Al({
193
- datasetObject: a,
194
- requiredAttributes: ["name", "series"]
195
- }).forEach((t) => {
196
- he.value = !1, da({
197
- componentName: "VueUiStackbar",
198
- type: "datasetSerieAttribute",
199
- property: t,
200
- index: l,
201
- debug: et.value
202
- }), Ce.value = !0;
203
- });
204
- }), ha(x.dataset) || (Ce.value = e.value.loading), setTimeout(() => {
205
- K.value = !0;
206
- }, 10), e.value.responsive) {
207
- const a = dt(() => {
208
- K.value = !1;
209
- const { width: l, height: t } = Ul({
210
- chart: W.value,
211
- title: e.value.style.chart.title.text ? gt.value : null,
212
- legend: e.value.style.chart.legend.show ? bt.value : null,
213
- slicer: e.value.style.chart.zoom.show && P.value > 6 ? de.value.$el : null,
214
- source: ft.value
215
- });
216
- requestAnimationFrame(() => {
217
- oe.value.width = l, oe.value.height = t - 12, clearTimeout(Tt.value), Tt.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 = W.value.parentNode, G.value.observe(ne.value);
223
- }
224
- Oe();
225
- }
226
- vt(() => {
227
- G.value && (ne.value && G.value.unobserve(ne.value), G.value.disconnect());
228
- });
229
- function Fa() {
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), Da = dt((a) => {
242
- _e.value = a;
243
- }, 100);
244
- ia((a) => {
245
- const l = e.value.orientation === "vertical" ? ee.value : j.value;
246
- if (!l) return;
247
- const t = new ResizeObserver((s) => {
248
- Da(s[0].contentRect.height);
249
- });
250
- t.observe(l), a(() => t.disconnect());
251
- });
252
- const Va = dt((a) => {
253
- Me.value = a + e.value.style.chart.bars.totalValues.fontSize;
254
- }, 100);
255
- ia((a) => {
256
- if (e.value.orientation === "vertical") return;
257
- const l = xt.value;
258
- if (!l) return;
259
- const t = new ResizeObserver((s) => {
260
- Va(s[0].contentRect.width);
261
- });
262
- t.observe(l), a(() => t.disconnect());
263
- }), vt(() => {
264
- _e.value = 0, Me.value = 0;
265
- });
266
- const $t = 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 = Fa());
275
- const o = e.value.style.chart.padding.top + s, w = l - l * t - Me.value, _ = a - e.value.style.chart.padding.bottom - $t.value - s, I = e.value.style.chart.padding.left + c, X = l - I - l * t - Me.value, V = a - o - e.value.style.chart.padding.bottom - $t.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, X),
284
- height: Math.max(0, V)
285
- };
286
- }), Ea = 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)), X = Math.max(0, I - _), V = {
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: X * $,
307
- ...V
308
- };
309
- } else {
310
- const $ = t / w;
311
- return {
312
- x: a + _ * $,
313
- y: l,
314
- width: X * $,
315
- height: s,
316
- ...V
317
- };
318
- }
319
- }), E = g(() => Ze.value.map((a, l) => {
320
- const t = Pl(a.color) || Ia.value[l] || Ve[l] || Ve[l % Ve.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: va(),
329
- color: t
330
- };
331
- })), P = g(() => Math.max(...E.value.filter((a) => !A.value.includes(a.id)).map((a) => a.series.length)));
332
- function Ua(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)) }), At = g(() => e.value.style.chart.zoom.preview.enable && (O.value.start !== v.value.start || O.value.end !== v.value.end));
339
- function Pt(a, l) {
340
- O.value[a] = l;
341
- }
342
- function Te() {
343
- const a = P.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 fe = d(null);
348
- function Ba() {
349
- return new Promise((a) => requestAnimationFrame(
350
- () => requestAnimationFrame(() => a())
351
- ));
352
- }
353
- vt(() => {
354
- fe.value && cancelAnimationFrame(fe.value);
355
- });
356
- async function Nt() {
357
- Oe(), await Sl(), fe.value && cancelAnimationFrame(fe.value), fe.value = requestAnimationFrame(async () => {
358
- await Ba(), Oe();
359
- });
360
- }
361
- const f = 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
- }), me = g(() => ze(E.value.filter((a) => !A.value.includes(a.id))).slice(v.value.start, v.value.end)), te = g(() => e.value.style.chart.zoom.minimap.show ? ze(E.value.filter((a) => !A.value.includes(a.id))) : []), Ha = g(() => e.value.style.chart.zoom.minimap.show ? [{
365
- name: "",
366
- series: te.value,
367
- color: "#000000",
368
- isVisible: !0
369
- }] : []), Xa = g(() => ze(E.value.filter((a) => !A.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 = E.value.filter((l) => !A.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
- }), H = 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) ? ya(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks) : ga(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(() => ma({
396
- values: e.value.style.chart.grid.x.timeLabels.values,
397
- maxDatapoints: P.value,
398
- formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
399
- start: v.value.start,
400
- end: v.value.end
401
- })), pe = g(() => ma({
402
- values: e.value.style.chart.grid.x.timeLabels.values,
403
- maxDatapoints: P.value,
404
- formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
405
- start: 0,
406
- end: P.value
407
- })), Wa = 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
- }), Rt = g(() => {
411
- const a = e.value.style.chart.grid.x.timeLabels, l = R.value || [], t = pe.value || [], s = v.value.start ?? 0, c = B.value, o = P.value, w = l.map((I) => I?.text ?? ""), _ = t.map((I) => I?.text ?? "");
412
- return Nl(
413
- !!a.showOnlyFirstAndLast,
414
- !!a.showOnlyAtModulo,
415
- Math.max(1, Wa.value || 1),
416
- w,
417
- _,
418
- s,
419
- c,
420
- o
421
- );
422
- }), Ot = g(() => {
423
- const a = e.value.style.chart.grid.x.timeLabels.datetimeFormatter, l = Wl({
424
- useUTC: a.useUTC,
425
- locale: Yl[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
- }), It = g(() => (e.value.style.chart.grid.x.timeLabels.values || []).map((l, t) => ({
433
- text: Ot.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: Ot.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(P.value).fill(0), l = Array(P.value).fill(0), t = Array(P.value).fill(0), s = Array(P.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) ? ya(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) : ga(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: X } = _, V = X + (I >= 0 ? 0 : Math.abs(I)) || 1, $ = u.value.height, Fe = u.value.width, jt = H.value[0] ? H.value[0].zero : u.value.bottom, ea = H.value[0] ? H.value[0].horizontal_zero : u.value.left;
442
- let ta = Array(te.value.length).fill(0), aa = Array(te.value.length).fill(0);
443
- return E.value.filter((ie) => !A.value.includes(ie.id)).map((ie) => {
444
- const q = ie.series.slice(), la = q.map((h, y) => ta[y]), ul = q.map((h, y) => aa[y]);
445
- q.forEach((h, y) => {
446
- (Number(h) || 0) >= 0 ? ta[y] += Number(h) || 0 : aa[y] += Math.abs(Number(h) || 0);
447
- });
448
- const Y = ie.series.slice(v.value.start, v.value.end), cl = ie.signedSeries.slice(v.value.start, v.value.end), vl = Y.map((h, y) => u.value.left + f.value * y + f.value * e.value.style.chart.bars.gapRatio / 4), De = (te.value || []).filter(Number.isFinite), it = De.length ? Math.max(...De) : 0, ut = De.length ? Math.min(...De) : 0;
449
- function sa({ minimapH: h }) {
450
- const S = it > 0, N = ut < 0;
451
- if (S && N) {
452
- const U = Math.max(it, Math.abs(ut)) || 1e-9;
453
- return {
454
- pxPerUnit: h / 2 / U,
455
- zero: h / 2
456
- };
457
- }
458
- if (S) {
459
- const U = Math.max(1e-9, it);
460
- return {
461
- pxPerUnit: h / U,
462
- zero: h
463
- };
464
- }
465
- const z = Math.max(1e-9, Math.abs(ut));
466
- return {
467
- pxPerUnit: h / z,
468
- zero: 0
469
- };
470
- }
471
- const hl = ({ left: h, unitW: y }) => {
472
- const S = y * (e.value.style.chart.bars.gapRatio / 4);
473
- return q.map((N, z) => h + y * z + S);
474
- }, dl = Y.map((h, y) => u.value.top + f.value * y + f.value * e.value.style.chart.bars.gapRatio / 4), yl = Y.map((h, y) => {
475
- const S = e.value.style.chart.bars.distributed ? (h || 0) / me.value[y] : (h || 0) / V;
476
- let N, z;
477
- return h > 0 ? (z = $ * S, N = jt - z - a[y], a[y] += z) : (z = $ * S, N = jt + t[y], t[y] += Math.abs(z)), N;
478
- }), gl = ({ minimapH: h }) => {
479
- if (e.value.style.chart.bars.distributed)
480
- return q.map((z, U) => {
481
- const ct = Math.abs(Number(z) || 0), ra = Math.abs(te.value?.[U] || 0) || 1e-9, kl = (la[U] + ct) / ra;
482
- return h - kl * h;
483
- });
484
- const { pxPerUnit: y, zero: S } = sa({ minimapH: h });
485
- return q.map((N, z) => {
486
- const U = Number(N) || 0;
487
- return U >= 0 ? S - (la[z] + U) * y : S + ul[z] * y;
488
- });
489
- }, bl = Y.map((h, y) => {
490
- const S = e.value.style.chart.bars.distributed ? (h || 0) / me.value[y] : (h || 0) / V;
491
- let N, z;
492
- return h > 0 ? (z = Fe * S, N = ea + l[y], l[y] += z) : (z = Fe * S, N = ea - Math.abs(z) - s[y], s[y] += Math.abs(z)), N;
493
- }), fl = Y.map((h, y) => {
494
- const S = e.value.style.chart.bars.distributed ? (h || 0) / me.value[y] : (h || 0) / V;
495
- return h > 0 ? $ * S : $ * Math.abs(S);
496
- }), ml = ({ minimapH: h }) => {
497
- if (e.value.style.chart.bars.distributed)
498
- return q.map((N, z) => {
499
- const U = Math.abs(Number(N) || 0), ct = Math.abs(te.value?.[z] || 0) || 1e-9;
500
- return U / ct * h;
501
- });
502
- const { pxPerUnit: y } = sa({ minimapH: h });
503
- return q.map((S) => Math.abs(Number(S) || 0) * y);
504
- }, pl = Y.map((h, y) => {
505
- const S = e.value.style.chart.bars.distributed ? (h || 0) / me.value[y] : (h || 0) / V;
506
- return h > 0 ? Fe * S : Fe * Math.abs(S);
507
- }), xl = 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) / me.value[y] : (h || 0) / xl),
511
- series: Y,
512
- signedSeries: cl,
513
- x: vl,
514
- y: yl,
515
- height: fl,
516
- horizontal_width: pl,
517
- horizontal_y: dl,
518
- horizontal_x: bl,
519
- xMinimap: hl,
520
- yMinimap: gl,
521
- heightMinimap: ml
522
- };
523
- });
524
- }), Ft = g(() => Xa.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 Dt(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 Vt(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, B.value = null;
581
- }
582
- const Ya = g(() => Array(P.value).fill(0).map((a, l) => lt(l)));
583
- we(() => x.selectedXIndex, (a) => {
584
- if ([null, void 0].includes(x.selectedXIndex)) {
585
- B.value = null;
586
- return;
587
- }
588
- const l = a - v.value.start;
589
- l < 0 || a >= v.value.end ? B.value = null : B.value = l ?? null;
590
- }, { immediate: !0 });
591
- function Ut(a) {
592
- B.value = a, He.value = !0;
593
- const l = e.value.style.chart.tooltip.customFormat, t = lt(a);
594
- il({ 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 (fa(l) && El(() => 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 X = "";
622
- (R.value[a] && R.value[a].text || at.value[a] && at.value[a].text && e.value.style.chart.tooltip.showTimeLabel) && (X += `<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 V = [
624
- c && o ? "(" : "",
625
- c && o ? ")" : ""
626
- ];
627
- t.reverse().forEach(($) => {
628
- X += `
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}"/>${$a.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
- }) : ""} ${V[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
- }) : ""}${V[1]}
642
- </div>
643
- `;
644
- }), We.value = `<div>${X}</div>`;
645
- }
646
- }
647
- const Ga = g(() => oe.value.width), qa = g(() => oe.value.height);
648
- Zl({
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: Ga,
657
- height: qa,
658
- rotation: e.value.style.chart.grid.x.timeLabels.autoRotate.angle
659
- });
660
- function Bt(a) {
661
- ye.value = a, yt.value += 1;
662
- }
663
- function Ht() {
664
- T.value.showTable = !T.value.showTable;
665
- }
666
- function Xt() {
667
- T.value.dataLabels.show = !T.value.dataLabels.show;
668
- }
669
- function Wt() {
670
- T.value.showTooltip = !T.value.showTooltip;
671
- }
672
- function Ja() {
673
- return L.value;
674
- }
675
- const Yt = 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
- E.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 = ["", ...Yt.value.head.map((w) => w.label)], s = Yt.value.body, c = l.concat([t]).concat(s), o = Dl(c);
690
- a ? a(o) : Vl({ 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 < P.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 rt(a) {
715
- if (A.value.includes(a.id))
716
- A.value = A.value.filter((l) => l !== a.id);
717
- else {
718
- if (A.value.length === E.value.length - 1) return;
719
- A.value.push(a.id);
720
- }
721
- ve("selectLegend", L.value);
722
- }
723
- function Gt(a) {
724
- if (!E.value.length)
725
- return e.value.debug && console.warn("VueUiStackbar - There are no series to show."), null;
726
- const l = E.value.find((t) => t.name === a);
727
- return l || (e.value.debug && console.warn(`VueUiStackbar - Series name not found "${a}"`), null);
728
- }
729
- function Za(a) {
730
- const l = Gt(a);
731
- l !== null && A.value.includes(l.id) && rt({ id: l.id });
732
- }
733
- function Qa(a) {
734
- const l = Gt(a);
735
- l !== null && (A.value.includes(l.id) || rt({ id: l.id }));
736
- }
737
- const ot = g(() => E.value.map((a, l) => ({
738
- ...a,
739
- shape: "square"
740
- })).map((a) => ({
741
- ...a,
742
- opacity: A.value.includes(a.id) ? 0.5 : 1,
743
- segregate: () => rt(a),
744
- isSegregated: A.value.includes(a.id)
745
- }))), Ka = g(() => ({
746
- cy: "stackbar-legend",
747
- backgroundColor: e.value.style.chart.legend.backgroundColor,
748
- color: e.value.style.chart.legend.color,
749
- fontSize: e.value.style.chart.legend.fontSize,
750
- paddingBottom: 12,
751
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
752
- })), Ne = d(!1);
753
- function nt() {
754
- Ne.value = !Ne.value;
755
- }
756
- function Re(a, l) {
757
- const t = JSON.parse(JSON.stringify(L.value)).map((s) => ({
758
- name: s.name,
759
- value: s.series[l] === 0 ? 0 : (s.signedSeries[l] === -1 && s.series[l] >= 0 ? -s.series[l] : s.series[l]) || null,
760
- proportion: s.proportions[l] || null,
761
- color: s.color,
762
- id: s.id
763
- }));
764
- ve("selectTimeLabel", {
765
- datapoint: t,
766
- absoluteIndex: a.absoluteIndex,
767
- label: a.text
768
- });
769
- }
770
- const ja = g(() => Math.max(...L.value.flatMap((a) => a.series)));
771
- function qt(a, l) {
772
- return e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? St.value ? l * 100 >= e.value.style.chart.bars.dataLabels.hideUnderPercentage : e.value.style.chart.bars.dataLabels.hideEmptyPercentages ? l > 0 : !0 : St.value ? (Lt.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 > ja.value * e.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : Lt.value ? Math.abs(a) >= e.value.style.chart.bars.dataLabels.hideUnderValue : e.value.style.chart.bars.dataLabels.hideEmptyValues ? a !== 0 : !0;
773
- }
774
- async function el({ scale: a = 2 } = {}) {
775
- if (!W.value) return;
776
- const { width: l, height: t } = W.value.getBoundingClientRect(), s = l / t, { imageUri: c, base64: o } = await Ql({ domElement: W.value, base64: !0, img: !0, scale: a });
777
- return {
778
- imageUri: c,
779
- base64: o,
780
- title: e.value.style.chart.title.text,
781
- width: l,
782
- height: t,
783
- aspectRatio: s
784
- };
785
- }
786
- const xe = g(() => {
787
- const a = e.value.table.useDialog && !e.value.table.show, l = T.value.showTable;
788
- return {
789
- component: a ? Ma : La,
790
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
791
- props: a ? {
792
- backgroundColor: e.value.table.th.backgroundColor,
793
- color: e.value.table.th.color,
794
- headerColor: e.value.table.th.color,
795
- headerBg: e.value.table.th.backgroundColor,
796
- isFullscreen: ye.value,
797
- fullscreenParent: W.value,
798
- forcedWidth: Math.min(800, window.innerWidth * 0.8)
799
- } : {
800
- hideDetails: !0,
801
- config: {
802
- open: l,
803
- maxHeight: 1e4,
804
- body: {
805
- backgroundColor: e.value.style.chart.backgroundColor,
806
- color: e.value.style.chart.color
807
- },
808
- head: {
809
- backgroundColor: e.value.style.chart.backgroundColor,
810
- color: e.value.style.chart.color
811
- }
812
- }
813
- }
814
- };
815
- });
816
- we(() => T.value.showTable, (a) => {
817
- e.value.table.show || (a && e.value.table.useDialog && ge.value ? ge.value.open() : "close" in ge.value && ge.value.close());
818
- });
819
- function Jt() {
820
- T.value.showTable = !1, Ye.value && Ye.value.setTableIconState(!1);
821
- }
822
- const tl = g(() => e.value.style.chart.backgroundColor), al = g(() => e.value.style.chart.legend), ll = g(() => e.value.style.chart.title), { exportSvg: sl, getSvg: rl } = Gl({
823
- svg: Ke,
824
- title: ll,
825
- legend: al,
826
- legendItems: ot,
827
- backgroundColor: tl
828
- });
829
- async function Zt({ isCb: a }) {
830
- if (a) {
831
- const { blob: l, url: t, text: s, dataUrl: c } = await rl();
832
- e.value.userOptions.callbacks.svg({ blob: l, url: t, text: s, dataUrl: c });
833
- } else
834
- sl();
835
- }
836
- function Qt(a) {
837
- const l = P.value;
838
- return a > l ? l : a < 0 || a < v.value.start ? e.value.style.chart.zoom.startIndex !== null ? v.value.start + 1 : 1 : a;
839
- }
840
- const ke = d(!1), Kt = d(!1);
841
- function Oe() {
842
- if (!ke.value) {
843
- ke.value = !0;
844
- try {
845
- const { startIndex: a, endIndex: l } = e.value.style.chart.zoom, t = P.value, s = a ?? 0, c = l != null ? Math.min(Qt(l + 1), t) : t;
846
- Ie.value = !0, v.value.start = s, v.value.end = c, O.value.start = s, O.value.end = c, Te(), Kt.value = !0;
847
- } finally {
848
- queueMicrotask(() => {
849
- Ie.value = !1;
850
- }), ke.value = !1;
851
- }
852
- }
853
- }
854
- const Ie = d(!1);
855
- function ol(a) {
856
- ke.value || Ie.value || a !== v.value.start && (v.value.start = a, O.value.start = a, Te());
857
- }
858
- function nl(a) {
859
- if (ke.value || Ie.value) return;
860
- const l = Qt(a);
861
- l !== v.value.end && (v.value.end = l, O.value.end = l, Te());
862
- }
863
- function il({ seriesIndex: a, datapoint: l }) {
864
- const t = v.value.start + a;
865
- ve("selectX", {
866
- dataset: l,
867
- index: t,
868
- indexLabel: e.value.style.chart.grid.x.timeLabels.values[t]
869
- });
870
- }
871
- return pa({
872
- getData: Ja,
873
- getImage: el,
874
- generatePdf: _t,
875
- generateCsv: st,
876
- generateImage: Mt,
877
- generateSvg: Zt,
878
- hideSeries: Qa,
879
- showSeries: Za,
880
- toggleTable: Ht,
881
- toggleLabels: Xt,
882
- toggleTooltip: Wt,
883
- toggleAnnotator: nt,
884
- toggleFullscreen: Bt
885
- }), (a, l) => (r(), n("div", {
886
- id: `stackbar_${D.value}`,
887
- ref_key: "stackbarChart",
888
- ref: W,
889
- class: ue({ "vue-data-ui-component": !0, "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": ye.value }),
890
- 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%" : ""}`),
891
- onMouseenter: Ra,
892
- onMouseleave: Oa
893
- }, [
894
- e.value.userOptions.buttons.annotator ? (r(), Z(m(za), {
895
- key: 0,
896
- svgRef: m(Ke),
897
- backgroundColor: e.value.style.chart.backgroundColor,
898
- color: e.value.style.chart.color,
899
- active: Ne.value,
900
- onClose: nt
901
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : b("", !0),
902
- C(a.$slots, "userConfig", {}, void 0, !0),
903
- e.value.style.chart.title.text ? (r(), n("div", {
904
- key: 1,
905
- ref_key: "chartTitle",
906
- ref: gt,
907
- style: "width:100%;background:transparent;padding-bottom:24px"
908
- }, [
909
- (r(), Z(Kl, {
910
- key: `title_${mt.value}`,
911
- config: {
912
- title: {
913
- cy: "stackbar-title",
914
- ...e.value.style.chart.title
915
- },
916
- subtitle: {
917
- cy: "stackbar-subtitle",
918
- ...e.value.style.chart.title.subtitle
919
- }
920
- }
921
- }, null, 8, ["config"]))
922
- ], 512)) : b("", !0),
923
- Q("div", {
924
- id: `legend-top-${D.value}`
925
- }, null, 8, rs),
926
- e.value.userOptions.show && he.value && (m(wt) || m(Qe)) ? (r(), Z(m(Ca), {
927
- ref_key: "userOptionsRef",
928
- ref: Ye,
929
- key: `user_option_${yt.value}`,
930
- backgroundColor: e.value.style.chart.backgroundColor,
931
- color: e.value.style.chart.color,
932
- isPrinting: m(zt),
933
- isImaging: m(Ct),
934
- uid: D.value,
935
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
936
- hasPdf: e.value.userOptions.buttons.pdf,
937
- hasImg: e.value.userOptions.buttons.img,
938
- hasSvg: e.value.userOptions.buttons.svg,
939
- hasXls: e.value.userOptions.buttons.csv,
940
- hasTable: e.value.userOptions.buttons.table,
941
- hasLabel: e.value.userOptions.buttons.labels,
942
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
943
- isFullscreen: ye.value,
944
- chartElement: W.value,
945
- position: e.value.userOptions.position,
946
- isTooltip: T.value.showTooltip,
947
- titles: { ...e.value.userOptions.buttonTitles },
948
- hasAnnotator: e.value.userOptions.buttons.annotator,
949
- isAnnotation: Ne.value,
950
- callbacks: e.value.userOptions.callbacks,
951
- printScale: e.value.userOptions.print.scale,
952
- tableDialog: e.value.table.useDialog,
953
- onToggleFullscreen: Bt,
954
- onGeneratePdf: m(_t),
955
- onGenerateCsv: st,
956
- onGenerateImage: m(Mt),
957
- onGenerateSvg: Zt,
958
- onToggleTable: Ht,
959
- onToggleLabels: Xt,
960
- onToggleTooltip: Wt,
961
- onToggleAnnotator: nt,
962
- style: ae({
963
- visibility: m(wt) ? m(Qe) ? "visible" : "hidden" : "visible"
964
- })
965
- }, ht({ _: 2 }, [
966
- a.$slots.menuIcon ? {
967
- name: "menuIcon",
968
- fn: M(({ isOpen: t, color: s }) => [
969
- C(a.$slots, "menuIcon", le(se({ isOpen: t, color: s })), void 0, !0)
970
- ]),
971
- key: "0"
972
- } : void 0,
973
- a.$slots.optionTooltip ? {
974
- name: "optionTooltip",
975
- fn: M(() => [
976
- C(a.$slots, "optionTooltip", {}, void 0, !0)
977
- ]),
978
- key: "1"
979
- } : void 0,
980
- a.$slots.optionPdf ? {
981
- name: "optionPdf",
982
- fn: M(() => [
983
- C(a.$slots, "optionPdf", {}, void 0, !0)
984
- ]),
985
- key: "2"
986
- } : void 0,
987
- a.$slots.optionCsv ? {
988
- name: "optionCsv",
989
- fn: M(() => [
990
- C(a.$slots, "optionCsv", {}, void 0, !0)
991
- ]),
992
- key: "3"
993
- } : void 0,
994
- a.$slots.optionImg ? {
995
- name: "optionImg",
996
- fn: M(() => [
997
- C(a.$slots, "optionImg", {}, void 0, !0)
998
- ]),
999
- key: "4"
1000
- } : void 0,
1001
- a.$slots.optionSvg ? {
1002
- name: "optionSvg",
1003
- fn: M(() => [
1004
- C(a.$slots, "optionSvg", {}, void 0, !0)
1005
- ]),
1006
- key: "5"
1007
- } : void 0,
1008
- a.$slots.optionTable ? {
1009
- name: "optionTable",
1010
- fn: M(() => [
1011
- C(a.$slots, "optionTable", {}, void 0, !0)
1012
- ]),
1013
- key: "6"
1014
- } : void 0,
1015
- a.$slots.optionLabels ? {
1016
- name: "optionLabels",
1017
- fn: M(() => [
1018
- C(a.$slots, "optionLabels", {}, void 0, !0)
1019
- ]),
1020
- key: "7"
1021
- } : void 0,
1022
- a.$slots.optionFullscreen ? {
1023
- name: "optionFullscreen",
1024
- fn: M(({ toggleFullscreen: t, isFullscreen: s }) => [
1025
- C(a.$slots, "optionFullscreen", le(se({ toggleFullscreen: t, isFullscreen: s })), void 0, !0)
1026
- ]),
1027
- key: "8"
1028
- } : void 0,
1029
- a.$slots.optionAnnotator ? {
1030
- name: "optionAnnotator",
1031
- fn: M(({ toggleAnnotator: t, isAnnotator: s }) => [
1032
- C(a.$slots, "optionAnnotator", le(se({ toggleAnnotator: t, isAnnotator: s })), void 0, !0)
1033
- ]),
1034
- key: "9"
1035
- } : void 0
1036
- ]), 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),
1037
- (r(), n("svg", {
1038
- ref_key: "svgRef",
1039
- ref: Ke,
1040
- xmlns: m(Rl),
1041
- viewBox: `0 0 ${u.value.chartWidth <= 0 ? 10 : u.value.chartWidth} ${u.value.chartHeight <= 0 ? 10 : u.value.chartHeight}`,
1042
- class: ue({ "vue-data-ui-loading": m(be) }),
1043
- style: ae(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
1044
- }, [
1045
- Le(m(_a)),
1046
- a.$slots["chart-background"] ? (r(), n("foreignObject", {
1047
- key: 0,
1048
- x: u.value.left,
1049
- y: u.value.top,
1050
- width: u.value.width <= 0 ? 10 : u.value.width,
1051
- height: u.value.height <= 0 ? 10 : u.value.height,
1052
- style: {
1053
- pointerEvents: "none"
1054
- }
1055
- }, [
1056
- C(a.$slots, "chart-background", {}, void 0, !0)
1057
- ], 8, ns)) : b("", !0),
1058
- e.value.style.chart.bars.gradient.show ? (r(), n("defs", is, [
1059
- (r(!0), n(p, null, k(L.value, (t, s) => (r(), n("linearGradient", {
1060
- id: `gradient_${t.id}`,
1061
- x1: "0%",
1062
- y1: "0%",
1063
- x2: "0%",
1064
- y2: "100%"
1065
- }, [
1066
- Q("stop", {
1067
- offset: "0%",
1068
- "stop-color": t.color
1069
- }, null, 8, cs),
1070
- Q("stop", {
1071
- offset: "61.8%",
1072
- "stop-color": m(Ol)(t.color, e.value.style.chart.bars.gradient.intensity / 100)
1073
- }, null, 8, vs),
1074
- Q("stop", {
1075
- offset: "100%",
1076
- "stop-color": t.color
1077
- }, null, 8, hs)
1078
- ], 8, us))), 256))
1079
- ])) : b("", !0),
1080
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "vertical" ? (r(!0), n(p, { key: 2 }, k(H.value, (t, s) => (r(), n("line", {
1081
- x1: u.value.left,
1082
- x2: u.value.right,
1083
- y1: t.y,
1084
- y2: t.y,
1085
- stroke: e.value.style.chart.grid.x.linesColor,
1086
- "stroke-width": e.value.style.chart.grid.x.linesThickness,
1087
- "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
1088
- "stroke-linecap": "round"
1089
- }, null, 8, ds))), 256)) : b("", !0),
1090
- 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", {
1091
- x1: u.value.left,
1092
- x2: u.value.right,
1093
- y1: u.value.top + f.value * s,
1094
- y2: u.value.top + f.value * s,
1095
- stroke: e.value.style.chart.grid.x.linesColor,
1096
- "stroke-width": e.value.style.chart.grid.x.linesThickness,
1097
- "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
1098
- "stroke-linecap": "round"
1099
- }, null, 8, ys))), 256)) : b("", !0),
1100
- 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", {
1101
- x1: u.value.left + f.value * s,
1102
- x2: u.value.left + f.value * s,
1103
- y1: u.value.top,
1104
- y2: u.value.bottom,
1105
- stroke: e.value.style.chart.grid.y.linesColor,
1106
- "stroke-width": e.value.style.chart.grid.y.linesThickness,
1107
- "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
1108
- "stroke-linecap": "round"
1109
- }, null, 8, gs))), 256)) : b("", !0),
1110
- e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "horizontal" ? (r(!0), n(p, { key: 5 }, k(H.value, (t, s) => (r(), n("line", {
1111
- x1: t.horizontal_x,
1112
- x2: t.horizontal_x,
1113
- y1: u.value.top,
1114
- y2: u.value.bottom,
1115
- stroke: e.value.style.chart.grid.y.linesColor,
1116
- "stroke-width": e.value.style.chart.grid.y.linesThickness,
1117
- "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
1118
- "stroke-linecap": "round"
1119
- }, null, 8, bs))), 256)) : b("", !0),
1120
- (r(!0), n(p, null, k(L.value, (t, s) => (r(), n("g", null, [
1121
- a.$slots.pattern ? (r(), n("defs", fs, [
1122
- C(a.$slots, "pattern", Se({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${D.value}_${t.absoluteIndex}` }), void 0, !0)
1123
- ])) : b("", !0),
1124
- e.value.orientation === "vertical" ? (r(), n(p, { key: 1 }, [
1125
- (r(!0), n(p, null, k(t.x, (c, o) => (r(), n("rect", {
1126
- x: c,
1127
- y: t.y[o] < 0 ? 0 : t.y[o],
1128
- height: t.height[o] < 0 ? 1e-4 : t.height[o] || 0,
1129
- 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,
1130
- width: f.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1131
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
1132
- stroke: e.value.style.chart.backgroundColor,
1133
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1134
- "stroke-linecap": "round",
1135
- "stroke-linejoin": "round",
1136
- class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": K.value })
1137
- }, null, 10, ms))), 256)),
1138
- a.$slots.pattern ? (r(), n("g", ps, [
1139
- (r(!0), n(p, null, k(t.x, (c, o) => (r(), n("rect", {
1140
- x: c,
1141
- y: t.y[o] < 0 ? 0 : t.y[o],
1142
- height: t.height[o] < 0 ? 1e-4 : t.height[o] || 0,
1143
- 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,
1144
- width: f.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1145
- fill: `url(#pattern_${D.value}_${t.absoluteIndex})`,
1146
- stroke: e.value.style.chart.backgroundColor,
1147
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1148
- "stroke-linecap": "round",
1149
- "stroke-linejoin": "round",
1150
- class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": K.value })
1151
- }, null, 10, xs))), 256))
1152
- ])) : b("", !0)
1153
- ], 64)) : (r(), n(p, { key: 2 }, [
1154
- (r(!0), n(p, null, k(t.horizontal_x, (c, o) => (r(), n("rect", {
1155
- x: m(Ee)(c, u.value.left),
1156
- y: t.horizontal_y[o] < 0 ? 0 : t.horizontal_y[o],
1157
- width: m(Ee)(t.horizontal_width[o] < 0 ? 1e-4 : t.horizontal_width[o]),
1158
- 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,
1159
- height: f.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1160
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
1161
- stroke: e.value.style.chart.backgroundColor,
1162
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1163
- "stroke-linecap": "round",
1164
- "stroke-linejoin": "round",
1165
- class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": K.value })
1166
- }, null, 10, ks))), 256)),
1167
- a.$slots.pattern ? (r(), n("g", ws, [
1168
- (r(!0), n(p, null, k(t.horizontal_x, (c, o) => (r(), n("rect", {
1169
- x: m(Ee)(c, u.value.left),
1170
- y: t.horizontal_y[o] < 0 ? 0 : t.horizontal_y[o],
1171
- width: m(Ee)(t.horizontal_width[o] < 0 ? 1e-4 : t.horizontal_width[o]),
1172
- 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,
1173
- height: f.value * (1 - e.value.style.chart.bars.gapRatio / 2),
1174
- fill: `url(#pattern_${D.value}_${t.absoluteIndex})`,
1175
- stroke: e.value.style.chart.backgroundColor,
1176
- "stroke-width": e.value.style.chart.bars.strokeWidth,
1177
- "stroke-linecap": "round",
1178
- "stroke-linejoin": "round",
1179
- class: ue({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": K.value })
1180
- }, null, 10, Ls))), 256))
1181
- ])) : b("", !0)
1182
- ], 64))
1183
- ]))), 256)),
1184
- e.value.style.chart.grid.x.showAxis ? (r(), n("line", {
1185
- key: 6,
1186
- x1: u.value.left,
1187
- x2: u.value.right,
1188
- y1: u.value.bottom,
1189
- y2: u.value.bottom,
1190
- stroke: e.value.style.chart.grid.x.axisColor,
1191
- "stroke-width": e.value.style.chart.grid.x.axisThickness,
1192
- "stroke-linecap": "round",
1193
- "stroke-linejoin": "round"
1194
- }, null, 8, Ss)) : b("", !0),
1195
- e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (r(), n("line", {
1196
- key: 7,
1197
- x1: u.value.left,
1198
- x2: u.value.left,
1199
- y1: u.value.top,
1200
- y2: u.value.bottom,
1201
- stroke: e.value.style.chart.grid.y.axisColor,
1202
- "stroke-width": e.value.style.chart.grid.y.axisThickness,
1203
- "stroke-linecap": "round",
1204
- "stroke-linejoin": "round"
1205
- }, null, 8, zs)) : b("", !0),
1206
- e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (r(), n("text", {
1207
- key: 8,
1208
- ref_key: "xAxisLabel",
1209
- ref: Ge,
1210
- x: u.value.left + u.value.width / 2,
1211
- y: u.value.chartHeight - 3,
1212
- "font-size": e.value.style.chart.grid.x.axisName.fontSize,
1213
- fill: e.value.style.chart.grid.x.axisName.color,
1214
- "font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
1215
- "text-anchor": "middle"
1216
- }, F(e.value.style.chart.grid.x.axisName.text), 9, Cs)) : b("", !0),
1217
- e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (r(), n("text", {
1218
- key: 9,
1219
- ref_key: "yAxisLabel",
1220
- ref: qe,
1221
- transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize}, ${u.value.top + u.value.height / 2}) rotate(-90)`,
1222
- "font-size": e.value.style.chart.grid.y.axisName.fontSize,
1223
- fill: e.value.style.chart.grid.y.axisName.color,
1224
- "font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
1225
- "text-anchor": "middle"
1226
- }, F(e.value.style.chart.grid.y.axisName.text), 9, _s)) : b("", !0),
1227
- T.value.dataLabels.show && e.value.orientation === "vertical" ? (r(), n(p, { key: 10 }, [
1228
- (r(!0), n(p, null, k(L.value, (t, s) => (r(), n("g", null, [
1229
- (r(!0), n(p, null, k(t.x, (c, o) => (r(), n(p, null, [
1230
- qt(t.series[o], t.proportions[o]) ? (r(), n("text", {
1231
- key: 0,
1232
- x: c + f.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
1233
- y: t.y[o] + t.height[o] / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
1234
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
1235
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? m(ba)(t.color) : e.value.style.chart.bars.dataLabels.color,
1236
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1237
- "text-anchor": "middle"
1238
- }, F(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Dt(t.proportions[o] * 100, t, s, o) : Ae(t.series[o], t, s, o, t.signedSeries[o])), 9, Ms)) : b("", !0)
1239
- ], 64))), 256))
1240
- ]))), 256)),
1241
- e.value.style.chart.bars.totalValues.show && L.value.length > 1 ? (r(), n("g", {
1242
- key: 0,
1243
- ref_key: "sumTop",
1244
- ref: Na
1245
- }, [
1246
- (r(!0), n(p, null, k(Ft.value, (t, s) => (r(), n(p, null, [
1247
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (r(), n("text", {
1248
- key: 0,
1249
- x: u.value.left + f.value * s + f.value / 2,
1250
- y: e.value.style.chart.bars.totalValues.fontSize,
1251
- "text-anchor": "middle",
1252
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
1253
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1254
- fill: e.value.style.chart.bars.totalValues.color
1255
- }, F(Ae(t.value, t, s, t.sign)), 9, Ts)) : b("", !0)
1256
- ], 64))), 256))
1257
- ], 512)) : b("", !0)
1258
- ], 64)) : b("", !0),
1259
- T.value.dataLabels.show && e.value.orientation === "horizontal" ? (r(), n(p, { key: 11 }, [
1260
- (r(!0), n(p, null, k(L.value, (t, s) => (r(), n("g", null, [
1261
- (r(!0), n(p, null, k(t.horizontal_x, (c, o) => (r(), n(p, null, [
1262
- qt(t.series[o], t.proportions[o]) ? (r(), n("text", {
1263
- key: 0,
1264
- x: c + (t.horizontal_width[o] < 0 ? 1e-4 : t.horizontal_width[o]) / 2,
1265
- y: t.horizontal_y[o] + f.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
1266
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
1267
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? m(ba)(t.color) : e.value.style.chart.bars.dataLabels.color,
1268
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1269
- "text-anchor": "middle"
1270
- }, F(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Dt(t.proportions[o] * 100, t, s, o) : Ae(t.series[o], t, s, o, t.signedSeries[o])), 9, $s)) : b("", !0)
1271
- ], 64))), 256))
1272
- ]))), 256)),
1273
- e.value.style.chart.bars.totalValues.show && L.value.length > 1 ? (r(), n("g", {
1274
- key: 0,
1275
- ref_key: "sumRight",
1276
- ref: xt
1277
- }, [
1278
- (r(!0), n(p, null, k(Ft.value, (t, s) => (r(), n(p, null, [
1279
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (r(), n("text", {
1280
- key: 0,
1281
- x: u.value.right + e.value.style.chart.bars.totalValues.fontSize / 3,
1282
- y: u.value.top + f.value * s + f.value / 2,
1283
- "text-anchor": "start",
1284
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
1285
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1286
- fill: e.value.style.chart.bars.totalValues.color
1287
- }, F(Ae(t.value, t, s, t.sign)), 9, As)) : b("", !0)
1288
- ], 64))), 256))
1289
- ], 512)) : b("", !0)
1290
- ], 64)) : b("", !0),
1291
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "vertical" ? (r(), n("g", {
1292
- key: 12,
1293
- ref_key: "scaleLabels",
1294
- ref: j
1295
- }, [
1296
- (r(!0), n(p, null, k(H.value, (t, s) => (r(), n("line", {
1297
- x1: u.value.left,
1298
- x2: u.value.left - 6,
1299
- y1: t.y,
1300
- y2: t.y,
1301
- stroke: e.value.style.chart.grid.x.axisColor,
1302
- "stroke-width": 1
1303
- }, null, 8, Ps))), 256)),
1304
- (r(!0), n(p, null, k(H.value, (t, s) => (r(), n("text", {
1305
- x: t.x,
1306
- y: t.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1307
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1308
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1309
- fill: e.value.style.chart.grid.y.axisLabels.color,
1310
- "text-anchor": "end"
1311
- }, F(m(Ue)(
1312
- e.value.style.chart.grid.y.axisLabels.formatter,
1313
- t.value,
1314
- m(re)({
1315
- p: e.value.style.chart.bars.dataLabels.prefix,
1316
- v: t.value,
1317
- s: e.value.style.chart.bars.dataLabels.suffix,
1318
- r: e.value.style.chart.grid.y.axisLabels.rounding
1319
- }),
1320
- { datapoint: t }
1321
- )), 9, Ns))), 256))
1322
- ], 512)) : b("", !0),
1323
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "horizontal" ? (r(), n("g", {
1324
- key: 13,
1325
- ref_key: "scaleLabels",
1326
- ref: j
1327
- }, [
1328
- (r(!0), n(p, null, k(H.value, (t, s) => (r(), n("line", {
1329
- x1: t.horizontal_x,
1330
- x2: t.horizontal_x,
1331
- y1: u.value.bottom,
1332
- y2: u.value.bottom + 6,
1333
- stroke: e.value.style.chart.grid.x.axisColor,
1334
- "stroke-width": 1,
1335
- "stroke-linecap": "round"
1336
- }, null, 8, Rs))), 256)),
1337
- (r(!0), n(p, null, k(H.value, (t, s) => (r(), n("text", {
1338
- class: "vue-data-ui-time-label",
1339
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1340
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1341
- fill: e.value.style.chart.grid.y.axisLabels.color,
1342
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1343
- 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})`
1344
- }, F(m(Ue)(
1345
- e.value.style.chart.grid.y.axisLabels.formatter,
1346
- t.value,
1347
- m(re)({
1348
- p: e.value.style.chart.bars.dataLabels.prefix,
1349
- v: t.value,
1350
- s: e.value.style.chart.bars.dataLabels.suffix,
1351
- r: e.value.style.chart.grid.y.axisLabels.rounding
1352
- }),
1353
- { datapoint: t }
1354
- )), 9, Os))), 256))
1355
- ], 512)) : b("", !0),
1356
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "vertical" ? (r(), n("g", {
1357
- key: 14,
1358
- ref_key: "timeLabelsEls",
1359
- ref: ee
1360
- }, [
1361
- a.$slots["time-label"] ? (r(), n("g", Is, [
1362
- (r(!0), n(p, null, k(Rt.value, (t, s) => (r(), n("g", null, [
1363
- C(a.$slots, "time-label", Se({ ref_for: !0 }, {
1364
- x: u.value.left + f.value * s + f.value / 2,
1365
- y: u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
1366
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1367
- fill: e.value.style.chart.grid.x.timeLabels.color,
1368
- transform: `translate(${u.value.left + f.value * s + f.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})`,
1369
- absoluteIndex: t.absoluteIndex,
1370
- content: t.text,
1371
- textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1372
- show: !0
1373
- }), void 0, !0)
1374
- ]))), 256))
1375
- ])) : (r(), n("g", Fs, [
1376
- (r(!0), n(p, null, k(Rt.value, (t, s) => (r(), n("g", null, [
1377
- String(t.text).includes(`
1378
- `) ? (r(), n("text", {
1379
- key: s + "-multi",
1380
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1381
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1382
- fill: e.value.style.chart.grid.x.timeLabels.color,
1383
- transform: `
1384
- translate(
1385
- ${u.value.left + f.value * s + f.value / 2},
1386
- ${u.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}
1387
- ),
1388
- rotate(${e.value.style.chart.grid.x.timeLabels.rotation})
1389
- `,
1390
- style: { cursor: "pointer" },
1391
- innerHTML: m(Il)({
1392
- content: String(t.text),
1393
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1394
- fill: e.value.style.chart.grid.x.timeLabels.color,
1395
- x: 0,
1396
- y: 0
1397
- }),
1398
- onClick: () => Re(t, s)
1399
- }, null, 8, Vs)) : (r(), n("text", {
1400
- class: "vue-data-ui-time-label",
1401
- key: s,
1402
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1403
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1404
- "font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
1405
- fill: e.value.style.chart.grid.x.timeLabels.color,
1406
- transform: `translate(${u.value.left + f.value * s + f.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})`,
1407
- style: { cursor: "pointer" },
1408
- onClick: () => Re(t, s)
1409
- }, F(t.text), 9, Ds))
1410
- ]))), 256))
1411
- ]))
1412
- ], 512)) : b("", !0),
1413
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "horizontal" ? (r(), n("g", {
1414
- key: 15,
1415
- ref_key: "timeLabelsEls",
1416
- ref: ee
1417
- }, [
1418
- a.$slots["time-label"] ? (r(), n("g", Es, [
1419
- (r(!0), n(p, null, k(R.value, (t, s) => (r(), n("g", null, [
1420
- C(a.$slots, "time-label", Se({ ref_for: !0 }, {
1421
- x: u.value.left - 8,
1422
- y: u.value.top + f.value * s + f.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1423
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1424
- fill: e.value.style.chart.grid.x.timeLabels.color,
1425
- transform: null,
1426
- absoluteIndex: t.absoluteIndex,
1427
- content: t.text,
1428
- textAnchor: "end",
1429
- show: !0
1430
- }), void 0, !0)
1431
- ]))), 256))
1432
- ])) : (r(), n("g", Us, [
1433
- (r(!0), n(p, null, k(R.value, (t, s) => (r(), n("g", null, [
1434
- String(t.text).includes(`
1435
- `) ? (r(), n("text", {
1436
- key: 1,
1437
- "text-anchor": "end",
1438
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1439
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1440
- fill: e.value.style.chart.grid.y.axisLabels.color,
1441
- x: u.value.left - 8,
1442
- y: u.value.top + f.value * s + f.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1443
- style: { cursor: "pointer" },
1444
- onClick: () => Re(t, s),
1445
- innerHTML: m(Fl)({
1446
- content: String(t.text),
1447
- fontSize: e.value.style.chart.grid.y.axisLabels.fontSize,
1448
- fill: e.value.style.chart.grid.y.axisLabels.color,
1449
- x: u.value.left - 8,
1450
- y: 0
1451
- })
1452
- }, null, 8, Hs)) : (r(), n("text", {
1453
- key: 0,
1454
- "text-anchor": "end",
1455
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1456
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1457
- fill: e.value.style.chart.grid.y.axisLabels.color,
1458
- x: u.value.left - 8,
1459
- y: u.value.top + f.value * s + f.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1460
- style: {
1461
- cursor: "pointer"
1462
- },
1463
- onClick: () => Re(t, s)
1464
- }, F(t.text), 9, Bs))
1465
- ]))), 256))
1466
- ]))
1467
- ], 512)) : b("", !0),
1468
- 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", {
1469
- x: u.value.left + s * f.value,
1470
- y: u.value.top,
1471
- width: f.value,
1472
- height: u.value.height < 0 ? 0 : u.value.height,
1473
- onClick: () => Vt(s),
1474
- onMouseenter: () => Ut(s),
1475
- onMouseleave: () => Et(s),
1476
- fill: s === B.value || s === Je.value ? e.value.style.chart.highlighter.color : "transparent",
1477
- style: ae({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1478
- }, null, 44, Xs))), 256)) : b("", !0),
1479
- 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", {
1480
- x: u.value.left,
1481
- y: u.value.top + s * f.value,
1482
- width: u.value.width < 0 ? 0 : u.value.width,
1483
- height: f.value,
1484
- onClick: () => Vt(s),
1485
- onMouseenter: () => Ut(s),
1486
- onMouseleave: () => Et(s),
1487
- fill: s === B.value || s === Je.value ? e.value.style.chart.highlighter.color : "transparent",
1488
- style: ae({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1489
- }, null, 44, Ws))), 256)) : b("", !0),
1490
- At.value ? (r(), n("rect", Se({ key: 18 }, Ea.value, {
1491
- "data-start": v.value.start,
1492
- "data-end": v.value.end
1493
- }), null, 16, Ys)) : b("", !0),
1494
- C(a.$slots, "svg", {
1495
- svg: {
1496
- drawingArea: u.value,
1497
- data: L.value
1498
- }
1499
- }, void 0, !0)
1500
- ], 14, os)),
1501
- a.$slots.watermark ? (r(), n("div", Gs, [
1502
- C(a.$slots, "watermark", le(se({ isPrinting: m(zt) || m(Ct) })), void 0, !0)
1503
- ])) : b("", !0),
1504
- e.value.style.chart.zoom.show && P.value > 6 && he.value && Kt.value ? (r(), Z(as, {
1505
- key: 4,
1506
- ref_key: "chartSlicer",
1507
- ref: de,
1508
- allMinimaps: Ha.value,
1509
- background: e.value.style.chart.zoom.color,
1510
- borderColor: e.value.style.chart.backgroundColor,
1511
- customFormat: e.value.style.chart.zoom.customFormat,
1512
- cutNullValues: !1,
1513
- enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
1514
- enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
1515
- end: v.value.end,
1516
- focusOnDrag: e.value.style.chart.zoom.focusOnDrag,
1517
- focusRangeRatio: e.value.style.chart.zoom.focusRangeRatio,
1518
- fontSize: e.value.style.chart.zoom.fontSize,
1519
- immediate: !e.value.style.chart.zoom.preview.enable,
1520
- inputColor: e.value.style.chart.zoom.color,
1521
- isPreview: At.value,
1522
- labelLeft: e.value.style.chart.grid.x.timeLabels.values[v.value.start] ? R.value[0].text : "",
1523
- labelRight: e.value.style.chart.grid.x.timeLabels.values[v.value.end - 1] ? R.value.at(-1).text : "",
1524
- max: Math.max(...Be.dataset.map((t) => t.series.length)),
1525
- min: 0,
1526
- minimap: te.value,
1527
- minimapCompact: e.value.style.chart.zoom.minimap.compact,
1528
- minimapFrameColor: e.value.style.chart.zoom.minimap.frameColor,
1529
- minimapIndicatorColor: e.value.style.chart.zoom.minimap.indicatorColor,
1530
- minimapMerged: !1,
1531
- minimapSelectedColor: e.value.style.chart.zoom.minimap.selectedColor,
1532
- minimapSelectedColorOpacity: e.value.style.chart.zoom.minimap.selectedColorOpacity,
1533
- minimapSelectedIndex: B.value,
1534
- minimapSelectionRadius: 1,
1535
- preciseLabels: It.value.length ? It.value : pe.value,
1536
- refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(...Be.dataset.map((t) => t.series.length)),
1537
- refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
1538
- selectColor: e.value.style.chart.zoom.highlightColor,
1539
- selectedSeries: Ya.value,
1540
- smoothMinimap: !1,
1541
- start: v.value.start,
1542
- textColor: e.value.style.chart.color,
1543
- timeLabels: pe.value,
1544
- usePreciseLabels: e.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !e.value.style.chart.zoom.useDefaultFormat,
1545
- valueEnd: v.value.end,
1546
- valueStart: v.value.start,
1547
- verticalHandles: e.value.style.chart.zoom.minimap.verticalHandles,
1548
- "onUpdate:end": nl,
1549
- "onUpdate:start": ol,
1550
- onTrapMouse: Ua,
1551
- onReset: Nt,
1552
- onFutureEnd: l[0] || (l[0] = (t) => Pt("end", t)),
1553
- onFutureStart: l[1] || (l[1] = (t) => Pt("start", t))
1554
- }, {
1555
- "reset-action": M(({ reset: t }) => [
1556
- C(a.$slots, "reset-action", le(se({ reset: t })), void 0, !0)
1557
- ]),
1558
- slotMap: M(({ width: t, height: s, unitW: c }) => [
1559
- (r(!0), n(p, null, k(L.value, (o) => (r(), n("g", {
1560
- key: o.id
1561
- }, [
1562
- (r(!0), n(p, null, k(o.xMinimap({ left: 0, unitW: c }), (w, _) => (r(), n("rect", {
1563
- key: _,
1564
- x: _ === 0 ? w - c * (e.value.style.chart.bars.gapRatio / 4) : w - c / 2,
1565
- y: Math.max(0, Math.min(s, o.yMinimap({ minimapH: s })[_])),
1566
- height: o.heightMinimap({ minimapH: s })[_],
1567
- width: [0, P.value - 1].includes(_) ? c * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 : c * (1 - e.value.style.chart.bars.gapRatio / 2),
1568
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${o.id})` : o.color,
1569
- stroke: e.value.style.chart.backgroundColor,
1570
- "stroke-width": 0.5,
1571
- rx: "0",
1572
- "stroke-linecap": "round",
1573
- "stroke-linejoin": "round",
1574
- style: ae({
1575
- opacity: _ >= O.value.start && _ <= O.value.end ? 1 : 0.62
1576
- })
1577
- }, null, 12, qs))), 128))
1578
- ]))), 128))
1579
- ]),
1580
- _: 3
1581
- }, 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),
1582
- Le(m(ka), {
1583
- show: T.value.showTooltip && He.value,
1584
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1585
- color: e.value.style.chart.tooltip.color,
1586
- fontSize: e.value.style.chart.tooltip.fontSize,
1587
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1588
- borderColor: e.value.style.chart.tooltip.borderColor,
1589
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1590
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1591
- position: e.value.style.chart.tooltip.position,
1592
- offsetY: e.value.style.chart.tooltip.offsetY,
1593
- parent: W.value,
1594
- content: We.value,
1595
- isFullscreen: ye.value,
1596
- isCustom: m(fa)(e.value.style.chart.tooltip.customFormat),
1597
- smooth: e.value.style.chart.tooltip.smooth,
1598
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1599
- smoothForce: e.value.style.chart.tooltip.smoothForce,
1600
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
1601
- }, {
1602
- "tooltip-before": M(() => [
1603
- C(a.$slots, "tooltip-before", le(se({ ...Xe.value })), void 0, !0)
1604
- ]),
1605
- "tooltip-after": M(() => [
1606
- C(a.$slots, "tooltip-after", le(se({ ...Xe.value })), void 0, !0)
1607
- ]),
1608
- _: 3
1609
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1610
- Q("div", {
1611
- id: `legend-bottom-${D.value}`
1612
- }, null, 8, Js),
1613
- pt.value ? (r(), Z(zl, {
1614
- key: 5,
1615
- to: e.value.style.chart.legend.position === "top" ? `#legend-top-${D.value}` : `#legend-bottom-${D.value}`
1616
- }, [
1617
- Q("div", {
1618
- ref_key: "chartLegend",
1619
- ref: bt
1620
- }, [
1621
- e.value.style.chart.legend.show ? (r(), Z(ts, {
1622
- key: 0,
1623
- legendSet: ot.value,
1624
- config: Ka.value,
1625
- onClickMarker: l[2] || (l[2] = ({ legend: t }) => t.segregate())
1626
- }, ht({
1627
- item: M(({ legend: t }) => [
1628
- m(be) ? b("", !0) : (r(), n("div", {
1629
- key: 0,
1630
- onClick: (s) => t.segregate(),
1631
- style: ae(`opacity:${A.value.includes(t.id) ? 0.5 : 1}`)
1632
- }, F(t.name), 13, Zs))
1633
- ]),
1634
- _: 2
1635
- }, [
1636
- a.$slots.pattern ? {
1637
- name: "legend-pattern",
1638
- fn: M(({ legend: t, index: s }) => [
1639
- Le(jl, {
1640
- shape: t.shape,
1641
- radius: 30,
1642
- stroke: "none",
1643
- plot: { x: 30, y: 30 },
1644
- fill: `url(#pattern_${D.value}_${s})`
1645
- }, null, 8, ["shape", "fill"])
1646
- ]),
1647
- key: "0"
1648
- } : void 0
1649
- ]), 1032, ["legendSet", "config"])) : C(a.$slots, "legend", {
1650
- key: 1,
1651
- legend: ot.value
1652
- }, void 0, !0)
1653
- ], 512)
1654
- ], 8, ["to"])) : b("", !0),
1655
- a.$slots.source ? (r(), n("div", {
1656
- key: 6,
1657
- ref_key: "source",
1658
- ref: ft,
1659
- dir: "auto"
1660
- }, [
1661
- C(a.$slots, "source", {}, void 0, !0)
1662
- ], 512)) : b("", !0),
1663
- he.value && e.value.userOptions.buttons.table ? (r(), Z(Cl(xe.value.component), Se({ key: 7 }, xe.value.props, {
1664
- ref_key: "tableUnit",
1665
- ref: ge,
1666
- onClose: Jt
1667
- }), ht({
1668
- content: M(() => [
1669
- Le(m(Sa), {
1670
- colNames: Pe.value.colNames,
1671
- head: Pe.value.head,
1672
- body: Pe.value.body,
1673
- config: Pe.value.config,
1674
- title: e.value.table.useDialog ? "" : xe.value.title,
1675
- withCloseButton: !e.value.table.useDialog,
1676
- onClose: Jt
1677
- }, {
1678
- th: M(({ th: t }) => [
1679
- Q("div", { innerHTML: t }, null, 8, Qs)
1680
- ]),
1681
- td: M(({ td: t }) => [
1682
- ua(F(isNaN(Number(t)) ? t : m(re)({
1683
- p: e.value.style.chart.bars.dataLabels.prefix,
1684
- v: t,
1685
- s: e.value.style.chart.bars.dataLabels.suffix,
1686
- r: e.value.table.td.roundingValue
1687
- })), 1)
1688
- ]),
1689
- _: 1
1690
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"])
1691
- ]),
1692
- _: 2
1693
- }, [
1694
- e.value.table.useDialog ? {
1695
- name: "title",
1696
- fn: M(() => [
1697
- ua(F(xe.value.title), 1)
1698
- ]),
1699
- key: "0"
1700
- } : void 0,
1701
- e.value.table.useDialog ? {
1702
- name: "actions",
1703
- fn: M(() => [
1704
- Q("button", {
1705
- tabindex: "0",
1706
- class: "vue-ui-user-options-button",
1707
- onClick: l[3] || (l[3] = (t) => st(e.value.userOptions.callbacks.csv))
1708
- }, [
1709
- Le(m(wa), {
1710
- name: "excel",
1711
- stroke: xe.value.props.color
1712
- }, null, 8, ["stroke"])
1713
- ])
1714
- ]),
1715
- key: "1"
1716
- } : void 0
1717
- ]), 1040)) : b("", !0),
1718
- m(be) ? (r(), Z(Xl, { key: 8 })) : b("", !0)
1719
- ], 46, ss));
1720
- }
1721
- }, mr = /* @__PURE__ */ ls(Ks, [["__scopeId", "data-v-752f06ac"]]);
1722
- export {
1723
- mr as default
1724
- };