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,618 @@
|
|
|
1
|
+
import { computed as d, ref as c, onMounted as Te, onBeforeUnmount as Le, openBlock as s, createElementBlock as i, normalizeClass as O, normalizeStyle as V, createVNode as q, createCommentVNode as v, createBlock as B, unref as m, createSlots as Se, withCtx as y, renderSlot as g, normalizeProps as Y, guardReactiveProps as K, Fragment as b, renderList as C, createElementVNode as x, toDisplayString as $, mergeProps as Pe, createTextVNode as ze, nextTick as Ae } from "vue";
|
|
2
|
+
import { u as Ne, c as Q, t as Oe, a as Fe, p as T, o as We, e as Z, g as ve, b as Me, d as he, z as Ie, f as H, X as De, l as Ge, h as Ee, v as de, w as Ve, n as Be, q as He, B as Re } from "./index-uOtklCCx.js";
|
|
3
|
+
import { t as Ue, u as Xe } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { _ as je } from "./Title-2iks1ziC.js";
|
|
5
|
+
import { u as Je, U as qe } from "./usePrinter-B6xQCyL-.js";
|
|
6
|
+
import { _ as Ye } from "./Tooltip-C3phqKuU.js";
|
|
7
|
+
import { D as Ke } from "./DataTable-CwaOlAsy.js";
|
|
8
|
+
import Qe from "./vue-ui-skeleton-BM9rwmxY.js";
|
|
9
|
+
import { _ as Ze } from "./Shape-CjLV0scA.js";
|
|
10
|
+
import et from "./vue-ui-accordion-HJPf7My0.js";
|
|
11
|
+
import { u as pe } from "./useNestedProp-BgWkUab_.js";
|
|
12
|
+
import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
const lt = ["id"], at = ["xmlns", "viewBox"], ot = { key: 0 }, st = { key: 0 }, rt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ut = { key: 1 }, it = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], nt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ct = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], vt = ["x", "y", "fill", "font-size"], ht = ["x", "y", "font-size", "fill"], dt = ["fill", "font-size", "transform"], pt = ["fill", "font-size", "x", "y"], yt = ["x1", "x2", "y1", "y2", "stroke"], ft = ["cx", "cy", "fill"], bt = ["cx", "cy", "fill"], mt = ["id"], gt = ["stop-color"], xt = ["stop-color"], kt = ["stop-color"], Ct = { key: 0 }, wt = ["x", "y", "font-size", "fill"], _t = ["innerHTML"], $t = {
|
|
14
|
+
__name: "vue-ui-strip-plot",
|
|
15
|
+
props: {
|
|
16
|
+
config: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default() {
|
|
19
|
+
return {};
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
dataset: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default() {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
emits: ["selectDatapoint"],
|
|
30
|
+
setup(ye, { expose: fe, emit: be }) {
|
|
31
|
+
const f = ye, { vue_ui_strip_plot: me } = Ne(), w = d({
|
|
32
|
+
get() {
|
|
33
|
+
return !!f.dataset && f.dataset.length;
|
|
34
|
+
},
|
|
35
|
+
set(t) {
|
|
36
|
+
return t;
|
|
37
|
+
}
|
|
38
|
+
}), R = c(Q()), ee = c(0), U = c(!1), X = c(""), P = c(null), te = c(null), le = c(!1), e = d(() => {
|
|
39
|
+
const t = pe({
|
|
40
|
+
userConfig: f.config,
|
|
41
|
+
defaultConfig: me
|
|
42
|
+
});
|
|
43
|
+
return t.theme ? {
|
|
44
|
+
...pe({
|
|
45
|
+
userConfig: Oe.vue_ui_strip_plot[t.theme] || f.config,
|
|
46
|
+
defaultConfig: t
|
|
47
|
+
}),
|
|
48
|
+
customPalette: Fe[t.theme] || T
|
|
49
|
+
} : t;
|
|
50
|
+
}), F = c(null);
|
|
51
|
+
Te(() => {
|
|
52
|
+
if (We(f.dataset) ? Z({
|
|
53
|
+
componentName: "VueUiStripPlot",
|
|
54
|
+
type: "dataset"
|
|
55
|
+
}) : f.dataset.forEach((t, o) => {
|
|
56
|
+
ve({
|
|
57
|
+
datasetObject: t,
|
|
58
|
+
requiredAttributes: ["name", "plots"]
|
|
59
|
+
}).forEach((l) => {
|
|
60
|
+
w.value = !1, Z({
|
|
61
|
+
componentName: "VueUiStripPlot",
|
|
62
|
+
type: "datasetSerieAttribute",
|
|
63
|
+
property: l,
|
|
64
|
+
index: o
|
|
65
|
+
});
|
|
66
|
+
}), t.plots && t.plots.forEach((l, r) => {
|
|
67
|
+
ve({
|
|
68
|
+
datasetObject: l,
|
|
69
|
+
requiredAttributes: ["name", "value"]
|
|
70
|
+
}).forEach((u) => {
|
|
71
|
+
w.value = !1, Z({
|
|
72
|
+
componentName: "VueUiStripPlot",
|
|
73
|
+
type: "datasetSerieAttribute",
|
|
74
|
+
property: u,
|
|
75
|
+
index: `${o},${r}`
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}), e.value.responsive) {
|
|
80
|
+
const t = Ue(() => {
|
|
81
|
+
const { width: o, height: l } = Xe({
|
|
82
|
+
chart: P.value,
|
|
83
|
+
title: e.value.style.chart.title.text ? te.value : null
|
|
84
|
+
});
|
|
85
|
+
W.value = l, L.value.width = o, L.value.height = l, A.value = (o - p.value.left - p.value.right) / f.dataset.length, M.value = Re({
|
|
86
|
+
relator: Math.min(l, o),
|
|
87
|
+
adjuster: 600,
|
|
88
|
+
source: e.value.style.chart.plots.radius,
|
|
89
|
+
threshold: 6,
|
|
90
|
+
fallback: 6
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
F.value = new ResizeObserver(t), F.value.observe(P.value.parentNode);
|
|
94
|
+
}
|
|
95
|
+
le.value = !0, setTimeout(() => {
|
|
96
|
+
z.value = !1;
|
|
97
|
+
}, ke.value * 50);
|
|
98
|
+
}), Le(() => {
|
|
99
|
+
F.value && F.value.disconnect();
|
|
100
|
+
});
|
|
101
|
+
const { isPrinting: ge, isImaging: xe, generatePdf: ae, generateImage: oe } = Je({
|
|
102
|
+
elementId: `strip-plot_${R.value}`,
|
|
103
|
+
fileName: e.value.style.chart.title.text || "vue-ui-strip-plot"
|
|
104
|
+
}), se = d(() => Me(e.value.customPalette)), z = c(e.value.useCssAnimation), h = c({
|
|
105
|
+
showTable: e.value.table.show,
|
|
106
|
+
dataLabels: {
|
|
107
|
+
show: e.value.style.chart.labels.bestPlotLabel.show
|
|
108
|
+
},
|
|
109
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
110
|
+
}), p = c({
|
|
111
|
+
top: e.value.style.chart.padding.top,
|
|
112
|
+
bottom: e.value.style.chart.padding.bottom,
|
|
113
|
+
left: e.value.style.chart.padding.left,
|
|
114
|
+
right: e.value.style.chart.padding.right
|
|
115
|
+
}), A = c(e.value.style.chart.stripWidth), W = c(e.value.style.chart.height), M = c(e.value.style.chart.plots.radius), L = c({
|
|
116
|
+
width: A.value * f.dataset.length + p.value.left + p.value.right,
|
|
117
|
+
height: e.value.style.chart.height
|
|
118
|
+
}), a = d(() => {
|
|
119
|
+
const t = A.value * f.dataset.length + p.value.left + p.value.right;
|
|
120
|
+
return {
|
|
121
|
+
left: p.value.left,
|
|
122
|
+
right: t - p.value.right,
|
|
123
|
+
top: p.value.top,
|
|
124
|
+
bottom: W.value - p.value.bottom,
|
|
125
|
+
width: A.value * f.dataset.length,
|
|
126
|
+
height: W.value - p.value.top - p.value.bottom,
|
|
127
|
+
stripWidth: A.value,
|
|
128
|
+
absoluteHeight: W.value,
|
|
129
|
+
absoluteWidth: t
|
|
130
|
+
};
|
|
131
|
+
}), I = d(() => w.value ? f.dataset.map((t, o) => {
|
|
132
|
+
const l = Q();
|
|
133
|
+
return {
|
|
134
|
+
...t,
|
|
135
|
+
id: l,
|
|
136
|
+
color: t.color ? he(t.color) : se.value[o] || T[o] || T[o % T.length],
|
|
137
|
+
plots: t.plots.map((r) => ({
|
|
138
|
+
...r,
|
|
139
|
+
parentId: l,
|
|
140
|
+
color: t.color ? he(t.color) : se.value[o] || T[o] || T[o % T.length],
|
|
141
|
+
id: Q()
|
|
142
|
+
})).sort((r, u) => r.value - u.value)
|
|
143
|
+
};
|
|
144
|
+
}) : null), k = d(() => (I.value || []).map((t, o) => ({
|
|
145
|
+
...t,
|
|
146
|
+
plots: t.plots.map((l) => ({
|
|
147
|
+
...l,
|
|
148
|
+
x: a.value.left + (o + 1) * a.value.stripWidth - a.value.stripWidth / 2
|
|
149
|
+
}))
|
|
150
|
+
}))), ke = d(() => Math.max(...k.value.map((t) => t.plots.length))), j = d(() => {
|
|
151
|
+
const t = k.value.flatMap((o) => o.plots.map((l) => l.value));
|
|
152
|
+
return {
|
|
153
|
+
max: Math.max(...t),
|
|
154
|
+
min: Math.min(...t)
|
|
155
|
+
};
|
|
156
|
+
}), _ = d(() => Ie(j.value.min < 0 ? j.value.min : 0, j.value.max, e.value.style.chart.grid.scaleSteps)), Ce = d(() => (k.value || []).map((t, o) => ({
|
|
157
|
+
...t,
|
|
158
|
+
plots: t.plots.map((l) => ({
|
|
159
|
+
...l,
|
|
160
|
+
y: a.value.bottom - (l.value + Math.abs(_.value.min)) / (_.value.max + Math.abs(_.value.min)) * a.value.height
|
|
161
|
+
}))
|
|
162
|
+
}))), re = d(() => _.value.ticks.map((t) => ({
|
|
163
|
+
y: a.value.bottom - a.value.height * ((t + Math.abs(_.value.min)) / (_.value.max + Math.abs(_.value.min))),
|
|
164
|
+
x1: a.value.left,
|
|
165
|
+
x2: a.value.right,
|
|
166
|
+
value: t
|
|
167
|
+
}))), J = c(null), n = c(null);
|
|
168
|
+
function we({ datapoint: t, seriesIndex: o }) {
|
|
169
|
+
J.value = { datapoint: t, seriesIndex: o, config: e.value, series: I.value }, U.value = !0, n.value = t;
|
|
170
|
+
const l = e.value.style.chart.tooltip.customFormat;
|
|
171
|
+
if (de(l) && Ve(() => l({
|
|
172
|
+
seriesIndex: o,
|
|
173
|
+
datapoint: t,
|
|
174
|
+
series: I.value,
|
|
175
|
+
config: e.value
|
|
176
|
+
})))
|
|
177
|
+
X.value = l({
|
|
178
|
+
seriesIndex: o,
|
|
179
|
+
datapoint: t,
|
|
180
|
+
series: I.value,
|
|
181
|
+
config: e.value
|
|
182
|
+
});
|
|
183
|
+
else {
|
|
184
|
+
let r = "";
|
|
185
|
+
r += `<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="${e.value.style.chart.plots.gradient.show ? `url(#${t.parentId})` : t.color}"/></svg>${t.name}</div>`, r += `<div>${H({
|
|
186
|
+
p: e.value.style.chart.labels.prefix,
|
|
187
|
+
v: t.value,
|
|
188
|
+
s: e.value.style.chart.labels.suffix,
|
|
189
|
+
r: e.value.style.chart.tooltip.roundingValue
|
|
190
|
+
})}</div>`, X.value = `<div>${r}</div>`;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
const D = d(() => {
|
|
194
|
+
const t = k.value.flatMap((l) => JSON.parse(JSON.stringify(l.plots)).sort((r, u) => u.value - r.value).map((r) => ({
|
|
195
|
+
name: `${l.name} - ${r.name}`,
|
|
196
|
+
color: r.color
|
|
197
|
+
}))), o = k.value.flatMap((l) => JSON.parse(JSON.stringify(l.plots)).sort((r, u) => u.value - r.value).map((r) => r.value));
|
|
198
|
+
return { head: t, body: o };
|
|
199
|
+
});
|
|
200
|
+
function ue() {
|
|
201
|
+
Ae(() => {
|
|
202
|
+
const t = D.value.head.map((r, u) => [[
|
|
203
|
+
r.name
|
|
204
|
+
], [D.value.body[u]]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[e.value.table.columnNames.series], [e.value.table.columnNames.value]]].concat(t), l = Be(o);
|
|
205
|
+
He({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-strip-plot" });
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
const G = d(() => {
|
|
209
|
+
const t = [
|
|
210
|
+
e.value.table.columnNames.series,
|
|
211
|
+
e.value.table.columnNames.value
|
|
212
|
+
], o = D.value.head.map((u, S) => {
|
|
213
|
+
const E = H({
|
|
214
|
+
p: e.value.style.chart.labels.prefix,
|
|
215
|
+
v: D.value.body[S],
|
|
216
|
+
s: e.value.style.chart.labels.suffix,
|
|
217
|
+
r: e.value.table.td.roundingValue
|
|
218
|
+
});
|
|
219
|
+
return [
|
|
220
|
+
{
|
|
221
|
+
color: u.color,
|
|
222
|
+
name: u.name
|
|
223
|
+
},
|
|
224
|
+
E
|
|
225
|
+
];
|
|
226
|
+
}), l = {
|
|
227
|
+
th: {
|
|
228
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
229
|
+
color: e.value.table.th.color,
|
|
230
|
+
outline: e.value.table.th.outline
|
|
231
|
+
},
|
|
232
|
+
td: {
|
|
233
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
234
|
+
color: e.value.table.td.color,
|
|
235
|
+
outline: e.value.table.td.outline
|
|
236
|
+
},
|
|
237
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
238
|
+
};
|
|
239
|
+
return {
|
|
240
|
+
colNames: [
|
|
241
|
+
e.value.table.columnNames.series,
|
|
242
|
+
e.value.table.columnNames.value
|
|
243
|
+
],
|
|
244
|
+
head: t,
|
|
245
|
+
body: o,
|
|
246
|
+
config: l
|
|
247
|
+
};
|
|
248
|
+
}), N = c(!1);
|
|
249
|
+
function _e(t) {
|
|
250
|
+
N.value = t, ee.value += 1;
|
|
251
|
+
}
|
|
252
|
+
function $e() {
|
|
253
|
+
return k.value;
|
|
254
|
+
}
|
|
255
|
+
function ie() {
|
|
256
|
+
h.value.showTable = !h.value.showTable;
|
|
257
|
+
}
|
|
258
|
+
function ne() {
|
|
259
|
+
h.value.dataLabels.show = !h.value.dataLabels.show;
|
|
260
|
+
}
|
|
261
|
+
function ce() {
|
|
262
|
+
h.value.showTooltip = !h.value.showTooltip;
|
|
263
|
+
}
|
|
264
|
+
return fe({
|
|
265
|
+
getData: $e,
|
|
266
|
+
generatePdf: ae,
|
|
267
|
+
generateCsv: ue,
|
|
268
|
+
generateImage: oe,
|
|
269
|
+
toggleTable: ie,
|
|
270
|
+
toggleLabels: ne,
|
|
271
|
+
toggleTooltip: ce
|
|
272
|
+
}), (t, o) => (s(), i("div", {
|
|
273
|
+
ref_key: "stripPlotChart",
|
|
274
|
+
ref: P,
|
|
275
|
+
class: O(`vue-ui-strip-plot ${N.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
276
|
+
style: V(`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};${e.value.responsive ? "height:100%" : ""}`),
|
|
277
|
+
id: `strip-plot_${R.value}`
|
|
278
|
+
}, [
|
|
279
|
+
e.value.style.chart.title.text ? (s(), i("div", {
|
|
280
|
+
key: 0,
|
|
281
|
+
ref_key: "chartTitle",
|
|
282
|
+
ref: te,
|
|
283
|
+
style: V(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:24px`)
|
|
284
|
+
}, [
|
|
285
|
+
q(je, {
|
|
286
|
+
config: {
|
|
287
|
+
title: {
|
|
288
|
+
cy: "donut-div-title",
|
|
289
|
+
...e.value.style.chart.title
|
|
290
|
+
},
|
|
291
|
+
subtitle: {
|
|
292
|
+
cy: "donut-div-subtitle",
|
|
293
|
+
...e.value.style.chart.title.subtitle
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}, null, 8, ["config"])
|
|
297
|
+
], 4)) : v("", !0),
|
|
298
|
+
e.value.userOptions.show && w.value ? (s(), B(qe, {
|
|
299
|
+
ref: "details",
|
|
300
|
+
key: `user_option_${ee.value}`,
|
|
301
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
302
|
+
color: e.value.style.chart.color,
|
|
303
|
+
isPrinting: m(ge),
|
|
304
|
+
isImaging: m(xe),
|
|
305
|
+
uid: R.value,
|
|
306
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
307
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
308
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
309
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
310
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
311
|
+
hasLabel: e.value.userOptions.buttons.labels,
|
|
312
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
313
|
+
isTooltip: h.value.showTooltip,
|
|
314
|
+
isFullscreen: N.value,
|
|
315
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
316
|
+
chartElement: P.value,
|
|
317
|
+
onToggleFullscreen: _e,
|
|
318
|
+
onGeneratePdf: m(ae),
|
|
319
|
+
onGenerateCsv: ue,
|
|
320
|
+
onGenerateImage: m(oe),
|
|
321
|
+
onToggleTable: ie,
|
|
322
|
+
onToggleLabels: ne,
|
|
323
|
+
onToggleTooltip: ce
|
|
324
|
+
}, Se({ _: 2 }, [
|
|
325
|
+
t.$slots.optionTooltip ? {
|
|
326
|
+
name: "optionTooltip",
|
|
327
|
+
fn: y(() => [
|
|
328
|
+
g(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
329
|
+
]),
|
|
330
|
+
key: "0"
|
|
331
|
+
} : void 0,
|
|
332
|
+
t.$slots.optionPdf ? {
|
|
333
|
+
name: "optionPdf",
|
|
334
|
+
fn: y(() => [
|
|
335
|
+
g(t.$slots, "optionPdf", {}, void 0, !0)
|
|
336
|
+
]),
|
|
337
|
+
key: "1"
|
|
338
|
+
} : void 0,
|
|
339
|
+
t.$slots.optionCsv ? {
|
|
340
|
+
name: "optionCsv",
|
|
341
|
+
fn: y(() => [
|
|
342
|
+
g(t.$slots, "optionCsv", {}, void 0, !0)
|
|
343
|
+
]),
|
|
344
|
+
key: "2"
|
|
345
|
+
} : void 0,
|
|
346
|
+
t.$slots.optionImg ? {
|
|
347
|
+
name: "optionImg",
|
|
348
|
+
fn: y(() => [
|
|
349
|
+
g(t.$slots, "optionImg", {}, void 0, !0)
|
|
350
|
+
]),
|
|
351
|
+
key: "3"
|
|
352
|
+
} : void 0,
|
|
353
|
+
t.$slots.optionTable ? {
|
|
354
|
+
name: "optionTable",
|
|
355
|
+
fn: y(() => [
|
|
356
|
+
g(t.$slots, "optionTable", {}, void 0, !0)
|
|
357
|
+
]),
|
|
358
|
+
key: "4"
|
|
359
|
+
} : void 0,
|
|
360
|
+
t.$slots.optionLabels ? {
|
|
361
|
+
name: "optionLabels",
|
|
362
|
+
fn: y(() => [
|
|
363
|
+
g(t.$slots, "optionLabels", {}, void 0, !0)
|
|
364
|
+
]),
|
|
365
|
+
key: "5"
|
|
366
|
+
} : void 0,
|
|
367
|
+
t.$slots.optionFullscreen ? {
|
|
368
|
+
name: "optionFullscreen",
|
|
369
|
+
fn: y(({ toggleFullscreen: l, isFullscreen: r }) => [
|
|
370
|
+
g(t.$slots, "optionFullscreen", Y(K({ toggleFullscreen: l, isFullscreen: r })), void 0, !0)
|
|
371
|
+
]),
|
|
372
|
+
key: "6"
|
|
373
|
+
} : void 0
|
|
374
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : v("", !0),
|
|
375
|
+
w.value ? (s(), i("svg", {
|
|
376
|
+
key: 2,
|
|
377
|
+
xmlns: m(De),
|
|
378
|
+
class: O({ "vue-data-ui-fullscreen--on": N.value, "vue-data-ui-fulscreen--off": !N.value }),
|
|
379
|
+
viewBox: `0 0 ${L.value.width <= 0 ? 10 : L.value.width} ${L.value.height <= 0 ? 10 : L.value.height}`,
|
|
380
|
+
style: V(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};`)
|
|
381
|
+
}, [
|
|
382
|
+
e.value.style.chart.grid.show ? (s(), i("g", ot, [
|
|
383
|
+
e.value.style.chart.grid.horizontalGrid.show ? (s(), i("g", st, [
|
|
384
|
+
(s(!0), i(b, null, C(re.value, (l) => (s(), i("line", {
|
|
385
|
+
x1: l.x1,
|
|
386
|
+
x2: l.x2,
|
|
387
|
+
y1: l.y,
|
|
388
|
+
y2: l.y,
|
|
389
|
+
stroke: e.value.style.chart.grid.horizontalGrid.stroke,
|
|
390
|
+
"stroke-width": e.value.style.chart.grid.horizontalGrid.strokeWidth,
|
|
391
|
+
"stroke-dasharray": e.value.style.chart.grid.horizontalGrid.strokeDasharray,
|
|
392
|
+
"stroke-linecap": "round"
|
|
393
|
+
}, null, 8, rt))), 256))
|
|
394
|
+
])) : v("", !0),
|
|
395
|
+
e.value.style.chart.grid.verticalGrid.show ? (s(), i("g", ut, [
|
|
396
|
+
(s(!0), i(b, null, C(k.value, (l, r) => (s(), i("line", {
|
|
397
|
+
x1: a.value.left + (r + 1) * a.value.stripWidth,
|
|
398
|
+
x2: a.value.left + (r + 1) * a.value.stripWidth,
|
|
399
|
+
y1: a.value.top,
|
|
400
|
+
y2: a.value.bottom,
|
|
401
|
+
stroke: e.value.style.chart.grid.verticalGrid.stroke,
|
|
402
|
+
"stroke-width": e.value.style.chart.grid.verticalGrid.strokeWidth,
|
|
403
|
+
"stroke-dasharray": e.value.style.chart.grid.verticalGrid.strokeDasharray,
|
|
404
|
+
"stroke-linecap": "round"
|
|
405
|
+
}, null, 8, it))), 256))
|
|
406
|
+
])) : v("", !0),
|
|
407
|
+
x("line", {
|
|
408
|
+
x1: a.value.left,
|
|
409
|
+
x2: a.value.left,
|
|
410
|
+
y1: a.value.top,
|
|
411
|
+
y2: a.value.bottom,
|
|
412
|
+
stroke: e.value.style.chart.grid.stroke,
|
|
413
|
+
"stroke-width": e.value.style.chart.grid.strokeWidth,
|
|
414
|
+
"stroke-linecap": "round"
|
|
415
|
+
}, null, 8, nt),
|
|
416
|
+
x("line", {
|
|
417
|
+
x1: a.value.left,
|
|
418
|
+
x2: a.value.right,
|
|
419
|
+
y1: a.value.bottom,
|
|
420
|
+
y2: a.value.bottom,
|
|
421
|
+
stroke: e.value.style.chart.grid.stroke,
|
|
422
|
+
"stroke-width": e.value.style.chart.grid.strokeWidth,
|
|
423
|
+
"stroke-linecap": "round"
|
|
424
|
+
}, null, 8, ct)
|
|
425
|
+
])) : v("", !0),
|
|
426
|
+
e.value.style.chart.labels.yAxisLabels.show ? (s(!0), i(b, { key: 1 }, C(re.value, (l) => (s(), i("text", {
|
|
427
|
+
x: l.x1 - e.value.style.chart.labels.yAxisLabels.fontSize / 2 + e.value.style.chart.labels.yAxisLabels.offsetX,
|
|
428
|
+
y: l.y + e.value.style.chart.labels.yAxisLabels.fontSize / 3,
|
|
429
|
+
fill: e.value.style.chart.labels.yAxisLabels.color,
|
|
430
|
+
"font-size": e.value.style.chart.labels.yAxisLabels.fontSize,
|
|
431
|
+
"text-anchor": "end"
|
|
432
|
+
}, $(m(H)({
|
|
433
|
+
p: e.value.style.chart.labels.prefix,
|
|
434
|
+
v: l.value,
|
|
435
|
+
s: e.value.style.chart.labels.suffix,
|
|
436
|
+
r: e.value.style.chart.labels.yAxisLabels.rounding
|
|
437
|
+
})), 9, vt))), 256)) : v("", !0),
|
|
438
|
+
e.value.style.chart.labels.xAxisLabels.show ? (s(!0), i(b, { key: 2 }, C(k.value, (l, r) => (s(), i("text", {
|
|
439
|
+
x: a.value.left + (r + 1) * a.value.stripWidth - a.value.stripWidth / 2,
|
|
440
|
+
y: a.value.bottom + e.value.style.chart.labels.xAxisLabels.fontSize * 2 + e.value.style.chart.labels.xAxisLabels.offsetY,
|
|
441
|
+
"font-size": e.value.style.chart.labels.xAxisLabels.fontSize,
|
|
442
|
+
fill: e.value.style.chart.labels.xAxisLabels.color,
|
|
443
|
+
"text-anchor": "middle"
|
|
444
|
+
}, $(l.name), 9, ht))), 256)) : v("", !0),
|
|
445
|
+
e.value.style.chart.labels.axis.yLabel ? (s(), i("text", {
|
|
446
|
+
key: 3,
|
|
447
|
+
fill: e.value.style.chart.labels.axis.color,
|
|
448
|
+
"font-size": e.value.style.chart.labels.axis.fontSize,
|
|
449
|
+
transform: `translate(${e.value.style.chart.labels.axis.fontSize + e.value.style.chart.labels.axis.yLabelOffsetX}, ${a.value.top + a.value.height / 2}) rotate(-90)`,
|
|
450
|
+
"text-anchor": "middle"
|
|
451
|
+
}, $(e.value.style.chart.labels.axis.yLabel), 9, dt)) : v("", !0),
|
|
452
|
+
e.value.style.chart.labels.axis.xLabel ? (s(), i("text", {
|
|
453
|
+
key: 4,
|
|
454
|
+
fill: e.value.style.chart.labels.axis.color,
|
|
455
|
+
"font-size": e.value.style.chart.labels.axis.fontSize,
|
|
456
|
+
x: a.value.left + a.value.width / 2,
|
|
457
|
+
y: a.value.absoluteHeight,
|
|
458
|
+
"text-anchor": "middle"
|
|
459
|
+
}, $(e.value.style.chart.labels.axis.xLabel), 9, pt)) : v("", !0),
|
|
460
|
+
n.value ? (s(), i(b, { key: 5 }, [
|
|
461
|
+
x("line", {
|
|
462
|
+
x1: a.value.left,
|
|
463
|
+
x2: a.value.right,
|
|
464
|
+
y1: n.value.y,
|
|
465
|
+
y2: n.value.y,
|
|
466
|
+
stroke: n.value.color,
|
|
467
|
+
"stroke-width": 1,
|
|
468
|
+
class: O({ "select-circle": e.value.useCssAnimation })
|
|
469
|
+
}, null, 10, yt),
|
|
470
|
+
x("circle", {
|
|
471
|
+
cx: a.value.left,
|
|
472
|
+
cy: n.value.y,
|
|
473
|
+
r: 3,
|
|
474
|
+
fill: n.value.color,
|
|
475
|
+
class: O({ "select-circle": e.value.useCssAnimation })
|
|
476
|
+
}, null, 10, ft),
|
|
477
|
+
x("circle", {
|
|
478
|
+
cx: a.value.right,
|
|
479
|
+
cy: n.value.y,
|
|
480
|
+
r: 3,
|
|
481
|
+
fill: n.value.color,
|
|
482
|
+
class: O({ "select-circle": e.value.useCssAnimation })
|
|
483
|
+
}, null, 10, bt)
|
|
484
|
+
], 64)) : v("", !0),
|
|
485
|
+
x("defs", null, [
|
|
486
|
+
(s(!0), i(b, null, C(k.value, (l) => (s(), i("radialGradient", {
|
|
487
|
+
id: l.id,
|
|
488
|
+
fy: "30%"
|
|
489
|
+
}, [
|
|
490
|
+
x("stop", {
|
|
491
|
+
offset: "10%",
|
|
492
|
+
"stop-color": m(Ge)(l.color, e.value.style.chart.plots.gradient.intensity / 100)
|
|
493
|
+
}, null, 8, gt),
|
|
494
|
+
x("stop", {
|
|
495
|
+
offset: "90%",
|
|
496
|
+
"stop-color": m(Ee)(l.color, 0.1)
|
|
497
|
+
}, null, 8, xt),
|
|
498
|
+
x("stop", {
|
|
499
|
+
offset: "100%",
|
|
500
|
+
"stop-color": l.color
|
|
501
|
+
}, null, 8, kt)
|
|
502
|
+
], 8, mt))), 256))
|
|
503
|
+
]),
|
|
504
|
+
(s(!0), i(b, null, C(Ce.value, (l, r) => (s(), i(b, null, [
|
|
505
|
+
(s(!0), i(b, null, C(l.plots, (u, S) => (s(), B(Ze, Pe({
|
|
506
|
+
plot: { x: u.x, y: le.value ? u.y : a.value.top },
|
|
507
|
+
radius: n.value && n.value.id === u.id ? M.value * 1.5 : M.value,
|
|
508
|
+
shape: e.value.style.chart.plots.shape,
|
|
509
|
+
stroke: e.value.style.chart.plots.stroke,
|
|
510
|
+
strokeWidth: e.value.style.chart.plots.strokeWidth,
|
|
511
|
+
color: e.value.style.chart.plots.gradient.show ? `url(#${l.id})` : l.color,
|
|
512
|
+
onMouseenter: (E) => we({ datapoint: u, seriesIndex: S }),
|
|
513
|
+
onMouseleave: o[0] || (o[0] = (E) => {
|
|
514
|
+
U.value = !1, n.value = null;
|
|
515
|
+
}),
|
|
516
|
+
onClick: (E) => be("selectDatapoint", u),
|
|
517
|
+
style: `transition: all 0.2s ease-in-out; opacity:${n.value ? n.value.id === u.id ? 1 : 0.2 : e.value.style.chart.plots.opacity};${z.value ? `transition-delay:${S * 50}ms` : ""}`,
|
|
518
|
+
class: { "vue-ui-strip-plot-animated": e.value.useCssAnimation && z.value, "vue-ui-strip-plot-select-circle": e.value.useCssAnimation && !z.value }
|
|
519
|
+
}, t.$attrs), null, 16, ["plot", "radius", "shape", "stroke", "strokeWidth", "color", "onMouseenter", "onClick", "style", "class"]))), 256)),
|
|
520
|
+
h.value.dataLabels.show ? (s(), i("g", Ct, [
|
|
521
|
+
(s(!0), i(b, null, C(l.plots, (u, S) => (s(), i(b, null, [
|
|
522
|
+
S === l.plots.length - 1 || n.value && n.value.id === u.id && !h.value.showTooltip ? (s(), i("text", {
|
|
523
|
+
key: 0,
|
|
524
|
+
x: u.x,
|
|
525
|
+
y: u.y + e.value.style.chart.labels.bestPlotLabel.offsetY - M.value * (n.value && n.value.id === u.id && !h.value.showTooltip ? 2 : 1.5),
|
|
526
|
+
"font-size": e.value.style.chart.labels.bestPlotLabel.fontSize,
|
|
527
|
+
fill: e.value.style.chart.labels.bestPlotLabel.color,
|
|
528
|
+
"text-anchor": "middle",
|
|
529
|
+
style: V(`opacity:${e.value.useCssAnimation && z.value ? 0 : 1};transition:opacity 0.2s ease-in;`)
|
|
530
|
+
}, $(u.name) + " " + $(e.value.style.chart.labels.bestPlotLabel.showValue ? m(H)({
|
|
531
|
+
p: `(${e.value.style.chart.labels.prefix}`,
|
|
532
|
+
v: u.value,
|
|
533
|
+
s: `${e.value.style.chart.labels.suffix})`,
|
|
534
|
+
r: e.value.style.chart.labels.bestPlotLabel.rounding
|
|
535
|
+
}) : ""), 13, wt)) : v("", !0)
|
|
536
|
+
], 64))), 256))
|
|
537
|
+
])) : v("", !0)
|
|
538
|
+
], 64))), 256)),
|
|
539
|
+
g(t.$slots, "svg", { svg: a.value }, void 0, !0)
|
|
540
|
+
], 14, at)) : v("", !0),
|
|
541
|
+
w.value ? v("", !0) : (s(), B(Qe, {
|
|
542
|
+
key: 3,
|
|
543
|
+
config: {
|
|
544
|
+
type: "stripPlot",
|
|
545
|
+
style: {
|
|
546
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
547
|
+
stripPlot: {
|
|
548
|
+
color: "#CCCCCC"
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}, null, 8, ["config"])),
|
|
553
|
+
q(Ye, {
|
|
554
|
+
show: h.value.showTooltip && U.value,
|
|
555
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
556
|
+
color: e.value.style.chart.tooltip.color,
|
|
557
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
558
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
559
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
560
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
561
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
562
|
+
parent: P.value,
|
|
563
|
+
content: X.value,
|
|
564
|
+
isCustom: m(de)(e.value.style.chart.tooltip.customFormat)
|
|
565
|
+
}, {
|
|
566
|
+
"tooltip-before": y(() => [
|
|
567
|
+
g(t.$slots, "tooltip-before", Y(K({ ...J.value })), void 0, !0)
|
|
568
|
+
]),
|
|
569
|
+
"tooltip-after": y(() => [
|
|
570
|
+
g(t.$slots, "tooltip-after", Y(K({ ...J.value })), void 0, !0)
|
|
571
|
+
]),
|
|
572
|
+
_: 3
|
|
573
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
|
|
574
|
+
w.value ? (s(), B(et, {
|
|
575
|
+
key: 4,
|
|
576
|
+
hideDetails: "",
|
|
577
|
+
config: {
|
|
578
|
+
open: h.value.showTable,
|
|
579
|
+
maxHeight: 1e4,
|
|
580
|
+
body: {
|
|
581
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
582
|
+
color: e.value.style.chart.color
|
|
583
|
+
},
|
|
584
|
+
head: {
|
|
585
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
586
|
+
color: e.value.style.chart.color
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}, {
|
|
590
|
+
content: y(() => [
|
|
591
|
+
q(Ke, {
|
|
592
|
+
colNames: G.value.colNames,
|
|
593
|
+
head: G.value.head,
|
|
594
|
+
body: G.value.body,
|
|
595
|
+
config: G.value.config,
|
|
596
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
597
|
+
onClose: o[1] || (o[1] = (l) => h.value.showTable = !1)
|
|
598
|
+
}, {
|
|
599
|
+
th: y(({ th: l }) => [
|
|
600
|
+
x("div", {
|
|
601
|
+
innerHTML: l,
|
|
602
|
+
style: { display: "flex", "align-items": "center" }
|
|
603
|
+
}, null, 8, _t)
|
|
604
|
+
]),
|
|
605
|
+
td: y(({ td: l }) => [
|
|
606
|
+
ze($(l.name || l), 1)
|
|
607
|
+
]),
|
|
608
|
+
_: 1
|
|
609
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
610
|
+
]),
|
|
611
|
+
_: 1
|
|
612
|
+
}, 8, ["config"])) : v("", !0)
|
|
613
|
+
], 14, lt));
|
|
614
|
+
}
|
|
615
|
+
}, Dt = /* @__PURE__ */ tt($t, [["__scopeId", "data-v-548755c9"]]);
|
|
616
|
+
export {
|
|
617
|
+
Dt as default
|
|
618
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-p5gfZSvB.cjs"),U=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-Bb-A5OSV.cjs"),H=require("./usePrinter-fZlsJid8.cjs"),se=require("./Tooltip-C_UE6y-E.cjs"),ne=require("./DataTable-Rm9II-m2.cjs"),ue=require("./vue-ui-skeleton-sjfOtCZr.cjs"),ie=require("./Shape-CVItL3vh.cjs"),ce=require("./vue-ui-accordion-C_pwrAJl.cjs"),j=require("./useNestedProp-2kIU-7On.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],he=["xmlns","viewBox"],pe={key:0},me={key:0},ye=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],fe={key:1},be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ge=["x1","x2","y1","y2","stroke","stroke-width"],ke=["x1","x2","y1","y2","stroke","stroke-width"],xe=["x","y","fill","font-size"],Ce=["x","y","font-size","fill"],we=["fill","font-size","transform"],Be=["fill","font-size","x","y"],_e=["x1","x2","y1","y2","stroke"],Ne=["cx","cy","fill"],Se=["cx","cy","fill"],$e=["id"],Le=["stop-color"],Te=["stop-color"],Ee=["stop-color"],Pe={key:0},ze=["x","y","font-size","fill"],Ve=["innerHTML"],Ae={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(X,{expose:J,emit:Y}){const d=X,{vue_ui_strip_plot:K}=r.useConfig(),p=e.computed({get(){return!!d.dataset&&d.dataset.length},set(l){return l}}),L=e.ref(r.createUid()),V=e.ref(0),T=e.ref(!1),E=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),t=e.computed(()=>{const l=j.useNestedProp({userConfig:d.config,defaultConfig:K});return l.theme?{...j.useNestedProp({userConfig:r.themes.vue_ui_strip_plot[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),C=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiStripPlot",type:"dataset"}):d.dataset.forEach((l,s)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,r.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=U.throttle(()=>{const{width:s,height:a}=U.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,y.value.width=s,y.value.height=a,k.value=(s-v.value.left-v.value.right)/d.dataset.length,B.value=r.translateSize({relator:Math.min(a,s),adjuster:600,source:t.value.style.chart.plots.radius,threshold:6,fallback:6})});C.value=new ResizeObserver(l),C.value.observe(b.value.parentNode)}F.value=!0,setTimeout(()=>{g.value=!1},ee.value*50)}),e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:Q,isImaging:Z,generatePdf:O,generateImage:D}=H.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),M=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref(t.value.useCssAnimation),c=e.ref({showTable:t.value.table.show,dataLabels:{show:t.value.style.chart.labels.bestPlotLabel.show},showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({top:t.value.style.chart.padding.top,bottom:t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right}),k=e.ref(t.value.style.chart.stripWidth),w=e.ref(t.value.style.chart.height),B=e.ref(t.value.style.chart.plots.radius),y=e.ref({width:k.value*d.dataset.length+v.value.left+v.value.right,height:t.value.style.chart.height}),o=e.computed(()=>{const l=k.value*d.dataset.length+v.value.left+v.value.right;return{left:v.value.left,right:l-v.value.right,top:v.value.top,bottom:w.value-v.value.bottom,width:k.value*d.dataset.length,height:w.value-v.value.top-v.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?d.dataset.map((l,s)=>{const a=r.createUid();return{...l,id:a,color:l.color?r.convertColorToHex(l.color):M.value[s]||r.palette[s]||r.palette[s%r.palette.length],plots:l.plots.map(n=>({...n,parentId:a,color:l.color?r.convertColorToHex(l.color):M.value[s]||r.palette[s]||r.palette[s%r.palette.length],id:r.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:o.value.left+(s+1)*o.value.stripWidth-o.value.stripWidth/2}))}))),ee=e.computed(()=>Math.max(...h.value.map(l=>l.plots.length))),P=e.computed(()=>{const l=h.value.flatMap(s=>s.plots.map(a=>a.value));return{max:Math.max(...l),min:Math.min(...l)}}),m=e.computed(()=>r.calculateNiceScale(P.value.min<0?P.value.min:0,P.value.max,t.value.style.chart.grid.scaleSteps)),te=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:o.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*o.value.height}))}))),W=e.computed(()=>m.value.ticks.map(l=>({y:o.value.bottom-o.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:o.value.left,x2:o.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function le({datapoint:l,seriesIndex:s}){z.value={datapoint:l,seriesIndex:s,config:t.value,series:_.value},T.value=!0,i.value=l;const a=t.value.style.chart.tooltip.customFormat;if(r.isFunction(a)&&r.functionReturnsString(()=>a({seriesIndex:s,datapoint:l,series:_.value,config:t.value})))E.value=a({seriesIndex:s,datapoint:l,series:_.value,config:t.value});else{let n="";n+=`<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.value.style.chart.plots.gradient.show?`url(#${l.parentId})`:l.color}"/></svg>${l.name}</div>`,n+=`<div>${r.dataLabel({p:t.value.style.chart.labels.prefix,v:l.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</div>`,E.value=`<div>${n}</div>`}}const N=e.computed(()=>{const l=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>({name:`${a.name} - ${n.name}`,color:n.color}))),s=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>n.value));return{head:l,body:s}});function I(){e.nextTick(()=>{const l=N.value.head.map((n,u)=>[[n.name],[N.value.body[u]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value]]].concat(l),a=r.createCsvContent(s);r.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=N.value.head.map((u,f)=>{const $=r.dataLabel({p:t.value.style.chart.labels.prefix,v:N.value.body[f],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},$]}),a={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],head:l,body:s,config:a}}),x=e.ref(!1);function ae(l){x.value=l,V.value+=1}function oe(){return h.value}function G(){c.value.showTable=!c.value.showTable}function q(){c.value.dataLabels.show=!c.value.dataLabels.show}function R(){c.value.showTooltip=!c.value.showTooltip}return J({getData:oe,generatePdf:O,generateCsv:I,generateImage:D,toggleTable:G,toggleLabels:q,toggleTooltip:R}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"stripPlotChart",ref:b,class:e.normalizeClass(`vue-ui-strip-plot ${x.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};${t.value.responsive?"height:100%":""}`),id:`strip-plot_${L.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(H.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(Z),uid:L.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,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:c.value.showTooltip,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:ae,onGeneratePdf:e.unref(O),onGenerateCsv:I,onGenerateImage:e.unref(D),onToggleTable:G,onToggleLabels:q,onToggleTooltip:R},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};`)},[t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",pe,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,ye))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+(n+1)*o.value.stripWidth,x2:o.value.left+(n+1)*o.value.stripWidth,y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,be))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:o.value.left,x2:o.value.left,y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ge),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ke)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(W.value,a=>(e.openBlock(),e.createElementBlock("text",{x:a.x1-t.value.style.chart.labels.yAxisLabels.fontSize/2+t.value.style.chart.labels.yAxisLabels.offsetX,y:a.y+t.value.style.chart.labels.yAxisLabels.fontSize/3,fill:t.value.style.chart.labels.yAxisLabels.color,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,"text-anchor":"end"},e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.labels.prefix,v:a.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.yAxisLabels.rounding})),9,xe))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+(n+1)*o.value.stripWidth-o.value.stripWidth/2,y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize*2+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"text-anchor":"middle"},e.toDisplayString(a.name),9,Ce))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.yLabel?(e.openBlock(),e.createElementBlock("text",{key:3,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,transform:`translate(${t.value.style.chart.labels.axis.fontSize+t.value.style.chart.labels.axis.yLabelOffsetX}, ${o.value.top+o.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,we)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:4,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,x:o.value.left+o.value.width/2,y:o.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Be)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:i.value.y,y2:i.value.y,stroke:i.value.color,"stroke-width":1,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,_e),e.createElementVNode("circle",{cx:o.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ne),e.createElementVNode("circle",{cx:o.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Se)],64)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock("radialGradient",{id:a.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Le),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ee)],8,$e))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createBlock(ie._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:o.value.top},radius:i.value&&i.value.id===u.id?B.value*1.5:B.value,shape:t.value.style.chart.plots.shape,stroke:t.value.style.chart.plots.stroke,strokeWidth:t.value.style.chart.plots.strokeWidth,color:t.value.style.chart.plots.gradient.show?`url(#${a.id})`:a.color,onMouseenter:$=>le({datapoint:u,seriesIndex:f}),onMouseleave:s[0]||(s[0]=$=>{T.value=!1,i.value=null}),onClick:$=>Y("selectDatapoint",u),style:`transition: all 0.2s ease-in-out; opacity:${i.value?i.value.id===u.id?1:.2:t.value.style.chart.plots.opacity};${g.value?`transition-delay:${f*50}ms`:""}`,class:{"vue-ui-strip-plot-animated":t.value.useCssAnimation&&g.value,"vue-ui-strip-plot-select-circle":t.value.useCssAnimation&&!g.value}},l.$attrs),null,16,["plot","radius","shape","stroke","strokeWidth","color","onMouseenter","onClick","style","class"]))),256)),c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f===a.plots.length-1||i.value&&i.value.id===u.id&&!c.value.showTooltip?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.x,y:u.y+t.value.style.chart.labels.bestPlotLabel.offsetY-B.value*(i.value&&i.value.id===u.id&&!c.value.showTooltip?2:1.5),"font-size":t.value.style.chart.labels.bestPlotLabel.fontSize,fill:t.value.style.chart.labels.bestPlotLabel.color,"text-anchor":"middle",style:e.normalizeStyle(`opacity:${t.value.useCssAnimation&&g.value?0:1};transition:opacity 0.2s ease-in;`)},e.toDisplayString(u.name)+" "+e.toDisplayString(t.value.style.chart.labels.bestPlotLabel.showValue?e.unref(r.dataLabel)({p:`(${t.value.style.chart.labels.prefix}`,v:u.value,s:`${t.value.style.chart.labels.suffix})`,r:t.value.style.chart.labels.bestPlotLabel.rounding}):""),13,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:3,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:c.value.showTooltip&&T.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:b.value,content:E.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({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),p.value?(e.openBlock(),e.createBlock(ce.default,{key:4,hideDetails:"",config:{open:c.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(ne.DataTable,{colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=a=>c.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,Ve)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},Fe=ve._export_sfc(Ae,[["__scopeId","data-v-548755c9"]]);exports.default=Fe;
|