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
|
@@ -0,0 +1,791 @@
|
|
|
1
|
+
import { defineAsyncComponent as Q, computed as h, ref as f, toRefs as Je, watch as ee, shallowRef as ze, onMounted as Ke, onBeforeUnmount as Qe, createElementBlock as o, openBlock as r, unref as n, normalizeStyle as te, normalizeClass as Fe, createBlock as j, createCommentVNode as c, createElementVNode as p, withCtx as X, toDisplayString as R, createSlots as et, renderSlot as S, normalizeProps as B, guardReactiveProps as U, createVNode as tt, Fragment as k, renderList as x, mergeProps as E, nextTick as at } from "vue";
|
|
2
|
+
import { u as lt, c as st, t as rt, a as ot, p as Ae, b as ut, d as nt, o as Ce, e as it, f as W, g as Oe, m as ae, N as A, O as ct, h as vt, X as ht, s as le, I as dt, r as ft, k as se, i as re, E as oe } from "./index-DKpp7RIH.js";
|
|
3
|
+
import { t as yt, u as mt } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Ne } from "./useNestedProp-D-8c0o4p.js";
|
|
5
|
+
import { u as gt } from "./usePrinter-NUeckmCX.js";
|
|
6
|
+
import { u as pt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
+
import { u as kt } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
+
import bt from "./Title-VLWyIYrj.js";
|
|
9
|
+
import _t from "./img-DD_2wgY3.js";
|
|
10
|
+
import { u as wt, B as St } from "./useLoading-D7YHNtLX.js";
|
|
11
|
+
import { u as xt } from "./useAutoSizeLabelsInsideViewbox-Qhry5WvH.js";
|
|
12
|
+
import { _ as $t } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
const zt = ["id"], Ft = { key: 0 }, At = ["xmlns", "viewBox"], Ct = ["width", "height"], Ot = ["id"], Nt = ["stop-color"], Mt = ["stop-color"], Pt = ["stop-color"], It = ["id"], Xt = ["stdDeviation"], Rt = { key: 1 }, Yt = ["d", "fill", "stroke"], Et = ["d", "fill", "stroke"], Lt = ["d", "fill"], Tt = ["id", "d"], Gt = ["fill", "font-size", "font-weight"], jt = ["href", "startOffset"], Bt = ["text-anchor", "fill", "font-size", "font-weight", "innerHTML"], Ut = ["d", "filter"], Wt = ["stroke", "stroke-width"], Dt = ["stroke", "stroke-width"], Vt = ["stroke", "stroke-width"], Ht = ["stroke", "stroke-width"], qt = { key: 8 }, Zt = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], Jt = ["x", "y", "font-size", "font-weight", "fill"], Kt = { key: 0 }, Qt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], ea = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], ta = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], aa = { key: 1 }, la = ["d", "fill", "stroke", "stroke-width"], sa = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], ra = ["x", "y", "font-size", "fill"], oa = {
|
|
14
|
+
key: 4,
|
|
15
|
+
class: "vue-data-ui-watermark"
|
|
16
|
+
}, ua = {
|
|
17
|
+
__name: "vue-ui-gauge",
|
|
18
|
+
props: {
|
|
19
|
+
config: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default() {
|
|
22
|
+
return {};
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
dataset: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default() {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
setup(D, { expose: Me }) {
|
|
33
|
+
const Pe = Q(() => import("./PenAndPaper-JoUN7Ink.js")), Ie = Q(() => import("./UserOptions-BV_xM-sB.js")), Xe = Q(() => import("./PackageVersion-6s4eI8W7.js")), { vue_ui_gauge: Re } = lt(), m = D, Ye = h(() => !!m.dataset && Object.keys(m.dataset).length > 0 && m.dataset.series && m.dataset.series.length), w = f(st()), Ee = f(null), ue = f(0), C = f(null), ne = f(null), ie = f(null), ce = f(null), ve = f(null), he = f(0), e = f(q()), { loading: de, FINAL_DATASET: $, manualLoading: M } = wt({
|
|
34
|
+
...Je(m),
|
|
35
|
+
FINAL_CONFIG: e,
|
|
36
|
+
prepareConfig: q,
|
|
37
|
+
callback: () => {
|
|
38
|
+
Promise.resolve().then(async () => {
|
|
39
|
+
await at();
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
skeletonDataset: {
|
|
43
|
+
value: 0,
|
|
44
|
+
series: [
|
|
45
|
+
{ from: -1, to: 0, name: "_", color: "#A1A1A1" },
|
|
46
|
+
{ from: 0, to: 1, name: "__", color: "#CACACA" }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
skeletonConfig: rt({
|
|
50
|
+
defaultConfig: e.value,
|
|
51
|
+
userConfig: {
|
|
52
|
+
userOptions: { show: !1 },
|
|
53
|
+
style: {
|
|
54
|
+
chart: {
|
|
55
|
+
backgroundColor: "#99999930",
|
|
56
|
+
animation: { use: !1 },
|
|
57
|
+
layout: {
|
|
58
|
+
markers: { show: !1 },
|
|
59
|
+
segmentSeparators: { stroke: "#6A6A6A" },
|
|
60
|
+
segmentNames: { show: !1 },
|
|
61
|
+
indicatorArc: { fill: "#6A6A6A50" },
|
|
62
|
+
pointer: {
|
|
63
|
+
stroke: "#6A6A6A",
|
|
64
|
+
useRatingColor: !0,
|
|
65
|
+
circle: {
|
|
66
|
+
stroke: "#6A6A6A",
|
|
67
|
+
color: "#6A6A6A"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
legend: {
|
|
72
|
+
show: !1
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
}), { userOptionsVisible: V, setUserOptionsVisibility: fe, keepUserOptionState: ye } = pt({ config: e.value }), { svgRef: H } = kt({ config: e.value.style.chart.title });
|
|
79
|
+
ee(() => m.config, (t) => {
|
|
80
|
+
de.value || (e.value = q()), V.value = !e.value.userOptions.showOnChartHover, J(), he.value += 1;
|
|
81
|
+
}, { deep: !0 }), ee(() => m.dataset, (t) => {
|
|
82
|
+
J(), t && Object.keys(t).length > 0 && (M.value = e.value?.loading ?? !1);
|
|
83
|
+
}, { deep: !0, immediate: !1 });
|
|
84
|
+
function q() {
|
|
85
|
+
const t = Ne({
|
|
86
|
+
userConfig: m.config,
|
|
87
|
+
defaultConfig: Re
|
|
88
|
+
});
|
|
89
|
+
return t.theme ? {
|
|
90
|
+
...Ne({
|
|
91
|
+
userConfig: ut.vue_ui_gauge[t.theme] || m.config,
|
|
92
|
+
defaultConfig: t
|
|
93
|
+
}),
|
|
94
|
+
customPalette: ot[t.theme] || Ae
|
|
95
|
+
} : t;
|
|
96
|
+
}
|
|
97
|
+
const { isPrinting: me, isImaging: ge, generatePdf: pe, generateImage: ke } = gt({
|
|
98
|
+
elementId: `vue-ui-gauge_${w.value}`,
|
|
99
|
+
fileName: e.value.style.chart.title.text || "vue-ui-gauge",
|
|
100
|
+
options: e.value.userOptions.print
|
|
101
|
+
}), Le = h(() => e.value.userOptions.show && !e.value.style.chart.title.text), Te = h(() => nt(e.value.customPalette)), O = h(() => {
|
|
102
|
+
if (Ce($.value.series || {}))
|
|
103
|
+
return {
|
|
104
|
+
value: 0,
|
|
105
|
+
series: [
|
|
106
|
+
{
|
|
107
|
+
from: 0,
|
|
108
|
+
to: 0
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
};
|
|
112
|
+
const t = [];
|
|
113
|
+
($.value.series || []).forEach((a) => {
|
|
114
|
+
t.push(a.from || 1e-7), t.push(a.to || 1e-7);
|
|
115
|
+
});
|
|
116
|
+
const u = Math.max(...t);
|
|
117
|
+
return {
|
|
118
|
+
...$.value,
|
|
119
|
+
series: ($.value.series || []).map((a, s) => ({
|
|
120
|
+
...a,
|
|
121
|
+
color: it(a.color) || Te.value[s] || Ae[s],
|
|
122
|
+
value: ((a.to || 0) - (a.from || 0)) / u * 100
|
|
123
|
+
}))
|
|
124
|
+
};
|
|
125
|
+
}), b = f(512), l = f({
|
|
126
|
+
height: 358.4,
|
|
127
|
+
width: b.value,
|
|
128
|
+
top: 0,
|
|
129
|
+
bottom: 358.4,
|
|
130
|
+
centerX: 179.2,
|
|
131
|
+
centerY: b.value / 2,
|
|
132
|
+
labelFontSize: 18,
|
|
133
|
+
legendFontSize: e.value.style.chart.legend.fontSize,
|
|
134
|
+
pointerRadius: e.value.style.chart.layout.pointer.circle.radius,
|
|
135
|
+
trackSize: e.value.style.chart.layout.track.size,
|
|
136
|
+
pointerSize: e.value.style.chart.layout.pointer.size,
|
|
137
|
+
pointerStrokeWidth: e.value.style.chart.layout.pointer.strokeWidth,
|
|
138
|
+
markerOffset: e.value.style.chart.layout.markers.offsetY + 3,
|
|
139
|
+
segmentFontSize: e.value.style.chart.layout.segmentNames.fontSize
|
|
140
|
+
}), P = f(0), z = f(0), y = f(
|
|
141
|
+
e.value.style.chart.animation.use ? Math.min(...$.value.series.map((t) => t.from)) : $.value.value
|
|
142
|
+
);
|
|
143
|
+
ee(() => $.value.value, () => {
|
|
144
|
+
we($.value.value);
|
|
145
|
+
});
|
|
146
|
+
const i = h(() => {
|
|
147
|
+
const t = l.value.width / 2, u = v.value.base, a = Math.PI * ((y.value + 0 - z.value) / (P.value - z.value)) + Math.PI;
|
|
148
|
+
return {
|
|
149
|
+
x1: t,
|
|
150
|
+
y1: u,
|
|
151
|
+
x2: t + v.value.pointerSize * l.value.pointerSize * 0.9 * Math.cos(a),
|
|
152
|
+
y2: u + v.value.pointerSize * l.value.pointerSize * 0.9 * Math.sin(a)
|
|
153
|
+
};
|
|
154
|
+
}), be = h(() => {
|
|
155
|
+
const t = l.value.width / 2, u = v.value.base, a = Math.PI * ((y.value + 0 - z.value) / (P.value - z.value)) + Math.PI, s = t + v.value.pointerSize * l.value.pointerSize * 0.9 * Math.cos(a), g = u + v.value.pointerSize * l.value.pointerSize * 0.9 * Math.sin(a), _ = l.value.pointerRadius, Ve = t + _ * Math.cos(a + Math.PI / 2), He = u + _ * Math.sin(a + Math.PI / 2), qe = t + _ * Math.cos(a - Math.PI / 2), Ze = u + _ * Math.sin(a - Math.PI / 2);
|
|
156
|
+
return isNaN(s) ? null : `M ${s},${g} ${Ve},${He} ${qe},${Ze} Z`;
|
|
157
|
+
}), Z = h(() => {
|
|
158
|
+
for (let t = 0; t < O.value.series.length; t += 1) {
|
|
159
|
+
const { color: u, from: a, to: s } = O.value.series[t];
|
|
160
|
+
if (y.value >= a && y.value <= s)
|
|
161
|
+
return u;
|
|
162
|
+
}
|
|
163
|
+
return "#2D353C";
|
|
164
|
+
}), F = ze(null), I = ze(null), L = h({
|
|
165
|
+
get: () => l.value.segmentFontSize,
|
|
166
|
+
set: (t) => t
|
|
167
|
+
}), { autoSizeLabels: _e } = xt({
|
|
168
|
+
svgRef: H,
|
|
169
|
+
fontSize: l.value.segmentFontSize,
|
|
170
|
+
minFontSize: e.value.style.chart.layout.segmentNames.minFontSize,
|
|
171
|
+
sizeRef: L,
|
|
172
|
+
labelClass: ".vue-ui-gauge-label-flat"
|
|
173
|
+
}), T = h(() => !!e.value.debug);
|
|
174
|
+
function J() {
|
|
175
|
+
let t = !1;
|
|
176
|
+
if (Ce(m.dataset) ? (W({
|
|
177
|
+
componentName: "VueUiGauge",
|
|
178
|
+
type: "dataset",
|
|
179
|
+
debug: T.value
|
|
180
|
+
}), M.value = !0, t = !0) : (Oe({
|
|
181
|
+
datasetObject: m.dataset,
|
|
182
|
+
requiredAttributes: ["value", "series"]
|
|
183
|
+
}).forEach((u) => {
|
|
184
|
+
W({
|
|
185
|
+
componentName: "VueUiGauge",
|
|
186
|
+
type: "datasetAttribute",
|
|
187
|
+
property: u,
|
|
188
|
+
debug: T.value
|
|
189
|
+
}), M.value = !0, t = !0;
|
|
190
|
+
}), Object.hasOwn(m.dataset, "series") && (m.dataset.series.length ? m.dataset.series.forEach((u, a) => {
|
|
191
|
+
Oe({
|
|
192
|
+
datasetObject: u,
|
|
193
|
+
requiredAttributes: ["from", "to"]
|
|
194
|
+
}).forEach((s) => {
|
|
195
|
+
W({
|
|
196
|
+
componentName: "VueUiGauge",
|
|
197
|
+
type: "datasetSerieAttribute",
|
|
198
|
+
property: s,
|
|
199
|
+
index: a,
|
|
200
|
+
debug: T.value
|
|
201
|
+
}), M.value = !0, t = !0;
|
|
202
|
+
});
|
|
203
|
+
}) : (W({
|
|
204
|
+
componentName: "VueUiGauge",
|
|
205
|
+
type: "datasetAttributeEmpty",
|
|
206
|
+
property: "series",
|
|
207
|
+
debug: T.value
|
|
208
|
+
}), M.value = !0, t = !0))), M.value = t, we($.value.value || 0), e.value.responsive) {
|
|
209
|
+
const u = yt(() => {
|
|
210
|
+
let { width: a, height: s } = mt({
|
|
211
|
+
chart: C.value,
|
|
212
|
+
title: e.value.style.chart.title.text ? ne.value : null,
|
|
213
|
+
legend: ie.value,
|
|
214
|
+
source: ce.value,
|
|
215
|
+
noTitle: ve.value
|
|
216
|
+
});
|
|
217
|
+
s -= 12, requestAnimationFrame(() => {
|
|
218
|
+
l.value.width = a, l.value.height = s, l.value.centerX = a / 2, l.value.centerY = b.value / 2 / 358.4 * s, l.value.bottom = s, l.value.labelFontSize = 18 / b.value * Math.min(s, a) < 10 ? 10 : 18 / b.value * Math.min(s, a), l.value.legendFontSize = e.value.style.chart.legend.fontSize / b.value * Math.min(s, a) < 14 ? 14 : e.value.style.chart.legend.fontSize / b.value * Math.min(s, a), l.value.pointerRadius = e.value.style.chart.layout.pointer.circle.radius / b.value * Math.min(s, a), l.value.trackSize = e.value.style.chart.layout.track.size / b.value * Math.min(s, a), l.value.pointerStrokeWidth = oe({
|
|
219
|
+
relator: Math.min(a, s),
|
|
220
|
+
adjuster: b.value,
|
|
221
|
+
source: e.value.style.chart.layout.pointer.strokeWidth,
|
|
222
|
+
threshold: 2,
|
|
223
|
+
fallback: 2
|
|
224
|
+
}), l.value.markerOffset = oe({
|
|
225
|
+
relator: Math.max(a, s),
|
|
226
|
+
adjuster: b.value,
|
|
227
|
+
source: e.value.style.chart.layout.markers.offsetY + 3,
|
|
228
|
+
threshold: 2,
|
|
229
|
+
fallback: 2
|
|
230
|
+
}), l.value.segmentFontSize = oe({
|
|
231
|
+
relator: Math.min(a, s),
|
|
232
|
+
adjuster: b.value,
|
|
233
|
+
source: e.value.style.chart.layout.segmentNames.fontSize,
|
|
234
|
+
threshold: 8,
|
|
235
|
+
fallback: 8
|
|
236
|
+
});
|
|
237
|
+
}), _e();
|
|
238
|
+
});
|
|
239
|
+
F.value && (I.value && F.value.unobserve(I.value), F.value.disconnect()), F.value = new ResizeObserver(u), I.value = C.value.parentNode, F.value.observe(I.value);
|
|
240
|
+
}
|
|
241
|
+
_e();
|
|
242
|
+
}
|
|
243
|
+
Ke(() => {
|
|
244
|
+
J();
|
|
245
|
+
}), Qe(() => {
|
|
246
|
+
F.value && (I.value && F.value.unobserve(I.value), F.value.disconnect());
|
|
247
|
+
});
|
|
248
|
+
function we(t) {
|
|
249
|
+
const u = [];
|
|
250
|
+
(O.value.series || []).forEach((_) => {
|
|
251
|
+
u.push(_.from || 0), u.push(_.to || 0);
|
|
252
|
+
}), P.value = Math.max(...u), z.value = Math.min(...u);
|
|
253
|
+
let a = e.value.style.chart.animation.speed;
|
|
254
|
+
const s = Math.abs(t - y.value) / (a * 60);
|
|
255
|
+
function g() {
|
|
256
|
+
y.value < t ? y.value = Math.min(y.value + s, t) : y.value > t && (y.value = Math.max(y.value - s, t)), y.value !== t && requestAnimationFrame(g);
|
|
257
|
+
}
|
|
258
|
+
g();
|
|
259
|
+
}
|
|
260
|
+
const v = h(() => {
|
|
261
|
+
const t = e.value.responsive ? Math.min(l.value.width, l.value.height) : l.value.width, u = 2.5 / e.value.style.chart.layout.radiusRatio;
|
|
262
|
+
return {
|
|
263
|
+
arcs: t / u,
|
|
264
|
+
gradients: t / (u * 1.1),
|
|
265
|
+
base: e.value.responsive ? l.value.height / 1.618 : l.value.height * 0.7,
|
|
266
|
+
ratingBase: e.value.responsive ? l.value.height / 2 + l.value.height / 4 : l.value.height * 0.9,
|
|
267
|
+
pointerSize: e.value.responsive ? Math.min(l.value.width, l.value.height) / 3 : l.value.width / 3.2
|
|
268
|
+
};
|
|
269
|
+
}), d = h(() => ae(
|
|
270
|
+
{ series: O.value.series },
|
|
271
|
+
l.value.width / 2,
|
|
272
|
+
v.value.base,
|
|
273
|
+
v.value.arcs,
|
|
274
|
+
v.value.arcs,
|
|
275
|
+
1,
|
|
276
|
+
1,
|
|
277
|
+
1,
|
|
278
|
+
180,
|
|
279
|
+
109.9495,
|
|
280
|
+
40 * l.value.trackSize
|
|
281
|
+
)), Ge = h(() => ae(
|
|
282
|
+
{ series: O.value.series },
|
|
283
|
+
l.value.width / 2,
|
|
284
|
+
v.value.base,
|
|
285
|
+
v.value.arcs * e.value.style.chart.layout.segmentNames.offsetRatio,
|
|
286
|
+
v.value.arcs * e.value.style.chart.layout.segmentNames.offsetRatio,
|
|
287
|
+
1,
|
|
288
|
+
1,
|
|
289
|
+
1,
|
|
290
|
+
180,
|
|
291
|
+
109.9495,
|
|
292
|
+
40 * l.value.trackSize
|
|
293
|
+
)), N = h(() => d.value.map((t) => v.value.arcs * e.value.style.chart.layout.segmentNames.offsetRatio * (t.nameOffsetRatio || 1))), Se = h(() => {
|
|
294
|
+
const { x: t, y: u } = A({
|
|
295
|
+
initX: d.value[0].firstSeparator.x,
|
|
296
|
+
initY: d.value[0].firstSeparator.y,
|
|
297
|
+
centerX: i.value.x1,
|
|
298
|
+
centerY: i.value.y1,
|
|
299
|
+
offset: -e.value.style.chart.layout.segmentSeparators.offsetIn
|
|
300
|
+
}), { x: a, y: s } = A({
|
|
301
|
+
initX: d.value[0].startX,
|
|
302
|
+
initY: d.value[0].startY,
|
|
303
|
+
centerX: i.value.x1,
|
|
304
|
+
centerY: i.value.y1,
|
|
305
|
+
offset: e.value.style.chart.layout.segmentSeparators.offsetOut
|
|
306
|
+
});
|
|
307
|
+
return { x1: t, y1: u, x2: a, y2: s };
|
|
308
|
+
}), xe = h(() => d.value.map((t) => {
|
|
309
|
+
const { x: u, y: a } = A({
|
|
310
|
+
initX: t.separator.x,
|
|
311
|
+
initY: t.separator.y,
|
|
312
|
+
centerX: i.value.x1,
|
|
313
|
+
centerY: i.value.y1,
|
|
314
|
+
offset: -e.value.style.chart.layout.segmentSeparators.offsetIn
|
|
315
|
+
}), { x: s, y: g } = A({
|
|
316
|
+
initX: t.endX,
|
|
317
|
+
initY: t.endY,
|
|
318
|
+
centerX: i.value.x1,
|
|
319
|
+
centerY: i.value.y1,
|
|
320
|
+
offset: e.value.style.chart.layout.segmentSeparators.offsetOut
|
|
321
|
+
});
|
|
322
|
+
return { x1: u, y1: a, x2: s, y2: g };
|
|
323
|
+
}));
|
|
324
|
+
function je(t) {
|
|
325
|
+
if (t.reduce((g, _) => g + _, 0) > 100)
|
|
326
|
+
throw new Error("Total % must not exceed 100");
|
|
327
|
+
const a = 50;
|
|
328
|
+
let s = 0;
|
|
329
|
+
return t.map((g) => (s += g, `${s / 100 * a - g / 4}%`));
|
|
330
|
+
}
|
|
331
|
+
const Be = h(() => je(d.value.map((t) => t.proportion * 100))), Ue = h(() => ae(
|
|
332
|
+
{ series: O.value.series },
|
|
333
|
+
l.value.width / 2,
|
|
334
|
+
v.value.base,
|
|
335
|
+
v.value.gradients,
|
|
336
|
+
v.value.gradients,
|
|
337
|
+
0.95,
|
|
338
|
+
1,
|
|
339
|
+
1,
|
|
340
|
+
180,
|
|
341
|
+
110.02,
|
|
342
|
+
2 * l.value.trackSize
|
|
343
|
+
)), We = h(() => {
|
|
344
|
+
const t = z.value >= 0 ? -z.value : Math.abs(z.value);
|
|
345
|
+
return ct({
|
|
346
|
+
radius: e.value.style.chart.layout.indicatorArc.radius * l.value.trackSize,
|
|
347
|
+
centerX: l.value.width / 2,
|
|
348
|
+
centerY: v.value.base,
|
|
349
|
+
percentage: vt((y.value + t) / (P.value + t))
|
|
350
|
+
});
|
|
351
|
+
}), Y = f(!1);
|
|
352
|
+
function $e(t) {
|
|
353
|
+
Y.value = t, ue.value += 1;
|
|
354
|
+
}
|
|
355
|
+
const G = f(!1);
|
|
356
|
+
function K() {
|
|
357
|
+
G.value = !G.value;
|
|
358
|
+
}
|
|
359
|
+
async function De({ scale: t = 2 } = {}) {
|
|
360
|
+
if (!C.value) return;
|
|
361
|
+
const { width: u, height: a } = C.value.getBoundingClientRect(), s = u / a, { imageUri: g, base64: _ } = await _t({ domElement: C.value, base64: !0, img: !0, scale: t });
|
|
362
|
+
return {
|
|
363
|
+
imageUri: g,
|
|
364
|
+
base64: _,
|
|
365
|
+
title: e.value.style.chart.title.text,
|
|
366
|
+
width: u,
|
|
367
|
+
height: a,
|
|
368
|
+
aspectRatio: s
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
return Me({
|
|
372
|
+
getImage: De,
|
|
373
|
+
generatePdf: pe,
|
|
374
|
+
generateImage: ke,
|
|
375
|
+
toggleAnnotator: K,
|
|
376
|
+
toggleFullscreen: $e
|
|
377
|
+
}), (t, u) => (r(), o("div", {
|
|
378
|
+
class: Fe(`vue-ui-gauge ${Y.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
379
|
+
ref_key: "gaugeChart",
|
|
380
|
+
ref: C,
|
|
381
|
+
id: `vue-ui-gauge_${w.value}`,
|
|
382
|
+
style: te(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
383
|
+
onMouseenter: u[0] || (u[0] = () => n(fe)(!0)),
|
|
384
|
+
onMouseleave: u[1] || (u[1] = () => n(fe)(!1))
|
|
385
|
+
}, [
|
|
386
|
+
e.value.userOptions.buttons.annotator ? (r(), j(n(Pe), {
|
|
387
|
+
key: 0,
|
|
388
|
+
svgRef: n(H),
|
|
389
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
390
|
+
color: e.value.style.chart.color,
|
|
391
|
+
active: G.value,
|
|
392
|
+
onClose: K
|
|
393
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : c("", !0),
|
|
394
|
+
Le.value ? (r(), o("div", {
|
|
395
|
+
key: 1,
|
|
396
|
+
ref_key: "noTitle",
|
|
397
|
+
ref: ve,
|
|
398
|
+
class: "vue-data-ui-no-title-space",
|
|
399
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
400
|
+
}, null, 512)) : c("", !0),
|
|
401
|
+
e.value.style.chart.title.text ? (r(), o("div", {
|
|
402
|
+
key: 2,
|
|
403
|
+
ref_key: "chartTitle",
|
|
404
|
+
ref: ne,
|
|
405
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
406
|
+
}, [
|
|
407
|
+
(r(), j(bt, {
|
|
408
|
+
key: `title_${he.value}`,
|
|
409
|
+
config: {
|
|
410
|
+
title: {
|
|
411
|
+
cy: "gauge-div-title",
|
|
412
|
+
...e.value.style.chart.title
|
|
413
|
+
},
|
|
414
|
+
subtitle: {
|
|
415
|
+
cy: "gauge-div-subtitle",
|
|
416
|
+
...e.value.style.chart.title.subtitle
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}, {
|
|
420
|
+
default: X(() => [
|
|
421
|
+
e.value.translations.base && D.dataset.base ? (r(), o("span", Ft, R(e.value.translations.base) + ": " + R(D.dataset.base), 1)) : c("", !0)
|
|
422
|
+
]),
|
|
423
|
+
_: 1
|
|
424
|
+
}, 8, ["config"]))
|
|
425
|
+
], 512)) : c("", !0),
|
|
426
|
+
e.value.userOptions.show && Ye.value && (n(ye) || n(V)) ? (r(), j(n(Ie), {
|
|
427
|
+
ref_key: "details",
|
|
428
|
+
ref: Ee,
|
|
429
|
+
key: `user_options_${ue.value}`,
|
|
430
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
431
|
+
color: e.value.style.chart.color,
|
|
432
|
+
isImaging: n(ge),
|
|
433
|
+
isPrinting: n(me),
|
|
434
|
+
uid: w.value,
|
|
435
|
+
hasXls: !1,
|
|
436
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
437
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
438
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
439
|
+
isFullscreen: Y.value,
|
|
440
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
441
|
+
chartElement: C.value,
|
|
442
|
+
callbacks: e.value.userOptions.callbacks,
|
|
443
|
+
printScale: e.value.userOptions.print.scale,
|
|
444
|
+
position: e.value.userOptions.position,
|
|
445
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
446
|
+
isAnnotation: G.value,
|
|
447
|
+
onToggleFullscreen: $e,
|
|
448
|
+
onGeneratePdf: n(pe),
|
|
449
|
+
onGenerateImage: n(ke),
|
|
450
|
+
onToggleAnnotator: K,
|
|
451
|
+
style: te({
|
|
452
|
+
visibility: n(ye) ? n(V) ? "visible" : "hidden" : "visible"
|
|
453
|
+
})
|
|
454
|
+
}, et({ _: 2 }, [
|
|
455
|
+
t.$slots.menuIcon ? {
|
|
456
|
+
name: "menuIcon",
|
|
457
|
+
fn: X(({ isOpen: a, color: s }) => [
|
|
458
|
+
S(t.$slots, "menuIcon", B(U({ isOpen: a, color: s })), void 0, !0)
|
|
459
|
+
]),
|
|
460
|
+
key: "0"
|
|
461
|
+
} : void 0,
|
|
462
|
+
t.$slots.optionPdf ? {
|
|
463
|
+
name: "optionPdf",
|
|
464
|
+
fn: X(() => [
|
|
465
|
+
S(t.$slots, "optionPdf", {}, void 0, !0)
|
|
466
|
+
]),
|
|
467
|
+
key: "1"
|
|
468
|
+
} : void 0,
|
|
469
|
+
t.$slots.optionImg ? {
|
|
470
|
+
name: "optionImg",
|
|
471
|
+
fn: X(() => [
|
|
472
|
+
S(t.$slots, "optionImg", {}, void 0, !0)
|
|
473
|
+
]),
|
|
474
|
+
key: "2"
|
|
475
|
+
} : void 0,
|
|
476
|
+
t.$slots.optionFullscreen ? {
|
|
477
|
+
name: "optionFullscreen",
|
|
478
|
+
fn: X(({ toggleFullscreen: a, isFullscreen: s }) => [
|
|
479
|
+
S(t.$slots, "optionFullscreen", B(U({ toggleFullscreen: a, isFullscreen: s })), void 0, !0)
|
|
480
|
+
]),
|
|
481
|
+
key: "3"
|
|
482
|
+
} : void 0,
|
|
483
|
+
t.$slots.optionAnnotator ? {
|
|
484
|
+
name: "optionAnnotator",
|
|
485
|
+
fn: X(({ toggleAnnotator: a, isAnnotator: s }) => [
|
|
486
|
+
S(t.$slots, "optionAnnotator", B(U({ toggleAnnotator: a, isAnnotator: s })), void 0, !0)
|
|
487
|
+
]),
|
|
488
|
+
key: "4"
|
|
489
|
+
} : void 0
|
|
490
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "callbacks", "printScale", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
|
|
491
|
+
(r(), o("svg", {
|
|
492
|
+
ref_key: "svgRef",
|
|
493
|
+
ref: H,
|
|
494
|
+
xmlns: n(ht),
|
|
495
|
+
class: Fe({ "vue-data-ui-fullscreen--on": Y.value, "vue-data-ui-fulscreen--off": !Y.value }),
|
|
496
|
+
viewBox: `0 0 ${l.value.width <= 0 ? 10 : l.value.width} ${l.value.height <= 0 ? 10 : l.value.height}`,
|
|
497
|
+
style: te(`max-width:100%;overflow:hidden !important;background:transparent;color:${e.value.style.chart.color}`)
|
|
498
|
+
}, [
|
|
499
|
+
tt(n(Xe)),
|
|
500
|
+
t.$slots["chart-background"] ? (r(), o("foreignObject", {
|
|
501
|
+
key: 0,
|
|
502
|
+
x: 0,
|
|
503
|
+
y: 0,
|
|
504
|
+
width: l.value.width <= 0 ? 10 : l.value.width,
|
|
505
|
+
height: l.value.height <= 0 ? 10 : l.value.height,
|
|
506
|
+
style: {
|
|
507
|
+
pointerEvents: "none"
|
|
508
|
+
}
|
|
509
|
+
}, [
|
|
510
|
+
S(t.$slots, "chart-background", {}, void 0, !0)
|
|
511
|
+
], 8, Ct)) : c("", !0),
|
|
512
|
+
p("defs", null, [
|
|
513
|
+
p("radialGradient", {
|
|
514
|
+
id: `gradient_${w.value}`,
|
|
515
|
+
cx: "50%",
|
|
516
|
+
cy: "50%",
|
|
517
|
+
r: "50%",
|
|
518
|
+
fx: "50%",
|
|
519
|
+
fy: "50%"
|
|
520
|
+
}, [
|
|
521
|
+
p("stop", {
|
|
522
|
+
offset: "0%",
|
|
523
|
+
"stop-color": n(le)("#FFFFFF", 1)
|
|
524
|
+
}, null, 8, Nt),
|
|
525
|
+
p("stop", {
|
|
526
|
+
offset: "80%",
|
|
527
|
+
"stop-color": n(le)("#FFFFFF", e.value.style.chart.layout.track.gradientIntensity)
|
|
528
|
+
}, null, 8, Mt),
|
|
529
|
+
p("stop", {
|
|
530
|
+
offset: "100%",
|
|
531
|
+
"stop-color": n(le)("#FFFFFF", 1)
|
|
532
|
+
}, null, 8, Pt)
|
|
533
|
+
], 8, Ot)
|
|
534
|
+
]),
|
|
535
|
+
p("defs", null, [
|
|
536
|
+
p("filter", {
|
|
537
|
+
id: `blur_${w.value}`,
|
|
538
|
+
x: "-50%",
|
|
539
|
+
y: "-50%",
|
|
540
|
+
width: "200%",
|
|
541
|
+
height: "200%"
|
|
542
|
+
}, [
|
|
543
|
+
p("feGaussianBlur", {
|
|
544
|
+
in: "SourceGraphic",
|
|
545
|
+
stdDeviation: 100 / e.value.style.chart.layout.track.gradientIntensity
|
|
546
|
+
}, null, 8, Xt)
|
|
547
|
+
], 8, It)
|
|
548
|
+
]),
|
|
549
|
+
t.$slots.pattern ? (r(), o("g", Rt, [
|
|
550
|
+
(r(!0), o(k, null, x(d.value, (a, s) => (r(), o("defs", null, [
|
|
551
|
+
S(t.$slots, "pattern", E({ ref_for: !0 }, { seriesIndex: s, patternId: `pattern_${w.value}_${s}` }), void 0, !0)
|
|
552
|
+
]))), 256))
|
|
553
|
+
])) : c("", !0),
|
|
554
|
+
(r(!0), o(k, null, x(d.value, (a, s) => (r(), o("path", {
|
|
555
|
+
key: `arc_${s}`,
|
|
556
|
+
d: a.arcSlice,
|
|
557
|
+
fill: a.color,
|
|
558
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
559
|
+
"stroke-linecap": "round"
|
|
560
|
+
}, null, 8, Yt))), 128)),
|
|
561
|
+
t.$slots.pattern ? (r(!0), o(k, { key: 2 }, x(d.value, (a, s) => (r(), o("path", {
|
|
562
|
+
key: `arc_${s}`,
|
|
563
|
+
d: a.arcSlice,
|
|
564
|
+
fill: `url(#pattern_${w.value}_${s})`,
|
|
565
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
566
|
+
"stroke-linecap": "round"
|
|
567
|
+
}, null, 8, Et))), 128)) : c("", !0),
|
|
568
|
+
e.value.style.chart.layout.indicatorArc.show ? (r(), o("path", {
|
|
569
|
+
key: 3,
|
|
570
|
+
d: We.value,
|
|
571
|
+
fill: e.value.style.chart.layout.indicatorArc.fill
|
|
572
|
+
}, null, 8, Lt)) : c("", !0),
|
|
573
|
+
e.value.style.chart.layout.segmentNames.show && e.value.style.chart.layout.segmentNames.curved ? (r(), o(k, { key: 4 }, [
|
|
574
|
+
(r(!0), o(k, null, x(d.value, (a, s) => (r(), o("path", {
|
|
575
|
+
id: `curve_${w.value}_${s}`,
|
|
576
|
+
d: `M ${i.value.x1},${i.value.y1} m -${N.value[s]},0 a ${N.value[s]},${N.value[s]} 0 1,1 ${2 * N.value[s]},0 a ${N.value[s]},${N.value[s]} 0 1,1 -${2 * N.value[s]},0`,
|
|
577
|
+
fill: "transparent"
|
|
578
|
+
}, null, 8, Tt))), 256)),
|
|
579
|
+
(r(!0), o(k, null, x(d.value, (a, s) => (r(), o("text", {
|
|
580
|
+
fill: e.value.style.chart.layout.segmentNames.useSerieColor ? a.color : e.value.style.chart.layout.segmentNames.color,
|
|
581
|
+
"font-size": L.value,
|
|
582
|
+
"font-weight": e.value.style.chart.layout.segmentNames.bold ? "bold" : "normal",
|
|
583
|
+
"text-anchor": "middle"
|
|
584
|
+
}, [
|
|
585
|
+
p("textPath", {
|
|
586
|
+
href: `#curve_${w.value}_${s}`,
|
|
587
|
+
startOffset: Be.value[s]
|
|
588
|
+
}, R(a.name || ""), 9, jt)
|
|
589
|
+
], 8, Gt))), 256))
|
|
590
|
+
], 64)) : c("", !0),
|
|
591
|
+
e.value.style.chart.layout.segmentNames.show && !e.value.style.chart.layout.segmentNames.curved ? (r(!0), o(k, { key: 5 }, x(Ge.value, (a, s) => (r(), o("text", {
|
|
592
|
+
class: "vue-ui-gauge-label-flat",
|
|
593
|
+
"text-anchor": n(ft)(a, !1, 12).anchor,
|
|
594
|
+
fill: e.value.style.chart.layout.segmentNames.useSerieColor ? a.color : e.value.style.chart.layout.segmentNames.color,
|
|
595
|
+
"font-size": L.value,
|
|
596
|
+
"font-weight": e.value.style.chart.layout.segmentNames.bold ? "bold" : "normal",
|
|
597
|
+
innerHTML: n(dt)({
|
|
598
|
+
content: String(a.name ?? ""),
|
|
599
|
+
fontSize: L.value,
|
|
600
|
+
fill: e.value.style.chart.layout.segmentNames.useSerieColor ? a.color : e.value.style.chart.layout.segmentNames.color,
|
|
601
|
+
x: a.center.endX,
|
|
602
|
+
y: a.center.endY
|
|
603
|
+
})
|
|
604
|
+
}, null, 8, Bt))), 256)) : c("", !0),
|
|
605
|
+
e.value.style.chart.layout.track.useGradient ? (r(!0), o(k, { key: 6 }, x(Ue.value, (a, s) => (r(), o("path", {
|
|
606
|
+
key: `arc_${s}`,
|
|
607
|
+
d: a.arcSlice,
|
|
608
|
+
fill: "#FFFFFF",
|
|
609
|
+
stroke: "none",
|
|
610
|
+
"stroke-linecap": "round",
|
|
611
|
+
filter: `url(#blur_${w.value})`
|
|
612
|
+
}, null, 8, Ut))), 128)) : c("", !0),
|
|
613
|
+
e.value.style.chart.layout.segmentSeparators.show ? (r(), o(k, { key: 7 }, [
|
|
614
|
+
p("line", E(Se.value, {
|
|
615
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
616
|
+
"stroke-width": e.value.style.chart.layout.segmentSeparators.strokeWidth + 2,
|
|
617
|
+
"stroke-linecap": "round"
|
|
618
|
+
}), null, 16, Wt),
|
|
619
|
+
p("line", E(Se.value, {
|
|
620
|
+
stroke: e.value.style.chart.layout.segmentSeparators.stroke,
|
|
621
|
+
"stroke-width": e.value.style.chart.layout.segmentSeparators.strokeWidth,
|
|
622
|
+
"stroke-linecap": "round"
|
|
623
|
+
}), null, 16, Dt),
|
|
624
|
+
(r(!0), o(k, null, x(xe.value, (a) => (r(), o("line", E({ ref_for: !0 }, a, {
|
|
625
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
626
|
+
"stroke-width": e.value.style.chart.layout.segmentSeparators.strokeWidth + 2,
|
|
627
|
+
"stroke-linecap": "round"
|
|
628
|
+
}), null, 16, Vt))), 256)),
|
|
629
|
+
(r(!0), o(k, null, x(xe.value, (a) => (r(), o("line", E({ ref_for: !0 }, a, {
|
|
630
|
+
stroke: e.value.style.chart.layout.segmentSeparators.stroke,
|
|
631
|
+
"stroke-width": e.value.style.chart.layout.segmentSeparators.strokeWidth,
|
|
632
|
+
"stroke-linecap": "round"
|
|
633
|
+
}), null, 16, Ht))), 256))
|
|
634
|
+
], 64)) : c("", !0),
|
|
635
|
+
e.value.style.chart.layout.markers.show ? (r(), o("g", qt, [
|
|
636
|
+
(r(!0), o(k, null, x(d.value, (a, s) => (r(), o("text", {
|
|
637
|
+
x: n(A)({
|
|
638
|
+
centerX: i.value.x1,
|
|
639
|
+
centerY: v.value.base,
|
|
640
|
+
initX: a.center.startX,
|
|
641
|
+
initY: a.center.startY,
|
|
642
|
+
offset: l.value.markerOffset
|
|
643
|
+
}).x,
|
|
644
|
+
y: n(A)({
|
|
645
|
+
centerX: i.value.x1,
|
|
646
|
+
centerY: v.value.base,
|
|
647
|
+
initX: a.center.startX,
|
|
648
|
+
initY: a.center.startY,
|
|
649
|
+
offset: l.value.markerOffset
|
|
650
|
+
}).y,
|
|
651
|
+
"text-anchor": a.center.startX < i.value.x1 - 5 ? "end" : a.center.startX > i.value.x1 + 5 ? "start" : "middle",
|
|
652
|
+
"font-size": l.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
|
|
653
|
+
"font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
|
|
654
|
+
fill: e.value.style.chart.layout.markers.color
|
|
655
|
+
}, R(n(se)(
|
|
656
|
+
e.value.style.chart.layout.markers.formatter,
|
|
657
|
+
a.from,
|
|
658
|
+
n(re)({
|
|
659
|
+
p: e.value.style.chart.layout.markers.prefix,
|
|
660
|
+
v: a.from,
|
|
661
|
+
s: e.value.style.chart.layout.markers.suffix,
|
|
662
|
+
r: e.value.style.chart.layout.markers.roundingValue
|
|
663
|
+
})
|
|
664
|
+
)), 9, Zt))), 256))
|
|
665
|
+
])) : c("", !0),
|
|
666
|
+
e.value.style.chart.layout.markers.show ? (r(), o("text", {
|
|
667
|
+
key: 9,
|
|
668
|
+
x: n(A)({
|
|
669
|
+
centerX: l.value.width / 2,
|
|
670
|
+
centerY: v.value.base,
|
|
671
|
+
initX: d.value.at(-1).endX,
|
|
672
|
+
initY: d.value.at(-1).endY,
|
|
673
|
+
offset: l.value.markerOffset
|
|
674
|
+
}).x,
|
|
675
|
+
y: n(A)({
|
|
676
|
+
centerX: l.value.width / 2,
|
|
677
|
+
centerY: v.value.base,
|
|
678
|
+
initX: d.value.at(-1).endX,
|
|
679
|
+
initY: d.value.at(-1).endY,
|
|
680
|
+
offset: l.value.markerOffset
|
|
681
|
+
}).y,
|
|
682
|
+
"text-anchor": "start",
|
|
683
|
+
"font-size": l.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
|
|
684
|
+
"font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
|
|
685
|
+
fill: e.value.style.chart.layout.markers.color
|
|
686
|
+
}, R(n(se)(
|
|
687
|
+
e.value.style.chart.layout.markers.formatter,
|
|
688
|
+
P.value,
|
|
689
|
+
n(re)({
|
|
690
|
+
p: e.value.style.chart.layout.markers.prefix,
|
|
691
|
+
v: P.value,
|
|
692
|
+
s: e.value.style.chart.layout.markers.suffix,
|
|
693
|
+
r: e.value.style.chart.layout.markers.roundingValue
|
|
694
|
+
})
|
|
695
|
+
)), 9, Jt)) : c("", !0),
|
|
696
|
+
e.value.style.chart.layout.pointer.show ? (r(), o(k, { key: 10 }, [
|
|
697
|
+
e.value.style.chart.layout.pointer.type === "rounded" ? (r(), o("g", Kt, [
|
|
698
|
+
isNaN(i.value.x2) ? c("", !0) : (r(), o("line", {
|
|
699
|
+
key: 0,
|
|
700
|
+
x1: i.value.x1,
|
|
701
|
+
y1: i.value.y1,
|
|
702
|
+
x2: i.value.x2,
|
|
703
|
+
y2: i.value.y2,
|
|
704
|
+
stroke: e.value.style.chart.layout.pointer.stroke,
|
|
705
|
+
"stroke-width": l.value.pointerStrokeWidth,
|
|
706
|
+
"stroke-linecap": "round"
|
|
707
|
+
}, null, 8, Qt)),
|
|
708
|
+
isNaN(i.value.x2) ? c("", !0) : (r(), o("line", {
|
|
709
|
+
key: 1,
|
|
710
|
+
x1: i.value.x1,
|
|
711
|
+
y1: i.value.y1,
|
|
712
|
+
x2: i.value.x2,
|
|
713
|
+
y2: i.value.y2,
|
|
714
|
+
stroke: e.value.style.chart.layout.pointer.useRatingColor ? Z.value : e.value.style.chart.layout.pointer.color,
|
|
715
|
+
"stroke-linecap": "round",
|
|
716
|
+
"stroke-width": l.value.pointerStrokeWidth * 0.7
|
|
717
|
+
}, null, 8, ea)),
|
|
718
|
+
!isNaN(i.value.x2) && e.value.style.chart.layout.track.useGradient ? (r(), o("line", {
|
|
719
|
+
key: 2,
|
|
720
|
+
x1: i.value.x1,
|
|
721
|
+
y1: i.value.y1,
|
|
722
|
+
x2: i.value.x2,
|
|
723
|
+
y2: i.value.y2,
|
|
724
|
+
stroke: "white",
|
|
725
|
+
"stroke-linecap": "round",
|
|
726
|
+
"stroke-width": l.value.pointerStrokeWidth * 0.3,
|
|
727
|
+
filter: `url(#blur_${w.value})`
|
|
728
|
+
}, null, 8, ta)) : c("", !0)
|
|
729
|
+
])) : (r(), o("g", aa, [
|
|
730
|
+
be.value ? (r(), o("path", {
|
|
731
|
+
key: 0,
|
|
732
|
+
d: be.value,
|
|
733
|
+
fill: e.value.style.chart.layout.pointer.useRatingColor ? Z.value : e.value.style.chart.layout.pointer.color,
|
|
734
|
+
stroke: e.value.style.chart.layout.pointer.stroke,
|
|
735
|
+
"stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
|
|
736
|
+
"stroke-linejoin": "round"
|
|
737
|
+
}, null, 8, la)) : c("", !0)
|
|
738
|
+
])),
|
|
739
|
+
p("circle", {
|
|
740
|
+
cx: l.value.width / 2,
|
|
741
|
+
cy: v.value.base,
|
|
742
|
+
fill: e.value.style.chart.layout.pointer.circle.color,
|
|
743
|
+
r: l.value.pointerRadius <= 0 ? 1e-4 : l.value.pointerRadius,
|
|
744
|
+
"stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
|
|
745
|
+
stroke: e.value.style.chart.layout.pointer.circle.stroke
|
|
746
|
+
}, null, 8, sa)
|
|
747
|
+
], 64)) : c("", !0),
|
|
748
|
+
e.value.style.chart.legend.show ? (r(), o("text", {
|
|
749
|
+
key: 11,
|
|
750
|
+
x: l.value.width / 2,
|
|
751
|
+
y: v.value.ratingBase,
|
|
752
|
+
"text-anchor": "middle",
|
|
753
|
+
"font-size": l.value.legendFontSize,
|
|
754
|
+
"font-weight": "bold",
|
|
755
|
+
fill: e.value.style.chart.legend.useRatingColor ? Z.value : e.value.style.chart.legend.color
|
|
756
|
+
}, R(n(se)(
|
|
757
|
+
e.value.style.chart.legend.formatter,
|
|
758
|
+
y.value,
|
|
759
|
+
n(re)({
|
|
760
|
+
p: e.value.style.chart.legend.prefix + (e.value.style.chart.legend.showPlusSymbol && y.value > 0 ? "+" : ""),
|
|
761
|
+
v: y.value,
|
|
762
|
+
s: e.value.style.chart.legend.suffix,
|
|
763
|
+
r: e.value.style.chart.legend.roundingValue
|
|
764
|
+
})
|
|
765
|
+
)), 9, ra)) : c("", !0),
|
|
766
|
+
S(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
767
|
+
], 14, At)),
|
|
768
|
+
t.$slots.watermark ? (r(), o("div", oa, [
|
|
769
|
+
S(t.$slots, "watermark", B(U({ isPrinting: n(me) || n(ge) })), void 0, !0)
|
|
770
|
+
])) : c("", !0),
|
|
771
|
+
p("div", {
|
|
772
|
+
ref_key: "chartLegend",
|
|
773
|
+
ref: ie
|
|
774
|
+
}, [
|
|
775
|
+
S(t.$slots, "legend", { legend: O.value }, void 0, !0)
|
|
776
|
+
], 512),
|
|
777
|
+
t.$slots.source ? (r(), o("div", {
|
|
778
|
+
key: 5,
|
|
779
|
+
ref_key: "source",
|
|
780
|
+
ref: ce,
|
|
781
|
+
dir: "auto"
|
|
782
|
+
}, [
|
|
783
|
+
S(t.$slots, "source", {}, void 0, !0)
|
|
784
|
+
], 512)) : c("", !0),
|
|
785
|
+
n(de) ? (r(), j(St, { key: 6 })) : c("", !0)
|
|
786
|
+
], 46, zt));
|
|
787
|
+
}
|
|
788
|
+
}, ba = /* @__PURE__ */ $t(ua, [["__scopeId", "data-v-a47ee74f"]]);
|
|
789
|
+
export {
|
|
790
|
+
ba as default
|
|
791
|
+
};
|