vue-data-ui
Version:
A user-empowering data visualization Vue 3 components library for eloquent data storytelling
618 lines (617 loc) • 25.8 kB
JavaScript
import { defineAsyncComponent as k, computed as g, onMounted as Ue, ref as n, watch as We, createElementBlock as i, openBlock as r, unref as o, normalizeStyle as M, normalizeClass as B, createBlock as x, createCommentVNode as c, renderSlot as v, createVNode as de, createSlots as He, withCtx as d, normalizeProps as P, guardReactiveProps as S, createElementVNode as _, Fragment as he, renderList as ge, toDisplayString as A, createTextVNode as Xe, nextTick as je } from "vue";
import { u as Ye, o as qe, e as pe, g as Je, c as ye, t as Ke, p as G, a as Qe, b as Ze, G as fe, d as et, M as tt, f as C, X as lt, i as be, x as me, q as at, r as ot, y as st } from "./index-BLtEpj8j.js";
import { u as ke } from "./useNestedProp-Bw1KcAmj.js";
import { u as rt } from "./usePrinter-DnRwTdvS.js";
import { u as ut } from "./useUserOptionState-BIvW1Kz7.js";
import { u as nt } from "./useChartAccessibility-9icAAmYg.js";
import it from "./img-D-vWHxhM.js";
import { _ as ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const vt = ["id"], dt = {
key: 1,
ref: "noTitle",
class: "vue-data-ui-no-title-space",
style: "height:36px; width: 100%;background:transparent"
}, ht = {
key: 2,
style: "width:100%;background:transparent;padding-bottom:24px"
}, gt = ["xmlns", "viewBox"], pt = ["width", "height"], yt = ["id"], ft = ["stdDeviation"], bt = ["d", "stroke", "stroke-width"], mt = ["d", "stroke", "stroke-width"], kt = ["filter"], wt = ["d", "stroke", "stroke-width"], Ct = ["d", "stroke-width", "onMouseenter", "onClick"], $t = {
key: 5,
class: "vue-data-ui-watermark"
}, xt = ["onClick"], Tt = {
key: 8,
ref: "source",
dir: "auto"
}, Ot = ["innerHTML"], Pt = {
__name: "vue-ui-galaxy",
props: {
config: {
type: Object,
default() {
return {};
}
},
dataset: {
type: Array,
default() {
return [];
}
}
},
emits: ["selectLegend", "selectDatapoint"],
setup(we, { expose: Ce, emit: $e }) {
const xe = k(() => import("./vue-ui-accordion-B6Svdk-2.js")), Te = k(() => import("./DataTable-CS_V_Adx.js")), Oe = k(() => import("./Legend-E7G897sw.js")), Pe = k(() => import("./PackageVersion-CnRyWKP-.js")), Se = k(() => import("./PenAndPaper-7BWf7zgA.js")), _e = k(() => import("./vue-ui-skeleton-CsMU8DwQ.js")), Ne = k(() => import("./Title-DkG60EPg.js")), Le = k(() => import("./Tooltip-CuHsd1IQ.js")), Ie = k(() => import("./UserOptions-DGw0HvSp.js")), { vue_ui_galaxy: Ae } = Ye(), f = we, F = g(() => !!f.dataset && f.dataset.length);
Ue(() => {
X();
});
function X() {
qe(f.dataset) ? pe({
componentName: "VueUiGalaxy",
type: "dataset"
}) : f.dataset.forEach((t, a) => {
Je({
datasetObject: t,
requiredAttributes: ["name", "values"]
}).forEach((l) => {
pe({
componentName: "VueUiGalaxy",
type: "datasetSerieAttribute",
property: l,
index: a
});
});
});
}
const N = n(ye()), T = n(null), Fe = n(null), D = n(!1), R = n(""), b = n(null), j = n(0), Y = n(0), q = n(0), J = n(0), e = g({
get: () => ee(),
set: (t) => t
}), { userOptionsVisible: z, setUserOptionsVisibility: K, keepUserOptionState: Q } = ut({ config: e.value }), { svgRef: Z } = nt({ config: e.value.style.chart.title });
function ee() {
const t = ke({
userConfig: f.config,
defaultConfig: Ae
});
return t.theme ? {
...ke({
userConfig: Qe.vue_ui_galaxy[t.theme] || f.config,
defaultConfig: t
}),
customPalette: Ke[t.theme] || G
} : t;
}
We(() => f.config, (t) => {
e.value = ee(), z.value = !e.value.userOptions.showOnChartHover, X(), Y.value += 1, q.value += 1, J.value += 1, p.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, p.value.showTable = e.value.table.show, p.value.showTooltip = e.value.style.chart.tooltip.show;
}, { deep: !0 });
const { isPrinting: te, isImaging: le, generatePdf: ae, generateImage: oe } = rt({
elementId: `galaxy_${N.value}`,
fileName: e.value.style.chart.title.text || "vue-ui-galaxy",
options: e.value.userOptions.print
}), Ve = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), Ee = g(() => Ze(e.value.customPalette)), p = n({
dataLabels: {
show: e.value.style.chart.layout.labels.dataLabels.show
},
showTable: e.value.table.show,
showTooltip: e.value.style.chart.tooltip.show
}), L = n({
height: 180,
// or 250 if non fibo
width: 250
}), se = $e, y = n([]);
function U(t) {
y.value.includes(t.id) ? y.value = y.value.filter((a) => a !== t.id) : y.value.push(t.id), se("selectLegend", I.value.map((a) => ({
name: a.name,
color: a.color,
value: a.value
})));
}
const $ = g(() => f.dataset.map((t, a) => ({
name: t.name,
color: et(t.color) || Ee.value[a] || G[a] || G[a % G.length],
value: t.values ? fe(t.values).reduce((l, s) => l + s, 0) : 0,
absoluteValues: fe(t.values),
id: ye(),
seriesIndex: a
})).sort((t, a) => a.value - t.value));
function Me() {
return $.value.map((t) => ({
name: t.name,
color: t.color,
value: t.value
}));
}
const m = g(() => $.value.filter((t) => !y.value.includes(t.id)).map((t) => t.value).reduce((t, a) => t + a, 0)), Be = n(190), re = g(() => $.value.filter((t) => !y.value.includes(t.id))), I = g(() => {
const t = [];
for (let a = 0; a < re.value.length; a += 1) {
const l = re.value[a];
let s = l.value / m.value * Be.value;
a > 0 && t.length && (s += t[a - 1].points), t.push({
points: s,
...l,
seriesIndex: a,
proportion: l.value / m.value,
path: tt({
points: s,
startX: 115 + e.value.style.chart.layout.arcs.offsetX,
startY: 90 + e.value.style.chart.layout.arcs.offsetY
})
});
}
return t.filter((a, l) => !y.value.includes(a.id)).toSorted((a, l) => l.points - a.points);
}), O = n(!1);
function ue(t) {
O.value = t, j.value += 1;
}
const W = n(null);
function Ge({ datapoint: t, _relativeIndex: a, seriesIndex: l, show: s = !1 }) {
W.value = {
datapoint: t,
seriesIndex: l,
series: $.value,
config: e.value
}, D.value = s, b.value = t.id;
let u = "";
const h = e.value.style.chart.tooltip.customFormat;
me(h) && st(() => h({
seriesIndex: l,
datapoint: t,
series: $.value,
config: e.value
})) ? R.value = h({
seriesIndex: l,
datapoint: t,
series: $.value,
config: e.value
}) : (u += `<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>`, 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="${t.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (u += `<b>${be(
e.value.style.chart.layout.labels.dataLabels.formatter,
t.value,
C({
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
}),
{ datapoint: t, seriesIndex: l }
)}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? u += `<span>(${C({
v: t.proportion * 100,
s: "%",
r: e.value.style.chart.tooltip.roundingPercentage
})})</span></div>` : u += `<b>${C({
v: t.proportion * 100,
s: "%",
r: e.value.style.chart.tooltip.roundingPercentage
})}</b></div>`), R.value = `<div>${u}</div>`);
}
const ne = g(() => $.value.map((t, a) => ({
...t,
proportion: (t.value || 0) / f.dataset.map((l) => (l.values || []).reduce((s, u) => s + u, 0)).reduce((l, s) => l + s, 0),
opacity: y.value.includes(t.id) ? 0.5 : 1,
shape: t.shape || "circle",
segregate: () => U(t),
isSegregated: y.value.includes(t.id)
}))), De = g(() => ({
cy: "galaxy-div-legend",
backgroundColor: e.value.style.chart.legend.backgroundColor,
color: e.value.style.chart.legend.color,
fontSize: e.value.style.chart.legend.fontSize,
paddingBottom: 12,
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
})), w = g(() => {
const t = I.value.map((l) => ({
name: l.name,
color: l.color
})), a = I.value.map((l) => l.value);
return { head: t, body: a };
});
function ie(t = null) {
je(() => {
const a = w.value.head.map((u, h) => [[
u.name
], [w.value.body[h]], [isNaN(w.value.body[h] / m.value) ? "-" : w.value.body[h] / m.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(a), s = at(l);
t ? t(s) : ot({ csvContent: s, title: e.value.style.chart.title.text || "vue-ui-galaxy" });
});
}
const V = g(() => {
const t = [
' <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>',
C({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: m.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
"100%"
], a = w.value.head.map((u, h) => {
const ze = C({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: w.value.body[h], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue });
return [
{
color: u.color,
name: u.name
},
ze,
isNaN(w.value.body[h] / m.value) ? "-" : C({
v: w.value.body[h] / m.value * 100,
s: "%",
r: e.value.table.td.roundingPercentage
})
];
}), l = {
th: {
backgroundColor: e.value.table.th.backgroundColor,
color: e.value.table.th.color,
outline: e.value.table.th.outline
},
td: {
backgroundColor: e.value.table.td.backgroundColor,
color: e.value.table.td.color,
outline: e.value.table.td.outline
},
breakpoint: e.value.table.responsiveBreakpoint
};
return {
colNames: [
e.value.table.columnNames.series,
e.value.table.columnNames.value,
e.value.table.columnNames.percentage
],
head: t,
body: a,
config: l
};
});
function ce() {
p.value.showTable = !p.value.showTable;
}
function ve() {
p.value.showTooltip = !p.value.showTooltip;
}
const E = n(!1);
function H() {
E.value = !E.value;
}
async function Re({ scale: t = 2 } = {}) {
if (!T.value) return;
const { width: a, height: l } = T.value.getBoundingClientRect(), s = a / l, { imageUri: u, base64: h } = await it({ domElement: T.value, base64: !0, img: !0, scale: t });
return {
imageUri: u,
base64: h,
title: e.value.style.chart.title.text,
width: a,
height: l,
aspectRatio: s
};
}
return Ce({
getData: Me,
getImage: Re,
generatePdf: ae,
generateCsv: ie,
generateImage: oe,
toggleTable: ce,
toggleTooltip: ve,
toggleAnnotator: H,
toggleFullscreen: ue
}), (t, a) => (r(), i("div", {
ref_key: "galaxyChart",
ref: T,
class: B(`vue-ui-galaxy ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
style: M(`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}`),
id: `galaxy_${N.value}`,
onMouseenter: a[3] || (a[3] = () => o(K)(!0)),
onMouseleave: a[4] || (a[4] = () => o(K)(!1))
}, [
e.value.userOptions.buttons.annotator ? (r(), x(o(Se), {
key: 0,
svgRef: o(Z),
backgroundColor: e.value.style.chart.backgroundColor,
color: e.value.style.chart.color,
active: E.value,
onClose: H
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : c("", !0),
Ve.value ? (r(), i("div", dt, null, 512)) : c("", !0),
e.value.style.chart.title.text ? (r(), i("div", ht, [
(r(), x(o(Ne), {
key: `title_${Y.value}`,
config: {
title: {
cy: "galaxy-div-title",
...e.value.style.chart.title
},
subtitle: {
cy: "galaxy-div-subtitle",
...e.value.style.chart.title.subtitle
}
}
}, null, 8, ["config"]))
])) : c("", !0),
e.value.userOptions.show && F.value && (o(Q) || o(z)) ? (r(), x(o(Ie), {
ref_key: "details",
ref: Fe,
key: `user_option_${j.value}`,
backgroundColor: e.value.style.chart.backgroundColor,
color: e.value.style.chart.color,
isPrinting: o(te),
isImaging: o(le),
uid: N.value,
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
hasPdf: e.value.userOptions.buttons.pdf,
hasXls: e.value.userOptions.buttons.csv,
hasImg: e.value.userOptions.buttons.img,
hasTable: e.value.userOptions.buttons.table,
hasFullscreen: e.value.userOptions.buttons.fullscreen,
isTooltip: p.value.showTooltip,
isFullscreen: O.value,
titles: { ...e.value.userOptions.buttonTitles },
chartElement: T.value,
position: e.value.userOptions.position,
hasAnnotator: e.value.userOptions.buttons.annotator,
isAnnotation: E.value,
callbacks: e.value.userOptions.callbacks,
printScale: e.value.userOptions.print.scale,
onToggleFullscreen: ue,
onGeneratePdf: o(ae),
onGenerateCsv: ie,
onGenerateImage: o(oe),
onToggleTable: ce,
onToggleTooltip: ve,
onToggleAnnotator: H,
style: M({
visibility: o(Q) ? o(z) ? "visible" : "hidden" : "visible"
})
}, He({ _: 2 }, [
t.$slots.menuIcon ? {
name: "menuIcon",
fn: d(({ isOpen: l, color: s }) => [
v(t.$slots, "menuIcon", P(S({ isOpen: l, color: s })), void 0, !0)
]),
key: "0"
} : void 0,
t.$slots.optionTooltip ? {
name: "optionTooltip",
fn: d(() => [
v(t.$slots, "optionTooltip", {}, void 0, !0)
]),
key: "1"
} : void 0,
t.$slots.optionPdf ? {
name: "optionPdf",
fn: d(() => [
v(t.$slots, "optionPdf", {}, void 0, !0)
]),
key: "2"
} : void 0,
t.$slots.optionCsv ? {
name: "optionCsv",
fn: d(() => [
v(t.$slots, "optionCsv", {}, void 0, !0)
]),
key: "3"
} : void 0,
t.$slots.optionImg ? {
name: "optionImg",
fn: d(() => [
v(t.$slots, "optionImg", {}, void 0, !0)
]),
key: "4"
} : void 0,
t.$slots.optionTable ? {
name: "optionTable",
fn: d(() => [
v(t.$slots, "optionTable", {}, void 0, !0)
]),
key: "5"
} : void 0,
t.$slots.optionFullscreen ? {
name: "optionFullscreen",
fn: d(({ toggleFullscreen: l, isFullscreen: s }) => [
v(t.$slots, "optionFullscreen", P(S({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
]),
key: "6"
} : void 0,
t.$slots.optionAnnotator ? {
name: "optionAnnotator",
fn: d(({ toggleAnnotator: l, isAnnotator: s }) => [
v(t.$slots, "optionAnnotator", P(S({ toggleAnnotator: l, isAnnotator: s })), void 0, !0)
]),
key: "7"
} : void 0
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
F.value ? (r(), i("svg", {
key: 4,
ref_key: "svgRef",
ref: Z,
xmlns: o(lt),
class: B({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
viewBox: `0 0 ${L.value.width} ${L.value.height}`,
style: M(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
}, [
de(o(Pe)),
t.$slots["chart-background"] ? (r(), i("foreignObject", {
key: 0,
x: 0,
y: 0,
width: L.value.width,
height: L.value.height,
style: {
pointerEvents: "none"
}
}, [
v(t.$slots, "chart-background", {}, void 0, !0)
], 8, pt)) : c("", !0),
_("defs", null, [
_("filter", {
id: `blur_${N.value}`,
x: "-50%",
y: "-50%",
width: "200%",
height: "200%"
}, [
_("feGaussianBlur", {
in: "SourceGraphic",
stdDeviation: 100 / e.value.style.chart.layout.arcs.gradient.intensity
}, null, 8, ft)
], 8, yt)
]),
(r(!0), i(he, null, ge(I.value, (l) => (r(), i("g", null, [
l.value ? (r(), i("path", {
key: 0,
d: l.path,
fill: "none",
stroke: e.value.style.chart.backgroundColor,
"stroke-width": (e.value.style.chart.layout.arcs.strokeWidth + e.value.style.chart.layout.arcs.borderWidth) * (b.value === l.id && e.value.style.chart.layout.arcs.hoverEffect.show ? e.value.style.chart.layout.arcs.hoverEffect.multiplicator : 1),
"stroke-linecap": "round"
}, null, 8, bt)) : c("", !0),
l.value ? (r(), i("path", {
key: 1,
d: l.path,
fill: "none",
stroke: l.color,
"stroke-width": e.value.style.chart.layout.arcs.strokeWidth * (b.value === l.id && e.value.style.chart.layout.arcs.hoverEffect.show ? e.value.style.chart.layout.arcs.hoverEffect.multiplicator : 1),
"stroke-linecap": "round",
class: B(`${b.value && b.value !== l.id && e.value.useBlurOnHover ? "vue-ui-galaxy-blur" : ""}`)
}, null, 10, mt)) : c("", !0),
l.value && e.value.style.chart.layout.arcs.gradient.show ? (r(), i("g", {
key: 2,
filter: `url(#blur_${N.value})`
}, [
_("path", {
d: l.path,
fill: "none",
stroke: e.value.style.chart.layout.arcs.gradient.color,
"stroke-width": e.value.style.chart.layout.arcs.strokeWidth / 2 * (b.value === l.id && e.value.style.chart.layout.arcs.hoverEffect.show ? e.value.style.chart.layout.arcs.hoverEffect.multiplicator : 1),
"stroke-linecap": "round",
class: B(`vue-ui-galaxy-gradient ${b.value && b.value !== l.id && e.value.useBlurOnHover ? "vue-ui-galaxy-blur" : ""}`)
}, null, 10, wt)
], 8, kt)) : c("", !0)
]))), 256)),
(r(!0), i(he, null, ge(I.value, (l, s) => (r(), i("g", null, [
l.value ? (r(), i("path", {
key: 0,
d: l.path,
fill: "none",
stroke: "transparent",
"stroke-width": e.value.style.chart.layout.arcs.strokeWidth + e.value.style.chart.layout.arcs.borderWidth,
"stroke-linecap": "round",
onMouseenter: (u) => Ge({
datapoint: l,
seriesIndex: l.seriesIndex,
show: !0
}),
onMouseleave: a[0] || (a[0] = (u) => {
D.value = !1, b.value = null;
}),
onClick: (u) => se("selectDatapoint", l)
}, null, 40, Ct)) : c("", !0)
]))), 256)),
v(t.$slots, "svg", { svg: L.value }, void 0, !0)
], 14, gt)) : c("", !0),
t.$slots.watermark ? (r(), i("div", $t, [
v(t.$slots, "watermark", P(S({ isPrinting: o(te) || o(le) })), void 0, !0)
])) : c("", !0),
F.value ? c("", !0) : (r(), x(o(_e), {
key: 6,
config: {
type: "galaxy",
style: {
backgroundColor: e.value.style.chart.backgroundColor,
galaxy: {
color: "#CCCCCC"
}
}
}
}, null, 8, ["config"])),
e.value.style.chart.legend.show ? (r(), x(o(Oe), {
key: `legend_${J.value}`,
legendSet: ne.value,
config: De.value,
onClickMarker: a[1] || (a[1] = ({ legend: l }) => U(l))
}, {
item: d(({ legend: l, index: s }) => [
_("div", {
onClick: (u) => U(l),
style: M(`opacity:${y.value.includes(l.id) ? 0.5 : 1}`)
}, A(l.name) + A(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + A(e.value.style.chart.legend.showValue ? o(be)(
e.value.style.chart.layout.labels.dataLabels.formatter,
l.value,
o(C)({
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
}),
{ datapoint: l, seriesIndex: s }
) : "") + " " + A(e.value.style.chart.legend.showPercentage ? y.value.includes(l.id) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(l.value / m.value) ? "-" : o(C)({
v: l.value / m.value * 100,
s: "%",
r: e.value.style.chart.legend.roundingPercentage
})}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, xt)
]),
_: 1
}, 8, ["legendSet", "config"])) : c("", !0),
v(t.$slots, "legend", { legend: ne.value }, void 0, !0),
t.$slots.source ? (r(), i("div", Tt, [
v(t.$slots, "source", {}, void 0, !0)
], 512)) : c("", !0),
de(o(Le), {
show: p.value.showTooltip && D.value,
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
color: e.value.style.chart.tooltip.color,
borderRadius: e.value.style.chart.tooltip.borderRadius,
borderColor: e.value.style.chart.tooltip.borderColor,
borderWidth: e.value.style.chart.tooltip.borderWidth,
fontSize: e.value.style.chart.tooltip.fontSize,
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
position: e.value.style.chart.tooltip.position,
offsetY: e.value.style.chart.tooltip.offsetY,
parent: T.value,
content: R.value,
isFullscreen: O.value,
isCustom: o(me)(e.value.style.chart.tooltip.customFormat)
}, {
"tooltip-before": d(() => [
v(t.$slots, "tooltip-before", P(S({ ...W.value })), void 0, !0)
]),
"tooltip-after": d(() => [
v(t.$slots, "tooltip-after", P(S({ ...W.value })), void 0, !0)
]),
_: 3
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
F.value ? (r(), x(o(xe), {
key: 9,
hideDetails: "",
config: {
open: p.value.showTable,
maxHeight: 1e4,
body: {
backgroundColor: e.value.style.chart.backgroundColor,
color: e.value.style.chart.color
},
head: {
backgroundColor: e.value.style.chart.backgroundColor,
color: e.value.style.chart.color
}
}
}, {
content: d(() => [
(r(), x(o(Te), {
key: `table_${q.value}`,
colNames: V.value.colNames,
head: V.value.head,
body: V.value.body,
config: V.value.config,
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
onClose: a[2] || (a[2] = (l) => p.value.showTable = !1)
}, {
th: d(({ th: l }) => [
_("div", {
innerHTML: l,
style: { display: "flex", "align-items": "center" }
}, null, 8, Ot)
]),
td: d(({ td: l }) => [
Xe(A(l.name || l), 1)
]),
_: 1
}, 8, ["colNames", "head", "body", "config", "title"]))
]),
_: 1
}, 8, ["config"])) : c("", !0)
], 46, vt));
}
}, Et = /* @__PURE__ */ ct(Pt, [["__scopeId", "data-v-de094a3d"]]);
export {
Et as default
};