vue-data-ui 3.0.0-next.54 → 3.0.0-next.56

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-LMYgGTUq.js → Arrow-Dr73vXkS.js} +1 -1
  2. package/dist/{BaseDraggableDialog-D6NKDVDd.js → BaseDraggableDialog-C94LH2gO.js} +2 -2
  3. package/dist/{BaseIcon-D1YxuTqn.js → BaseIcon-DVj5nedZ.js} +1 -1
  4. package/dist/{ColorPicker-Dqnk4Bis.js → ColorPicker-BmI1B2Ie.js} +2 -2
  5. package/dist/{DataTable-D1RPxkQn.js → DataTable-DIRgYyMk.js} +2 -2
  6. package/dist/{Legend-BBaTktyQ.js → Legend-Bm0VbPfX.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-Dqp0PFOO.js → NonSvgPenAndPaper-B9qj2h1N.js} +3 -3
  8. package/dist/{PackageVersion-Dvivm8-r.js → PackageVersion-CmrjjMGu.js} +1 -1
  9. package/dist/{PenAndPaper-DaQWWpgs.js → PenAndPaper-CkxcaljP.js} +3 -3
  10. package/dist/{Shape-Dc4AHan7.js → Shape-PFacVGG6.js} +1 -1
  11. package/dist/{Slicer-viJHi_bq.js → Slicer-OzSjPeeA.js} +2 -2
  12. package/dist/{SparkTooltip-Ca7tsP2u.js → SparkTooltip-B5KxrXfj.js} +1 -1
  13. package/dist/{Title-Bnr--aA5.js → Title-CPlHadE3.js} +1 -1
  14. package/dist/{Tooltip-DSvSWahk.js → Tooltip-DfLg6pdN.js} +1 -1
  15. package/dist/{UserOptions-Dm91TR_d.js → UserOptions-Cvao0wOJ.js} +2 -2
  16. package/dist/{dom-to-png-DTwkx-9j.js → dom-to-png-D_YDAEr8.js} +1 -1
  17. package/dist/{img-Brj7vn--.js → img-BUkzDAPW.js} +1 -1
  18. package/dist/{index-B5FRcZLo.js → index-bTtbNszd.js} +706 -668
  19. package/dist/{pdf-s-J6FH3X.js → pdf-DH7vaP6J.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +42 -2
  22. package/dist/types/vue-data-ui.d.ts +42 -2
  23. package/dist/{useAutoSizeLabelsInsideViewbox-xwIHroEq.js → useAutoSizeLabelsInsideViewbox-D78glQ57.js} +1 -1
  24. package/dist/{BaseScanner-DIK2NTdp.js → useLoading-Bt5Doa8m.js} +11 -11
  25. package/dist/useNestedProp-CYma7CyA.js +13 -0
  26. package/dist/{usePrinter-CHbm8PGD.js → usePrinter-Byfy8pVl.js} +2 -2
  27. package/dist/{vue-data-ui-jynIaHEu.js → vue-data-ui-BA5aCP0F.js} +64 -64
  28. package/dist/vue-data-ui.js +1 -1
  29. package/dist/vue-ui-3d-bar-D8ONqED5.js +1323 -0
  30. package/dist/{vue-ui-accordion-h_xORY7m.js → vue-ui-accordion-CwsNjkyh.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-ByNg19-v.js → vue-ui-age-pyramid-DZ6AvPgA.js} +7 -7
  32. package/dist/{vue-ui-annotator-DHWKIAiw.js → vue-ui-annotator-BUUPzhqT.js} +2 -2
  33. package/dist/{vue-ui-bullet-D8QT8Bn3.js → vue-ui-bullet-DJ5o_J5c.js} +8 -8
  34. package/dist/{vue-ui-candlestick-Dfga6m-d.js → vue-ui-candlestick-DTOpUEUO.js} +8 -8
  35. package/dist/{vue-ui-carousel-table--OsqU2f2.js → vue-ui-carousel-table-D9h_e75T.js} +29 -29
  36. package/dist/{vue-ui-chestnut-Bos9_e2W.js → vue-ui-chestnut-T3gxdFRJ.js} +5 -5
  37. package/dist/{vue-ui-chord-CBxXikz5.js → vue-ui-chord-BXgJkrMP.js} +8 -8
  38. package/dist/{vue-ui-circle-pack-CA4h8PoX.js → vue-ui-circle-pack-CeDwV2pm.js} +42 -42
  39. package/dist/{vue-ui-cursor-D1e1-QTO.js → vue-ui-cursor-5EQyN1HC.js} +2 -2
  40. package/dist/{vue-ui-dashboard-CGLgntfH.js → vue-ui-dashboard-CRy1Qs01.js} +62 -62
  41. package/dist/{vue-ui-digits-CsO3Iczu.js → vue-ui-digits-wfErkCJ_.js} +2 -2
  42. package/dist/{vue-ui-donut-evolution-s6f_kN-K.js → vue-ui-donut-evolution-57R6hLc8.js} +9 -9
  43. package/dist/{vue-ui-donut-CkicdCC0.js → vue-ui-donut-fMNTVnoQ.js} +9 -9
  44. package/dist/vue-ui-dumbbell-Bb9EWdAh.js +1119 -0
  45. package/dist/{vue-ui-flow-BQUZA0Ci.js → vue-ui-flow-ZTN_1mhN.js} +8 -8
  46. package/dist/{vue-ui-funnel-BaJXfhkn.js → vue-ui-funnel-nrLWJgh7.js} +16 -16
  47. package/dist/{vue-ui-galaxy-AamRVENQ.js → vue-ui-galaxy-DqJRsXpE.js} +5 -5
  48. package/dist/{vue-ui-gauge-DwpIlS3L.js → vue-ui-gauge-DHpR-E7B.js} +8 -8
  49. package/dist/{vue-ui-gizmo-_LjeGmAP.js → vue-ui-gizmo-6QmhvBHc.js} +3 -3
  50. package/dist/{vue-ui-heatmap-C2LL_MI_.js → vue-ui-heatmap-DBCm73qw.js} +8 -8
  51. package/dist/{vue-ui-history-plot-BLxytFYc.js → vue-ui-history-plot-qan_4GRJ.js} +20 -20
  52. package/dist/{vue-ui-kpi-D2Pbj0bH.js → vue-ui-kpi-B-SrOVSP.js} +7 -7
  53. package/dist/{vue-ui-mini-loader-DlrRQmpO.js → vue-ui-mini-loader-C4x-pTjm.js} +2 -2
  54. package/dist/{vue-ui-molecule-BUJqDdqt.js → vue-ui-molecule-DEd1uTxl.js} +15 -15
  55. package/dist/{vue-ui-mood-radar-B3_UAmrH.js → vue-ui-mood-radar-CwoHDmS7.js} +15 -15
  56. package/dist/{vue-ui-nested-donuts-C6J6RswH.js → vue-ui-nested-donuts-DbFA4Z1s.js} +10 -10
  57. package/dist/{vue-ui-onion-BbABpEI9.js → vue-ui-onion-CG_mZFym.js} +24 -24
  58. package/dist/{vue-ui-parallel-coordinate-plot-DKg6Ksmk.js → vue-ui-parallel-coordinate-plot-jU6R5FJX.js} +9 -9
  59. package/dist/{vue-ui-quadrant-DKYW231A.js → vue-ui-quadrant-jvc98f1Q.js} +8 -8
  60. package/dist/{vue-ui-quick-chart-Dk8KMMWE.js → vue-ui-quick-chart-CB8cnyMU.js} +45 -45
  61. package/dist/{vue-ui-radar-JJJvDyH0.js → vue-ui-radar-Dbf8tizc.js} +25 -25
  62. package/dist/{vue-ui-rating-hbgc6VRD.js → vue-ui-rating-BTD7xrCK.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-Btubhkqp.js → vue-ui-relation-circle-jErgm958.js} +6 -6
  64. package/dist/{vue-ui-ridgeline-zS0itk3r.js → vue-ui-ridgeline-we0epqNk.js} +9 -9
  65. package/dist/{vue-ui-rings-C6QI4vT_.js → vue-ui-rings-DJWTf1uZ.js} +20 -20
  66. package/dist/{vue-ui-scatter-C2kNKb55.js → vue-ui-scatter-C94FXact.js} +9 -9
  67. package/dist/{vue-ui-skeleton-CzVYh2n3.js → vue-ui-skeleton--VFckr1-.js} +3 -3
  68. package/dist/{vue-ui-smiley-BK28gGd8.js → vue-ui-smiley-DNj5p6hi.js} +26 -26
  69. package/dist/{vue-ui-spark-trend-CSypVrHj.js → vue-ui-spark-trend-BUKgFMV_.js} +3 -3
  70. package/dist/{vue-ui-sparkbar-Cn2ww9SA.js → vue-ui-sparkbar-DMjqw4dV.js} +3 -3
  71. package/dist/{vue-ui-sparkgauge-D_q1ShxX.js → vue-ui-sparkgauge-BnWxrxBS.js} +3 -3
  72. package/dist/{vue-ui-sparkhistogram-DrWMDYwQ.js → vue-ui-sparkhistogram-7MSKip9i.js} +4 -4
  73. package/dist/{vue-ui-sparkline-B2EWoOpH.js → vue-ui-sparkline-C8NiPHel.js} +4 -4
  74. package/dist/{vue-ui-sparkstackbar-dgtxtC-v.js → vue-ui-sparkstackbar-B4OrKV2_.js} +3 -3
  75. package/dist/{vue-ui-stackbar-BEPKt8t1.js → vue-ui-stackbar-BePLgZLL.js} +10 -10
  76. package/dist/{vue-ui-strip-plot-CGLaQrOE.js → vue-ui-strip-plot-BzVgS6vT.js} +25 -25
  77. package/dist/{vue-ui-table-CYeBDq4t.js → vue-ui-table-088-wqHU.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-D5Higl6c.js → vue-ui-table-heatmap-A8gN9NU2.js} +5 -5
  79. package/dist/{vue-ui-table-sparkline-CgUjTFEu.js → vue-ui-table-sparkline-B5ydziP3.js} +14 -14
  80. package/dist/{vue-ui-thermometer-DdHoEvl8.js → vue-ui-thermometer-DVSW7iAt.js} +25 -25
  81. package/dist/{vue-ui-timer-Dd9-bUFJ.js → vue-ui-timer-DOlZVwc0.js} +5 -5
  82. package/dist/{vue-ui-tiremarks-CDvBqFb9.js → vue-ui-tiremarks-BdpwJTjQ.js} +7 -7
  83. package/dist/{vue-ui-treemap-Cnk77LIb.js → vue-ui-treemap-BzRJXnWX.js} +39 -39
  84. package/dist/{vue-ui-vertical-bar-CfedVdxi.js → vue-ui-vertical-bar-BWF4L-si.js} +10 -10
  85. package/dist/{vue-ui-waffle-_nuwY19z.js → vue-ui-waffle-YMOhYjS2.js} +27 -27
  86. package/dist/{vue-ui-wheel-mgrK52NV.js → vue-ui-wheel-C2LJqnuj.js} +7 -7
  87. package/dist/{vue-ui-word-cloud-X7c1DN4a.js → vue-ui-word-cloud-BqoWGzfw.js} +6 -6
  88. package/dist/{vue-ui-world-Ip9Cyd__.js → vue-ui-world-BInCh1JK.js} +6 -6
  89. package/dist/{vue-ui-xy-canvas-1KtHBKRO.js → vue-ui-xy-canvas-DaIL6iBg.js} +8 -8
  90. package/dist/{vue-ui-xy-CsH5sX8-.js → vue-ui-xy-uE2FWrCv.js} +87 -87
  91. package/package.json +1 -1
  92. package/dist/useNestedProp-BwJKakXX.js +0 -13
  93. package/dist/vue-ui-3d-bar-CuyTiQjS.js +0 -1227
  94. package/dist/vue-ui-dumbbell-DmYCdaFI.js +0 -1058
@@ -1,1058 +0,0 @@
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 Ye, 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 je, nextTick as At } from "vue";
2
- import { u as Nt, c as Ze, v as St, a as Xt, o as zt, e as Je, g as Mt, w as Ke, D as Tt, f as $, i as F, X as Qe, s as et, l as tt, h as lt, q as It, r as Ot } from "./index-B5FRcZLo.js";
3
- import { t as be, u as Ft } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ht } from "./usePrinter-CHbm8PGD.js";
5
- import { u as Dt, B as Pt } from "./BaseScanner-DIK2NTdp.js";
6
- import { u as at } from "./useNestedProp-BwJKakXX.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-Brj7vn--.js";
11
- import Vt from "./Title-Bnr--aA5.js";
12
- import Ut from "./Legend-BBaTktyQ.js";
13
- import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- const qt = ["id"], Yt = ["xmlns", "viewBox"], jt = ["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"], Xl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], zl = { key: 7 }, Ml = ["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-h_xORY7m.js")), rt = V(() => import("./DataTable-D1RPxkQn.js")), ut = V(() => import("./PenAndPaper-DaQWWpgs.js")), it = V(() => import("./UserOptions-Dm91TR_d.js")), ct = V(() => import("./PackageVersion-Dvivm8-r.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), M = 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), Y = 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: Xt.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 (zt(N.dataset) ? Je({
119
- componentName: "VueUiDumbbell",
120
- type: "dataset",
121
- debug: Ne.value
122
- }) : N.dataset.forEach((l, s) => {
123
- Mt({
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: M.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, (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 = M.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: Xe, isImaging: ze, generatePdf: Me, 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 = Y.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 Y.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
- }), X = 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
- })), z = 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
- }), j = 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 = z.value.head.map((u, v) => {
303
- const f = $({
304
- p: e.value.style.chart.labels.prefix,
305
- v: z.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: z.value.body[v].end,
311
- s: e.value.style.chart.labels.suffix,
312
- r: e.value.table.td.roundingValue
313
- }), J = $({
314
- v: 100 * (z.value.body[v].end / z.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 = z.value.head.map((u, v) => [[
352
- u.name
353
- ], [z.value.body[v].start], [z.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 (!M.value) return;
373
- const { width: s, height: t } = M.value.getBoundingClientRect(), a = s / t, { imageUri: u, base64: v } = await Bt({ domElement: M.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: Y,
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: Me,
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: M,
478
- class: Ye(`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(Xe),
525
- isImaging: c(ze),
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: M.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(Me),
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: Ye({ "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, jt)) : 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: Y
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: n.value.height,
767
- width: r.value ? 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 + X.value / 2}
863
- C ${t.centerX},${t.y} ${t.centerX},${t.y}
864
- ${t.endX},${t.y + X.value / 2}
865
- L ${t.endX},${t.y - X.value / 2}
866
- C ${t.centerX},${t.y} ${t.centerX},${t.y}
867
- ${t.startX},${t.y - X.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: e.value.style.chart.plots.link.strokeWidth,
877
- width: 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: X.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: X.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, Xl))
900
- ]))), 128)),
901
- e.value.style.chart.labels.startLabels.show ? (o(), i("g", zl, [
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 + X.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, Ml))
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 - (X.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 * n.value.rowHeight,
953
- width: n.value.width,
954
- height: 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, Yt)),
963
- l.$slots.watermark ? (o(), i("div", Fl, [
964
- m(l.$slots, "watermark", Q(ee({ isPrinting: c(Xe) || c(ze) })), 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
- je(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: j.value.colNames,
1032
- head: j.value.head,
1033
- body: j.value.body,
1034
- config: j.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
- je(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-e5fefd77"]]);
1056
- export {
1057
- ta as default
1058
- };