vue-data-ui 3.0.0-next.9 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/README.md +32 -30
  2. package/dist/{Arrow-B6OlqyCG.js → Arrow-DQoWnUfD.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-DEw6oieL.js} +4 -4
  4. package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-DEl03NUZ.js} +1 -1
  5. package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-CrivFZqC.js} +2 -2
  6. package/dist/{DataTable--paavNqF.js → DataTable-ClgCsiJA.js} +2 -2
  7. package/dist/{Legend-BZ06qU55.js → Legend-CMvJ6X5j.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-B2Wvbl3p.js} +3 -3
  9. package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CD5VH_Al.js} +3 -3
  10. package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3WRn-G2.js} +32 -32
  11. package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
  12. package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
  13. package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
  14. package/dist/{Shape-Mr1eIp_G.js → Shape-Adi9i_-f.js} +43 -37
  15. package/dist/Slicer-t6e1t2iM.js +602 -0
  16. package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-B8OnBSvk.js} +7 -7
  17. package/dist/{Title-B2dA6-uH.js → Title-xTWR-Vil.js} +1 -1
  18. package/dist/{Tooltip-O_hCvqgF.js → Tooltip-BH3CiANh.js} +23 -19
  19. package/dist/{UserOptions-Bk03FRqW.js → UserOptions-CKKPgDLV.js} +2 -2
  20. package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-C4hj491O.js} +1 -1
  21. package/dist/{img-C_9wps3s.js → img-Vb4QHAHI.js} +1 -1
  22. package/dist/{index-CgShIRes.js → index-Dzc2Gi60.js} +2885 -2010
  23. package/dist/{pdf-CXdbjyRJ.js → pdf-ddpqw-dt.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +753 -65
  26. package/dist/types/vue-data-ui.d.ts +753 -65
  27. package/dist/useAutoSizeLabelsInsideViewbox-CN_Jh8Hr.js +81 -0
  28. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  29. package/dist/useLoading-D7YHNtLX.js +29 -0
  30. package/dist/useNestedProp-CjnS13nF.js +13 -0
  31. package/dist/usePanZoom-BVca3eMk.js +122 -0
  32. package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DBRh8ZvS.js} +2 -2
  33. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  34. package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
  35. package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-B7ztqj9-.js} +105 -100
  36. package/dist/vue-data-ui.js +26 -25
  37. package/dist/vue-ui-3d-bar-DUmYPtHl.js +1323 -0
  38. package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-CPk8wAuj.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-Bv5HmeXj.js +835 -0
  40. package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-KXWlIhtd.js} +12 -12
  41. package/dist/vue-ui-bullet-B4N4mBk9.js +571 -0
  42. package/dist/vue-ui-candlestick-DENvPnUO.js +1000 -0
  43. package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-vC2bHBaY.js} +29 -29
  44. package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-2nS0StrY.js} +664 -536
  45. package/dist/vue-ui-chord-CyfS6vNM.js +1038 -0
  46. package/dist/vue-ui-circle-pack-C4JR-0fx.js +709 -0
  47. package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-BgeSDtQh.js} +2 -2
  48. package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-9DWUBJ-I.js} +64 -64
  49. package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-BQO7IBFA.js} +2 -2
  50. package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-C-ZJXJ74.js} +431 -422
  51. package/dist/vue-ui-donut-evolution-B870IrQA.js +1076 -0
  52. package/dist/vue-ui-dumbbell-Cfs2Uotx.js +1120 -0
  53. package/dist/vue-ui-flow-DnaUVVAD.js +841 -0
  54. package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-B9s-H5ZG.js} +16 -16
  55. package/dist/vue-ui-galaxy-BoJOczdh.js +680 -0
  56. package/dist/vue-ui-gauge-qjm4BqZR.js +791 -0
  57. package/dist/vue-ui-gizmo-fn7ZaMTI.js +210 -0
  58. package/dist/vue-ui-heatmap-CIBDKhh8.js +1078 -0
  59. package/dist/vue-ui-history-plot-bbNxldYG.js +1074 -0
  60. package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-BX-2jhLx.js} +26 -26
  61. package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-Bn1Bb8-J.js} +2 -2
  62. package/dist/vue-ui-molecule-DQ3qFtBq.js +656 -0
  63. package/dist/vue-ui-mood-radar-Cf-ehIo1.js +785 -0
  64. package/dist/vue-ui-nested-donuts-CWg5BEi-.js +1284 -0
  65. package/dist/vue-ui-onion-sHgQTYfa.js +776 -0
  66. package/dist/vue-ui-parallel-coordinate-plot-Ki3ITp_s.js +916 -0
  67. package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-BIVqW7U7.js} +512 -459
  68. package/dist/vue-ui-quick-chart-C_hvHc1b.js +1762 -0
  69. package/dist/vue-ui-radar-RZUPyPwB.js +796 -0
  70. package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-BI8Vk7dO.js} +2 -2
  71. package/dist/vue-ui-relation-circle-TVMUEtxK.js +598 -0
  72. package/dist/vue-ui-ridgeline-DQeXHQG4.js +1157 -0
  73. package/dist/vue-ui-rings-BH81WmMS.js +728 -0
  74. package/dist/vue-ui-scatter-Cy7Tz_An.js +1178 -0
  75. package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-CF50qQxr.js} +13 -13
  76. package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-CrFXEbJs.js} +46 -46
  77. package/dist/vue-ui-spark-trend-DtHArnot.js +315 -0
  78. package/dist/vue-ui-sparkbar-CIOwFFgA.js +351 -0
  79. package/dist/vue-ui-sparkgauge-E0DdGotz.js +232 -0
  80. package/dist/vue-ui-sparkhistogram-Dm7WoyjY.js +380 -0
  81. package/dist/vue-ui-sparkline-DoW6DDKT.js +513 -0
  82. package/dist/vue-ui-sparkstackbar-BJnPUWY4.js +421 -0
  83. package/dist/vue-ui-stackbar-Du42smPs.js +1371 -0
  84. package/dist/vue-ui-strip-plot-DnenGI-d.js +916 -0
  85. package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BQOQVlHr.js} +17 -17
  86. package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-BzK4_gsP.js} +5 -5
  87. package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-B-IwcT8I.js} +19 -16
  88. package/dist/vue-ui-thermometer-06ao_Pj5.js +541 -0
  89. package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-CxQq4roK.js} +5 -5
  90. package/dist/vue-ui-tiremarks-CuTxkByj.js +406 -0
  91. package/dist/vue-ui-treemap-BgHhRpiV.js +1035 -0
  92. package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-CAcsUUCo.js} +104 -102
  93. package/dist/vue-ui-waffle-Ct3Upw3m.js +910 -0
  94. package/dist/vue-ui-wheel-oz06Kt-p.js +379 -0
  95. package/dist/vue-ui-word-cloud-BRy7fg4S.js +765 -0
  96. package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-CTV-YfFN.js} +364 -327
  97. package/dist/vue-ui-xy-DqCy9dpa.js +3808 -0
  98. package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-BZdhKUIp.js} +265 -264
  99. package/package.json +4 -4
  100. package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
  101. package/dist/Slicer-3t0HimeE.js +0 -577
  102. package/dist/useLoading-Bt5Doa8m.js +0 -28
  103. package/dist/useNestedProp-BC4Ciblw.js +0 -13
  104. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  105. package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
  106. package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
  107. package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
  108. package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
  109. package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
  110. package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
  111. package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
  112. package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
  113. package/dist/vue-ui-flow-MvORTthN.js +0 -765
  114. package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
  115. package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
  116. package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
  117. package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
  118. package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
  119. package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
  120. package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
  121. package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
  122. package/dist/vue-ui-onion-DXLokGec.js +0 -701
  123. package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
  124. package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
  125. package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
  126. package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
  127. package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
  128. package/dist/vue-ui-rings-Duay-EmS.js +0 -685
  129. package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
  130. package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
  131. package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
  132. package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
  133. package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
  134. package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
  135. package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
  136. package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
  137. package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
  138. package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
  139. package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
  140. package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
  141. package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
  142. package/dist/vue-ui-wheel-tydUATi8.js +0 -352
  143. package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
  144. package/dist/vue-ui-xy--HToGdle.js +0 -2982
