vue-data-ui 3.0.0-next.37 → 3.0.0-next.38

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 (90) hide show
  1. package/dist/{Arrow-BwexzLX9.js → Arrow-Cxfs_jDk.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CqOYUWgJ.js → BaseDraggableDialog-D8bUhwCR.js} +2 -2
  3. package/dist/{BaseIcon-bM96sLiE.js → BaseIcon-B5hDik6M.js} +1 -1
  4. package/dist/{ColorPicker-DKeSOZp_.js → ColorPicker-X30bIjOM.js} +2 -2
  5. package/dist/{DataTable-CpC-f3bF.js → DataTable-BrP5zT2y.js} +2 -2
  6. package/dist/{Legend-CqhrdBNU.js → Legend-Bok1w9PE.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-qbMyX2kx.js → NonSvgPenAndPaper-mFU4kkja.js} +3 -3
  8. package/dist/{PackageVersion-C05X5sSL.js → PackageVersion-DoJRJ_yZ.js} +1 -1
  9. package/dist/{PenAndPaper-BX5caC5i.js → PenAndPaper-BKLSbUJJ.js} +3 -3
  10. package/dist/{Shape-DoY1nSuX.js → Shape-Bp0uUbyi.js} +1 -1
  11. package/dist/{Slicer-K-fV6Zyn.js → Slicer-BIL4fQe9.js} +2 -2
  12. package/dist/{SparkTooltip-BigTvWHM.js → SparkTooltip-BrA3pWY1.js} +1 -1
  13. package/dist/{Title-CdBcQLZl.js → Title-C4mHBlGm.js} +1 -1
  14. package/dist/{Tooltip-cQGOp05f.js → Tooltip-CIAaZqi-.js} +1 -1
  15. package/dist/{UserOptions-BLgabL-g.js → UserOptions-CtdmjrzM.js} +2 -2
  16. package/dist/{dom-to-png-ZtEhWueM.js → dom-to-png-D7urYnQL.js} +1 -1
  17. package/dist/{img-Ch-SX__W.js → img-u92jJi7s.js} +1 -1
  18. package/dist/{index-wp5binlq.js → index-Do8Yy3T8.js} +9 -1
  19. package/dist/{pdf-BvVuQkf5.js → pdf-Da78hVzB.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +4 -0
  22. package/dist/types/vue-data-ui.d.ts +4 -0
  23. package/dist/{useNestedProp-DLeFGu88.js → useNestedProp-C7A9vyBD.js} +1 -1
  24. package/dist/{usePrinter-gmsJtZaC.js → usePrinter-BvP9oj3O.js} +2 -2
  25. package/dist/{vue-data-ui-DKdztRxO.js → vue-data-ui-BVss51hf.js} +64 -64
  26. package/dist/vue-data-ui.js +1 -1
  27. package/dist/{vue-ui-3d-bar-BUzO3sJJ.js → vue-ui-3d-bar-CsijfJeX.js} +6 -6
  28. package/dist/{vue-ui-accordion-DR5j0NkU.js → vue-ui-accordion-DqXZmmXi.js} +3 -3
  29. package/dist/{vue-ui-age-pyramid-C5qSTZM-.js → vue-ui-age-pyramid-CLr8-9V2.js} +6 -6
  30. package/dist/{vue-ui-annotator-3QPadpcx.js → vue-ui-annotator-BKH5uBbZ.js} +2 -2
  31. package/dist/vue-ui-bullet-Bv-AKTw8.js +571 -0
  32. package/dist/{vue-ui-candlestick-BS2slL0A.js → vue-ui-candlestick-2MCzyUcz.js} +7 -7
  33. package/dist/{vue-ui-carousel-table-CZ2FKTL_.js → vue-ui-carousel-table-cw5HlSnS.js} +4 -4
  34. package/dist/{vue-ui-chestnut-YDFpeqcB.js → vue-ui-chestnut-BgsrweZJ.js} +5 -5
  35. package/dist/{vue-ui-chord-Uik7yTc-.js → vue-ui-chord-M_mjkpTk.js} +8 -8
  36. package/dist/{vue-ui-circle-pack-tLHQ_HMs.js → vue-ui-circle-pack-Mpyhugsj.js} +6 -6
  37. package/dist/{vue-ui-cursor-DuTjwu1N.js → vue-ui-cursor-DSM1Yx0w.js} +2 -2
  38. package/dist/{vue-ui-dashboard-BImS6A6f.js → vue-ui-dashboard-DRzgS8bH.js} +62 -62
  39. package/dist/{vue-ui-digits-DHyvQFHB.js → vue-ui-digits-Cc0q_XUJ.js} +2 -2
  40. package/dist/{vue-ui-donut-BzABsTv4.js → vue-ui-donut-BcWb6mkK.js} +8 -8
  41. package/dist/{vue-ui-donut-evolution-HYzJM6BY.js → vue-ui-donut-evolution-DwGNKYA1.js} +8 -8
  42. package/dist/{vue-ui-dumbbell-BcOhZ27d.js → vue-ui-dumbbell-ZyS0CtQ-.js} +7 -7
  43. package/dist/{vue-ui-flow-wr8MxKU3.js → vue-ui-flow-DcjaQvd5.js} +7 -7
  44. package/dist/{vue-ui-funnel-Dx3BObkz.js → vue-ui-funnel-DnPwnTbH.js} +6 -6
  45. package/dist/{vue-ui-galaxy-hvFBNCuJ.js → vue-ui-galaxy-BUf27AcC.js} +5 -5
  46. package/dist/{vue-ui-gauge-Bj9BTOK0.js → vue-ui-gauge-y52sZ03m.js} +6 -6
  47. package/dist/{vue-ui-gizmo-DrMgMC65.js → vue-ui-gizmo-CbOvKh62.js} +3 -3
  48. package/dist/{vue-ui-heatmap-svE65xaD.js → vue-ui-heatmap-DFcG0beX.js} +312 -318
  49. package/dist/{vue-ui-history-plot-C2RS1rJk.js → vue-ui-history-plot-CrEafJoS.js} +7 -7
  50. package/dist/{vue-ui-kpi-D5BC1Mr0.js → vue-ui-kpi-B7xxS9iY.js} +3 -3
  51. package/dist/{vue-ui-mini-loader-D62FIGRG.js → vue-ui-mini-loader-BOoPc7za.js} +2 -2
  52. package/dist/{vue-ui-molecule-CJf9kVTU.js → vue-ui-molecule-DjLDHkE4.js} +5 -5
  53. package/dist/{vue-ui-mood-radar-Dgtoq_LP.js → vue-ui-mood-radar-CDpRBAeI.js} +7 -7
  54. package/dist/{vue-ui-nested-donuts-DwkH1lkj.js → vue-ui-nested-donuts-BB07uN8o.js} +9 -9
  55. package/dist/{vue-ui-onion-CJsi74WE.js → vue-ui-onion-QtmsKAXa.js} +7 -7
  56. package/dist/{vue-ui-parallel-coordinate-plot-BmmszbMf.js → vue-ui-parallel-coordinate-plot-C9igDR3-.js} +8 -8
  57. package/dist/{vue-ui-quadrant-DHoY_j3Z.js → vue-ui-quadrant-Bbyn8jqM.js} +8 -8
  58. package/dist/{vue-ui-quick-chart-B-AMJ-H2.js → vue-ui-quick-chart-DpgVYsO_.js} +620 -611
  59. package/dist/{vue-ui-radar-wI51h1dY.js → vue-ui-radar-BQtoJTN1.js} +7 -7
  60. package/dist/{vue-ui-rating-Dx4qaN31.js → vue-ui-rating-CayItUX5.js} +2 -2
  61. package/dist/{vue-ui-relation-circle-DpkTm4GN.js → vue-ui-relation-circle-BQPvHFqF.js} +6 -6
  62. package/dist/{vue-ui-ridgeline-13TEZdZt.js → vue-ui-ridgeline-Djw8uzUc.js} +8 -8
  63. package/dist/{vue-ui-rings-KYYXSL_J.js → vue-ui-rings-DdW9icm5.js} +8 -8
  64. package/dist/{vue-ui-scatter-DThb1IMn.js → vue-ui-scatter-ko0ev9Hy.js} +8 -8
  65. package/dist/{vue-ui-skeleton-D4JJ_IcV.js → vue-ui-skeleton-Btfrm6Mb.js} +3 -3
  66. package/dist/{vue-ui-smiley-BjuXDhY2.js → vue-ui-smiley-CscAe46K.js} +2 -2
  67. package/dist/{vue-ui-spark-trend-slD0lRZ2.js → vue-ui-spark-trend-DPo61M0c.js} +3 -3
  68. package/dist/{vue-ui-sparkbar-CfY4t5Xc.js → vue-ui-sparkbar-C3PmYQCw.js} +3 -3
  69. package/dist/{vue-ui-sparkgauge-BLwYhS2D.js → vue-ui-sparkgauge-BVeKIvzV.js} +3 -3
  70. package/dist/{vue-ui-sparkhistogram-B07RkXJi.js → vue-ui-sparkhistogram-qQFd_Ahm.js} +4 -4
  71. package/dist/{vue-ui-sparkline-Cs4aXowg.js → vue-ui-sparkline-CS9mKrwW.js} +3 -3
  72. package/dist/{vue-ui-sparkstackbar-5LmEwZJ5.js → vue-ui-sparkstackbar-CgQkP8A3.js} +3 -3
  73. package/dist/{vue-ui-stackbar-CH5n0yJL.js → vue-ui-stackbar-emX2SvlM.js} +9 -9
  74. package/dist/{vue-ui-strip-plot-DntZFKql.js → vue-ui-strip-plot-BUBtGmhH.js} +7 -7
  75. package/dist/{vue-ui-table-DHvtU4aX.js → vue-ui-table-DHJ5c0TM.js} +3 -3
  76. package/dist/{vue-ui-table-heatmap-CG7Vj0Km.js → vue-ui-table-heatmap-YXVD2ajW.js} +5 -5
  77. package/dist/{vue-ui-table-sparkline-D4jiuei1.js → vue-ui-table-sparkline-DehiyqPe.js} +4 -4
  78. package/dist/{vue-ui-thermometer-BDV1pxGB.js → vue-ui-thermometer-COQFOTU7.js} +6 -6
  79. package/dist/{vue-ui-timer-TNQa3Eof.js → vue-ui-timer-DG3qPM0B.js} +5 -5
  80. package/dist/{vue-ui-tiremarks-B7Pzjjc6.js → vue-ui-tiremarks-BSUFcLke.js} +6 -6
  81. package/dist/{vue-ui-treemap-TjFlub50.js → vue-ui-treemap-BDLQFlzo.js} +8 -8
  82. package/dist/{vue-ui-vertical-bar-CRrqaana.js → vue-ui-vertical-bar-D37Bl2x2.js} +9 -9
  83. package/dist/{vue-ui-waffle-galoGgFT.js → vue-ui-waffle-CysJSES6.js} +8 -8
  84. package/dist/{vue-ui-wheel-DLfh_d06.js → vue-ui-wheel-Cm5g4KdO.js} +6 -6
  85. package/dist/{vue-ui-word-cloud-D47QRpYd.js → vue-ui-word-cloud-FEIoDTjf.js} +6 -6
  86. package/dist/{vue-ui-world-C3tzPkEp.js → vue-ui-world-CQxuqljX.js} +6 -6
  87. package/dist/{vue-ui-xy-CHjxAv_x.js → vue-ui-xy-TBO42wxL.js} +527 -527
  88. package/dist/{vue-ui-xy-canvas-DVhri5-F.js → vue-ui-xy-canvas-DyPds5xu.js} +8 -8
  89. package/package.json +1 -1
  90. package/dist/vue-ui-bullet-B52QaMvO.js +0 -513
@@ -1,15 +1,15 @@
1
1
  import { defineAsyncComponent as K, ref as d, computed as L, useSlots as Va, onMounted as ua, watch as D, nextTick as sa, shallowRef as ze, onBeforeUnmount as Ga, createElementBlock as se, openBlock as S, unref as p, normalizeClass as Za, normalizeStyle as Q, createCommentVNode as X, createBlock as N, createElementVNode as ne, createSlots as ja, withCtx as x, renderSlot as k, normalizeProps as B, guardReactiveProps as _, createVNode as qa, toDisplayString as na, createTextVNode as Ja } from "vue";
2
- import { u as Ka, c as Qa, t as el, p as V, a as al, C as ge, b as ll, D as $e, i as ee, f as ae, d as ia, a5 as tl, G as ol, ae as rl, o as ul, e as sl, x as va, q as nl, r as il, y as vl, s as ie, l as cl } from "./index-wp5binlq.js";
2
+ import { u as Ka, c as Qa, t as el, p as V, a as al, C as ge, b as ll, D as $e, i as ee, f as ae, d as ia, a5 as tl, G as ol, ae as rl, o as ul, e as sl, x as va, q as nl, r as il, y as vl, s as ie, l as cl } from "./index-Do8Yy3T8.js";
3
3
  import { d as dl, t as hl, u as yl, c as fl, a as ca, l as C, r as Ie, b as R, p as da } from "./useResponsive-DfdjqQps.js";
4
- import { u as ha } from "./useNestedProp-DLeFGu88.js";
5
- import { u as gl } from "./usePrinter-gmsJtZaC.js";
4
+ import { u as ha } from "./useNestedProp-C7A9vyBD.js";
5
+ import { u as gl } from "./usePrinter-BvP9oj3O.js";
6
6
  import { u as pl } from "./useUserOptionState-BIvW1Kz7.js";
7
7
  import { u as ml } from "./useChartAccessibility-9icAAmYg.js";
8
- import bl from "./Legend-CqhrdBNU.js";
9
- import xl from "./Title-CdBcQLZl.js";
10
- import { S as Ll } from "./Slicer-K-fV6Zyn.js";
8
+ import bl from "./Legend-Bok1w9PE.js";
9
+ import xl from "./Title-C4mHBlGm.js";
10
+ import { S as Ll } from "./Slicer-BIL4fQe9.js";
11
11
  import { u as kl } from "./useTimeLabels-DkzmKfZn.js";
12
- import Cl from "./img-Ch-SX__W.js";
12
+ import Cl from "./img-u92jJi7s.js";
13
13
  import { _ as wl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const Sl = ["id"], zl = ["onClick"], $l = {
15
15
  key: 2,
@@ -32,7 +32,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
32
32
  },
33
33
  emits: ["selectLegend"],
34
34
  setup(Me, { expose: ya, emit: fa }) {
35
- const ga = K(() => import("./vue-ui-accordion-DR5j0NkU.js")), pa = K(() => import("./DataTable-CpC-f3bF.js")), ma = K(() => import("./NonSvgPenAndPaper-qbMyX2kx.js")), ba = K(() => import("./vue-ui-skeleton-D4JJ_IcV.js")), xa = K(() => import("./Tooltip-cQGOp05f.js")), La = K(() => import("./UserOptions-BLgabL-g.js")), { vue_ui_xy_canvas: ka } = Ka(), g = Me, pe = d(Qa()), P = d(null), le = d(null), n = d(null), y = d(1), F = d(1), ve = d(!1), c = d(null), ce = d(""), Te = d(null), $ = d([]), G = d(1), H = d(!0), Z = d(!0), me = d(null), Oe = d(0), Re = d(0), de = d(!1), Pe = d(null), Fe = d(null), Ee = d(null), Ae = d(null), be = d(0), xe = d(0), Le = d(0), M = d(null), ke = L(() => !!g.dataset && g.dataset.length), Ca = fa, wa = Va();
35
+ const ga = K(() => import("./vue-ui-accordion-DqXZmmXi.js")), pa = K(() => import("./DataTable-BrP5zT2y.js")), ma = K(() => import("./NonSvgPenAndPaper-mFU4kkja.js")), ba = K(() => import("./vue-ui-skeleton-Btfrm6Mb.js")), xa = K(() => import("./Tooltip-CIAaZqi-.js")), La = K(() => import("./UserOptions-CtdmjrzM.js")), { vue_ui_xy_canvas: ka } = Ka(), g = Me, pe = d(Qa()), P = d(null), le = d(null), n = d(null), y = d(1), F = d(1), ve = d(!1), c = d(null), ce = d(""), Te = d(null), $ = d([]), G = d(1), H = d(!0), Z = d(!0), me = d(null), Oe = d(0), Re = d(0), de = d(!1), Pe = d(null), Fe = d(null), Ee = d(null), Ae = d(null), be = d(0), xe = d(0), Le = d(0), M = d(null), ke = L(() => !!g.dataset && g.dataset.length), Ca = fa, wa = Va();
36
36
  ua(() => {
37
37
  wa["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
38
38
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-data-ui",
3
3
  "private": false,
4
- "version": "3.0.0-next.37",
4
+ "version": "3.0.0-next.38",
5
5
  "type": "module",
6
6
  "description": "A user-empowering data visualization Vue 3 components library for eloquent data storytelling",
7
7
  "keywords": [
@@ -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-wp5binlq.js";
3
- import { u as ae } from "./useNestedProp-DLeFGu88.js";
4
- import { u as Fe } from "./usePrinter-gmsJtZaC.js";
5
- import { u as He } from "./useUserOptionState-BIvW1Kz7.js";
6
- import { u as Me } from "./useChartAccessibility-9icAAmYg.js";
7
- import Te from "./Legend-CqhrdBNU.js";
8
- import Ue from "./Title-CdBcQLZl.js";
9
- import Ne from "./img-Ch-SX__W.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-C05X5sSL.js")), oe = $(() => import("./PenAndPaper-BX5caC5i.js")), ne = $(() => import("./vue-ui-skeleton-D4JJ_IcV.js")), ue = $(() => import("./UserOptions-BLgabL-g.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
- };