vue-data-ui 2.13.4 → 2.13.5-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/{Arrow-Cv5RKI2K.js → Arrow-nJWOreP4.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CbNaTai1.js → BaseDraggableDialog-IYfaPzLA.js} +2 -2
  3. package/dist/{BaseIcon-B90jg7Eo.js → BaseIcon-lwpKi6Wa.js} +1 -1
  4. package/dist/{ColorPicker-DrHXo6NB.js → ColorPicker-D8TZj-R5.js} +2 -2
  5. package/dist/{DataTable-DOdmEVBM.js → DataTable-CuFlXUxm.js} +2 -2
  6. package/dist/{Legend-D7As_VVi.js → Legend-DwNuhYnG.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-Qe1IsvyR.js → NonSvgPenAndPaper-D1qSfnYa.js} +3 -3
  8. package/dist/{PackageVersion-CJ0MHPau.js → PackageVersion-1psmmuzo.js} +2 -2
  9. package/dist/{PenAndPaper-CsV9xVqP.js → PenAndPaper-DgUkj01g.js} +3 -3
  10. package/dist/{Shape-CMT3DgWJ.js → Shape-CmlBrd-F.js} +1 -1
  11. package/dist/{Slicer-kZ-UNW0I.js → Slicer-B-5jXhhw.js} +161 -161
  12. package/dist/{SparkTooltip-DgaaFrSC.js → SparkTooltip-BGjRXPbu.js} +1 -1
  13. package/dist/{Title-Cuxd1Hw4.js → Title-BoKeR6i0.js} +1 -1
  14. package/dist/{Tooltip-nm6v9SvD.js → Tooltip-Df2iF7bv.js} +1 -1
  15. package/dist/{UserOptions-B4olqrwb.js → UserOptions-NrArsCuC.js} +2 -2
  16. package/dist/{dom-to-png-JxvpNdgk.js → dom-to-png-DK9TIQio.js} +1 -1
  17. package/dist/{img-BrSPXg54.js → img-CqqmkwDl.js} +1 -1
  18. package/dist/{index-DXfqC_CG.js → index-C137VZkI.js} +675 -656
  19. package/dist/{pdf-CRNRsa97.js → pdf-DTB7aasS.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +23 -0
  22. package/dist/types/vue-data-ui.d.ts +23 -0
  23. package/dist/{useNestedProp-CUF1PWxQ.js → useNestedProp-ZNu8JrRX.js} +1 -1
  24. package/dist/{usePrinter-DGQh_spY.js → usePrinter-B63T3abI.js} +2 -2
  25. package/dist/useTimeLabels-Mrr0jrpL.js +242 -0
  26. package/dist/{vue-data-ui-tkhMq-bw.js → vue-data-ui-CBTXw5iV.js} +63 -63
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-Dwdfdqch.js → vue-ui-3d-bar-DKF0Y325.js} +5 -5
  29. package/dist/{vue-ui-accordion-D-tjbzQS.js → vue-ui-accordion-BI2rBS5z.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-BZmYWVrS.js → vue-ui-age-pyramid-BDulR8Zn.js} +5 -5
  31. package/dist/{vue-ui-annotator-DBrXod-O.js → vue-ui-annotator-BokgyAXW.js} +2 -2
  32. package/dist/{vue-ui-bullet-ur-PTrPw.js → vue-ui-bullet-D5TWFElT.js} +6 -6
  33. package/dist/{vue-ui-candlestick-72UivaQY.js → vue-ui-candlestick-DHTA9GKN.js} +96 -96
  34. package/dist/{vue-ui-carousel-table-CApme8lg.js → vue-ui-carousel-table-Bw4rC-Mv.js} +4 -4
  35. package/dist/{vue-ui-chestnut-jcZZ8cOw.js → vue-ui-chestnut-DJAW8dTu.js} +4 -4
  36. package/dist/{vue-ui-chord-A9jGFNM2.js → vue-ui-chord-Drxbeh2P.js} +7 -7
  37. package/dist/{vue-ui-circle-pack-DPnOBq40.js → vue-ui-circle-pack-ClMdOEtG.js} +5 -5
  38. package/dist/{vue-ui-cursor-Cby6-Vrh.js → vue-ui-cursor-DaT20eFb.js} +2 -2
  39. package/dist/{vue-ui-dashboard-BGzORkrX.js → vue-ui-dashboard-z7pGTlMX.js} +62 -62
  40. package/dist/{vue-ui-digits-Dhxd38mc.js → vue-ui-digits-D6kq38s9.js} +2 -2
  41. package/dist/{vue-ui-donut-DsFBb3Cl.js → vue-ui-donut-_kVdFrZR.js} +7 -7
  42. package/dist/{vue-ui-donut-evolution-B-Bo4b4Y.js → vue-ui-donut-evolution-D5P6GSM6.js} +320 -313
  43. package/dist/{vue-ui-dumbbell-EVSJdr9V.js → vue-ui-dumbbell-DfZNlCK5.js} +6 -6
  44. package/dist/{vue-ui-flow-Cr1-ETyc.js → vue-ui-flow-DTx267Ka.js} +6 -6
  45. package/dist/{vue-ui-funnel-BQ0LckzE.js → vue-ui-funnel-B_J0AaMa.js} +83 -83
  46. package/dist/{vue-ui-galaxy-_fwGK1PY.js → vue-ui-galaxy-DtE48yJw.js} +4 -4
  47. package/dist/{vue-ui-gauge-BrnOoF9C.js → vue-ui-gauge-CAKj45DE.js} +5 -5
  48. package/dist/{vue-ui-gizmo-tgjSYkeV.js → vue-ui-gizmo-B-7-Lfai.js} +3 -3
  49. package/dist/{vue-ui-heatmap-CamaTaei.js → vue-ui-heatmap-3anHqH8-.js} +6 -6
  50. package/dist/{vue-ui-history-plot-DSBQu-9Y.js → vue-ui-history-plot-DfduurUS.js} +103 -103
  51. package/dist/{vue-ui-kpi-OCtgONK3.js → vue-ui-kpi-C_wEVoh0.js} +3 -3
  52. package/dist/{vue-ui-mini-loader--xzmMUNI.js → vue-ui-mini-loader-lGMkM8Kw.js} +2 -2
  53. package/dist/{vue-ui-molecule-DnkENzdw.js → vue-ui-molecule-fXW4ejgw.js} +4 -4
  54. package/dist/{vue-ui-mood-radar-DKP1rjSd.js → vue-ui-mood-radar-TuyuMkzg.js} +6 -6
  55. package/dist/{vue-ui-nested-donuts-CHwTDQ9J.js → vue-ui-nested-donuts-CtbOVaRR.js} +6 -6
  56. package/dist/{vue-ui-onion-BxaynRPn.js → vue-ui-onion-BV3A2JCN.js} +6 -6
  57. package/dist/{vue-ui-parallel-coordinate-plot-ohCDDK1Q.js → vue-ui-parallel-coordinate-plot-DJbeP86h.js} +175 -175
  58. package/dist/{vue-ui-quadrant-DXZsVWe3.js → vue-ui-quadrant-xaXINXWX.js} +7 -7
  59. package/dist/{vue-ui-quick-chart-C_ofgdSY.js → vue-ui-quick-chart-Dr1HyP8V.js} +464 -457
  60. package/dist/{vue-ui-radar-CLa2PHHK.js → vue-ui-radar-Cbqe4LM_.js} +6 -6
  61. package/dist/{vue-ui-rating-GiRUw1Wv.js → vue-ui-rating-FuSmmUE8.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-BJ1M2Pnc.js → vue-ui-relation-circle-kDNSenDo.js} +96 -96
  63. package/dist/{vue-ui-ridgeline-E_7xjHTY.js → vue-ui-ridgeline-DxtgFsg_.js} +317 -308
  64. package/dist/{vue-ui-rings-BiOAND3T.js → vue-ui-rings-DMx8sMKa.js} +7 -7
  65. package/dist/{vue-ui-scatter-Bai9QSqI.js → vue-ui-scatter-DX42tHz8.js} +7 -7
  66. package/dist/{vue-ui-skeleton-B2N_3mr0.js → vue-ui-skeleton-CO_Hk6A_.js} +3 -3
  67. package/dist/{vue-ui-smiley-DAvm3IGu.js → vue-ui-smiley-4lhGcbc2.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-D4EwvdX0.js → vue-ui-spark-trend-hGZ_JmgH.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-DM_2iDVI.js → vue-ui-sparkbar-BTf3c9Qn.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-UW6sVQdV.js → vue-ui-sparkgauge-oMfHC1dA.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-CF0JPKYB.js → vue-ui-sparkhistogram-DvVbSLEj.js} +4 -4
  72. package/dist/{vue-ui-sparkline-Dg8j2KTF.js → vue-ui-sparkline-BbmMxjnF.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-CqT_oEk7.js → vue-ui-sparkstackbar-ChREWvRl.js} +3 -3
  74. package/dist/vue-ui-stackbar-BNPLRyEN.js +1130 -0
  75. package/dist/{vue-ui-strip-plot-BR66rY0G.js → vue-ui-strip-plot-Ca1C6bZ_.js} +73 -73
  76. package/dist/{vue-ui-table-Dk0eXTU9.js → vue-ui-table-Cfb6eIU4.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-Brldpa0g.js → vue-ui-table-heatmap-BnjgK_PF.js} +5 -5
  78. package/dist/{vue-ui-table-sparkline-DxQrZBCR.js → vue-ui-table-sparkline-MJ8lvKbd.js} +4 -4
  79. package/dist/{vue-ui-thermometer-B_OrqIjE.js → vue-ui-thermometer-C2qisXo8.js} +5 -5
  80. package/dist/{vue-ui-timer-Cz0J-s5D.js → vue-ui-timer-By6_kV9k.js} +8 -8
  81. package/dist/{vue-ui-tiremarks-B1B3h-Vi.js → vue-ui-tiremarks-BU6rsols.js} +5 -5
  82. package/dist/{vue-ui-treemap-CMm6fSIO.js → vue-ui-treemap-DivJblJW.js} +7 -7
  83. package/dist/{vue-ui-vertical-bar-DA2Xpx46.js → vue-ui-vertical-bar-Dyt4yezz.js} +8 -8
  84. package/dist/{vue-ui-waffle-U3NxGQ3l.js → vue-ui-waffle-DSzMjANd.js} +7 -7
  85. package/dist/{vue-ui-wheel-WNOVLYp8.js → vue-ui-wheel-DFCGjYBy.js} +5 -5
  86. package/dist/{vue-ui-word-cloud-_TBCcmAV.js → vue-ui-word-cloud-BiG5zI03.js} +5 -5
  87. package/dist/{vue-ui-world-DREkLtrD.js → vue-ui-world-BhGGmeGq.js} +5 -5
  88. package/dist/{vue-ui-xy-CIiqKrxF.js → vue-ui-xy-CZpcKEkV.js} +680 -668
  89. package/dist/{vue-ui-xy-canvas-ClHv-Wlu.js → vue-ui-xy-canvas-B7fE9npn.js} +400 -392
  90. package/package.json +1 -1
  91. package/dist/vue-ui-stackbar-By7DVfJV.js +0 -1132
