vue-data-ui 3.0.0-next.9 → 3.0.0
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/README.md +32 -30
- package/dist/{Arrow-B6OlqyCG.js → Arrow-r2f8Bpd-.js} +1 -1
- package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
- package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-CXtL10fo.js} +1 -1
- package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-H91bBsqM.js} +2 -2
- package/dist/{DataTable--paavNqF.js → DataTable-BSSXpM7w.js} +2 -2
- package/dist/{Legend-BZ06qU55.js → Legend-BUk0WvWJ.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
- package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CJ6Vd7V5.js} +3 -3
- package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3zudcNI.js} +32 -32
- package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
- package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
- package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
- package/dist/{Shape-Mr1eIp_G.js → Shape-BRzOzubn.js} +43 -37
- package/dist/Slicer-MID8pgT3.js +602 -0
- package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-DATI1fGZ.js} +7 -7
- package/dist/{Title-B2dA6-uH.js → Title-BGu6gEd2.js} +1 -1
- package/dist/{Tooltip-O_hCvqgF.js → Tooltip-Bh2zYSoM.js} +23 -19
- package/dist/{UserOptions-Bk03FRqW.js → UserOptions-Ck8fz9f4.js} +2 -2
- package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-DhIh24Ti.js} +1 -1
- package/dist/{img-C_9wps3s.js → img-DrR839Ot.js} +1 -1
- package/dist/{index-CgShIRes.js → index-BtNwOUja.js} +2885 -2010
- package/dist/{pdf-CXdbjyRJ.js → pdf-DoShrdT5.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +753 -65
- package/dist/types/vue-data-ui.d.ts +753 -65
- package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-f2H3m6Yj.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DUNjpQNe.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
- package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-D7QVxNhO.js} +105 -100
- package/dist/vue-data-ui.js +26 -25
- package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
- package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-BKUrAowe.js} +3 -3
- package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
- package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
- package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
- package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
- package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
- package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
- package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
- package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
- package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
- package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
- package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-zKn3uhGN.js} +2 -2
- package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-BtnIwS_E.js} +431 -422
- package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
- package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
- package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
- package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
- package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
- package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
- package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
- package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
- package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
- package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
- package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
- package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
- package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
- package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
- package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
- package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
- package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
- package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
- package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-Bh35aujf.js} +2 -2
- package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
- package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
- package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
- package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
- package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
- package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
- package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
- package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
- package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
- package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
- package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
- package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
- package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
- package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
- package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BXOLZXuz.js} +17 -17
- package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
- package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
- package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
- package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
- package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
- package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
- package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-C-i2dRnU.js} +104 -102
- package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
- package/dist/vue-ui-wheel-waZf462K.js +379 -0
- package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
- package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-Cx4uuwTY.js} +364 -327
- package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
- package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
- package/package.json +4 -4
- package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
- package/dist/Slicer-3t0HimeE.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-BC4Ciblw.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
- package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
- package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
- package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
- package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
- package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
- package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
- package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
- package/dist/vue-ui-flow-MvORTthN.js +0 -765
- package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
- package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
- package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
- package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
- package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
- package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
- package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
- package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
- package/dist/vue-ui-onion-DXLokGec.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
- package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
- package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
- package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
- package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
- package/dist/vue-ui-rings-Duay-EmS.js +0 -685
- package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
- package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
- package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
- package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
- package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
- package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
- package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
- package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
- package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
- package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
- package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
- package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
- package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
- package/dist/vue-ui-wheel-tydUATi8.js +0 -352
- package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
- 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
|
-
};
|