UNPKG

vue-data-ui-hq

Version:

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

721 lines (720 loc) 29.3 kB
import { computed as p, ref as c, watch as Ut, onMounted as Vt, onBeforeUnmount as Et, openBlock as r, createElementBlock as n, normalizeClass as F, unref as t, normalizeStyle as B, createBlock as T, createCommentVNode as h, createSlots as Ht, withCtx as v, renderSlot as f, normalizeProps as M, guardReactiveProps as W, createVNode as $t, Fragment as g, renderList as C, createElementVNode as k, toDisplayString as L, mergeProps as Rt, createTextVNode as Bt, nextTick as Xt } from "vue"; import { u as jt, c as tt, t as Yt, a as Jt, p as A, o as qt, e as et, g as _t, b as Kt, d as Tt, v as Qt, D as Zt, f as X, X as te, i as ot, l as ee, h as oe, x as Lt, y as le, q as se, r as ae, F as re } from "./index-WrV3SAID.js"; import { t as ie, u as ne } from "./useResponsive-CoxXLe23.js"; import { _ as ue } from "./Title-BR-xoRp4.js"; import { u as ce, U as he } from "./usePrinter-kVpf1iV8.js"; import { _ as de } from "./Tooltip-ho4JxRm-.js"; import { D as pe } from "./DataTable-DNPvKWC0.js"; import fe from "./vue-ui-skeleton-Qec_XSRf.js"; import { _ as ye } from "./Shape-DNIrFW-J.js"; import ve from "./vue-ui-accordion-BQCDXXDs.js"; import { u as At } from "./useNestedProp-Cj0kHD7k.js"; import { _ as be } from "./PackageVersion-1NslmM8M.js"; import { P as me } from "./PenAndPaper-BF1ZRVm3.js"; import { u as ge } from "./useUserOptionState-BIvW1Kz7.js"; import { _ as ke } from "./_plugin-vue_export-helper-CHgC5LLL.js"; const xe = ["id"], Ce = ["xmlns", "viewBox"], we = ["x", "y", "width", "height"], $e = { key: 1 }, _e = { key: 0 }, Te = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Le = { key: 1 }, Ae = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Se = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Pe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Oe = ["x", "y", "fill", "font-size"], ze = ["x", "y", "font-size", "fill"], Ne = ["fill", "font-size", "transform"], Fe = ["fill", "font-size", "x", "y"], Me = ["x1", "x2", "y1", "y2", "stroke"], We = ["cx", "cy", "fill"], Ie = ["cx", "cy", "fill"], De = ["id"], Ge = ["stop-color"], Ue = ["stop-color"], Ve = ["stop-color"], Ee = { key: 0 }, He = ["x", "y", "font-size", "fill"], Re = { key: 5, class: "vue-data-ui-watermark" }, Be = ["innerHTML"], Xe = { __name: "vue-ui-strip-plot", props: { config: { type: Object, default() { return {}; } }, dataset: { type: Array, default() { return []; } } }, emits: ["selectDatapoint"], setup(St, { expose: Pt, emit: Ot }) { const { vue_ui_strip_plot: zt } = jt(), b = St, Nt = Ot, w = p({ get() { return !!b.dataset && b.dataset.length; }, set(o) { return o; } }), j = c(tt()), lt = c(0), Y = c(!1), J = c(""), S = c(null), st = c(null), at = c(null), rt = c(null), it = c(!1), nt = c(0), ut = c(0), e = p({ get: () => dt(), set: (o) => o }), { userOptionsVisible: q, setUserOptionsVisibility: ct, keepUserOptionState: ht } = ge({ config: e.value }); function dt() { const o = At({ userConfig: b.config, defaultConfig: zt }); return o.theme ? { ...At({ userConfig: Yt.vue_ui_strip_plot[o.theme] || b.config, defaultConfig: o }), customPalette: Jt[o.theme] || A } : o; } Ut(() => b.config, (o) => { e.value = dt(), q.value = !e.value.showOnChartHover, pt(), nt.value += 1, ut.value += 1; }, { deep: !0 }); const I = c(null); Vt(() => { pt(); }); function pt() { if (qt(b.dataset) ? et({ componentName: "VueUiStripPlot", type: "dataset" }) : b.dataset.forEach((o, a) => { _t({ datasetObject: o, requiredAttributes: ["name", "plots"] }).forEach((l) => { w.value = !1, et({ componentName: "VueUiStripPlot", type: "datasetSerieAttribute", property: l, index: a }); }), o.plots && o.plots.forEach((l, i) => { _t({ datasetObject: l, requiredAttributes: ["name", "value"] }).forEach((u) => { w.value = !1, et({ componentName: "VueUiStripPlot", type: "datasetSerieAttribute", property: u, index: `${a},${i}` }); }); }); }), e.value.responsive) { const o = ie(() => { const { width: a, height: l } = ne({ chart: S.value, title: e.value.style.chart.title.text ? st.value : null, source: at.value, noTitle: rt.value }); D.value = l, P.value.width = a, P.value.height = l, N.value = (a - m.value.left - m.value.right) / b.dataset.length, G.value = re({ relator: Math.min(l, a), adjuster: 600, source: e.value.style.chart.plots.radius, threshold: 6, fallback: 6 }); }); I.value = new ResizeObserver(o), I.value.observe(S.value.parentNode); } it.value = !0, setTimeout(() => { z.value = !1; }, Mt.value * 50); } Et(() => { I.value && I.value.disconnect(); }); const { isPrinting: ft, isImaging: yt, generatePdf: vt, generateImage: bt } = ce({ elementId: `strip-plot_${j.value}`, fileName: e.value.style.chart.title.text || "vue-ui-strip-plot" }), Ft = p(() => e.value.userOptions.show && !e.value.style.chart.title.text), mt = p(() => Kt(e.value.customPalette)), z = c(e.value.useCssAnimation), y = c({ showTable: e.value.table.show, dataLabels: { show: e.value.style.chart.labels.bestPlotLabel.show }, showTooltip: e.value.style.chart.tooltip.show }), m = c({ top: e.value.style.chart.padding.top, bottom: e.value.style.chart.padding.bottom, left: e.value.style.chart.padding.left, right: e.value.style.chart.padding.right }), N = c(e.value.style.chart.stripWidth), D = c(e.value.style.chart.height), G = c(e.value.style.chart.plots.radius), P = c({ width: N.value * b.dataset.length + m.value.left + m.value.right, height: e.value.style.chart.height }), s = p(() => { const o = N.value * b.dataset.length + m.value.left + m.value.right; return { left: m.value.left, right: o - m.value.right, top: m.value.top, bottom: D.value - m.value.bottom, width: N.value * b.dataset.length, height: D.value - m.value.top - m.value.bottom, stripWidth: N.value, absoluteHeight: D.value, absoluteWidth: o }; }), U = p(() => w.value ? b.dataset.map((o, a) => { const l = tt(); return { ...o, id: l, color: o.color ? Tt(o.color) : mt.value[a] || A[a] || A[a % A.length], plots: o.plots.map((i) => ({ ...i, value: Qt(i.value), parentId: l, color: o.color ? Tt(o.color) : mt.value[a] || A[a] || A[a % A.length], id: tt() })).sort((i, u) => i.value - u.value) }; }) : null), x = p(() => (U.value || []).map((o, a) => ({ ...o, plots: o.plots.map((l) => ({ ...l, x: s.value.left + (a + 1) * s.value.stripWidth - s.value.stripWidth / 2 })) }))), Mt = p(() => Math.max(...x.value.map((o) => o.plots.length))), K = p(() => { const o = x.value.flatMap((a) => a.plots.map((l) => l.value)); return { max: Math.max(...o), min: Math.min(...o) }; }), $ = p(() => Zt(K.value.min < 0 ? K.value.min : 0, K.value.max, e.value.style.chart.grid.scaleSteps)), Wt = p(() => (x.value || []).map((o, a) => ({ ...o, plots: o.plots.map((l) => ({ ...l, y: s.value.bottom - (l.value + Math.abs($.value.min)) / ($.value.max + Math.abs($.value.min)) * s.value.height })) }))), gt = p(() => $.value.ticks.map((o) => ({ y: s.value.bottom - s.value.height * ((o + Math.abs($.value.min)) / ($.value.max + Math.abs($.value.min))), x1: s.value.left, x2: s.value.right, value: o }))), Q = c(null), d = c(null); function It({ datapoint: o, seriesIndex: a }) { Q.value = { datapoint: o, seriesIndex: a, config: e.value, series: U.value }, Y.value = !0, d.value = o; const l = e.value.style.chart.tooltip.customFormat; if (Lt(l) && le(() => l({ seriesIndex: a, datapoint: o, series: U.value, config: e.value }))) J.value = l({ seriesIndex: a, datapoint: o, series: U.value, config: e.value }); else { let i = ""; i += `<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(#${o.parentId})` : o.color}"/></svg>${o.name}</div>`, i += `<div>${ot( e.value.style.chart.labels.formatter, o.value, X({ p: e.value.style.chart.labels.prefix, v: o.value, s: e.value.style.chart.labels.suffix, r: e.value.style.chart.tooltip.roundingValue }), { datapoint: o, seriesIndex: a } )}</div>`, J.value = `<div>${i}</div>`; } } const V = p(() => { const o = x.value.flatMap((l) => JSON.parse(JSON.stringify(l.plots)).sort((i, u) => u.value - i.value).map((i) => ({ name: `${l.name} - ${i.name}`, color: i.color }))), a = x.value.flatMap((l) => JSON.parse(JSON.stringify(l.plots)).sort((i, u) => u.value - i.value).map((i) => i.value)); return { head: o, body: a }; }); function kt() { Xt(() => { const o = V.value.head.map((i, u) => [[ i.name ], [V.value.body[u]]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[e.value.table.columnNames.series], [e.value.table.columnNames.value]]].concat(o), l = se(a); ae({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-strip-plot" }); }); } const E = p(() => { const o = [ e.value.table.columnNames.series, e.value.table.columnNames.value ], a = V.value.head.map((u, _) => { const R = X({ p: e.value.style.chart.labels.prefix, v: V.value.body[_], s: e.value.style.chart.labels.suffix, r: e.value.table.td.roundingValue }); return [ { color: u.color, name: u.name }, R ]; }), 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 ], head: o, body: a, config: l }; }), O = c(!1); function Dt(o) { O.value = o, lt.value += 1; } function Gt() { return x.value; } function xt() { y.value.showTable = !y.value.showTable; } function Ct() { y.value.dataLabels.show = !y.value.dataLabels.show; } function wt() { y.value.showTooltip = !y.value.showTooltip; } const H = c(!1); function Z() { H.value = !H.value; } return Pt({ getData: Gt, generatePdf: vt, generateCsv: kt, generateImage: bt, toggleTable: xt, toggleLabels: Ct, toggleTooltip: wt, toggleAnnotator: Z }), (o, a) => (r(), n("div", { ref_key: "stripPlotChart", ref: S, class: F(`vue-ui-strip-plot ${t(O) ? "vue-data-ui-wrapper-fullscreen" : ""} ${t(e).useCssAnimation ? "" : "vue-ui-dna"}`), style: B(`font-family:${t(e).style.fontFamily};width:100%; text-align:center;background:${t(e).style.chart.backgroundColor};${t(e).responsive ? "height:100%" : ""}`), id: `strip-plot_${t(j)}`, onMouseenter: a[2] || (a[2] = () => t(ct)(!0)), onMouseleave: a[3] || (a[3] = () => t(ct)(!1)) }, [ t(e).userOptions.buttons.annotator ? (r(), T(me, { key: 0, parent: t(S), backgroundColor: t(e).style.chart.backgroundColor, color: t(e).style.chart.color, active: t(H), onClose: Z }, null, 8, ["parent", "backgroundColor", "color", "active"])) : h("", !0), t(Ft) ? (r(), n("div", { key: 1, ref_key: "noTitle", ref: rt, class: "vue-data-ui-no-title-space", style: "height:36px; width: 100%;background:transparent" }, null, 512)) : h("", !0), t(e).style.chart.title.text ? (r(), n("div", { key: 2, ref_key: "chartTitle", ref: st, style: "width:100%;background:transparent;padding-bottom:24px" }, [ (r(), T(ue, { key: `title_${t(nt)}`, config: { title: { cy: "donut-div-title", ...t(e).style.chart.title }, subtitle: { cy: "donut-div-subtitle", ...t(e).style.chart.title.subtitle } } }, null, 8, ["config"])) ], 512)) : h("", !0), t(e).userOptions.show && t(w) && (t(ht) || t(q)) ? (r(), T(he, { ref: "details", key: `user_option_${t(lt)}`, backgroundColor: t(e).style.chart.backgroundColor, color: t(e).style.chart.color, isPrinting: t(ft), isImaging: t(yt), uid: t(j), hasTooltip: t(e).userOptions.buttons.tooltip && t(e).style.chart.tooltip.show, hasPdf: t(e).userOptions.buttons.pdf, hasXls: t(e).userOptions.buttons.csv, hasImg: t(e).userOptions.buttons.img, hasTable: t(e).userOptions.buttons.table, hasLabel: t(e).userOptions.buttons.labels, hasFullscreen: t(e).userOptions.buttons.fullscreen, isTooltip: t(y).showTooltip, isFullscreen: t(O), titles: { ...t(e).userOptions.buttonTitles }, chartElement: t(S), position: t(e).userOptions.position, hasAnnotator: t(e).userOptions.buttons.annotator, isAnnotation: t(H), onToggleFullscreen: Dt, onGeneratePdf: t(vt), onGenerateCsv: kt, onGenerateImage: t(bt), onToggleTable: xt, onToggleLabels: Ct, onToggleTooltip: wt, onToggleAnnotator: Z, style: B({ visibility: t(ht) ? t(q) ? "visible" : "hidden" : "visible" }) }, Ht({ _: 2 }, [ o.$slots.optionTooltip ? { name: "optionTooltip", fn: v(() => [ f(o.$slots, "optionTooltip", {}, void 0, !0) ]), key: "0" } : void 0, o.$slots.optionPdf ? { name: "optionPdf", fn: v(() => [ f(o.$slots, "optionPdf", {}, void 0, !0) ]), key: "1" } : void 0, o.$slots.optionCsv ? { name: "optionCsv", fn: v(() => [ f(o.$slots, "optionCsv", {}, void 0, !0) ]), key: "2" } : void 0, o.$slots.optionImg ? { name: "optionImg", fn: v(() => [ f(o.$slots, "optionImg", {}, void 0, !0) ]), key: "3" } : void 0, o.$slots.optionTable ? { name: "optionTable", fn: v(() => [ f(o.$slots, "optionTable", {}, void 0, !0) ]), key: "4" } : void 0, o.$slots.optionLabels ? { name: "optionLabels", fn: v(() => [ f(o.$slots, "optionLabels", {}, void 0, !0) ]), key: "5" } : void 0, o.$slots.optionFullscreen ? { name: "optionFullscreen", fn: v(({ toggleFullscreen: l, isFullscreen: i }) => [ f(o.$slots, "optionFullscreen", M(W({ toggleFullscreen: l, isFullscreen: i })), void 0, !0) ]), key: "6" } : void 0, o.$slots.optionAnnotator ? { name: "optionAnnotator", fn: v(({ toggleAnnotator: l, isAnnotator: i }) => [ f(o.$slots, "optionAnnotator", M(W({ toggleAnnotator: l, isAnnotator: i })), void 0, !0) ]), key: "7" } : void 0 ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : h("", !0), t(w) ? (r(), n("svg", { key: 4, xmlns: t(te), class: F({ "vue-data-ui-fullscreen--on": t(O), "vue-data-ui-fulscreen--off": !t(O) }), viewBox: `0 0 ${t(P).width <= 0 ? 10 : t(P).width} ${t(P).height <= 0 ? 10 : t(P).height}`, style: B(`max-width:100%; overflow: visible; background:transparent;color:${t(e).style.chart.color};`) }, [ $t(be), o.$slots["chart-background"] ? (r(), n("foreignObject", { key: 0, x: t(s).left, y: t(s).top, width: t(s).width, height: t(s).height, style: { pointerEvents: "none" } }, [ f(o.$slots, "chart-background", {}, void 0, !0) ], 8, we)) : h("", !0), t(e).style.chart.grid.show ? (r(), n("g", $e, [ t(e).style.chart.grid.horizontalGrid.show ? (r(), n("g", _e, [ (r(!0), n(g, null, C(t(gt), (l) => (r(), n("line", { x1: l.x1, x2: l.x2, y1: l.y, y2: l.y, stroke: t(e).style.chart.grid.horizontalGrid.stroke, "stroke-width": t(e).style.chart.grid.horizontalGrid.strokeWidth, "stroke-dasharray": t(e).style.chart.grid.horizontalGrid.strokeDasharray, "stroke-linecap": "round" }, null, 8, Te))), 256)) ])) : h("", !0), t(e).style.chart.grid.verticalGrid.show ? (r(), n("g", Le, [ (r(!0), n(g, null, C(t(x), (l, i) => (r(), n("line", { x1: t(s).left + (i + 1) * t(s).stripWidth, x2: t(s).left + (i + 1) * t(s).stripWidth, y1: t(s).top, y2: t(s).bottom, stroke: t(e).style.chart.grid.verticalGrid.stroke, "stroke-width": t(e).style.chart.grid.verticalGrid.strokeWidth, "stroke-dasharray": t(e).style.chart.grid.verticalGrid.strokeDasharray, "stroke-linecap": "round" }, null, 8, Ae))), 256)) ])) : h("", !0), k("line", { x1: t(s).left, x2: t(s).left, y1: t(s).top, y2: t(s).bottom, stroke: t(e).style.chart.grid.stroke, "stroke-width": t(e).style.chart.grid.strokeWidth, "stroke-linecap": "round" }, null, 8, Se), k("line", { x1: t(s).left, x2: t(s).right, y1: t(s).bottom, y2: t(s).bottom, stroke: t(e).style.chart.grid.stroke, "stroke-width": t(e).style.chart.grid.strokeWidth, "stroke-linecap": "round" }, null, 8, Pe) ])) : h("", !0), t(e).style.chart.labels.yAxisLabels.show ? (r(!0), n(g, { key: 2 }, C(t(gt), (l, i) => (r(), n("text", { x: l.x1 - t(e).style.chart.labels.yAxisLabels.fontSize / 2 + t(e).style.chart.labels.yAxisLabels.offsetX, y: l.y + t(e).style.chart.labels.yAxisLabels.fontSize / 3, fill: t(e).style.chart.labels.yAxisLabels.color, "font-size": t(e).style.chart.labels.yAxisLabels.fontSize, "text-anchor": "end" }, L(t(ot)( t(e).style.chart.labels.formatter, l.value, t(X)({ p: t(e).style.chart.labels.prefix, v: l.value, s: t(e).style.chart.labels.suffix, r: t(e).style.chart.labels.yAxisLabels.rounding }), { datapoint: l, seriesIndex: i } )), 9, Oe))), 256)) : h("", !0), t(e).style.chart.labels.xAxisLabels.show ? (r(!0), n(g, { key: 3 }, C(t(x), (l, i) => (r(), n("text", { x: t(s).left + (i + 1) * t(s).stripWidth - t(s).stripWidth / 2, y: t(s).bottom + t(e).style.chart.labels.xAxisLabels.fontSize * 2 + t(e).style.chart.labels.xAxisLabels.offsetY, "font-size": t(e).style.chart.labels.xAxisLabels.fontSize, fill: t(e).style.chart.labels.xAxisLabels.color, "text-anchor": "middle" }, L(l.name), 9, ze))), 256)) : h("", !0), t(e).style.chart.labels.axis.yLabel ? (r(), n("text", { key: 4, fill: t(e).style.chart.labels.axis.color, "font-size": t(e).style.chart.labels.axis.fontSize, transform: `translate(${t(e).style.chart.labels.axis.fontSize + t(e).style.chart.labels.axis.yLabelOffsetX}, ${t(s).top + t(s).height / 2}) rotate(-90)`, "text-anchor": "middle" }, L(t(e).style.chart.labels.axis.yLabel), 9, Ne)) : h("", !0), t(e).style.chart.labels.axis.xLabel ? (r(), n("text", { key: 5, fill: t(e).style.chart.labels.axis.color, "font-size": t(e).style.chart.labels.axis.fontSize, x: t(s).left + t(s).width / 2, y: t(s).absoluteHeight, "text-anchor": "middle" }, L(t(e).style.chart.labels.axis.xLabel), 9, Fe)) : h("", !0), t(d) ? (r(), n(g, { key: 6 }, [ k("line", { x1: t(s).left, x2: t(s).right, y1: t(d).y, y2: t(d).y, stroke: t(d).color, "stroke-width": 1, class: F({ "select-circle": t(e).useCssAnimation }) }, null, 10, Me), k("circle", { cx: t(s).left, cy: t(d).y, r: 3, fill: t(d).color, class: F({ "select-circle": t(e).useCssAnimation }) }, null, 10, We), k("circle", { cx: t(s).right, cy: t(d).y, r: 3, fill: t(d).color, class: F({ "select-circle": t(e).useCssAnimation }) }, null, 10, Ie) ], 64)) : h("", !0), k("defs", null, [ (r(!0), n(g, null, C(t(x), (l) => (r(), n("radialGradient", { id: l.id, fy: "30%" }, [ k("stop", { offset: "10%", "stop-color": t(ee)(l.color, t(e).style.chart.plots.gradient.intensity / 100) }, null, 8, Ge), k("stop", { offset: "90%", "stop-color": t(oe)(l.color, 0.1) }, null, 8, Ue), k("stop", { offset: "100%", "stop-color": l.color }, null, 8, Ve) ], 8, De))), 256)) ]), (r(!0), n(g, null, C(t(Wt), (l, i) => (r(), n(g, null, [ (r(!0), n(g, null, C(l.plots, (u, _) => (r(), T(ye, Rt({ plot: { x: u.x, y: t(it) ? u.y : t(s).top }, radius: t(d) && t(d).id === u.id ? t(G) * 1.5 : t(G), shape: t(e).style.chart.plots.shape, stroke: t(e).style.chart.plots.stroke, strokeWidth: t(e).style.chart.plots.strokeWidth, color: t(e).style.chart.plots.gradient.show ? `url(#${l.id})` : l.color, onMouseenter: (R) => It({ datapoint: u, seriesIndex: _ }), onMouseleave: a[0] || (a[0] = (R) => { Y.value = !1, d.value = null; }), onClick: (R) => Nt("selectDatapoint", u), style: `transition: all 0.2s ease-in-out; opacity:${t(d) ? t(d).id === u.id ? 1 : 0.2 : t(e).style.chart.plots.opacity};${t(z) ? `transition-delay:${_ * 50}ms` : ""}`, class: { "vue-ui-strip-plot-animated": t(e).useCssAnimation && t(z), "vue-ui-strip-plot-select-circle": t(e).useCssAnimation && !t(z) }, ref_for: !0 }, o.$attrs), null, 16, ["plot", "radius", "shape", "stroke", "strokeWidth", "color", "onMouseenter", "onClick", "style", "class"]))), 256)), t(y).dataLabels.show ? (r(), n("g", Ee, [ (r(!0), n(g, null, C(l.plots, (u, _) => (r(), n(g, null, [ _ === l.plots.length - 1 || t(d) && t(d).id === u.id && !t(y).showTooltip ? (r(), n("text", { key: 0, x: u.x, y: u.y + t(e).style.chart.labels.bestPlotLabel.offsetY - t(G) * (t(d) && t(d).id === u.id && !t(y).showTooltip ? 2 : 1.5), "font-size": t(e).style.chart.labels.bestPlotLabel.fontSize, fill: t(e).style.chart.labels.bestPlotLabel.color, "text-anchor": "middle", style: B(`opacity:${t(e).useCssAnimation && t(z) ? 0 : 1};transition:opacity 0.2s ease-in;`) }, L(u.name) + " " + L(t(e).style.chart.labels.bestPlotLabel.showValue ? t(ot)( t(e).style.chart.labels.formatter, u.value, t(X)({ p: `(${t(e).style.chart.labels.prefix}`, v: u.value, s: `${t(e).style.chart.labels.suffix})`, r: t(e).style.chart.labels.bestPlotLabel.rounding }), { datapoint: u, seriesIndex: _ } ) : ""), 13, He)) : h("", !0) ], 64))), 256)) ])) : h("", !0) ], 64))), 256)), f(o.$slots, "svg", { svg: t(s) }, void 0, !0) ], 14, Ce)) : h("", !0), o.$slots.watermark ? (r(), n("div", Re, [ f(o.$slots, "watermark", M(W({ isPrinting: t(ft) || t(yt) })), void 0, !0) ])) : h("", !0), t(w) ? h("", !0) : (r(), T(fe, { key: 6, config: { type: "stripPlot", style: { backgroundColor: t(e).style.chart.backgroundColor, stripPlot: { color: "#CCCCCC" } } } }, null, 8, ["config"])), o.$slots.source ? (r(), n("div", { key: 7, ref_key: "source", ref: at, dir: "auto" }, [ f(o.$slots, "source", {}, void 0, !0) ], 512)) : h("", !0), $t(de, { show: t(y).showTooltip && t(Y), backgroundColor: t(e).style.chart.tooltip.backgroundColor, color: t(e).style.chart.tooltip.color, borderRadius: t(e).style.chart.tooltip.borderRadius, borderColor: t(e).style.chart.tooltip.borderColor, borderWidth: t(e).style.chart.tooltip.borderWidth, fontSize: t(e).style.chart.tooltip.fontSize, backgroundOpacity: t(e).style.chart.tooltip.backgroundOpacity, position: t(e).style.chart.tooltip.position, offsetY: t(e).style.chart.tooltip.offsetY, parent: t(S), content: t(J), isFullscreen: t(O), isCustom: t(Lt)(t(e).style.chart.tooltip.customFormat) }, { "tooltip-before": v(() => [ f(o.$slots, "tooltip-before", M(W({ ...t(Q) })), void 0, !0) ]), "tooltip-after": v(() => [ f(o.$slots, "tooltip-after", M(W({ ...t(Q) })), void 0, !0) ]), _: 3 }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]), t(w) ? (r(), T(ve, { key: 8, hideDetails: "", config: { open: t(y).showTable, maxHeight: 1e4, body: { backgroundColor: t(e).style.chart.backgroundColor, color: t(e).style.chart.color }, head: { backgroundColor: t(e).style.chart.backgroundColor, color: t(e).style.chart.color } } }, { content: v(() => [ (r(), T(pe, { key: `table_${t(ut)}`, colNames: t(E).colNames, head: t(E).head, body: t(E).body, config: t(E).config, title: `${t(e).style.chart.title.text}${t(e).style.chart.title.subtitle.text ? ` : ${t(e).style.chart.title.subtitle.text}` : ""}`, onClose: a[1] || (a[1] = (l) => t(y).showTable = !1) }, { th: v(({ th: l }) => [ k("div", { innerHTML: l, style: { display: "flex", "align-items": "center" } }, null, 8, Be) ]), td: v(({ td: l }) => [ Bt(L(l.name || l), 1) ]), _: 1 }, 8, ["colNames", "head", "body", "config", "title"])) ]), _: 1 }, 8, ["config"])) : h("", !0) ], 46, xe)); } }, no = /* @__PURE__ */ ke(Xe, [["__scopeId", "data-v-635dd7ca"]]); export { no as default };