vue-data-ui 3.0.0-next.7 → 3.0.0-next.71
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.
- package/dist/{Arrow-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
- package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
- package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
- package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
- package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
- package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
- package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
- package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
- package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
- package/dist/Slicer-DYuvPkEM.js +602 -0
- package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
- package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
- package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
- package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
- package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
- package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
- package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
- package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +610 -22
- package/dist/types/vue-data-ui.d.ts +610 -22
- package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-D-8c0o4p.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
- package/dist/vue-data-ui.js +23 -22
- package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
- package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
- package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
- package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
- package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
- package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
- package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
- package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
- package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
- package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
- package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
- package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
- package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
- package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
- package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
- package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
- package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
- package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
- package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
- package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
- package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
- package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
- package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
- package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
- package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
- package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
- package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
- package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
- package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
- package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
- package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
- package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
- package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
- package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
- package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
- package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
- package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
- package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
- package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
- package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
- package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
- package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
- package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
- package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
- package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
- package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
- package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
- package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
- package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
- package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
- package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
- package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
- package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
- package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
- package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
- package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
- package/dist/vue-ui-wheel-De1spwLh.js +379 -0
- package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
- package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
- package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
- package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
- package/package.json +1 -1
- package/dist/Slicer-BD8Z8VCW.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-C_G5E08Y.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
- package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
- package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
- package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
- package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
- package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
- package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
- package/dist/vue-ui-flow-D_L_xssL.js +0 -765
- package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
- package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
- package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
- package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
- package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
- package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
- package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
- package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
- package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
- package/dist/vue-ui-radar-98mXFZe-.js +0 -741
- package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
- package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
- package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
- package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
- package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
- package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
- package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
- package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
- package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
- package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
- package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
- package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
- package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
- package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
- package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
- package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
- package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
- package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
- package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
|
@@ -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-Cg-RjxqH.js";
|
|
3
|
-
import { u as ae } from "./useNestedProp-C_G5E08Y.js";
|
|
4
|
-
import { u as Fe } from "./usePrinter-BUzmyQf9.js";
|
|
5
|
-
import { u as He } from "./useUserOptionState-BIvW1Kz7.js";
|
|
6
|
-
import { u as Me } from "./useChartAccessibility-9icAAmYg.js";
|
|
7
|
-
import Te from "./Legend-B2hrDh4G.js";
|
|
8
|
-
import Ue from "./Title-B7Xb3YuE.js";
|
|
9
|
-
import Ne from "./img-D72yZNUg.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-CeEYZfaH.js")), oe = $(() => import("./PenAndPaper-DhSxfUrQ.js")), ne = $(() => import("./vue-ui-skeleton-CUOhCY4p.js")), ue = $(() => import("./UserOptions-0tvMM8PF.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
|
-
};
|