vue-data-ui 2.3.3 → 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-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
- package/dist/{index.es-Dnua3tHc.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-BcMihqI4.cjs +0 -843
- package/dist/index-C7FeCQ7K.js +0 -57303
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
import { computed as v, onMounted as be, ref as u, openBlock as r, createElementBlock as n, normalizeClass as N, normalizeStyle as F, createVNode as W, createCommentVNode as d, createBlock as S, unref as C, createSlots as me, withCtx as i, renderSlot as h, normalizeProps as z, guardReactiveProps as A, createElementVNode as x, Fragment as Q, renderList as Z, createTextVNode as ee, toDisplayString as I, nextTick as ke } from "vue";
|
|
2
|
+
import { u as Ce, o as xe, e as te, g as we, c as le, t as $e, a as Te, p as L, b as _e, d as Pe, F as Ne, f as O, X as Fe, v as ae, w as Se, n as Ie, q as Le } from "./index-uOtklCCx.js";
|
|
3
|
+
import { L as Oe } from "./Legend-CxvJTjEm.js";
|
|
4
|
+
import { _ as Ee } from "./Title-2iks1ziC.js";
|
|
5
|
+
import { _ as Ve } from "./Tooltip-C3phqKuU.js";
|
|
6
|
+
import { D as Be } from "./DataTable-CwaOlAsy.js";
|
|
7
|
+
import { u as De, U as Ge } from "./usePrinter-B6xQCyL-.js";
|
|
8
|
+
import Me from "./vue-ui-skeleton-BM9rwmxY.js";
|
|
9
|
+
import We from "./vue-ui-accordion-HJPf7My0.js";
|
|
10
|
+
import { u as oe } from "./useNestedProp-BgWkUab_.js";
|
|
11
|
+
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
const Ae = ["id"], He = ["xmlns", "viewBox"], Ue = ["id"], Xe = ["stdDeviation"], Re = ["d", "stroke", "stroke-width"], je = ["d", "stroke", "stroke-width"], qe = ["filter"], Ye = ["d", "stroke", "stroke-width"], Je = ["d", "stroke-width", "onMouseenter", "onClick"], Ke = ["onClick"], Qe = { key: 0 }, Ze = { key: 1 }, et = ["innerHTML"], tt = {
|
|
13
|
+
__name: "vue-ui-galaxy",
|
|
14
|
+
props: {
|
|
15
|
+
config: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default() {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
dataset: {
|
|
22
|
+
type: Array,
|
|
23
|
+
default() {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: ["selectLegend", "selectDatapoint"],
|
|
29
|
+
setup(se, { expose: re, emit: H }) {
|
|
30
|
+
const f = se, { vue_ui_galaxy: ue } = Ce(), _ = v(() => !!f.dataset && f.dataset.length);
|
|
31
|
+
be(() => {
|
|
32
|
+
xe(f.dataset) ? te({
|
|
33
|
+
componentName: "VueUiGalaxy",
|
|
34
|
+
type: "dataset"
|
|
35
|
+
}) : f.dataset.forEach((t, a) => {
|
|
36
|
+
we({
|
|
37
|
+
datasetObject: t,
|
|
38
|
+
requiredAttributes: ["name", "values"]
|
|
39
|
+
}).forEach((l) => {
|
|
40
|
+
te({
|
|
41
|
+
componentName: "VueUiGalaxy",
|
|
42
|
+
type: "datasetSerieAttribute",
|
|
43
|
+
property: l,
|
|
44
|
+
index: a
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
const w = u(le()), E = u(null), ne = u(null), V = u(!1), B = u(""), g = u(null), U = u(0), e = v(() => {
|
|
50
|
+
const t = oe({
|
|
51
|
+
userConfig: f.config,
|
|
52
|
+
defaultConfig: ue
|
|
53
|
+
});
|
|
54
|
+
return t.theme ? {
|
|
55
|
+
...oe({
|
|
56
|
+
userConfig: $e.vue_ui_galaxy[t.theme] || f.config,
|
|
57
|
+
defaultConfig: t
|
|
58
|
+
}),
|
|
59
|
+
customPalette: Te[t.theme] || L
|
|
60
|
+
} : t;
|
|
61
|
+
}), { isPrinting: ie, isImaging: ce, generatePdf: X, generateImage: R } = De({
|
|
62
|
+
elementId: `galaxy_${w.value}`,
|
|
63
|
+
fileName: e.value.style.chart.title.text || "vue-ui-galaxy"
|
|
64
|
+
}), ve = v(() => _e(e.value.customPalette)), p = u({
|
|
65
|
+
dataLabels: {
|
|
66
|
+
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
67
|
+
},
|
|
68
|
+
showTable: e.value.table.show,
|
|
69
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
70
|
+
}), D = u({
|
|
71
|
+
height: 180,
|
|
72
|
+
// or 250 if non fibo
|
|
73
|
+
width: 250
|
|
74
|
+
}), c = u([]);
|
|
75
|
+
function G(t) {
|
|
76
|
+
c.value.includes(t.id) ? c.value = c.value.filter((a) => a !== t.id) : c.value.push(t.id), H("selectLegend", $.value.map((a) => ({
|
|
77
|
+
name: a.name,
|
|
78
|
+
color: a.color,
|
|
79
|
+
value: a.value
|
|
80
|
+
})));
|
|
81
|
+
}
|
|
82
|
+
const m = v(() => f.dataset.map((t, a) => ({
|
|
83
|
+
name: t.name,
|
|
84
|
+
color: Pe(t.color) || ve.value[a] || L[a] || L[a % L.length],
|
|
85
|
+
value: t.values ? t.values.reduce((l, o) => l + o, 0) : 0,
|
|
86
|
+
absoluteValues: t.values || [0],
|
|
87
|
+
id: le(),
|
|
88
|
+
seriesIndex: a
|
|
89
|
+
})).sort((t, a) => a.value - t.value));
|
|
90
|
+
function de() {
|
|
91
|
+
return m.value.map((t) => ({
|
|
92
|
+
name: t.name,
|
|
93
|
+
color: t.color,
|
|
94
|
+
value: t.value
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
const y = v(() => m.value.filter((t) => !c.value.includes(t.id)).map((t) => t.value).reduce((t, a) => t + a, 0)), he = u(190), j = v(() => m.value.filter((t) => !c.value.includes(t.id))), $ = v(() => {
|
|
98
|
+
const t = [];
|
|
99
|
+
for (let a = 0; a < j.value.length; a += 1) {
|
|
100
|
+
const l = j.value[a];
|
|
101
|
+
let o = l.value / y.value * he.value;
|
|
102
|
+
a > 0 && t.length && (o += t[a - 1].points), t.push({
|
|
103
|
+
points: o,
|
|
104
|
+
...l,
|
|
105
|
+
seriesIndex: a,
|
|
106
|
+
proportion: l.value / y.value,
|
|
107
|
+
path: Ne({
|
|
108
|
+
points: o,
|
|
109
|
+
startX: 115 + e.value.style.chart.layout.arcs.offsetX,
|
|
110
|
+
startY: 90 + e.value.style.chart.layout.arcs.offsetY
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return t.filter((a, l) => !c.value.includes(a.id)).toSorted((a, l) => l.points - a.points);
|
|
115
|
+
}), T = u(!1);
|
|
116
|
+
function ge(t) {
|
|
117
|
+
T.value = t, U.value += 1;
|
|
118
|
+
}
|
|
119
|
+
const M = u(null);
|
|
120
|
+
function ye({ datapoint: t, _relativeIndex: a, seriesIndex: l, show: o = !1 }) {
|
|
121
|
+
M.value = {
|
|
122
|
+
datapoint: t,
|
|
123
|
+
seriesIndex: l,
|
|
124
|
+
series: m.value,
|
|
125
|
+
config: e.value
|
|
126
|
+
}, V.value = o, g.value = t.id;
|
|
127
|
+
let s = "";
|
|
128
|
+
const k = e.value.style.chart.tooltip.customFormat;
|
|
129
|
+
ae(k) && Se(() => k({
|
|
130
|
+
seriesIndex: l,
|
|
131
|
+
datapoint: t,
|
|
132
|
+
series: m.value,
|
|
133
|
+
config: e.value
|
|
134
|
+
})) ? B.value = k({
|
|
135
|
+
seriesIndex: l,
|
|
136
|
+
datapoint: t,
|
|
137
|
+
series: m.value,
|
|
138
|
+
config: e.value
|
|
139
|
+
}) : (s += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, s += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (s += `<b>${O({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: t.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.tooltip.roundingValue })}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? s += `<span>(${(t.proportion * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%)</span></div>` : s += `<b>${(t.proportion * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%</b></div>`), B.value = `<div>${s}</div>`);
|
|
140
|
+
}
|
|
141
|
+
const q = v(() => m.value.map((t, a) => ({
|
|
142
|
+
...t,
|
|
143
|
+
proportion: (t.value || 0) / f.dataset.map((l) => (l.values || []).reduce((o, s) => o + s, 0)).reduce((l, o) => l + o, 0),
|
|
144
|
+
opacity: c.value.includes(t.id) ? 0.5 : 1,
|
|
145
|
+
shape: t.shape || "circle",
|
|
146
|
+
segregate: () => G(t),
|
|
147
|
+
isSegregated: c.value.includes(t.id)
|
|
148
|
+
}))), fe = v(() => ({
|
|
149
|
+
cy: "galaxy-div-legend",
|
|
150
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
151
|
+
color: e.value.style.chart.legend.color,
|
|
152
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
153
|
+
paddingBottom: 12,
|
|
154
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
155
|
+
})), b = v(() => {
|
|
156
|
+
const t = $.value.map((l) => ({
|
|
157
|
+
name: l.name,
|
|
158
|
+
color: l.color
|
|
159
|
+
})), a = $.value.map((l) => l.value);
|
|
160
|
+
return { head: t, body: a };
|
|
161
|
+
});
|
|
162
|
+
function Y() {
|
|
163
|
+
ke(() => {
|
|
164
|
+
const t = b.value.head.map((o, s) => [[
|
|
165
|
+
o.name
|
|
166
|
+
], [b.value.body[s]], [isNaN(b.value.body[s] / y.value) ? "-" : b.value.body[s] / y.value * 100]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = Ie(a);
|
|
167
|
+
Le({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-galaxy" });
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
const P = v(() => {
|
|
171
|
+
const t = [
|
|
172
|
+
' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
|
|
173
|
+
O({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: y.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
174
|
+
"100%"
|
|
175
|
+
], a = b.value.head.map((s, k) => {
|
|
176
|
+
const pe = O({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: b.value.body[k], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue });
|
|
177
|
+
return [
|
|
178
|
+
{
|
|
179
|
+
color: s.color,
|
|
180
|
+
name: s.name
|
|
181
|
+
},
|
|
182
|
+
pe,
|
|
183
|
+
isNaN(b.value.body[k] / y.value) ? "-" : (b.value.body[k] / y.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
184
|
+
];
|
|
185
|
+
}), l = {
|
|
186
|
+
th: {
|
|
187
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
188
|
+
color: e.value.table.th.color,
|
|
189
|
+
outline: e.value.table.th.outline
|
|
190
|
+
},
|
|
191
|
+
td: {
|
|
192
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
193
|
+
color: e.value.table.td.color,
|
|
194
|
+
outline: e.value.table.td.outline
|
|
195
|
+
},
|
|
196
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
197
|
+
};
|
|
198
|
+
return {
|
|
199
|
+
colNames: [
|
|
200
|
+
e.value.table.columnNames.series,
|
|
201
|
+
e.value.table.columnNames.value,
|
|
202
|
+
e.value.table.columnNames.percentage
|
|
203
|
+
],
|
|
204
|
+
head: t,
|
|
205
|
+
body: a,
|
|
206
|
+
config: l
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
function J() {
|
|
210
|
+
p.value.showTable = !p.value.showTable;
|
|
211
|
+
}
|
|
212
|
+
function K() {
|
|
213
|
+
p.value.showTooltip = !p.value.showTooltip;
|
|
214
|
+
}
|
|
215
|
+
return re({
|
|
216
|
+
getData: de,
|
|
217
|
+
generatePdf: X,
|
|
218
|
+
generateCsv: Y,
|
|
219
|
+
generateImage: R,
|
|
220
|
+
toggleTable: J,
|
|
221
|
+
toggleTooltip: K
|
|
222
|
+
}), (t, a) => (r(), n("div", {
|
|
223
|
+
ref_key: "galaxyChart",
|
|
224
|
+
ref: E,
|
|
225
|
+
class: N(`vue-ui-galaxy ${T.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
226
|
+
style: F(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`),
|
|
227
|
+
id: `galaxy_${w.value}`
|
|
228
|
+
}, [
|
|
229
|
+
e.value.style.chart.title.text ? (r(), n("div", {
|
|
230
|
+
key: 0,
|
|
231
|
+
style: F(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:24px`)
|
|
232
|
+
}, [
|
|
233
|
+
W(Ee, {
|
|
234
|
+
config: {
|
|
235
|
+
title: {
|
|
236
|
+
cy: "galaxy-div-title",
|
|
237
|
+
...e.value.style.chart.title
|
|
238
|
+
},
|
|
239
|
+
subtitle: {
|
|
240
|
+
cy: "galaxy-div-subtitle",
|
|
241
|
+
...e.value.style.chart.title.subtitle
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}, null, 8, ["config"])
|
|
245
|
+
], 4)) : d("", !0),
|
|
246
|
+
e.value.userOptions.show && _.value ? (r(), S(Ge, {
|
|
247
|
+
ref_key: "details",
|
|
248
|
+
ref: ne,
|
|
249
|
+
key: `user_option_${U.value}`,
|
|
250
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
251
|
+
color: e.value.style.chart.color,
|
|
252
|
+
isPrinting: C(ie),
|
|
253
|
+
isImaging: C(ce),
|
|
254
|
+
uid: w.value,
|
|
255
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
256
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
257
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
258
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
259
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
260
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
261
|
+
isTooltip: p.value.showTooltip,
|
|
262
|
+
isFullscreen: T.value,
|
|
263
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
264
|
+
chartElement: E.value,
|
|
265
|
+
onToggleFullscreen: ge,
|
|
266
|
+
onGeneratePdf: C(X),
|
|
267
|
+
onGenerateCsv: Y,
|
|
268
|
+
onGenerateImage: C(R),
|
|
269
|
+
onToggleTable: J,
|
|
270
|
+
onToggleTooltip: K
|
|
271
|
+
}, me({ _: 2 }, [
|
|
272
|
+
t.$slots.optionTooltip ? {
|
|
273
|
+
name: "optionTooltip",
|
|
274
|
+
fn: i(() => [
|
|
275
|
+
h(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
276
|
+
]),
|
|
277
|
+
key: "0"
|
|
278
|
+
} : void 0,
|
|
279
|
+
t.$slots.optionPdf ? {
|
|
280
|
+
name: "optionPdf",
|
|
281
|
+
fn: i(() => [
|
|
282
|
+
h(t.$slots, "optionPdf", {}, void 0, !0)
|
|
283
|
+
]),
|
|
284
|
+
key: "1"
|
|
285
|
+
} : void 0,
|
|
286
|
+
t.$slots.optionCsv ? {
|
|
287
|
+
name: "optionCsv",
|
|
288
|
+
fn: i(() => [
|
|
289
|
+
h(t.$slots, "optionCsv", {}, void 0, !0)
|
|
290
|
+
]),
|
|
291
|
+
key: "2"
|
|
292
|
+
} : void 0,
|
|
293
|
+
t.$slots.optionImg ? {
|
|
294
|
+
name: "optionImg",
|
|
295
|
+
fn: i(() => [
|
|
296
|
+
h(t.$slots, "optionImg", {}, void 0, !0)
|
|
297
|
+
]),
|
|
298
|
+
key: "3"
|
|
299
|
+
} : void 0,
|
|
300
|
+
t.$slots.optionTable ? {
|
|
301
|
+
name: "optionTable",
|
|
302
|
+
fn: i(() => [
|
|
303
|
+
h(t.$slots, "optionTable", {}, void 0, !0)
|
|
304
|
+
]),
|
|
305
|
+
key: "4"
|
|
306
|
+
} : void 0,
|
|
307
|
+
t.$slots.optionFullscreen ? {
|
|
308
|
+
name: "optionFullscreen",
|
|
309
|
+
fn: i(({ toggleFullscreen: l, isFullscreen: o }) => [
|
|
310
|
+
h(t.$slots, "optionFullscreen", z(A({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
|
|
311
|
+
]),
|
|
312
|
+
key: "5"
|
|
313
|
+
} : void 0
|
|
314
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : d("", !0),
|
|
315
|
+
_.value ? (r(), n("svg", {
|
|
316
|
+
key: 2,
|
|
317
|
+
xmlns: C(Fe),
|
|
318
|
+
class: N({ "vue-data-ui-fullscreen--on": T.value, "vue-data-ui-fulscreen--off": !T.value }),
|
|
319
|
+
viewBox: `0 0 ${D.value.width} ${D.value.height}`,
|
|
320
|
+
style: F(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
321
|
+
}, [
|
|
322
|
+
x("defs", null, [
|
|
323
|
+
x("filter", {
|
|
324
|
+
id: `blur_${w.value}`,
|
|
325
|
+
x: "-50%",
|
|
326
|
+
y: "-50%",
|
|
327
|
+
width: "200%",
|
|
328
|
+
height: "200%"
|
|
329
|
+
}, [
|
|
330
|
+
x("feGaussianBlur", {
|
|
331
|
+
in: "SourceGraphic",
|
|
332
|
+
stdDeviation: 100 / e.value.style.chart.layout.arcs.gradient.intensity
|
|
333
|
+
}, null, 8, Xe)
|
|
334
|
+
], 8, Ue)
|
|
335
|
+
]),
|
|
336
|
+
(r(!0), n(Q, null, Z($.value, (l) => (r(), n("g", null, [
|
|
337
|
+
l.value ? (r(), n("path", {
|
|
338
|
+
key: 0,
|
|
339
|
+
d: l.path,
|
|
340
|
+
fill: "none",
|
|
341
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
342
|
+
"stroke-width": (e.value.style.chart.layout.arcs.strokeWidth + e.value.style.chart.layout.arcs.borderWidth) * (g.value === l.id && e.value.style.chart.layout.arcs.hoverEffect.show ? e.value.style.chart.layout.arcs.hoverEffect.multiplicator : 1),
|
|
343
|
+
"stroke-linecap": "round"
|
|
344
|
+
}, null, 8, Re)) : d("", !0),
|
|
345
|
+
l.value ? (r(), n("path", {
|
|
346
|
+
key: 1,
|
|
347
|
+
d: l.path,
|
|
348
|
+
fill: "none",
|
|
349
|
+
stroke: l.color,
|
|
350
|
+
"stroke-width": e.value.style.chart.layout.arcs.strokeWidth * (g.value === l.id && e.value.style.chart.layout.arcs.hoverEffect.show ? e.value.style.chart.layout.arcs.hoverEffect.multiplicator : 1),
|
|
351
|
+
"stroke-linecap": "round",
|
|
352
|
+
class: N(`${g.value && g.value !== l.id && e.value.useBlurOnHover ? "vue-ui-galaxy-blur" : ""}`)
|
|
353
|
+
}, null, 10, je)) : d("", !0),
|
|
354
|
+
l.value && e.value.style.chart.layout.arcs.gradient.show ? (r(), n("g", {
|
|
355
|
+
key: 2,
|
|
356
|
+
filter: `url(#blur_${w.value})`
|
|
357
|
+
}, [
|
|
358
|
+
x("path", {
|
|
359
|
+
d: l.path,
|
|
360
|
+
fill: "none",
|
|
361
|
+
stroke: e.value.style.chart.layout.arcs.gradient.color,
|
|
362
|
+
"stroke-width": e.value.style.chart.layout.arcs.strokeWidth / 2 * (g.value === l.id && e.value.style.chart.layout.arcs.hoverEffect.show ? e.value.style.chart.layout.arcs.hoverEffect.multiplicator : 1),
|
|
363
|
+
"stroke-linecap": "round",
|
|
364
|
+
class: N(`vue-ui-galaxy-gradient ${g.value && g.value !== l.id && e.value.useBlurOnHover ? "vue-ui-galaxy-blur" : ""}`)
|
|
365
|
+
}, null, 10, Ye)
|
|
366
|
+
], 8, qe)) : d("", !0)
|
|
367
|
+
]))), 256)),
|
|
368
|
+
(r(!0), n(Q, null, Z($.value, (l, o) => (r(), n("g", null, [
|
|
369
|
+
l.value ? (r(), n("path", {
|
|
370
|
+
key: 0,
|
|
371
|
+
d: l.path,
|
|
372
|
+
fill: "none",
|
|
373
|
+
stroke: "transparent",
|
|
374
|
+
"stroke-width": e.value.style.chart.layout.arcs.strokeWidth + e.value.style.chart.layout.arcs.borderWidth,
|
|
375
|
+
"stroke-linecap": "round",
|
|
376
|
+
onMouseenter: (s) => ye({
|
|
377
|
+
datapoint: l,
|
|
378
|
+
relativeIndex: o,
|
|
379
|
+
seriesIndex: l.seriesIndex,
|
|
380
|
+
show: !0
|
|
381
|
+
}),
|
|
382
|
+
onMouseleave: a[0] || (a[0] = (s) => {
|
|
383
|
+
V.value = !1, g.value = null;
|
|
384
|
+
}),
|
|
385
|
+
onClick: (s) => H("selectDatapoint", l)
|
|
386
|
+
}, null, 40, Je)) : d("", !0)
|
|
387
|
+
]))), 256)),
|
|
388
|
+
h(t.$slots, "svg", { svg: D.value }, void 0, !0)
|
|
389
|
+
], 14, He)) : d("", !0),
|
|
390
|
+
_.value ? d("", !0) : (r(), S(Me, {
|
|
391
|
+
key: 3,
|
|
392
|
+
config: {
|
|
393
|
+
type: "galaxy",
|
|
394
|
+
style: {
|
|
395
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
396
|
+
galaxy: {
|
|
397
|
+
color: "#CCCCCC"
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}, null, 8, ["config"])),
|
|
402
|
+
e.value.style.chart.legend.show ? (r(), S(Oe, {
|
|
403
|
+
key: 4,
|
|
404
|
+
legendSet: q.value,
|
|
405
|
+
config: fe.value,
|
|
406
|
+
onClickMarker: a[1] || (a[1] = ({ legend: l }) => G(l))
|
|
407
|
+
}, {
|
|
408
|
+
item: i(({ legend: l, index: o }) => [
|
|
409
|
+
x("div", {
|
|
410
|
+
onClick: (s) => G(l),
|
|
411
|
+
style: F(`opacity:${c.value.includes(l.id) ? 0.5 : 1}`)
|
|
412
|
+
}, [
|
|
413
|
+
ee(I(l.name) + ": " + I(C(O)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: l.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.legend.roundingValue })) + " ", 1),
|
|
414
|
+
c.value.includes(l.id) ? (r(), n("span", Ze, " ( - % ) ")) : (r(), n("span", Qe, " (" + I(isNaN(l.value / y.value) ? "-" : (l.value / y.value * 100).toFixed(e.value.style.chart.legend.roundingPercentage)) + "%) ", 1))
|
|
415
|
+
], 12, Ke)
|
|
416
|
+
]),
|
|
417
|
+
_: 1
|
|
418
|
+
}, 8, ["legendSet", "config"])) : d("", !0),
|
|
419
|
+
h(t.$slots, "legend", { legend: q.value }, void 0, !0),
|
|
420
|
+
W(Ve, {
|
|
421
|
+
show: p.value.showTooltip && V.value,
|
|
422
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
423
|
+
color: e.value.style.chart.tooltip.color,
|
|
424
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
425
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
426
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
427
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
428
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
429
|
+
parent: E.value,
|
|
430
|
+
content: B.value,
|
|
431
|
+
isCustom: C(ae)(e.value.style.chart.tooltip.customFormat)
|
|
432
|
+
}, {
|
|
433
|
+
"tooltip-before": i(() => [
|
|
434
|
+
h(t.$slots, "tooltip-before", z(A({ ...M.value })), void 0, !0)
|
|
435
|
+
]),
|
|
436
|
+
"tooltip-after": i(() => [
|
|
437
|
+
h(t.$slots, "tooltip-after", z(A({ ...M.value })), void 0, !0)
|
|
438
|
+
]),
|
|
439
|
+
_: 3
|
|
440
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
|
|
441
|
+
_.value ? (r(), S(We, {
|
|
442
|
+
key: 5,
|
|
443
|
+
hideDetails: "",
|
|
444
|
+
config: {
|
|
445
|
+
open: p.value.showTable,
|
|
446
|
+
maxHeight: 1e4,
|
|
447
|
+
body: {
|
|
448
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
449
|
+
color: e.value.style.chart.color
|
|
450
|
+
},
|
|
451
|
+
head: {
|
|
452
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
453
|
+
color: e.value.style.chart.color
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}, {
|
|
457
|
+
content: i(() => [
|
|
458
|
+
W(Be, {
|
|
459
|
+
colNames: P.value.colNames,
|
|
460
|
+
head: P.value.head,
|
|
461
|
+
body: P.value.body,
|
|
462
|
+
config: P.value.config,
|
|
463
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
464
|
+
onClose: a[2] || (a[2] = (l) => p.value.showTable = !1)
|
|
465
|
+
}, {
|
|
466
|
+
th: i(({ th: l }) => [
|
|
467
|
+
x("div", {
|
|
468
|
+
innerHTML: l,
|
|
469
|
+
style: { display: "flex", "align-items": "center" }
|
|
470
|
+
}, null, 8, et)
|
|
471
|
+
]),
|
|
472
|
+
td: i(({ td: l }) => [
|
|
473
|
+
ee(I(l.name || l), 1)
|
|
474
|
+
]),
|
|
475
|
+
_: 1
|
|
476
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
477
|
+
]),
|
|
478
|
+
_: 1
|
|
479
|
+
}, 8, ["config"])) : d("", !0)
|
|
480
|
+
], 14, Ae));
|
|
481
|
+
}
|
|
482
|
+
}, ht = /* @__PURE__ */ ze(tt, [["__scopeId", "data-v-53c416de"]]);
|
|
483
|
+
export {
|
|
484
|
+
ht as default
|
|
485
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-p5gfZSvB.cjs"),K=require("./Legend-D59FIuMs.cjs"),Q=require("./Title-Bb-A5OSV.cjs"),Z=require("./Tooltip-C_UE6y-E.cjs"),ee=require("./DataTable-Rm9II-m2.cjs"),O=require("./usePrinter-fZlsJid8.cjs"),te=require("./vue-ui-skeleton-sjfOtCZr.cjs"),le=require("./vue-ui-accordion-C_pwrAJl.cjs"),z=require("./useNestedProp-2kIU-7On.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],ne=["id"],ue=["stdDeviation"],se=["d","stroke","stroke-width"],ie=["d","stroke","stroke-width"],ce=["filter"],de=["d","stroke","stroke-width"],ve=["d","stroke-width","onMouseenter","onClick"],he=["onClick"],pe={key:0},ge={key:1},ye=["innerHTML"],fe={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(D,{expose:q,emit:B}){const d=D,{vue_ui_galaxy:G}=r.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):d.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})});const y=e.ref(r.createUid()),C=e.ref(null),M=e.ref(null),x=e.ref(!1),w=e.ref(""),i=e.ref(null),S=e.ref(0),t=e.computed(()=>{const l=z.useNestedProp({userConfig:d.config,defaultConfig:G});return l.theme?{...z.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:W,isImaging:U,generatePdf:_,generateImage:P}=O.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),A=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),s=e.ref([]);function T(l){s.value.includes(l.id)?s.value=s.value.filter(a=>a!==l.id):s.value.push(l.id),B("selectLegend",f.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>d.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||A.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?l.values.reduce((o,n)=>o+n,0):0,absoluteValues:l.values||[0],id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function H(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const c=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),R=e.ref(190),E=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id))),f=e.computed(()=>{const l=[];for(let a=0;a<E.value.length;a+=1){const o=E.value[a];let n=o.value/c.value*R.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/c.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!s.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function X(l){m.value=l,S.value+=1}const N=e.ref(null);function j({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},x.value=n,i.value=l.id;let u="";const g=t.value.style.chart.tooltip.customFormat;r.isFunction(g)&&r.functionReturnsString(()=>g({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?w.value=g({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),w.value=`<div>${u}</div>`)}const V=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/d.dataset.map(o=>(o.values||[]).reduce((n,u)=>n+u,0)).reduce((o,n)=>o+n,0),opacity:s.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:s.value.includes(l.id)}))),Y=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=f.value.map(o=>({name:o.name,color:o.color})),a=f.value.map(o=>o.value);return{head:l,body:a}});function F(){e.nextTick(()=>{const l=h.value.head.map((n,u)=>[[n.name],[h.value.body[u]],[isNaN(h.value.body[u]/c.value)?"-":h.value.body[u]/c.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:c.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((u,g)=>{const J=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[g],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},J,isNaN(h.value.body[g]/c.value)?"-":(h.value.body[g]/c.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function L(){v.value.showTable=!v.value.showTable}function I(){v.value.showTooltip=!v.value.showTooltip}return q({getData:H,generatePdf:_,generateCsv:F,generateImage:P,toggleTable:L,toggleTooltip:I}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Q._sfc_main,{config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(O.UserOptions,{ref_key:"details",ref:M,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(W),isImaging:e.unref(U),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:X,onGeneratePdf:e.unref(_),onGenerateCsv:F,onGenerateImage:e.unref(P),onToggleTable:L,onToggleTooltip:I},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:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,ue)],8,ne)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,se)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ie)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,de)],8,ce)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:u=>j({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,i.value=null}),onClick:u=>B("selectDatapoint",o)},null,40,ve)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:3,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(K.Legend,{key:4,legendSet:V.value,config:Y.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:u=>T(o),style:e.normalizeStyle(`opacity:${s.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),s.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",ge," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",pe," ("+e.toDisplayString(isNaN(o.value/c.value)?"-":(o.value/c.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,he)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:V.value},void 0,!0),e.createVNode(Z._sfc_main,{show:v.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:C.value,content:w.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(le.default,{key:5,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ee.DataTable,{colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ye)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ae))}},me=oe._export_sfc(fe,[["__scopeId","data-v-53c416de"]]);exports.default=me;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-p5gfZSvB.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),I=require("./usePrinter-fZlsJid8.cjs"),T=require("./vue-ui-skeleton-sjfOtCZr.cjs"),O=require("./useNestedProp-2kIU-7On.cjs"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z=["id"],J=["xmlns","viewBox"],K=["id"],Q=["stop-color"],ee=["stop-color"],te=["stop-color"],ae=["id"],le=["stdDeviation"],oe=["d","fill","stroke"],re=["d","filter"],ne=["y","width","height","fill"],se=["x","y","text-anchor","font-size","font-weight","fill"],ue=["x","y","font-size","font-weight","fill"],ie={key:1},ce=["x1","y1","x2","y2","stroke","stroke-width"],de=["x1","y1","x2","y2","stroke","stroke-width"],ve=["x1","y1","x2","y2","stroke-width","filter"],he={key:2},ye=["d","fill","stroke","stroke-width"],fe=["cx","cy","fill","r","stroke-width","stroke"],me=["x","y","font-size","fill"],pe={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(_,{expose:X}){const u=_,{vue_ui_gauge:D}=r.useConfig(),b=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),h=e.ref(r.createUid()),Y=e.ref(null),C=e.ref(0),x=e.ref(null),N=e.ref(null),$=e.ref(null),t=e.computed(()=>{const o=O.useNestedProp({userConfig:u.config,defaultConfig:D});return o.theme?{...O.useNestedProp({userConfig:r.themes.vue_ui_gauge[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}),{isPrinting:G,isImaging:R,generatePdf:B,generateImage:E}=I.usePrinter({elementId:`vue-ui-gauge_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),j=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=e.computed(()=>{if(!b.value||r.objectIsEmpty(u.dataset.series||{}))return{value:0,series:[{from:0,to:1}]};const o=[];(u.dataset.series||[]).forEach(l=>{o.push(l.from||0),o.push(l.to||0)});const n=Math.max(...o);return{...u.dataset,series:(u.dataset.series||[]).map((l,i)=>({...l,color:r.convertColorToHex(l.color)||j.value[i]||r.palette[i],value:((l.to||0)-(l.from||0))/n*100}))}}),d=e.ref(512),a=e.ref({height:358.4,width:d.value,top:0,bottom:358.4,centerX:179.2,centerY:d.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3}),g=e.ref(0),m=e.ref(0),v=e.ref(t.value.style.chart.animation.use?0:u.dataset.value);e.watch(()=>u.dataset.value,()=>{v.value=t.value.style.chart.animation.use?0:u.dataset.value,M()});const c=e.computed(()=>{const o=a.value.width/2,n=s.value.base,l=Math.PI*((v.value+0-m.value)/(g.value-m.value))+Math.PI;return{x1:o,y1:n,x2:o+s.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),y2:n+s.value.pointerSize*a.value.pointerSize*.9*Math.sin(l)}}),P=e.computed(()=>{const o=a.value.width/2,n=s.value.base,l=Math.PI*((v.value+0-m.value)/(g.value-m.value))+Math.PI,i=o+s.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),z=n+s.value.pointerSize*a.value.pointerSize*.9*Math.sin(l),y=a.value.pointerRadius,w=o+y*Math.cos(l+Math.PI/2),L=n+y*Math.sin(l+Math.PI/2),U=o+y*Math.cos(l-Math.PI/2),W=n+y*Math.sin(l-Math.PI/2);return isNaN(i)?null:`M ${i},${z} ${w},${L} ${U},${W} Z`}),F=e.computed(()=>{for(let o=0;o<f.value.series.length;o+=1){const{color:n,from:l,to:i}=f.value.series[o];if(v.value>=l&&v.value<=i)return n}return"#2D353C"}),S=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)?r.error({componentName:"VueUiGauge",type:"dataset"}):(r.getMissingDatasetAttributes({datasetObject:u.dataset,requiredAttributes:["value","series"]}).forEach(o=>{r.error({componentName:"VueUiGauge",type:"datasetAttribute",property:o})}),Object.hasOwn(u.dataset,"series")&&(u.dataset.series.length?u.dataset.series.forEach((o,n)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["from","to"]}).forEach(l=>{r.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:l,index:n})})}):r.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),M(),t.value.responsive){const o=V.throttle(()=>{const{width:n,height:l}=V.useResponsive({chart:x.value,title:t.value.style.chart.title.text?N.value:null,legend:$.value});a.value.width=n,a.value.height=l,a.value.centerX=n/2,a.value.centerY=d.value/2/358.4*l,a.value.bottom=l,a.value.labelFontSize=18/d.value*Math.min(l,n)<10?10:18/d.value*Math.min(l,n),a.value.legendFontSize=t.value.style.chart.legend.fontSize/d.value*Math.min(l,n)<14?14:t.value.style.chart.legend.fontSize/d.value*Math.min(l,n),a.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/d.value*Math.min(l,n),a.value.trackSize=t.value.style.chart.layout.track.size/d.value*Math.min(l,n),a.value.pointerStrokeWidth=r.translateSize({relator:Math.min(n,l),adjuster:d.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),a.value.markerOffset=r.translateSize({relator:Math.max(n,l),adjuster:d.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2})});S.value=new ResizeObserver(o),S.value.observe(x.value.parentNode)}}),e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});function M(){const o=[];(f.value.series||[]).forEach(w=>{o.push(w.from||0),o.push(w.to||0)}),g.value=Math.max(...o),m.value=Math.min(...o);const n=String(g.value).length;let l=0,i=(n>2?.01:.001)*t.value.style.chart.animation.speed,z=(n>2?.05:.005)*t.value.style.chart.animation.acceleration;function y(){v.value+=i+l,l+=z,v.value<u.dataset.value?requestAnimationFrame(y):v.value=u.dataset.value}t.value.style.chart.animation.use&&(v.value=m.value,y())}const s=e.computed(()=>{const o=t.value.responsive?Math.min(a.value.width,a.value.height):a.value.width;return{arcs:o/2.5,gradients:o/2.75,base:t.value.responsive?a.value.height/2:a.value.height*.7,ratingBase:t.value.responsive?a.value.height/2+a.value.height/4:a.value.height*.9,pointerSize:t.value.responsive?Math.min(a.value.width,a.value.height)/3:a.value.width/3.2}}),p=e.computed(()=>r.makeDonut({series:f.value.series},a.value.width/2,s.value.base,s.value.arcs,s.value.arcs,1,1,1,180,109.9495,40*a.value.trackSize)),A=e.computed(()=>r.makeDonut({series:f.value.series},a.value.width/2,s.value.base,s.value.gradients,s.value.gradients,1,1,1,180,109.9495,2*a.value.trackSize)),k=e.ref(!1);function q(o){k.value=o,C.value+=1}return X({generatePdf:B,generateImage:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:x,id:`vue-ui-gauge_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:N,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px;${t.value.userOptions.show?"padding-top:36px":""}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.color};font-size:${t.value.style.chart.title.fontSize}px;font-weight:${t.value.style.chart.title.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.title.text),5),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.subtitle.color};font-size:${t.value.style.chart.title.subtitle.fontSize}px;font-weight:${t.value.style.chart.title.subtitle.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.title.subtitle.text),5)):e.createCommentVNode("",!0),isNaN(_.dataset.base)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.subtitle.color};font-size:${t.value.style.chart.title.subtitle.fontSize}px;font-weight:${t.value.style.chart.title.subtitle.bold?"bold":""}`)},e.toDisplayString(t.value.translations.base)+" : "+e.toDisplayString(_.dataset.base),5))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(I.UserOptions,{ref_key:"details",ref:Y,key:`user_options_${C.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(G),uid:h.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,onToggleFullscreen:q,onGeneratePdf:e.unref(B),onGenerateImage:e.unref(E)},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${h.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,Q),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(r.opacity)[t.value.style.chart.layout.track.gradientIntensity]}`},null,8,ee),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,te)],8,K)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,le)],8,ae)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:l.arcSlice,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,oe))),128)),t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:l.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${h.value})`},null,8,re))),128)),e.createElementVNode("rect",{x:0,y:s.value.base,width:a.value.width<=0?1e-4:a.value.width,height:a.value.height*.3<=0?1e-4:a.value.height*.3,fill:t.value.style.chart.backgroundColor},null,8,ne)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).y,"text-anchor":l.center.startX<a.value.width/2-5?"end":l.center.startX>a.value.width/2+5?"start":"middle","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(l.from.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,se))),256)),e.createElementVNode("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:p.value.at(-1).endX,initY:p.value.at(-1).endY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:p.value.at(-1).endX,initY:p.value.at(-1).endY,offset:a.value.markerOffset}).y,"text-anchor":"start","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(g.value.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,ue),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",ie,[isNaN(c.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":a.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,ce)),isNaN(c.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.7},null,8,de)),!isNaN(c.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.3,filter:`url(#blur_${h.value})`},null,8,ve)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",he,[P.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:P.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,ye)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:a.value.width/2,cy:s.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:a.value.pointerRadius<=0?1e-4:a.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,fe),e.createElementVNode("text",{x:a.value.width/2,y:s.value.ratingBase,"text-anchor":"middle","font-size":a.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(t.value.style.chart.legend.prefix)+" "+e.toDisplayString(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":"")+e.toDisplayString(v.value.toFixed(t.value.style.chart.legend.roundingValue))+" "+e.toDisplayString(t.value.style.chart.legend.suffix),9,me),e.renderSlot(o.$slots,"svg",{svg:a.value},void 0,!0)],14,J)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T.default,{key:3,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:$},[e.renderSlot(o.$slots,"legend",{legend:f.value},void 0,!0)],512)],14,Z))}},ge=H._export_sfc(pe,[["__scopeId","data-v-a862b4a9"]]);exports.default=ge;
|