vue-data-ui 3.0.0-next.53 → 3.0.0-next.55

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 (94) hide show
  1. package/dist/{Arrow-CfOp9QLS.js → Arrow-BJNH0Liz.js} +1 -1
  2. package/dist/{BaseDraggableDialog-BMU2ZFC3.js → BaseDraggableDialog-g4-q5391.js} +2 -2
  3. package/dist/{BaseIcon-DNC2YZ6F.js → BaseIcon-B-JPaycb.js} +1 -1
  4. package/dist/{ColorPicker-CpaLB-bo.js → ColorPicker-B6cSfXTZ.js} +2 -2
  5. package/dist/{DataTable--8a_qmts.js → DataTable-CXvbwtai.js} +2 -2
  6. package/dist/{Legend-DeGk-MxY.js → Legend-Dt-A6TX4.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-y0fW_8iW.js → NonSvgPenAndPaper-Cde04UFK.js} +3 -3
  8. package/dist/{PackageVersion-Dch5dyul.js → PackageVersion-D3gM0cgH.js} +1 -1
  9. package/dist/{PenAndPaper-EQIrBBev.js → PenAndPaper-tiWdtLvY.js} +3 -3
  10. package/dist/{Shape-DUJJ7Dje.js → Shape-BAOib99W.js} +1 -1
  11. package/dist/{Slicer-DYVi2cgI.js → Slicer-2xXK3ZHN.js} +2 -2
  12. package/dist/{SparkTooltip-BZfWeQof.js → SparkTooltip-CP52F_jK.js} +1 -1
  13. package/dist/{Title-CpX0CIVb.js → Title-CNNSPaS8.js} +1 -1
  14. package/dist/{Tooltip-C442MMtl.js → Tooltip-DsVWsLP0.js} +1 -1
  15. package/dist/{UserOptions-D900w6Ut.js → UserOptions-DdxzR5Mv.js} +2 -2
  16. package/dist/{dom-to-png-Bmca7ICj.js → dom-to-png-FQEkmOOx.js} +1 -1
  17. package/dist/{img-BsHSatQe.js → img-CNjWjg_p.js} +1 -1
  18. package/dist/{index-CmsPu0cE.js → index-VrsKSULO.js} +107 -21
  19. package/dist/{pdf-CNLA0ZeE.js → pdf-BLwguT_D.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +76 -4
  22. package/dist/types/vue-data-ui.d.ts +76 -4
  23. package/dist/{useAutoSizeLabelsInsideViewbox-oGEIyDo-.js → useAutoSizeLabelsInsideViewbox-BD87yFjx.js} +1 -1
  24. package/dist/{BaseScanner-DIK2NTdp.js → useLoading-Bt5Doa8m.js} +11 -11
  25. package/dist/useNestedProp-lTwriOHy.js +13 -0
  26. package/dist/{usePrinter-DgCbkcwp.js → usePrinter-BrYkAEvI.js} +2 -2
  27. package/dist/{vue-data-ui-BBFYK4Jr.js → vue-data-ui-Cvdlw0Wu.js} +64 -64
  28. package/dist/vue-data-ui.js +1 -1
  29. package/dist/vue-ui-3d-bar-DIbV0GIS.js +1323 -0
  30. package/dist/{vue-ui-accordion-CmEy3gXr.js → vue-ui-accordion-CP3KpYYB.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-U75-Sut2.js → vue-ui-age-pyramid-ING0HORH.js} +7 -7
  32. package/dist/{vue-ui-annotator-NRpaJnMk.js → vue-ui-annotator-Vcfg38lq.js} +2 -2
  33. package/dist/{vue-ui-bullet-UgYJVyci.js → vue-ui-bullet-nVyjtnfT.js} +8 -8
  34. package/dist/{vue-ui-candlestick-D88VnlSD.js → vue-ui-candlestick-C8kOVEo0.js} +8 -8
  35. package/dist/{vue-ui-carousel-table-BIuFJ5AN.js → vue-ui-carousel-table-IxlXbBLZ.js} +29 -29
  36. package/dist/{vue-ui-chestnut-f2MZFkG0.js → vue-ui-chestnut-DrLVu-od.js} +5 -5
  37. package/dist/{vue-ui-chord-BA3WShJ5.js → vue-ui-chord-Co_1mfBI.js} +8 -8
  38. package/dist/{vue-ui-circle-pack-BlFsr1Nn.js → vue-ui-circle-pack-93ly70eJ.js} +42 -42
  39. package/dist/{vue-ui-cursor-CXu5QkAF.js → vue-ui-cursor-KJztZXjx.js} +2 -2
  40. package/dist/{vue-ui-dashboard-CoJEthIA.js → vue-ui-dashboard-Dm-pgEqX.js} +62 -62
  41. package/dist/{vue-ui-digits-YE9qu-vS.js → vue-ui-digits-BOZE8XF9.js} +2 -2
  42. package/dist/{vue-ui-donut-DjFIMk-S.js → vue-ui-donut-C2ZgkW45.js} +9 -9
  43. package/dist/{vue-ui-donut-evolution-oplsHIBf.js → vue-ui-donut-evolution-Bbv5_sp4.js} +9 -9
  44. package/dist/vue-ui-dumbbell-nld0Clws.js +1058 -0
  45. package/dist/{vue-ui-flow-TenkMqgi.js → vue-ui-flow-CLlSDNyj.js} +8 -8
  46. package/dist/{vue-ui-funnel-C8pzcitv.js → vue-ui-funnel-BoxOdEOh.js} +16 -16
  47. package/dist/{vue-ui-galaxy-CT7eLAou.js → vue-ui-galaxy-DYyCeO0g.js} +5 -5
  48. package/dist/{vue-ui-gauge-BQwHmYux.js → vue-ui-gauge-DzfVoVC0.js} +8 -8
  49. package/dist/{vue-ui-gizmo-ZYa907z7.js → vue-ui-gizmo-Dq_wADwm.js} +3 -3
  50. package/dist/{vue-ui-heatmap-D-X8dhTa.js → vue-ui-heatmap-DiJ4PMPu.js} +8 -8
  51. package/dist/{vue-ui-history-plot-CX4y35Q9.js → vue-ui-history-plot-CyQbpbFj.js} +20 -20
  52. package/dist/{vue-ui-kpi-0JIMTEg2.js → vue-ui-kpi-CE3bvNxU.js} +7 -7
  53. package/dist/{vue-ui-mini-loader-D2w6ep5c.js → vue-ui-mini-loader-CezyYsIh.js} +2 -2
  54. package/dist/{vue-ui-molecule-CK4i7icd.js → vue-ui-molecule-DBqdOQXg.js} +15 -15
  55. package/dist/{vue-ui-mood-radar-QB-lmCDi.js → vue-ui-mood-radar-Borsdnjs.js} +15 -15
  56. package/dist/{vue-ui-nested-donuts-DOmd0usQ.js → vue-ui-nested-donuts-CluI37Ei.js} +10 -10
  57. package/dist/{vue-ui-onion-B3lVljEh.js → vue-ui-onion-Ny8gdAAf.js} +24 -24
  58. package/dist/{vue-ui-parallel-coordinate-plot-B0S4FMu4.js → vue-ui-parallel-coordinate-plot-PJ7kBhSH.js} +9 -9
  59. package/dist/{vue-ui-quadrant-CkaqFIIi.js → vue-ui-quadrant--JI409Pn.js} +8 -8
  60. package/dist/{vue-ui-quick-chart-JIwzoJJA.js → vue-ui-quick-chart-BDrTZO9Y.js} +45 -45
  61. package/dist/{vue-ui-radar-CM6fD11R.js → vue-ui-radar-BWu9C6Zw.js} +25 -25
  62. package/dist/{vue-ui-rating-7RJeSqhF.js → vue-ui-rating-BR6GVyqk.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-B7sx9Ntq.js → vue-ui-relation-circle-By35PCSP.js} +6 -6
  64. package/dist/{vue-ui-ridgeline-CU-RksIi.js → vue-ui-ridgeline-DWGU3udg.js} +9 -9
  65. package/dist/{vue-ui-rings-DFfqLk-i.js → vue-ui-rings-Cq5qHVk1.js} +20 -20
  66. package/dist/{vue-ui-scatter-ChIXAlMP.js → vue-ui-scatter-DOaBf7Al.js} +9 -9
  67. package/dist/{vue-ui-skeleton-DZYV4GsR.js → vue-ui-skeleton-CcR1KppS.js} +3 -3
  68. package/dist/{vue-ui-smiley-C2ubltA0.js → vue-ui-smiley-BAg44Lr1.js} +26 -26
  69. package/dist/{vue-ui-spark-trend-C9olDc67.js → vue-ui-spark-trend-et-6tMhw.js} +3 -3
  70. package/dist/{vue-ui-sparkbar-CRHWnKW3.js → vue-ui-sparkbar-ZmkuoQIV.js} +3 -3
  71. package/dist/{vue-ui-sparkgauge-CGZ4JKZW.js → vue-ui-sparkgauge-B-sR11zt.js} +3 -3
  72. package/dist/{vue-ui-sparkhistogram-rih7ZpXN.js → vue-ui-sparkhistogram-D6y3mWa-.js} +4 -4
  73. package/dist/{vue-ui-sparkline-Cxxly0zR.js → vue-ui-sparkline-BTcWkBkc.js} +4 -4
  74. package/dist/{vue-ui-sparkstackbar-DIMF5_vD.js → vue-ui-sparkstackbar-DiLFzzs1.js} +3 -3
  75. package/dist/{vue-ui-stackbar-C1W_jbFX.js → vue-ui-stackbar-B0XZyCnz.js} +10 -10
  76. package/dist/{vue-ui-strip-plot-T6E6SWhl.js → vue-ui-strip-plot-B4vsbget.js} +25 -25
  77. package/dist/{vue-ui-table-DZnvTV1T.js → vue-ui-table-DDVF52A6.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-CT9kekZX.js → vue-ui-table-heatmap-DH1DYupu.js} +5 -5
  79. package/dist/{vue-ui-table-sparkline-C_giDe57.js → vue-ui-table-sparkline-BL-1y2Oq.js} +14 -14
  80. package/dist/{vue-ui-thermometer-B5RPJ_62.js → vue-ui-thermometer-CyQT1DI6.js} +25 -25
  81. package/dist/{vue-ui-timer-DM5yLeow.js → vue-ui-timer-CLqsJQ3V.js} +5 -5
  82. package/dist/{vue-ui-tiremarks-DnzIhE4J.js → vue-ui-tiremarks-DZSjovmn.js} +7 -7
  83. package/dist/{vue-ui-treemap-CfuAZa3x.js → vue-ui-treemap-CSMkD4Q3.js} +39 -39
  84. package/dist/{vue-ui-vertical-bar-BrcmMhEE.js → vue-ui-vertical-bar-X3muLpmj.js} +10 -10
  85. package/dist/{vue-ui-waffle-CtOGiCTd.js → vue-ui-waffle-DZoNMXZs.js} +27 -27
  86. package/dist/{vue-ui-wheel-BsVgTCe_.js → vue-ui-wheel-CkrhExvP.js} +7 -7
  87. package/dist/{vue-ui-word-cloud-DibZ7mA0.js → vue-ui-word-cloud-SJJdaZHD.js} +6 -6
  88. package/dist/{vue-ui-world-BMfjrSvX.js → vue-ui-world-CmeQPQhw.js} +6 -6
  89. package/dist/{vue-ui-xy-BSHX5-3N.js → vue-ui-xy-Cp8U2LrQ.js} +87 -87
  90. package/dist/{vue-ui-xy-canvas-DgDwVFs9.js → vue-ui-xy-canvas-CGop37ip.js} +8 -8
  91. package/package.json +1 -1
  92. package/dist/useNestedProp-KzfIE1rT.js +0 -13
  93. package/dist/vue-ui-3d-bar-2VHd6kNk.js +0 -1227
  94. package/dist/vue-ui-dumbbell-D3G7C4G0.js +0 -753
@@ -0,0 +1,1058 @@
1
+ import { defineAsyncComponent as V, computed as b, ref as h, toRefs as wt, watch as ye, shallowRef as Ue, onMounted as We, onBeforeUnmount as qe, watchEffect as $t, createElementBlock as i, openBlock as o, unref as c, normalizeStyle as K, normalizeClass as je, createBlock as O, createCommentVNode as y, createElementVNode as d, createSlots as Lt, withCtx as p, renderSlot as m, normalizeProps as Q, guardReactiveProps as ee, createVNode as Ct, withDirectives as U, Fragment as w, renderList as A, toDisplayString as x, vShow as W, createTextVNode as Ye, nextTick as At } from "vue";
2
+ import { u as Nt, c as Ze, t as St, b as Mt, o as Xt, f as Je, g as zt, h as Ke, D as Tt, i as $, k as F, X as Qe, s as et, l as tt, j as lt, v as It, w as Ot } from "./index-VrsKSULO.js";
3
+ import { t as be, u as Ft } from "./useResponsive-DfdjqQps.js";
4
+ import { u as Ht } from "./usePrinter-BrYkAEvI.js";
5
+ import { u as Dt, B as Pt } from "./useLoading-Bt5Doa8m.js";
6
+ import { u as at } from "./useNestedProp-lTwriOHy.js";
7
+ import { u as Et } from "./useUserOptionState-BIvW1Kz7.js";
8
+ import { u as Gt } from "./useChartAccessibility-9icAAmYg.js";
9
+ import { u as Rt } from "./useTimeLabelCollider-CIsgDrl9.js";
10
+ import Bt from "./img-CNjWjg_p.js";
11
+ import Vt from "./Title-CNNSPaS8.js";
12
+ import Ut from "./Legend-Dt-A6TX4.js";
13
+ import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
+ const qt = ["id"], jt = ["xmlns", "viewBox"], Yt = ["x", "y", "width", "height"], Zt = { key: 1 }, Jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Kt = { key: 2 }, Qt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], el = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], tl = ["transform", "font-size", "fill"], ll = ["x", "y", "font-size", "fill", "font-weight", "onMouseenter", "onMouseleave", "onClick"], al = ["x", "y", "font-size", "fill", "onMouseenter", "onMouseleave", "onClick"], sl = ["x", "y", "font-size", "fill"], nl = ["transform", "font-size", "fill", "font-weight", "text-anchor"], ol = ["d", "stroke", "stroke-width", "stroke-dasharray"], rl = ["d", "stroke", "stroke-width", "stroke-dasharray"], ul = ["x", "y", "height", "width", "fill"], il = ["transform", "fill", "font-size"], cl = ["id"], vl = ["stop-color"], dl = ["stop-color"], hl = ["stop-color"], fl = ["id"], yl = ["stop-color"], bl = ["stop-color"], gl = ["stop-color"], ml = ["id"], pl = ["stop-color"], xl = ["stop-color"], kl = ["id"], _l = ["stop-color"], wl = ["stop-color"], $l = { key: 0 }, Ll = { key: 0 }, Cl = ["d", "fill"], Al = { key: 1 }, Nl = ["x", "y", "height", "width", "fill"], Sl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ml = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Xl = { key: 7 }, zl = ["x", "y", "fill", "font-size"], Tl = { key: 8 }, Il = ["x", "y", "fill", "font-size"], Ol = ["x", "y", "width", "height", "fill", "onMouseenter", "onMouseleave", "onClick"], Fl = {
15
+ key: 4,
16
+ class: "vue-data-ui-watermark"
17
+ }, Hl = ["xmlns", "height", "width"], Dl = ["fill"], Pl = ["innerHTML"], El = {
18
+ __name: "vue-ui-dumbbell",
19
+ props: {
20
+ config: {
21
+ type: Object,
22
+ default() {
23
+ return {};
24
+ }
25
+ },
26
+ dataset: {
27
+ type: Array,
28
+ default() {
29
+ return [];
30
+ }
31
+ }
32
+ },
33
+ emits: ["selectDatapoint"],
34
+ setup(st, { expose: nt, emit: Gl }) {
35
+ const ot = V(() => import("./vue-ui-accordion-CP3KpYYB.js")), rt = V(() => import("./DataTable-CXvbwtai.js")), ut = V(() => import("./PenAndPaper-tiWdtLvY.js")), it = V(() => import("./UserOptions-DdxzR5Mv.js")), ct = V(() => import("./PackageVersion-D3gM0cgH.js")), { vue_ui_dumbbell: vt } = Nt(), N = st, q = b({
36
+ get() {
37
+ return !!N.dataset && N.dataset.length;
38
+ },
39
+ set(l) {
40
+ return l;
41
+ }
42
+ }), g = h(Ze()), ge = h(0), z = h(null), me = h(null), pe = h(null), xe = h(null), ke = h(null), _e = h(0), we = h(0), $e = h(0), te = h(null), le = h(null), j = h(null), ae = h(null), T = h(null), r = h(null), I = h(!1), e = h(re()), { loading: se, FINAL_DATASET: ne, manualLoading: dt } = Dt({
43
+ ...wt(N),
44
+ FINAL_CONFIG: e,
45
+ prepareConfig: re,
46
+ skeletonDataset: [
47
+ { name: "_", start: 21, end: 34 },
48
+ { name: "_", start: 13, end: 21 },
49
+ { name: "_", start: 8, end: 13 },
50
+ { name: "_", start: 5, end: 8 },
51
+ { name: "_", start: 3, end: 5 }
52
+ ],
53
+ skeletonConfig: St({
54
+ defaultConfig: e.value,
55
+ userConfig: {
56
+ userOptions: { show: !1 },
57
+ table: { show: !1 },
58
+ useAnimation: !1,
59
+ style: {
60
+ chart: {
61
+ backgroundColor: "#99999930",
62
+ padding: {
63
+ top: 12,
64
+ right: 12,
65
+ bottom: 12,
66
+ left: 12
67
+ },
68
+ grid: {
69
+ horizontalGrid: { stroke: "#6A6A6A" },
70
+ verticalGrid: { stroke: "#6A6A6A" }
71
+ },
72
+ labels: {
73
+ axis: {
74
+ yLabel: "",
75
+ xLabel: ""
76
+ },
77
+ xAxisLabels: { show: !1 },
78
+ yAxisLabels: { show: !1 },
79
+ endLabels: { show: !1 },
80
+ startLabels: { show: !1 }
81
+ },
82
+ legend: {
83
+ backgroundColor: "transparent"
84
+ },
85
+ plots: {
86
+ endColor: "#969696",
87
+ startColor: "#DBDBDB",
88
+ stroke: "#6A6A6A"
89
+ }
90
+ }
91
+ }
92
+ }
93
+ })
94
+ }), { userOptionsVisible: oe, setUserOptionsVisibility: Le, keepUserOptionState: Ce } = Et({ config: e.value }), { svgRef: Ae } = Gt({ config: e.value.style.chart.title });
95
+ function re() {
96
+ const l = at({
97
+ userConfig: N.config,
98
+ defaultConfig: vt
99
+ });
100
+ return l.theme ? {
101
+ ...at({
102
+ userConfig: Mt.vue_ui_dumbbell[l.theme] || N.config,
103
+ defaultConfig: l
104
+ })
105
+ } : l;
106
+ }
107
+ ye(() => N.config, (l) => {
108
+ se.value || (e.value = re()), oe.value = !e.value.userOptions.showOnChartHover, Se(), _e.value += 1, we.value += 1, $e.value += 1, E.value = e.value.style.chart.rowHeight, G.value = e.value.style.chart.width, D.value.showTable = e.value.table.show;
109
+ }, { deep: !0 }), ye(() => ne.value, (l) => {
110
+ Array.isArray(l) && l.length > 0 && (dt.value = !1), He(), De();
111
+ }, { deep: !0 });
112
+ const S = Ue(null), H = Ue(null);
113
+ We(() => {
114
+ Se();
115
+ });
116
+ const Ne = b(() => !!e.value.debug);
117
+ function Se() {
118
+ if (Xt(N.dataset) ? Je({
119
+ componentName: "VueUiDumbbell",
120
+ type: "dataset",
121
+ debug: Ne.value
122
+ }) : N.dataset.forEach((l, s) => {
123
+ zt({
124
+ datasetObject: l,
125
+ requiredAttributes: ["name", "start", "end"]
126
+ }).forEach((t) => {
127
+ q.value = !1, Je({
128
+ componentName: "VueUiDumbbell",
129
+ type: "datasetSerieAttribute",
130
+ property: t,
131
+ index: s,
132
+ debug: Ne.value
133
+ });
134
+ });
135
+ }), e.value.responsive) {
136
+ const l = be(() => {
137
+ const { width: s, height: t } = Ft({
138
+ chart: z.value,
139
+ title: e.value.style.chart.title.text ? me.value : null,
140
+ legend: e.value.style.chart.legend.show ? pe.value : null,
141
+ source: xe.value,
142
+ noTitle: ke.value
143
+ }), a = e.value.style.chart.title.text ? 24 : 0, u = e.value.style.chart.legend.show ? 24 : 0;
144
+ requestAnimationFrame(async () => {
145
+ G.value = Math.max(0.1, s), E.value = Math.max(0.1, (Math.max(0.1, t) - (a + u)) / ne.value.length), Ve();
146
+ });
147
+ });
148
+ S.value && (H.value && S.value.unobserve(H.value), S.value.disconnect()), S.value = new ResizeObserver(l), H.value = z.value.parentNode, S.value.observe(H.value);
149
+ }
150
+ Ve();
151
+ }
152
+ qe(() => {
153
+ C.value != null && (cancelAnimationFrame(C.value), C.value = null), S.value && (H.value && S.value.unobserve(H.value), S.value.disconnect());
154
+ });
155
+ const { isPrinting: Me, isImaging: Xe, generatePdf: ze, generateImage: Te } = Ht({
156
+ elementId: `dumbbell_${g.value}`,
157
+ fileName: e.value.style.chart.title.text || "vue-ui-dumbbell",
158
+ options: e.value.userOptions.print
159
+ }), ht = b(() => e.value.userOptions.show && !e.value.style.chart.title.text), D = h({
160
+ showTable: e.value.table.show
161
+ });
162
+ ye(e, () => {
163
+ D.value = {
164
+ showTable: e.value.table.show
165
+ };
166
+ }, { immediate: !0 });
167
+ const P = b(() => ne.value.map((l, s) => ({
168
+ ...l,
169
+ start: Ke(l.start),
170
+ end: Ke(l.end),
171
+ id: l.id ?? `${String(l.name)}__${String(l.start)}__${String(l.end)}__${Ze()}`
172
+ }))), Ie = b(() => {
173
+ const l = e.value.style.chart.grid, s = P.value.flatMap((f) => [f.start, f.end]).map((f) => Number(f)).filter((f) => Number.isFinite(f)), t = s.length ? Math.min(...s) : 0, a = s.length ? Math.max(...s) : 0, u = l.scaleMin ?? Math.min(t, 0), v = l.scaleMax ?? a;
174
+ return { min: u, max: v };
175
+ }), L = b(() => Tt(Ie.value.min, Ie.value.max, e.value.style.chart.grid.scaleSteps)), E = h(e.value.style.chart.rowHeight), G = h(e.value.style.chart.width);
176
+ function ft() {
177
+ let l = 0;
178
+ le.value && (l = Array.from(le.value.querySelectorAll("text")).reduce((a, u) => {
179
+ const v = u.getComputedTextLength();
180
+ return v > a ? v : a;
181
+ }, 0));
182
+ const s = te.value ? te.value.getBoundingClientRect().width : 0;
183
+ return l + s + (s ? 24 + e.value.style.chart.labels.axis.yLabelOffsetX : 0);
184
+ }
185
+ const ue = h(0), yt = be((l) => {
186
+ ue.value = l;
187
+ }, 100);
188
+ $t((l) => {
189
+ const s = j.value;
190
+ if (!s) return;
191
+ const t = new ResizeObserver((a) => {
192
+ yt(a[0].contentRect.height);
193
+ });
194
+ t.observe(s), l(() => t.disconnect());
195
+ }), qe(() => {
196
+ ue.value = 0;
197
+ });
198
+ const Oe = b(() => {
199
+ I.value;
200
+ let l = 0;
201
+ ae.value && (l = ae.value.getBBox().height);
202
+ let s = 0;
203
+ return j.value && (s = ue.value), l + s;
204
+ }), ie = b(() => P.value.length);
205
+ function Fe(l, s, t) {
206
+ const a = Number(l), u = Number(s.min), v = Number(s.max), f = Number(t.width);
207
+ if (!Number.isFinite(a) || !Number.isFinite(u) || !Number.isFinite(v) || !Number.isFinite(f))
208
+ return t.left;
209
+ const _ = v - u;
210
+ return _ <= 0 ? t.left : t.left + (a - u) / _ * f;
211
+ }
212
+ const n = b(() => {
213
+ I.value;
214
+ const l = ft(), s = e.value.style.chart.padding, t = e.value.style.chart.labels.axis.xLabel ? e.value.style.chart.labels.axis.xLabelOffsetY : 0, a = E.value * ie.value - Oe.value - s.top - s.bottom - t, u = a / ie.value, v = E.value * ie.value, f = G.value - l - s.left - s.right, _ = L.value.ticks.length * (f / L.value.ticks.length);
215
+ return {
216
+ left: e.value.style.chart.padding.left + l,
217
+ right: G.value - e.value.style.chart.padding.right,
218
+ top: e.value.style.chart.padding.top,
219
+ bottom: v - e.value.style.chart.padding.bottom - Oe.value - t,
220
+ width: f,
221
+ height: a,
222
+ rowHeight: u,
223
+ absoluteHeight: v,
224
+ widthPlotReference: _
225
+ };
226
+ }), M = b(() => Math.min(E.value / 2 * 0.7, e.value.style.chart.plots.radius)), R = h([]), k = b({
227
+ get() {
228
+ const l = n.value, s = L.value;
229
+ return R.value.map((t, a) => {
230
+ const u = Fe(t.start, s, l), v = Fe(t.endVal, s, l), f = u + (v - u) / 2;
231
+ return {
232
+ ...t,
233
+ startX: u,
234
+ endX: v,
235
+ centerX: f,
236
+ y: l.top + a * l.rowHeight + l.rowHeight / 2
237
+ };
238
+ });
239
+ },
240
+ set(l) {
241
+ R.value = l;
242
+ }
243
+ });
244
+ function He() {
245
+ R.value = P.value.map((l) => {
246
+ const s = Number(l.start);
247
+ return {
248
+ ...l,
249
+ endVal: Number.isFinite(s) ? s : 0
250
+ };
251
+ });
252
+ }
253
+ const C = h(null);
254
+ We(() => {
255
+ De();
256
+ });
257
+ function De() {
258
+ if (C.value != null && (cancelAnimationFrame(C.value), C.value = null), He(), !e.value.useAnimation) {
259
+ k.value = R.value.map((a) => {
260
+ const u = Number(a.end);
261
+ return { ...a, endVal: Number.isFinite(u) ? u : a.endVal };
262
+ });
263
+ return;
264
+ }
265
+ const l = Math.max(1, Math.min(100, e.value.animationSpeed || 100)) / 100, s = P.value.map((a) => {
266
+ const u = Number(a.start), v = Number(a.end), f = Number.isFinite(u) ? u : 0;
267
+ return (Number.isFinite(v) ? v : f) - f;
268
+ }), t = () => {
269
+ let a = !0;
270
+ k.value = R.value.map((u, v) => {
271
+ const f = Number.isFinite(Number(u.end)) ? Number(u.end) : u.endVal, _ = u.endVal + s[v] * l, J = s[v] >= 0 ? Math.min(_, f) : Math.max(_, f);
272
+ return J !== f && (a = !1), { ...u, endVal: J };
273
+ }), a ? C.value = null : C.value = requestAnimationFrame(t);
274
+ };
275
+ C.value = requestAnimationFrame(t);
276
+ }
277
+ const Pe = b(() => [
278
+ { name: e.value.style.chart.legend.labelStart, color: e.value.style.chart.plots.gradient.show ? `url(#start_grad_${g.value})` : e.value.style.chart.plots.startColor },
279
+ { name: e.value.style.chart.legend.labelEnd, color: e.value.style.chart.plots.gradient.show ? `url(#end_grad_${g.value})` : e.value.style.chart.plots.endColor }
280
+ ]), bt = b(() => ({
281
+ cy: "donut-div-legend",
282
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
283
+ color: e.value.style.chart.legend.color,
284
+ fontSize: e.value.style.chart.legend.fontSize,
285
+ paddingBottom: 12,
286
+ paddingTop: 12,
287
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
288
+ })), X = b(() => {
289
+ const l = k.value.map((t) => ({
290
+ name: t.name
291
+ })), s = k.value.map((t) => ({
292
+ start: t.start,
293
+ end: t.end
294
+ }));
295
+ return { head: l, body: s };
296
+ }), Y = b(() => {
297
+ const l = [
298
+ e.value.table.columnNames.series,
299
+ e.value.table.columnNames.start,
300
+ e.value.table.columnNames.end,
301
+ e.value.table.columnNames.progression
302
+ ], s = X.value.head.map((u, v) => {
303
+ const f = $({
304
+ p: e.value.style.chart.labels.prefix,
305
+ v: X.value.body[v].start,
306
+ s: e.value.style.chart.labels.suffix,
307
+ r: e.value.table.td.roundingValue
308
+ }), _ = $({
309
+ p: e.value.style.chart.labels.prefix,
310
+ v: X.value.body[v].end,
311
+ s: e.value.style.chart.labels.suffix,
312
+ r: e.value.table.td.roundingValue
313
+ }), J = $({
314
+ v: 100 * (X.value.body[v].end / X.value.body[v].start - 1),
315
+ s: "%",
316
+ r: e.value.table.td.roundingPercentage
317
+ });
318
+ return [
319
+ { name: u.name },
320
+ f,
321
+ _,
322
+ J
323
+ ];
324
+ }), t = {
325
+ th: {
326
+ backgroundColor: e.value.table.th.backgroundColor,
327
+ color: e.value.table.th.color,
328
+ outline: e.value.table.th.outline
329
+ },
330
+ td: {
331
+ backgroundColor: e.value.table.td.backgroundColor,
332
+ color: e.value.table.td.color,
333
+ outline: e.value.table.td.outline
334
+ },
335
+ breakpoint: e.value.table.responsiveBreakpoint
336
+ };
337
+ return {
338
+ colNames: [
339
+ e.value.table.columnNames.series,
340
+ e.value.table.columnNames.start,
341
+ e.value.table.columnNames.end,
342
+ e.value.table.columnNames.progression
343
+ ],
344
+ head: l,
345
+ body: s,
346
+ config: t
347
+ };
348
+ });
349
+ function Ee(l = null) {
350
+ At(() => {
351
+ const s = X.value.head.map((u, v) => [[
352
+ u.name
353
+ ], [X.value.body[v].start], [X.value.body[v].end]]), t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[e.value.table.columnNames.series], [e.value.table.columnNames.start], [e.value.table.columnNames.end]]].concat(s), a = It(t);
354
+ l ? l(a) : Ot({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-dumbbell" });
355
+ });
356
+ }
357
+ const B = h(!1);
358
+ function Ge(l) {
359
+ B.value = l, ge.value += 1;
360
+ }
361
+ function gt() {
362
+ return P.value;
363
+ }
364
+ function Re() {
365
+ D.value.showTable = !D.value.showTable;
366
+ }
367
+ const Z = h(!1);
368
+ function ce() {
369
+ Z.value = !Z.value;
370
+ }
371
+ async function mt({ scale: l = 2 } = {}) {
372
+ if (!z.value) return;
373
+ const { width: s, height: t } = z.value.getBoundingClientRect(), a = s / t, { imageUri: u, base64: v } = await Bt({ domElement: z.value, base64: !0, img: !0, scale: l });
374
+ return {
375
+ imageUri: u,
376
+ base64: v,
377
+ title: e.value.style.chart.title.text,
378
+ width: s,
379
+ height: t,
380
+ aspectRatio: a
381
+ };
382
+ }
383
+ const Be = b(() => L.value.ticks), pt = b(() => ({ start: 0, end: Be.value.length }));
384
+ Rt({
385
+ timeLabelsEls: j,
386
+ timeLabels: Be,
387
+ slicer: pt,
388
+ configRef: e,
389
+ rotationPath: ["style", "chart", "labels", "xAxisLabels", "rotation"],
390
+ autoRotatePath: ["style", "chart", "labels", "xAxisLabels", "autoRotate"],
391
+ isAutoSize: !1,
392
+ width: G,
393
+ height: E,
394
+ targetClass: ".vue-ui-dumbbell-scale-label"
395
+ });
396
+ function xt({
397
+ rowHeight: l,
398
+ fontSize: s,
399
+ showProgression: t
400
+ }) {
401
+ if (!t) return !1;
402
+ const a = l / 3, u = l / 1.3, v = Math.abs(u - a), f = s * 1.2;
403
+ return v < f;
404
+ }
405
+ const kt = /* @__PURE__ */ (() => {
406
+ let l = null, s = 0;
407
+ const t = 1;
408
+ return (a) => {
409
+ if (a === I.value) {
410
+ l = null, s = 0;
411
+ return;
412
+ }
413
+ l === null || l !== a ? (l = a, s = 1) : (s += 1, s >= t && (I.value = a, l = null, s = 0));
414
+ };
415
+ })(), Ve = be(() => {
416
+ requestAnimationFrame(() => {
417
+ requestAnimationFrame(() => {
418
+ const l = xt({
419
+ rowHeight: n.value.rowHeight,
420
+ fontSize: e.value.style.chart.labels.yAxisLabels.fontSize,
421
+ showProgression: e.value.style.chart.labels.yAxisLabels.showProgression
422
+ });
423
+ kt(l);
424
+ });
425
+ });
426
+ }, 100);
427
+ function ve({ datapoint: l, seriesIndex: s }) {
428
+ T.value = s, r.value = l, e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: l, seriesIndex: s });
429
+ }
430
+ function de({ datapoint: l, seriesIndex: s }) {
431
+ T.value = null, r.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: s });
432
+ }
433
+ function he({ datapoint: l, seriesIndex: s }) {
434
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: s });
435
+ }
436
+ const fe = b(() => {
437
+ if (r.value === null) return 0;
438
+ const l = ![null, void 0].includes(r.value.start), s = ![null, void 0].includes(r.value.end);
439
+ return l && s ? Math.min(r.value.startX, r.value.endX) + Math.abs(r.value.startX - r.value.endX) / 2 : l && !s ? r.value.startX : s && !l ? r.value.endX : null;
440
+ }), _t = b(() => {
441
+ if (r.value === null) return "";
442
+ const l = ![null, void 0].includes(r.value.start), s = ![null, void 0].includes(r.value.end);
443
+ let t = "", a = "";
444
+ return l && (t = F(
445
+ e.value.style.chart.labels.formatter,
446
+ r.value.start,
447
+ $({
448
+ p: e.value.style.chart.labels.prefix,
449
+ v: r.value.start,
450
+ s: e.value.style.chart.labels.suffix,
451
+ r: e.value.style.chart.labels.startLabels.rounding
452
+ }),
453
+ { datapoint: r.value, seriesIndex: T.value }
454
+ )), s && (a = F(
455
+ e.value.style.chart.labels.formatter,
456
+ r.value.end,
457
+ $({
458
+ p: e.value.style.chart.labels.prefix,
459
+ v: r.value.end,
460
+ s: e.value.style.chart.labels.suffix,
461
+ r: e.value.style.chart.labels.startLabels.rounding
462
+ }),
463
+ { datapoint: r.value, seriesIndex: T.value }
464
+ )), l && s ? `${t} → ${a}` : l && !s ? t : s && !l ? a : "";
465
+ });
466
+ return nt({
467
+ getData: gt,
468
+ getImage: mt,
469
+ generatePdf: ze,
470
+ generateCsv: Ee,
471
+ generateImage: Te,
472
+ toggleTable: Re,
473
+ toggleAnnotator: ce,
474
+ toggleFullscreen: Ge
475
+ }), (l, s) => (o(), i("div", {
476
+ ref_key: "dumbbellChart",
477
+ ref: z,
478
+ class: je(`vue-ui-dumbbell ${B.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
479
+ style: K(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
480
+ id: `dumbbell_${g.value}`,
481
+ onMouseenter: s[1] || (s[1] = () => c(Le)(!0)),
482
+ onMouseleave: s[2] || (s[2] = () => c(Le)(!1))
483
+ }, [
484
+ e.value.userOptions.buttons.annotator ? (o(), O(c(ut), {
485
+ key: 0,
486
+ svgRef: c(Ae),
487
+ backgroundColor: e.value.style.chart.backgroundColor,
488
+ color: e.value.style.chart.color,
489
+ active: Z.value,
490
+ onClose: ce
491
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : y("", !0),
492
+ ht.value ? (o(), i("div", {
493
+ key: 1,
494
+ ref_key: "noTitle",
495
+ ref: ke,
496
+ class: "vue-data-ui-no-title-space",
497
+ style: "height:36px; width: 100%;background:transparent"
498
+ }, null, 512)) : y("", !0),
499
+ e.value.style.chart.title.text ? (o(), i("div", {
500
+ key: 2,
501
+ ref_key: "chartTitle",
502
+ ref: me,
503
+ style: "width:100%;background:transparent;padding-bottom:24px"
504
+ }, [
505
+ (o(), O(Vt, {
506
+ key: `title_${_e.value}`,
507
+ config: {
508
+ title: {
509
+ cy: "donut-div-title",
510
+ ...e.value.style.chart.title
511
+ },
512
+ subtitle: {
513
+ cy: "donut-div-subtitle",
514
+ ...e.value.style.chart.title.subtitle
515
+ }
516
+ }
517
+ }, null, 8, ["config"]))
518
+ ], 512)) : y("", !0),
519
+ e.value.userOptions.show && q.value && (c(Ce) || c(oe)) ? (o(), O(c(it), {
520
+ ref: "details",
521
+ key: `user_option_${ge.value}`,
522
+ backgroundColor: e.value.style.chart.backgroundColor,
523
+ color: e.value.style.chart.color,
524
+ isPrinting: c(Me),
525
+ isImaging: c(Xe),
526
+ uid: g.value,
527
+ hasPdf: e.value.userOptions.buttons.pdf,
528
+ hasXls: e.value.userOptions.buttons.csv,
529
+ hasImg: e.value.userOptions.buttons.img,
530
+ hasTable: e.value.userOptions.buttons.table,
531
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
532
+ isFullscreen: B.value,
533
+ titles: { ...e.value.userOptions.buttonTitles },
534
+ chartElement: z.value,
535
+ position: e.value.userOptions.position,
536
+ hasAnnotator: e.value.userOptions.buttons.annotator,
537
+ isAnnotation: Z.value,
538
+ callbacks: e.value.userOptions.callbacks,
539
+ printScale: e.value.userOptions.print.scale,
540
+ onToggleFullscreen: Ge,
541
+ onGeneratePdf: c(ze),
542
+ onGenerateCsv: Ee,
543
+ onGenerateImage: c(Te),
544
+ onToggleTable: Re,
545
+ onToggleAnnotator: ce,
546
+ style: K({
547
+ visibility: c(Ce) ? c(oe) ? "visible" : "hidden" : "visible"
548
+ })
549
+ }, Lt({ _: 2 }, [
550
+ l.$slots.menuIcon ? {
551
+ name: "menuIcon",
552
+ fn: p(({ isOpen: t, color: a }) => [
553
+ m(l.$slots, "menuIcon", Q(ee({ isOpen: t, color: a })), void 0, !0)
554
+ ]),
555
+ key: "0"
556
+ } : void 0,
557
+ l.$slots.optionPdf ? {
558
+ name: "optionPdf",
559
+ fn: p(() => [
560
+ m(l.$slots, "optionPdf", {}, void 0, !0)
561
+ ]),
562
+ key: "1"
563
+ } : void 0,
564
+ l.$slots.optionCsv ? {
565
+ name: "optionCsv",
566
+ fn: p(() => [
567
+ m(l.$slots, "optionCsv", {}, void 0, !0)
568
+ ]),
569
+ key: "2"
570
+ } : void 0,
571
+ l.$slots.optionImg ? {
572
+ name: "optionImg",
573
+ fn: p(() => [
574
+ m(l.$slots, "optionImg", {}, void 0, !0)
575
+ ]),
576
+ key: "3"
577
+ } : void 0,
578
+ l.$slots.optionTable ? {
579
+ name: "optionTable",
580
+ fn: p(() => [
581
+ m(l.$slots, "optionTable", {}, void 0, !0)
582
+ ]),
583
+ key: "4"
584
+ } : void 0,
585
+ l.$slots.optionFullscreen ? {
586
+ name: "optionFullscreen",
587
+ fn: p(({ toggleFullscreen: t, isFullscreen: a }) => [
588
+ m(l.$slots, "optionFullscreen", Q(ee({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
589
+ ]),
590
+ key: "5"
591
+ } : void 0,
592
+ l.$slots.optionAnnotator ? {
593
+ name: "optionAnnotator",
594
+ fn: p(({ toggleAnnotator: t, isAnnotator: a }) => [
595
+ m(l.$slots, "optionAnnotator", Q(ee({ toggleAnnotator: t, isAnnotator: a })), void 0, !0)
596
+ ]),
597
+ key: "6"
598
+ } : void 0
599
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : y("", !0),
600
+ (o(), i("svg", {
601
+ ref_key: "svgRef",
602
+ ref: Ae,
603
+ xmlns: c(Qe),
604
+ class: je({ "vue-data-ui-fullscreen--on": B.value, "vue-data-ui-fulscreen--off": !B.value }),
605
+ viewBox: `0 0 ${G.value} ${n.value.absoluteHeight <= 0 ? 10 : n.value.absoluteHeight}`,
606
+ style: K(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
607
+ }, [
608
+ Ct(c(ct)),
609
+ l.$slots["chart-background"] ? (o(), i("foreignObject", {
610
+ key: 0,
611
+ x: n.value.left,
612
+ y: n.value.top,
613
+ width: Math.max(0.1, n.value.width),
614
+ height: Math.max(0.1, n.value.height),
615
+ style: {
616
+ pointerEvents: "none"
617
+ }
618
+ }, [
619
+ m(l.$slots, "chart-background", {}, void 0, !0)
620
+ ], 8, Yt)) : y("", !0),
621
+ e.value.style.chart.grid.verticalGrid.show ? (o(), i("g", Zt, [
622
+ (o(!0), i(w, null, A(L.value.ticks, (t, a) => (o(), i("line", {
623
+ x1: n.value.left + a * n.value.width / (L.value.ticks.length - 1),
624
+ x2: n.value.left + a * n.value.width / (L.value.ticks.length - 1),
625
+ y1: n.value.top,
626
+ y2: n.value.bottom,
627
+ stroke: e.value.style.chart.grid.verticalGrid.stroke,
628
+ "stroke-width": e.value.style.chart.grid.verticalGrid.strokeWidth,
629
+ "stroke-dasharray": e.value.style.chart.grid.verticalGrid.strokeDasharray
630
+ }, null, 8, Jt))), 256))
631
+ ])) : y("", !0),
632
+ e.value.style.chart.grid.horizontalGrid.show ? (o(), i("g", Kt, [
633
+ (o(!0), i(w, null, A(P.value, (t, a) => (o(), i("line", {
634
+ x1: n.value.left,
635
+ x2: n.value.right,
636
+ y1: n.value.top + a * n.value.rowHeight,
637
+ y2: n.value.top + a * n.value.rowHeight,
638
+ stroke: e.value.style.chart.grid.horizontalGrid.stroke,
639
+ "stroke-width": e.value.style.chart.grid.horizontalGrid.strokeWidth,
640
+ "stroke-dasharray": e.value.style.chart.grid.horizontalGrid.strokeDasharray
641
+ }, null, 8, Qt))), 256)),
642
+ d("line", {
643
+ x1: n.value.left,
644
+ x2: n.value.right,
645
+ y1: n.value.bottom,
646
+ y2: n.value.bottom,
647
+ stroke: e.value.style.chart.grid.horizontalGrid.stroke,
648
+ "stroke-width": e.value.style.chart.grid.horizontalGrid.strokeWidth,
649
+ "stroke-dasharray": e.value.style.chart.grid.horizontalGrid.strokeDasharray
650
+ }, null, 8, el)
651
+ ])) : y("", !0),
652
+ e.value.style.chart.labels.axis.yLabel ? (o(), i("text", {
653
+ key: 3,
654
+ ref_key: "yAxisLabel",
655
+ ref: te,
656
+ transform: `translate(${e.value.style.chart.labels.axis.fontSize}, ${n.value.absoluteHeight / 2}), rotate(-90)`,
657
+ "font-size": e.value.style.chart.labels.axis.fontSize,
658
+ fill: e.value.style.chart.labels.axis.color,
659
+ "text-anchor": "middle"
660
+ }, x(e.value.style.chart.labels.axis.yLabel), 9, tl)) : y("", !0),
661
+ e.value.style.chart.labels.yAxisLabels.show ? (o(), i("g", {
662
+ key: 4,
663
+ ref_key: "serieLabels",
664
+ ref: le
665
+ }, [
666
+ (o(!0), i(w, null, A(k.value, (t, a) => (o(), i("text", {
667
+ class: "vue-ui-dumbbell-serie-name",
668
+ key: `serieLabel_${t.id}_${a}`,
669
+ x: n.value.left - 6 + e.value.style.chart.labels.yAxisLabels.offsetX,
670
+ y: n.value.top + a * n.value.rowHeight + (!e.value.style.chart.labels.yAxisLabels.showProgression || I.value ? n.value.rowHeight / 2 : n.value.rowHeight / 3) + e.value.style.chart.labels.yAxisLabels.fontSize / 3,
671
+ "font-size": e.value.style.chart.labels.yAxisLabels.fontSize,
672
+ fill: e.value.style.chart.labels.yAxisLabels.color,
673
+ "font-weight": e.value.style.chart.labels.yAxisLabels.bold ? "bold" : "normal",
674
+ "text-anchor": "end",
675
+ onMouseenter: (u) => ve({ datapoint: t, seriesIndex: a }),
676
+ onMouseleave: (u) => de({ datapoint: t, seriesIndex: a }),
677
+ onClick: (u) => he({ datapoint: t, seriesIndex: a })
678
+ }, x(t.name) + " " + x(I.value && e.value.style.chart.labels.yAxisLabels.showProgression ? [null, void 0].includes(t.start) || [null, void 0].includes(t.end) ? "" : `(${c(F)(
679
+ e.value.style.chart.labels.yAxisLabels.formatter,
680
+ 100 * (t.end / t.start - 1),
681
+ c($)({
682
+ v: 100 * (t.end / t.start - 1),
683
+ s: "%",
684
+ r: e.value.style.chart.labels.yAxisLabels.rounding
685
+ }),
686
+ { datapoint: t }
687
+ )})` : ""), 41, ll))), 128)),
688
+ e.value.style.chart.labels.yAxisLabels.showProgression && !I.value ? (o(!0), i(w, { key: 0 }, A(k.value, (t, a) => (o(), i("text", {
689
+ class: "vue-ui-dumbbell-serie-value",
690
+ x: n.value.left - 6 + e.value.style.chart.labels.yAxisLabels.offsetX,
691
+ y: n.value.top + a * n.value.rowHeight + n.value.rowHeight / 1.3 + e.value.style.chart.labels.yAxisLabels.fontSize / 3,
692
+ "font-size": e.value.style.chart.labels.yAxisLabels.fontSize,
693
+ fill: e.value.style.chart.labels.yAxisLabels.color,
694
+ "text-anchor": "end",
695
+ onMouseenter: (u) => ve({ datapoint: t, seriesIndex: a }),
696
+ onMouseleave: (u) => de({ datapoint: t, seriesIndex: a }),
697
+ onClick: (u) => he({ datapoint: t, seriesIndex: a })
698
+ }, x([null, void 0].includes(t.start) || [null, void 0].includes(t.end) ? "" : c(F)(
699
+ e.value.style.chart.labels.yAxisLabels.formatter,
700
+ 100 * (t.end / t.start - 1),
701
+ c($)({
702
+ v: 100 * (t.end / t.start - 1),
703
+ s: "%",
704
+ r: e.value.style.chart.labels.yAxisLabels.rounding
705
+ }),
706
+ { datapoint: t }
707
+ )), 41, al))), 256)) : y("", !0)
708
+ ], 512)) : y("", !0),
709
+ e.value.style.chart.labels.axis.xLabel ? (o(), i("text", {
710
+ key: 5,
711
+ ref_key: "xAxisLabel",
712
+ ref: ae,
713
+ x: n.value.left + n.value.width / 2,
714
+ y: n.value.absoluteHeight - e.value.style.chart.labels.axis.fontSize / 3,
715
+ "font-size": e.value.style.chart.labels.axis.fontSize,
716
+ fill: e.value.style.chart.labels.axis.color,
717
+ "text-anchor": "middle"
718
+ }, x(e.value.style.chart.labels.axis.xLabel), 9, sl)) : y("", !0),
719
+ e.value.style.chart.labels.xAxisLabels.show ? (o(), i("g", {
720
+ key: 6,
721
+ ref_key: "scaleLabels",
722
+ ref: j
723
+ }, [
724
+ (o(!0), i(w, null, A(L.value.ticks, (t, a) => (o(), i("text", {
725
+ class: "vue-ui-dumbbell-scale-label",
726
+ key: `tick_${a}`,
727
+ transform: `translate(${n.value.left + a * (n.value.width / (L.value.ticks.length - 1))}, ${n.value.bottom + e.value.style.chart.labels.xAxisLabels.fontSize + e.value.style.chart.labels.xAxisLabels.offsetY}), rotate(${e.value.style.chart.labels.xAxisLabels.rotation})`,
728
+ "font-size": e.value.style.chart.labels.xAxisLabels.fontSize,
729
+ fill: e.value.style.chart.labels.xAxisLabels.color,
730
+ "font-weight": e.value.style.chart.labels.xAxisLabels.bold ? "bold" : "normal",
731
+ "text-anchor": e.value.style.chart.labels.xAxisLabels.rotation > 0 ? "start" : e.value.style.chart.labels.xAxisLabels.rotation < 0 ? "end" : "middle"
732
+ }, x(c(F)(
733
+ e.value.style.chart.labels.formatter,
734
+ t,
735
+ c($)({
736
+ p: e.value.style.chart.labels.prefix,
737
+ v: t,
738
+ s: e.value.style.chart.labels.suffix,
739
+ r: e.value.style.chart.labels.xAxisLabels.rounding
740
+ }),
741
+ { datapoint: t, seriesIndex: a }
742
+ )), 9, nl))), 128))
743
+ ], 512)) : y("", !0),
744
+ U(d("g", null, [
745
+ U(d("path", {
746
+ d: `M ${r.value ? r.value.startX : n.value.left},${n.value.top} ${r.value ? r.value.startX : n.value.left},${n.value.bottom}`,
747
+ stroke: r.value ? e.value.style.chart.plots.startColor : "transparent",
748
+ "stroke-width": e.value.style.chart.comparisonLines.strokeWidth,
749
+ "stroke-dasharray": e.value.style.chart.comparisonLines.strokeDasharray,
750
+ style: { transition: "all 0.3s ease-in-out" }
751
+ }, null, 8, ol), [
752
+ [W, r.value !== null && ![null, void 0].includes(r.value.start)]
753
+ ]),
754
+ U(d("path", {
755
+ d: `M ${r.value ? r.value.endX : n.value.left},${n.value.top} ${r.value ? r.value.endX : n.value.left},${n.value.bottom}`,
756
+ stroke: r.value ? e.value.style.chart.plots.endColor : "transparent",
757
+ "stroke-width": e.value.style.chart.comparisonLines.strokeWidth,
758
+ "stroke-dasharray": e.value.style.chart.comparisonLines.strokeDasharray,
759
+ style: { transition: "all 0.3s ease-in-out" }
760
+ }, null, 8, rl), [
761
+ [W, r.value !== null && ![null, void 0].includes(r.value.end)]
762
+ ]),
763
+ U(d("rect", {
764
+ x: r.value ? Math.min(r.value.startX, r.value.endX) : n.value.left,
765
+ y: n.value.top,
766
+ height: Math.max(0.1, n.value.height),
767
+ width: r.value ? Math.max(0.1, Math.abs(r.value.endX - r.value.startX)) : 0,
768
+ fill: r.value ? c(et)(e.value.style.chart.comparisonLines.rectColor, e.value.style.chart.comparisonLines.rectOpacity) : "transparent",
769
+ style: { transition: "all 0.3s ease-in-out" }
770
+ }, null, 8, ul), [
771
+ [W, e.value.style.chart.comparisonLines.showRect && r.value !== null && ![null, void 0].includes(r.value.start) && ![null, void 0].includes(r.value.end)]
772
+ ]),
773
+ U(d("text", {
774
+ transform: `translate(${fe.value == null ? 0 : fe.value}, ${n.value.top - 6})`,
775
+ fill: e.value.style.chart.comparisonLines.labelColor,
776
+ "font-size": e.value.style.chart.comparisonLines.labelFontSize,
777
+ "text-anchor": "middle",
778
+ style: { transition: "all 0.3s ease-in-out" }
779
+ }, x(_t.value), 9, il), [
780
+ [W, r.value !== null && fe.value !== null && e.value.style.chart.comparisonLines.showLabel]
781
+ ])
782
+ ], 512), [
783
+ [W, e.value.style.chart.comparisonLines.show && T.value !== null]
784
+ ]),
785
+ d("defs", null, [
786
+ d("radialGradient", {
787
+ id: `start_grad_${g.value}`,
788
+ fy: "30%"
789
+ }, [
790
+ d("stop", {
791
+ offset: "10%",
792
+ "stop-color": c(tt)(e.value.style.chart.plots.startColor, e.value.style.chart.plots.gradient.intensity / 100)
793
+ }, null, 8, vl),
794
+ d("stop", {
795
+ offset: "90%",
796
+ "stop-color": c(lt)(e.value.style.chart.plots.startColor, 0.1)
797
+ }, null, 8, dl),
798
+ d("stop", {
799
+ offset: "100%",
800
+ "stop-color": e.value.style.chart.plots.startColor
801
+ }, null, 8, hl)
802
+ ], 8, cl),
803
+ d("radialGradient", {
804
+ id: `end_grad_${g.value}`,
805
+ fy: "30%"
806
+ }, [
807
+ d("stop", {
808
+ offset: "10%",
809
+ "stop-color": c(tt)(e.value.style.chart.plots.endColor, e.value.style.chart.plots.gradient.intensity / 100)
810
+ }, null, 8, yl),
811
+ d("stop", {
812
+ offset: "90%",
813
+ "stop-color": c(lt)(e.value.style.chart.plots.endColor, 0.1)
814
+ }, null, 8, bl),
815
+ d("stop", {
816
+ offset: "100%",
817
+ "stop-color": e.value.style.chart.plots.endColor
818
+ }, null, 8, gl)
819
+ ], 8, fl)
820
+ ]),
821
+ (o(!0), i(w, null, A(k.value, (t, a) => (o(), i("g", {
822
+ key: `plot_${a}_${t.id}`
823
+ }, [
824
+ d("defs", null, [
825
+ d("linearGradient", {
826
+ id: `grad_positive_${g.value}`,
827
+ x1: "0%",
828
+ x2: "100%",
829
+ y1: "0%",
830
+ y2: "0%"
831
+ }, [
832
+ d("stop", {
833
+ offset: "0%",
834
+ "stop-color": e.value.style.chart.plots.startColor
835
+ }, null, 8, pl),
836
+ d("stop", {
837
+ offset: "100%",
838
+ "stop-color": e.value.style.chart.plots.endColor
839
+ }, null, 8, xl)
840
+ ], 8, ml),
841
+ d("linearGradient", {
842
+ id: `grad_negative_${g.value}`,
843
+ x1: "0%",
844
+ x2: "100%",
845
+ y1: "0%",
846
+ y2: "0%"
847
+ }, [
848
+ d("stop", {
849
+ offset: "0%",
850
+ "stop-color": e.value.style.chart.plots.endColor
851
+ }, null, 8, _l),
852
+ d("stop", {
853
+ offset: "100%",
854
+ "stop-color": e.value.style.chart.plots.startColor
855
+ }, null, 8, wl)
856
+ ], 8, kl)
857
+ ]),
858
+ ![void 0, null].includes(t.end) && ![void 0, null].includes(t.start) ? (o(), i("g", $l, [
859
+ e.value.style.chart.plots.link.type === "curved" ? (o(), i("g", Ll, [
860
+ d("path", {
861
+ d: `M
862
+ ${t.startX},${t.y + M.value / 2}
863
+ C ${t.centerX},${t.y} ${t.centerX},${t.y}
864
+ ${t.endX},${t.y + M.value / 2}
865
+ L ${t.endX},${t.y - M.value / 2}
866
+ C ${t.centerX},${t.y} ${t.centerX},${t.y}
867
+ ${t.startX},${t.y - M.value / 2}
868
+ Z
869
+ `,
870
+ fill: t.endX > t.startX ? `url(#grad_positive_${g.value})` : `url(#grad_negative_${g.value})`
871
+ }, null, 8, Cl)
872
+ ])) : (o(), i("g", Al, [
873
+ d("rect", {
874
+ x: t.endX > t.startX ? t.startX : t.endX,
875
+ y: t.y - e.value.style.chart.plots.link.strokeWidth / 2,
876
+ height: Math.max(0.01, e.value.style.chart.plots.link.strokeWidth),
877
+ width: Math.max(0.01, Math.abs(t.endX - t.startX)),
878
+ fill: t.endX > t.startX ? `url(#grad_positive_${g.value})` : `url(#grad_negative_${g.value})`
879
+ }, null, 8, Nl)
880
+ ]))
881
+ ])) : y("", !0),
882
+ [null, void 0].includes(t.start) ? y("", !0) : (o(), i("circle", {
883
+ key: 1,
884
+ cx: t.startX,
885
+ cy: t.y,
886
+ r: M.value,
887
+ fill: e.value.style.chart.plots.gradient.show ? `url(#start_grad_${g.value})` : e.value.style.chart.plots.startColor,
888
+ stroke: e.value.style.chart.plots.stroke,
889
+ "stroke-width": e.value.style.chart.plots.strokeWidth
890
+ }, null, 8, Sl)),
891
+ [null, void 0].includes(t.end) ? y("", !0) : (o(), i("circle", {
892
+ key: 2,
893
+ cx: t.endX,
894
+ cy: t.y,
895
+ r: M.value,
896
+ fill: e.value.style.chart.plots.gradient.show ? `url(#end_grad_${g.value})` : e.value.style.chart.plots.endColor,
897
+ stroke: e.value.style.chart.plots.stroke,
898
+ "stroke-width": e.value.style.chart.plots.strokeWidth
899
+ }, null, 8, Ml))
900
+ ]))), 128)),
901
+ e.value.style.chart.labels.startLabels.show ? (o(), i("g", Xl, [
902
+ (o(!0), i(w, null, A(k.value, (t, a) => (o(), i("g", {
903
+ key: `start_label_${a}_${t.id}`
904
+ }, [
905
+ [null, void 0].includes(t.start) ? y("", !0) : (o(), i("text", {
906
+ key: 0,
907
+ x: t.startX,
908
+ y: t.y + M.value * 2 + e.value.style.chart.labels.startLabels.fontSize / 2,
909
+ fill: e.value.style.chart.labels.startLabels.useStartColor ? e.value.style.chart.plots.startColor : e.value.style.chart.labels.startLabels.color,
910
+ "font-size": e.value.style.chart.labels.startLabels.fontSize,
911
+ "text-anchor": "middle"
912
+ }, x(c(F)(
913
+ e.value.style.chart.labels.formatter,
914
+ t.start,
915
+ c($)({
916
+ p: e.value.style.chart.labels.prefix,
917
+ v: t.start,
918
+ s: e.value.style.chart.labels.suffix,
919
+ r: e.value.style.chart.labels.startLabels.rounding
920
+ }),
921
+ { datapoint: t, seriesIndex: a }
922
+ )), 9, zl))
923
+ ]))), 128))
924
+ ])) : y("", !0),
925
+ e.value.style.chart.labels.endLabels.show ? (o(), i("g", Tl, [
926
+ (o(!0), i(w, null, A(k.value, (t, a) => (o(), i("g", {
927
+ key: `end_label_${a}_${t.id}`
928
+ }, [
929
+ [null, void 0].includes(t.end) ? y("", !0) : (o(), i("text", {
930
+ key: 0,
931
+ x: t.endX,
932
+ y: t.y - (M.value * 2 - e.value.style.chart.labels.startLabels.fontSize / 3),
933
+ fill: e.value.style.chart.labels.endLabels.useEndColor ? e.value.style.chart.plots.endColor : e.value.style.chart.labels.endLabels.color,
934
+ "font-size": e.value.style.chart.labels.endLabels.fontSize,
935
+ "text-anchor": "middle"
936
+ }, x(c(F)(
937
+ e.value.style.chart.labels.formatter,
938
+ t.end,
939
+ c($)({
940
+ p: e.value.style.chart.labels.prefix,
941
+ v: t.end,
942
+ s: e.value.style.chart.labels.suffix,
943
+ r: e.value.style.chart.labels.endLabels.rounding
944
+ }),
945
+ { datapoint: t, seriesIndex: a }
946
+ )), 9, Il))
947
+ ]))), 128))
948
+ ])) : y("", !0),
949
+ d("g", null, [
950
+ (o(!0), i(w, null, A(k.value, (t, a) => (o(), i("rect", {
951
+ x: n.value.left,
952
+ y: n.value.top + a * Math.max(0.1, n.value.rowHeight),
953
+ width: Math.max(0.1, n.value.width),
954
+ height: Math.max(0.1, n.value.rowHeight),
955
+ fill: T.value !== null && T.value === a ? c(et)(e.value.style.chart.highlighter.color, e.value.style.chart.highlighter.opacity) : "transparent",
956
+ onMouseenter: (u) => ve({ datapoint: t, seriesIndex: a }),
957
+ onMouseleave: (u) => de({ datapoint: t, seriesIndex: a }),
958
+ onClick: (u) => he({ datapoint: t, seriesIndex: a })
959
+ }, null, 40, Ol))), 256))
960
+ ]),
961
+ m(l.$slots, "svg", { svg: n.value }, void 0, !0)
962
+ ], 14, jt)),
963
+ l.$slots.watermark ? (o(), i("div", Fl, [
964
+ m(l.$slots, "watermark", Q(ee({ isPrinting: c(Me) || c(Xe) })), void 0, !0)
965
+ ])) : y("", !0),
966
+ d("div", {
967
+ ref_key: "chartLegend",
968
+ ref: pe
969
+ }, [
970
+ e.value.style.chart.legend.show && q.value ? (o(), O(Ut, {
971
+ key: `legend_${$e.value}`,
972
+ legendSet: Pe.value,
973
+ config: bt.value,
974
+ clickable: !1
975
+ }, {
976
+ item: p(({ legend: t }) => [
977
+ d("div", {
978
+ style: K(`display:flex;align-items:center;gap:4px;font-size:${e.value.style.chart.legend.fontSize}px`)
979
+ }, [
980
+ (o(), i("svg", {
981
+ xmlns: c(Qe),
982
+ viewBox: "0 0 20 20",
983
+ height: e.value.style.chart.legend.fontSize,
984
+ width: e.value.style.chart.legend.fontSize
985
+ }, [
986
+ d("circle", {
987
+ cx: 10,
988
+ cy: 10,
989
+ r: 9,
990
+ fill: t.color
991
+ }, null, 8, Dl)
992
+ ], 8, Hl)),
993
+ c(se) ? y("", !0) : (o(), i(w, { key: 0 }, [
994
+ Ye(x(t.name), 1)
995
+ ], 64))
996
+ ], 4)
997
+ ]),
998
+ _: 1
999
+ }, 8, ["legendSet", "config"])) : m(l.$slots, "legend", {
1000
+ key: 1,
1001
+ legend: Pe.value
1002
+ }, void 0, !0)
1003
+ ], 512),
1004
+ l.$slots.source ? (o(), i("div", {
1005
+ key: 5,
1006
+ ref_key: "source",
1007
+ ref: xe,
1008
+ dir: "auto"
1009
+ }, [
1010
+ m(l.$slots, "source", {}, void 0, !0)
1011
+ ], 512)) : y("", !0),
1012
+ q.value ? (o(), O(c(ot), {
1013
+ key: 6,
1014
+ hideDetails: "",
1015
+ config: {
1016
+ open: D.value.showTable,
1017
+ maxHeight: 1e4,
1018
+ body: {
1019
+ backgroundColor: e.value.style.chart.backgroundColor,
1020
+ color: e.value.style.chart.color
1021
+ },
1022
+ head: {
1023
+ backgroundColor: e.value.style.chart.backgroundColor,
1024
+ color: e.value.style.chart.color
1025
+ }
1026
+ }
1027
+ }, {
1028
+ content: p(() => [
1029
+ (o(), O(c(rt), {
1030
+ key: `table_${we.value}`,
1031
+ colNames: Y.value.colNames,
1032
+ head: Y.value.head,
1033
+ body: Y.value.body,
1034
+ config: Y.value.config,
1035
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
1036
+ onClose: s[0] || (s[0] = (t) => D.value.showTable = !1)
1037
+ }, {
1038
+ th: p(({ th: t }) => [
1039
+ d("div", {
1040
+ innerHTML: t,
1041
+ style: { display: "flex", "align-items": "center" }
1042
+ }, null, 8, Pl)
1043
+ ]),
1044
+ td: p(({ td: t }) => [
1045
+ Ye(x(t.name || t), 1)
1046
+ ]),
1047
+ _: 1
1048
+ }, 8, ["colNames", "head", "body", "config", "title"]))
1049
+ ]),
1050
+ _: 1
1051
+ }, 8, ["config"])) : y("", !0),
1052
+ c(se) ? (o(), O(Pt, { key: 7 })) : y("", !0)
1053
+ ], 46, qt));
1054
+ }
1055
+ }, ta = /* @__PURE__ */ Wt(El, [["__scopeId", "data-v-67a10f96"]]);
1056
+ export {
1057
+ ta as default
1058
+ };