@@ -1,1132 +0,0 @@
1
- import { defineAsyncComponent as Y, useSlots as Yt, computed as w, ref as m, onMounted as rt, watch as ot, shallowRef as st, onBeforeUnmount as Xt, nextTick as ye, createElementBlock as s, openBlock as o, unref as y, normalizeStyle as X, normalizeClass as re, createBlock as Q, createCommentVNode as h, renderSlot as x, createElementVNode as G, createVNode as oe, createSlots as it, withCtx as _, normalizeProps as E, guardReactiveProps as F, Fragment as v, renderList as g, mergeProps as Le, toDisplayString as $, createTextVNode as Gt } from "vue";
2
- import { u as Jt, c as nt, t as qt, p as ge, a as Zt, C as be, b as Kt, o as Qt, e as ut, g as jt, d as ea, ak as fe, ah as ct, D as vt, X as ta, l as aa, a6 as me, G as ht, f as J, x as dt, q as la, r as ra, i as yt, y as oa } from "./index-DXfqC_CG.js";
3
- import { u as gt } from "./useNestedProp-CUF1PWxQ.js";
4
- import { t as sa, u as ia } from "./useResponsive-JZ9xq-JV.js";
5
- import { u as na } from "./usePrinter-DGQh_spY.js";
6
- import { u as ua } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as ca } from "./useChartAccessibility-9icAAmYg.js";
8
- import va from "./Legend-D7As_VVi.js";
9
- import { S as ha } from "./Slicer-kZ-UNW0I.js";
10
- import da from "./Title-Cuxd1Hw4.js";
11
- import { _ as ya } from "./Shape-CMT3DgWJ.js";
12
- import { _ as ga } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const ba = ["id"], fa = ["xmlns", "viewBox"], ma = ["x", "y", "width", "height"], pa = { key: 1 }, xa = ["id"], ka = ["stop-color"], wa = ["stop-color"], za = ["stop-color"], Ca = ["x1", "x2", "y1", "y2", "stroke"], _a = ["x1", "x2", "y1", "y2", "stroke"], La = ["x1", "x2", "y1", "y2", "stroke"], Sa = ["x1", "x2", "y1", "y2", "stroke"], $a = { key: 0 }, Ma = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], Ta = { key: 0 }, Na = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], Ia = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], Oa = { key: 0 }, Ra = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], Pa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Aa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Va = ["x", "y", "font-size", "fill", "font-weight"], Ea = ["transform", "font-size", "fill", "font-weight"], Fa = ["x", "y", "font-size", "fill", "font-weight"], Da = { key: 0 }, Ha = ["x", "y", "font-size", "font-weight", "fill"], Wa = ["x", "y", "font-size", "fill", "font-weight"], Ba = { key: 0 }, Ua = ["x", "y", "font-size", "font-weight", "fill"], Ya = ["x1", "x2", "y1", "y2", "stroke"], Xa = ["x", "y", "font-size", "font-weight", "fill"], Ga = ["x1", "x2", "y1", "y2", "stroke"], Ja = ["font-size", "font-weight", "fill", "text-anchor", "transform"], qa = { key: 0 }, Za = { key: 1 }, Ka = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], Qa = { key: 0 }, ja = { key: 1 }, el = ["font-size", "font-weight", "fill", "x", "y", "onClick"], tl = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], al = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], ll = {
14
- key: 4,
15
- class: "vue-data-ui-watermark"
16
- }, rl = ["onClick"], ol = ["innerHTML"], sl = {
17
- __name: "vue-ui-stackbar",
18
- props: {
19
- config: {
20
- type: Object,
21
- default() {
22
- return {};
23
- }
24
- },
25
- dataset: {
26
- type: Array,
27
- default() {
28
- return [];
29
- }
30
- }
31
- },
32
- emits: ["selectDatapoint", "selectLegend", "selectTimeLabel"],
33
- setup(pe, { expose: bt, emit: ft }) {
34
- const mt = Y(() => import("./vue-ui-accordion-D-tjbzQS.js")), pt = Y(() => import("./DataTable-DOdmEVBM.js")), xt = Y(() => import("./PackageVersion-CJ0MHPau.js")), kt = Y(() => import("./PenAndPaper-CsV9xVqP.js")), wt = Y(() => import("./vue-ui-skeleton-B2N_3mr0.js")), zt = Y(() => import("./Tooltip-nm6v9SvD.js")), Ct = Y(() => import("./UserOptions-B4olqrwb.js")), { vue_ui_stackbar: _t } = Jt(), Lt = Yt(), b = pe, xe = ft, q = w({
35
- get() {
36
- return !!b.dataset && b.dataset.length;
37
- },
38
- set(a) {
39
- return a;
40
- }
41
- }), j = m(null), O = m(nt()), se = m(!1), ke = m(null), we = m(""), L = m([]), Se = m(0), $e = m(null), Me = m(null), Te = m(null), Ne = m(null), Ie = m(0), ie = m(!1), ee = m(null), D = m(!1), St = m(0), $t = m(0), Mt = m(0), Z = m(null);
42
- rt(() => {
43
- Ce();
44
- });
45
- const e = w({
46
- get: () => Ae(),
47
- set: (a) => a
48
- }), { userOptionsVisible: ze, setUserOptionsVisibility: Oe, keepUserOptionState: Re } = ua({ config: e.value }), { svgRef: Pe } = ca({ config: e.value.style.chart.title });
49
- function Ae() {
50
- const a = gt({
51
- userConfig: b.config,
52
- defaultConfig: _t
53
- });
54
- let r = {};
55
- return a.theme ? r = {
56
- ...gt({
57
- userConfig: Zt.vue_ui_stackbar[a.theme] || b.config,
58
- defaultConfig: a
59
- }),
60
- customPalette: qt[a.theme] || ge
61
- } : r = a, b.config && be(b.config, "style.chart.grid.scale.scaleMin") ? r.style.chart.grid.scale.scaleMin = b.config.style.chart.grid.scale.scaleMin : r.style.chart.grid.scale.scaleMin = null, b.config && be(b.config, "style.chart.grid.scale.scaleMax") ? r.style.chart.grid.scale.scaleMax = b.config.style.chart.grid.scale.scaleMax : r.style.chart.grid.scale.scaleMax = null, b.config && be(b.config, "style.chart.zoom.startIndex") ? r.style.chart.zoom.startIndex = b.config.style.chart.zoom.startIndex : r.style.chart.zoom.startIndex = null, b.config && be(b.config, "style.chart.zoom.endIndex") ? r.style.chart.zoom.endIndex = b.config.style.chart.zoom.endIndex : r.style.chart.zoom.endIndex = null, r;
62
- }
63
- ot(() => b.config, (a) => {
64
- e.value = Ae(), ze.value = !e.value.userOptions.showOnChartHover, Ce(), St.value += 1, $t.value += 1, Mt.value += 1, z.value.dataLabels.show = e.value.style.chart.bars.dataLabels.show, z.value.showTable = e.value.table.show, z.value.showTooltip = e.value.style.chart.tooltip.show;
65
- }, { deep: !0 }), ot(() => b.dataset, (a) => {
66
- We();
67
- }, { deep: !0 });
68
- const z = m({
69
- dataLabels: {
70
- show: e.value.style.chart.bars.dataLabels.show
71
- },
72
- showTable: e.value.table.show,
73
- showTooltip: e.value.style.chart.tooltip.show
74
- }), { isPrinting: Ve, isImaging: Ee, generatePdf: Fe, generateImage: De } = na({
75
- elementId: `stackbar_${O.value}`,
76
- fileName: e.value.style.chart.title.text || "vue-ui-stackbar",
77
- options: e.value.userOptions.print
78
- }), ne = m({
79
- width: e.value.style.chart.width,
80
- height: e.value.style.chart.height,
81
- paddingRatio: {
82
- top: e.value.style.chart.padding.top / e.value.style.chart.height,
83
- right: e.value.style.chart.padding.right / e.value.style.chart.width,
84
- bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
85
- left: e.value.style.chart.padding.left / e.value.style.chart.width
86
- }
87
- }), Tt = w(() => Kt(e.value.customPalette)), R = st(null), K = st(null), He = m(null);
88
- rt(() => {
89
- Ce();
90
- });
91
- function Ce() {
92
- if (Qt(b.dataset) ? ut({
93
- componentName: "VueUiStackbar",
94
- type: "dataset"
95
- }) : b.dataset.forEach((a, r) => {
96
- jt({
97
- datasetObject: a,
98
- requiredAttributes: ["name", "series"]
99
- }).forEach((t) => {
100
- q.value = !1, ut({
101
- componentName: "VueUiStackbar",
102
- type: "datasetSerieAttribute",
103
- property: t,
104
- index: r
105
- });
106
- });
107
- }), setTimeout(() => {
108
- D.value = !0;
109
- }, 10), e.value.responsive) {
110
- const a = sa(() => {
111
- D.value = !1;
112
- const { width: r, height: t } = ia({
113
- chart: j.value,
114
- title: e.value.style.chart.title.text ? $e.value : null,
115
- legend: e.value.style.chart.legend.show ? Me.value : null,
116
- slicer: e.value.style.chart.zoom.show && A.value > 1 ? Te.value : null,
117
- source: Ne.value
118
- });
119
- requestAnimationFrame(() => {
120
- ne.value.width = r, ne.value.height = t, clearTimeout(He.value), He.value = setTimeout(() => {
121
- D.value = !0;
122
- }, 10);
123
- });
124
- });
125
- R.value && (K.value && R.value.unobserve(K.value), R.value.disconnect()), R.value = new ResizeObserver(a), K.value = j.value.parentNode, R.value.observe(K.value);
126
- }
127
- Be();
128
- }
129
- Xt(() => {
130
- R.value && (K.value && R.value.unobserve(K.value), R.value.disconnect());
131
- });
132
- const i = w(() => {
133
- const { height: a, width: r } = ne.value, { right: t } = ne.value.paddingRatio, l = e.value.style.chart.padding.top, u = r - r * t, n = a - e.value.style.chart.padding.bottom, C = e.value.style.chart.padding.left, H = r - C - r * t, W = a - l - e.value.style.chart.padding.bottom;
134
- return {
135
- chartHeight: a,
136
- chartWidth: r,
137
- top: l,
138
- right: u,
139
- bottom: n,
140
- left: C,
141
- width: H,
142
- height: W < 0 ? 0 : W
143
- };
144
- }), P = w(() => b.dataset.map((a, r) => {
145
- const t = ea(a.color) || Tt.value[r] || ge[r] || ge[r % ge.length];
146
- return {
147
- ...a,
148
- // In distributed mode, all values are converted to positive
149
- series: JSON.parse(JSON.stringify(a.series)).map((l) => e.value.style.chart.bars.distributed ? Math.abs(l) : l),
150
- // Store signs to manage display of neg values in distributed mode
151
- signedSeries: a.series.map((l) => l >= 0 ? 1 : -1),
152
- absoluteIndex: r,
153
- id: nt(),
154
- color: t
155
- };
156
- })), A = w(() => Math.max(...P.value.filter((a) => !L.value.includes(a.id)).map((a) => a.series.length))), c = m({
157
- start: 0,
158
- end: Math.max(...b.dataset.map((a) => a.series.length))
159
- });
160
- function We() {
161
- Be();
162
- }
163
- async function Be() {
164
- (e.value.style.chart.zoom.startIndex !== null || e.value.style.chart.zoom.endIndex !== null) && Z.value ? (e.value.style.chart.zoom.startIndex !== null && (await ye(), await ye(), Z.value && Z.value.setStartValue(e.value.style.chart.zoom.startIndex)), e.value.style.chart.zoom.endIndex !== null && (await ye(), await ye(), Z.value && Z.value.setEndValue(Nt(e.value.style.chart.zoom.endIndex + 1)))) : (c.value = {
165
- start: 0,
166
- end: Math.max(...b.dataset.map((a) => a.series.length))
167
- }, Ie.value += 1);
168
- }
169
- function Nt(a) {
170
- const r = Math.max(...b.dataset.map((t) => t.series.length));
171
- return a > r ? r : a < 0 || e.value.style.chart.zoom.startIndex !== null && a < e.value.style.chart.zoom.startIndex ? e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex + 1 : 1 : a;
172
- }
173
- const d = w(() => {
174
- let a;
175
- return e.value.orientation === "vertical" ? a = i.value.width / (c.value.end - c.value.start) : a = i.value.height / (c.value.end - c.value.start), a <= 0 ? 0 : a;
176
- }), te = w(() => fe(P.value.filter((a) => !L.value.includes(a.id))).slice(c.value.start, c.value.end)), It = w(() => fe(P.value.filter((a) => !L.value.includes(a.id)).map((a) => ({
177
- ...a,
178
- series: a.series.map((r, t) => a.signedSeries[t] === -1 && r >= 0 ? -r : r)
179
- }))).slice(c.value.start, c.value.end)), ue = w(() => {
180
- const a = P.value.filter((r) => !L.value.includes(r.id));
181
- return {
182
- positive: fe(a.map((r) => ({
183
- ...r,
184
- series: r.series.slice(c.value.start, c.value.end).map((t) => t >= 0 ? t : 0)
185
- }))),
186
- negative: fe(a.map((r) => ({
187
- ...r,
188
- series: r.series.slice(c.value.start, c.value.end).map((t) => t < 0 ? t : 0)
189
- })))
190
- };
191
- }), N = w(() => {
192
- 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(...ue.value.positive), r = Math.min(...ue.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(r) ? 0 : r, l = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? ct(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks) : vt(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks);
193
- return l.ticks.map((u) => ({
194
- zero: i.value.bottom - i.value.height * (Math.abs(l.min) / (l.max + Math.abs(l.min))),
195
- y: i.value.bottom - i.value.height * ((u + Math.abs(l.min)) / (l.max + Math.abs(l.min))),
196
- x: i.value.left - 8,
197
- horizontal_zero: i.value.left + i.value.width * (Math.abs(l.min) / (l.max + Math.abs(l.min))),
198
- horizontal_x: i.value.left + i.value.width * ((u + Math.abs(l.min)) / (l.max + Math.abs(l.min))),
199
- horizontal_y: i.value.bottom - 8,
200
- value: u
201
- }));
202
- }), V = w(() => {
203
- const a = [];
204
- for (let r = 0; r < A.value; r += 1)
205
- a.push({
206
- text: e.value.style.chart.grid.x.timeLabels.values[r] || String(r),
207
- absoluteIndex: r
208
- });
209
- return a.slice(c.value.start, c.value.end);
210
- }), k = w(() => {
211
- if (!q.value) return [];
212
- let a = Array(A.value).fill(0), r = Array(A.value).fill(0), t = Array(A.value).fill(0), l = Array(A.value).fill(0);
213
- const u = Math.max(...ue.value.positive) || 0, n = Math.min(...ue.value.negative), C = [-1 / 0, 1 / 0, NaN, void 0, null].includes(n) ? 0 : n, H = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? ct(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : C > 0 ? 0 : C, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : u < 0 ? 0 : u, e.value.style.chart.grid.scale.ticks) : vt(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : C > 0 ? 0 : C, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : u < 0 ? 0 : u, e.value.style.chart.grid.scale.ticks), { min: W, max: ae } = H, B = ae + (W >= 0 ? 0 : Math.abs(W)) || 1, S = i.value.height, de = i.value.width, at = N.value[0] ? N.value[0].zero : i.value.bottom, lt = N.value[0] ? N.value[0].horizontal_zero : i.value.left;
214
- return P.value.filter((le) => !L.value.includes(le.id)).map((le) => {
215
- const I = le.series.slice(c.value.start, c.value.end), Vt = le.signedSeries.slice(c.value.start, c.value.end), Et = I.map((f, p) => i.value.left + d.value * p + d.value * e.value.style.chart.bars.gapRatio / 4), Ft = I.map((f, p) => i.value.top + d.value * p + d.value * e.value.style.chart.bars.gapRatio / 4), Dt = I.map((f, p) => {
216
- const M = e.value.style.chart.bars.distributed ? (f || 0) / te.value[p] : (f || 0) / B;
217
- let U, T;
218
- return f > 0 ? (T = S * M, U = at - T - a[p], a[p] += T) : (T = S * M, U = at + t[p], t[p] += Math.abs(T)), U;
219
- }), Ht = I.map((f, p) => {
220
- const M = e.value.style.chart.bars.distributed ? (f || 0) / te.value[p] : (f || 0) / B;
221
- let U, T;
222
- return f > 0 ? (T = de * M, U = lt + r[p], r[p] += T) : (T = de * M, U = lt - Math.abs(T) - l[p], l[p] += Math.abs(T)), U;
223
- }), Wt = I.map((f, p) => {
224
- const M = e.value.style.chart.bars.distributed ? (f || 0) / te.value[p] : (f || 0) / B;
225
- return f > 0 ? S * M : S * Math.abs(M);
226
- }), Bt = I.map((f, p) => {
227
- const M = e.value.style.chart.bars.distributed ? (f || 0) / te.value[p] : (f || 0) / B;
228
- return f > 0 ? de * M : de * Math.abs(M);
229
- }), Ut = I.map((f) => Math.abs(f)).reduce((f, p) => f + p, 0);
230
- return {
231
- ...le,
232
- proportions: I.map((f, p) => e.value.style.chart.bars.distributed ? (f || 0) / te.value[p] : (f || 0) / Ut),
233
- series: I,
234
- signedSeries: Vt,
235
- x: Et,
236
- y: Dt,
237
- height: Wt,
238
- horizontal_width: Bt,
239
- horizontal_y: Ft,
240
- horizontal_x: Ht
241
- };
242
- });
243
- }), Ue = w(() => It.value.map((a, r) => ({
244
- value: a,
245
- sign: a >= 0 ? 1 : -1
246
- })));
247
- function ce(a, r, t, l, u) {
248
- const n = u === -1 && a >= 0 ? -a : a;
249
- return yt(
250
- e.value.style.chart.bars.dataLabels.formatter,
251
- n,
252
- J({
253
- p: e.value.style.chart.bars.dataLabels.prefix,
254
- v: n,
255
- s: e.value.style.chart.bars.dataLabels.suffix,
256
- r: e.value.style.chart.bars.dataLabels.rounding
257
- }),
258
- { datapoint: r, seriesIndex: t, datapointIndex: l }
259
- );
260
- }
261
- function Ye(a, r, t, l) {
262
- return yt(
263
- e.value.style.chart.bars.dataLabels.formatter,
264
- a,
265
- J({
266
- v: isNaN(a) ? 0 : a,
267
- s: "%",
268
- r: e.value.style.chart.bars.dataLabels.rounding
269
- }),
270
- { datapoint: r, seriesIndex: t, datapointIndex: l }
271
- );
272
- }
273
- function Xe(a) {
274
- const r = JSON.parse(JSON.stringify(k.value)).map((t) => ({
275
- name: t.name,
276
- value: t.series[a] === 0 ? 0 : t.series[a] || null,
277
- proportion: t.proportions[a] || null,
278
- color: t.color,
279
- id: t.id
280
- }));
281
- xe("selectDatapoint", { datapoint: r, period: V.value[a] });
282
- }
283
- function Ge(a) {
284
- ee.value = a, se.value = !0;
285
- const r = e.value.style.chart.tooltip.customFormat, t = JSON.parse(JSON.stringify(k.value)).map((u) => ({
286
- name: u.name,
287
- absoluteIndex: u.absoluteIndex,
288
- value: u.series[a] === 0 ? 0 : (u.signedSeries[a] === -1 && u.series[a] >= 0 ? -u.series[a] : u.series[a]) || null,
289
- proportion: u.proportions[a] || null,
290
- color: u.color,
291
- id: u.id
292
- }));
293
- ke.value = {
294
- datapoint: t,
295
- seriesIndex: a,
296
- config: e.value,
297
- series: k.value
298
- };
299
- const l = t.map((u) => Math.abs(u.value)).reduce((u, n) => u + n, 0);
300
- if (dt(r) && oa(() => r({
301
- seriesIndex: a,
302
- datapoint: t,
303
- series: k.value,
304
- config: e.value
305
- })))
306
- we.value = r({
307
- seriesIndex: a,
308
- datapoint: t,
309
- series: k.value,
310
- config: e.value
311
- });
312
- else {
313
- const {
314
- showValue: u,
315
- showPercentage: n,
316
- borderColor: C,
317
- roundingValue: H,
318
- roundingPercentage: W
319
- } = e.value.style.chart.tooltip;
320
- let ae = "";
321
- V.value[a] && V.value[a].text && e.value.style.chart.tooltip.showTimeLabel && (ae += `<div style="width:100%;text-align:center;border-bottom:1px solid ${C};padding-bottom:6px;margin-bottom:3px;">${V.value[a].text}</div>`);
322
- const B = [
323
- u && n ? "(" : "",
324
- u && n ? ")" : ""
325
- ];
326
- t.reverse().forEach((S) => {
327
- ae += `
328
- <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
329
- <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_${S.id})` : S.color}"/>${Lt.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${O.value}_${S.absoluteIndex})"/>` : ""}</svg>
330
- ${S.name}${u || n ? ":" : ""} ${u ? J({
331
- p: e.value.style.chart.bars.dataLabels.prefix,
332
- v: S.value,
333
- s: e.value.style.chart.bars.dataLabels.suffix,
334
- r: H
335
- }) : ""} ${B[0]}${n ? J({
336
- v: isNaN(S.value / l) ? 0 : Math.abs(S.value) / l * 100,
337
- // Negs are absed to show relative proportion to absolute total. It's opinionated.
338
- s: "%",
339
- r: W
340
- }) : ""}${B[1]}
341
- </div>
342
- `;
343
- }), we.value = `<div>${ae}</div>`;
344
- }
345
- }
346
- function Ot(a) {
347
- ie.value = a, Se.value += 1;
348
- }
349
- function Je() {
350
- z.value.showTable = !z.value.showTable;
351
- }
352
- function qe() {
353
- z.value.dataLabels.show = !z.value.dataLabels.show;
354
- }
355
- function Ze() {
356
- z.value.showTooltip = !z.value.showTooltip;
357
- }
358
- function Rt() {
359
- return k.value;
360
- }
361
- const Ke = w(() => {
362
- if (k.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
363
- const a = k.value.map(({ name: t, color: l }) => ({
364
- label: t,
365
- color: l
366
- })), r = [];
367
- for (let t = c.value.start; t < c.value.end; t += 1) {
368
- const l = [e.value.style.chart.grid.x.timeLabels.values[t] || t + 1];
369
- P.value.forEach((u) => {
370
- l.push(Number((u.series[t] || 0).toFixed(e.value.table.td.roundingValue)));
371
- }), r.push(l);
372
- }
373
- return { head: a, body: r };
374
- });
375
- function Qe(a = null) {
376
- const r = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], t = ["", ...Ke.value.head.map((C) => C.label)], l = Ke.value.body, u = r.concat([t]).concat(l), n = la(u);
377
- a ? a(n) : ra({ csvContent: n, title: e.value.style.chart.title.text || "vue-ui-stackbar" });
378
- }
379
- const ve = w(() => {
380
- const a = [""].concat(k.value.map((u) => u.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>');
381
- let r = [];
382
- for (let u = 0; u < A.value; u += 1) {
383
- const n = k.value.map((C) => C.series[u] ?? 0).reduce((C, H) => C + H, 0);
384
- r.push([e.value.style.chart.grid.x.timeLabels.values.slice(c.value.start, c.value.end)[u] ?? u + 1].concat(k.value.map((C) => (C.series[u] ?? 0).toFixed(e.value.table.td.roundingValue))).concat((n ?? 0).toFixed(e.value.table.td.roundingValue)));
385
- }
386
- const t = {
387
- th: {
388
- backgroundColor: e.value.table.th.backgroundColor,
389
- color: e.value.table.th.color,
390
- outline: e.value.table.th.outline
391
- },
392
- td: {
393
- backgroundColor: e.value.table.td.backgroundColor,
394
- color: e.value.table.td.color,
395
- outline: e.value.table.td.outline
396
- },
397
- breakpoint: e.value.table.responsiveBreakpoint
398
- }, l = [e.value.table.columnNames.period].concat(k.value.map((u) => u.name)).concat(e.value.table.columnNames.total);
399
- return { head: a, body: r.slice(0, c.value.end - c.value.start), config: t, colNames: l };
400
- });
401
- function Pt(a, r) {
402
- if (xe("selectLegend", k.value.find((t) => t.absoluteIndex === a)), L.value.includes(r.id))
403
- L.value = L.value.filter((t) => t !== r.id);
404
- else {
405
- if (L.value.length === P.value.length - 1) return;
406
- L.value.push(r.id);
407
- }
408
- }
409
- const je = w(() => P.value.map((a, r) => ({
410
- ...a,
411
- shape: "square"
412
- })).map((a) => ({
413
- ...a,
414
- opacity: L.value.includes(a.id) ? 0.5 : 1,
415
- segregate: () => Pt(a.absoluteIndex, a),
416
- isSegregated: L.value.includes(a.id)
417
- }))), At = w(() => ({
418
- cy: "stackbar-legend",
419
- backgroundColor: e.value.style.chart.legend.backgroundColor,
420
- color: e.value.style.chart.legend.color,
421
- fontSize: e.value.style.chart.legend.fontSize,
422
- paddingBottom: 12,
423
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
424
- })), he = m(!1);
425
- function _e() {
426
- he.value = !he.value;
427
- }
428
- function et(a, r) {
429
- const t = JSON.parse(JSON.stringify(k.value)).map((l) => ({
430
- name: l.name,
431
- value: l.series[r] === 0 ? 0 : (l.signedSeries[r] === -1 && l.series[r] >= 0 ? -l.series[r] : l.series[r]) || null,
432
- proportion: l.proportions[r] || null,
433
- color: l.color,
434
- id: l.id
435
- }));
436
- xe("selectTimeLabel", {
437
- datapoint: t,
438
- absoluteIndex: a.absoluteIndex,
439
- label: a.text
440
- });
441
- }
442
- function tt(a, r) {
443
- return e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? e.value.style.chart.bars.dataLabels.hideEmptyPercentages ? r > 0 : !0 : e.value.style.chart.bars.dataLabels.hideEmptyValues ? a !== 0 : !0;
444
- }
445
- return bt({
446
- getData: Rt,
447
- generatePdf: Fe,
448
- generateCsv: Qe,
449
- generateImage: De,
450
- toggleTable: Je,
451
- toggleLabels: qe,
452
- toggleTooltip: Ze,
453
- toggleAnnotator: _e
454
- }), (a, r) => (o(), s("div", {
455
- id: `stackbar_${O.value}`,
456
- ref_key: "stackbarChart",
457
- ref: j,
458
- class: re({ "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": ie.value }),
459
- style: X(`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%" : ""}`),
460
- onMouseenter: r[6] || (r[6] = () => y(Oe)(!0)),
461
- onMouseleave: r[7] || (r[7] = () => y(Oe)(!1))
462
- }, [
463
- e.value.userOptions.buttons.annotator ? (o(), Q(y(kt), {
464
- key: 0,
465
- svgRef: y(Pe),
466
- backgroundColor: e.value.style.chart.backgroundColor,
467
- color: e.value.style.chart.color,
468
- active: he.value,
469
- onClose: _e
470
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : h("", !0),
471
- x(a.$slots, "userConfig", {}, void 0, !0),
472
- e.value.style.chart.title.text ? (o(), s("div", {
473
- key: 1,
474
- ref_key: "chartTitle",
475
- ref: $e,
476
- style: "width:100%;background:transparent;padding-bottom:24px"
477
- }, [
478
- oe(da, {
479
- config: {
480
- title: {
481
- cy: "stackbar-title",
482
- ...e.value.style.chart.title
483
- },
484
- subtitle: {
485
- cy: "stackbar-subtitle",
486
- ...e.value.style.chart.title.subtitle
487
- }
488
- }
489
- }, null, 8, ["config"])
490
- ], 512)) : h("", !0),
491
- e.value.userOptions.show && q.value && (y(Re) || y(ze)) ? (o(), Q(y(Ct), {
492
- ref: "details",
493
- key: `user_option_${Se.value}`,
494
- backgroundColor: e.value.style.chart.backgroundColor,
495
- color: e.value.style.chart.color,
496
- isPrinting: y(Ve),
497
- isImaging: y(Ee),
498
- uid: O.value,
499
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
500
- hasPdf: e.value.userOptions.buttons.pdf,
501
- hasImg: e.value.userOptions.buttons.img,
502
- hasXls: e.value.userOptions.buttons.csv,
503
- hasTable: e.value.userOptions.buttons.table,
504
- hasLabel: e.value.userOptions.buttons.labels,
505
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
506
- isFullscreen: ie.value,
507
- chartElement: j.value,
508
- position: e.value.userOptions.position,
509
- isTooltip: z.value.showTooltip,
510
- titles: { ...e.value.userOptions.buttonTitles },
511
- hasAnnotator: e.value.userOptions.buttons.annotator,
512
- isAnnotation: he.value,
513
- callbacks: e.value.userOptions.callbacks,
514
- onToggleFullscreen: Ot,
515
- onGeneratePdf: y(Fe),
516
- onGenerateCsv: Qe,
517
- onGenerateImage: y(De),
518
- onToggleTable: Je,
519
- onToggleLabels: qe,
520
- onToggleTooltip: Ze,
521
- onToggleAnnotator: _e,
522
- style: X({
523
- visibility: y(Re) ? y(ze) ? "visible" : "hidden" : "visible"
524
- })
525
- }, it({ _: 2 }, [
526
- a.$slots.menuIcon ? {
527
- name: "menuIcon",
528
- fn: _(({ isOpen: t, color: l }) => [
529
- x(a.$slots, "menuIcon", E(F({ isOpen: t, color: l })), void 0, !0)
530
- ]),
531
- key: "0"
532
- } : void 0,
533
- a.$slots.optionTooltip ? {
534
- name: "optionTooltip",
535
- fn: _(() => [
536
- x(a.$slots, "optionTooltip", {}, void 0, !0)
537
- ]),
538
- key: "1"
539
- } : void 0,
540
- a.$slots.optionPdf ? {
541
- name: "optionPdf",
542
- fn: _(() => [
543
- x(a.$slots, "optionPdf", {}, void 0, !0)
544
- ]),
545
- key: "2"
546
- } : void 0,
547
- a.$slots.optionCsv ? {
548
- name: "optionCsv",
549
- fn: _(() => [
550
- x(a.$slots, "optionCsv", {}, void 0, !0)
551
- ]),
552
- key: "3"
553
- } : void 0,
554
- a.$slots.optionImg ? {
555
- name: "optionImg",
556
- fn: _(() => [
557
- x(a.$slots, "optionImg", {}, void 0, !0)
558
- ]),
559
- key: "4"
560
- } : void 0,
561
- a.$slots.optionTable ? {
562
- name: "optionTable",
563
- fn: _(() => [
564
- x(a.$slots, "optionTable", {}, void 0, !0)
565
- ]),
566
- key: "5"
567
- } : void 0,
568
- a.$slots.optionLabels ? {
569
- name: "optionLabels",
570
- fn: _(() => [
571
- x(a.$slots, "optionLabels", {}, void 0, !0)
572
- ]),
573
- key: "6"
574
- } : void 0,
575
- a.$slots.optionFullscreen ? {
576
- name: "optionFullscreen",
577
- fn: _(({ toggleFullscreen: t, isFullscreen: l }) => [
578
- x(a.$slots, "optionFullscreen", E(F({ toggleFullscreen: t, isFullscreen: l })), void 0, !0)
579
- ]),
580
- key: "7"
581
- } : void 0,
582
- a.$slots.optionAnnotator ? {
583
- name: "optionAnnotator",
584
- fn: _(({ toggleAnnotator: t, isAnnotator: l }) => [
585
- x(a.$slots, "optionAnnotator", E(F({ toggleAnnotator: t, isAnnotator: l })), void 0, !0)
586
- ]),
587
- key: "8"
588
- } : void 0
589
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "onGeneratePdf", "onGenerateImage", "style"])) : h("", !0),
590
- q.value ? (o(), s("svg", {
591
- key: 3,
592
- ref_key: "svgRef",
593
- ref: Pe,
594
- xmlns: y(ta),
595
- viewBox: `0 0 ${i.value.chartWidth <= 0 ? 10 : i.value.chartWidth} ${i.value.chartHeight <= 0 ? 10 : i.value.chartHeight}`,
596
- style: X(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
597
- }, [
598
- oe(y(xt)),
599
- a.$slots["chart-background"] ? (o(), s("foreignObject", {
600
- key: 0,
601
- x: i.value.left,
602
- y: i.value.top,
603
- width: i.value.width <= 0 ? 10 : i.value.width,
604
- height: i.value.height <= 0 ? 10 : i.value.height,
605
- style: {
606
- pointerEvents: "none"
607
- }
608
- }, [
609
- x(a.$slots, "chart-background", {}, void 0, !0)
610
- ], 8, ma)) : h("", !0),
611
- e.value.style.chart.bars.gradient.show ? (o(), s("defs", pa, [
612
- (o(!0), s(v, null, g(k.value, (t, l) => (o(), s("linearGradient", {
613
- id: `gradient_${t.id}`,
614
- x1: "0%",
615
- y1: "0%",
616
- x2: "0%",
617
- y2: "100%"
618
- }, [
619
- G("stop", {
620
- offset: "0%",
621
- "stop-color": t.color
622
- }, null, 8, ka),
623
- G("stop", {
624
- offset: "61.8%",
625
- "stop-color": y(aa)(t.color, e.value.style.chart.bars.gradient.intensity / 100)
626
- }, null, 8, wa),
627
- G("stop", {
628
- offset: "100%",
629
- "stop-color": t.color
630
- }, null, 8, za)
631
- ], 8, xa))), 256))
632
- ])) : h("", !0),
633
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "vertical" ? (o(!0), s(v, { key: 2 }, g(N.value, (t, l) => (o(), s("line", {
634
- x1: i.value.left,
635
- x2: i.value.right,
636
- y1: t.y,
637
- y2: t.y,
638
- stroke: e.value.style.chart.grid.x.axisColor,
639
- "stroke-width": 1,
640
- "stroke-linecap": "round"
641
- }, null, 8, Ca))), 256)) : h("", !0),
642
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (o(!0), s(v, { key: 3 }, g(c.value.end - c.value.start + 1, (t, l) => (o(), s("line", {
643
- x1: i.value.left,
644
- x2: i.value.right,
645
- y1: i.value.top + d.value * l,
646
- y2: i.value.top + d.value * l,
647
- stroke: e.value.style.chart.grid.y.axisColor,
648
- "stroke-width": 1,
649
- "stroke-linecap": "round"
650
- }, null, 8, _a))), 256)) : h("", !0),
651
- e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "vertical" ? (o(!0), s(v, { key: 4 }, g(c.value.end - c.value.start + 1, (t, l) => (o(), s("line", {
652
- x1: i.value.left + d.value * l,
653
- x2: i.value.left + d.value * l,
654
- y1: i.value.top,
655
- y2: i.value.bottom,
656
- stroke: e.value.style.chart.grid.y.axisColor,
657
- "stroke-width": 1,
658
- "stroke-linecap": "round"
659
- }, null, 8, La))), 256)) : h("", !0),
660
- e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (o(!0), s(v, { key: 5 }, g(N.value, (t, l) => (o(), s("line", {
661
- x1: t.horizontal_x,
662
- x2: t.horizontal_x,
663
- y1: i.value.top,
664
- y2: i.value.bottom,
665
- stroke: e.value.style.chart.grid.x.axisColor,
666
- "stroke-width": 1,
667
- "stroke-linecap": "round"
668
- }, null, 8, Sa))), 256)) : h("", !0),
669
- (o(!0), s(v, null, g(k.value, (t, l) => (o(), s("g", null, [
670
- a.$slots.pattern ? (o(), s("defs", $a, [
671
- x(a.$slots, "pattern", Le({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${O.value}_${t.absoluteIndex}` }), void 0, !0)
672
- ])) : h("", !0),
673
- e.value.orientation === "vertical" ? (o(), s(v, { key: 1 }, [
674
- (o(!0), s(v, null, g(t.x, (u, n) => (o(), s("rect", {
675
- x: u,
676
- y: t.y[n] < 0 ? 0 : t.y[n],
677
- height: t.height[n] < 0 ? 1e-4 : t.height[n] || 0,
678
- rx: e.value.style.chart.bars.borderRadius > t.height[n] / 2 ? (t.height[n] < 0 ? 0 : t.height[n]) / 2 : e.value.style.chart.bars.borderRadius,
679
- width: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
680
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
681
- stroke: e.value.style.chart.backgroundColor,
682
- "stroke-width": e.value.style.chart.bars.strokeWidth,
683
- "stroke-linecap": "round",
684
- "stroke-linejoin": "round",
685
- class: re({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": D.value })
686
- }, null, 10, Ma))), 256)),
687
- a.$slots.pattern ? (o(), s("g", Ta, [
688
- (o(!0), s(v, null, g(t.x, (u, n) => (o(), s("rect", {
689
- x: u,
690
- y: t.y[n] < 0 ? 0 : t.y[n],
691
- height: t.height[n] < 0 ? 1e-4 : t.height[n] || 0,
692
- rx: e.value.style.chart.bars.borderRadius > t.height[n] / 2 ? (t.height[n] < 0 ? 0 : t.height[n]) / 2 : e.value.style.chart.bars.borderRadius,
693
- width: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
694
- fill: `url(#pattern_${O.value}_${t.absoluteIndex})`,
695
- stroke: e.value.style.chart.backgroundColor,
696
- "stroke-width": e.value.style.chart.bars.strokeWidth,
697
- "stroke-linecap": "round",
698
- "stroke-linejoin": "round",
699
- class: re({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": D.value })
700
- }, null, 10, Na))), 256))
701
- ])) : h("", !0)
702
- ], 64)) : (o(), s(v, { key: 2 }, [
703
- (o(!0), s(v, null, g(t.horizontal_x, (u, n) => (o(), s("rect", {
704
- x: y(me)(u, i.value.left),
705
- y: t.horizontal_y[n] < 0 ? 0 : t.horizontal_y[n],
706
- width: y(me)(t.horizontal_width[n] < 0 ? 1e-4 : t.horizontal_width[n]),
707
- rx: e.value.style.chart.bars.borderRadius > t.height[n] / 2 ? (t.height[n] < 0 ? 0 : t.height[n]) / 2 : e.value.style.chart.bars.borderRadius,
708
- height: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
709
- fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
710
- stroke: e.value.style.chart.backgroundColor,
711
- "stroke-width": e.value.style.chart.bars.strokeWidth,
712
- "stroke-linecap": "round",
713
- "stroke-linejoin": "round",
714
- class: re({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": D.value })
715
- }, null, 10, Ia))), 256)),
716
- a.$slots.pattern ? (o(), s("g", Oa, [
717
- (o(!0), s(v, null, g(t.horizontal_x, (u, n) => (o(), s("rect", {
718
- x: y(me)(u, i.value.left),
719
- y: t.horizontal_y[n] < 0 ? 0 : t.horizontal_y[n],
720
- width: y(me)(t.horizontal_width[n] < 0 ? 1e-4 : t.horizontal_width[n]),
721
- rx: e.value.style.chart.bars.borderRadius > t.height[n] / 2 ? (t.height[n] < 0 ? 0 : t.height[n]) / 2 : e.value.style.chart.bars.borderRadius,
722
- height: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
723
- fill: `url(#pattern_${O.value}_${t.absoluteIndex})`,
724
- stroke: e.value.style.chart.backgroundColor,
725
- "stroke-width": e.value.style.chart.bars.strokeWidth,
726
- "stroke-linecap": "round",
727
- "stroke-linejoin": "round",
728
- class: re({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": D.value })
729
- }, null, 10, Ra))), 256))
730
- ])) : h("", !0)
731
- ], 64))
732
- ]))), 256)),
733
- e.value.style.chart.grid.x.showAxis ? (o(), s("line", {
734
- key: 6,
735
- x1: i.value.left,
736
- x2: i.value.right,
737
- y1: i.value.bottom,
738
- y2: i.value.bottom,
739
- stroke: e.value.style.chart.grid.x.axisColor,
740
- "stroke-width": e.value.style.chart.grid.x.axisThickness,
741
- "stroke-linecap": "round",
742
- "stroke-linejoin": "round"
743
- }, null, 8, Pa)) : h("", !0),
744
- e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (o(), s("line", {
745
- key: 7,
746
- x1: i.value.left,
747
- x2: i.value.left,
748
- y1: i.value.top,
749
- y2: i.value.bottom,
750
- stroke: e.value.style.chart.grid.y.axisColor,
751
- "stroke-width": e.value.style.chart.grid.y.axisThickness,
752
- "stroke-linecap": "round",
753
- "stroke-linejoin": "round"
754
- }, null, 8, Aa)) : h("", !0),
755
- e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (o(), s("text", {
756
- key: 8,
757
- x: i.value.left + i.value.width / 2,
758
- y: i.value.chartHeight + e.value.style.chart.grid.x.axisName.offsetY,
759
- "font-size": e.value.style.chart.grid.x.axisName.fontSize,
760
- fill: e.value.style.chart.grid.x.axisName.color,
761
- "font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
762
- "text-anchor": "middle"
763
- }, $(e.value.style.chart.grid.x.axisName.text), 9, Va)) : h("", !0),
764
- e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (o(), s("text", {
765
- key: 9,
766
- transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize + e.value.style.chart.grid.y.axisName.offsetX}, ${i.value.top + i.value.height / 2}) rotate(-90)`,
767
- "font-size": e.value.style.chart.grid.y.axisName.fontSize,
768
- fill: e.value.style.chart.grid.y.axisName.color,
769
- "font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
770
- "text-anchor": "middle"
771
- }, $(e.value.style.chart.grid.y.axisName.text), 9, Ea)) : h("", !0),
772
- z.value.dataLabels.show && e.value.orientation === "vertical" ? (o(), s(v, { key: 10 }, [
773
- (o(!0), s(v, null, g(k.value, (t, l) => (o(), s("g", null, [
774
- (o(!0), s(v, null, g(t.x, (u, n) => (o(), s(v, null, [
775
- tt(t.series[n], t.proportions[n]) ? (o(), s("text", {
776
- key: 0,
777
- x: u + d.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
778
- y: t.y[n] + t.height[n] / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
779
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
780
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? y(ht)(t.color) : e.value.style.chart.bars.dataLabels.color,
781
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
782
- "text-anchor": "middle"
783
- }, $(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Ye(t.proportions[n] * 100, t, l, n) : ce(t.series[n], t, l, n, t.signedSeries[n])), 9, Fa)) : h("", !0)
784
- ], 64))), 256))
785
- ]))), 256)),
786
- e.value.style.chart.bars.totalValues.show && k.value.length > 1 ? (o(), s("g", Da, [
787
- (o(!0), s(v, null, g(Ue.value, (t, l) => (o(), s(v, null, [
788
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (o(), s("text", {
789
- key: 0,
790
- x: i.value.left + d.value * l + d.value / 2,
791
- y: i.value.top - e.value.style.chart.bars.totalValues.fontSize / 3,
792
- "text-anchor": "middle",
793
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
794
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
795
- fill: e.value.style.chart.bars.totalValues.color
796
- }, $(ce(t.value, t, l, t.sign)), 9, Ha)) : h("", !0)
797
- ], 64))), 256))
798
- ])) : h("", !0)
799
- ], 64)) : h("", !0),
800
- z.value.dataLabels.show && e.value.orientation === "horizontal" ? (o(), s(v, { key: 11 }, [
801
- (o(!0), s(v, null, g(k.value, (t, l) => (o(), s("g", null, [
802
- (o(!0), s(v, null, g(t.horizontal_x, (u, n) => (o(), s(v, null, [
803
- tt(t.series[n], t.proportions[n]) ? (o(), s("text", {
804
- key: 0,
805
- x: u + (t.horizontal_width[n] < 0 ? 1e-4 : t.horizontal_width[n]) / 2,
806
- y: t.horizontal_y[n] + d.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
807
- "font-size": e.value.style.chart.bars.dataLabels.fontSize,
808
- fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? y(ht)(t.color) : e.value.style.chart.bars.dataLabels.color,
809
- "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
810
- "text-anchor": "middle"
811
- }, $(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? Ye(t.proportions[n] * 100, t, l, n) : ce(t.series[n], t, l, n, t.signedSeries[n])), 9, Wa)) : h("", !0)
812
- ], 64))), 256))
813
- ]))), 256)),
814
- e.value.style.chart.bars.totalValues.show && k.value.length > 1 ? (o(), s("g", Ba, [
815
- (o(!0), s(v, null, g(Ue.value, (t, l) => (o(), s(v, null, [
816
- !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (o(), s("text", {
817
- key: 0,
818
- x: i.value.right + e.value.style.chart.bars.totalValues.fontSize / 3,
819
- y: i.value.top + d.value * l + d.value / 2,
820
- "text-anchor": "start",
821
- "font-size": e.value.style.chart.bars.totalValues.fontSize,
822
- "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
823
- fill: e.value.style.chart.bars.totalValues.color
824
- }, $(ce(t.value, t, l, t.sign)), 9, Ua)) : h("", !0)
825
- ], 64))), 256))
826
- ])) : h("", !0)
827
- ], 64)) : h("", !0),
828
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "vertical" ? (o(), s(v, { key: 12 }, [
829
- (o(!0), s(v, null, g(N.value, (t, l) => (o(), s("line", {
830
- x1: i.value.left,
831
- x2: i.value.left - 6,
832
- y1: t.y,
833
- y2: t.y,
834
- stroke: e.value.style.chart.grid.x.axisColor,
835
- "stroke-width": 1
836
- }, null, 8, Ya))), 256)),
837
- (o(!0), s(v, null, g(N.value, (t, l) => (o(), s("text", {
838
- x: t.x,
839
- y: t.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
840
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
841
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
842
- fill: e.value.style.chart.grid.y.axisLabels.color,
843
- "text-anchor": "end"
844
- }, $(y(J)({
845
- p: e.value.style.chart.bars.dataLabels.prefix,
846
- v: t.value,
847
- s: e.value.style.chart.bars.dataLabels.suffix,
848
- r: e.value.style.chart.grid.y.axisLabels.rounding
849
- })), 9, Xa))), 256))
850
- ], 64)) : h("", !0),
851
- e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "horizontal" ? (o(), s(v, { key: 13 }, [
852
- (o(!0), s(v, null, g(N.value, (t, l) => (o(), s("line", {
853
- x1: t.horizontal_x,
854
- x2: t.horizontal_x,
855
- y1: i.value.bottom,
856
- y2: i.value.bottom + 6,
857
- stroke: e.value.style.chart.grid.x.axisColor,
858
- "stroke-width": 1,
859
- "stroke-linecap": "round"
860
- }, null, 8, Ga))), 256)),
861
- (o(!0), s(v, null, g(N.value, (t, l) => (o(), s("text", {
862
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
863
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
864
- fill: e.value.style.chart.grid.y.axisLabels.color,
865
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
866
- transform: `translate(${t.horizontal_x}, ${i.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})`
867
- }, $(y(J)({
868
- p: e.value.style.chart.bars.dataLabels.prefix,
869
- v: t.value,
870
- s: e.value.style.chart.bars.dataLabels.suffix,
871
- r: e.value.style.chart.grid.y.axisLabels.rounding
872
- })), 9, Ja))), 256))
873
- ], 64)) : h("", !0),
874
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "vertical" ? (o(), s(v, { key: 14 }, [
875
- a.$slots["time-label"] ? (o(), s("g", qa, [
876
- (o(!0), s(v, null, g(V.value, (t, l) => (o(), s("g", null, [
877
- x(a.$slots, "time-label", Le({ ref_for: !0 }, {
878
- x: i.value.left + d.value * l + d.value / 2,
879
- y: i.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
880
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
881
- fill: e.value.style.chart.grid.x.timeLabels.color,
882
- transform: `translate(${i.value.left + d.value * l + d.value / 2}, ${i.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})`,
883
- absoluteIndex: t.absoluteIndex,
884
- content: t.text,
885
- textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
886
- show: !0
887
- }), void 0, !0)
888
- ]))), 256))
889
- ])) : (o(), s("g", Za, [
890
- (o(!0), s(v, null, g(V.value, (t, l) => (o(), s("text", {
891
- "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
892
- "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
893
- "font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
894
- fill: e.value.style.chart.grid.x.timeLabels.color,
895
- transform: `translate(${i.value.left + d.value * l + d.value / 2}, ${i.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})`,
896
- style: {
897
- cursor: "pointer"
898
- },
899
- onClick: () => et(t, l)
900
- }, $(t.text), 9, Ka))), 256))
901
- ]))
902
- ], 64)) : h("", !0),
903
- e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "horizontal" ? (o(), s(v, { key: 15 }, [
904
- a.$slots["time-label"] ? (o(), s("g", Qa, [
905
- (o(!0), s(v, null, g(V.value, (t, l) => (o(), s("g", null, [
906
- x(a.$slots, "time-label", Le({ ref_for: !0 }, {
907
- x: i.value.left - 8,
908
- y: i.value.top + d.value * l + d.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
909
- fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
910
- fill: e.value.style.chart.grid.x.timeLabels.color,
911
- transform: null,
912
- absoluteIndex: t.absoluteIndex,
913
- content: t.text,
914
- textAnchor: "end",
915
- show: !0
916
- }), void 0, !0)
917
- ]))), 256))
918
- ])) : (o(), s("g", ja, [
919
- (o(!0), s(v, null, g(V.value, (t, l) => (o(), s("text", {
920
- "text-anchor": "end",
921
- "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
922
- "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
923
- fill: e.value.style.chart.grid.y.axisLabels.color,
924
- x: i.value.left - 8,
925
- y: i.value.top + d.value * l + d.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
926
- style: {
927
- cursor: "pointer"
928
- },
929
- onClick: () => et(t, l)
930
- }, $(t.text), 9, el))), 256))
931
- ]))
932
- ], 64)) : h("", !0),
933
- z.value.showTooltip && e.value.orientation === "vertical" ? (o(!0), s(v, { key: 16 }, g(c.value.end - c.value.start, (t, l) => (o(), s("rect", {
934
- x: i.value.left + l * d.value,
935
- y: i.value.top,
936
- width: d.value,
937
- height: i.value.height < 0 ? 0 : i.value.height,
938
- onClick: (u) => Xe(l),
939
- onMouseenter: (u) => Ge(l),
940
- onMouseleave: r[0] || (r[0] = (u) => {
941
- ee.value = null, se.value = !1;
942
- }),
943
- fill: l === ee.value ? e.value.style.chart.highlighter.color : "transparent",
944
- style: X({ opacity: e.value.style.chart.highlighter.opacity / 100 })
945
- }, null, 44, tl))), 256)) : h("", !0),
946
- z.value.showTooltip && e.value.orientation === "horizontal" ? (o(!0), s(v, { key: 17 }, g(c.value.end - c.value.start, (t, l) => (o(), s("rect", {
947
- x: i.value.left,
948
- y: i.value.top + l * d.value,
949
- width: i.value.width < 0 ? 0 : i.value.width,
950
- height: d.value,
951
- onClick: (u) => Xe(l),
952
- onMouseenter: (u) => Ge(l),
953
- onMouseleave: r[1] || (r[1] = (u) => {
954
- ee.value = null, se.value = !1;
955
- }),
956
- fill: l === ee.value ? e.value.style.chart.highlighter.color : "transparent",
957
- style: X({ opacity: e.value.style.chart.highlighter.opacity / 100 })
958
- }, null, 44, al))), 256)) : h("", !0),
959
- x(a.$slots, "svg", E(F({ ...i.value })), void 0, !0)
960
- ], 12, fa)) : h("", !0),
961
- a.$slots.watermark ? (o(), s("div", ll, [
962
- x(a.$slots, "watermark", E(F({ isPrinting: y(Ve) || y(Ee) })), void 0, !0)
963
- ])) : h("", !0),
964
- q.value ? h("", !0) : (o(), Q(y(wt), {
965
- key: 5,
966
- config: {
967
- type: "bar",
968
- style: {
969
- backgroundColor: e.value.style.chart.backgroundColor,
970
- bar: {
971
- axis: {
972
- color: "#CCCCCC"
973
- },
974
- color: "#CCCCCC"
975
- }
976
- }
977
- }
978
- }, null, 8, ["config"])),
979
- G("div", {
980
- ref_key: "chartSlicer",
981
- ref: Te,
982
- style: X(`width:100%;background:${e.value.style.chart.backgroundColor}`),
983
- "data-dom-to-png-ignore": ""
984
- }, [
985
- e.value.style.chart.zoom.show && A.value > 1 ? (o(), Q(ha, {
986
- ref_key: "slicerComponent",
987
- ref: Z,
988
- key: `slicer_${Ie.value}`,
989
- background: e.value.style.chart.zoom.color,
990
- borderColor: e.value.style.chart.backgroundColor,
991
- fontSize: e.value.style.chart.zoom.fontSize,
992
- useResetSlot: e.value.style.chart.zoom.useResetSlot,
993
- labelLeft: e.value.style.chart.grid.x.timeLabels.values[c.value.start] ? e.value.style.chart.grid.x.timeLabels.values[c.value.start] : "",
994
- labelRight: e.value.style.chart.grid.x.timeLabels.values[c.value.end - 1] ? e.value.style.chart.grid.x.timeLabels.values[c.value.end - 1] : "",
995
- textColor: e.value.style.chart.color,
996
- inputColor: e.value.style.chart.zoom.color,
997
- selectColor: e.value.style.chart.zoom.highlightColor,
998
- max: Math.max(...pe.dataset.map((t) => t.series.length)),
999
- min: 0,
1000
- valueStart: c.value.start,
1001
- valueEnd: c.value.end,
1002
- start: c.value.start,
1003
- "onUpdate:start": r[2] || (r[2] = (t) => c.value.start = t),
1004
- end: c.value.end,
1005
- "onUpdate:end": r[3] || (r[3] = (t) => c.value.end = t),
1006
- refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
1007
- refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(...pe.dataset.map((t) => t.series.length)),
1008
- enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
1009
- enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
1010
- onReset: We
1011
- }, {
1012
- "reset-action": _(({ reset: t }) => [
1013
- x(a.$slots, "reset-action", E(F({ reset: t })), void 0, !0)
1014
- ]),
1015
- _: 3
1016
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : h("", !0)
1017
- ], 4),
1018
- oe(y(zt), {
1019
- show: z.value.showTooltip && se.value,
1020
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1021
- color: e.value.style.chart.tooltip.color,
1022
- fontSize: e.value.style.chart.tooltip.fontSize,
1023
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1024
- borderColor: e.value.style.chart.tooltip.borderColor,
1025
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1026
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1027
- position: e.value.style.chart.tooltip.position,
1028
- offsetY: e.value.style.chart.tooltip.offsetY,
1029
- parent: j.value,
1030
- content: we.value,
1031
- isFullscreen: ie.value,
1032
- isCustom: y(dt)(e.value.style.chart.tooltip.customFormat)
1033
- }, {
1034
- "tooltip-before": _(() => [
1035
- x(a.$slots, "tooltip-before", E(F({ ...ke.value })), void 0, !0)
1036
- ]),
1037
- "tooltip-after": _(() => [
1038
- x(a.$slots, "tooltip-after", E(F({ ...ke.value })), void 0, !0)
1039
- ]),
1040
- _: 3
1041
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
1042
- G("div", {
1043
- ref_key: "chartLegend",
1044
- ref: Me
1045
- }, [
1046
- e.value.style.chart.legend.show && q.value ? (o(), Q(va, {
1047
- key: 0,
1048
- legendSet: je.value,
1049
- config: At.value,
1050
- onClickMarker: r[4] || (r[4] = ({ legend: t }) => t.segregate())
1051
- }, it({
1052
- item: _(({ legend: t }) => [
1053
- G("div", {
1054
- onClick: (l) => t.segregate(),
1055
- style: X(`opacity:${L.value.includes(t.id) ? 0.5 : 1}`)
1056
- }, $(t.name), 13, rl)
1057
- ]),
1058
- _: 2
1059
- }, [
1060
- a.$slots.pattern ? {
1061
- name: "legend-pattern",
1062
- fn: _(({ legend: t, index: l }) => [
1063
- oe(ya, {
1064
- shape: t.shape,
1065
- radius: 30,
1066
- stroke: "none",
1067
- plot: { x: 30, y: 30 },
1068
- fill: `url(#pattern_${O.value}_${l})`
1069
- }, null, 8, ["shape", "fill"])
1070
- ]),
1071
- key: "0"
1072
- } : void 0
1073
- ]), 1032, ["legendSet", "config"])) : x(a.$slots, "legend", {
1074
- key: 1,
1075
- legend: je.value
1076
- }, void 0, !0)
1077
- ], 512),
1078
- a.$slots.source ? (o(), s("div", {
1079
- key: 6,
1080
- ref_key: "source",
1081
- ref: Ne,
1082
- dir: "auto"
1083
- }, [
1084
- x(a.$slots, "source", {}, void 0, !0)
1085
- ], 512)) : h("", !0),
1086
- c.value.end - c.value.start < 200 ? (o(), Q(y(mt), {
1087
- key: 7,
1088
- hideDetails: "",
1089
- config: {
1090
- open: z.value.showTable,
1091
- maxHeight: 1e4,
1092
- body: {
1093
- backgroundColor: e.value.style.chart.backgroundColor,
1094
- color: e.value.style.chart.color
1095
- },
1096
- head: {
1097
- backgroundColor: e.value.style.chart.backgroundColor,
1098
- color: e.value.style.chart.color
1099
- }
1100
- }
1101
- }, {
1102
- content: _(() => [
1103
- oe(y(pt), {
1104
- colNames: ve.value.colNames,
1105
- head: ve.value.head,
1106
- body: ve.value.body,
1107
- config: ve.value.config,
1108
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
1109
- onClose: r[5] || (r[5] = (t) => z.value.showTable = !1)
1110
- }, {
1111
- th: _(({ th: t }) => [
1112
- G("div", { innerHTML: t }, null, 8, ol)
1113
- ]),
1114
- td: _(({ td: t }) => [
1115
- Gt($(isNaN(Number(t)) ? t : y(J)({
1116
- p: e.value.style.chart.bars.dataLabels.prefix,
1117
- v: t,
1118
- s: e.value.style.chart.bars.dataLabels.suffix,
1119
- r: e.value.table.td.roundingValue
1120
- })), 1)
1121
- ]),
1122
- _: 1
1123
- }, 8, ["colNames", "head", "body", "config", "title"])
1124
- ]),
1125
- _: 1
1126
- }, 8, ["config"])) : h("", !0)
1127
- ], 46, ba));
1128
- }
1129
- }, pl = /* @__PURE__ */ ga(sl, [["__scopeId", "data-v-4216aa1f"]]);
1130
- export {
1131
- pl as default
1132
- };