UNPKG

vue-data-ui-hq

Version:

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

683 lines (682 loc) 28.2 kB
import { computed as f, ref as y, watch as me, onMounted as Ae, onBeforeUnmount as Re, openBlock as l, createElementBlock as i, normalizeClass as ge, unref as e, normalizeStyle as L, createBlock as R, createCommentVNode as d, withCtx as X, toDisplayString as C, createSlots as Ge, renderSlot as w, normalizeProps as D, guardReactiveProps as B, createVNode as Ee, createElementVNode as g, Fragment as _, renderList as S, mergeProps as G } from "vue"; import { u as Ue, c as We, t as je, a as Te, p as pe, b as Le, o as ke, d as De, e as E, g as be, m as V, I as $, X as Be, s as q, k as Ve, i as H, f as Z, F as J } from "./index-WrV3SAID.js"; import { t as qe, u as He } from "./useResponsive-CoxXLe23.js"; import { u as Ze, U as Je } from "./usePrinter-kVpf1iV8.js"; import Ke from "./vue-ui-skeleton-Qec_XSRf.js"; import { _ as Qe } from "./Title-BR-xoRp4.js"; import { u as _e } from "./useNestedProp-Cj0kHD7k.js"; import { _ as et } from "./PackageVersion-1NslmM8M.js"; import { P as tt } from "./PenAndPaper-BF1ZRVm3.js"; import { u as at } from "./useUserOptionState-BIvW1Kz7.js"; import { _ as st } from "./_plugin-vue_export-helper-CHgC5LLL.js"; const rt = ["id"], ot = { key: 0 }, nt = ["xmlns", "viewBox"], lt = ["width", "height"], it = ["id"], ut = ["stop-color"], ct = ["stop-color"], ht = ["stop-color"], dt = ["id"], yt = ["stdDeviation"], ft = ["d", "fill", "stroke"], vt = ["id", "d"], mt = ["fill", "font-size", "font-weight"], gt = ["href", "startOffset"], pt = ["x", "y", "text-anchor", "fill", "font-size", "font-weight"], kt = ["d", "filter"], bt = ["stroke", "stroke-width"], _t = ["stroke", "stroke-width"], xt = ["stroke", "stroke-width"], wt = ["stroke", "stroke-width"], St = { key: 5 }, $t = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], zt = ["x", "y", "font-size", "font-weight", "fill"], Ft = { key: 7 }, Ct = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ot = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Mt = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], Pt = { key: 8 }, Nt = ["d", "fill", "stroke", "stroke-width"], Xt = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], Yt = ["x", "y", "font-size", "fill"], It = { key: 5, class: "vue-data-ui-watermark" }, At = { __name: "vue-ui-gauge", props: { config: { type: Object, default() { return {}; } }, dataset: { type: Object, default() { return {}; } } }, setup(U, { expose: xe }) { const { vue_ui_gauge: we } = Ue(), h = U, Y = f(() => !!h.dataset && Object.keys(h.dataset).length > 0 && h.dataset.series && h.dataset.series.length), x = y(We()), Se = y(null), K = y(0), O = y(null), Q = y(null), ee = y(null), te = y(null), ae = y(null), se = y(0), t = f({ get: () => ne(), set: (a) => a }), { userOptionsVisible: W, setUserOptionsVisibility: re, keepUserOptionState: oe } = at({ config: t.value }); me(() => h.config, (a) => { t.value = ne(), W.value = !t.value.showOnChartHover, de(), se.value += 1; }, { deep: !0 }); function ne() { const a = _e({ userConfig: h.config, defaultConfig: we }); return a.theme ? { ..._e({ userConfig: je.vue_ui_gauge[a.theme] || h.config, defaultConfig: a }), customPalette: Te[a.theme] || pe } : a; } const { isPrinting: le, isImaging: ie, generatePdf: ue, generateImage: ce } = Ze({ elementId: `vue-ui-gauge_${x.value}`, fileName: t.value.style.chart.title.text || "vue-ui-gauge" }), $e = f(() => t.value.userOptions.show && !t.value.style.chart.title.text), ze = f(() => Le(t.value.customPalette)), z = f(() => { if (!Y.value || ke(h.dataset.series || {})) return { value: 0, series: [ { from: 0, to: 0 } ] }; const a = []; (h.dataset.series || []).forEach((s) => { a.push(s.from || 1e-7), a.push(s.to || 1e-7); }); const o = Math.max(...a); return { ...h.dataset, series: (h.dataset.series || []).map((s, n) => ({ ...s, color: De(s.color) || ze.value[n] || pe[n], value: ((s.to || 0) - (s.from || 0)) / o * 100 })) }; }), p = y(512), r = y({ height: 358.4, width: p.value, top: 0, bottom: 358.4, centerX: 179.2, centerY: p.value / 2, labelFontSize: 18, legendFontSize: t.value.style.chart.legend.fontSize, pointerRadius: t.value.style.chart.layout.pointer.circle.radius, trackSize: t.value.style.chart.layout.track.size, pointerSize: t.value.style.chart.layout.pointer.size, pointerStrokeWidth: t.value.style.chart.layout.pointer.strokeWidth, markerOffset: t.value.style.chart.layout.markers.offsetY + 3, segmentFontSize: t.value.style.chart.layout.segmentNames.fontSize }), M = y(0), P = y(0), v = y( t.value.style.chart.animation.use ? Math.min(...h.dataset.series.map((a) => a.from)) : h.dataset.value ); me(() => h.dataset.value, () => { ye(h.dataset.value); }); const u = f(() => { const a = r.value.width / 2, o = c.value.base, s = Math.PI * ((v.value + 0 - P.value) / (M.value - P.value)) + Math.PI; return { x1: a, y1: o, x2: a + c.value.pointerSize * r.value.pointerSize * 0.9 * Math.cos(s), y2: o + c.value.pointerSize * r.value.pointerSize * 0.9 * Math.sin(s) }; }), he = f(() => { const a = r.value.width / 2, o = c.value.base, s = Math.PI * ((v.value + 0 - P.value) / (M.value - P.value)) + Math.PI, n = a + c.value.pointerSize * r.value.pointerSize * 0.9 * Math.cos(s), k = o + c.value.pointerSize * r.value.pointerSize * 0.9 * Math.sin(s), b = r.value.pointerRadius, Ne = a + b * Math.cos(s + Math.PI / 2), Xe = o + b * Math.sin(s + Math.PI / 2), Ye = a + b * Math.cos(s - Math.PI / 2), Ie = o + b * Math.sin(s - Math.PI / 2); return isNaN(n) ? null : `M ${n},${k} ${Ne},${Xe} ${Ye},${Ie} Z`; }), j = f(() => { for (let a = 0; a < z.value.series.length; a += 1) { const { color: o, from: s, to: n } = z.value.series[a]; if (v.value >= s && v.value <= n) return o; } return "#2D353C"; }), I = y(null); function de() { if (ke(h.dataset) ? E({ componentName: "VueUiGauge", type: "dataset" }) : (be({ datasetObject: h.dataset, requiredAttributes: ["value", "series"] }).forEach((a) => { E({ componentName: "VueUiGauge", type: "datasetAttribute", property: a }); }), Object.hasOwn(h.dataset, "series") && (h.dataset.series.length ? h.dataset.series.forEach((a, o) => { be({ datasetObject: a, requiredAttributes: ["from", "to"] }).forEach((s) => { E({ componentName: "VueUiGauge", type: "datasetSerieAttribute", property: s, index: o }); }); }) : E({ componentName: "VueUiGauge", type: "datasetAttributeEmpty", property: "series" }))), ye(h.dataset.value || 0), t.value.responsive) { const a = qe(() => { const { width: o, height: s } = He({ chart: O.value, title: t.value.style.chart.title.text ? Q.value : null, legend: ee.value, source: te.value, noTitle: ae.value }); r.value.width = o, r.value.height = s, r.value.centerX = o / 2, r.value.centerY = p.value / 2 / 358.4 * s, r.value.bottom = s, r.value.labelFontSize = 18 / p.value * Math.min(s, o) < 10 ? 10 : 18 / p.value * Math.min(s, o), r.value.legendFontSize = t.value.style.chart.legend.fontSize / p.value * Math.min(s, o) < 14 ? 14 : t.value.style.chart.legend.fontSize / p.value * Math.min(s, o), r.value.pointerRadius = t.value.style.chart.layout.pointer.circle.radius / p.value * Math.min(s, o), r.value.trackSize = t.value.style.chart.layout.track.size / p.value * Math.min(s, o), r.value.pointerStrokeWidth = J({ relator: Math.min(o, s), adjuster: p.value, source: t.value.style.chart.layout.pointer.strokeWidth, threshold: 2, fallback: 2 }), r.value.markerOffset = J({ relator: Math.max(o, s), adjuster: p.value, source: t.value.style.chart.layout.markers.offsetY + 3, threshold: 2, fallback: 2 }), r.value.segmentFontSize = J({ relator: Math.min(o, s), adjuster: p.value, source: t.value.style.chart.layout.segmentNames.fontSize, threshold: 8, fallback: 8 }); }); I.value = new ResizeObserver(a), I.value.observe(O.value.parentNode); } } Ae(() => { de(); }), Re(() => { I.value && I.value.disconnect(); }); function ye(a) { const o = []; (z.value.series || []).forEach((b) => { o.push(b.from || 0), o.push(b.to || 0); }), M.value = Math.max(...o), P.value = Math.min(...o); let s = t.value.style.chart.animation.speed; const n = Math.abs(a - v.value) / (s * 60); function k() { v.value < a ? v.value = Math.min(v.value + n, a) : v.value > a && (v.value = Math.max(v.value - n, a)), v.value !== a && requestAnimationFrame(k); } k(); } const c = f(() => { const a = t.value.responsive ? Math.min(r.value.width, r.value.height) : r.value.width, o = 2.5 / t.value.style.chart.layout.radiusRatio; return { arcs: a / o, gradients: a / (o * 1.1), base: t.value.responsive ? r.value.height / 2 : r.value.height * 0.7, ratingBase: t.value.responsive ? r.value.height / 2 + r.value.height / 4 : r.value.height * 0.9, pointerSize: t.value.responsive ? Math.min(r.value.width, r.value.height) / 3 : r.value.width / 3.2 }; }), m = f(() => V( { series: z.value.series }, r.value.width / 2, c.value.base, c.value.arcs, c.value.arcs, 1, 1, 1, 180, 109.9495, 40 * r.value.trackSize )), Fe = f(() => V( { series: z.value.series }, r.value.width / 2, c.value.base, c.value.arcs * t.value.style.chart.layout.segmentNames.offsetRatio, c.value.arcs * t.value.style.chart.layout.segmentNames.offsetRatio, 1, 1, 1, 180, 109.9495, 40 * r.value.trackSize )), F = f(() => m.value.map((a) => c.value.arcs * t.value.style.chart.layout.segmentNames.offsetRatio * (a.nameOffsetRatio || 1))), fe = f(() => { const { x: a, y: o } = $({ initX: m.value[0].firstSeparator.x, initY: m.value[0].firstSeparator.y, centerX: u.value.x1, centerY: u.value.y1, offset: -t.value.style.chart.layout.segmentSeparators.offsetIn }), { x: s, y: n } = $({ initX: m.value[0].startX, initY: m.value[0].startY, centerX: u.value.x1, centerY: u.value.y1, offset: t.value.style.chart.layout.segmentSeparators.offsetOut }); return { x1: a, y1: o, x2: s, y2: n }; }), ve = f(() => m.value.map((a) => { const { x: o, y: s } = $({ initX: a.separator.x, initY: a.separator.y, centerX: u.value.x1, centerY: u.value.y1, offset: -t.value.style.chart.layout.segmentSeparators.offsetIn }), { x: n, y: k } = $({ initX: a.endX, initY: a.endY, centerX: u.value.x1, centerY: u.value.y1, offset: t.value.style.chart.layout.segmentSeparators.offsetOut }); return { x1: o, y1: s, x2: n, y2: k }; })); function Ce(a) { if (a.reduce((k, b) => k + b, 0) > 100) throw new Error("Total % must not exceed 100"); const s = 50; let n = 0; return a.map((k) => (n += k, `${n / 100 * s - k / 4}%`)); } const Oe = f(() => Ce(m.value.map((a) => a.proportion * 100))), Me = f(() => V( { series: z.value.series }, r.value.width / 2, c.value.base, c.value.gradients, c.value.gradients, 0.95, 1, 1, 180, 110.02, 2 * r.value.trackSize )), N = y(!1); function Pe(a) { N.value = a, K.value += 1; } const A = y(!1); function T() { A.value = !A.value; } return xe({ generatePdf: ue, generateImage: ce, toggleAnnotator: T }), (a, o) => (l(), i("div", { class: ge(`vue-ui-gauge ${e(N) ? "vue-data-ui-wrapper-fullscreen" : ""}`), ref_key: "gaugeChart", ref: O, id: `vue-ui-gauge_${e(x)}`, style: L(`font-family:${e(t).style.fontFamily};width:100%; text-align:center;background:${e(t).style.chart.backgroundColor};${e(t).responsive ? "height: 100%" : ""}`), onMouseenter: o[0] || (o[0] = () => e(re)(!0)), onMouseleave: o[1] || (o[1] = () => e(re)(!1)) }, [ e(t).userOptions.buttons.annotator ? (l(), R(tt, { key: 0, parent: e(O), backgroundColor: e(t).style.chart.backgroundColor, color: e(t).style.chart.color, active: e(A), onClose: T }, null, 8, ["parent", "backgroundColor", "color", "active"])) : d("", !0), e($e) ? (l(), i("div", { key: 1, ref_key: "noTitle", ref: ae, class: "vue-data-ui-no-title-space", style: "height:36px; width: 100%;background:transparent" }, null, 512)) : d("", !0), e(t).style.chart.title.text ? (l(), i("div", { key: 2, ref_key: "chartTitle", ref: Q, style: "width:100%;background:transparent;padding-bottom:12px" }, [ (l(), R(Qe, { key: `title_${e(se)}`, config: { title: { cy: "gauge-div-title", ...e(t).style.chart.title }, subtitle: { cy: "gauge-div-subtitle", ...e(t).style.chart.title.subtitle } } }, { default: X(() => [ e(t).translations.base && U.dataset.base ? (l(), i("span", ot, C(e(t).translations.base) + ": " + C(U.dataset.base), 1)) : d("", !0) ]), _: 1 }, 8, ["config"])) ], 512)) : d("", !0), e(t).userOptions.show && e(Y) && (e(oe) || e(W)) ? (l(), R(Je, { ref_key: "details", ref: Se, key: `user_options_${e(K)}`, backgroundColor: e(t).style.chart.backgroundColor, color: e(t).style.chart.color, isImaging: e(ie), isPrinting: e(le), uid: e(x), hasXls: !1, hasPdf: e(t).userOptions.buttons.pdf, hasImg: e(t).userOptions.buttons.img, hasFullscreen: e(t).userOptions.buttons.fullscreen, isFullscreen: e(N), titles: { ...e(t).userOptions.buttonTitles }, chartElement: e(O), position: e(t).userOptions.position, hasAnnotator: e(t).userOptions.buttons.annotator, isAnnotation: e(A), onToggleFullscreen: Pe, onGeneratePdf: e(ue), onGenerateImage: e(ce), onToggleAnnotator: T, style: L({ visibility: e(oe) ? e(W) ? "visible" : "hidden" : "visible" }) }, Ge({ _: 2 }, [ a.$slots.optionPdf ? { name: "optionPdf", fn: X(() => [ w(a.$slots, "optionPdf", {}, void 0, !0) ]), key: "0" } : void 0, a.$slots.optionImg ? { name: "optionImg", fn: X(() => [ w(a.$slots, "optionImg", {}, void 0, !0) ]), key: "1" } : void 0, a.$slots.optionFullscreen ? { name: "optionFullscreen", fn: X(({ toggleFullscreen: s, isFullscreen: n }) => [ w(a.$slots, "optionFullscreen", D(B({ toggleFullscreen: s, isFullscreen: n })), void 0, !0) ]), key: "2" } : void 0, a.$slots.optionAnnotator ? { name: "optionAnnotator", fn: X(({ toggleAnnotator: s, isAnnotator: n }) => [ w(a.$slots, "optionAnnotator", D(B({ toggleAnnotator: s, isAnnotator: n })), void 0, !0) ]), key: "3" } : void 0 ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : d("", !0), e(Y) ? (l(), i("svg", { key: 4, xmlns: e(Be), class: ge({ "vue-data-ui-fullscreen--on": e(N), "vue-data-ui-fulscreen--off": !e(N) }), viewBox: `0 0 ${e(r).width <= 0 ? 10 : e(r).width} ${e(r).height <= 0 ? 10 : e(r).height}`, style: L(`max-width:100%;overflow:hidden !important;background:transparent;color:${e(t).style.chart.color}`) }, [ Ee(et), a.$slots["chart-background"] ? (l(), i("foreignObject", { key: 0, x: 0, y: 0, width: e(r).width <= 0 ? 10 : e(r).width, height: e(r).height <= 0 ? 10 : e(r).height, style: { pointerEvents: "none" } }, [ w(a.$slots, "chart-background", {}, void 0, !0) ], 8, lt)) : d("", !0), g("defs", null, [ g("radialGradient", { id: `gradient_${e(x)}`, cx: "50%", cy: "50%", r: "50%", fx: "50%", fy: "50%" }, [ g("stop", { offset: "0%", "stop-color": e(q)("#FFFFFF", 1) }, null, 8, ut), g("stop", { offset: "80%", "stop-color": e(q)("#FFFFFF", e(t).style.chart.layout.track.gradientIntensity) }, null, 8, ct), g("stop", { offset: "100%", "stop-color": e(q)("#FFFFFF", 1) }, null, 8, ht) ], 8, it) ]), g("defs", null, [ g("filter", { id: `blur_${e(x)}`, x: "-50%", y: "-50%", width: "200%", height: "200%" }, [ g("feGaussianBlur", { in: "SourceGraphic", stdDeviation: 100 / e(t).style.chart.layout.track.gradientIntensity }, null, 8, yt) ], 8, dt) ]), (l(!0), i(_, null, S(e(m), (s, n) => (l(), i("path", { key: `arc_${n}`, d: s.arcSlice, fill: s.color, stroke: e(t).style.chart.backgroundColor, "stroke-linecap": "round" }, null, 8, ft))), 128)), e(t).style.chart.layout.segmentNames.show && e(t).style.chart.layout.segmentNames.curved ? (l(), i(_, { key: 1 }, [ (l(!0), i(_, null, S(e(m), (s, n) => (l(), i("path", { id: `curve_${e(x)}_${n}`, d: `M ${e(u).x1},${e(u).y1} m -${e(F)[n]},0 a ${e(F)[n]},${e(F)[n]} 0 1,1 ${2 * e(F)[n]},0 a ${e(F)[n]},${e(F)[n]} 0 1,1 -${2 * e(F)[n]},0`, fill: "transparent" }, null, 8, vt))), 256)), (l(!0), i(_, null, S(e(m), (s, n) => (l(), i("text", { fill: e(t).style.chart.layout.segmentNames.useSerieColor ? s.color : e(t).style.chart.layout.segmentNames.color, "font-size": e(r).segmentFontSize, "font-weight": e(t).style.chart.layout.segmentNames.bold ? "bold" : "normal", "text-anchor": "middle" }, [ g("textPath", { href: `#curve_${e(x)}_${n}`, startOffset: e(Oe)[n] }, C(s.name || ""), 9, gt) ], 8, mt))), 256)) ], 64)) : d("", !0), e(t).style.chart.layout.segmentNames.show && !e(t).style.chart.layout.segmentNames.curved ? (l(!0), i(_, { key: 2 }, S(e(Fe), (s, n) => (l(), i("text", { x: s.center.endX, y: s.center.endY, "text-anchor": e(Ve)(s, !1, 12).anchor, fill: e(t).style.chart.layout.segmentNames.useSerieColor ? s.color : e(t).style.chart.layout.segmentNames.color, "font-size": e(r).segmentFontSize, "font-weight": e(t).style.chart.layout.segmentNames.bold ? "bold" : "normal" }, C(s.name || ""), 9, pt))), 256)) : d("", !0), e(t).style.chart.layout.track.useGradient ? (l(!0), i(_, { key: 3 }, S(e(Me), (s, n) => (l(), i("path", { key: `arc_${n}`, d: s.arcSlice, fill: "#FFFFFF", stroke: "none", "stroke-linecap": "round", filter: `url(#blur_${e(x)})` }, null, 8, kt))), 128)) : d("", !0), e(t).style.chart.layout.segmentSeparators.show ? (l(), i(_, { key: 4 }, [ g("line", G(e(fe), { stroke: e(t).style.chart.backgroundColor, "stroke-width": e(t).style.chart.layout.segmentSeparators.strokeWidth + 2, "stroke-linecap": "round" }), null, 16, bt), g("line", G(e(fe), { stroke: e(t).style.chart.layout.segmentSeparators.stroke, "stroke-width": e(t).style.chart.layout.segmentSeparators.strokeWidth, "stroke-linecap": "round" }), null, 16, _t), (l(!0), i(_, null, S(e(ve), (s) => (l(), i("line", G({ ref_for: !0 }, s, { stroke: e(t).style.chart.backgroundColor, "stroke-width": e(t).style.chart.layout.segmentSeparators.strokeWidth + 2, "stroke-linecap": "round" }), null, 16, xt))), 256)), (l(!0), i(_, null, S(e(ve), (s) => (l(), i("line", G({ ref_for: !0 }, s, { stroke: e(t).style.chart.layout.segmentSeparators.stroke, "stroke-width": e(t).style.chart.layout.segmentSeparators.strokeWidth, "stroke-linecap": "round" }), null, 16, wt))), 256)) ], 64)) : d("", !0), e(t).style.chart.layout.markers.show ? (l(), i("g", St, [ (l(!0), i(_, null, S(e(m), (s, n) => (l(), i("text", { x: e($)({ centerX: e(u).x1, centerY: e(c).base, initX: s.center.startX, initY: s.center.startY, offset: e(r).markerOffset }).x, y: e($)({ centerX: e(u).x1, centerY: e(c).base, initX: s.center.startX, initY: s.center.startY, offset: e(r).markerOffset }).y, "text-anchor": s.center.startX < e(u).x1 - 5 ? "end" : s.center.startX > e(u).x1 + 5 ? "start" : "middle", "font-size": e(r).labelFontSize * e(t).style.chart.layout.markers.fontSizeRatio, "font-weight": `${e(t).style.chart.layout.markers.bold ? "bold" : "normal"}`, fill: e(t).style.chart.layout.markers.color }, C(e(H)( e(t).style.chart.layout.markers.formatter, s.from, e(Z)({ p: e(t).style.chart.layout.markers.prefix, v: s.from, s: e(t).style.chart.layout.markers.suffix, r: e(t).style.chart.layout.markers.roundingValue }) )), 9, $t))), 256)) ])) : d("", !0), e(t).style.chart.layout.markers.show ? (l(), i("text", { key: 6, x: e($)({ centerX: e(r).width / 2, centerY: e(c).base, initX: e(m).at(-1).endX, initY: e(m).at(-1).endY, offset: e(r).markerOffset }).x, y: e($)({ centerX: e(r).width / 2, centerY: e(c).base, initX: e(m).at(-1).endX, initY: e(m).at(-1).endY, offset: e(r).markerOffset }).y, "text-anchor": "start", "font-size": e(r).labelFontSize * e(t).style.chart.layout.markers.fontSizeRatio, "font-weight": `${e(t).style.chart.layout.markers.bold ? "bold" : "normal"}`, fill: e(t).style.chart.layout.markers.color }, C(e(H)( e(t).style.chart.layout.markers.formatter, e(M), e(Z)({ p: e(t).style.chart.layout.markers.prefix, v: e(M), s: e(t).style.chart.layout.markers.suffix, r: e(t).style.chart.layout.markers.roundingValue }) )), 9, zt)) : d("", !0), e(t).style.chart.layout.pointer.type === "rounded" ? (l(), i("g", Ft, [ isNaN(e(u).x2) ? d("", !0) : (l(), i("line", { key: 0, x1: e(u).x1, y1: e(u).y1, x2: e(u).x2, y2: e(u).y2, stroke: e(t).style.chart.layout.pointer.stroke, "stroke-width": e(r).pointerStrokeWidth, "stroke-linecap": "round" }, null, 8, Ct)), isNaN(e(u).x2) ? d("", !0) : (l(), i("line", { key: 1, x1: e(u).x1, y1: e(u).y1, x2: e(u).x2, y2: e(u).y2, stroke: e(t).style.chart.layout.pointer.useRatingColor ? e(j) : e(t).style.chart.layout.pointer.color, "stroke-linecap": "round", "stroke-width": e(r).pointerStrokeWidth * 0.7 }, null, 8, Ot)), !isNaN(e(u).x2) && e(t).style.chart.layout.track.useGradient ? (l(), i("line", { key: 2, x1: e(u).x1, y1: e(u).y1, x2: e(u).x2, y2: e(u).y2, stroke: "white", "stroke-linecap": "round", "stroke-width": e(r).pointerStrokeWidth * 0.3, filter: `url(#blur_${e(x)})` }, null, 8, Mt)) : d("", !0) ])) : (l(), i("g", Pt, [ e(he) ? (l(), i("path", { key: 0, d: e(he), fill: e(t).style.chart.layout.pointer.useRatingColor ? e(j) : e(t).style.chart.layout.pointer.color, stroke: e(t).style.chart.layout.pointer.stroke, "stroke-width": e(t).style.chart.layout.pointer.circle.strokeWidth, "stroke-linejoin": "round" }, null, 8, Nt)) : d("", !0) ])), g("circle", { cx: e(r).width / 2, cy: e(c).base, fill: e(t).style.chart.layout.pointer.circle.color, r: e(r).pointerRadius <= 0 ? 1e-4 : e(r).pointerRadius, "stroke-width": e(t).style.chart.layout.pointer.circle.strokeWidth, stroke: e(t).style.chart.layout.pointer.circle.stroke }, null, 8, Xt), e(t).style.chart.legend.show ? (l(), i("text", { key: 9, x: e(r).width / 2, y: e(c).ratingBase, "text-anchor": "middle", "font-size": e(r).legendFontSize, "font-weight": "bold", fill: e(t).style.chart.legend.useRatingColor ? e(j) : e(t).style.chart.legend.color }, C(e(H)( e(t).style.chart.legend.formatter, e(v), e(Z)({ p: e(t).style.chart.legend.prefix + (e(t).style.chart.legend.showPlusSymbol && e(v) > 0 ? "+" : ""), v: e(v), s: e(t).style.chart.legend.suffix, r: e(t).style.chart.legend.roundingValue }) )), 9, Yt)) : d("", !0), w(a.$slots, "svg", { svg: e(r) }, void 0, !0) ], 14, nt)) : d("", !0), a.$slots.watermark ? (l(), i("div", It, [ w(a.$slots, "watermark", D(B({ isPrinting: e(le) || e(ie) })), void 0, !0) ])) : d("", !0), e(Y) ? d("", !0) : (l(), R(Ke, { key: 6, config: { type: "gauge", style: { backgroundColor: e(t).style.chart.backgroundColor, gauge: { color: "#CCCCCC" } } } }, null, 8, ["config"])), g("div", { ref_key: "chartLegend", ref: ee }, [ w(a.$slots, "legend", { legend: e(z) }, void 0, !0) ], 512), a.$slots.source ? (l(), i("div", { key: 7, ref_key: "source", ref: te, dir: "auto" }, [ w(a.$slots, "source", {}, void 0, !0) ], 512)) : d("", !0) ], 46, rt)); } }, qt = /* @__PURE__ */ st(At, [["__scopeId", "data-v-f8647d77"]]); export { qt as default };