UNPKG

vue-data-ui

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

798 lines (797 loc) 27.8 kB
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js"; import { $ as t, D as n, Ot as r, S as i, X as a, i as o, jt as ee, pt as te, q as ne, qt as s, r as re, t as ie, tt as ae } from "./lib-Bttd6u5E.js"; import { n as oe, t as se } from "./useHints-Dq_w2E8B.js"; import { t as ce } from "./useConfig-D3scuR88.js"; import { t as le } from "./usePrinter-DN5bYhTG.js"; import { t as ue } from "./useSvgExport-DH-FfcqQ.js"; import { t as de } from "./useNestedProp-vPNvh7rV.js"; import { t as fe } from "./useThemeCheck-C43Tcqmk.js"; import { t as pe } from "./img-Bnokohej.js"; import { n as me } from "./Title-BE3qg9xl.js"; import { t as he } from "./_plugin-vue_export-helper-B3ysoDQm.js"; import { l as ge, t as _e } from "./useResponsive-ZtArZtUf.js"; import { t as ve } from "./DefGrad-DVBqDjhO.js"; import { t as ye } from "./useUserOptionState-DK-_1ddE.js"; import { t as be } from "./useChartAccessibility-DYqac8yF.js"; import { t as xe } from "./usePrefersMotion-BC-CsqR1.js"; import { t as Se } from "./vue_ui_funnel-_Og4EEkO.js"; import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as Ce, createTextVNode as we, createVNode as Te, defineAsyncComponent as m, guardReactiveProps as h, mergeProps as g, nextTick as Ee, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as De, onMounted as Oe, openBlock as b, ref as x, renderList as S, renderSlot as C, resolveDynamicComponent as ke, shallowRef as Ae, toDisplayString as w, unref as T, useCssVars as je, watch as Me, withCtx as E } from "vue"; //#region src/components/vue-ui-funnel.vue var Ne = /* @__PURE__ */ e({ default: () => Ke }), Pe = ["id"], Fe = ["xmlns", "viewBox"], Ie = ["width", "height"], Le = ["stroke", "stroke-width"], Re = ["stroke", "stroke-width"], ze = [ "x", "y", "font-size", "fill", "font-weight" ], Be = ["points", "fill"], Ve = [ "stroke", "stroke-width", "rx" ], He = [ "x", "y", "font-size", "fill", "font-weight" ], Ue = [ "x", "y", "font-size", "fill", "font-weight" ], We = { key: 5, class: "vue-data-ui-watermark" }, Ge = ["innerHTML"], Ke = /*#__PURE__*/ he({ __name: "vue-ui-funnel", props: { config: { type: Object, default() { return {}; } }, dataset: { type: Array, default() { return []; } } }, emits: ["copyAlt"], setup(e, { expose: he, emit: Ne }) { je((e) => ({ v1979a330: Dt.value })); let Ke = m(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), qe = m(() => import("./vue-ui-skeleton-EeJcGbCo.js").then((e) => e.n)), Je = m(() => import("./vue-ui-accordion-BxGriZik.js").then((e) => e.n)), Ye = m(() => import("./DataTable-BbKgJ5UI.js")), Xe = m(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Ze = m(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), Qe = m(() => import("./PackageVersion-D6d8SCp9.js").then((e) => e.t)), $e = m(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_funnel: et } = ce(), { isThemeValid: tt, warnInvalidTheme: nt } = fe(), D = xe(), O = e, rt = Ne, k = x(null), A = x(ne()), it = x(0), at = x(0), ot = x(0), st = x(null), ct = x(null), lt = x(null), j = Ae(null), M = Ae(null), N = x(!1), P = x(null), ut = x(null), F = x(!1), I = x(!1), L = l(() => !!O.dataset && O.dataset.length); Oe(dt); function dt() { if (ee(O.dataset) ? ae({ componentName: "VueUiFunnel", type: "dataset" }) : O.dataset.forEach((e, t) => { te({ datasetObject: e, requiredAttributes: ["name", "value"] }).forEach((e) => { L.value = !1, ae({ componentName: "VueUiFunnel", type: "datasetSerieAttribute", property: e, index: t }); }); }), R.value.responsive) { let e = ge(() => { let { width: e, height: t } = _e({ chart: k.value, title: R.value.style.chart.title.text ? lt.value : null, source: ct.value, noTitle: st.value }); requestAnimationFrame(() => { H.value.height = t, H.value.width = e, W.value = St(), R.value.responsiveProportionalSizing ? (V.value.circles = s({ relator: Math.min(e, t), adjuster: 600, source: R.value.style.chart.circles.dataLabels.fontSize, threshold: 10, fallback: 10 }), V.value.names = s({ relator: Math.min(e, t), adjuster: 600, source: R.value.style.chart.bars.dataLabels.name.fontSize, threshold: 10, fallback: 10 }), V.value.values = s({ relator: Math.min(e, t), adjuster: 600, source: R.value.style.chart.bars.dataLabels.value.fontSize, threshold: 10, fallback: 10 })) : (V.value.circles = R.value.style.chart.circles.dataLabels.fontSize, V.value.names = R.value.style.chart.bars.dataLabels.name.fontSize, V.value.values = R.value.style.chart.bars.dataLabels.value.fontSize); }); }); j.value && (M.value && j.value.unobserve(M.value), j.value.disconnect()), j.value = new ResizeObserver(e), M.value = k.value.parentNode, j.value.observe(M.value); } } De(() => { j.value && (M.value && j.value.unobserve(M.value), j.value.disconnect()); }); function ft() { let e = de({ userConfig: O.config, defaultConfig: et }), t = e.theme; if (!t) return e; if (!tt.value(e)) return nt(e), e; let n = de({ userConfig: Se[t] || O.config, defaultConfig: e }); return de({ userConfig: O.config, defaultConfig: n }); } let R = l({ get: () => ft(), set: (e) => e }); oe({ config: () => R.value, dataset: () => O.dataset, component: "VueUiFunnel", rules: [se.emptyArray, { test: (e) => e.length > 10, message: [ "👀 The dataset has a length > 10. Consider:", "", "▶️ Aggregating some datapoints into broader categories" ] }] }); let pt = l(() => R.value.userOptions.useCursorPointer), { userOptionsVisible: mt, setUserOptionsVisibility: ht, keepUserOptionState: gt } = ye({ config: R.value }), { svgRef: _t } = be({ config: R.value.style.chart.title }); Me(() => O.config, (e) => { R.value = ft(), mt.value = !R.value.userOptions.showOnChartHover, dt(), at.value += 1, ot.value += 1, V.value.circles = R.value.style.chart.circles.dataLabels.fontSize, V.value.names = R.value.style.chart.bars.dataLabels.name.fontSize, V.value.values = R.value.style.chart.bars.dataLabels.value.fontSize, B.value.showTable = R.value.table.show; }, { deep: !0 }); let { isPrinting: z, isImaging: vt, generatePdf: yt, generateImage: bt } = le({ elementId: `funnel_${A.value}`, fileName: R.value.style.chart.title.text || "vue-ui-funnel", options: R.value.userOptions.print }), xt = l(() => R.value.userOptions.show && !R.value.style.chart.title.text), B = x({ showTable: R.value.table.show }), V = x({ circles: R.value.style.chart.circles.dataLabels.fontSize, names: R.value.style.chart.bars.dataLabels.name.fontSize, values: R.value.style.chart.bars.dataLabels.value.fontSize }), H = l({ get: () => ({ height: R.value.style.chart.height, width: R.value.style.chart.width }), set: (e) => e }), U = l(() => L.value ? O.dataset.map((e, t) => ({ ...e, color: e.color ? i(e.color) : r(R.value.style.chart.bars.defaultColor, t / O.dataset.length) })) : []); setTimeout(() => { N.value = !0; }, U.value.length * 150); function St() { let e = R.value.style.chart.padding.left, t = R.value.style.chart.padding.top; return { left: e, top: t, right: H.value.width - R.value.style.chart.padding.right, bottom: H.value.height - R.value.style.chart.padding.bottom, width: H.value.width - e - R.value.style.chart.padding.right, height: H.value.height - t - R.value.style.chart.padding.bottom }; } let W = x(St()), G = l(() => W.value.height / O.dataset.length), K = l(() => G.value * R.value.style.chart.bars.gapRatio), Ct = l(() => W.value.width * R.value.style.chart.barCircleSpacingRatio), q = l(() => U.value.map((e, t) => { let n = G.value - K.value, r = W.value.top + K.value / 2 * t + (G.value - K.value / 2) * t + K.value / 2, i = e.value / U.value[0].value, a = (W.value.width - n - Ct.value) * (e.value / U.value[0].value); return { ...e, cx: W.value.left + n / 2, cy: r + n / 2, datapointIndex: t, fill: e.color, height: Math.max(n, 0), proportion: i, r: Math.max(n / 2, 0), width: Math.max(a, 0), x: W.value.left + n + Ct.value, y: r }; })), wt = l(() => { let e = q.value.map((e) => `${e.x + e.width},${e.y + (G.value - K.value) / 2}`); return `${q.value[0].x},${q.value[0].y + (G.value - K.value) / 2} ${e.toString()} ${q.value.at(-1).x},${q.value.at(-1).y + (G.value - K.value) / 2}`; }), Tt = l(() => ({ x1: q.value[0].cx, y1: q.value[0].cy, x2: q.value.at(-1).cx, y2: q.value.at(-1).cy })), J = x(!1); function Et(e) { J.value = e, it.value += 1; } let Dt = l(() => `${U.value.length * 150}ms`), Y = x(!1); function Ot() { Y.value = !Y.value; } function kt() { B.value.showTable = !B.value.showTable; } let X = l(() => ({ head: U.value.map((e) => ({ name: e.name, color: e.color })), body: U.value.map((e) => e.value) })), Z = l(() => { let e = [ R.value.table.columnNames.series, R.value.table.columnNames.value, R.value.table.columnNames.percentage ], t = X.value.head.map((e, t) => { let n = o(R.value.style.chart.bars.dataLabels.value.formatter, X.value.body[t], a({ p: R.value.style.chart.bars.dataLabels.value.prefix, v: X.value.body[t], s: R.value.style.chart.bars.dataLabels.value.suffix, r: R.value.table.td.roundingValue }), { datapoint: q.value[t] }), r = o(R.value.style.chart.circles.dataLabels.formatter, q.value[t].proportion * 100, a({ v: q.value[t].proportion * 100, s: "%", r: R.value.table.td.roundingPercentage }), { datapoint: q.value[t] }); return [ { color: e.color, name: e.name }, n, r ]; }), n = { th: { backgroundColor: R.value.table.th.backgroundColor, color: R.value.table.th.color, outline: R.value.table.th.outline }, td: { backgroundColor: R.value.table.td.backgroundColor, color: R.value.table.td.color, outline: R.value.table.td.outline }, breakpoint: R.value.table.responsiveBreakpoint }; return { colNames: [ R.value.table.columnNames.series, R.value.table.columnNames.value, R.value.table.columnNames.percentage ], head: e, body: t, config: n }; }); function Q(e = null) { Ee(() => { let r = X.value.head.map((e, t) => [ [e.name], [X.value.body[t]], [q.value[t].proportion * 100] ]), i = [ [R.value.style.chart.title.text], [R.value.style.chart.title.subtitle.text], [ [R.value.table.columnNames.series], [R.value.table.columnNames.value], ["%"] ] ].concat(r), a = n(i); e ? e(a) : t({ csvContent: a, title: R.value.style.chart.title.text || "vue-ui-funnel" }); }); } function At() { return U.value; } async function jt({ scale: e = 2 } = {}) { if (!k.value) return; let { width: t, height: n } = k.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await pe({ domElement: k.value, base64: !0, img: !0, scale: e }); return { imageUri: i, base64: a, title: R.value.style.chart.title.text, width: t, height: n, aspectRatio: r }; } let $ = l(() => { let e = R.value.table.useDialog && !R.value.table.show, t = B.value.showTable; return { component: e ? $e : Je, title: `${R.value.style.chart.title.text}${R.value.style.chart.title.subtitle.text ? `: ${R.value.style.chart.title.subtitle.text}` : ""}`, props: e ? { backgroundColor: R.value.table.th.backgroundColor, color: R.value.table.th.color, headerColor: R.value.table.th.color, headerBg: R.value.table.th.backgroundColor, isFullscreen: J.value, fullscreenParent: k.value, forcedWidth: Math.min(800, window.innerWidth * .8) } : { hideDetails: !0, config: { open: t, maxHeight: 1e4, body: { backgroundColor: R.value.style.chart.backgroundColor, color: R.value.style.chart.color }, head: { backgroundColor: R.value.style.chart.backgroundColor, color: R.value.style.chart.color } } } }; }); Me(() => B.value.showTable, (e) => { R.value.table.show || (e && R.value.table.useDialog && P.value ? P.value.open() : "close" in P.value && P.value.close()); }); function Mt() { B.value.showTable = !1, ut.value && ut.value.setTableIconState(!1); } let Nt = l(() => R.value.style.chart.backgroundColor), Pt = l(() => R.value.style.chart.title), { exportSvg: Ft, getSvg: It } = ue({ svg: _t, title: Pt, backgroundColor: Nt }); async function Lt({ isCb: e }) { I.value = !0, await Ee(); try { if (e) { let { blob: e, url: t, text: n, dataUrl: r } = await It(); await Promise.resolve(R.value.userOptions.callbacks.svg({ blob: e, url: t, text: n, dataUrl: r })); } else await Promise.resolve(Ft()); } finally { I.value = !1; } } function Rt(e) { if (e?.stage === "start") { F.value = !0; return; } if (e?.stage === "end") { F.value = !1; return; } bt(); } async function zt() { if (rt("copyAlt", { config: R.value, dataset: U.value }), !R.value.userOptions.callbacks.altCopy) { console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions."); return; } await Promise.resolve(R.value.userOptions.callbacks.altCopy({ config: R.value, dataset: U.value })); } return he({ getData: At, getImage: jt, generatePdf: yt, generateCsv: Q, generateImage: bt, generateSvg: Lt, toggleTable: kt, toggleAnnotator: Ot, toggleFullscreen: Et, copyAlt: zt }), (e, t) => (b(), f("div", { ref_key: "funnelChart", ref: k, class: _(`vue-data-ui-component vue-ui-funnel ${J.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${R.value.useCssAnimation ? "" : "vue-ui-dna"}`), style: y(`font-family:${R.value.style.fontFamily};width:100%; ${R.value.responsive ? "height:100%;" : ""} text-align:center;background:${R.value.style.chart.backgroundColor}`), id: `funnel_${A.value}`, onMouseenter: t[1] ||= () => T(ht)(!0), onMouseleave: t[2] ||= () => T(ht)(!1) }, [ R.value.userOptions.buttons.annotator ? (b(), u(T(Ze), { key: 0, svgRef: T(_t), backgroundColor: R.value.style.chart.backgroundColor, color: R.value.style.chart.color, active: Y.value, isCursorPointer: pt.value, onClose: Ot }, { "annotator-action-close": E(() => [C(e.$slots, "annotator-action-close", {}, void 0, !0)]), "annotator-action-color": E(({ color: t }) => [C(e.$slots, "annotator-action-color", v(h({ color: t })), void 0, !0)]), "annotator-action-draw": E(({ mode: t }) => [C(e.$slots, "annotator-action-draw", v(h({ mode: t })), void 0, !0)]), "annotator-action-undo": E(({ disabled: t }) => [C(e.$slots, "annotator-action-undo", v(h({ disabled: t })), void 0, !0)]), "annotator-action-redo": E(({ disabled: t }) => [C(e.$slots, "annotator-action-redo", v(h({ disabled: t })), void 0, !0)]), "annotator-action-delete": E(({ disabled: t }) => [C(e.$slots, "annotator-action-delete", v(h({ disabled: t })), void 0, !0)]), _: 3 }, 8, [ "svgRef", "backgroundColor", "color", "active", "isCursorPointer" ])) : d("", !0), xt.value ? (b(), f("div", { key: 1, ref_key: "noTitle", ref: st, class: "vue-data-ui-no-title-space", style: "height:36px; width: 100%;background:transparent" }, null, 512)) : d("", !0), R.value.style.chart.title.text ? (b(), f("div", { key: 2, ref_key: "chartTitle", ref: lt, style: "width:100%;background:transparent;padding-bottom:24px" }, [(b(), u(me, { key: `title_${at.value}`, config: { title: { cy: "funnel-div-title", ...R.value.style.chart.title }, subtitle: { cy: "funnel-div-subtitle", ...R.value.style.chart.title.subtitle } } }, null, 8, ["config"]))], 512)) : d("", !0), R.value.userOptions.show && L.value && (T(gt) || T(mt)) ? (b(), u(T(Xe), { ref_key: "userOptionsRef", ref: ut, key: `user_option_${it.value}`, backgroundColor: R.value.style.chart.backgroundColor, color: R.value.style.chart.color, isPrinting: T(z), isImaging: T(vt), uid: A.value, hasTooltip: !1, hasPdf: R.value.userOptions.buttons.pdf, hasImg: R.value.userOptions.buttons.img, hasSvg: R.value.userOptions.buttons.svg, hasXls: R.value.userOptions.buttons.csv, hasTable: R.value.userOptions.buttons.table, hasLabel: !1, hasFullscreen: R.value.userOptions.buttons.fullscreen, hasAltCopy: R.value.userOptions.buttons.altCopy, isFullscreen: J.value, chartElement: k.value, position: R.value.userOptions.position, titles: { ...R.value.userOptions.buttonTitles }, hasAnnotator: R.value.userOptions.buttons.annotator, isAnnotation: Y.value, callbacks: R.value.userOptions.callbacks, printScale: R.value.userOptions.print.scale, tableDialog: R.value.table.useDialog, isCursorPointer: pt.value, onToggleAnnotator: Ot, onToggleFullscreen: Et, onGeneratePdf: T(yt), onGenerateImage: Rt, onGenerateSvg: Lt, onToggleTable: kt, onGenerateCsv: Q, onCopyAlt: zt, style: y({ visibility: T(gt) ? T(mt) ? "visible" : "hidden" : "visible" }) }, Ce({ _: 2 }, [ e.$slots.menuIcon ? { name: "menuIcon", fn: E(({ isOpen: t, color: n }) => [C(e.$slots, "menuIcon", v(h({ isOpen: t, color: n })), void 0, !0)]), key: "0" } : void 0, e.$slots.optionPdf ? { name: "optionPdf", fn: E(() => [C(e.$slots, "optionPdf", {}, void 0, !0)]), key: "1" } : void 0, e.$slots.optionCsv ? { name: "optionCsv", fn: E(() => [C(e.$slots, "optionCsv", {}, void 0, !0)]), key: "2" } : void 0, e.$slots.optionImg ? { name: "optionImg", fn: E(() => [C(e.$slots, "optionImg", {}, void 0, !0)]), key: "3" } : void 0, e.$slots.optionSvg ? { name: "optionSvg", fn: E(() => [C(e.$slots, "optionSvg", {}, void 0, !0)]), key: "4" } : void 0, e.$slots.optionTable ? { name: "optionTable", fn: E(() => [C(e.$slots, "optionTable", {}, void 0, !0)]), key: "5" } : void 0, e.$slots.optionFullscreen ? { name: "optionFullscreen", fn: E(({ toggleFullscreen: t, isFullscreen: n }) => [C(e.$slots, "optionFullscreen", v(h({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)]), key: "6" } : void 0, e.$slots.optionAnnotator ? { name: "optionAnnotator", fn: E(({ toggleAnnotator: t, isAnnotator: n }) => [C(e.$slots, "optionAnnotator", v(h({ toggleAnnotator: t, isAnnotator: n })), void 0, !0)]), key: "7" } : void 0, e.$slots.optionAltCopy ? { name: "optionAltCopy", fn: E(({ altCopy: t }) => [C(e.$slots, "optionAltCopy", v(h({ altCopy: t })), void 0, !0)]), key: "8" } : void 0, e.$slots["custom-menu-before"] ? { name: "custom-menu-before", fn: E(() => [C(e.$slots, "custom-menu-before", {}, void 0, !0)]), key: "9" } : void 0, e.$slots["custom-menu-after"] ? { name: "custom-menu-after", fn: E(() => [C(e.$slots, "custom-menu-after", {}, void 0, !0)]), key: "10" } : void 0 ]), 1032, [ "backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasFullscreen", "hasAltCopy", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style" ])) : d("", !0), L.value ? (b(), f("svg", { key: 4, ref_key: "svgRef", ref: _t, xmlns: T(ie), class: _({ "vue-data-ui-fullscreen--on": J.value, "vue-data-ui-fulscreen--off": !J.value }), viewBox: `0 0 ${H.value.width <= 0 ? 10 : H.value.width} ${H.value.height <= 0 ? 10 : H.value.height}`, style: y(`max-width:100%; overflow: visible; background:transparent;color:${R.value.style.chart.color}`) }, [ Te(T(Qe)), e.$slots["chart-background"] ? (b(), f("foreignObject", { key: 0, x: 0, y: 0, width: H.value.width <= 0 ? 10 : H.value.width, height: H.value.height <= 0 ? 10 : H.value.height, style: { pointerEvents: "none" } }, [C(e.$slots, "chart-background", {}, void 0, !0)], 8, Ie)) : d("", !0), p("defs", null, [Te(ve, { t: "linear", id: `funnel_area_${A.value}`, x1: "0%", x2: "100%", y1: "0%", y2: "0%", stops: [ [ "0%", R.value.style.chart.backgroundColor, 0 ], [ "20%", R.value.style.chart.area.color, 1 ], [ "100%", R.value.style.chart.area.color, 1 ] ] }, null, 8, ["id", "stops"])]), R.value.style.chart.circleLinks.show ? (b(), f("line", g({ key: 1 }, Tt.value, { stroke: R.value.style.chart.circleLinks.color, "stroke-width": 12 * R.value.style.chart.circleLinks.widthRatio, "stroke-linecap": "round", class: { animated: R.value.useCssAnimation && !T(D) }, style: { strokeDasharray: R.value.useCssAnimation && !T(D) ? W.value.height : 0, strokeDashoffset: R.value.useCssAnimation && !T(D) ? W.value.height : 0 } }), null, 16, Le)) : d("", !0), (b(!0), f(c, null, S(q.value, ({ cx: e, cy: t, r: n, fill: r }, i) => (b(), f("circle", g({ ref_for: !0 }, { cx: e, cy: t, r: n, fill: r }, { stroke: R.value.style.chart.circles.stroke, "stroke-width": R.value.style.chart.circles.strokeWidth, class: { animated: R.value.useCssAnimation && !N.value && !T(D) }, style: { animationDelay: `${150 * i}ms` } }), null, 16, Re))), 256)), (b(!0), f(c, null, S(q.value, (e, t) => (b(), f("text", { x: e.cx, y: e.cy + V.value.circles / 3 + R.value.style.chart.circles.dataLabels.offsetY, "text-anchor": "middle", "font-size": V.value.circles, fill: R.value.style.chart.circles.dataLabels.adaptColorToBackground ? T(re)(e.color) : R.value.style.chart.circles.dataLabels.color, "font-weight": R.value.style.chart.circles.dataLabels.bold ? "bold" : "normal", class: _({ animated: R.value.useCssAnimation && !N.value && !T(D) }), style: y({ animationDelay: `${150 * t}ms` }) }, w(T(o)(R.value.style.chart.circles.dataLabels.formatter, e.proportion * 100, T(a)({ v: e.proportion * 100, s: "%", r: R.value.style.chart.circles.dataLabels.rounding }), { datapoint: e })), 15, ze))), 256)), R.value.style.chart.area.show ? (b(), f("polygon", { key: 2, points: wt.value, fill: `url(#funnel_area_${A.value})`, class: _({ animated: R.value.useCssAnimation && !N.value && !T(D) }), style: y({ transition: R.value.useCssAnimation ? `all ${150 * U.value.length}ms ease-in` : "none" }) }, null, 14, Be)) : d("", !0), (b(!0), f(c, null, S(q.value, ({ x: e, y: t, height: n, width: r, fill: i }, a) => (b(), f("rect", g({ ref_for: !0 }, { x: e, y: t, height: n, width: r, fill: i }, { stroke: R.value.style.chart.bars.stroke, "stroke-width": R.value.style.chart.bars.strokeWidth, rx: R.value.style.chart.bars.borderRadius, class: { animated: R.value.useCssAnimation && !N.value && !T(D) }, style: { animationDelay: `${150 * a}ms` } }), null, 16, Ve))), 256)), (b(!0), f(c, null, S(q.value, (e, t) => (b(), f("g", null, [p("text", { x: e.x + e.width + R.value.style.chart.bars.dataLabels.name.offsetX + 12, y: e.cy - V.value.names / 2 + R.value.style.chart.bars.dataLabels.name.offsetY, "text-anchor": "start", "font-size": V.value.names, fill: R.value.style.chart.bars.dataLabels.name.color, "font-weight": R.value.style.chart.bars.dataLabels.name.bold ? "bold" : "normal", class: _({ animated: R.value.useCssAnimation && !N.value && !T(D) }), style: y({ animationDelay: `${150 * t}ms` }) }, w(e.name), 15, He), p("text", { x: e.x + e.width + R.value.style.chart.bars.dataLabels.value.offsetX + 12, y: e.cy + V.value.values + R.value.style.chart.bars.dataLabels.value.offsetY, "text-anchor": "start", "font-size": V.value.values, fill: R.value.style.chart.bars.dataLabels.value.color, "font-weight": R.value.style.chart.bars.dataLabels.value.bold ? "bold" : "normal", class: _({ animated: R.value.useCssAnimation && !N.value && !T(D) }), style: y({ animationDelay: `${150 * t}ms` }) }, w(T(o)(R.value.style.chart.bars.dataLabels.value.formatter, e.value, T(a)({ p: R.value.style.chart.bars.dataLabels.value.prefix, v: e.value, s: R.value.style.chart.bars.dataLabels.value.suffix, r: R.value.style.chart.bars.dataLabels.value.rounding }), { datapoint: e })), 15, Ue)]))), 256)), C(e.$slots, "svg", { svg: { ...H.value, isPrintingImg: T(z) || T(vt) || F.value, isPrintingSvg: I.value } }, void 0, !0) ], 14, Fe)) : d("", !0), e.$slots.watermark ? (b(), f("div", We, [C(e.$slots, "watermark", v(h({ isPrinting: T(z) || T(vt) || F.value || I.value })), void 0, !0)])) : d("", !0), L.value ? d("", !0) : (b(), u(T(qe), { key: 6, config: { type: "verticalBar", style: { backgroundColor: R.value.style.chart.backgroundColor, verticalBar: { axis: { color: "#CCCCCC" }, color: "#CCCCCC" } } } }, null, 8, ["config"])), e.$slots.source ? (b(), f("div", { key: 7, ref_key: "source", ref: ct, dir: "auto" }, [C(e.$slots, "source", {}, void 0, !0)], 512)) : d("", !0), L.value && R.value.userOptions.buttons.table ? (b(), u(ke($.value.component), g({ key: 8 }, $.value.props, { ref_key: "tableUnit", ref: P, onClose: Mt }), Ce({ content: E(() => [(b(), u(T(Ye), { key: `table_${ot.value}`, colNames: Z.value.colNames, head: Z.value.head, body: Z.value.body, config: Z.value.config, title: R.value.table.useDialog ? "" : $.value.title, withCloseButton: !R.value.table.useDialog, onClose: Mt }, { th: E(({ th: e }) => [p("div", { innerHTML: e, style: { display: "flex", "align-items": "center" } }, null, 8, Ge)]), td: E(({ td: e }) => [we(w(e.name ? e.name : e), 1)]), _: 1 }, 8, [ "colNames", "head", "body", "config", "title", "withCloseButton" ]))]), _: 2 }, [R.value.table.useDialog ? { name: "title", fn: E(() => [we(w($.value.title), 1)]), key: "0" } : void 0, R.value.table.useDialog ? { name: "actions", fn: E(() => [p("button", { tabindex: "0", class: "vue-ui-user-options-button", onClick: t[0] ||= (e) => Q(R.value.userOptions.callbacks.csv) }, [Te(T(Ke), { name: "fileCsv", stroke: $.value.props.color }, null, 8, ["stroke"])])]), key: "1" } : void 0]), 1040)) : d("", !0) ], 46, Pe)); } }, [["__scopeId", "data-v-7addf37e"]]); //#endregion export { Ne as n, Ke as t };