@@ -1,513 +0,0 @@
1
- import { defineAsyncComponent as $, ref as g, computed as f, onMounted as ke, watch as Z, onBeforeUnmount as we, createElementBlock as n, openBlock as r, unref as o, normalizeStyle as T, normalizeClass as ee, createBlock as C, createCommentVNode as i, createElementVNode as _, createSlots as xe, withCtx as b, renderSlot as m, normalizeProps as O, guardReactiveProps as A, createVNode as Ce, Fragment as U, renderList as N, toDisplayString as B } from "vue";
2
- import { u as _e, o as Le, e as te, g as $e, c as Oe, l as Ae, D as Be, d as Pe, i as P, f as S, X as Se, a as Ie } from "./index-CgShIRes.js";
3
- import { u as ae } from "./useNestedProp-BC4Ciblw.js";
4
- import { u as Fe } from "./usePrinter-rIrqBbbm.js";
5
- import { u as He } from "./useUserOptionState-BIvW1Kz7.js";
6
- import { u as Me } from "./useChartAccessibility-9icAAmYg.js";
7
- import Te from "./Legend-BZ06qU55.js";
8
- import Ue from "./Title-B2dA6-uH.js";
9
- import Ne from "./img-C_9wps3s.js";
10
- import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- const ze = ["id"], Ee = {
12
- key: 1,
13
- ref: "noTitle",
14
- class: "vue-data-ui-no-title-space",
15
- style: "height:36px; width: 100%;background:transparent"
16
- }, We = ["xmlns", "viewBox"], Ve = ["width", "height"], De = { key: 1 }, je = ["x", "y", "height", "width", "fill", "stroke"], Ge = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], qe = ["x", "y", "height", "width", "fill", "stroke", "stroke-width"], Xe = ["x", "y", "font-size", "font-weight", "fill"], Ye = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Je = { key: 3 }, Ke = ["x", "y", "fill", "font-size", "font-weight"], Qe = { key: 4 }, Ze = ["x1", "x2", "y1", "y2", "stroke"], et = {
17
- key: 5,
18
- class: "vue-data-ui-watermark"
19
- }, tt = {
20
- class: "vue-ui-bullet-legend-item",
21
- dir: "auto"
22
- }, at = { style: { "margin-right": "2px" } }, lt = {
23
- key: 7,
24
- ref: "source",
25
- dir: "auto"
26
- }, st = {
27
- __name: "vue-ui-bullet",
28
- props: {
29
- config: {
30
- type: Object,
31
- default() {
32
- return {};
33
- }
34
- },
35
- dataset: {
36
- type: Object,
37
- default() {
38
- return {};
39
- }
40
- }
41
- },
42
- setup(le, { expose: se }) {
43
- const re = $(() => import("./PackageVersion-2QvaZf9_.js")), oe = $(() => import("./PenAndPaper-hGgW0EHz.js")), ne = $(() => import("./vue-ui-skeleton-BsBaCvoE.js")), ue = $(() => import("./UserOptions-Bk03FRqW.js")), { vue_ui_bullet: ie } = _e(), u = le, k = g(null), ce = g(null), R = g(0), he = g(null), ve = g(0), y = f({
44
- get: () => u.dataset.hasOwnProperty("value"),
45
- set: (t) => t
46
- }), w = f(() => u.dataset.segments ? Array.isArray(u.dataset.segments) ? u.dataset.segments.length ? !0 : (console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
47
-
48
- segments: [
49
- {
50
- name: string;
51
- from: number;
52
- to: number;
53
- color?: string;
54
- },
55
- {...}
56
- ]
57
- `), y.value = !1, !1) : (console.warn(`VueUiBullet: dataset segments must be an array of objects with this datastructure:
58
-
59
- segments: [
60
- {
61
- name: string;
62
- from: number;
63
- to: number;
64
- color?: string;
65
- },
66
- {...}
67
- ]
68
- `), y.value = !1, !1) : (console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
69
-
70
- segments: [
71
- {
72
- name: string;
73
- from: number;
74
- to: number;
75
- color?: string;
76
- },
77
- {...}
78
- ]
79
- `), y.value = !1, !1));
80
- ke(z);
81
- function z() {
82
- Le(u.dataset) ? te({
83
- componentName: "VueUiBullet",
84
- type: "dataset"
85
- }) : w.value ? u.dataset.segments.forEach((t, s) => {
86
- $e({
87
- datasetObject: t,
88
- requiredAttributes: ["name", "from", "to"]
89
- }).forEach((a) => {
90
- y.value = !1, te({
91
- componentName: "VueUiBullet segment",
92
- type: "datasetSerieAttribute",
93
- property: a,
94
- index: s
95
- });
96
- });
97
- }) : y.value = !1, e.value.style.chart.animation.show && G(u.dataset.value || 0);
98
- }
99
- const I = g(Oe());
100
- function E() {
101
- const t = ae({
102
- userConfig: u.config,
103
- defaultConfig: ie
104
- });
105
- return t.theme ? {
106
- ...ae({
107
- userConfig: Ie.vue_ui_bullet[t.theme] || u.config,
108
- defaultConfig: t
109
- })
110
- } : t;
111
- }
112
- const e = f({
113
- get: () => E(),
114
- set: (t) => t
115
- }), { userOptionsVisible: F, setUserOptionsVisibility: W, keepUserOptionState: V } = He({ config: e.value }), { svgRef: D } = Me({ config: e.value.style.chart.title });
116
- Z(() => u.config, (t) => {
117
- e.value = E(), F.value = !e.value.userOptions.showOnChartHover, z(), R.value += 1;
118
- }, { deep: !0 });
119
- const l = f(() => {
120
- const t = e.value.style.chart.height, s = e.value.style.chart.width, a = e.value.style.chart.padding.left, d = s - e.value.style.chart.padding.right, p = e.value.style.chart.padding.top, c = t - e.value.style.chart.padding.bottom;
121
- return {
122
- height: t,
123
- width: s,
124
- left: a,
125
- right: d,
126
- top: p,
127
- bottom: c,
128
- chartWidth: d - a,
129
- chartHeight: c - p
130
- };
131
- }), de = f(() => {
132
- if (!w.value) return [];
133
- const t = [];
134
- for (let s = 0; s < u.dataset.segments.length; s += 1)
135
- t.push(Ae(e.value.style.chart.segments.baseColor, s / u.dataset.segments.length));
136
- return t;
137
- }), H = f(() => w.value ? {
138
- min: Math.min(...u.dataset.segments.map((t) => t.from)),
139
- max: Math.max(...u.dataset.segments.map((t) => t.to))
140
- } : { min: 0, max: 1 }), h = g(ge());
141
- Z(() => u.dataset, (t) => {
142
- e.value.style.chart.animation.show ? G(t.value || 0) : h.value = t.value || 0;
143
- }, { deep: !0 });
144
- function ge() {
145
- return e.value.style.chart.animation.show ? H.value.min : u.dataset.value || 0;
146
- }
147
- const j = g(null);
148
- function G(t) {
149
- const s = Math.abs(t - h.value) / e.value.style.chart.animation.animationFrames;
150
- function a() {
151
- h.value < t ? h.value = Math.min(h.value + s, t) : h.value > t && (h.value = Math.max(h.value - s, t)), h.value !== t && (j.value = requestAnimationFrame(a));
152
- }
153
- a();
154
- }
155
- we(() => {
156
- cancelAnimationFrame(j.value);
157
- });
158
- const v = f(() => {
159
- if (!w.value)
160
- return [];
161
- const t = Be(H.value.min, H.value.max, e.value.style.chart.segments.ticks.divisions), s = t.min >= 0 ? 0 : Math.abs(t.min), a = {
162
- x: l.value.left + (u.dataset.target + s) / (t.max + s) * l.value.chartWidth - e.value.style.chart.target.width / 2
163
- }, d = {
164
- width: (h.value + s) / (t.max + s) * l.value.chartWidth
165
- }, p = t.ticks.map((c) => ({
166
- value: c,
167
- y: l.value.bottom + e.value.style.chart.segments.dataLabels.fontSize + 3 + e.value.style.chart.segments.dataLabels.offsetY,
168
- x: l.value.left + (c + s) / (t.max + s) * l.value.chartWidth
169
- }));
170
- return {
171
- scale: t,
172
- target: a,
173
- value: d,
174
- ticks: p,
175
- chunks: u.dataset.segments.map((c, be) => ({
176
- ...c,
177
- color: c.color ? Pe(c.color) : de.value[be],
178
- x: l.value.left + l.value.chartWidth * ((c.from + s) / (t.max + s)),
179
- y: l.value.top,
180
- height: l.value.chartHeight,
181
- width: l.value.chartWidth * (Math.abs(c.to - c.from) / (t.max + s))
182
- }))
183
- };
184
- }), q = f(() => !v.value || !v.value.chunks || !v.value.chunks.length ? [] : v.value.chunks.map((t) => {
185
- const s = P(
186
- e.value.style.chart.segments.dataLabels.formatter,
187
- t.from,
188
- S({
189
- p: e.value.style.chart.segments.dataLabels.prefix,
190
- v: t.from,
191
- s: e.value.style.chart.segments.dataLabels.suffix,
192
- r: e.value.style.chart.segments.dataLabels.rounding
193
- })
194
- ), a = P(
195
- e.value.style.chart.segments.dataLabels.formatter,
196
- t.to,
197
- S({
198
- p: e.value.style.chart.segments.dataLabels.prefix,
199
- v: t.to,
200
- s: e.value.style.chart.segments.dataLabels.suffix,
201
- r: e.value.style.chart.segments.dataLabels.rounding
202
- })
203
- );
204
- return {
205
- ...t,
206
- shape: "square",
207
- value: `${s} - ${a}`
208
- };
209
- })), fe = f(() => ({
210
- cy: "bullet-div-legend",
211
- backgroundColor: "transparent",
212
- color: e.value.style.chart.legend.color,
213
- fontSize: e.value.style.chart.legend.fontSize,
214
- paddingBottom: 6,
215
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
216
- })), { isPrinting: X, isImaging: Y, generatePdf: J, generateImage: K } = Fe({
217
- elementId: `bullet_${I.value}`,
218
- fileName: e.value.style.chart.title.text || "vue-ui-bullet",
219
- options: e.value.userOptions.print
220
- }), me = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), x = g(!1);
221
- function Q(t) {
222
- x.value = t, ve.value += 1;
223
- }
224
- function ye() {
225
- return v.value;
226
- }
227
- const L = g(!1);
228
- function M() {
229
- L.value = !L.value;
230
- }
231
- async function pe({ scale: t = 2 } = {}) {
232
- if (!k.value) return;
233
- const { width: s, height: a } = k.value.getBoundingClientRect(), d = s / a, { imageUri: p, base64: c } = await Ne({ domElement: k.value, base64: !0, img: !0, scale: t });
234
- return {
235
- imageUri: p,
236
- base64: c,
237
- title: e.value.style.chart.title.text,
238
- width: s,
239
- height: a,
240
- aspectRatio: d
241
- };
242
- }
243
- return se({
244
- getData: ye,
245
- getImage: pe,
246
- generatePdf: J,
247
- generateImage: K,
248
- toggleAnnotator: M,
249
- toggleFullscreen: Q
250
- }), (t, s) => (r(), n("div", {
251
- ref_key: "bulletChart",
252
- ref: k,
253
- class: ee(`vue-ui-bullet ${x.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
254
- style: T(`font-family:${e.value.style.fontFamily};width:100%;background:${e.value.style.chart.backgroundColor}`),
255
- id: `bullet_${I.value}`,
256
- onMouseenter: s[0] || (s[0] = () => o(W)(!0)),
257
- onMouseleave: s[1] || (s[1] = () => o(W)(!1))
258
- }, [
259
- e.value.userOptions.buttons.annotator ? (r(), C(o(oe), {
260
- key: 0,
261
- svgRef: o(D),
262
- backgroundColor: e.value.style.chart.backgroundColor,
263
- color: e.value.style.chart.color,
264
- active: L.value,
265
- onClose: M
266
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : i("", !0),
267
- me.value ? (r(), n("div", Ee, null, 512)) : i("", !0),
268
- e.value.style.chart.title.text ? (r(), n("div", {
269
- key: 2,
270
- ref_key: "chartTitle",
271
- ref: ce,
272
- style: "width:100%;background:transparent;"
273
- }, [
274
- (r(), C(Ue, {
275
- lineHeight: "1.3rem",
276
- key: `title_${R.value}`,
277
- config: {
278
- title: {
279
- cy: "bullet-div-title",
280
- ...e.value.style.chart.title
281
- },
282
- subtitle: {
283
- cy: "bullet-div-subtitle",
284
- ...e.value.style.chart.title.subtitle
285
- }
286
- }
287
- }, null, 8, ["config"]))
288
- ], 512)) : i("", !0),
289
- e.value.userOptions.show && y.value && (o(V) || o(F)) ? (r(), C(o(ue), {
290
- key: 3,
291
- ref: "details",
292
- backgroundColor: e.value.style.chart.backgroundColor,
293
- color: e.value.style.chart.color,
294
- isPrinting: o(X),
295
- isImaging: o(Y),
296
- uid: I.value,
297
- hasTooltip: !1,
298
- hasPdf: e.value.userOptions.buttons.pdf,
299
- hasImg: e.value.userOptions.buttons.img,
300
- hasXls: !1,
301
- hasTable: !1,
302
- hasLabel: !1,
303
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
304
- isFullscreen: x.value,
305
- chartElement: k.value,
306
- position: e.value.userOptions.position,
307
- titles: { ...e.value.userOptions.buttonTitles },
308
- hasAnnotator: e.value.userOptions.buttons.annotator,
309
- isAnnotation: L.value,
310
- callbacks: e.value.userOptions.callbacks,
311
- printScale: e.value.userOptions.print.scale,
312
- onToggleFullscreen: Q,
313
- onGeneratePdf: o(J),
314
- onGenerateImage: o(K),
315
- onToggleAnnotator: M,
316
- style: T({
317
- visibility: o(V) ? o(F) ? "visible" : "hidden" : "visible"
318
- })
319
- }, xe({ _: 2 }, [
320
- t.$slots.menuIcon ? {
321
- name: "menuIcon",
322
- fn: b(({ isOpen: a, color: d }) => [
323
- m(t.$slots, "menuIcon", O(A({ isOpen: a, color: d })), void 0, !0)
324
- ]),
325
- key: "0"
326
- } : void 0,
327
- t.$slots.optionPdf ? {
328
- name: "optionPdf",
329
- fn: b(() => [
330
- m(t.$slots, "optionPdf", {}, void 0, !0)
331
- ]),
332
- key: "1"
333
- } : void 0,
334
- t.$slots.optionImg ? {
335
- name: "optionImg",
336
- fn: b(() => [
337
- m(t.$slots, "optionImg", {}, void 0, !0)
338
- ]),
339
- key: "2"
340
- } : void 0,
341
- t.$slots.optionFullscreen ? {
342
- name: "optionFullscreen",
343
- fn: b(({ toggleFullscreen: a, isFullscreen: d }) => [
344
- m(t.$slots, "optionFullscreen", O(A({ toggleFullscreen: a, isFullscreen: d })), void 0, !0)
345
- ]),
346
- key: "3"
347
- } : void 0,
348
- t.$slots.optionAnnotator ? {
349
- name: "optionAnnotator",
350
- fn: b(({ toggleAnnotator: a, isAnnotator: d }) => [
351
- m(t.$slots, "optionAnnotator", O(A({ toggleAnnotator: a, isAnnotator: d })), void 0, !0)
352
- ]),
353
- key: "4"
354
- } : void 0
355
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : i("", !0),
356
- y.value ? (r(), n("svg", {
357
- key: 4,
358
- ref_key: "svgRef",
359
- ref: D,
360
- xmlns: o(Se),
361
- class: ee({ "vue-data-ui-fullscreen--on": x.value, "vue-data-ui-fulscreen--off": !x.value, "vue-ui-bullet-svg": !0 }),
362
- viewBox: `0 0 ${l.value.width} ${l.value.height}`,
363
- style: T(`width: 100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
364
- }, [
365
- Ce(o(re)),
366
- t.$slots["chart-background"] ? (r(), n("foreignObject", {
367
- key: 0,
368
- x: 0,
369
- y: 0,
370
- width: l.value.width,
371
- height: l.value.height,
372
- style: {
373
- pointerEvents: "none"
374
- }
375
- }, [
376
- m(t.$slots, "chart-background", {}, void 0, !0)
377
- ], 8, Ve)) : i("", !0),
378
- w.value ? (r(), n("g", De, [
379
- (r(!0), n(U, null, N(v.value.chunks, (a) => (r(), n("rect", {
380
- x: a.x,
381
- y: a.y,
382
- height: a.height,
383
- width: a.width,
384
- fill: a.color,
385
- "stroke-width": 1,
386
- stroke: e.value.style.chart.backgroundColor
387
- }, null, 8, je))), 256)),
388
- e.value.style.chart.target.onTop ? i("", !0) : (r(), n("rect", {
389
- key: 0,
390
- x: v.value.target.x,
391
- y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.target.heightRatio) / 2,
392
- height: l.value.chartHeight * e.value.style.chart.target.heightRatio,
393
- width: e.value.style.chart.target.width,
394
- rx: e.value.style.chart.target.rounded ? e.value.style.chart.target.width / 2 : 0,
395
- fill: e.value.style.chart.target.color,
396
- stroke: e.value.style.chart.target.stroke,
397
- "stroke-width": e.value.style.chart.target.strokeWidth
398
- }, null, 8, Ge)),
399
- _("rect", {
400
- x: l.value.left,
401
- y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.valueBar.heightRatio) / 2,
402
- height: l.value.chartHeight * e.value.style.chart.valueBar.heightRatio,
403
- width: v.value.value.width,
404
- fill: e.value.style.chart.valueBar.color,
405
- stroke: e.value.style.chart.valueBar.stroke,
406
- "stroke-width": e.value.style.chart.valueBar.strokeWidth
407
- }, null, 8, qe),
408
- e.value.style.chart.valueBar.label.show ? (r(), n("text", {
409
- key: 1,
410
- x: l.value.left + v.value.value.width,
411
- y: l.value.top - 6 + e.value.style.chart.valueBar.label.offsetY,
412
- "font-size": e.value.style.chart.valueBar.label.fontSize,
413
- "font-weight": e.value.style.chart.valueBar.label.bold ? "bold" : "normal",
414
- fill: e.value.style.chart.valueBar.label.color,
415
- "text-anchor": "middle"
416
- }, B(o(P)(
417
- e.value.style.chart.segments.dataLabels.formatter,
418
- h.value,
419
- o(S)({
420
- p: e.value.style.chart.segments.dataLabels.prefix,
421
- v: h.value,
422
- s: e.value.style.chart.segments.dataLabels.suffix,
423
- r: e.value.style.chart.segments.dataLabels.rounding
424
- })
425
- )), 9, Xe)) : i("", !0),
426
- e.value.style.chart.target.onTop ? (r(), n("rect", {
427
- key: 2,
428
- x: v.value.target.x,
429
- y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.target.heightRatio) / 2,
430
- height: l.value.chartHeight * e.value.style.chart.target.heightRatio,
431
- width: e.value.style.chart.target.width,
432
- rx: e.value.style.chart.target.rounded ? e.value.style.chart.target.width / 2 : 0,
433
- fill: e.value.style.chart.target.color,
434
- stroke: e.value.style.chart.target.stroke,
435
- "stroke-width": e.value.style.chart.target.strokeWidth
436
- }, null, 8, Ye)) : i("", !0),
437
- e.value.style.chart.segments.dataLabels.show ? (r(), n("g", Je, [
438
- (r(!0), n(U, null, N(v.value.ticks, (a) => (r(), n("text", {
439
- x: a.x,
440
- y: a.y,
441
- "text-anchor": "middle",
442
- fill: e.value.style.chart.segments.dataLabels.color,
443
- "font-size": e.value.style.chart.segments.dataLabels.fontSize + "px",
444
- "font-weight": e.value.style.chart.segments.dataLabels.bold ? "bold" : "normal"
445
- }, B(o(P)(
446
- e.value.style.chart.segments.dataLabels.formatter,
447
- a.value,
448
- o(S)({
449
- p: e.value.style.chart.segments.dataLabels.prefix,
450
- v: a.value,
451
- s: e.value.style.chart.segments.dataLabels.suffix,
452
- r: e.value.style.chart.segments.dataLabels.rounding
453
- })
454
- )), 9, Ke))), 256))
455
- ])) : i("", !0),
456
- e.value.style.chart.segments.dataLabels.show && e.value.style.chart.segments.ticks.show ? (r(), n("g", Qe, [
457
- (r(!0), n(U, null, N(v.value.ticks, (a) => (r(), n("line", {
458
- x1: a.x,
459
- x2: a.x,
460
- y1: l.value.bottom,
461
- y2: l.value.bottom + 3,
462
- stroke: e.value.style.chart.segments.ticks.stroke,
463
- "stroke-width": 1,
464
- "stroke-linecap": "round"
465
- }, null, 8, Ze))), 256))
466
- ])) : i("", !0)
467
- ])) : i("", !0),
468
- m(t.$slots, "svg", { svg: l.value }, void 0, !0)
469
- ], 14, We)) : i("", !0),
470
- t.$slots.watermark ? (r(), n("div", et, [
471
- m(t.$slots, "watermark", O(A({ isPrinting: o(X) || o(Y) })), void 0, !0)
472
- ])) : i("", !0),
473
- y.value ? i("", !0) : (r(), C(o(ne), {
474
- key: 6,
475
- config: {
476
- type: "bullet",
477
- style: {
478
- backgroundColor: e.value.style.chart.backgroundColor,
479
- bullet: {
480
- color: "#CCCCCC"
481
- }
482
- }
483
- }
484
- }, null, 8, ["config"])),
485
- _("div", {
486
- ref_key: "chartLegend",
487
- ref: he
488
- }, [
489
- e.value.style.chart.legend.show ? (r(), C(Te, {
490
- key: 0,
491
- clickable: !1,
492
- legendSet: q.value,
493
- config: fe.value
494
- }, {
495
- item: b(({ legend: a }) => [
496
- _("div", tt, [
497
- _("span", at, B(a.name) + ":", 1),
498
- _("span", null, B(a.value), 1)
499
- ])
500
- ]),
501
- _: 1
502
- }, 8, ["legendSet", "config"])) : i("", !0),
503
- m(t.$slots, "legend", { legend: q.value }, void 0, !0)
504
- ], 512),
505
- t.$slots.source ? (r(), n("div", lt, [
506
- m(t.$slots, "source", {}, void 0, !0)
507
- ], 512)) : i("", !0)
508
- ], 46, ze));
509
- }
510
- }, ft = /* @__PURE__ */ Re(st, [["__scopeId", "data-v-42012d4b"]]);
511
- export {
512
- ft as default
513
- };