vue-data-ui 2.3.2 → 2.3.4
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-B6gJebT9.js +101 -0
- package/dist/Arrow-C5yj6zwY.cjs +1 -0
- package/dist/BaseIcon-7_g11dRj.js +174 -0
- package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
- package/dist/DataTable-CwaOlAsy.js +127 -0
- package/dist/DataTable-Rm9II-m2.cjs +1 -0
- package/dist/Legend-CxvJTjEm.js +62 -0
- package/dist/Legend-D59FIuMs.cjs +1 -0
- package/dist/Shape-CVItL3vh.cjs +1 -0
- package/dist/Shape-CjLV0scA.js +107 -0
- package/dist/Slicer-Bxg5niHl.js +156 -0
- package/dist/Slicer-Cdss5Rus.cjs +1 -0
- package/dist/Title-2iks1ziC.js +46 -0
- package/dist/Title-Bb-A5OSV.cjs +1 -0
- package/dist/Tooltip-C3phqKuU.js +94 -0
- package/dist/Tooltip-C_UE6y-E.cjs +1 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
- package/dist/index-p5gfZSvB.cjs +4 -0
- package/dist/index-uOtklCCx.js +10268 -0
- package/dist/{index.es-BoVO5twe.js → index.es-YufTdp0y.js} +1 -1
- package/dist/{index.es-w_iDpZ-o.cjs → index.es-uyeSCnWE.cjs} +1 -1
- package/dist/jspdf.es.min-C660YX78.js +8038 -0
- package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
- package/dist/pdf-97UbtKC2.js +44 -0
- package/dist/pdf-Cz3729tZ.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/useNestedProp-2kIU-7On.cjs +1 -0
- package/dist/useNestedProp-BgWkUab_.js +13 -0
- package/dist/usePrinter-B6xQCyL-.js +464 -0
- package/dist/usePrinter-fZlsJid8.cjs +1 -0
- package/dist/useResponsive-B3TrDDIG.cjs +1 -0
- package/dist/useResponsive-NZB-WLRF.js +187 -0
- package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
- package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +62 -61
- package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
- package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
- package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
- package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
- package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
- package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
- package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
- package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
- package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
- package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
- package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
- package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
- package/dist/vue-ui-cursor-C96IChA3.js +229 -0
- package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
- package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
- package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
- package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
- package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
- package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
- package/dist/vue-ui-donut-B9iXisHK.js +743 -0
- package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
- package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
- package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
- package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
- package/dist/vue-ui-flow-BTivYoGd.js +454 -0
- package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
- package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
- package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
- package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
- package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
- package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
- package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
- package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
- package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
- package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
- package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
- package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
- package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
- package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
- package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
- package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
- package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
- package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
- package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
- package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
- package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
- package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
- package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
- package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
- package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
- package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
- package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
- package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
- package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
- package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
- package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
- package/dist/vue-ui-rings-CsUngX_F.js +510 -0
- package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
- package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
- package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
- package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
- package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
- package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
- package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
- package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
- package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
- package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
- package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
- package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
- package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
- package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
- package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
- package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
- package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
- package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
- package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
- package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
- package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
- package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
- package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
- package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
- package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
- package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
- package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
- package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
- package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
- package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
- package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
- package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
- package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
- package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
- package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
- package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
- package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
- package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
- package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
- package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
- package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
- package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
- package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
- package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
- package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
- package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
- package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
- package/package.json +1 -1
- package/dist/index-C6KVJkgd.cjs +0 -843
- package/dist/index-bDBuMYfe.js +0 -57303
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
import { computed as p, ref as d, watch as he, onMounted as ye, onBeforeUnmount as fe, openBlock as r, createElementBlock as i, normalizeClass as q, normalizeStyle as F, createElementVNode as v, toDisplayString as m, createCommentVNode as g, createBlock as H, unref as h, createSlots as ge, withCtx as E, renderSlot as $, normalizeProps as pe, guardReactiveProps as me, Fragment as O, renderList as A } from "vue";
|
|
2
|
+
import { u as ke, c as be, t as xe, a as we, p as Z, b as _e, o as J, d as Fe, e as N, g as K, m as Q, X as ze, r as j, G as X, B as ee } from "./index-uOtklCCx.js";
|
|
3
|
+
import { t as Se, u as $e } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { u as Ce, U as Me } from "./usePrinter-B6xQCyL-.js";
|
|
5
|
+
import Pe from "./vue-ui-skeleton-BM9rwmxY.js";
|
|
6
|
+
import { u as te } from "./useNestedProp-BgWkUab_.js";
|
|
7
|
+
import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const Oe = ["id"], Ne = ["xmlns", "viewBox"], Xe = ["id"], Ye = ["stop-color"], Ge = ["stop-color"], Re = ["stop-color"], Ee = ["id"], Ae = ["stdDeviation"], je = ["d", "fill", "stroke"], Be = ["d", "filter"], Ue = ["y", "width", "height", "fill"], De = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], Ve = ["x", "y", "font-size", "font-weight", "fill"], We = { key: 1 }, Le = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Te = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], qe = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], He = { key: 2 }, Ze = ["d", "fill", "stroke", "stroke-width"], Je = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], Ke = ["x", "y", "font-size", "fill"], Qe = {
|
|
9
|
+
__name: "vue-ui-gauge",
|
|
10
|
+
props: {
|
|
11
|
+
config: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default() {
|
|
14
|
+
return {};
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
dataset: {
|
|
18
|
+
type: Object,
|
|
19
|
+
default() {
|
|
20
|
+
return {};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(Y, { expose: ae }) {
|
|
25
|
+
const u = Y, { vue_ui_gauge: le } = ke(), C = p(() => !!u.dataset && Object.keys(u.dataset).length), k = d(be()), oe = d(null), B = d(0), M = d(null), U = d(null), D = d(null), e = p(() => {
|
|
26
|
+
const l = te({
|
|
27
|
+
userConfig: u.config,
|
|
28
|
+
defaultConfig: le
|
|
29
|
+
});
|
|
30
|
+
return l.theme ? {
|
|
31
|
+
...te({
|
|
32
|
+
userConfig: xe.vue_ui_gauge[l.theme] || u.config,
|
|
33
|
+
defaultConfig: l
|
|
34
|
+
}),
|
|
35
|
+
customPalette: we[l.theme] || Z
|
|
36
|
+
} : l;
|
|
37
|
+
}), { isPrinting: re, isImaging: se, generatePdf: V, generateImage: W } = Ce({
|
|
38
|
+
elementId: `vue-ui-gauge_${k.value}`,
|
|
39
|
+
fileName: e.value.style.chart.title.text || "vue-ui-gauge"
|
|
40
|
+
}), ue = p(() => _e(e.value.customPalette)), x = p(() => {
|
|
41
|
+
if (!C.value || J(u.dataset.series || {}))
|
|
42
|
+
return {
|
|
43
|
+
value: 0,
|
|
44
|
+
series: [
|
|
45
|
+
{
|
|
46
|
+
from: 0,
|
|
47
|
+
to: 1
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
};
|
|
51
|
+
const l = [];
|
|
52
|
+
(u.dataset.series || []).forEach((a) => {
|
|
53
|
+
l.push(a.from || 0), l.push(a.to || 0);
|
|
54
|
+
});
|
|
55
|
+
const o = Math.max(...l);
|
|
56
|
+
return {
|
|
57
|
+
...u.dataset,
|
|
58
|
+
series: (u.dataset.series || []).map((a, n) => ({
|
|
59
|
+
...a,
|
|
60
|
+
color: Fe(a.color) || ue.value[n] || Z[n],
|
|
61
|
+
value: ((a.to || 0) - (a.from || 0)) / o * 100
|
|
62
|
+
}))
|
|
63
|
+
};
|
|
64
|
+
}), y = d(512), t = d({
|
|
65
|
+
height: 358.4,
|
|
66
|
+
width: y.value,
|
|
67
|
+
top: 0,
|
|
68
|
+
bottom: 358.4,
|
|
69
|
+
centerX: 179.2,
|
|
70
|
+
centerY: y.value / 2,
|
|
71
|
+
labelFontSize: 18,
|
|
72
|
+
legendFontSize: e.value.style.chart.legend.fontSize,
|
|
73
|
+
pointerRadius: e.value.style.chart.layout.pointer.circle.radius,
|
|
74
|
+
trackSize: e.value.style.chart.layout.track.size,
|
|
75
|
+
pointerSize: e.value.style.chart.layout.pointer.size,
|
|
76
|
+
pointerStrokeWidth: e.value.style.chart.layout.pointer.strokeWidth,
|
|
77
|
+
markerOffset: e.value.style.chart.layout.markers.offsetY + 3
|
|
78
|
+
}), z = d(0), w = d(0), f = d(e.value.style.chart.animation.use ? 0 : u.dataset.value);
|
|
79
|
+
he(() => u.dataset.value, () => {
|
|
80
|
+
f.value = e.value.style.chart.animation.use ? 0 : u.dataset.value, T();
|
|
81
|
+
});
|
|
82
|
+
const c = p(() => {
|
|
83
|
+
const l = t.value.width / 2, o = s.value.base, a = Math.PI * ((f.value + 0 - w.value) / (z.value - w.value)) + Math.PI;
|
|
84
|
+
return {
|
|
85
|
+
x1: l,
|
|
86
|
+
y1: o,
|
|
87
|
+
x2: l + s.value.pointerSize * t.value.pointerSize * 0.9 * Math.cos(a),
|
|
88
|
+
y2: o + s.value.pointerSize * t.value.pointerSize * 0.9 * Math.sin(a)
|
|
89
|
+
};
|
|
90
|
+
}), L = p(() => {
|
|
91
|
+
const l = t.value.width / 2, o = s.value.base, a = Math.PI * ((f.value + 0 - w.value) / (z.value - w.value)) + Math.PI, n = l + s.value.pointerSize * t.value.pointerSize * 0.9 * Math.cos(a), R = o + s.value.pointerSize * t.value.pointerSize * 0.9 * Math.sin(a), b = t.value.pointerRadius, I = l + b * Math.cos(a + Math.PI / 2), ce = o + b * Math.sin(a + Math.PI / 2), ve = l + b * Math.cos(a - Math.PI / 2), de = o + b * Math.sin(a - Math.PI / 2);
|
|
92
|
+
return isNaN(n) ? null : `M ${n},${R} ${I},${ce} ${ve},${de} Z`;
|
|
93
|
+
}), G = p(() => {
|
|
94
|
+
for (let l = 0; l < x.value.series.length; l += 1) {
|
|
95
|
+
const { color: o, from: a, to: n } = x.value.series[l];
|
|
96
|
+
if (f.value >= a && f.value <= n)
|
|
97
|
+
return o;
|
|
98
|
+
}
|
|
99
|
+
return "#2D353C";
|
|
100
|
+
}), P = d(null);
|
|
101
|
+
ye(() => {
|
|
102
|
+
if (J(u.dataset) ? N({
|
|
103
|
+
componentName: "VueUiGauge",
|
|
104
|
+
type: "dataset"
|
|
105
|
+
}) : (K({
|
|
106
|
+
datasetObject: u.dataset,
|
|
107
|
+
requiredAttributes: ["value", "series"]
|
|
108
|
+
}).forEach((l) => {
|
|
109
|
+
N({
|
|
110
|
+
componentName: "VueUiGauge",
|
|
111
|
+
type: "datasetAttribute",
|
|
112
|
+
property: l
|
|
113
|
+
});
|
|
114
|
+
}), Object.hasOwn(u.dataset, "series") && (u.dataset.series.length ? u.dataset.series.forEach((l, o) => {
|
|
115
|
+
K({
|
|
116
|
+
datasetObject: l,
|
|
117
|
+
requiredAttributes: ["from", "to"]
|
|
118
|
+
}).forEach((a) => {
|
|
119
|
+
N({
|
|
120
|
+
componentName: "VueUiGauge",
|
|
121
|
+
type: "datasetSerieAttribute",
|
|
122
|
+
property: a,
|
|
123
|
+
index: o
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
}) : N({
|
|
127
|
+
componentName: "VueUiGauge",
|
|
128
|
+
type: "datasetAttributeEmpty",
|
|
129
|
+
property: "series"
|
|
130
|
+
}))), T(), e.value.responsive) {
|
|
131
|
+
const l = Se(() => {
|
|
132
|
+
const { width: o, height: a } = $e({
|
|
133
|
+
chart: M.value,
|
|
134
|
+
title: e.value.style.chart.title.text ? U.value : null,
|
|
135
|
+
legend: D.value
|
|
136
|
+
});
|
|
137
|
+
t.value.width = o, t.value.height = a, t.value.centerX = o / 2, t.value.centerY = y.value / 2 / 358.4 * a, t.value.bottom = a, t.value.labelFontSize = 18 / y.value * Math.min(a, o) < 10 ? 10 : 18 / y.value * Math.min(a, o), t.value.legendFontSize = e.value.style.chart.legend.fontSize / y.value * Math.min(a, o) < 14 ? 14 : e.value.style.chart.legend.fontSize / y.value * Math.min(a, o), t.value.pointerRadius = e.value.style.chart.layout.pointer.circle.radius / y.value * Math.min(a, o), t.value.trackSize = e.value.style.chart.layout.track.size / y.value * Math.min(a, o), t.value.pointerStrokeWidth = ee({
|
|
138
|
+
relator: Math.min(o, a),
|
|
139
|
+
adjuster: y.value,
|
|
140
|
+
source: e.value.style.chart.layout.pointer.strokeWidth,
|
|
141
|
+
threshold: 2,
|
|
142
|
+
fallback: 2
|
|
143
|
+
}), t.value.markerOffset = ee({
|
|
144
|
+
relator: Math.max(o, a),
|
|
145
|
+
adjuster: y.value,
|
|
146
|
+
source: e.value.style.chart.layout.markers.offsetY + 3,
|
|
147
|
+
threshold: 2,
|
|
148
|
+
fallback: 2
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
P.value = new ResizeObserver(l), P.value.observe(M.value.parentNode);
|
|
152
|
+
}
|
|
153
|
+
}), fe(() => {
|
|
154
|
+
P.value && P.value.disconnect();
|
|
155
|
+
});
|
|
156
|
+
function T() {
|
|
157
|
+
const l = [];
|
|
158
|
+
(x.value.series || []).forEach((I) => {
|
|
159
|
+
l.push(I.from || 0), l.push(I.to || 0);
|
|
160
|
+
}), z.value = Math.max(...l), w.value = Math.min(...l);
|
|
161
|
+
const o = String(z.value).length;
|
|
162
|
+
let a = 0, n = (o > 2 ? 0.01 : 1e-3) * e.value.style.chart.animation.speed, R = (o > 2 ? 0.05 : 5e-3) * e.value.style.chart.animation.acceleration;
|
|
163
|
+
function b() {
|
|
164
|
+
f.value += n + a, a += R, f.value < u.dataset.value ? requestAnimationFrame(b) : f.value = u.dataset.value;
|
|
165
|
+
}
|
|
166
|
+
e.value.style.chart.animation.use && (f.value = w.value, b());
|
|
167
|
+
}
|
|
168
|
+
const s = p(() => {
|
|
169
|
+
const l = e.value.responsive ? Math.min(t.value.width, t.value.height) : t.value.width;
|
|
170
|
+
return {
|
|
171
|
+
arcs: l / 2.5,
|
|
172
|
+
gradients: l / 2.75,
|
|
173
|
+
base: e.value.responsive ? t.value.height / 2 : t.value.height * 0.7,
|
|
174
|
+
ratingBase: e.value.responsive ? t.value.height / 2 + t.value.height / 4 : t.value.height * 0.9,
|
|
175
|
+
pointerSize: e.value.responsive ? Math.min(t.value.width, t.value.height) / 3 : t.value.width / 3.2
|
|
176
|
+
};
|
|
177
|
+
}), _ = p(() => Q(
|
|
178
|
+
{ series: x.value.series },
|
|
179
|
+
t.value.width / 2,
|
|
180
|
+
s.value.base,
|
|
181
|
+
s.value.arcs,
|
|
182
|
+
s.value.arcs,
|
|
183
|
+
1,
|
|
184
|
+
1,
|
|
185
|
+
1,
|
|
186
|
+
180,
|
|
187
|
+
109.9495,
|
|
188
|
+
40 * t.value.trackSize
|
|
189
|
+
)), ie = p(() => Q(
|
|
190
|
+
{ series: x.value.series },
|
|
191
|
+
t.value.width / 2,
|
|
192
|
+
s.value.base,
|
|
193
|
+
s.value.gradients,
|
|
194
|
+
s.value.gradients,
|
|
195
|
+
1,
|
|
196
|
+
1,
|
|
197
|
+
1,
|
|
198
|
+
180,
|
|
199
|
+
109.9495,
|
|
200
|
+
2 * t.value.trackSize
|
|
201
|
+
)), S = d(!1);
|
|
202
|
+
function ne(l) {
|
|
203
|
+
S.value = l, B.value += 1;
|
|
204
|
+
}
|
|
205
|
+
return ae({
|
|
206
|
+
generatePdf: V,
|
|
207
|
+
generateImage: W
|
|
208
|
+
}), (l, o) => (r(), i("div", {
|
|
209
|
+
class: q(`vue-ui-gauge ${S.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
210
|
+
ref_key: "gaugeChart",
|
|
211
|
+
ref: M,
|
|
212
|
+
id: `vue-ui-gauge_${k.value}`,
|
|
213
|
+
style: F(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`)
|
|
214
|
+
}, [
|
|
215
|
+
e.value.style.chart.title.text ? (r(), i("div", {
|
|
216
|
+
key: 0,
|
|
217
|
+
ref_key: "chartTitle",
|
|
218
|
+
ref: U,
|
|
219
|
+
style: F(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px;${e.value.userOptions.show ? "padding-top:36px" : ""}`)
|
|
220
|
+
}, [
|
|
221
|
+
v("div", {
|
|
222
|
+
style: F(`width:100%;text-align:center;color:${e.value.style.chart.title.color};font-size:${e.value.style.chart.title.fontSize}px;font-weight:${e.value.style.chart.title.bold ? "bold" : ""}`)
|
|
223
|
+
}, m(e.value.style.chart.title.text), 5),
|
|
224
|
+
e.value.style.chart.title.subtitle.text ? (r(), i("div", {
|
|
225
|
+
key: 0,
|
|
226
|
+
style: F(`width:100%;text-align:center;color:${e.value.style.chart.title.subtitle.color};font-size:${e.value.style.chart.title.subtitle.fontSize}px;font-weight:${e.value.style.chart.title.subtitle.bold ? "bold" : ""}`)
|
|
227
|
+
}, m(e.value.style.chart.title.subtitle.text), 5)) : g("", !0),
|
|
228
|
+
isNaN(Y.dataset.base) ? g("", !0) : (r(), i("div", {
|
|
229
|
+
key: 1,
|
|
230
|
+
style: F(`width:100%;text-align:center;color:${e.value.style.chart.title.subtitle.color};font-size:${e.value.style.chart.title.subtitle.fontSize}px;font-weight:${e.value.style.chart.title.subtitle.bold ? "bold" : ""}`)
|
|
231
|
+
}, m(e.value.translations.base) + " : " + m(Y.dataset.base), 5))
|
|
232
|
+
], 4)) : g("", !0),
|
|
233
|
+
e.value.userOptions.show && C.value ? (r(), H(Me, {
|
|
234
|
+
ref_key: "details",
|
|
235
|
+
ref: oe,
|
|
236
|
+
key: `user_options_${B.value}`,
|
|
237
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
238
|
+
color: e.value.style.chart.color,
|
|
239
|
+
isImaging: h(se),
|
|
240
|
+
isPrinting: h(re),
|
|
241
|
+
uid: k.value,
|
|
242
|
+
hasXls: !1,
|
|
243
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
244
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
245
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
246
|
+
isFullscreen: S.value,
|
|
247
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
248
|
+
chartElement: M.value,
|
|
249
|
+
onToggleFullscreen: ne,
|
|
250
|
+
onGeneratePdf: h(V),
|
|
251
|
+
onGenerateImage: h(W)
|
|
252
|
+
}, ge({ _: 2 }, [
|
|
253
|
+
l.$slots.optionPdf ? {
|
|
254
|
+
name: "optionPdf",
|
|
255
|
+
fn: E(() => [
|
|
256
|
+
$(l.$slots, "optionPdf", {}, void 0, !0)
|
|
257
|
+
]),
|
|
258
|
+
key: "0"
|
|
259
|
+
} : void 0,
|
|
260
|
+
l.$slots.optionImg ? {
|
|
261
|
+
name: "optionImg",
|
|
262
|
+
fn: E(() => [
|
|
263
|
+
$(l.$slots, "optionImg", {}, void 0, !0)
|
|
264
|
+
]),
|
|
265
|
+
key: "1"
|
|
266
|
+
} : void 0,
|
|
267
|
+
l.$slots.optionFullscreen ? {
|
|
268
|
+
name: "optionFullscreen",
|
|
269
|
+
fn: E(({ toggleFullscreen: a, isFullscreen: n }) => [
|
|
270
|
+
$(l.$slots, "optionFullscreen", pe(me({ toggleFullscreen: a, isFullscreen: n })), void 0, !0)
|
|
271
|
+
]),
|
|
272
|
+
key: "2"
|
|
273
|
+
} : void 0
|
|
274
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : g("", !0),
|
|
275
|
+
C.value ? (r(), i("svg", {
|
|
276
|
+
key: 2,
|
|
277
|
+
xmlns: h(ze),
|
|
278
|
+
class: q({ "vue-data-ui-fullscreen--on": S.value, "vue-data-ui-fulscreen--off": !S.value }),
|
|
279
|
+
viewBox: `0 0 ${t.value.width <= 0 ? 10 : t.value.width} ${t.value.height <= 0 ? 10 : t.value.height}`,
|
|
280
|
+
style: F(`max-width:100%;overflow:hidden !important;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
281
|
+
}, [
|
|
282
|
+
v("defs", null, [
|
|
283
|
+
v("radialGradient", {
|
|
284
|
+
id: `gradient_${k.value}`,
|
|
285
|
+
cx: "50%",
|
|
286
|
+
cy: "50%",
|
|
287
|
+
r: "50%",
|
|
288
|
+
fx: "50%",
|
|
289
|
+
fy: "50%"
|
|
290
|
+
}, [
|
|
291
|
+
v("stop", {
|
|
292
|
+
offset: "0%",
|
|
293
|
+
"stop-color": `#FFFFFF${h(j)[1]}`
|
|
294
|
+
}, null, 8, Ye),
|
|
295
|
+
v("stop", {
|
|
296
|
+
offset: "80%",
|
|
297
|
+
"stop-color": `#FFFFFF${h(j)[e.value.style.chart.layout.track.gradientIntensity]}`
|
|
298
|
+
}, null, 8, Ge),
|
|
299
|
+
v("stop", {
|
|
300
|
+
offset: "100%",
|
|
301
|
+
"stop-color": `#FFFFFF${h(j)[1]}`
|
|
302
|
+
}, null, 8, Re)
|
|
303
|
+
], 8, Xe)
|
|
304
|
+
]),
|
|
305
|
+
v("defs", null, [
|
|
306
|
+
v("filter", {
|
|
307
|
+
id: `blur_${k.value}`,
|
|
308
|
+
x: "-50%",
|
|
309
|
+
y: "-50%",
|
|
310
|
+
width: "200%",
|
|
311
|
+
height: "200%"
|
|
312
|
+
}, [
|
|
313
|
+
v("feGaussianBlur", {
|
|
314
|
+
in: "SourceGraphic",
|
|
315
|
+
stdDeviation: 100 / e.value.style.chart.layout.track.gradientIntensity
|
|
316
|
+
}, null, 8, Ae)
|
|
317
|
+
], 8, Ee)
|
|
318
|
+
]),
|
|
319
|
+
(r(!0), i(O, null, A(_.value, (a, n) => (r(), i("path", {
|
|
320
|
+
key: `arc_${n}`,
|
|
321
|
+
d: a.arcSlice,
|
|
322
|
+
fill: a.color,
|
|
323
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
324
|
+
"stroke-linecap": "round"
|
|
325
|
+
}, null, 8, je))), 128)),
|
|
326
|
+
e.value.style.chart.layout.track.useGradient ? (r(), i(O, { key: 0 }, [
|
|
327
|
+
(r(!0), i(O, null, A(ie.value, (a, n) => (r(), i("path", {
|
|
328
|
+
key: `arc_${n}`,
|
|
329
|
+
d: a.arcSlice,
|
|
330
|
+
fill: "#FFFFFF",
|
|
331
|
+
stroke: "none",
|
|
332
|
+
"stroke-linecap": "round",
|
|
333
|
+
filter: `url(#blur_${k.value})`
|
|
334
|
+
}, null, 8, Be))), 128)),
|
|
335
|
+
v("rect", {
|
|
336
|
+
x: 0,
|
|
337
|
+
y: s.value.base,
|
|
338
|
+
width: t.value.width <= 0 ? 1e-4 : t.value.width,
|
|
339
|
+
height: t.value.height * 0.3 <= 0 ? 1e-4 : t.value.height * 0.3,
|
|
340
|
+
fill: e.value.style.chart.backgroundColor
|
|
341
|
+
}, null, 8, Ue)
|
|
342
|
+
], 64)) : g("", !0),
|
|
343
|
+
(r(!0), i(O, null, A(_.value, (a, n) => (r(), i("text", {
|
|
344
|
+
x: h(X)({
|
|
345
|
+
centerX: t.value.width / 2,
|
|
346
|
+
centerY: s.value.base,
|
|
347
|
+
initX: a.center.startX,
|
|
348
|
+
initY: a.center.startY,
|
|
349
|
+
offset: t.value.markerOffset
|
|
350
|
+
}).x,
|
|
351
|
+
y: h(X)({
|
|
352
|
+
centerX: t.value.width / 2,
|
|
353
|
+
centerY: s.value.base,
|
|
354
|
+
initX: a.center.startX,
|
|
355
|
+
initY: a.center.startY,
|
|
356
|
+
offset: t.value.markerOffset
|
|
357
|
+
}).y,
|
|
358
|
+
"text-anchor": a.center.startX < t.value.width / 2 - 5 ? "end" : a.center.startX > t.value.width / 2 + 5 ? "start" : "middle",
|
|
359
|
+
"font-size": t.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
|
|
360
|
+
"font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
|
|
361
|
+
fill: e.value.style.chart.layout.markers.color
|
|
362
|
+
}, m(a.from.toFixed(e.value.style.chart.layout.markers.roundingValue)), 9, De))), 256)),
|
|
363
|
+
v("text", {
|
|
364
|
+
x: h(X)({
|
|
365
|
+
centerX: t.value.width / 2,
|
|
366
|
+
centerY: s.value.base,
|
|
367
|
+
initX: _.value.at(-1).endX,
|
|
368
|
+
initY: _.value.at(-1).endY,
|
|
369
|
+
offset: t.value.markerOffset
|
|
370
|
+
}).x,
|
|
371
|
+
y: h(X)({
|
|
372
|
+
centerX: t.value.width / 2,
|
|
373
|
+
centerY: s.value.base,
|
|
374
|
+
initX: _.value.at(-1).endX,
|
|
375
|
+
initY: _.value.at(-1).endY,
|
|
376
|
+
offset: t.value.markerOffset
|
|
377
|
+
}).y,
|
|
378
|
+
"text-anchor": "start",
|
|
379
|
+
"font-size": t.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
|
|
380
|
+
"font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
|
|
381
|
+
fill: e.value.style.chart.layout.markers.color
|
|
382
|
+
}, m(z.value.toFixed(e.value.style.chart.layout.markers.roundingValue)), 9, Ve),
|
|
383
|
+
e.value.style.chart.layout.pointer.type === "rounded" ? (r(), i("g", We, [
|
|
384
|
+
isNaN(c.value.x2) ? g("", !0) : (r(), i("line", {
|
|
385
|
+
key: 0,
|
|
386
|
+
x1: c.value.x1,
|
|
387
|
+
y1: c.value.y1,
|
|
388
|
+
x2: c.value.x2,
|
|
389
|
+
y2: c.value.y2,
|
|
390
|
+
stroke: e.value.style.chart.layout.pointer.stroke,
|
|
391
|
+
"stroke-width": t.value.pointerStrokeWidth,
|
|
392
|
+
"stroke-linecap": "round"
|
|
393
|
+
}, null, 8, Le)),
|
|
394
|
+
isNaN(c.value.x2) ? g("", !0) : (r(), i("line", {
|
|
395
|
+
key: 1,
|
|
396
|
+
x1: c.value.x1,
|
|
397
|
+
y1: c.value.y1,
|
|
398
|
+
x2: c.value.x2,
|
|
399
|
+
y2: c.value.y2,
|
|
400
|
+
stroke: e.value.style.chart.layout.pointer.useRatingColor ? G.value : e.value.style.chart.layout.pointer.color,
|
|
401
|
+
"stroke-linecap": "round",
|
|
402
|
+
"stroke-width": t.value.pointerStrokeWidth * 0.7
|
|
403
|
+
}, null, 8, Te)),
|
|
404
|
+
!isNaN(c.value.x2) && e.value.style.chart.layout.track.useGradient ? (r(), i("line", {
|
|
405
|
+
key: 2,
|
|
406
|
+
x1: c.value.x1,
|
|
407
|
+
y1: c.value.y1,
|
|
408
|
+
x2: c.value.x2,
|
|
409
|
+
y2: c.value.y2,
|
|
410
|
+
stroke: "white",
|
|
411
|
+
"stroke-linecap": "round",
|
|
412
|
+
"stroke-width": t.value.pointerStrokeWidth * 0.3,
|
|
413
|
+
filter: `url(#blur_${k.value})`
|
|
414
|
+
}, null, 8, qe)) : g("", !0)
|
|
415
|
+
])) : (r(), i("g", He, [
|
|
416
|
+
L.value ? (r(), i("path", {
|
|
417
|
+
key: 0,
|
|
418
|
+
d: L.value,
|
|
419
|
+
fill: e.value.style.chart.layout.pointer.useRatingColor ? G.value : e.value.style.chart.layout.pointer.color,
|
|
420
|
+
stroke: e.value.style.chart.layout.pointer.stroke,
|
|
421
|
+
"stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
|
|
422
|
+
"stroke-linejoin": "round"
|
|
423
|
+
}, null, 8, Ze)) : g("", !0)
|
|
424
|
+
])),
|
|
425
|
+
v("circle", {
|
|
426
|
+
cx: t.value.width / 2,
|
|
427
|
+
cy: s.value.base,
|
|
428
|
+
fill: e.value.style.chart.layout.pointer.circle.color,
|
|
429
|
+
r: t.value.pointerRadius <= 0 ? 1e-4 : t.value.pointerRadius,
|
|
430
|
+
"stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
|
|
431
|
+
stroke: e.value.style.chart.layout.pointer.circle.stroke
|
|
432
|
+
}, null, 8, Je),
|
|
433
|
+
v("text", {
|
|
434
|
+
x: t.value.width / 2,
|
|
435
|
+
y: s.value.ratingBase,
|
|
436
|
+
"text-anchor": "middle",
|
|
437
|
+
"font-size": t.value.legendFontSize,
|
|
438
|
+
"font-weight": "bold",
|
|
439
|
+
fill: e.value.style.chart.legend.useRatingColor ? G.value : e.value.style.chart.legend.color
|
|
440
|
+
}, m(e.value.style.chart.legend.prefix) + " " + m(e.value.style.chart.legend.showPlusSymbol && f.value > 0 ? "+" : "") + m(f.value.toFixed(e.value.style.chart.legend.roundingValue)) + " " + m(e.value.style.chart.legend.suffix), 9, Ke),
|
|
441
|
+
$(l.$slots, "svg", { svg: t.value }, void 0, !0)
|
|
442
|
+
], 14, Ne)) : g("", !0),
|
|
443
|
+
C.value ? g("", !0) : (r(), H(Pe, {
|
|
444
|
+
key: 3,
|
|
445
|
+
config: {
|
|
446
|
+
type: "gauge",
|
|
447
|
+
style: {
|
|
448
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
449
|
+
gauge: {
|
|
450
|
+
color: "#CCCCCC"
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}, null, 8, ["config"])),
|
|
455
|
+
v("div", {
|
|
456
|
+
ref_key: "chartLegend",
|
|
457
|
+
ref: D
|
|
458
|
+
}, [
|
|
459
|
+
$(l.$slots, "legend", { legend: x.value }, void 0, !0)
|
|
460
|
+
], 512)
|
|
461
|
+
], 14, Oe));
|
|
462
|
+
}
|
|
463
|
+
}, ut = /* @__PURE__ */ Ie(Qe, [["__scopeId", "data-v-a862b4a9"]]);
|
|
464
|
+
export {
|
|
465
|
+
ut as default
|
|
466
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./index-p5gfZSvB.cjs"),ae=require("./Title-Bb-A5OSV.cjs"),X=require("./usePrinter-fZlsJid8.cjs"),se=require("./Tooltip-C_UE6y-E.cjs"),ue=require("./vue-ui-skeleton-sjfOtCZr.cjs"),ne=require("./BaseIcon-JtWoVorZ.cjs"),re=require("./vue-ui-accordion-C_pwrAJl.cjs"),j=require("./useNestedProp-2kIU-7On.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],ce=["xmlns","viewBox"],ve=["x","y","width","height","fill","stroke","stroke-width"],ye=["x","y","width","height","fill","stroke","stroke-width"],he=["font-size","font-weight","fill","x","y"],pe=["x","y","width","height","onMouseover"],ge={key:0},me=["font-size","fill","x","y","font-weight"],fe={key:0},be=["x","y","font-size","fill","font-weight"],xe={key:1},ke=["x","y","width","height","stroke","stroke-width"],we={key:2},_e=["id"],Ce=["stop-color"],Ne=["stop-color"],Be=["x","y","font-size","fill"],Se=["x","y","height","rx","fill"],Ve=["x","y","font-size","fill"],$e=["stroke","x1","x2","y1","y2"],Ee=["fill","d"],ze={key:3},Le={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Te=["stop-color"],Fe=["stop-color"],Ae=["x","y","width","height","rx"],Me=["x","y","font-size","fill"],Pe=["x","y","font-size","fill"],De=["stroke","x1","x2","y1","y2"],Ie=["fill","d"],Oe={class:"vue-ui-data-table"},Re={key:0},qe=["data-cell"],He={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ue=["data-cell"],Ge={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Xe={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:W}){const r=B;e.useCssVars(l=>({"2d7e5208":l.tdo}));const{vue_ui_heatmap:Y}=d.useConfig(),S=e.computed(()=>!!r.dataset&&r.dataset.length);d.objectIsEmpty(r.dataset)&&d.error({componentName:"VueUiHeatmap",type:"dataset"});const x=e.ref(d.createUid()),E=e.ref(null),K=e.ref(null),z=e.ref(!1),L=e.ref(""),P=e.ref(void 0),k=e.ref(null),D=e.ref(0),I=e.ref(null),O=e.ref(!1),t=e.computed(()=>{const l=j.useNestedProp({userConfig:r.config,defaultConfig:Y});return l.theme?{...j.useNestedProp({userConfig:d.themes.vue_ui_heatmap[l.theme]||r.config,defaultConfig:l})}:l}),{isPrinting:J,isImaging:Q,generatePdf:R,generateImage:q}=X.usePrinter({elementId:`heatmap__${x.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),Z=e.computed(()=>t.value.table.responsiveBreakpoint);function ee(){new ResizeObserver(a=>{a.forEach(s=>{O.value=s.contentRect.width<Z.value})}).observe(I.value)}e.onMounted(ee);const b=e.computed(()=>Math.max(...r.dataset.flatMap(l=>(l.values||[]).length))),y=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+r.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(b.value<r.dataset.length?r.dataset.length:b.value)*t.value.style.layout.cells.height,s=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:s,width:a}}),V=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:y.value.width-t.value.style.layout.padding.right-(V.value==="right"&&t.value.style.legend.show?92:0),bottom:y.value.height-t.value.style.layout.padding.bottom,height:y.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:y.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(V.value==="right"&&t.value.style.legend.show?92:0)})),T=e.computed(()=>u.value.height*r.dataset.length),h=e.computed(()=>Math.max(...r.dataset.flatMap(l=>l.values))),w=e.computed(()=>Math.min(...r.dataset.flatMap(l=>l.values))),f=e.computed(()=>{const l=r.dataset.flatMap(s=>s.values);return l.reduce((s,n)=>s+n,0)/l.length}),u=e.computed(()=>({width:o.value.width/b.value,height:o.value.width/(b.value<r.dataset.length?r.dataset.length:b.value)})),p=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:r.dataset.map(s=>s.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,b.value)}}),$=e.computed(()=>(r.dataset.forEach((l,a)=>{d.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(s=>{d.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),r.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,s)=>a>=f.value?{side:"up",color:d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),ratio:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value))>1?1:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value)),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${d.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(f.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(f.value)),color:d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${d.createUid()}`})})))),g=e.ref(null),F=e.ref(null);function te(l,a,s,n){k.value={x:s,y:n},console.log(l);const{value:i,yAxisName:c,xAxisName:m,id:oe}=l;P.value=oe,g.value=i,F.value={datapoint:l,seriesIndex:a,series:$.value,config:t.value},z.value=!0;let A="";const M=t.value.style.tooltip.customFormat;d.isFunction(M)&&d.functionReturnsString(()=>M({datapoint:l,seriesIndex:a,series:$.value,config:t.value}))?L.value=M({datapoint:l,seriesIndex:a,series:$.value,config:t.value}):(A+=`<div>${c} ${m?`${m}`:""}</div>`,A+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${d.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,i)}">⬤</span><span>${isNaN(i)?"-":d.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:i,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue})}</span></div>`,L.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${A}</div>`)}const _=e.computed(()=>o.value.top+T.value*(1-g.value/h.value)),C=e.computed(()=>o.value.left+(y.value.width-o.value.left-t.value.style.layout.padding.right)*(g.value/h.value));e.computed(()=>{const l=r.dataset.map(s=>({name:s.name})),a=r.dataset.map(s=>s.values);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=["",...r.dataset.map((i,c)=>i.name)],a=[];for(let i=0;i<p.value.xLabels.length;i+=1){const c=[p.value.xLabels[i]];for(let m=0;m<r.dataset.length;m+=1)c.push([r.dataset[m].values[i]]);a.push(c)}const s=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=d.createCsvContent(s);d.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-heatmap"})})}const N=e.ref(!1);function le(l){N.value=l,D.value+=1}function U(){v.value.showTable=!v.value.showTable}function G(){v.value.showTooltip=!v.value.showTooltip}return W({generatePdf:R,generateCsv:H,generateImage:q,toggleTable:U,toggleTooltip:G}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:E,class:e.normalizeClass(`vue-ui-heatmap ${N.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${x.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(ae._sfc_main,{config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(Q),isPrinting:e.unref(J),uid:x.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:E.value,onToggleFullscreen:le,onGeneratePdf:e.unref(R),onGenerateCsv:H,onGenerateImage:e.unref(q),onToggleTable:U,onToggleTooltip:G},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:s,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:s,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(d.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${y.value.width} ${y.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(s,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(i,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ve),e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:i.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ye),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(d.adaptColorToBackground)(i.color),x:o.value.left+u.value.width*c+u.value.width/2,y:o.value.top+u.value.height*n+u.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(t.value.style.layout.dataLabels.prefix)+e.toDisplayString(Number(i.value.toFixed(t.value.style.layout.cells.value.roundingValue)).toLocaleString())+e.toDisplayString(t.value.style.layout.dataLabels.suffix),9,he)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(i,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c,y:o.value.top+u.value.height*n,width:u.value.width,height:u.value.height,fill:"transparent",stroke:"none",onMouseover:m=>te(i,n,o.value.left+u.value.width*c,o.value.top+u.value.height*n),onMouseout:a[0]||(a[0]=m=>{z.value=!1,P.value=void 0,g.value=null,k.value=null})},null,40,pe)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ge,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+u.value.height*n+u.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(p.value.yLabels[n]),9,me)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+u.value.width/2+o.value.width/p.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX,y:o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(s),9,be))),256))])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("g",xe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:k.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:k.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:u.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,ke)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="right"?(e.openBlock(),e.createElementBlock("g",we,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${x.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ne)],8,_e)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Be),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:T.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${x.value})`},null,8,Se),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+T.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Ve),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.value.style.backgroundColor,"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:_.value,y2:_.value},null,8,$e)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${_.value} ${o.value.right+26},${_.value-8} ${o.value.right+26},${_.value+8}z`},null,8,Ee)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&V.value==="bottom"?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Le,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Fe)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:y.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ae),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Me),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Pe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.value.style.backgroundColor,"stroke-width":"2",x1:C.value,x2:C.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,De)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${C.value},${o.value.bottom+t.value.style.layout.cells.height} ${C.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${C.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:y.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:3,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:v.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,parent:E.value,content:L.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":O.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=s=>v.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(s=>v.value.showTable=!1,["enter"]))},[e.createVNode(ne.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Oe,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",Re,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(s,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(s.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",He,e.toDisplayString(s),1)],12,qe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(i,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":B.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Ge,e.toDisplayString(isNaN(i.values[n])?"-":e.unref(d.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:i.values[n],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ue))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},je=ie._export_sfc(Xe,[["__scopeId","data-v-52af0be2"]]);exports.default=je;
|