vue-data-ui
Version:
A user-empowering data visualization Vue 3 components library for eloquent data storytelling
659 lines (658 loc) • 25.9 kB
JavaScript
import { computed as c, onMounted as we, ref as y, watch as xe, createElementBlock as h, openBlock as r, unref as a, normalizeStyle as L, normalizeClass as ee, createBlock as p, createCommentVNode as u, renderSlot as v, createVNode as U, createSlots as _e, withCtx as f, normalizeProps as I, guardReactiveProps as F, createElementVNode as s, Fragment as te, renderList as oe, toDisplayString as N, createTextVNode as le, nextTick as $e } from "vue";
import { u as Me, o as Pe, e as ae, c as Ne, a as Ae, P as Oe, X as Te, s as C, w as Le, Q as Ie, i as se, f as S, q as Fe, r as Se } from "./index-BaaDnc4F.js";
import { _ as Ve } from "./Title-D_MGglyN.js";
import { u as je, U as Re } from "./usePrinter-y4-4tCWT.js";
import { L as Ue } from "./Legend-Be8mrJpb.js";
import A from "./BaseIcon-rw8rKNKS.js";
import { D as Be } from "./DataTable-DvwmNjb-.js";
import De from "./vue-ui-skeleton-6RiQNJSb.js";
import We from "./vue-ui-accordion-CF9kQTXq.js";
import { u as re } from "./useNestedProp-D8vQcOps.js";
import { _ as ze } from "./PackageVersion-D9Lm1C1X.js";
import { P as Ee } from "./PenAndPaper-DR58HO_U.js";
import { u as Ge } from "./useUserOptionState-BIvW1Kz7.js";
import { u as He } from "./useChartAccessibility-BWojgys7.js";
import { _ as Xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Ke = ["id"], qe = {
key: 2,
style: "width:100%;background:transparent"
}, Qe = ["xmlns", "viewBox"], Ye = ["width", "height"], Je = ["id"], Ze = ["stop-color"], et = ["stop-color"], tt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], ot = ["d", "stroke", "stroke-width"], lt = ["stroke"], at = ["fill"], st = ["stroke"], rt = ["fill"], nt = ["stroke"], ut = ["fill"], it = ["stroke"], dt = ["fill"], ct = ["stroke"], vt = ["fill"], yt = ["d", "stroke", "stroke-width", "fill"], ht = ["x1", "y1", "stroke"], ft = ["cx", "cy", "fill", "stroke"], mt = ["fill", "stroke"], pt = ["y", "fill", "font-weight"], gt = ["y", "fill"], kt = {
key: 5,
class: "vue-data-ui-watermark"
}, bt = ["onClick"], Ct = { style: { "font-weight": "bold" } }, wt = {
key: 8,
ref: "source",
dir: "auto"
}, xt = ["innerHTML"], _t = {
__name: "vue-ui-mood-radar",
props: {
config: {
type: Object,
default() {
return {};
}
},
dataset: {
type: Object,
default() {
return {};
}
}
},
setup(ne, { expose: ue }) {
const { vue_ui_mood_radar: ie } = Me(), d = ne, x = c(() => !!d.dataset && Object.keys(d.dataset).length);
we(() => {
B();
});
function B() {
Pe(d.dataset) && ae({
componentName: "VueUiMoodRadar",
type: "dataset"
});
}
const _ = y(Ne()), D = y(null), de = y(null), n = y(null), ce = y(null), ve = y(0), ye = y(0), W = y(0), e = c({
get: () => H(),
set: (o) => o
}), { userOptionsVisible: V, setUserOptionsVisibility: z, keepUserOptionState: E } = Ge({ config: e.value }), { svgRef: G } = He({ config: e.value.style.chart.title });
function H() {
const o = re({
userConfig: d.config,
defaultConfig: ie
});
return o.theme ? {
...re({
userConfig: Ae.vue_ui_mood_radar[o.theme] || d.config,
defaultConfig: o
})
} : o;
}
xe(() => d.config, (o) => {
e.value = H(), V.value = !e.value.userOptions.showOnChartHover, B(), ve.value += 1, ye.value += 1, W.value += 1, $.value.showTable = e.value.table.show;
}, { deep: !0 });
const { isPrinting: X, isImaging: K, generatePdf: q, generateImage: Q } = je({
elementId: _.value,
fileName: e.value.style.chart.title.text || "vue-ui-mood-radar"
}), he = c(() => e.value.userOptions.show && !e.value.style.chart.title.text), $ = y({
showTable: e.value.table.show
}), m = c(() => ({
height: 256,
width: 256
})), j = c(() => Oe({
plot: { x: 128, y: m.value.height / 2 },
radius: 90,
sides: 5,
rotation: 11
}));
function fe({ centerX: o, centerY: l, apexX: t, apexY: i, proportion: k, key: P, value: Ce }) {
return {
x: o + (t - o) * k,
y: l + (i - l) * k,
key: P,
value: Ce
};
}
const me = c(() => Math.max(...Object.values(d.dataset).map((o) => isNaN(o) ? 0 : o))), w = c(() => Object.values(d.dataset).reduce((o, l) => (isNaN(o) ? 0 : o) + (isNaN(l) ? 0 : l), 0)), g = c(() => Object.keys(d.dataset).map((o, l) => {
const t = typeof d.dataset[o] != "number" || isNaN(d.dataset[o]) ? 0 : d.dataset[o];
return {
index: l,
key: o,
value: t,
proportion: t / w.value,
color: e.value.style.chart.layout.smileys.colors[o]
};
}).sort((o, l) => l.key - o.key)), Y = c(() => x.value ? (["1", "2", "3", "4", "5"].forEach((o) => {
[null, void 0].includes(d.dataset[o]) && ae({
componentName: "VueUiMoodRadar",
type: "datasetAttribute",
property: o
});
}), j.value.coordinates.map((o, l) => {
const t = fe({
centerX: m.value.width / 2,
centerY: m.value.height / 2,
apexX: o.x,
apexY: o.y,
proportion: g.value[l].value / me.value,
key: g.value[l].key,
value: g.value[l].value
});
return {
...o,
plots: t,
key: g.value[l].key
};
})) : []), pe = c(() => ({
cy: "mood-radar-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" : ""
}));
function ge(o) {
o === n.value ? n.value = null : n.value = o;
}
const b = c(() => {
const o = g.value.map((t) => ({
name: t.key,
color: t.color
})), l = g.value.map((t) => isNaN(t.value) ? 0 : t.value);
return { head: o, body: l };
});
function J() {
$e(() => {
const o = b.value.head.map((i, k) => [[
i.name
], [b.value.body[k]], [isNaN(b.value.body[k] / w.value) ? "-" : b.value.body[k] / w.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), t = Fe(l);
Se({ csvContent: t, title: e.value.style.chart.title.text || "vue-ui-mood-radar" });
});
}
const O = c(() => {
const o = [
' <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>',
Number(w.value.toFixed(e.value.table.td.roundingValue)).toLocaleString(),
"100%"
], l = b.value.head.map((k, P) => [
{
color: k.color,
name: k.name
},
b.value.body[P].toFixed(e.value.table.td.roundingValue),
isNaN(b.value.body[P] / w.value) ? "-" : (b.value.body[P] / w.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
]), t = {
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
}, i = [
e.value.table.columnNames.series,
e.value.table.columnNames.value,
e.value.table.columnNames.percentage
];
return {
head: o,
body: l,
config: t,
colNames: i
};
});
function ke() {
return g.value;
}
function Z() {
$.value.showTable = !$.value.showTable;
}
const M = y(!1);
function be(o) {
M.value = o;
}
const T = y(!1);
function R() {
T.value = !T.value;
}
return ue({
getData: ke,
generatePdf: q,
generateCsv: J,
generateImage: Q,
toggleTable: Z,
toggleAnnotator: R
}), (o, l) => (r(), h("div", {
class: ee(`vue-ui-mood-radar ${M.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
ref_key: "moodRadarChart",
ref: D,
id: `${_.value}`,
style: L(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
onMouseenter: l[11] || (l[11] = () => a(z)(!0)),
onMouseleave: l[12] || (l[12] = () => a(z)(!1))
}, [
e.value.userOptions.buttons.annotator ? (r(), p(Ee, {
key: 0,
svgRef: a(G),
backgroundColor: e.value.style.chart.backgroundColor,
color: e.value.style.chart.color,
active: T.value,
onClose: R
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : u("", !0),
he.value ? (r(), h("div", {
key: 1,
ref_key: "noTitle",
ref: ce,
class: "vue-data-ui-no-title-space",
style: "height:36px; width: 100%;background:transparent"
}, null, 512)) : u("", !0),
e.value.style.chart.title.text ? (r(), h("div", qe, [
U(Ve, {
config: {
title: {
cy: "mood-radar-title",
...e.value.style.chart.title
},
subtitle: {
cy: "mood-radar-subtitle",
...e.value.style.chart.title.subtitle
}
}
}, null, 8, ["config"])
])) : u("", !0),
e.value.userOptions.show && x.value && (a(E) || a(V)) ? (r(), p(Re, {
key: 3,
ref_key: "details",
ref: de,
backgroundColor: e.value.style.chart.backgroundColor,
color: e.value.style.chart.color,
isPrinting: a(X),
isImaging: a(K),
uid: _.value,
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,
isFullscreen: M.value,
titles: { ...e.value.userOptions.buttonTitles },
chartElement: D.value,
position: e.value.userOptions.position,
hasAnnotator: e.value.userOptions.buttons.annotator,
isAnnotation: T.value,
onToggleFullscreen: be,
onGeneratePdf: a(q),
onGenerateCsv: J,
onGenerateImage: a(Q),
onToggleTable: Z,
onToggleAnnotator: R,
style: L({
visibility: a(E) ? a(V) ? "visible" : "hidden" : "visible"
})
}, _e({ _: 2 }, [
o.$slots.menuIcon ? {
name: "menuIcon",
fn: f(({ isOpen: t, color: i }) => [
v(o.$slots, "menuIcon", I(F({ isOpen: t, color: i })), void 0, !0)
]),
key: "0"
} : void 0,
o.$slots.optionPdf ? {
name: "optionPdf",
fn: f(() => [
v(o.$slots, "optionPdf", {}, void 0, !0)
]),
key: "1"
} : void 0,
o.$slots.optionCsv ? {
name: "optionCsv",
fn: f(() => [
v(o.$slots, "optionCsv", {}, void 0, !0)
]),
key: "2"
} : void 0,
o.$slots.optionImg ? {
name: "optionImg",
fn: f(() => [
v(o.$slots, "optionImg", {}, void 0, !0)
]),
key: "3"
} : void 0,
o.$slots.optionTable ? {
name: "optionTable",
fn: f(() => [
v(o.$slots, "optionTable", {}, void 0, !0)
]),
key: "4"
} : void 0,
o.$slots.optionFullscreen ? {
name: "optionFullscreen",
fn: f(({ toggleFullscreen: t, isFullscreen: i }) => [
v(o.$slots, "optionFullscreen", I(F({ toggleFullscreen: t, isFullscreen: i })), void 0, !0)
]),
key: "5"
} : void 0,
o.$slots.optionAnnotator ? {
name: "optionAnnotator",
fn: f(({ toggleAnnotator: t, isAnnotator: i }) => [
v(o.$slots, "optionAnnotator", I(F({ toggleAnnotator: t, isAnnotator: i })), void 0, !0)
]),
key: "6"
} : void 0
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : u("", !0),
x.value ? (r(), h("svg", {
key: 4,
ref_key: "svgRef",
ref: G,
xmlns: a(Te),
viewBox: `0 0 ${m.value.width} ${m.value.height}`,
class: ee({ "vue-data-ui-fullscreen--on": M.value, "vue-data-ui-fulscreen--off": !M.value }),
style: L(`overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
}, [
U(ze),
o.$slots["chart-background"] ? (r(), h("foreignObject", {
key: 0,
x: 0,
y: 0,
width: m.value.width,
height: m.value.height,
style: {
pointerEvents: "none"
}
}, [
v(o.$slots, "chart-background", {}, void 0, !0)
], 8, Ye)) : u("", !0),
s("defs", null, [
s("radialGradient", {
cx: "50%",
cy: "50%",
r: "50%",
fx: "50%",
fy: "50%",
id: `mood_radar_gradient_${_.value}`
}, [
s("stop", {
offset: "0%",
"stop-color": a(C)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.opacity)
}, null, 8, Ze),
s("stop", {
offset: "100%",
"stop-color": a(C)(a(Le)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.gradient.intensity / 100), e.value.style.chart.layout.dataPolygon.opacity)
}, null, 8, et)
], 8, Je)
]),
(r(!0), h(te, null, oe(j.value.coordinates, (t) => (r(), h("line", {
x1: m.value.width / 2,
y1: m.value.height / 2,
x2: t.x,
y2: t.y,
stroke: e.value.style.chart.layout.grid.stroke,
"stroke-width": e.value.style.chart.layout.grid.strokeWidth
}, null, 8, tt))), 256)),
s("path", {
d: j.value.path,
fill: "none",
stroke: e.value.style.chart.layout.outerPolygon.stroke,
"stroke-width": e.value.style.chart.layout.outerPolygon.strokeWidth,
"stroke-linejoin": "round",
"stroke-linecap": "round"
}, null, 8, ot),
s("path", {
fill: "none",
stroke: e.value.style.chart.layout.smileys.colors[5],
"stroke-width": "1",
"stroke-linecap": "round",
d: "M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"
}, null, 8, lt),
s("circle", {
class: "vue-ui-mood-radar-trap",
onMouseenter: l[0] || (l[0] = (t) => n.value = 5),
onMouseleave: l[1] || (l[1] = (t) => n.value = null),
cx: "128",
cy: "25",
r: "20",
fill: n.value === 5 ? a(C)(e.value.style.chart.layout.smileys.colors[5], 20) : "transparent"
}, null, 40, at),
s("path", {
fill: "none",
stroke: e.value.style.chart.layout.smileys.colors[4],
"stroke-width": "1",
"stroke-linecap": "round",
d: "M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"
}, null, 8, st),
s("circle", {
class: "vue-ui-mood-radar-trap",
onMouseenter: l[2] || (l[2] = (t) => n.value = 4),
onMouseleave: l[3] || (l[3] = (t) => n.value = null),
cx: "227",
cy: "95.5",
r: "20",
fill: n.value === 4 ? a(C)(e.value.style.chart.layout.smileys.colors[4], 20) : "transparent"
}, null, 40, rt),
s("path", {
fill: "none",
stroke: e.value.style.chart.layout.smileys.colors[3],
"stroke-width": "1",
"stroke-linecap": "round",
d: "M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"
}, null, 8, nt),
s("circle", {
class: "vue-ui-mood-radar-trap",
onMouseenter: l[4] || (l[4] = (t) => n.value = 3),
onMouseleave: l[5] || (l[5] = (t) => n.value = null),
cx: "190",
cy: "213.5",
r: "20",
fill: n.value === 3 ? a(C)(e.value.style.chart.layout.smileys.colors[3], 20) : "transparent"
}, null, 40, ut),
s("path", {
fill: "none",
stroke: e.value.style.chart.layout.smileys.colors[2],
"stroke-width": "1",
"stroke-linecap": "round",
d: "M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"
}, null, 8, it),
s("circle", {
class: "vue-ui-mood-radar-trap",
onMouseenter: l[6] || (l[6] = (t) => n.value = 2),
onMouseleave: l[7] || (l[7] = (t) => n.value = null),
cx: "65",
cy: "213.5",
r: "20",
fill: n.value === 2 ? a(C)(e.value.style.chart.layout.smileys.colors[2], 20) : "transparent"
}, null, 40, dt),
s("path", {
fill: "none",
stroke: e.value.style.chart.layout.smileys.colors[1],
"stroke-width": "1",
"stroke-linecap": "round",
d: "M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"
}, null, 8, ct),
s("circle", {
class: "vue-ui-mood-radar-trap",
onMouseenter: l[8] || (l[8] = (t) => n.value = 1),
onMouseleave: l[9] || (l[9] = (t) => n.value = null),
cx: "29",
cy: "95.5",
r: "20",
fill: n.value === 1 ? a(C)(e.value.style.chart.layout.smileys.colors[1], 20) : "transparent"
}, null, 40, vt),
s("path", {
d: a(Ie)(Y.value.map((t) => t.plots)),
stroke: e.value.style.chart.layout.dataPolygon.stroke,
"stroke-width": e.value.style.chart.layout.dataPolygon.strokeWidth,
"stroke-linecap": "round",
"stroke-linejoin": "round",
fill: e.value.style.chart.layout.dataPolygon.gradient.show ? `url(#mood_radar_gradient_${_.value})` : a(C)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.opacity)
}, null, 8, yt),
(r(!0), h(te, null, oe(Y.value.map((t) => t.plots), (t, i) => (r(), h("g", {
class: "vue-ui-mood-radar-trap",
style: L(`opacity:${n.value == t.key ? "1" : "0"}`)
}, [
s("line", {
x1: t.x,
y1: t.y,
x2: 128,
y2: 128,
stroke: e.value.style.chart.layout.smileys.colors[t.key]
}, null, 8, ht),
s("circle", {
cx: t.x,
cy: t.y,
fill: e.value.style.chart.layout.smileys.colors[t.key],
r: "3",
stroke: e.value.style.chart.backgroundColor,
"stroke-width": 0.5
}, null, 8, ft),
s("circle", {
cx: 128,
cy: 128,
fill: e.value.style.chart.layout.smileys.colors[t.key],
r: "3",
stroke: e.value.style.chart.backgroundColor,
"stroke-width": 0.5
}, null, 8, mt),
s("text", {
x: 128,
y: ["5", 5].includes(t.key) ? 145 : 120,
fill: e.value.style.chart.layout.dataLabel.color,
"font-size": "12",
"text-anchor": "middle",
"font-weight": e.value.style.chart.layout.dataLabel.bold ? "bold" : "normal"
}, N(a(se)(
e.value.style.chart.layout.dataLabel.formatter,
t.value,
a(S)({
p: e.value.style.chart.layout.dataLabel.prefix,
v: t.value,
s: e.value.style.chart.layout.dataLabel.suffix,
r: e.value.style.chart.layout.dataLabel.roundingValue
}),
{ datapoint: t, seriesIndex: i }
)), 9, pt),
s("text", {
x: 128,
y: ["5", 5].includes(t.key) ? 163 : 102,
fill: e.value.style.chart.layout.dataLabel.color,
"font-size": "12",
"text-anchor": "middle"
}, " (" + N(a(S)({
v: t.value / w.value * 100,
s: "%",
r: e.value.style.chart.layout.dataLabel.roundingPercentage
})) + ") ", 9, gt)
], 4))), 256)),
v(o.$slots, "svg", { svg: m.value }, void 0, !0)
], 14, Qe)) : u("", !0),
o.$slots.watermark ? (r(), h("div", kt, [
v(o.$slots, "watermark", I(F({ isPrinting: a(X) || a(K) })), void 0, !0)
])) : u("", !0),
x.value ? u("", !0) : (r(), p(De, {
key: 6,
config: {
type: "radar",
style: {
backgroundColor: e.value.style.chart.backgroundColor,
radar: {
grid: {
color: "#CCCCCC"
},
shapes: {
color: "#CCCCCC"
}
}
}
}
}, null, 8, ["config"])),
e.value.style.chart.legend.show ? (r(), p(Ue, {
legendSet: g.value,
config: pe.value,
key: `legend_${W.value}`,
style: { display: "flex", "row-gap": "6px" }
}, {
item: f(({ legend: t, index: i }) => [
s("div", {
onClick: () => ge(t.key),
style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center", margin: "3px 0" }
}, [
t.key == 1 ? (r(), p(A, {
key: 0,
strokeWidth: 1,
name: "moodSad",
stroke: e.value.style.chart.layout.smileys.colors[t.key]
}, null, 8, ["stroke"])) : u("", !0),
t.key == 2 ? (r(), p(A, {
key: 1,
strokeWidth: 1,
name: "moodFlat",
stroke: e.value.style.chart.layout.smileys.colors[t.key]
}, null, 8, ["stroke"])) : u("", !0),
t.key == 3 ? (r(), p(A, {
key: 2,
strokeWidth: 1,
name: "moodNeutral",
stroke: e.value.style.chart.layout.smileys.colors[t.key]
}, null, 8, ["stroke"])) : u("", !0),
t.key == 4 ? (r(), p(A, {
key: 3,
strokeWidth: 1,
name: "smiley",
stroke: e.value.style.chart.layout.smileys.colors[t.key]
}, null, 8, ["stroke"])) : u("", !0),
t.key == 5 ? (r(), p(A, {
key: 4,
strokeWidth: 1,
name: "moodHappy",
stroke: e.value.style.chart.layout.smileys.colors[t.key]
}, null, 8, ["stroke"])) : u("", !0),
s("span", Ct, N(a(se)(
e.value.style.chart.layout.dataLabel.formatter,
t.value,
a(S)({
p: e.value.style.chart.layout.dataLabel.prefix,
v: t.value,
s: e.value.style.chart.layout.dataLabel.suffix,
r: e.value.style.chart.layout.dataLabel.roundingValue
}),
{ datapoint: t, seriesIndex: i }
)), 1),
le(" (" + N(a(S)({
v: t.proportion * 100,
s: "%",
r: e.value.style.chart.legend.roundingPercentage
})) + ") ", 1)
], 8, bt)
]),
_: 1
}, 8, ["legendSet", "config"])) : u("", !0),
v(o.$slots, "legend", { legend: g.value }, void 0, !0),
o.$slots.source ? (r(), h("div", wt, [
v(o.$slots, "source", {}, void 0, !0)
], 512)) : u("", !0),
x.value ? (r(), p(We, {
key: 9,
hideDetails: "",
config: {
open: $.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: f(() => [
U(Be, {
colNames: O.value.colNames,
head: O.value.head,
body: O.value.body,
config: O.value.config,
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
onClose: l[10] || (l[10] = (t) => $.value.showTable = !1)
}, {
th: f(({ th: t }) => [
s("div", {
innerHTML: t,
style: { display: "flex", "align-items": "center" }
}, null, 8, xt)
]),
td: f(({ td: t }) => [
le(N(t.name || t), 1)
]),
_: 1
}, 8, ["colNames", "head", "body", "config", "title"])
]),
_: 1
}, 8, ["config"])) : u("", !0)
], 46, Ke));
}
}, Bt = /* @__PURE__ */ Xe(_t, [["__scopeId", "data-v-245f5bd2"]]);
export {
Bt as default
};