vue-data-ui 2.16.6 → 2.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -53
- package/dist/{Arrow-DCqxVwey.js → Arrow-BDCVJzQB.js} +1 -1
- package/dist/{BaseDraggableDialog-6DIKXIBU.js → BaseDraggableDialog-BvuWrldK.js} +2 -2
- package/dist/{BaseIcon-Bn996RXm.js → BaseIcon-D9Tz8ARD.js} +1 -1
- package/dist/{ColorPicker-OFfLkKNb.js → ColorPicker-wGf46G2G.js} +2 -2
- package/dist/{DataTable-CHBLjKtZ.js → DataTable-Dt-TIOyY.js} +2 -2
- package/dist/{Legend-nBXoxXJH.js → Legend-3LNqqLDg.js} +2 -2
- package/dist/{NonSvgPenAndPaper-Cls2idJS.js → NonSvgPenAndPaper-iDdMuUEo.js} +3 -3
- package/dist/{PackageVersion-Bg_9KCU-.js → PackageVersion-C-4Ee8BQ.js} +1 -1
- package/dist/{PenAndPaper-BPTpbnay.js → PenAndPaper-Cde-wJ3N.js} +32 -32
- package/dist/{Shape-Bnf512BA.js → Shape-C75836Jl.js} +1 -1
- package/dist/{Slicer-BrqtJG2E.js → Slicer-CpSu7plp.js} +2 -2
- package/dist/{SparkTooltip-C-rLATAw.js → SparkTooltip-B_GXa2tb.js} +1 -1
- package/dist/{Title-Gi81VwUM.js → Title-DpERl1yr.js} +1 -1
- package/dist/{Tooltip-CJxVw7-T.js → Tooltip-DA0bYKFG.js} +1 -1
- package/dist/{UserOptions-CBEK6_jo.js → UserOptions-DTEJ3UM_.js} +2 -2
- package/dist/{dom-to-png-CRHNL8VU.js → dom-to-png-DWDGYXFL.js} +1 -1
- package/dist/{img-BgOg8opa.js → img-utitT2Gd.js} +1 -1
- package/dist/{index-DvIXJm6t.js → index-CobsZUkv.js} +22 -8
- package/dist/{pdf-DhTxBrbJ.js → pdf-DWZ8IB56.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +999 -160
- package/dist/types/vue-data-ui.d.ts +999 -160
- package/dist/{useNestedProp-DrYHm61t.js → useNestedProp-BwL5wmVa.js} +1 -1
- package/dist/{usePrinter-CWnXbGMb.js → usePrinter-DPh6U_Qk.js} +2 -2
- package/dist/vue-data-ui-D7ZgRDQ_.js +312 -0
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CtlB4p7i.js → vue-ui-3d-bar-ORUAjkg7.js} +246 -231
- package/dist/{vue-ui-accordion-D55kCO5G.js → vue-ui-accordion-UewqY6OI.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DSshyUn-.js → vue-ui-age-pyramid-Yl4aRpNc.js} +225 -210
- package/dist/{vue-ui-annotator-DQSMv_k2.js → vue-ui-annotator-B1gqiBqq.js} +2 -2
- package/dist/{vue-ui-bullet-FeScjj7q.js → vue-ui-bullet-C307lCPt.js} +168 -153
- package/dist/{vue-ui-candlestick-Drupgyoi.js → vue-ui-candlestick-BE6PcEdh.js} +218 -203
- package/dist/{vue-ui-carousel-table-BTZQRZfO.js → vue-ui-carousel-table-Cpvjr677.js} +4 -4
- package/dist/{vue-ui-chestnut-DLWjPwRL.js → vue-ui-chestnut-CUw74AgC.js} +412 -397
- package/dist/{vue-ui-chord-BgLbFBT9.js → vue-ui-chord-CCPGeAiY.js} +202 -187
- package/dist/{vue-ui-circle-pack-VXcRh2gy.js → vue-ui-circle-pack-dfyPiQmy.js} +222 -207
- package/dist/{vue-ui-cursor-DWmfnM25.js → vue-ui-cursor-C2zmfeoD.js} +2 -2
- package/dist/{vue-ui-dashboard-CGIocEHj.js → vue-ui-dashboard-CotAqRbX.js} +62 -62
- package/dist/{vue-ui-digits-BgQch3Fc.js → vue-ui-digits-7qJFCuoI.js} +2 -2
- package/dist/{vue-ui-donut-B59bCV5_.js → vue-ui-donut-D41WeqQU.js} +420 -411
- package/dist/{vue-ui-donut-evolution-CI8qBIQd.js → vue-ui-donut-evolution-Deg0dsYg.js} +352 -340
- package/dist/{vue-ui-dumbbell-CXv7sk88.js → vue-ui-dumbbell-DDwNoTPG.js} +214 -199
- package/dist/{vue-ui-flow-DxF0ELtv.js → vue-ui-flow-6oR7IMyi.js} +215 -200
- package/dist/{vue-ui-funnel-Bco8rqF8.js → vue-ui-funnel-BnXtOJmh.js} +212 -197
- package/dist/{vue-ui-galaxy-CaPJwwOj.js → vue-ui-galaxy-75XC8SpV.js} +213 -201
- package/dist/{vue-ui-gauge-D7arhDmb.js → vue-ui-gauge-w31j915C.js} +218 -203
- package/dist/{vue-ui-gizmo-Dwli-Mip.js → vue-ui-gizmo-bZqk6oZS.js} +3 -3
- package/dist/{vue-ui-heatmap-Cyn-ahGO.js → vue-ui-heatmap-BfU62tMW.js} +242 -223
- package/dist/{vue-ui-history-plot-C2AEToqx.js → vue-ui-history-plot-CFfco-Yj.js} +267 -252
- package/dist/{vue-ui-kpi-DKDibSdl.js → vue-ui-kpi-DaJ1U3wf.js} +3 -3
- package/dist/{vue-ui-mini-loader-B8OVutUx.js → vue-ui-mini-loader-CF_2jAI8.js} +2 -2
- package/dist/{vue-ui-molecule-BVSrqIGw.js → vue-ui-molecule-Tdk3Gd8M.js} +207 -192
- package/dist/{vue-ui-mood-radar-DvlyS3RN.js → vue-ui-mood-radar-Dg5wS7W5.js} +204 -189
- package/dist/{vue-ui-nested-donuts-D9ssSus6.js → vue-ui-nested-donuts-CpRe0sQB.js} +248 -240
- package/dist/{vue-ui-onion-Buu4VX3u.js → vue-ui-onion-B8o4ft2v.js} +184 -169
- package/dist/{vue-ui-parallel-coordinate-plot-DFLUvhxD.js → vue-ui-parallel-coordinate-plot-zW-CNqWC.js} +192 -177
- package/dist/{vue-ui-quadrant-BMC7NBGd.js → vue-ui-quadrant-DiRtZ16w.js} +259 -244
- package/dist/{vue-ui-quick-chart-DB9RKUkb.js → vue-ui-quick-chart-BRlYC_yT.js} +324 -309
- package/dist/{vue-ui-radar-68NMPxxQ.js → vue-ui-radar-DKgX1Ibx.js} +195 -180
- package/dist/{vue-ui-rating-swH9kRr3.js → vue-ui-rating-DlklKr-X.js} +2 -2
- package/dist/{vue-ui-relation-circle-CT-EdSjO.js → vue-ui-relation-circle-MHiAp8dC.js} +186 -171
- package/dist/{vue-ui-ridgeline-DftROPaX.js → vue-ui-ridgeline-DA8verAe.js} +227 -212
- package/dist/{vue-ui-rings-M-9dPI5D.js → vue-ui-rings-Dh6lFqun.js} +214 -202
- package/dist/{vue-ui-scatter-CsGhaFJh.js → vue-ui-scatter-CLC5sTOi.js} +270 -256
- package/dist/{vue-ui-skeleton-BAOt2neL.js → vue-ui-skeleton-8s4xts8z.js} +3 -3
- package/dist/{vue-ui-smiley-7_kIgPg-.js → vue-ui-smiley-utuzw8uI.js} +2 -2
- package/dist/{vue-ui-spark-trend-DHlQQpwz.js → vue-ui-spark-trend-BODEqGRr.js} +3 -3
- package/dist/{vue-ui-sparkbar-BnHhzuKf.js → vue-ui-sparkbar-B8MB-kn9.js} +3 -3
- package/dist/{vue-ui-sparkgauge-WtfkCK8g.js → vue-ui-sparkgauge-CuD7kTS3.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-B2u4XLVd.js → vue-ui-sparkhistogram-BYJszvna.js} +4 -4
- package/dist/{vue-ui-sparkline-DKIyUlSm.js → vue-ui-sparkline-D77GyWzG.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-BLGz2qIb.js → vue-ui-sparkstackbar-DNb1yD64.js} +3 -3
- package/dist/{vue-ui-stackbar-BDpMsTYe.js → vue-ui-stackbar-C6rjCYDD.js} +251 -236
- package/dist/{vue-ui-strip-plot-5qDcYPnR.js → vue-ui-strip-plot-B6cYojHQ.js} +239 -224
- package/dist/{vue-ui-table-Bg5HIQ3O.js → vue-ui-table-IC7SmWVd.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DmjNy1q1.js → vue-ui-table-heatmap-DHFpJMpA.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CnkJkBk5.js → vue-ui-table-sparkline-D7wz-sCj.js} +4 -4
- package/dist/{vue-ui-thermometer-RlD-9mJf.js → vue-ui-thermometer-D-oiVT3n.js} +168 -153
- package/dist/{vue-ui-timer-Bes74INL.js → vue-ui-timer-C9jVyX5l.js} +5 -5
- package/dist/vue-ui-tiremarks-B1bM9Aoo.js +358 -0
- package/dist/{vue-ui-treemap-BG1Omm38.js → vue-ui-treemap-DX48YlU5.js} +374 -362
- package/dist/{vue-ui-vertical-bar-CwqQyZFX.js → vue-ui-vertical-bar-6SjKPQWR.js} +252 -237
- package/dist/{vue-ui-waffle-Ce3T4BPp.js → vue-ui-waffle-CYao9MMw.js} +232 -220
- package/dist/vue-ui-wheel-USuDhMwW.js +352 -0
- package/dist/vue-ui-word-cloud-TOBTs7yF.js +659 -0
- package/dist/{vue-ui-world-B9PxVO4n.js → vue-ui-world-C2qikqBa.js} +237 -222
- package/dist/{vue-ui-xy-DtJ7qJib.js → vue-ui-xy-DxwgKoO-.js} +557 -544
- package/dist/{vue-ui-xy-canvas-S6YpFgzs.js → vue-ui-xy-canvas-N69OpVn8.js} +395 -380
- package/package.json +1 -1
- package/dist/vue-data-ui-B8EWlMIK.js +0 -301
- package/dist/vue-ui-tiremarks-DiLS3akQ.js +0 -343
- package/dist/vue-ui-wheel-6B0WTkf2.js +0 -337
- package/dist/vue-ui-word-cloud-ByYZCOh7.js +0 -644
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as p, A as v, u as w, B as A } from "./index-
|
|
2
|
-
import { d as M } from "./dom-to-png-
|
|
1
|
+
import { z as p, A as v, u as w, B as A } from "./index-CobsZUkv.js";
|
|
2
|
+
import { d as M } from "./dom-to-png-DWDGYXFL.js";
|
|
3
3
|
import { createElementBlock as d, openBlock as n, createElementVNode as r, normalizeStyle as c, toDisplayString as u, createCommentVNode as a, normalizeClass as y, createStaticVNode as F, withDirectives as N, vModelCheckbox as g, vModelText as C, renderSlot as O, Fragment as L, renderList as G } from "vue";
|
|
4
4
|
import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const m = {
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { defineAsyncComponent as
|
|
2
|
-
import { u as _e, o as
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as Fe } from "./usePrinter-
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
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-CobsZUkv.js";
|
|
3
|
+
import { u as ae } from "./useNestedProp-BwL5wmVa.js";
|
|
4
|
+
import { u as Fe } from "./usePrinter-DPh6U_Qk.js";
|
|
5
|
+
import { u as He } from "./useUserOptionState-BIvW1Kz7.js";
|
|
6
|
+
import { u as Me } from "./useChartAccessibility-9icAAmYg.js";
|
|
7
|
+
import Te from "./Legend-3LNqqLDg.js";
|
|
8
|
+
import Ue from "./Title-DpERl1yr.js";
|
|
9
|
+
import Ne from "./img-utitT2Gd.js";
|
|
10
|
+
import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
const ze = ["id"], Ee = {
|
|
11
12
|
key: 1,
|
|
12
13
|
ref: "noTitle",
|
|
13
14
|
class: "vue-data-ui-no-title-space",
|
|
14
15
|
style: "height:36px; width: 100%;background:transparent"
|
|
15
|
-
},
|
|
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 = {
|
|
16
17
|
key: 5,
|
|
17
18
|
class: "vue-data-ui-watermark"
|
|
18
|
-
},
|
|
19
|
+
}, tt = {
|
|
19
20
|
class: "vue-ui-bullet-legend-item",
|
|
20
21
|
dir: "auto"
|
|
21
|
-
},
|
|
22
|
+
}, at = { style: { "margin-right": "2px" } }, lt = {
|
|
22
23
|
key: 7,
|
|
23
24
|
ref: "source",
|
|
24
25
|
dir: "auto"
|
|
25
|
-
},
|
|
26
|
+
}, st = {
|
|
26
27
|
__name: "vue-ui-bullet",
|
|
27
28
|
props: {
|
|
28
29
|
config: {
|
|
@@ -38,11 +39,11 @@ const Ue = ["id"], ze = {
|
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
},
|
|
41
|
-
setup(
|
|
42
|
-
const
|
|
42
|
+
setup(le, { expose: se }) {
|
|
43
|
+
const re = $(() => import("./PackageVersion-C-4Ee8BQ.js")), oe = $(() => import("./PenAndPaper-Cde-wJ3N.js")), ne = $(() => import("./vue-ui-skeleton-8s4xts8z.js")), ue = $(() => import("./UserOptions-DTEJ3UM_.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({
|
|
43
44
|
get: () => u.dataset.hasOwnProperty("value"),
|
|
44
45
|
set: (t) => t
|
|
45
|
-
}),
|
|
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:
|
|
46
47
|
|
|
47
48
|
segments: [
|
|
48
49
|
{
|
|
@@ -76,17 +77,17 @@ segments: [
|
|
|
76
77
|
{...}
|
|
77
78
|
]
|
|
78
79
|
`), y.value = !1, !1));
|
|
79
|
-
|
|
80
|
-
function
|
|
81
|
-
|
|
80
|
+
ke(z);
|
|
81
|
+
function z() {
|
|
82
|
+
Le(u.dataset) ? te({
|
|
82
83
|
componentName: "VueUiBullet",
|
|
83
84
|
type: "dataset"
|
|
84
|
-
}) :
|
|
85
|
-
|
|
85
|
+
}) : w.value ? u.dataset.segments.forEach((t, s) => {
|
|
86
|
+
$e({
|
|
86
87
|
datasetObject: t,
|
|
87
88
|
requiredAttributes: ["name", "from", "to"]
|
|
88
89
|
}).forEach((a) => {
|
|
89
|
-
y.value = !1,
|
|
90
|
+
y.value = !1, te({
|
|
90
91
|
componentName: "VueUiBullet segment",
|
|
91
92
|
type: "datasetSerieAttribute",
|
|
92
93
|
property: a,
|
|
@@ -95,105 +96,105 @@ segments: [
|
|
|
95
96
|
});
|
|
96
97
|
}) : y.value = !1, e.value.style.chart.animation.show && G(u.dataset.value || 0);
|
|
97
98
|
}
|
|
98
|
-
const
|
|
99
|
-
function
|
|
100
|
-
const t =
|
|
99
|
+
const I = g(Oe());
|
|
100
|
+
function E() {
|
|
101
|
+
const t = ae({
|
|
101
102
|
userConfig: u.config,
|
|
102
|
-
defaultConfig:
|
|
103
|
+
defaultConfig: ie
|
|
103
104
|
});
|
|
104
105
|
return t.theme ? {
|
|
105
|
-
...
|
|
106
|
-
userConfig:
|
|
106
|
+
...ae({
|
|
107
|
+
userConfig: Ie.vue_ui_bullet[t.theme] || u.config,
|
|
107
108
|
defaultConfig: t
|
|
108
109
|
})
|
|
109
110
|
} : t;
|
|
110
111
|
}
|
|
111
112
|
const e = f({
|
|
112
|
-
get: () =>
|
|
113
|
+
get: () => E(),
|
|
113
114
|
set: (t) => t
|
|
114
|
-
}), { userOptionsVisible: F, setUserOptionsVisibility:
|
|
115
|
-
|
|
116
|
-
e.value =
|
|
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;
|
|
117
118
|
}, { deep: !0 });
|
|
118
119
|
const l = f(() => {
|
|
119
|
-
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,
|
|
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;
|
|
120
121
|
return {
|
|
121
122
|
height: t,
|
|
122
123
|
width: s,
|
|
123
124
|
left: a,
|
|
124
125
|
right: d,
|
|
125
|
-
top:
|
|
126
|
-
bottom:
|
|
126
|
+
top: p,
|
|
127
|
+
bottom: c,
|
|
127
128
|
chartWidth: d - a,
|
|
128
|
-
chartHeight:
|
|
129
|
+
chartHeight: c - p
|
|
129
130
|
};
|
|
130
|
-
}),
|
|
131
|
-
if (!
|
|
131
|
+
}), de = f(() => {
|
|
132
|
+
if (!w.value) return [];
|
|
132
133
|
const t = [];
|
|
133
134
|
for (let s = 0; s < u.dataset.segments.length; s += 1)
|
|
134
|
-
t.push(
|
|
135
|
+
t.push(Ae(e.value.style.chart.segments.baseColor, s / u.dataset.segments.length));
|
|
135
136
|
return t;
|
|
136
|
-
}),
|
|
137
|
+
}), H = f(() => w.value ? {
|
|
137
138
|
min: Math.min(...u.dataset.segments.map((t) => t.from)),
|
|
138
139
|
max: Math.max(...u.dataset.segments.map((t) => t.to))
|
|
139
|
-
} : { min: 0, max: 1 }),
|
|
140
|
-
|
|
141
|
-
e.value.style.chart.animation.show ? G(t.value || 0) :
|
|
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;
|
|
142
143
|
}, { deep: !0 });
|
|
143
|
-
function
|
|
144
|
-
return e.value.style.chart.animation.show ?
|
|
144
|
+
function ge() {
|
|
145
|
+
return e.value.style.chart.animation.show ? H.value.min : u.dataset.value || 0;
|
|
145
146
|
}
|
|
146
147
|
const j = g(null);
|
|
147
148
|
function G(t) {
|
|
148
|
-
const s = Math.abs(t -
|
|
149
|
+
const s = Math.abs(t - h.value) / e.value.style.chart.animation.animationFrames;
|
|
149
150
|
function a() {
|
|
150
|
-
|
|
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));
|
|
151
152
|
}
|
|
152
153
|
a();
|
|
153
154
|
}
|
|
154
|
-
|
|
155
|
+
we(() => {
|
|
155
156
|
cancelAnimationFrame(j.value);
|
|
156
157
|
});
|
|
157
|
-
const
|
|
158
|
-
if (!
|
|
158
|
+
const v = f(() => {
|
|
159
|
+
if (!w.value)
|
|
159
160
|
return [];
|
|
160
|
-
const t =
|
|
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 = {
|
|
161
162
|
x: l.value.left + (u.dataset.target + s) / (t.max + s) * l.value.chartWidth - e.value.style.chart.target.width / 2
|
|
162
163
|
}, d = {
|
|
163
|
-
width: (
|
|
164
|
-
},
|
|
165
|
-
value:
|
|
164
|
+
width: (h.value + s) / (t.max + s) * l.value.chartWidth
|
|
165
|
+
}, p = t.ticks.map((c) => ({
|
|
166
|
+
value: c,
|
|
166
167
|
y: l.value.bottom + e.value.style.chart.segments.dataLabels.fontSize + 3 + e.value.style.chart.segments.dataLabels.offsetY,
|
|
167
|
-
x: l.value.left + (
|
|
168
|
+
x: l.value.left + (c + s) / (t.max + s) * l.value.chartWidth
|
|
168
169
|
}));
|
|
169
170
|
return {
|
|
170
171
|
scale: t,
|
|
171
172
|
target: a,
|
|
172
173
|
value: d,
|
|
173
|
-
ticks:
|
|
174
|
-
chunks: u.dataset.segments.map((
|
|
175
|
-
...
|
|
176
|
-
color:
|
|
177
|
-
x: l.value.left + l.value.chartWidth * ((
|
|
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)),
|
|
178
179
|
y: l.value.top,
|
|
179
180
|
height: l.value.chartHeight,
|
|
180
|
-
width: l.value.chartWidth * (Math.abs(
|
|
181
|
+
width: l.value.chartWidth * (Math.abs(c.to - c.from) / (t.max + s))
|
|
181
182
|
}))
|
|
182
183
|
};
|
|
183
|
-
}), q = f(() => !
|
|
184
|
-
const s =
|
|
184
|
+
}), q = f(() => !v.value || !v.value.chunks || !v.value.chunks.length ? [] : v.value.chunks.map((t) => {
|
|
185
|
+
const s = P(
|
|
185
186
|
e.value.style.chart.segments.dataLabels.formatter,
|
|
186
187
|
t.from,
|
|
187
|
-
|
|
188
|
+
S({
|
|
188
189
|
p: e.value.style.chart.segments.dataLabels.prefix,
|
|
189
190
|
v: t.from,
|
|
190
191
|
s: e.value.style.chart.segments.dataLabels.suffix,
|
|
191
192
|
r: e.value.style.chart.segments.dataLabels.rounding
|
|
192
193
|
})
|
|
193
|
-
), a =
|
|
194
|
+
), a = P(
|
|
194
195
|
e.value.style.chart.segments.dataLabels.formatter,
|
|
195
196
|
t.to,
|
|
196
|
-
|
|
197
|
+
S({
|
|
197
198
|
p: e.value.style.chart.segments.dataLabels.prefix,
|
|
198
199
|
v: t.to,
|
|
199
200
|
s: e.value.style.chart.segments.dataLabels.suffix,
|
|
@@ -205,7 +206,7 @@ segments: [
|
|
|
205
206
|
shape: "square",
|
|
206
207
|
value: `${s} - ${a}`
|
|
207
208
|
};
|
|
208
|
-
})),
|
|
209
|
+
})), fe = f(() => ({
|
|
209
210
|
cy: "bullet-div-legend",
|
|
210
211
|
backgroundColor: "transparent",
|
|
211
212
|
color: e.value.style.chart.legend.color,
|
|
@@ -213,52 +214,66 @@ segments: [
|
|
|
213
214
|
paddingBottom: 6,
|
|
214
215
|
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
215
216
|
})), { isPrinting: X, isImaging: Y, generatePdf: J, generateImage: K } = Fe({
|
|
216
|
-
elementId: `bullet_${
|
|
217
|
+
elementId: `bullet_${I.value}`,
|
|
217
218
|
fileName: e.value.style.chart.title.text || "vue-ui-bullet",
|
|
218
219
|
options: e.value.userOptions.print
|
|
219
|
-
}),
|
|
220
|
-
function
|
|
221
|
-
|
|
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;
|
|
222
223
|
}
|
|
223
224
|
function ye() {
|
|
224
|
-
return
|
|
225
|
+
return v.value;
|
|
225
226
|
}
|
|
226
|
-
const
|
|
227
|
-
function
|
|
228
|
-
|
|
227
|
+
const L = g(!1);
|
|
228
|
+
function M() {
|
|
229
|
+
L.value = !L.value;
|
|
229
230
|
}
|
|
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({
|
|
231
244
|
getData: ye,
|
|
245
|
+
getImage: pe,
|
|
232
246
|
generatePdf: J,
|
|
233
247
|
generateImage: K,
|
|
234
|
-
toggleAnnotator:
|
|
248
|
+
toggleAnnotator: M,
|
|
249
|
+
toggleFullscreen: Q
|
|
235
250
|
}), (t, s) => (r(), n("div", {
|
|
236
251
|
ref_key: "bulletChart",
|
|
237
|
-
ref:
|
|
238
|
-
class:
|
|
239
|
-
style:
|
|
240
|
-
id: `bullet_${
|
|
241
|
-
onMouseenter: s[0] || (s[0] = () => o(
|
|
242
|
-
onMouseleave: s[1] || (s[1] = () => o(
|
|
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))
|
|
243
258
|
}, [
|
|
244
|
-
e.value.userOptions.buttons.annotator ? (r(),
|
|
259
|
+
e.value.userOptions.buttons.annotator ? (r(), C(o(oe), {
|
|
245
260
|
key: 0,
|
|
246
261
|
svgRef: o(D),
|
|
247
262
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
248
263
|
color: e.value.style.chart.color,
|
|
249
|
-
active:
|
|
250
|
-
onClose:
|
|
264
|
+
active: L.value,
|
|
265
|
+
onClose: M
|
|
251
266
|
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : i("", !0),
|
|
252
|
-
|
|
267
|
+
me.value ? (r(), n("div", Ee, null, 512)) : i("", !0),
|
|
253
268
|
e.value.style.chart.title.text ? (r(), n("div", {
|
|
254
269
|
key: 2,
|
|
255
270
|
ref_key: "chartTitle",
|
|
256
|
-
ref:
|
|
271
|
+
ref: ce,
|
|
257
272
|
style: "width:100%;background:transparent;"
|
|
258
273
|
}, [
|
|
259
|
-
(r(),
|
|
274
|
+
(r(), C(Ue, {
|
|
260
275
|
lineHeight: "1.3rem",
|
|
261
|
-
key: `title_${
|
|
276
|
+
key: `title_${R.value}`,
|
|
262
277
|
config: {
|
|
263
278
|
title: {
|
|
264
279
|
cy: "bullet-div-title",
|
|
@@ -271,14 +286,14 @@ segments: [
|
|
|
271
286
|
}
|
|
272
287
|
}, null, 8, ["config"]))
|
|
273
288
|
], 512)) : i("", !0),
|
|
274
|
-
e.value.userOptions.show && y.value && (o(V) || o(F)) ? (r(),
|
|
289
|
+
e.value.userOptions.show && y.value && (o(V) || o(F)) ? (r(), C(o(ue), {
|
|
275
290
|
key: 3,
|
|
276
291
|
ref: "details",
|
|
277
292
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
278
293
|
color: e.value.style.chart.color,
|
|
279
294
|
isPrinting: o(X),
|
|
280
295
|
isImaging: o(Y),
|
|
281
|
-
uid:
|
|
296
|
+
uid: I.value,
|
|
282
297
|
hasTooltip: !1,
|
|
283
298
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
284
299
|
hasImg: e.value.userOptions.buttons.img,
|
|
@@ -286,54 +301,54 @@ segments: [
|
|
|
286
301
|
hasTable: !1,
|
|
287
302
|
hasLabel: !1,
|
|
288
303
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
289
|
-
isFullscreen:
|
|
290
|
-
chartElement:
|
|
304
|
+
isFullscreen: x.value,
|
|
305
|
+
chartElement: k.value,
|
|
291
306
|
position: e.value.userOptions.position,
|
|
292
307
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
293
308
|
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
294
|
-
isAnnotation:
|
|
309
|
+
isAnnotation: L.value,
|
|
295
310
|
callbacks: e.value.userOptions.callbacks,
|
|
296
311
|
printScale: e.value.userOptions.print.scale,
|
|
297
|
-
onToggleFullscreen:
|
|
312
|
+
onToggleFullscreen: Q,
|
|
298
313
|
onGeneratePdf: o(J),
|
|
299
314
|
onGenerateImage: o(K),
|
|
300
|
-
onToggleAnnotator:
|
|
301
|
-
style:
|
|
315
|
+
onToggleAnnotator: M,
|
|
316
|
+
style: T({
|
|
302
317
|
visibility: o(V) ? o(F) ? "visible" : "hidden" : "visible"
|
|
303
318
|
})
|
|
304
|
-
},
|
|
319
|
+
}, xe({ _: 2 }, [
|
|
305
320
|
t.$slots.menuIcon ? {
|
|
306
321
|
name: "menuIcon",
|
|
307
|
-
fn:
|
|
308
|
-
m(t.$slots, "menuIcon",
|
|
322
|
+
fn: b(({ isOpen: a, color: d }) => [
|
|
323
|
+
m(t.$slots, "menuIcon", O(A({ isOpen: a, color: d })), void 0, !0)
|
|
309
324
|
]),
|
|
310
325
|
key: "0"
|
|
311
326
|
} : void 0,
|
|
312
327
|
t.$slots.optionPdf ? {
|
|
313
328
|
name: "optionPdf",
|
|
314
|
-
fn:
|
|
329
|
+
fn: b(() => [
|
|
315
330
|
m(t.$slots, "optionPdf", {}, void 0, !0)
|
|
316
331
|
]),
|
|
317
332
|
key: "1"
|
|
318
333
|
} : void 0,
|
|
319
334
|
t.$slots.optionImg ? {
|
|
320
335
|
name: "optionImg",
|
|
321
|
-
fn:
|
|
336
|
+
fn: b(() => [
|
|
322
337
|
m(t.$slots, "optionImg", {}, void 0, !0)
|
|
323
338
|
]),
|
|
324
339
|
key: "2"
|
|
325
340
|
} : void 0,
|
|
326
341
|
t.$slots.optionFullscreen ? {
|
|
327
342
|
name: "optionFullscreen",
|
|
328
|
-
fn:
|
|
329
|
-
m(t.$slots, "optionFullscreen",
|
|
343
|
+
fn: b(({ toggleFullscreen: a, isFullscreen: d }) => [
|
|
344
|
+
m(t.$slots, "optionFullscreen", O(A({ toggleFullscreen: a, isFullscreen: d })), void 0, !0)
|
|
330
345
|
]),
|
|
331
346
|
key: "3"
|
|
332
347
|
} : void 0,
|
|
333
348
|
t.$slots.optionAnnotator ? {
|
|
334
349
|
name: "optionAnnotator",
|
|
335
|
-
fn:
|
|
336
|
-
m(t.$slots, "optionAnnotator",
|
|
350
|
+
fn: b(({ toggleAnnotator: a, isAnnotator: d }) => [
|
|
351
|
+
m(t.$slots, "optionAnnotator", O(A({ toggleAnnotator: a, isAnnotator: d })), void 0, !0)
|
|
337
352
|
]),
|
|
338
353
|
key: "4"
|
|
339
354
|
} : void 0
|
|
@@ -342,12 +357,12 @@ segments: [
|
|
|
342
357
|
key: 4,
|
|
343
358
|
ref_key: "svgRef",
|
|
344
359
|
ref: D,
|
|
345
|
-
xmlns: o(
|
|
346
|
-
class:
|
|
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 }),
|
|
347
362
|
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
348
|
-
style:
|
|
363
|
+
style: T(`width: 100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
349
364
|
}, [
|
|
350
|
-
|
|
365
|
+
Ce(o(re)),
|
|
351
366
|
t.$slots["chart-background"] ? (r(), n("foreignObject", {
|
|
352
367
|
key: 0,
|
|
353
368
|
x: 0,
|
|
@@ -359,9 +374,9 @@ segments: [
|
|
|
359
374
|
}
|
|
360
375
|
}, [
|
|
361
376
|
m(t.$slots, "chart-background", {}, void 0, !0)
|
|
362
|
-
], 8,
|
|
363
|
-
|
|
364
|
-
(r(!0), n(
|
|
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", {
|
|
365
380
|
x: a.x,
|
|
366
381
|
y: a.y,
|
|
367
382
|
height: a.height,
|
|
@@ -369,10 +384,10 @@ segments: [
|
|
|
369
384
|
fill: a.color,
|
|
370
385
|
"stroke-width": 1,
|
|
371
386
|
stroke: e.value.style.chart.backgroundColor
|
|
372
|
-
}, null, 8,
|
|
387
|
+
}, null, 8, je))), 256)),
|
|
373
388
|
e.value.style.chart.target.onTop ? i("", !0) : (r(), n("rect", {
|
|
374
389
|
key: 0,
|
|
375
|
-
x:
|
|
390
|
+
x: v.value.target.x,
|
|
376
391
|
y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.target.heightRatio) / 2,
|
|
377
392
|
height: l.value.chartHeight * e.value.style.chart.target.heightRatio,
|
|
378
393
|
width: e.value.style.chart.target.width,
|
|
@@ -380,37 +395,37 @@ segments: [
|
|
|
380
395
|
fill: e.value.style.chart.target.color,
|
|
381
396
|
stroke: e.value.style.chart.target.stroke,
|
|
382
397
|
"stroke-width": e.value.style.chart.target.strokeWidth
|
|
383
|
-
}, null, 8,
|
|
384
|
-
|
|
398
|
+
}, null, 8, Ge)),
|
|
399
|
+
_("rect", {
|
|
385
400
|
x: l.value.left,
|
|
386
401
|
y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.valueBar.heightRatio) / 2,
|
|
387
402
|
height: l.value.chartHeight * e.value.style.chart.valueBar.heightRatio,
|
|
388
|
-
width:
|
|
403
|
+
width: v.value.value.width,
|
|
389
404
|
fill: e.value.style.chart.valueBar.color,
|
|
390
405
|
stroke: e.value.style.chart.valueBar.stroke,
|
|
391
406
|
"stroke-width": e.value.style.chart.valueBar.strokeWidth
|
|
392
|
-
}, null, 8,
|
|
407
|
+
}, null, 8, qe),
|
|
393
408
|
e.value.style.chart.valueBar.label.show ? (r(), n("text", {
|
|
394
409
|
key: 1,
|
|
395
|
-
x: l.value.left +
|
|
410
|
+
x: l.value.left + v.value.value.width,
|
|
396
411
|
y: l.value.top - 6 + e.value.style.chart.valueBar.label.offsetY,
|
|
397
412
|
"font-size": e.value.style.chart.valueBar.label.fontSize,
|
|
398
413
|
"font-weight": e.value.style.chart.valueBar.label.bold ? "bold" : "normal",
|
|
399
414
|
fill: e.value.style.chart.valueBar.label.color,
|
|
400
415
|
"text-anchor": "middle"
|
|
401
|
-
},
|
|
416
|
+
}, B(o(P)(
|
|
402
417
|
e.value.style.chart.segments.dataLabels.formatter,
|
|
403
|
-
|
|
404
|
-
o(
|
|
418
|
+
h.value,
|
|
419
|
+
o(S)({
|
|
405
420
|
p: e.value.style.chart.segments.dataLabels.prefix,
|
|
406
|
-
v:
|
|
421
|
+
v: h.value,
|
|
407
422
|
s: e.value.style.chart.segments.dataLabels.suffix,
|
|
408
423
|
r: e.value.style.chart.segments.dataLabels.rounding
|
|
409
424
|
})
|
|
410
|
-
)), 9,
|
|
425
|
+
)), 9, Xe)) : i("", !0),
|
|
411
426
|
e.value.style.chart.target.onTop ? (r(), n("rect", {
|
|
412
427
|
key: 2,
|
|
413
|
-
x:
|
|
428
|
+
x: v.value.target.x,
|
|
414
429
|
y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.target.heightRatio) / 2,
|
|
415
430
|
height: l.value.chartHeight * e.value.style.chart.target.heightRatio,
|
|
416
431
|
width: e.value.style.chart.target.width,
|
|
@@ -418,28 +433,28 @@ segments: [
|
|
|
418
433
|
fill: e.value.style.chart.target.color,
|
|
419
434
|
stroke: e.value.style.chart.target.stroke,
|
|
420
435
|
"stroke-width": e.value.style.chart.target.strokeWidth
|
|
421
|
-
}, null, 8,
|
|
422
|
-
e.value.style.chart.segments.dataLabels.show ? (r(), n("g",
|
|
423
|
-
(r(!0), n(
|
|
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", {
|
|
424
439
|
x: a.x,
|
|
425
440
|
y: a.y,
|
|
426
441
|
"text-anchor": "middle",
|
|
427
442
|
fill: e.value.style.chart.segments.dataLabels.color,
|
|
428
443
|
"font-size": e.value.style.chart.segments.dataLabels.fontSize + "px",
|
|
429
444
|
"font-weight": e.value.style.chart.segments.dataLabels.bold ? "bold" : "normal"
|
|
430
|
-
},
|
|
445
|
+
}, B(o(P)(
|
|
431
446
|
e.value.style.chart.segments.dataLabels.formatter,
|
|
432
447
|
a.value,
|
|
433
|
-
o(
|
|
448
|
+
o(S)({
|
|
434
449
|
p: e.value.style.chart.segments.dataLabels.prefix,
|
|
435
450
|
v: a.value,
|
|
436
451
|
s: e.value.style.chart.segments.dataLabels.suffix,
|
|
437
452
|
r: e.value.style.chart.segments.dataLabels.rounding
|
|
438
453
|
})
|
|
439
|
-
)), 9,
|
|
454
|
+
)), 9, Ke))), 256))
|
|
440
455
|
])) : i("", !0),
|
|
441
|
-
e.value.style.chart.segments.dataLabels.show && e.value.style.chart.segments.ticks.show ? (r(), n("g",
|
|
442
|
-
(r(!0), n(
|
|
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", {
|
|
443
458
|
x1: a.x,
|
|
444
459
|
x2: a.x,
|
|
445
460
|
y1: l.value.bottom,
|
|
@@ -447,15 +462,15 @@ segments: [
|
|
|
447
462
|
stroke: e.value.style.chart.segments.ticks.stroke,
|
|
448
463
|
"stroke-width": 1,
|
|
449
464
|
"stroke-linecap": "round"
|
|
450
|
-
}, null, 8,
|
|
465
|
+
}, null, 8, Ze))), 256))
|
|
451
466
|
])) : i("", !0)
|
|
452
467
|
])) : i("", !0),
|
|
453
468
|
m(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
454
|
-
], 14,
|
|
455
|
-
t.$slots.watermark ? (r(), n("div",
|
|
456
|
-
m(t.$slots, "watermark",
|
|
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)
|
|
457
472
|
])) : i("", !0),
|
|
458
|
-
y.value ? i("", !0) : (r(),
|
|
473
|
+
y.value ? i("", !0) : (r(), C(o(ne), {
|
|
459
474
|
key: 6,
|
|
460
475
|
config: {
|
|
461
476
|
type: "bullet",
|
|
@@ -467,32 +482,32 @@ segments: [
|
|
|
467
482
|
}
|
|
468
483
|
}
|
|
469
484
|
}, null, 8, ["config"])),
|
|
470
|
-
|
|
485
|
+
_("div", {
|
|
471
486
|
ref_key: "chartLegend",
|
|
472
|
-
ref:
|
|
487
|
+
ref: he
|
|
473
488
|
}, [
|
|
474
|
-
e.value.style.chart.legend.show ? (r(),
|
|
489
|
+
e.value.style.chart.legend.show ? (r(), C(Te, {
|
|
475
490
|
key: 0,
|
|
476
491
|
clickable: !1,
|
|
477
492
|
legendSet: q.value,
|
|
478
|
-
config:
|
|
493
|
+
config: fe.value
|
|
479
494
|
}, {
|
|
480
|
-
item:
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
495
|
+
item: b(({ legend: a }) => [
|
|
496
|
+
_("div", tt, [
|
|
497
|
+
_("span", at, B(a.name) + ":", 1),
|
|
498
|
+
_("span", null, B(a.value), 1)
|
|
484
499
|
])
|
|
485
500
|
]),
|
|
486
501
|
_: 1
|
|
487
502
|
}, 8, ["legendSet", "config"])) : i("", !0),
|
|
488
503
|
m(t.$slots, "legend", { legend: q.value }, void 0, !0)
|
|
489
504
|
], 512),
|
|
490
|
-
t.$slots.source ? (r(), n("div",
|
|
505
|
+
t.$slots.source ? (r(), n("div", lt, [
|
|
491
506
|
m(t.$slots, "source", {}, void 0, !0)
|
|
492
507
|
], 512)) : i("", !0)
|
|
493
|
-
], 46,
|
|
508
|
+
], 46, ze));
|
|
494
509
|
}
|
|
495
|
-
},
|
|
510
|
+
}, ft = /* @__PURE__ */ Re(st, [["__scopeId", "data-v-2049ea54"]]);
|
|
496
511
|
export {
|
|
497
|
-
|
|
512
|
+
ft as default
|
|
498
513
|
};
|