UNPKG

vue-data-ui-hq

Version:

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

739 lines (738 loc) 33.4 kB
import { useCssVars as It, computed as p, ref as g, watch as $t, onMounted as Bt, openBlock as a, createElementBlock as i, normalizeClass as K, unref as t, normalizeStyle as w, createBlock as G, createCommentVNode as h, createSlots as Rt, withCtx as k, renderSlot as v, normalizeProps as U, guardReactiveProps as H, createVNode as at, Fragment as A, renderList as O, createElementVNode as u, toDisplayString as b, withKeys as Et, createTextVNode as Gt, nextTick as Ut } from "vue"; import { u as Ht, o as Xt, e as Ct, c as nt, t as Dt, C as jt, g as Wt, N as it, X as Yt, G as ut, i as V, f as S, v as T, x as qt, y as Kt, q as Jt, r as Qt } from "./index-WrV3SAID.js"; import { _ as Zt } from "./Title-BR-xoRp4.js"; import { u as te, U as ee } from "./usePrinter-kVpf1iV8.js"; import { _ as le } from "./Tooltip-ho4JxRm-.js"; import oe from "./vue-ui-skeleton-Qec_XSRf.js"; import se from "./BaseIcon-MqKW8Nkx.js"; import ae from "./vue-ui-accordion-BQCDXXDs.js"; import { u as Lt } from "./useNestedProp-Cj0kHD7k.js"; import { _ as ne } from "./PackageVersion-1NslmM8M.js"; import { P as ie } from "./PenAndPaper-BF1ZRVm3.js"; import { u as ue } from "./useUserOptionState-BIvW1Kz7.js"; import { _ as re } from "./_plugin-vue_export-helper-CHgC5LLL.js"; const de = ["id"], ye = { key: 2, style: "width:100%;background:transparent" }, ce = ["xmlns", "viewBox"], he = ["width", "height"], pe = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], ge = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], fe = ["font-size", "font-weight", "fill", "x", "y"], ve = ["x", "y", "width", "height", "onMouseover"], be = { key: 0 }, me = ["font-size", "fill", "x", "y", "font-weight"], xe = { key: 1 }, we = ["text-anchor", "font-size", "fill", "font-weight", "transform"], ke = { key: 2 }, _e = ["x", "y", "width", "height", "stroke", "stroke-width"], $e = { key: 3 }, Ce = ["id"], Le = ["stop-color"], Ae = ["stop-color"], Te = ["x", "y", "font-size", "fill"], ze = ["x", "y", "height", "rx", "fill"], Me = ["x", "y", "font-size", "fill"], Oe = ["stroke", "x1", "x2", "y1", "y2"], Se = ["fill", "d"], Ne = { key: 4 }, Fe = { id: "colorScaleHorizontal", x1: "0%", x2: "100%", y1: "0%", y2: "0%" }, Ve = ["stop-color"], Pe = ["stop-color"], Ie = ["x", "y", "width", "height", "rx"], Be = ["x", "y", "font-size", "fill"], Re = ["x", "y", "font-size", "fill"], Ee = ["stroke", "x1", "x2", "y1", "y2"], Ge = ["fill", "d"], Ue = { key: 5, class: "vue-data-ui-watermark" }, He = { key: 6, ref: "source", dir: "auto" }, Xe = { class: "vue-ui-data-table" }, De = { key: 0 }, je = ["data-cell"], We = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ye = ["data-cell"], qe = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ke = { __name: "vue-ui-heatmap", props: { config: { type: Object, default() { return {}; } }, dataset: { type: Array, default() { return []; } } }, setup(X, { expose: At }) { It((l) => ({ "11b0c6cf": l.tdo })); const { vue_ui_heatmap: Tt } = Ht(), r = X, D = p(() => !!r.dataset && r.dataset.length); Xt(r.dataset) && Ct({ componentName: "VueUiHeatmap", type: "dataset" }); const P = g(nt()), j = g(null), zt = g(null), J = g(!1), Q = g(""), rt = g(void 0), I = g(null), dt = g(0), yt = g(null), Mt = g(null), ct = g(!1), ht = g(0), e = p({ get: () => ft(), set: (l) => l }), { userOptionsVisible: Z, setUserOptionsVisibility: pt, keepUserOptionState: gt } = ue({ config: e.value }); function ft() { const l = Lt({ userConfig: r.config, defaultConfig: Tt }); let o = {}; return l.theme ? o = { ...Lt({ userConfig: Dt.vue_ui_heatmap[l.theme] || r.config, defaultConfig: l }) } : o = l, r.config && jt(r.config, "style.layout.dataLabels.xAxis.showOnlyAtModulo") ? o.style.layout.dataLabels.xAxis.showOnlyAtModulo = r.config.style.layout.dataLabels.xAxis.showOnlyAtModulo : o.style.layout.dataLabels.xAxis.showOnlyAtModulo = null, o; } $t(() => r.config, (l) => { e.value = ft(), Z.value = !e.value.showOnChartHover, tt(), ht.value += 1; }, { deep: !0 }), $t(() => r.dataset, () => { tt(); }, { deep: !0 }); const { isPrinting: vt, isImaging: bt, generatePdf: mt, generateImage: xt } = te({ elementId: `heatmap__${P.value}`, fileName: e.value.style.title.text || "vue-ui-heatmap" }), Ot = p(() => e.value.userOptions.show && !e.value.style.title.text), _ = g({ showTable: e.value.table.show, showTooltip: e.value.style.tooltip.show }), St = p(() => e.value.table.responsiveBreakpoint); function Nt() { new ResizeObserver((o) => { o.forEach((n) => { ct.value = n.contentRect.width < St.value; }); }).observe(yt.value); } Bt(tt); function tt() { Nt(); } const N = p(() => Math.max(...r.dataset.flatMap((l) => (l.values || []).length))), m = p(() => { const l = e.value.style.layout.padding.top + e.value.style.layout.padding.bottom + r.dataset.length * e.value.style.layout.cells.height, o = e.value.style.layout.padding.left + e.value.style.layout.padding.right + (N.value < r.dataset.length ? r.dataset.length : N.value) * e.value.style.layout.cells.height, n = l + (e.value.style.legend.show ? e.value.style.legend.position === "right" ? 0 : e.value.style.layout.cells.height * 2 : 0); return { height: l, heightWithLegend: n, width: o }; }), W = p(() => e.value.style.legend.position), s = p(() => ({ top: e.value.style.layout.padding.top, left: e.value.style.layout.padding.left, right: m.value.width - e.value.style.layout.padding.right - (W.value === "right" && e.value.style.legend.show ? 92 : 0), bottom: m.value.height - e.value.style.layout.padding.bottom, height: m.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom, width: m.value.width - e.value.style.layout.padding.right - e.value.style.layout.padding.left - (W.value === "right" && e.value.style.legend.show ? 92 : 0) })), et = p(() => y.value.height * r.dataset.length), x = p(() => Math.max(...r.dataset.flatMap((l) => l.values))), z = p(() => Math.min(...r.dataset.flatMap((l) => l.values))), M = p(() => { const l = r.dataset.flatMap((n) => n.values); return l.reduce((n, d) => n + d, 0) / l.length; }), y = p(() => ({ width: s.value.width / N.value, height: s.value.width / (N.value < r.dataset.length ? r.dataset.length : N.value) })), $ = p(() => { const l = e.value.style.layout.dataLabels.yAxis.values.length ? e.value.style.layout.dataLabels.yAxis.values : r.dataset.map((n) => n.name), o = e.value.style.layout.dataLabels.xAxis.values; return { yLabels: l, xLabels: o.slice(0, N.value) }; }), Y = p(() => (r.dataset.forEach((l, o) => { Wt({ datasetObject: l, requiredAttributes: ["values"] }).forEach((n) => { Ct({ componentName: "VueUiHeatmap", type: "datasetSerieAttribute", property: "values", index: o }); }); }), r.dataset.map((l) => ({ ...l, temperatures: (l.values || []).map((o, n) => o >= M.value ? { side: "up", color: it(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, z.value, x.value, o), ratio: Math.abs(Math.abs(o - M.value) / Math.abs(x.value - M.value)) > 1 ? 1 : Math.abs(Math.abs(o - M.value) / Math.abs(x.value - M.value)), value: o, yAxisName: l.name, xAxisName: $.value.xLabels[n], id: `vue-data-ui-heatmap-cell-${nt()}` } : { side: "down", ratio: Math.abs(1 - Math.abs(o) / Math.abs(M.value)) > 1 ? 1 : Math.abs(1 - Math.abs(o) / Math.abs(M.value)), color: it(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, z.value, x.value, o), value: o, yAxisName: l.name, xAxisName: $.value.xLabels[n], id: `vue-data-ui-heatmap-cell-${nt()}` }) })))), C = g(null), B = g(null); function Ft(l, o, n, d) { I.value = { x: n, y: d }; const { value: c, yAxisName: f, xAxisName: L, id: Pt } = l; rt.value = Pt, C.value = c, B.value = { datapoint: l, seriesIndex: o, series: Y.value, config: e.value }, J.value = !0; let ot = ""; const st = e.value.style.tooltip.customFormat; qt(st) && Kt(() => st({ datapoint: l, seriesIndex: o, series: Y.value, config: e.value })) ? Q.value = st({ datapoint: l, seriesIndex: o, series: Y.value, config: e.value }) : (ot += `<div>${f} ${L ? `${L}` : ""}</div>`, ot += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${it(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, z.value, x.value, c)}">⬤</span><span>${isNaN(c) ? "-" : V( e.value.style.layout.cells.value.formatter, c, S({ p: e.value.style.layout.dataLabels.prefix, v: c, s: e.value.style.layout.dataLabels.suffix, r: e.value.style.tooltip.roundingValue }), { datapoint: l, seriesIndex: o } )}</span></div>`, Q.value = `<div style="font-size:${e.value.style.tooltip.fontSize}px">${ot}</div>`); } const R = p(() => s.value.top + et.value * (1 - C.value / x.value)), E = p(() => s.value.left + (m.value.width - s.value.left - e.value.style.layout.padding.right) * (C.value / x.value)); p(() => { const l = r.dataset.map((n) => ({ name: n.name })), o = r.dataset.map((n) => n.values); return { head: l, body: o }; }); function wt() { Ut(() => { const l = ["", ...r.dataset.map((c, f) => c.name)], o = []; for (let c = 0; c < $.value.xLabels.length; c += 1) { const f = [$.value.xLabels[c]]; for (let L = 0; L < r.dataset.length; L += 1) f.push([r.dataset[L].values[c]]); o.push(f); } const n = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([l]).concat(o), d = Jt(n); Qt({ csvContent: d, title: e.value.style.title.text || "vue-ui-heatmap" }); }); } const F = g(!1); function Vt(l) { F.value = l, dt.value += 1; } function kt() { _.value.showTable = !_.value.showTable; } function _t() { _.value.showTooltip = !_.value.showTooltip; } const q = g(!1); function lt() { q.value = !q.value; } return At({ generatePdf: mt, generateCsv: wt, generateImage: xt, toggleTable: kt, toggleTooltip: _t, toggleAnnotator: lt }), (l, o) => (a(), i("div", { ref_key: "heatmapChart", ref: j, class: K(`vue-ui-heatmap ${t(F) ? "vue-data-ui-wrapper-fullscreen" : ""}`), style: w(`font-family:${t(e).style.fontFamily};width:100%; text-align:center;background:${t(e).style.backgroundColor}`), id: `heatmap__${t(P)}`, onMouseenter: o[3] || (o[3] = () => t(pt)(!0)), onMouseleave: o[4] || (o[4] = () => t(pt)(!1)) }, [ t(e).userOptions.buttons.annotator ? (a(), G(ie, { key: 0, parent: t(j), backgroundColor: t(e).style.backgroundColor, color: t(e).style.color, active: t(q), onClose: lt }, null, 8, ["parent", "backgroundColor", "color", "active"])) : h("", !0), t(Ot) ? (a(), i("div", { key: 1, ref_key: "noTitle", ref: Mt, class: "vue-data-ui-no-title-space", style: "height:36px; width: 100%;background:transparent" }, null, 512)) : h("", !0), t(e).style.title.text ? (a(), i("div", ye, [ (a(), G(Zt, { key: `title_${t(ht)}`, config: { title: { cy: "heatmap-div-title", ...t(e).style.title }, subtitle: { cy: "heatmap-div-subtitle", ...t(e).style.title.subtitle } } }, null, 8, ["config"])) ])) : h("", !0), t(e).userOptions.show && t(D) && (t(gt) || t(Z)) ? (a(), G(ee, { ref_key: "details", ref: zt, key: `user_options_${t(dt)}`, backgroundColor: t(e).style.backgroundColor, color: t(e).style.color, isImaging: t(bt), isPrinting: t(vt), uid: t(P), hasTooltip: t(e).userOptions.buttons.tooltip && t(e).style.tooltip.show, hasPdf: t(e).userOptions.buttons.pdf, hasImg: t(e).userOptions.buttons.img, hasXls: t(e).userOptions.buttons.csv, hasTable: t(e).userOptions.buttons.table, hasFullscreen: t(e).userOptions.buttons.fullscreen, isFullscreen: t(F), isTooltip: t(_).showTooltip, titles: { ...t(e).userOptions.buttonTitles }, chartElement: t(j), position: t(e).userOptions.position, hasAnnotator: t(e).userOptions.buttons.annotator, isAnnotation: t(q), onToggleFullscreen: Vt, onGeneratePdf: t(mt), onGenerateCsv: wt, onGenerateImage: t(xt), onToggleTable: kt, onToggleTooltip: _t, onToggleAnnotator: lt, style: w({ visibility: t(gt) ? t(Z) ? "visible" : "hidden" : "visible" }) }, Rt({ _: 2 }, [ l.$slots.optionTooltip ? { name: "optionTooltip", fn: k(() => [ v(l.$slots, "optionTooltip", {}, void 0, !0) ]), key: "0" } : void 0, l.$slots.optionPdf ? { name: "optionPdf", fn: k(() => [ v(l.$slots, "optionPdf", {}, void 0, !0) ]), key: "1" } : void 0, l.$slots.optionCsv ? { name: "optionCsv", fn: k(() => [ v(l.$slots, "optionCsv", {}, void 0, !0) ]), key: "2" } : void 0, l.$slots.optionImg ? { name: "optionImg", fn: k(() => [ v(l.$slots, "optionImg", {}, void 0, !0) ]), key: "3" } : void 0, l.$slots.optionTable ? { name: "optionTable", fn: k(() => [ v(l.$slots, "optionTable", {}, void 0, !0) ]), key: "4" } : void 0, l.$slots.optionFullscreen ? { name: "optionFullscreen", fn: k(({ toggleFullscreen: n, isFullscreen: d }) => [ v(l.$slots, "optionFullscreen", U(H({ toggleFullscreen: n, isFullscreen: d })), void 0, !0) ]), key: "5" } : void 0, l.$slots.optionAnnotator ? { name: "optionAnnotator", fn: k(({ toggleAnnotator: n, isAnnotator: d }) => [ v(l.$slots, "optionAnnotator", U(H({ toggleAnnotator: n, isAnnotator: d })), void 0, !0) ]), key: "6" } : void 0 ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : h("", !0), t(D) ? (a(), i("svg", { key: 4, xmlns: t(Yt), class: K({ "vue-data-ui-fullscreen--on": t(F), "vue-data-ui-fulscreen--off": !t(F) }), viewBox: `0 0 ${t(m).width} ${t(m).heightWithLegend}`, style: w(`max-width:100%;overflow:visible;background:transparent;color:${t(e).style.color}`) }, [ at(ne), l.$slots["chart-background"] ? (a(), i("foreignObject", { key: 0, x: 0, y: 0, width: t(m).width, height: t(m).heightWithLegend, style: { pointerEvents: "none" } }, [ v(l.$slots, "chart-background", {}, void 0, !0) ], 8, he)) : h("", !0), (a(!0), i(A, null, O(t(Y), (n, d) => (a(), i("g", null, [ (a(!0), i(A, null, O(n.temperatures, (c, f) => (a(), i("g", null, [ u("rect", { x: t(s).left + t(y).width * f + t(e).style.layout.cells.spacing / 2, y: t(s).top + t(y).height * d + t(e).style.layout.cells.spacing / 2, width: t(y).width - t(e).style.layout.cells.spacing, height: t(y).height - t(e).style.layout.cells.spacing, fill: t(e).style.layout.cells.colors.underlayer, stroke: t(e).style.backgroundColor, "stroke-width": t(e).style.layout.cells.spacing }, null, 8, pe), u("rect", { x: t(s).left + t(y).width * f + t(e).style.layout.cells.spacing / 2, y: t(s).top + t(y).height * d + t(e).style.layout.cells.spacing / 2, width: t(y).width - t(e).style.layout.cells.spacing, height: t(y).height - t(e).style.layout.cells.spacing, fill: c.color, stroke: t(e).style.backgroundColor, "stroke-width": t(e).style.layout.cells.spacing }, null, 8, ge), t(e).style.layout.cells.value.show ? (a(), i("text", { key: 0, "text-anchor": "middle", "font-size": t(e).style.layout.cells.value.fontSize, "font-weight": t(e).style.layout.cells.value.bold ? "bold" : "normal", fill: t(ut)(c.color), x: t(s).left + t(y).width * f + t(y).width / 2, y: t(s).top + t(y).height * d + t(y).height / 2 + t(e).style.layout.cells.value.fontSize / 3 }, b(t(V)( t(e).style.layout.cells.value.formatter, c.value, t(S)({ p: t(e).style.layout.dataLabels.prefix, v: c.value, s: t(e).style.layout.dataLabels.suffix, r: t(e).style.layout.cells.value.roundingValue }), { datapoint: c } )), 9, fe)) : h("", !0) ]))), 256)), (a(!0), i(A, null, O(n.temperatures, (c, f) => (a(), i("g", null, [ u("rect", { x: t(s).left + t(y).width * f, y: t(s).top + t(y).height * d, width: t(y).width, height: t(y).height, fill: "transparent", stroke: "none", onMouseover: (L) => Ft(c, d, t(s).left + t(y).width * f, t(s).top + t(y).height * d), onMouseout: o[0] || (o[0] = (L) => { J.value = !1, rt.value = void 0, C.value = null, I.value = null; }) }, null, 40, ve) ]))), 256)), t(e).style.layout.dataLabels.yAxis.show ? (a(), i("g", be, [ u("text", { "font-size": t(e).style.layout.dataLabels.yAxis.fontSize, fill: t(e).style.layout.dataLabels.yAxis.color, x: t(s).left + t(e).style.layout.dataLabels.yAxis.offsetX - 6, y: t(s).top + t(y).height * d + t(y).height / 2 + t(e).style.layout.dataLabels.yAxis.fontSize / 3 + t(e).style.layout.dataLabels.yAxis.offsetY, "text-anchor": "end", "font-weight": t(e).style.layout.dataLabels.yAxis.bold ? "bold" : "normal" }, b(t($).yLabels[d]), 9, me) ])) : h("", !0) ]))), 256)), t(e).style.layout.dataLabels.xAxis.show ? (a(), i("g", xe, [ (a(!0), i(A, null, O(t($).xLabels, (n, d) => (a(), i(A, null, [ !t(e).style.layout.dataLabels.xAxis.showOnlyAtModulo || t(e).style.layout.dataLabels.xAxis.showOnlyAtModulo && d % t(e).style.layout.dataLabels.xAxis.showOnlyAtModulo === 0 ? (a(), i("text", { key: 0, "text-anchor": t(e).style.layout.dataLabels.xAxis.rotation === 0 ? "middle" : t(e).style.layout.dataLabels.xAxis.rotation < 0 ? "start" : "end", "font-size": t(e).style.layout.dataLabels.xAxis.fontSize, fill: t(e).style.layout.dataLabels.xAxis.color, "font-weight": t(e).style.layout.dataLabels.xAxis.bold ? "bold" : "normal", transform: `translate(${t(s).left + t(y).width / 2 + t(s).width / t($).xLabels.length * d + t(e).style.layout.dataLabels.xAxis.offsetX}, ${t(s).top + t(e).style.layout.dataLabels.xAxis.offsetY - 6}), rotate(${t(e).style.layout.dataLabels.xAxis.rotation})` }, b(n), 9, we)) : h("", !0) ], 64))), 256)) ])) : h("", !0), t(I) ? (a(), i("g", ke, [ u("rect", { style: { "pointer-events": "none" }, x: t(I).x - t(e).style.layout.cells.selected.border / 2 + t(e).style.layout.cells.spacing, y: t(I).y - t(e).style.layout.cells.selected.border / 2 + t(e).style.layout.cells.spacing, width: t(y).width - t(e).style.layout.cells.spacing + t(e).style.layout.cells.selected.border - t(e).style.layout.cells.spacing, height: t(y).height - t(e).style.layout.cells.spacing + t(e).style.layout.cells.selected.border - t(e).style.layout.cells.spacing, fill: "transparent", stroke: t(e).style.layout.cells.selected.color, "stroke-width": t(e).style.layout.cells.selected.border, rx: 1 }, null, 8, _e) ])) : h("", !0), t(e).style.legend.show && t(W) === "right" ? (a(), i("g", $e, [ u("defs", null, [ u("linearGradient", { id: `colorScaleVertical_${t(P)}`, x2: "0%", y2: "100%" }, [ u("stop", { offset: "0%", "stop-color": t(e).style.layout.cells.colors.hot }, null, 8, Le), u("stop", { offset: "100%", "stop-color": t(e).style.layout.cells.colors.cold }, null, 8, Ae) ], 8, Ce) ]), u("text", { x: t(s).right + 36 + 18, y: t(s).top - t(e).style.legend.fontSize * 1.5, "text-anchor": "middle", "font-size": t(e).style.legend.fontSize * 2, fill: t(e).style.legend.color }, b(t(V)( t(e).style.layout.cells.value.formatter, t(T)(t(x)), t(S)({ p: t(e).style.layout.dataLabels.prefix, v: t(T)(t(x)), s: t(e).style.layout.dataLabels.suffix, r: t(e).style.legend.roundingValue }) )), 9, Te), u("rect", { x: t(s).right + 36, y: t(s).top, width: 36, height: t(et), rx: t(e).style.legend.scaleBorderRadius, fill: `url(#colorScaleVertical_${t(P)})` }, null, 8, ze), u("text", { x: t(s).right + 36 + 18, y: t(s).top + t(et) + t(e).style.legend.fontSize * 2.5, "text-anchor": "middle", "font-size": t(e).style.legend.fontSize * 2, fill: t(e).style.legend.color }, b(t(V)( t(e).style.layout.cells.value.formatter, t(T)(t(z)), t(S)({ p: t(e).style.layout.dataLabels.prefix, v: t(T)(t(z)), s: t(e).style.layout.dataLabels.suffix, r: t(e).style.legend.roundingValue }) )), 9, Me), t(C) !== null ? (a(), i("line", { key: 0, stroke: t(ut)(t(B).datapoint.color), "stroke-width": "2", x1: t(s).right + 36, x2: t(s).right + 72, y1: t(R), y2: t(R) }, null, 8, Oe)) : h("", !0), t(C) !== null ? (a(), i("path", { key: 1, fill: t(e).style.color, stroke: "none", d: `M ${t(s).right + 36},${t(R)} ${t(s).right + 26},${t(R) - 8} ${t(s).right + 26},${t(R) + 8}z` }, null, 8, Se)) : h("", !0) ])) : h("", !0), t(e).style.legend.show && t(W) === "bottom" ? (a(), i("g", Ne, [ u("defs", null, [ u("linearGradient", Fe, [ u("stop", { offset: "0%", "stop-color": t(e).style.layout.cells.colors.cold }, null, 8, Ve), u("stop", { offset: "100%", "stop-color": t(e).style.layout.cells.colors.hot }, null, 8, Pe) ]) ]), u("rect", { x: t(s).left, y: t(s).bottom + t(e).style.layout.cells.height, width: t(m).width - t(s).left - t(e).style.layout.padding.right, height: t(e).style.layout.cells.height, rx: t(e).style.legend.scaleBorderRadius > t(e).style.layout.cells.height / 2 ? t(e).style.layout.cells.height / 2 : t(e).style.legend.scaleBorderRadius, fill: "url(#colorScaleHorizontal)" }, null, 8, Ie), u("text", { x: t(s).left, y: t(s).bottom + t(e).style.layout.cells.height * 2 + t(e).style.legend.fontSize * 2, "text-anchor": "start", "font-size": t(e).style.legend.fontSize * 2, fill: t(e).style.legend.color }, b(t(V)( t(e).style.layout.cells.value.formatter, t(T)(t(z)), t(S)({ p: t(e).style.layout.dataLabels.prefix, v: t(T)(t(z)), s: t(e).style.layout.dataLabels.suffix, r: t(e).style.legend.roundingValue }) )), 9, Be), u("text", { x: t(s).right, y: t(s).bottom + t(e).style.layout.cells.height * 2 + t(e).style.legend.fontSize * 2, "text-anchor": "end", "font-size": t(e).style.legend.fontSize * 2, fill: t(e).style.legend.color }, b(t(V)( t(e).style.layout.cells.value.formatter, t(T)(t(x)), t(S)({ p: t(e).style.layout.dataLabels.prefix, v: t(T)(t(x)), s: t(e).style.layout.dataLabels.suffix, r: t(e).style.legend.roundingValue }) )), 9, Re), t(C) !== null ? (a(), i("line", { key: 0, stroke: t(ut)(t(B).datapoint.color), "stroke-width": "2", x1: t(E), x2: t(E), y1: t(s).bottom + t(e).style.layout.cells.height, y2: t(s).bottom + t(e).style.layout.cells.height * 2 }, null, 8, Ee)) : h("", !0), t(C) !== null ? (a(), i("path", { key: 1, fill: t(e).style.color, stroke: "none", d: `M ${t(E)},${t(s).bottom + t(e).style.layout.cells.height} ${t(E) - 12},${t(s).bottom + t(e).style.layout.cells.height - 20} ${t(E) + 12},${t(s).bottom + t(e).style.layout.cells.height - 20}z` }, null, 8, Ge)) : h("", !0) ])) : h("", !0), v(l.$slots, "svg", { svg: t(m) }, void 0, !0) ], 14, ce)) : h("", !0), l.$slots.watermark ? (a(), i("div", Ue, [ v(l.$slots, "watermark", U(H({ isPrinting: t(vt) || t(bt) })), void 0, !0) ])) : h("", !0), l.$slots.source ? (a(), i("div", He, [ v(l.$slots, "source", {}, void 0, !0) ], 512)) : h("", !0), t(D) ? h("", !0) : (a(), G(oe, { key: 7, config: { type: "heatmap", style: { backgroundColor: t(e).style.backgroundColor, heatmap: { color: "#CCCCCC" } } } }, null, 8, ["config"])), at(le, { show: t(_).showTooltip && t(J), backgroundColor: t(e).style.tooltip.backgroundColor, color: t(e).style.tooltip.color, borderRadius: t(e).style.tooltip.borderRadius, borderColor: t(e).style.tooltip.borderColor, borderWidth: t(e).style.tooltip.borderWidth, fontSize: t(e).style.tooltip.fontSize, backgroundOpacity: t(e).style.tooltip.backgroundOpacity, position: t(e).style.tooltip.position, offsetY: t(e).style.tooltip.offsetY, parent: t(j), content: t(Q), isFullscreen: t(F), isCustom: t(e).style.tooltip.customFormat && typeof t(e).style.tooltip.customFormat == "function" }, { "tooltip-before": k(() => [ v(l.$slots, "tooltip-before", U(H({ ...t(B) })), void 0, !0) ]), "tooltip-after": k(() => [ v(l.$slots, "tooltip-after", U(H({ ...t(B) })), void 0, !0) ]), _: 3 }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]), t(D) ? (a(), G(ae, { key: 8, hideDetails: "", config: { open: t(_).showTable, maxHeight: 1e4, body: { backgroundColor: t(e).style.backgroundColor, color: t(e).style.color }, head: { backgroundColor: t(e).style.backgroundColor, color: t(e).style.color } } }, { content: k(() => [ u("div", { ref_key: "tableContainer", ref: yt, class: "vue-ui-heatmap-table" }, [ u("div", { style: "width:100%;overflow-x:auto;padding-top:36px;position:relative", class: K({ "vue-ui-responsive": t(ct) }) }, [ u("div", { role: "button", tabindex: "0", style: w(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t(e).table.th.backgroundColor};`), onClick: o[1] || (o[1] = (n) => t(_).showTable = !1), onKeypress: o[2] || (o[2] = Et((n) => t(_).showTable = !1, ["enter"])) }, [ at(se, { name: "close", stroke: t(e).table.th.color, "stroke-width": 2 }, null, 8, ["stroke"]) ], 36), u("table", Xe, [ u("caption", { style: w(`backgroundColor:${t(e).table.th.backgroundColor};color:${t(e).table.th.color};outline:${t(e).table.th.outline}`) }, [ Gt(b(t(e).style.title.text) + " ", 1), t(e).style.title.subtitle.text ? (a(), i("span", De, b(t(e).style.title.subtitle.text), 1)) : h("", !0) ], 4), u("thead", null, [ u("tr", { role: "row", style: w(`background:${t(e).table.th.backgroundColor};color:${t(e).table.th.color}`) }, [ u("th", { style: w(`outline:${t(e).table.th.outline};padding-right:6px`) }, null, 4), (a(!0), i(A, null, O(X.dataset, (n, d) => (a(), i("th", { align: "right", style: w(`outline:${t(e).table.th.outline};padding-right:6px`) }, b(n.name), 5))), 256)) ], 4) ]), u("tbody", null, [ (a(!0), i(A, null, O(t($).xLabels, (n, d) => (a(), i("tr", { role: "row", class: K({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": d % 2 === 0, "vue-ui-data-table__tbody__row-odd": d % 2 !== 0 }), style: w(`background:${t(e).table.td.backgroundColor};color:${t(e).table.td.color}`) }, [ u("td", { "data-cell": t(e).table.colNames.xAxis, class: "vue-ui-data-table__tbody__td", style: w(`outline:${t(e).table.td.outline}`) }, [ u("div", We, b(n), 1) ], 12, je), (a(!0), i(A, null, O(X.dataset, (c, f) => (a(), i("td", { class: "vue-ui-data-table__tbody__td", "data-cell": X.dataset[f].name, style: w(`outline:${t(e).table.td.outline}`) }, [ u("div", qe, b(isNaN(c.values[d]) ? "-" : t(S)({ p: t(e).style.layout.dataLabels.prefix, v: c.values[d], s: t(e).style.layout.dataLabels.suffix, r: t(e).table.td.roundingValue })), 1) ], 12, Ye))), 256)) ], 6))), 256)) ]) ]) ], 2) ], 512) ]), _: 1 }, 8, ["config"])) : h("", !0) ], 46, de)); } }, dl = /* @__PURE__ */ re(Ke, [["__scopeId", "data-v-a682835e"]]); export { dl as default };