UNPKG

vue-data-ui

Version:

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

2,904 lines • 148 kB
import { P as H, Y as U, a7 as te, a8 as J, a9 as le, aa as ae, ab as re, ac as ie, ad as se, c as Z, A as ne, F as ce, w as oe, s as he, o as ue, a0 as de, ae as ge, x as fe, C as Ie, y as Ne, a6 as me, e as xe, r as be, f as K, af as Fe, S as _e, T as ye, q as Ae, b as Le, z as Ce, d as Se, ag as ke, v as we, ah as Oe, a4 as Ge, ai as ve, i as pe, G as ze, J as Me, u as Te, p as Pe, B as Ve, a as Re, t as He } from "./index-CO-5OgQA.js";
import { D as De } from "./DataTable-CVSajw4G.js";
import { _ as We } from "./Title-CxubvuEh.js";
import { u as Be, _ as Ee } from "./Tooltip-C0W6IWVK.js";
import { U as Ye } from "./usePrinter-DldU0tBx.js";
import { _ as qe } from "./Shape-CWSam3QO.js";
import Xe from "./BaseIcon-V0HD2AAD.js";
import Ue from "./vue-ui-table-sparkline-Ccw_ekS8.js";
import Ze from "./vue-ui-skeleton-BeEBd4CC.js";
import { S as Je } from "./Slicer-BbMNT2AI.js";
import Ke from "./vue-ui-accordion-RRHvINsj.js";
import { u as Q } from "./useNestedProp-D8sa_wYF.js";
import { _ as Qe } from "./PackageVersion-DqsC6J9R.js";
import { _ as je } from "./PenAndPaper-Bqjmruhh.js";
import { resolveComponent as R, createElementBlock as i, openBlock as r, normalizeStyle as b, normalizeClass as B, createBlock as W, createCommentVNode as d, createVNode as X, createSlots as $e, withCtx as V, renderSlot as S, normalizeProps as E, guardReactiveProps as Y, createElementVNode as f, createTextVNode as j, Fragment as u, renderList as I, toDisplayString as T, mergeProps as $, withDirectives as et, vModelCheckbox as tt } from "vue";
import { _ as lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const at = Z(), rt = {
  name: "vue-ui-xy",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  components: {
    DataTable: De,
    Shape: qe,
    Title: We,
    Tooltip: Ee,
    UserOptions: Ye,
    BaseIcon: Xe,
    TableSparkline: Ue,
    Skeleton: Ze,
    Slicer: Je,
    Accordion: Ke,
    PackageVersion: Qe,
    PenAndPaper: je
  },
  data() {
    this.dataset.forEach((g, l) => {
      [null, void 0].includes(g.series) && this.error({
        componentName: "VueUiXy",
        type: "datasetSerieAttribute",
        property: "series (number[])",
        index: l
      });
    });
    const t = this.config.downsample && this.config.downsample.threshold ? this.config.downsample.threshold : 500, n = Math.max(...this.dataset.map((g) => this.largestTriangleThreeBucketsArray({ data: g.series, threshold: t }).length)), o = {
      start: 0,
      end: n
    };
    return {
      themePalettes: He,
      themes: Re,
      slicerStep: 0,
      selectedScale: null,
      CTX: null,
      CANVAS: null,
      opacity: Ve,
      useSafeValues: !0,
      palette: Pe,
      height: 600,
      width: 1e3,
      viewBox: "0 0 1000 600",
      clientPosition: {
        x: 0,
        y: 0
      },
      canvasClientPosition: {
        x: 0,
        y: 0
      },
      icons: {
        line: "line",
        bar: "bar",
        plot: "plot"
      },
      isAnnotator: !1,
      isFullscreen: !1,
      isPrinting: !1,
      isImaging: !1,
      isTooltip: !1,
      mutableConfig: {
        dataLabels: {
          show: !0
        },
        showTooltip: !0,
        showTable: !1,
        isStacked: !1,
        useIndividualScale: !1
      },
      selectedSerieIndex: null,
      selectedRowIndex: null,
      segregatedSeries: [],
      uniqueId: Z(),
      step: 0,
      tableStep: 0,
      titleStep: 0,
      slicer: o,
      __to__: null,
      maxX: n,
      showSparklineTable: !0,
      segregateStep: 0,
      sliderId: at,
      fontSizes: {
        xAxis: 18,
        yAxis: 12,
        dataLabels: 20,
        plotLabels: 10
      },
      plotRadii: {
        plot: 3,
        line: 3
      },
      selectedMinimapIndex: null,
      showUserOptionsOnChartHover: !1,
      keepUserOptionState: !0,
      userOptionsVisible: !0,
      svgRef: null,
      tagRefs: {}
    };
  },
  watch: {
    dataset: {
      handler(t, n) {
        this.maxX = Math.max(...this.dataset.map((o) => this.largestTriangleThreeBucketsArray({
          data: o.series,
          threshold: this.FINAL_CONFIG.downsample.threshold
        }).length)), this.slicer = {
          start: 0,
          end: this.maxX
        }, this.slicerStep += 1, this.segregateStep += 1;
      },
      deep: !0
    },
    config: {
      handler(t, n) {
        this.FINAL_CONFIG = this.prepareConfig(), this.prepareChart(), this.titleStep += 1, this.tableStep += 1, this.mutableConfig = {
          dataLabels: {
            show: !0
          },
          showTooltip: this.FINAL_CONFIG.chart.tooltip.show === !0,
          showTable: this.FINAL_CONFIG.showTable === !0,
          isStacked: this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked,
          useIndividualScale: this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale
        };
      },
      deep: !0
    }
  },
  computed: {
    chartAriaLabel() {
      const t = this.FINAL_CONFIG.chart.title.text || "Chart visualization", n = this.FINAL_CONFIG.chart.title.subtitle.text || "";
      return `${t}. ${n}`;
    },
    optimize() {
      return {
        linePlot: this.maxSeries > this.FINAL_CONFIG.line.dot.hideAboveMaxSerieLength
      };
    },
    hasOptionsNoTitle() {
      return this.FINAL_CONFIG.chart.userOptions.show && (!this.FINAL_CONFIG.chart.title.show || !this.FINAL_CONFIG.chart.title.text);
    },
    minimap() {
      if (!this.FINAL_CONFIG.chart.zoom.minimap.show) return [];
      const t = this.datasetWithIds.filter((l) => !this.segregatedSeries.includes(l.id)), n = Math.max(...t.map((l) => l.series.length)), o = [];
      for (let l = 0; l < n; l += 1)
        o.push(t.map((e) => e.series[l] || 0).reduce((e, A) => (e || 0) + (A || 0), 0));
      const g = Math.min(...o);
      return o.map((l) => l + (g < 0 ? Math.abs(g) : 0));
    },
    customPalette() {
      return this.convertCustomPalette(this.FINAL_CONFIG.customPalette);
    },
    backgroundColor() {
      return this.FINAL_CONFIG.chart.backgroundColor;
    },
    slicerColor() {
      return this.FINAL_CONFIG.chart.zoom.color;
    },
    allScales() {
      const t = this.lineSet.map((e) => ({
        name: e.name,
        color: e.color,
        scale: e.individualScale,
        scaleYLabels: e.scaleYLabels,
        zero: e.zeroPosition,
        max: e.individualMax,
        scaleLabel: e.scaleLabel || "",
        id: e.id,
        yOffset: e.yOffset || 0,
        individualHeight: e.individualHeight || this.drawingArea.height,
        autoScaleYLabels: e.autoScaleYLabels
      })), n = this.barSet.map((e) => ({
        name: e.name,
        color: e.color,
        scale: e.individualScale,
        scaleYLabels: e.scaleYLabels,
        zero: e.zeroPosition,
        max: e.individualMax,
        scaleLabel: e.scaleLabel || "",
        id: e.id,
        yOffset: e.yOffset || 0,
        individualHeight: e.individualHeight || this.drawingArea.height
      })), o = this.plotSet.map((e) => ({
        name: e.name,
        color: e.color,
        scale: e.individualScale,
        scaleYLabels: e.scaleYLabels,
        // FIX
        zero: e.zeroPosition,
        max: e.individualMax,
        scaleLabel: e.scaleLabel || "",
        id: e.id,
        yOffset: e.yOffset || 0,
        individualHeight: e.individualHeight || this.drawingArea.height
      })), g = this.mutableConfig.useIndividualScale && !this.mutableConfig.isStacked ? Object.values(this.scaleGroups) : [...t, ...n, ...o], l = g.flatMap((e) => e).length;
      return g.flatMap((e, A) => ({
        unique: e.unique,
        id: e.id,
        groupId: e.groupId,
        scaleLabel: e.scaleLabel,
        name: this.mutableConfig.useIndividualScale && !this.mutableConfig.isStacked ? e.unique ? e.name : e.groupName : e.name,
        color: this.mutableConfig.useIndividualScale && !this.mutableConfig.isStacked ? e.unique ? e.color : e.groupColor : e.color,
        scale: e.scale,
        yOffset: e.yOffset,
        individualHeight: e.individualHeight,
        x: this.mutableConfig.isStacked ? this.drawingArea.left : this.drawingArea.left / l * (A + 1),
        yLabels: e.scaleYLabels || e.scale.ticks.map((x) => ({
          y: x >= 0 ? e.zero - e.individualHeight * (x / e.max) : e.zero + e.individualHeight * Math.abs(x) / e.max,
          value: x
        }))
      }));
    },
    isDataset() {
      return !!this.dataset && this.dataset.length;
    },
    chartFont() {
      const t = document.getElementById(`vue-ui-xy_${this.uniqueId}`);
      return window.getComputedStyle(t, null).getPropertyValue("font-family");
    },
    FINAL_CONFIG: {
      get: function() {
        return this.prepareConfig();
      },
      set: function(t) {
        return t;
      }
    },
    hasHighlightArea() {
      return Array.isArray(this.FINAL_CONFIG.chart.highlightArea) ? this.FINAL_CONFIG.chart.highlightArea.some((t) => t.show) : this.FINAL_CONFIG.chart.highlightArea && this.FINAL_CONFIG.chart.highlightArea.show;
    },
    highlightAreas() {
      if (Array.isArray(this.FINAL_CONFIG.chart.highlightArea))
        return this.FINAL_CONFIG.chart.highlightArea.map((n) => ({
          ...n,
          span: n.from === n.to ? 1 : n.to < n.from ? 0 : n.to - n.from + 1
        }));
      const t = this.FINAL_CONFIG.chart.highlightArea;
      return [{ ...t, span: t.from === t.to ? 1 : t.to < t.from ? 0 : t.to - t.from + 1 }];
    },
    xPadding() {
      return this.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : this.drawingArea.width / this.maxSeries / 2;
    },
    relativeZero() {
      return [null, void 0].includes(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin) ? this.niceScale.min >= 0 ? 0 : Math.abs(this.niceScale.min) : -this.niceScale.min;
    },
    absoluteMax() {
      return this.niceScale.max + this.relativeZero;
    },
    datasetWithIds() {
      return this.useSafeValues ? this.dataset.map((t, n) => ({
        ...t,
        series: this.largestTriangleThreeBucketsArray({
          data: t.series,
          threshold: this.FINAL_CONFIG.downsample.threshold
        }),
        id: `uniqueId_${n}`
      })) : this.dataset;
    },
    safeDataset() {
      return this.useSafeValues ? this.dataset.map((t, n) => {
        const o = this.largestTriangleThreeBucketsArray({
          data: t.series,
          threshold: this.FINAL_CONFIG.downsample.threshold
        }), g = `uniqueId_${n}`;
        return {
          ...t,
          slotAbsoluteIndex: n,
          series: o.map((l) => this.isSafeValue(l) ? l : null).slice(this.slicer.start, this.slicer.end),
          color: this.convertColorToHex(t.color ? t.color : this.customPalette[n] ? this.customPalette[n] : this.palette[n]),
          id: g,
          scaleLabel: t.scaleLabel || g
        };
      }) : this.dataset;
    },
    relativeDataset() {
      return this.safeDataset.map((t, n) => ({
        ...t,
        series: t.series.map((o) => o + this.relativeZero),
        absoluteValues: t.series
      })).filter((t) => !this.segregatedSeries.includes(t.id));
    },
    tableSparklineDataset() {
      return this.relativeDataset.map((t) => {
        const n = t.absoluteValues.map((o) => [void 0, null].includes(o) ? 0 : o);
        return {
          id: t.id,
          name: t.name,
          color: t.color,
          values: this.fillArray(this.maxSeries, n)
        };
      });
    },
    tableSparklineConfig() {
      return {
        responsiveBreakpoint: this.FINAL_CONFIG.table.responsiveBreakpoint,
        roundingValues: this.FINAL_CONFIG.table.rounding,
        showAverage: !1,
        showMedian: !1,
        showTotal: !1,
        fontFamily: this.FINAL_CONFIG.chart.fontFamily,
        prefix: this.FINAL_CONFIG.chart.labels.prefix,
        suffix: this.FINAL_CONFIG.chart.labels.suffix,
        colNames: JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),
        thead: {
          backgroundColor: this.FINAL_CONFIG.table.th.backgroundColor,
          color: this.FINAL_CONFIG.table.th.color,
          outline: this.FINAL_CONFIG.table.th.outline
        },
        tbody: {
          backgroundColor: this.FINAL_CONFIG.table.td.backgroundColor,
          color: this.FINAL_CONFIG.table.td.color,
          outline: this.FINAL_CONFIG.table.td.outline
        },
        userOptions: {
          show: !1
        }
      };
    },
    absoluteDataset() {
      return this.safeDataset.map((t, n) => ({
        absoluteIndex: n,
        ...t,
        series: t.series.map((o) => o + this.relativeZero),
        absoluteValues: t.series,
        segregate: () => this.segregate(t),
        isSegregated: this.segregatedSeries.includes(t.id)
      }));
    },
    activeSeriesLength() {
      return this.absoluteDataset.length;
    },
    activeSeriesWithStackRatios() {
      return this.assignStackRatios(this.absoluteDataset.filter((t) => !this.segregatedSeries.includes(t.id)));
    },
    scaleGroups() {
      const t = Object.groupBy(this.activeSeriesWithStackRatios, (o) => o.scaleLabel), n = {};
      for (const [o, g] of Object.entries(t)) {
        const l = g.flatMap((e) => e.absoluteValues);
        n[o] = {
          min: Math.min(...l) || 0,
          max: Math.max(...l) || 1,
          groupId: `scale_group_${this.createUid()}`
        };
      }
      return n;
    },
    barSet() {
      return this.activeSeriesWithStackRatios.filter((t) => t.type === "bar").map((t, n) => {
        this.checkAutoScaleError(t);
        const o = this.scaleGroups[t.scaleLabel].min, g = this.scaleGroups[t.scaleLabel].max;
        t.absoluteValues.filter((_) => ![null, void 0].includes(_)).map((_) => (_ - o) / (g - o));
        const l = {
          valueMin: o,
          valueMax: g < 0 ? 0 : g
        }, e = {
          max: t.scaleMax || Math.max(...t.absoluteValues) || 1,
          min: t.scaleMin || Math.min(...t.absoluteValues.filter((_) => ![void 0, null].includes(_))) > 0 ? 0 : Math.min(...t.absoluteValues.filter((_) => ![null, void 0].includes(_)))
        }, A = t.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, x = 1.0000001, N = this.calculateNiceScaleWithExactExtremes(e.min, e.max === e.min ? e.max * x : e.max, A), L = this.calculateNiceScaleWithExactExtremes(l.valueMin, l.valueMax === l.valueMin ? l.valueMax * x : l.valueMax, A), G = N.min >= 0 ? 0 : Math.abs(N.min), k = 0, v = N.max + G, w = L.max + Math.abs(k), F = this.mutableConfig.isStacked ? this.drawingArea.height * (1 - t.cumulatedStackRatio) : 0, C = this.mutableConfig.isStacked ? this.drawingArea.height * t.stackRatio - this.FINAL_CONFIG.chart.grid.labels.yAxis.gap : this.drawingArea.height, O = this.drawingArea.bottom - F - C * G / v, p = this.drawingArea.bottom - F - C * k / w, a = this.absoluteDataset.filter((_) => _.type === "bar").filter((_) => !this.segregatedSeries.includes(_.id)).length, c = t.series.map((_, M) => {
          const q = this.mutableConfig.useIndividualScale ? (t.absoluteValues[M] + G) / v : this.ratioToMax(_), D = this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.drawingArea.left + this.drawingArea.width / this.maxSeries * M : this.drawingArea.left + this.slot.bar * n + this.slot.bar * M * a - this.barSlot / 2 - n * this.barPeriodGap;
          return {
            yOffset: this.checkNaN(F),
            individualHeight: this.checkNaN(C),
            x: this.checkNaN(D),
            y: this.drawingArea.bottom - F - C * q,
            value: t.absoluteValues[M],
            zeroPosition: this.checkNaN(O),
            individualMax: this.checkNaN(v),
            comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[M] || ""
          };
        }), s = t.absoluteValues.map((_) => L.min >= 0 ? (_ - Math.abs(L.min)) / (L.max - Math.abs(L.min)) : (_ + Math.abs(L.min)) / (L.max + Math.abs(L.min))), h = t.series.map((_, M) => {
          const q = this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.drawingArea.left + this.drawingArea.width / this.maxSeries * M : this.drawingArea.left - this.slot.bar / 2 + this.slot.bar * n + this.slot.bar * M * this.absoluteDataset.filter((D) => D.type === "bar").filter((D) => !this.segregatedSeries.includes(D.id)).length;
          return {
            yOffset: this.checkNaN(F),
            individualHeight: this.checkNaN(C),
            x: this.checkNaN(q),
            y: this.checkNaN(this.drawingArea.bottom - this.checkNaN(F) - (this.checkNaN(C) * s[M] || 0)),
            value: t.absoluteValues[M],
            zeroPosition: this.checkNaN(O),
            individualMax: this.checkNaN(v),
            comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[M] || ""
          };
        }), y = N.ticks.map((_) => ({
          y: _ >= 0 ? O - C * (_ / v) : O + C * Math.abs(_) / v,
          value: _,
          prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
          suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
          datapoint: t
        })), z = L.ticks.map((_) => {
          const M = (_ - L.min) / (L.max - L.min);
          return {
            y: _ >= 0 ? p - C * M : p + C * M,
            value: _,
            prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
            suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
            datapoint: t
          };
        });
        return this.scaleGroups[t.scaleLabel].name = t.name, this.scaleGroups[t.scaleLabel].groupName = t.scaleLabel, this.scaleGroups[t.scaleLabel].groupColor = this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor || t.color, this.scaleGroups[t.scaleLabel].color = t.color, this.scaleGroups[t.scaleLabel].scaleYLabels = t.autoScaling ? z : y, this.scaleGroups[t.scaleLabel].zeroPosition = t.autoScaling ? p : O, this.scaleGroups[t.scaleLabel].individualMax = t.autoScaling ? w : v, this.scaleGroups[t.scaleLabel].scaleLabel = t.scaleLabel, this.scaleGroups[t.scaleLabel].id = t.id, this.scaleGroups[t.scaleLabel].yOffset = F, this.scaleGroups[t.scaleLabel].individualHeight = C, this.scaleGroups[t.scaleLabel].autoScaleYLabels = z, this.scaleGroups[t.scaleLabel].unique = this.activeSeriesWithStackRatios.filter((_) => _.scaleLabel === t.scaleLabel).length === 1, {
          ...t,
          yOffset: F,
          autoScaleYLabels: z,
          individualHeight: C,
          scaleYLabels: t.autoScaling ? z : y,
          individualScale: t.autoScaling ? L : N,
          individualMax: t.autoScaling ? w : v,
          zeroPosition: t.autoScaling ? p : O,
          plots: t.autoScaling ? h : c,
          groupId: this.scaleGroups[t.scaleLabel].groupId
        };
      });
    },
    lineSet() {
      return this.activeSeriesWithStackRatios.filter((t) => t.type === "line").map((t) => {
        this.checkAutoScaleError(t);
        const n = this.scaleGroups[t.scaleLabel].min, o = this.scaleGroups[t.scaleLabel].max;
        t.absoluteValues.filter((m) => ![null, void 0].includes(m)).map((m) => (m - n) / (o - n));
        const g = {
          valueMin: n,
          valueMax: o
        }, l = {
          max: t.scaleMax || Math.max(...t.absoluteValues) || 1,
          min: t.scaleMin || (Math.min(...t.absoluteValues) > 0 ? 0 : Math.min(...t.absoluteValues))
        }, e = t.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, A = 1.0000001, x = this.calculateNiceScaleWithExactExtremes(l.min, l.max === l.min ? l.max * A : l.max, e), N = this.calculateNiceScaleWithExactExtremes(g.valueMin, g.valueMax === g.valueMin ? g.valueMax * A : g.valueMax, e), L = x.min >= 0 ? 0 : Math.abs(x.min), G = 0, k = x.max + Math.abs(L), v = N.max + Math.abs(G), w = this.mutableConfig.isStacked ? this.drawingArea.height * (1 - t.cumulatedStackRatio) : 0, F = this.mutableConfig.isStacked ? this.drawingArea.height * t.stackRatio - this.FINAL_CONFIG.chart.grid.labels.yAxis.gap : this.drawingArea.height, C = this.drawingArea.bottom - w - F * L / k, O = this.drawingArea.bottom - w - F * G / v, p = t.series.map((m, P) => {
          const ee = this.mutableConfig.useIndividualScale ? (t.absoluteValues[P] + Math.abs(L)) / k : this.ratioToMax(m);
          return {
            x: this.checkNaN(this.drawingArea.left + this.slot.line / 2 + this.slot.line * P),
            y: this.checkNaN(this.drawingArea.bottom - w - F * ee),
            value: t.absoluteValues[P],
            comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[P] || ""
          };
        }), a = t.absoluteValues.map((m) => N.min >= 0 ? (m - Math.abs(N.min)) / (N.max - Math.abs(N.min)) : (m + Math.abs(N.min)) / (N.max + Math.abs(N.min))), c = t.series.map((m, P) => [void 0, null].includes(t.absoluteValues[P]) ? {
          x: this.checkNaN(this.drawingArea.left + this.slot.line / 2 + this.slot.line * P),
          y: C,
          value: t.absoluteValues[P],
          comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[P] || ""
        } : {
          x: this.checkNaN(this.drawingArea.left + this.slot.line / 2 + this.slot.line * P),
          y: this.checkNaN(this.drawingArea.bottom - w - (F * a[P] || 0)),
          value: t.absoluteValues[P],
          comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[P] || ""
        }), s = this.FINAL_CONFIG.line.cutNullValues ? this.createSmoothPathWithCuts(p) : this.createSmoothPath(p.filter((m) => m.value !== null)), h = this.FINAL_CONFIG.line.cutNullValues ? this.createSmoothPathWithCuts(c) : this.createSmoothPath(c.filter((m) => m.value !== null)), y = this.FINAL_CONFIG.line.cutNullValues ? this.createStraightPathWithCuts(p) : this.createStraightPath(p.filter((m) => m.value !== null)), z = this.FINAL_CONFIG.line.cutNullValues ? this.createStraightPathWithCuts(c) : this.createStraightPath(c.filter((m) => m.value !== null)), _ = x.ticks.map((m) => ({
          y: m >= 0 ? C - F * (m / k) : C + F * Math.abs(m) / k,
          value: m,
          prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
          suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
          datapoint: t
        })), M = N.ticks.map((m) => {
          const P = (m - N.min) / (N.max - N.min);
          return {
            y: m >= 0 ? O - F * P : O + F * P,
            value: m,
            prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
            suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
            datapoint: t
          };
        });
        this.scaleGroups[t.scaleLabel].name = t.name, this.scaleGroups[t.scaleLabel].groupName = t.scaleLabel, this.scaleGroups[t.scaleLabel].groupColor = this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor || t.color, this.scaleGroups[t.scaleLabel].color = t.color, this.scaleGroups[t.scaleLabel].scaleYLabels = t.autoScaling ? M : _, this.scaleGroups[t.scaleLabel].zeroPosition = t.autoScaling ? O : C, this.scaleGroups[t.scaleLabel].individualMax = t.autoScaling ? v : k, this.scaleGroups[t.scaleLabel].scaleLabel = t.scaleLabel, this.scaleGroups[t.scaleLabel].id = t.id, this.scaleGroups[t.scaleLabel].yOffset = w, this.scaleGroups[t.scaleLabel].individualHeight = F, this.scaleGroups[t.scaleLabel].autoScaleYLabels = M, this.scaleGroups[t.scaleLabel].unique = this.activeSeriesWithStackRatios.filter((m) => m.scaleLabel === t.scaleLabel).length === 1;
        const q = this.mutableConfig.useIndividualScale ? t.autoScaling ? O : C : this.zero, D = Math.max(Math.max(t.autoScaling ? O : _.at(-1).y, this.drawingArea.top), q);
        return {
          ...t,
          yOffset: w,
          autoScaleYLabels: M,
          individualHeight: F,
          scaleYLabels: t.autoScaling ? M : _,
          individualScale: t.autoScaling ? N : x,
          individualMax: t.autoScaling ? v : k,
          zeroPosition: t.autoScaling ? O : C,
          curve: t.autoScaling ? h : s,
          plots: t.autoScaling ? c : p,
          area: t.useArea ? this.mutableConfig.useIndividualScale ? this.FINAL_CONFIG.line.cutNullValues ? this.createIndividualAreaWithCuts(
            t.autoScaling ? c : p,
            D
          ) : this.createIndividualArea(
            t.autoScaling ? c.filter((m) => m.value !== null) : p.filter((m) => m.value !== null),
            D
          ) : this.createIndividualArea(p.filter((m) => m.value !== null), D) : "",
          curveAreas: t.useArea ? J(
            t.autoScaling ? this.FINAL_CONFIG.line.cutNullValues ? c : c.filter((m) => m.value !== null) : this.FINAL_CONFIG.line.cutNullValues ? p : p.filter((m) => m.value !== null),
            D,
            this.FINAL_CONFIG.line.cutNullValues
          ) : [],
          straight: t.autoScaling ? z : y,
          groupId: this.scaleGroups[t.scaleLabel].groupId
        };
      });
    },
    plotSet() {
      return this.activeSeriesWithStackRatios.filter((t) => t.type === "plot").map((t) => {
        this.checkAutoScaleError(t);
        const n = this.scaleGroups[t.scaleLabel].min, o = this.scaleGroups[t.scaleLabel].max;
        t.absoluteValues.filter((y) => ![null, void 0].includes(y)).map((y) => (y - n) / (o - n));
        const g = {
          valueMin: n,
          valueMax: o
        }, l = {
          max: t.scaleMax || Math.max(...t.absoluteValues) || 1,
          min: t.scaleMin || Math.min(...t.absoluteValues) > 0 ? 0 : Math.min(...t.absoluteValues)
        }, e = t.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, A = 1.0000001, x = this.calculateNiceScaleWithExactExtremes(l.min, l.max === l.min ? l.max * A : l.max, e), N = this.calculateNiceScaleWithExactExtremes(g.valueMin, g.valueMax === g.valueMin ? g.valueMax * A : g.valueMax, e), L = x.min >= 0 ? 0 : Math.abs(x.min), G = 0, k = x.max + L, v = N.max + Math.abs(G), w = this.mutableConfig.isStacked ? this.drawingArea.height * (1 - t.cumulatedStackRatio) : 0, F = this.mutableConfig.isStacked ? this.drawingArea.height * t.stackRatio - this.FINAL_CONFIG.chart.grid.labels.yAxis.gap : this.drawingArea.height, C = this.drawingArea.bottom - w - F * L / k, O = this.drawingArea.bottom - w - F * G / v, p = t.series.map((y, z) => {
          const _ = this.mutableConfig.useIndividualScale ? (t.absoluteValues[z] + Math.abs(L)) / k : this.ratioToMax(y);
          return {
            x: this.checkNaN(this.drawingArea.left + this.slot.plot / 2 + this.slot.plot * z),
            y: this.checkNaN(this.drawingArea.bottom - w - F * _),
            value: t.absoluteValues[z],
            comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[z] || ""
          };
        }), a = t.absoluteValues.map((y) => N.min >= 0 ? (y - Math.abs(N.min)) / (N.max - Math.abs(N.min)) : (y + Math.abs(N.min)) / (N.max + Math.abs(N.min))), c = t.series.map((y, z) => ({
          x: this.checkNaN(this.drawingArea.left + this.slot.plot / 2 + this.slot.plot * z),
          y: this.checkNaN(this.drawingArea.bottom - w - (F * a[z] || 0)),
          value: t.absoluteValues[z],
          comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[z] || ""
        })), s = x.ticks.map((y) => ({
          y: y >= 0 ? C - F * (y / k) : C + F * Math.abs(y) / k,
          value: y,
          prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
          suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
          datapoint: t
        })), h = N.ticks.map((y) => {
          const z = (y - N.min) / (N.max - N.min);
          return {
            y: y >= 0 ? O - F * z : O + F * z,
            value: y,
            prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
            suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix,
            datapoint: t
          };
        });
        return this.scaleGroups[t.scaleLabel].name = t.name, this.scaleGroups[t.scaleLabel].groupName = t.scaleLabel, this.scaleGroups[t.scaleLabel].groupColor = this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor || t.color, this.scaleGroups[t.scaleLabel].color = t.color, this.scaleGroups[t.scaleLabel].scaleYLabels = t.autoScaling ? h : s, this.scaleGroups[t.scaleLabel].zeroPosition = t.autoScaling ? O : C, this.scaleGroups[t.scaleLabel].individualMax = t.autoScaling ? v : k, this.scaleGroups[t.scaleLabel].scaleLabel = t.scaleLabel, this.scaleGroups[t.scaleLabel].id = t.id, this.scaleGroups[t.scaleLabel].yOffset = w, this.scaleGroups[t.scaleLabel].individualHeight = F, this.scaleGroups[t.scaleLabel].autoScaleYLabels = h, this.scaleGroups[t.scaleLabel].unique = this.activeSeriesWithStackRatios.filter((y) => y.scaleLabel === t.scaleLabel).length === 1, {
          ...t,
          yOffset: w,
          autoScaleYLabels: h,
          individualHeight: F,
          scaleYLabels: t.autoScaling ? h : s,
          individualScale: t.autoScaling ? N : x,
          individualMax: t.autoScaling ? v : k,
          zeroPosition: t.autoScaling ? O : C,
          plots: t.autoScaling ? c : p,
          groupId: this.scaleGroups[t.scaleLabel].groupId
        };
      });
    },
    drawingArea() {
      function t(g) {
        const l = /* @__PURE__ */ new Set();
        return g.forEach((e) => {
          const A = e.scaleLabel || "__noScaleLabel__";
          l.add(A);
        }), l.size;
      }
      const n = t(this.absoluteDataset.filter((g) => !this.segregatedSeries.includes(g.id))), o = this.mutableConfig.useIndividualScale && this.FINAL_CONFIG.chart.grid.labels.show ? n * (this.mutableConfig.isStacked ? 0 : this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth) : 0;
      return {
        top: this.FINAL_CONFIG.chart.padding.top,
        right: this.width - this.FINAL_CONFIG.chart.padding.right,
        bottom: this.height - this.FINAL_CONFIG.chart.padding.bottom,
        left: this.FINAL_CONFIG.chart.padding.left + o,
        height: this.height - (this.FINAL_CONFIG.chart.padding.top + this.FINAL_CONFIG.chart.padding.bottom),
        width: this.width - (this.FINAL_CONFIG.chart.padding.right + this.FINAL_CONFIG.chart.padding.left + o)
      };
    },
    max() {
      return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax ? this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax : Math.max(...this.safeDataset.filter((t) => !this.segregatedSeries.includes(t.id)).map((t) => Math.max(...t.series)));
    },
    min() {
      if (this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin !== null)
        return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin;
      const t = Math.min(...this.safeDataset.filter((n) => !this.segregatedSeries.includes(n.id)).map((n) => Math.min(...n.series)));
      return t > 0 ? 0 : t;
    },
    niceScale() {
      return this.calculateNiceScaleWithExactExtremes(this.min, this.max < 0 ? 0 : this.max, this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps);
    },
    maxSeries() {
      return this.slicer.end - this.slicer.start;
    },
    timeLabels() {
      const t = Math.max(...this.dataset.map((o) => this.largestTriangleThreeBucketsArray({ data: o.series, threshold: this.FINAL_CONFIG.downsample.threshold }).length)), n = [];
      for (let o = 0; o < t; o += 1)
        n.push({
          text: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[o] || String(o),
          absoluteIndex: o
        });
      return n.slice(this.slicer.start, this.slicer.end);
    },
    slot() {
      return {
        bar: this.drawingArea.width / this.maxSeries / this.safeDataset.filter((t) => t.type === "bar").filter((t) => !this.segregatedSeries.includes(t.id)).length,
        plot: this.drawingArea.width / this.maxSeries,
        line: this.drawingArea.width / this.maxSeries
      };
    },
    barSlot() {
      const t = this.safeDataset.filter((n) => n.type === "bar").filter((n) => !this.segregatedSeries.includes(n.id)).length;
      return this.drawingArea.width / this.maxSeries / t - this.barPeriodGap * t;
    },
    barPeriodGap() {
      return this.slot.line * this.FINAL_CONFIG.bar.periodGap;
    },
    maxSlot() {
      return Math.max(...Object.values(this.slot).filter((t) => t !== 1 / 0));
    },
    table() {
      if (this.safeDataset.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
      const t = this.relativeDataset.map((o) => ({
        label: o.name,
        color: o.color,
        type: o.type
      })), n = [];
      return this.timeLabels.forEach((o, g) => {
        const l = [o.text];
        this.relativeDataset.forEach((e) => {
          l.push(this.canShowValue(e.absoluteValues[g]) ? Number(e.absoluteValues[g].toFixed(this.FINAL_CONFIG.table.rounding)) : "");
        }), n.push(l);
      }), { head: t, body: n };
    },
    dataTable() {
      const t = this.FINAL_CONFIG.table.showSum;
      let n = [""].concat(this.relativeDataset.map((e) => e.name));
      t && (n = n.concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>'));
      let o = [];
      for (let e = 0; e < this.maxSeries; e += 1) {
        const A = this.relativeDataset.map((x) => x.absoluteValues[e] ?? 0).reduce((x, N) => x + N, 0);
        o.push(
          [
            this.timeLabels[e].text ?? "-"
          ].concat(this.relativeDataset.map(
            (x) => this.applyDataLabel(
              x.type === "line" ? this.FINAL_CONFIG.line.labels.formatter : x.type === "bar" ? this.FINAL_CONFIG.bar.labels.formatter : this.FINAL_CONFIG.plot.labels.formatter,
              x.absoluteValues[e] ?? 0,
              this.dataLabel({
                p: x.prefix || this.FINAL_CONFIG.chart.labels.prefix,
                v: x.absoluteValues[e] ?? 0,
                s: x.suffix || this.FINAL_CONFIG.chart.labels.suffix,
                r: this.FINAL_CONFIG.table.rounding
              })
            )
          )).concat(t ? (A ?? 0).toFixed(this.FINAL_CONFIG.table.rounding) : [])
        );
      }
      const g = {
        th: {
          backgroundColor: this.FINAL_CONFIG.table.th.backgroundColor,
          color: this.FINAL_CONFIG.table.th.color,
          outline: this.FINAL_CONFIG.table.th.outline
        },
        td: {
          backgroundColor: this.FINAL_CONFIG.table.td.backgroundColor,
          color: this.FINAL_CONFIG.table.td.color,
          outline: this.FINAL_CONFIG.table.td.outline
        },
        breakpoint: this.FINAL_CONFIG.table.responsiveBreakpoint
      }, l = [this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map((e) => e.name)).concat(this.FINAL_CONFIG.table.columnNames.total);
      return { head: n, body: o, config: g, colNames: l };
    },
    dataTooltipSlot() {
      return {
        datapoint: this.selectedSeries,
        seriesIndex: this.selectedSerieIndex,
        series: this.absoluteDataset,
        bars: this.barSet,
        lines: this.lineSet,
        plots: this.plotSet,
        config: this.FINAL_CONFIG
      };
    },
    selectedSeries() {
      return this.relativeDataset.map((t) => ({
        slotAbsoluteIndex: t.slotAbsoluteIndex,
        shape: t.shape || null,
        name: t.name,
        color: t.color,
        type: t.type,
        value: t.absoluteValues.find((n, o) => o === this.selectedSerieIndex),
        comments: t.comments || [],
        prefix: t.prefix || this.FINAL_CONFIG.chart.labels.prefix,
        suffix: t.suffix || this.FINAL_CONFIG.chart.labels.suffix
      }));
    },
    tooltipContent() {
      let t = "", n = this.selectedSeries.map((l) => l.value).filter((l) => this.isSafeValue(l) && l !== null).reduce((l, e) => Math.abs(l) + Math.abs(e), 0);
      const o = this.timeLabels[this.selectedSerieIndex], g = this.FINAL_CONFIG.chart.tooltip.customFormat;
      return this.isFunction(g) && this.functionReturnsString(() => g({
        seriesIndex: this.selectedSerieIndex,
        datapoint: this.selectedSeries,
        series: this.absoluteDataset,
        bars: this.barSet,
        lines: this.lineSet,
        plots: this.plotSet,
        config: this.FINAL_CONFIG
      })) ? g({
        seriesIndex: this.selectedSerieIndex,
        datapoint: this.selectedSeries,
        series: this.absoluteDataset,
        bars: this.barSet,
        lines: this.lineSet,
        plots: this.plotSet,
        config: this.FINAL_CONFIG
      }) : (o && o.text && this.FINAL_CONFIG.chart.tooltip.showTimeLabel && (t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${o.text}</div>`), this.selectedSeries.forEach((l) => {
        if (this.isSafeValue(l.value)) {
          let e = "", A = "";
          switch (this.icons[l.type]) {
            case "bar":
              e = `<svg viewBox="0 0 40 40" height="14" width="14">${this.$slots.pattern ? `<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${l.color}" />` : ""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${this.$slots.pattern ? `url(#pattern_${this.uniqueId}_${l.slotAbsoluteIndex}` : l.color}" /></svg>`;
              break;
            case "line":
              !l.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(l.shape) ? A = `<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${l.color}" />` : l.shape === "triangle" ? A = `<path d="${H({ plot: { x: 10, y: 8 }, radius: 4, sides: 3, rotation: 0.52 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : l.shape === "square" ? A = `<path d="${H({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0.8 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : l.shape === "diamond" ? A = `<path d="${H({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : l.shape === "pentagon" ? A = `<path d="${H({ plot: { x: 10, y: 8 }, radius: 4, sides: 5, rotation: 0.95 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : l.shape === "hexagon" ? A = `<path d="${H({ plot: { x: 10, y: 8 }, radius: 4, sides: 6, rotation: 0 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : l.shape === "star" && (A = `<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${l.color}" points="${U({ plot: { x: 10, y: 8 }, radius: 4 })}" />`), e = `<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${l.color}" />${A}</svg>`;
              break;
            case "plot":
              if (!l.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(l.shape)) {
                e = `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" /></svg>`;
                break;
              }
              if (l.shape === "star") {
                e = `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" points="${U({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>`;
                break;
              }
              if (l.shape === "triangle") {
                e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${H({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
                break;
              }
              if (l.shape === "square") {
                e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${H({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
                break;
              }
              if (l.shape === "diamond") {
                e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${H({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
                break;
              }
              if (l.shape === "pentagon") {
                e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${H({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
                break;
              }
              if (l.shape === "hexagon") {
                e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${H({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
                break;
              }
          }
          t += `<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${e}</div> ${l.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue ? this.applyDataLabel(
            l.type === "line" ? this.FINAL_CONFIG.line.labels.formatter : l.type === "bar" ? this.FINAL_CONFIG.bar.labels.formatter : this.FINAL_CONFIG.plot.labels.formatter,
            l.value,
            this.dataLabel({
              p: l.prefix,
              v: l.value,
              s: l.suffix,
              r: this.FINAL_CONFIG.chart.tooltip.roundingValue
            }),
            { datapoint: l }
          ) : ""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage ? `(${K({
            v: this.checkNaN(Math.abs(l.value) / n * 100),
            s: "%",
            r: this.FINAL_CONFIG.chart.tooltip.roundingPercentage
          })})` : ""}</div>`, this.FINAL_CONFIG.chart.comments.showInTooltip && l.comments.length && l.comments.slice(this.slicer.start, this.slicer.end)[this.selectedSerieIndex] && (t += `<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${l.color}">${l.comments.slice(this.slicer.start, this.slicer.end)[this.selectedSerieIndex]}</div>`);
        }
      }), `<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${this.FINAL_CONFIG.chart.tooltip.color}">${t}</div>`);
    },
    svg() {
      return {
        height: this.height,
        width: this.width
      };
    },
    yLabels() {
      return this.niceScale.ticks.map((t) => ({
        y: t >= 0 ? this.zero - this.drawingArea.height * this.ratioToMax(t) : this.zero + this.drawingArea.height * this.ratioToMax(Math.abs(t)),
        value: t,
        prefix: this.FINAL_CONFIG.chart.labels.prefix,
        suffix: this.FINAL_CONFIG.chart.labels.suffix
      }));
    },
    zero() {
      return this.drawingArea.bottom - this.drawingArea.height * this.ratioToMax(this.relativeZero);
    }
  },
  mounted() {
    this.svgRef = this.$refs.svgRef, this.prepareChart(), this.setupSlicer(), document.addEventListener("mousemove", (t) => {
      this.clientPosition = {
        x: t.clientX,
        y: t.clientY
      };
    }), document.addEventListener("scroll", this.hideTags);
  },
  beforeUnmount() {
    document.removeEventListener("scroll", this.hideTags);
  },
  methods: {
    abbreviate: Me,
    adaptColorToBackground: ze,
    applyDataLabel: pe,
    assignStackRatios: ve,
    calcLinearProgression: Ge,
    calculateNiceScaleWithExactExtremes: Oe,
    checkNaN: we,
    closestDecimal: ke,
    convertColorToHex: Se,
    convertConfigColors: Ce,
    convertCustomPalette: Le,
    createCsvContent: Ae,
    createSmoothPath: ye,
    createStraightPath: _e,
    createTSpans: Fe,
    dataLabel: K,
    downloadCsv: be,
    error: xe,
    forceValidValue: me,
    functionReturnsString: Ne,
    hasDeepProperty: Ie,
    isFunction: fe,
    isSafeValue: ge,
    largestTriangleThreeBucketsArray: de,
    objectIsEmpty: ue,
    setOpacity: he,
    shiftHue: oe,
    translateSize: ce,
    treeShake: ne,
    useMouse: Be,
    useNestedProp: Q,
    createUid: Z,
    placeXYTag: se,
    createSmoothPathWithCuts: ie,
    createStraightPathWithCuts: re,
    createAreaWithCuts: ae,
    createIndividualAreaWithCuts: le,
    createSmoothAreaSegments: J,
    createIndividualArea: te,
    hideTags() {
      const t = document.querySelectorAll(".vue-ui-xy-tag");
      t.length && Array.from(t).forEach((n) => n.style.opacity = "0");
    },
    setTagRef(t, n, o, g, l) {
      o && (this.tagRefs[`${t}_${n}_${g}_${l}`] = o);
    },
    setUserOptionsVisibility(t = !1) {
      this.showUserOptionsOnChartHover && (this.userOptionsVisible = t);
    },
    toggleAnnotator() {
      this.isAnnotator = !this.isAnnotator;
    },
    selectTimeLabel(t, n) {
      const o = this.relativeDataset.map((g) => ({
        shape: g.shape || null,
        name: g.name,
        color: g.color,
        type: g.type,
        value: g.absoluteValues.find((l, e) => e === n),
        comments: g.comments || [],
        prefix: g.prefix || this.FINAL_CONFIG.chart.labels.prefix,
        suffix: g.suffix || this.FINAL_CONFIG.chart.labels.suffix
      }));
      this.$emit("selectTimeLabel", {
        datapoint: o,
        absoluteIndex: t.absoluteIndex,
        label: t.text
      });
    },
    getHighlightAreaPosition(t) {
      const n = this.drawingArea.left + this.drawingArea.width / this.maxSeries * (t.from - this.slicer.start), o = this.drawingArea.width / (this.slicer.end - this.slicer.start) * t.span < 0 ? 1e-5 : this.drawingArea.width / (this.slicer.end - this.slicer.start) * t.span;
      return {
        x: n < this.drawingArea.left ? this.drawingArea.left : n,
        width: o
      };
    },
    prepareConfig() {
      const t = Te().vue_ui_xy;
      if (!Object.keys(this.config || {}).length)
        return t;
      const n = this.useNestedProp({
        userConfig: this.config,
        defaultConfig: t
      });
      return this.config && this.hasDeepProperty(this.config, "chart.highlightArea") && (Array.isArray(this.config.chart.highlightArea) ? n.chart.highlightArea = this.config.chart.highlightArea : n.chart.highlightArea = [this.config.chart.highlightArea]), this.config && this.hasDeepProperty(this.config, "chart.grid.labels.yAxis.scaleMin") ? n.chart.grid.labels.yAxis.scaleMin = this.config.chart.grid.labels.yAxis.scaleMin : n.chart.grid.labels.yAxis.scaleMin = null, this.config && this.hasDeepProperty(this.config, "chart.grid.labels.yAxis.scaleMax") ? n.chart.grid.labels.yAxis.scaleMax = this.config.chart.grid.labels.yAxis.scaleMax : n.chart.grid.labels.yAxis.scaleMax = null, this.config && this.hasDeepProperty(this.config, "chart.zoom.startIndex") ? n.chart.zoom.startIndex = this.config.chart.zoom.startIndex : n.chart.zoom.startIndex = null, this.config && this.hasDeepProperty(this.config, "chart.zoom.endIndex") ? n.chart.zoom.endIndex = this.config.chart.zoom.endIndex : n.chart.zoom.endIndex = null, this.config && this.hasDeepProperty(this.config, "chart.grid.labels.yAxis.groupColor") ? n.chart.grid.labels.yAxis.groupColor = this.config.chart.grid.labels.yAxis.groupColor : n.chart.grid.labels.yAxis.groupColor = null, n.theme ? {
        ...Q({
          userConfig: this.themes.vue_ui_xy[n.theme] || this.config,
          defaultConfig: n
        }),
        customPalette: this.themePalettes[n.theme] || this.palette
      } : n;
    },
    prepareChart() {
      if (this.objectIsEmpty(this.dataset) ? this.error({
        componentName: "VueUiXy",
        type: "dataset"
      }) : this.dataset.forEach((t, n) => {
        [null, void 0].includes(t.name) && this.error({
          componentName: "VueUiXy",
          type: "datasetSerieAttribute",
          property: "name (string)",
          index: n
        });
      }), this.FINAL_CONFIG.showWarnings && this.dataset.forEach((t) => {
        t.series.forEach((n, o) => {
          this.isSafeValue(n) || console.warn(`VueUiXy has detected an unsafe value in your dataset:
-----> The serie '${t.name}' contains the value '${n}' at index ${o}.
'${n}' was converted to null to allow the chart to display.`);
        });
      }), this.showUserOptionsOnChartHover = this.FINAL_CONFIG.chart.userOptions.showOnChartHover, this.keepUserOptionState = this.FINAL_CONFIG.chart.userOptions.keepStateOnChartLeave, this.userOptionsVisible = !this.FINAL_CONFIG.chart.userOptions.showOnChartHover, this.mutableConfig = {
        dataLabels: {
          show: !0
        },
        showTooltip: this.FINAL_CONFIG.chart.tooltip.show === !0,
        showTable: this.FINAL_CONFIG.showTable === !0,
        isStacked: this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked,
        useIndividualScale: this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale
      }, this.FINAL_CONFIG.responsive) {
        const n = this.$refs.chart.parentNode, { height: o, width: g } = n.getBoundingClientRect();
        let l = null, e = 0;
        this.FINAL_CONFIG.chart.title.show && (l = this.$refs.chartTitle, e = l.getBoundingClientRect().height);
        let A = null, x = 0;
        this.FINAL_CONFIG.chart.zoom.show && this.maxX > 6 && this.isDataset && (A = this.$refs.chartSlicer.$el, x = A.getBoundingClientRect().height);
        let N = null, L = 0;
        this.FINAL_CONFIG.chart.legend.show && (N = this.$refs.chartLegend, L = N.getBoundingClientRect().height);
        let G = 0;
        this.$refs.source && (G = this.$refs.source.getBoundingClientRect().height);
        let k = 0;
        this.$refs.noTitle && (k = this.$refs.noTitle.getBoundingClientRect().height), this.height = o - e - L - x - G - k, this.width = g, this.viewBox = `0 0 ${this.width < 0 ? 10 : this.width} ${this.height < 0 ? 10 : this.height}`, this.convertSizes(), new ResizeObserver((w) => {
          for (const F of w)
            this.$refs.chartTitle && (e = this.$refs.chartTitle.getBoundingClientRect().height), this.$refs.chartSlicer && this.$refs.chartSlicer.$el && (x = this.$refs.chartSlicer.$el.getBoundingClientRect().height), this.$refs.chartLegend && (L = this.$refs.chartLegend.getBoundingClientRect().height), this.$refs.source && (G = this.$refs.source.getBoundingClientRect().height), requestAnimationFrame(() => {
              this.height = F.contentBoxSize[0].blockSize - e - L - x - G - 24, this.width = F.contentBoxSize[0].inlineSize, this.viewBox = `0 0 ${this.width < 0 ? 10 : this.width} ${this.height < 0 ? 10 : this.height}`, this.convertSizes();
            });
        }).observe(n);
      } else
        this.height = this.FINAL_CONFIG.chart.height, this.width = this.FINAL_CONFIG.chart.width, this.viewBox = `0 0 ${this.width} ${this.height}`, this.fontSizes.dataLabels = this.FINAL_CONFIG.chart.grid.labels.fontSize, this.fontSizes.yAxis = this.FINAL_CONFIG.chart.grid.labels.axis.fontSize, this.fontSizes.xAxis = this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize, this.fontSizes.plotLabels = this.FINAL_CONFIG.chart.labels.fontSize, this.plotRadii.plot = this.FINAL_CONFIG.plot.radius, this.plotRadii.line = this.FINAL_CONFIG.line.radius;
    },
    selectMinimapIndex(t) {
      this.selectedMinimapIndex = t;
    },
    convertSizes() {
      this.fontSizes.dataLabels = this.translateSize({
        relator: this.height,
        adjuster: 400,
        source: this.FINAL_CONFIG.chart.grid.labels.fontSize,
        threshold: 10,
        fallback: 10
      }), this.fontSizes.yAxis = this.translateSize({
        relator: this.width,
        adjuster: 1e3,
        source: this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,
        threshold: 10,
        fallback: 10
      }), this.fontSizes.xAxis = this.translateSize({
        relator: this.width,
        adjuster: 1e3,
        source: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,
        threshold: 10,
        fallback: 10
      }), this.fontSizes.plotLabels = this.translateSize({
        relator: this.width,
        adjuster: 800,
        source: this.FINAL_CONFIG.chart.labels.fontSize,
        threshold: 10,
        fallback: 10
      }), this.plotRadii.plot = this.translateSize({
        relator: this.width,
        adjuster: 800,
        source: this.FINAL_CONFIG.plot.radius,
        threshold: 1,
        fallback: 1
      }), this.plotRadii.line = this.translateSize({
        relator: this.width,
        adjuster: 800,
        source: this.FINAL_CONFIG.line.radius,
        threshold: 1,
        fallback: 1
      });
    },
    toggleStack() {
      this.mutableConfig.isStacked = !this.mutableConfig.isStacked, this.mutableConfig.isStacked ? this.mutableConfig.useIndividualScale = !0 : this.mutableConfig.useIndividualScale = this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale;
    },
    toggleTable() {
      this.mutableConfig.showTable = !this.mutableConfig.showTable;
    },
    toggleLabels() {
      this.mutableConfig.dataLabels.show = !this.mutableConfig.dataLabels.show;
    },
    toggleTooltip() {
      this.mutableConfig.showTooltip = !this.mutableConfig.showTooltip;
    },
    checkAutoScaleError(t) {
      t.autoScaling && (this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale || console.warn(`VueUiXy (datapoint: ${t.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`), this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked || console.warn(`VueUiXy (datapoint: ${t.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`));
    },
    createArea(t, n) {
      if (!t[0]) return [-10, -10, "", -10, -10];
      const o = { x: t[0].x, y: n }, g = { x: t.at(-1).x, y: n }, l = [];
      return t.forEach((e) => {
        l.push(`${e.x},${e.y} `);
      }), [o.x, o.y, ...l, g.x, g.y].toString();
    },
    createStar: U,
    createPolygonPath: H,
    fillArray(t, n) {
      let o = Array(t).fill(0);
      for (let g = 0; g < n.length && g < t; g += 1)
        o[g] = n[g];
      return o;
    },
    async setupSlicer() {
      (this.FINAL_CONFIG.chart.zoom.startIndex !== null || this.FINAL_CONFIG.chart.zoom.endIndex !== null) && this.$refs.chartSlicer ? (this.FINAL_CONFIG.chart.zoom.startIndex !== null && (await this.$nextTick(), await this.$nextTick(), this.$refs.chartSlicer.setStartValue(this.FINAL_CONFIG.chart.zoom.startIndex)), this.FINAL_CONFIG.chart.zoom.endIndex !== null && (await this.$nextTick(), await this.$nextTick(), this.$refs.chartSlicer.setEndValue(this.validSlicerEnd(this.FINAL_CONFIG.chart.zoom.endIndex + 1)))) : (this.slicer = {
        start: 0,
        end: Math.max(...this.dataset.map((t) => this.largestTriangleThreeBucketsArray({ data: t.series, threshold: this.FINAL_CONFIG.downsample.threshold }).length))
      }, this.slicerStep += 1);
    },
    refreshSlicer() {
      this.setupSlicer();
    },
    validSlicerEnd(t) {
      const n = Math.max(...this.dataset.map((o) => this.largestTriangleThreeBucketsArray({ data: o.series, threshold: this.FINAL_CONFIG.downsample.threshold }).length));
      return t > n ? n : t < 0 || this.FINAL_CONFIG.chart.zoom.startIndex !== null && t < this.FINAL_CONFIG.chart.zoom.startIndex ? this.FINAL_CONFIG.chart.zoom.startIndex !== null ? this.FINAL_CONFIG.chart.zoom.startIndex + 1 : 1 : t;
    },
    calcRectHeight(t) {
      const n = ![null, void 0].includes(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin) && this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin > 0 && this.min >= 0 ? this.drawingArea.bottom : this.zero;
      return t.value >= 0 ? this.checkNaN(n - t.y <= 0 ? 1e-5 : n - t.y) : this.checkNaN(t.y - this.zero <= 0 ? 1e-5 : t.y - this.zero);
    },
    calcIndividualHeight(t) {
      return t.value >= 0 ? this.checkNaN(t.zeroPosition - t.y <= 0 ? 1e-5 : t.zeroPosition - t.y) : this.checkNaN(t.y - t.zeroPosition <= 0 ? 1e-5 : t.zeroPosition - t.y);
    },
    calcRectWidth() {
      return this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.slot.line - this.drawingArea.width / this.maxSeries * 0.1 : this.slot.bar;
    },
    calcRectX(t) {
      return this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? t.x + this.drawingArea.width / this.maxSeries * 0.05 : t.x + this.slot.bar / 2;
    },
    calcRectY(t) {
      return t.value >= 0 ? t.y : this.zero;
    },
    calcIndividualRectY(t) {
      return t.value >= 0 ? t.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(t.zeroPosition) ? 0 : t.zeroPosition;
    },
    canShowValue(t) {
      return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(t);
    },
    findClosestValue(t, n) {
      let o = n[0], g = Math.abs(t - n[0]);
      for (let l = 1; l < n.length; l += 1) {
        const e = Math.abs(t - n[l]);
        e < g && n[l] < t && (o = n[l], g = e);
      }
      return o;
    },
    ratioToMax(t) {
      return t / (this.canShowValue(this.absoluteMax) ? this.absoluteMax : 1);
    },
    selectX(t) {
      this.$emit(
        "selectX",
        {
          dataset: this.relativeDataset.map((n) => ({
            name: n.name,
            value: [null, void 0, NaN].includes(n.absoluteValues[t]) ? null : n.absoluteValues[t],
            color: n.color,
            type: n.type
          })),
          index: t,
          indexLabel: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[t]
        }
      );
    },
    getData() {
      return this.absoluteDataset.map((t) => ({
        values: t.absoluteValues,
        color: t.color,
        name: t.name,
        type: t.type
      }));
    },
    segregate(t) {
      if (this.segregatedSeries.includes(t.id))
        this.segregatedSeries = this.segregatedSeries.filter((n) => n !== t.id);
      else {
        if (this.segregatedSeries.length + 1 === this.safeDataset.length) return;
        this.segregatedSeries.push(t.id);
      }
      this.$emit("selectLegend", this.relativeDataset.map((n) => ({
        name: n.name,
        values: n.absoluteValues,
        color: n.color,
        type: n.type
      }))), this.segregateStep += 1;
    },
    toggleTooltipVisibility(t, n = null) {
      this.isTooltip = t, t ? this.selectedSerieIndex = n : this.selectedSerieIndex = null;
    },
    toggleFullscreen(t) {
      this.isFullscreen = t, this.step += 1;
    },
    showSpinnerPdf() {
      this.isPrinting = !0;
    },
    async generatePdf() {
      this.showSpinnerPdf(), clearTimeout(this.__to__), this.isPrinting = !0, this.__to__ = setTimeout(async () => {
        try {
          const { default: t } = await import("./pdf-DflC6mtT.js");
          await t({
            domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
            fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
            options: this.FINAL_CONFIG.chart.userOptions.print
          });
        } catch (t) {
          console.error("Error generating PDF:", t);
        } finally {
          this.isPrinting = !1;
        }
      }, 100);
    },
    generateCsv() {
      const t = [[this.FINAL_CONFIG.chart.title.text], [this.FINAL_CONFIG.chart.title.subtitle.text], [""]], n = ["", ...this.table.head.map((e) => e.label)], o = this.table.body, g = t.concat([n]).concat(o), l = this.createCsvContent(g);
      this.downloadCsv({ csvContent: l, title: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy" });
    },
    showSpinnerImage() {
      this.isImaging = !0;
    },
    async generateImage() {
      this.showSpinnerImage(), clearTimeout(this.__to__), this.isImaging = !0, this.__to__ = setTimeout(async () => {
        try {
          const { default: t } = await import("./img-DacIcr83.js");
          await t({
            domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
            fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
            format: "png",
            options: this.FINAL_CONFIG.chart.userOptions.print
          });
        } catch (t) {
          console.error("Error generating image:", t);
        } finally {
          this.isImaging = !1;
        }
      }, 100);
    }
  }
}, it = ["id"], st = {
  key: 1,
  ref: "noTitle",
  class: "vue-data-ui-no-title-space",
  style: "height:36px; width: 100%; background:transparent"
}, nt = ["viewBox", "aria-label"], ct = ["x", "y", "width", "height"], ot = { key: 1 }, ht = { class: "vue-ui-xy-grid" }, ut = ["stroke", "x1", "x2", "y1", "y2"], dt = ["stroke", "x1", "x2", "y1", "y2"], gt = { key: 1 }, ft = ["x1", "x2", "y1", "y2", "stroke"], It = ["x1", "x2", "y1", "y2", "stroke"], Nt = ["x1", "x2", "y1", "y2", "stroke"], mt = { key: 3 }, xt = ["x1", "x2", "y1", "y2", "stroke"], bt = ["id"], Ft = ["stop-color"], _t = ["stop-color"], yt = ["stop-color"], At = ["id"], Lt = ["stop-color"], Ct = ["stop-color"], St = ["stop-color"], kt = ["id"], wt = ["stop-color"], Ot = ["stop-color"], Gt = ["id"], vt = ["stop-color"], pt = ["stop-color"], zt = ["id"], Mt = ["stop-color"], Tt = ["stop-color"], Pt = ["x", "y", "height", "width", "fill"], Vt = ["x", "y", "width"], Rt = ["x", "y", "height", "width", "fill"], Ht = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Dt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Wt = ["width", "x", "y"], Bt = { key: 0 }, Et = ["id"], Yt = ["fill"], qt = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Xt = ["x", "y", "font-size", "fill"], Ut = ["stroke", "x1", "x2", "y1", "y2"], Zt = { key: 2 }, Jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Kt = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], Qt = { key: 4 }, jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], $t = ["fill", "font-size", "transform"], el = ["x1", "x2", "y1", "y2", "stroke"], tl = ["x", "y", "font-size", "fill"], ll = ["x1", "x2", "y1", "y2", "stroke"], al = ["x", "y", "font-size", "fill"], rl = ["width", "x", "y"], il = { style: { width: "100%" } }, sl = { key: 0 }, nl = ["id"], cl = ["fill"], ol = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], hl = ["x", "y", "font-size", "fill"], ul = ["d", "stroke", "stroke-width", "stroke-dasharray"], dl = ["d", "stroke", "stroke-width", "stroke-dasharray"], gl = { key: 5 }, fl = { key: 0 }, Il = ["d", "fill"], Nl = ["d", "fill"], ml = ["d", "fill"], xl = ["d", "fill"], bl = ["d", "stroke", "stroke-width", "stroke-dasharray"], Fl = ["d", "stroke", "stroke-width", "stroke-dasharray"], _l = ["width", "x", "y"], yl = { style: { width: "100%" } }, Al = { key: 3 }, Ll = ["id"], Cl = ["fill"], Sl = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], kl = ["x", "y", "font-size", "fill"], wl = { key: 6 }, Ol = ["x", "y", "font-size", "fill"], Gl = ["x", "y", "font-size", "fill", "font-weight"], vl = { key: 7 }, pl = ["x", "y", "font-size", "fill"], zl = { key: 8 }, Ml = ["x", "y"], Tl = ["innerHTML"], Pl = ["x", "y"], Vl = ["innerHTML"], Rl = ["x1", "x2", "y1", "y2", "stroke"], Hl = { key: 9 }, Dl = ["x", "y", "font-size", "fill"], Wl = { key: 10 }, Bl = ["x", "y"], El = ["innerHTML"], Yl = ["x", "y"], ql = ["innerHTML"], Xl = ["x1", "x2", "y1", "y2", "stroke"], Ul = ["x", "y", "font-size", "fill", "innerHTML"], Zl = ["x", "y", "font-size", "fill", "innerHTML"], Jl = ["x", "y", "font-size", "fill", "innerHTML"], Kl = ["x", "y", "font-size", "fill", "innerHTML"], Ql = ["id"], jl = ["stop-color"], $l = ["stop-color"], ea = ["x", "y", "width", "height", "fill", "onMouseenter"], ta = ["font-size", "fill", "transform"], la = ["x", "y", "font-size", "fill"], aa = { key: 12 }, ra = ["text-anchor", "font-size", "fill", "transform", "onClick"], ia = ["x", "y", "height", "width", "onMouseenter", "onClick"], sa = {
  key: 13,
  style: { "pointer-events": "none" }
}, na = ["x", "y"], ca = ["cx", "cy", "r", "fill"], oa = {
  key: 5,
  class: "vue-data-ui-watermark"
}, ha = {
  class: "vue-ui-xy-tag-arrow",
  height: "20",
  viewBox: "0 0 10 20",
  style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
}, ua = ["fill"], da = ["innerHTML"], ga = {
  class: "vue-ui-xy-tag-arrow",
  height: "100%",
  viewBox: "0 0 10 20",
  style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
}, fa = ["fill"], Ia = ["innerHTML"], Na = {
  class: "vue-ui-xy-tag-arrow",
  height: "20",
  viewBox: "0 0 10 20",
  style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
}, ma = ["fill"], xa = ["innerHTML"], ba = {
  class: "vue-ui-xy-tag-arrow",
  height: "100%",
  viewBox: "0 0 10 20",
  style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
}, Fa = ["fill"], _a = ["innerHTML"], ya = ["onClick"], Aa = {
  key: 0,
  viewBox: "0 0 20 12",
  height: "14",
  width: "20"
}, La = ["stroke", "fill"], Ca = {
  key: 1,
  viewBox: "0 0 40 40",
  height: "14",
  width: "14"
}, Sa = ["fill"], ka = ["fill"], wa = {
  key: 2,
  viewBox: "0 0 12 12",
  height: "14",
  width: "14"
}, Oa = {
  key: 9,
  ref: "chartLegend"
}, Ga = {
  key: 10,
  ref: "source",
  dir: "auto"
}, va = {
  style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
  "data-dom-to-png-ignore": ""
}, pa = ["innerHTML"];
function za(t, n, o, g, l, e) {
  const A = R("PenAndPaper"), x = R("Title"), N = R("UserOptions"), L = R("PackageVersion"), G = R("Shape"), k = R("Skeleton"), v = R("Slicer"), w = R("Tooltip"), F = R("BaseIcon"), C = R("TableSparkline"), O = R("DataTable"), p = R("Accordion");
  return r(), i("div", {
    id: `vue-ui-xy_${l.uniqueId}`,
    class: B(`vue-ui-xy ${l.isFullscreen ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.FINAL_CONFIG.useCssAnimation ? "" : "vue-ui-dna"}`),
    ref: "chart",
    style: b(`background:${e.FINAL_CONFIG.chart.backgroundColor}; color:${e.FINAL_CONFIG.chart.color};width:100%;font-family:${e.FINAL_CONFIG.chart.fontFamily};${e.FINAL_CONFIG.responsive ? "height: 100%" : ""}`),
    onMouseenter: n[7] || (n[7] = () => e.setUserOptionsVisibility(!0)),
    onMouseleave: n[8] || (n[8] = () => e.setUserOptionsVisibility(!1))
  }, [
    e.FINAL_CONFIG.chart.userOptions.buttons.annotator ? (r(), W(A, {
      key: 0,
      svgRef: l.svgRef,
      backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
      color: e.FINAL_CONFIG.chart.color,
      active: l.isAnnotator,
      onClose: e.toggleAnnotator
    }, null, 8, ["svgRef", "backgroundColor", "color", "active", "onClose"])) : d("", !0),
    e.hasOptionsNoTitle ? (r(), i("div", st, null, 512)) : d("", !0),
    e.FINAL_CONFIG.chart.title.show ? (r(), i("div", {
      key: 2,
      ref: "chartTitle",
      class: "vue-ui-xy-title",
      style: b(`font-family:${e.FINAL_CONFIG.chart.fontFamily}`)
    }, [
      (r(), W(x, {
        key: `title_${l.titleStep}`,
        config: {
          title: {
            cy: "xy-div-title",
            ...e.FINAL_CONFIG.chart.title
          },
          subtitle: {
            cy: "xy-div-subtitle",
            ...e.FINAL_CONFIG.chart.title.subtitle
          }
        }
      }, null, 8, ["config"]))
    ], 4)) : d("", !0),
    e.FINAL_CONFIG.chart.userOptions.show && e.isDataset && (l.keepUserOptionState || l.userOptionsVisible) ? (r(), W(N, {
      ref: "defails",
      key: `user_options_${l.step}`,
      backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
      color: e.FINAL_CONFIG.chart.color,
      isPrinting: l.isPrinting,
      isImaging: l.isImaging,
      uid: l.uniqueId,
      hasTooltip: e.FINAL_CONFIG.chart.userOptions.buttons.tooltip && e.FINAL_CONFIG.chart.tooltip.show,
      hasPdf: e.FINAL_CONFIG.chart.userOptions.buttons.pdf,
      hasXls: e.FINAL_CONFIG.chart.userOptions.buttons.csv,
      hasImg: e.FINAL_CONFIG.chart.userOptions.buttons.img,
      hasLabel: e.FINAL_CONFIG.chart.userOptions.buttons.labels,
      hasTable: e.FINAL_CONFIG.chart.userOptions.buttons.table,
      hasStack: o.dataset.length > 1 && e.FINAL_CONFIG.chart.userOptions.buttons.stack,
      hasFullscreen: e.FINAL_CONFIG.chart.userOptions.buttons.fullscreen,
      isStacked: l.mutableConfig.isStacked,
      isFullscreen: l.isFullscreen,
      chartElement: t.$refs.chart,
      position: e.FINAL_CONFIG.chart.userOptions.position,
      isTooltip: l.mutableConfig.showTooltip,
      titles: { ...e.FINAL_CONFIG.chart.userOptions.buttonTitles },
      hasAnnotator: e.FINAL_CONFIG.chart.userOptions.buttons.annotator,
      isAnnotation: l.isAnnotator,
      onToggleFullscreen: e.toggleFullscreen,
      onGeneratePdf: e.generatePdf,
      onGenerateCsv: e.generateCsv,
      onGenerateImage: e.generateImage,
      onToggleTable: e.toggleTable,
      onToggleLabels: e.toggleLabels,
      onToggleStack: e.toggleStack,
      onToggleTooltip: e.toggleTooltip,
      onToggleAnnotator: e.toggleAnnotator,
      style: b({
        visibility: l.keepUserOptionState ? l.userOptionsVisible ? "visible" : "hidden" : "visible"
      })
    }, $e({ _: 2 }, [
      t.$slots.menuIcon ? {
        name: "menuIcon",
        fn: V(({ isOpen: a, color: c }) => [
          S(t.$slots, "menuIcon", E(Y({ isOpen: a, color: c })), void 0, !0)
        ]),
        key: "0"
      } : void 0,
      t.$slots.optionTooltip ? {
        name: "optionTooltip",
        fn: V(() => [
          S(t.$slots, "optionTooltip", {}, void 0, !0)
        ]),
        key: "1"
      } : void 0,
      t.$slots.optionPdf ? {
        name: "optionPdf",
        fn: V(() => [
          S(t.$slots, "optionPdf", {}, void 0, !0)
        ]),
        key: "2"
      } : void 0,
      t.$slots.optionCsv ? {
        name: "optionCsv",
        fn: V(() => [
          S(t.$slots, "optionCsv", {}, void 0, !0)
        ]),
        key: "3"
      } : void 0,
      t.$slots.optionImg ? {
        name: "optionImg",
        fn: V(() => [
          S(t.$slots, "optionImg", {}, void 0, !0)
        ]),
        key: "4"
      } : void 0,
      t.$slots.optionTable ? {
        name: "optionTable",
        fn: V(() => [
          S(t.$slots, "optionTable", {}, void 0, !0)
        ]),
        key: "5"
      } : void 0,
      t.$slots.optionLabels ? {
        name: "optionLabels",
        fn: V(() => [
          S(t.$slots, "optionLabels", {}, void 0, !0)
        ]),
        key: "6"
      } : void 0,
      t.$slots.optionStack ? {
        name: "optionStack",
        fn: V(() => [
          S(t.$slots, "optionStack", {}, void 0, !0)
        ]),
        key: "7"
      } : void 0,
      t.$slots.optionFullscreen ? {
        name: "optionFullscreen",
        fn: V(({ toggleFullscreen: a, isFullscreen: c }) => [
          S(t.$slots, "optionFullscreen", E(Y({ toggleFullscreen: a, isFullscreen: c })), void 0, !0)
        ]),
        key: "8"
      } : void 0,
      t.$slots.optionAnnotator ? {
        name: "optionAnnotator",
        fn: V(({ toggleAnnotator: a, isAnnotator: c }) => [
          S(t.$slots, "optionAnnotator", E(Y({ toggleAnnotator: a, isAnnotator: c })), void 0, !0)
        ]),
        key: "9"
      } : void 0
    ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasLabel", "hasTable", "hasStack", "hasFullscreen", "isStacked", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "onToggleFullscreen", "onGeneratePdf", "onGenerateCsv", "onGenerateImage", "onToggleTable", "onToggleLabels", "onToggleStack", "onToggleTooltip", "onToggleAnnotator", "style"])) : d("", !0),
    e.isDataset ? (r(), i("svg", {
      key: 4,
      ref: "svgRef",
      xmlns: "http://www.w3.org/2000/svg",
      class: B([{ "vue-data-ui-fullscreen--on": l.isFullscreen, "vue-data-ui-fulscreen--off": !l.isFullscreen }, "vue-ui-xy-svg"]),
      width: "100%",
      viewBox: l.viewBox,
      style: b(`background: transparent; color:${e.FINAL_CONFIG.chart.color}; font-family:${e.FINAL_CONFIG.chart.fontFamily}`),
      "aria-label": e.chartAriaLabel,
      role: "img",
      "aria-live": "polite"
    }, [
      X(L),
      t.$slots["chart-background"] ? (r(), i("foreignObject", {
        key: 0,
        x: e.drawingArea.left + e.xPadding < 0 ? 0 : e.drawingArea.left + e.xPadding,
        y: e.drawingArea.top,
        width: e.drawingArea.width - (e.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : e.drawingArea.width / e.maxSeries) < 0 ? 0 : e.drawingArea.width - (e.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : e.drawingArea.width / e.maxSeries),
        height: e.drawingArea.height < 0 ? 0 : e.drawingArea.height,
        style: {
          pointerEvents: "none"
        }
      }, [
        S(t.$slots, "chart-background", {}, void 0, !0)
      ], 8, ct)) : d("", !0),
      e.maxSeries > 0 ? (r(), i("g", ot, [
        f("g", ht, [
          e.FINAL_CONFIG.chart.grid.labels.xAxis.showBaseline ? (r(), i("line", {
            key: 0,
            stroke: e.FINAL_CONFIG.chart.grid.stroke,
            "stroke-width": "1",
            x1: e.drawingArea.left + e.xPadding,
            x2: e.drawingArea.right - e.xPadding,
            y1: e.forceValidValue(e.drawingArea.bottom),
            y2: e.forceValidValue(e.drawingArea.bottom),
            "stroke-linecap": "round"
          }, null, 8, ut)) : d("", !0),
          l.mutableConfig.useIndividualScale ? e.FINAL_CONFIG.chart.grid.showHorizontalLines ? (r(!0), i(u, { key: 2 }, I(e.allScales, (a) => (r(), i("g", null, [
            a.id === l.selectedScale && a.yLabels.length ? (r(!0), i(u, { key: 0 }, I(a.yLabels, (c) => (r(), i("line", {
              x1: e.drawingArea.left + e.xPadding,
              x2: e.drawingArea.right - e.xPadding,
              y1: e.forceValidValue(c.y),
              y2: e.forceValidValue(c.y),
              stroke: a.color,
              "stroke-width": 0.5,
              "stroke-linecap": "round"
            }, null, 8, It))), 256)) : a.yLabels.length ? (r(!0), i(u, { key: 1 }, I(a.yLabels, (c) => (r(), i("line", {
              x1: e.drawingArea.left + e.xPadding,
              x2: e.drawingArea.right - e.xPadding,
              y1: e.forceValidValue(c.y),
              y2: e.forceValidValue(c.y),
              stroke: e.FINAL_CONFIG.chart.grid.stroke,
              "stroke-width": 0.5,
              "stroke-linecap": "round"
            }, null, 8, Nt))), 256)) : d("", !0)
          ]))), 256)) : d("", !0) : (r(), i(u, { key: 1 }, [
            e.FINAL_CONFIG.chart.grid.labels.yAxis.showBaseline ? (r(), i("line", {
              key: 0,
              stroke: e.FINAL_CONFIG.chart.grid.stroke,
              "stroke-width": "1",
              x1: e.drawingArea.left + e.xPadding,
              x2: e.drawingArea.left + e.xPadding,
              y1: e.forceValidValue(e.drawingArea.top),
              y2: e.forceValidValue(e.drawingArea.bottom),
              "stroke-linecap": "round"
            }, null, 8, dt)) : d("", !0),
            e.FINAL_CONFIG.chart.grid.showHorizontalLines ? (r(), i("g", gt, [
              (r(!0), i(u, null, I(e.yLabels, (a) => (r(), i("line", {
                x1: e.drawingArea.left + e.xPadding,
                x2: e.drawingArea.right - e.xPadding,
                y1: e.forceValidValue(a.y),
                y2: e.forceValidValue(a.y),
                stroke: e.FINAL_CONFIG.chart.grid.stroke,
                "stroke-width": 0.5,
                "stroke-linecap": "round"
              }, null, 8, ft))), 256))
            ])) : d("", !0)
          ], 64)),
          e.FINAL_CONFIG.chart.grid.showVerticalLines ? (r(), i("g", mt, [
            (r(!0), i(u, null, I(e.maxSeries + (e.FINAL_CONFIG.chart.grid.position === "middle" ? 1 : 0), (a, c) => (r(), i("line", {
              key: `grid_vertical_line_${c}`,
              x1: e.drawingArea.width / e.maxSeries * c + e.drawingArea.left + e.xPadding,
              x2: e.drawingArea.width / e.maxSeries * c + e.drawingArea.left + e.xPadding,
              y1: e.forceValidValue(e.drawingArea.top),
              y2: e.forceValidValue(e.drawingArea.bottom),
              "stroke-width": "0.5",
              stroke: e.FINAL_CONFIG.chart.grid.stroke
            }, null, 8, xt))), 128))
          ])) : d("", !0)
        ]),
        (r(!0), i(u, null, I(e.barSet, (a, c) => (r(), i("defs", {
          key: `def_rect_${c}`
        }, [
          f("linearGradient", {
            id: `rectGradient_pos_${c}_${l.uniqueId}`,
            x2: "0%",
            y2: "100%"
          }, [
            f("stop", {
              offset: "0%",
              "stop-color": a.color
            }, null, 8, Ft),
            f("stop", {
              offset: "62%",
              "stop-color": `${e.shiftHue(a.color, 0.02)}`
            }, null, 8, _t),
            f("stop", {
              offset: "100%",
              "stop-color": `${e.shiftHue(a.color, 0.05)}`
            }, null, 8, yt)
          ], 8, bt),
          f("linearGradient", {
            id: `rectGradient_neg_${c}_${l.uniqueId}`,
            x2: "0%",
            y2: "100%"
          }, [
            f("stop", {
              offset: "0%",
              "stop-color": `${e.shiftHue(a.color, 0.05)}`
            }, null, 8, Lt),
            f("stop", {
              offset: "38%",
              "stop-color": `${e.shiftHue(a.color, 0.02)}`
            }, null, 8, Ct),
            f("stop", {
              offset: "100%",
              "stop-color": a.color
            }, null, 8, St)
          ], 8, At)
        ]))), 128)),
        (r(!0), i(u, null, I(e.plotSet, (a, c) => (r(), i("defs", {
          key: `def_plot_${c}`
        }, [
          f("radialGradient", {
            id: `plotGradient_${c}_${l.uniqueId}`,
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%"
          }, [
            f("stop", {
              offset: "0%",
              "stop-color": `${e.shiftHue(a.color, 0.05)}`
            }, null, 8, wt),
            f("stop", {
              offset: "100%",
              "stop-color": a.color
            }, null, 8, Ot)
          ], 8, kt)
        ]))), 128)),
        (r(!0), i(u, null, I(e.lineSet, (a, c) => (r(), i("defs", {
          key: `def_line_${c}`
        }, [
          f("radialGradient", {
            id: `lineGradient_${c}_${l.uniqueId}`,
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%"
          }, [
            f("stop", {
              offset: "0%",
              "stop-color": `${e.shiftHue(a.color, 0.05)}`
            }, null, 8, vt),
            f("stop", {
              offset: "100%",
              "stop-color": a.color
            }, null, 8, pt)
          ], 8, Gt),
          f("linearGradient", {
            id: `areaGradient_${c}_${l.uniqueId}`,
            x1: "0%",
            x2: "100%",
            y1: "0%",
            y2: "0%"
          }, [
            f("stop", {
              offset: "0%",
              "stop-color": `${e.setOpacity(e.shiftHue(a.color, 0.03), e.FINAL_CONFIG.line.area.opacity)}`
            }, null, 8, Mt),
            f("stop", {
              offset: "100%",
              "stop-color": `${e.setOpacity(a.color, e.FINAL_CONFIG.line.area.opacity)}`
            }, null, 8, Tt)
          ], 8, zt)
        ]))), 128)),
        (r(!0), i(u, null, I(e.highlightAreas, (a) => (r(), i("g", null, [
          a.show ? (r(!0), i(u, { key: 0 }, I(a.span, (c, s) => (r(), i("g", null, [
            f("rect", {
              style: b({
                transition: "none",
                opacity: a.from + s >= l.slicer.start && a.from + s <= l.slicer.end - 1 ? 1 : 0
              }),
              x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * (a.from + s - l.slicer.start),
              y: e.drawingArea.top,
              height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
              width: e.drawingArea.width / e.maxSeries < 0 ? 1e-5 : e.drawingArea.width / e.maxSeries,
              fill: e.setOpacity(a.color, a.opacity)
            }, null, 12, Pt),
            a.caption.text && s === 0 ? (r(), i("foreignObject", {
              key: 0,
              x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * (a.from + s - l.slicer.start) - (a.caption.width === "auto" ? 0 : a.caption.width / 2 - e.drawingArea.width / e.maxSeries * a.span / 2),
              y: e.drawingArea.top + a.caption.offsetY,
              style: b({
                overflow: "visible",
                opacity: a.to >= l.slicer.start && a.from < l.slicer.end ? 1 : 0
              }),
              height: "1",
              width: a.caption.width === "auto" ? e.drawingArea.width / e.maxSeries * a.span : a.caption.width
            }, [
              f("div", {
                style: b(`padding:${a.caption.padding}px;text-align:${a.caption.textAlign};font-size:${a.caption.fontSize}px;color:${a.caption.color};font-weight:${a.caption.bold ? "bold" : "normal"}`)
              }, T(a.caption.text), 5)
            ], 12, Vt)) : d("", !0)
          ]))), 256)) : d("", !0)
        ]))), 256)),
        f("g", null, [
          (r(!0), i(u, null, I(e.maxSeries, (a, c) => (r(), i("g", {
            key: `tooltip_trap_highlighter_${c}`
          }, [
            f("rect", {
              x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * c,
              y: e.drawingArea.top,
              height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
              width: e.drawingArea.width / e.maxSeries < 0 ? 1e-5 : e.drawingArea.width / e.maxSeries,
              fill: [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(c) ? e.setOpacity(e.FINAL_CONFIG.chart.highlighter.color, e.FINAL_CONFIG.chart.highlighter.opacity) : "transparent"
            }, null, 8, Rt)
          ]))), 128))
        ]),
        e.barSet.length ? (r(!0), i(u, { key: 0 }, I(e.barSet, (a, c) => (r(), i("g", {
          key: `serie_bar_${c}`,
          class: B(`serie_bar_${c}`),
          style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
        }, [
          (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i("g", {
            key: `bar_plot_${c}_${h}`
          }, [
            e.canShowValue(s.value) ? (r(), i("rect", {
              key: 0,
              x: e.calcRectX(s),
              y: l.mutableConfig.useIndividualScale ? e.calcIndividualRectY(s) : e.calcRectY(s),
              height: l.mutableConfig.useIndividualScale ? Math.abs(e.calcIndividualHeight(s)) : Math.abs(e.calcRectHeight(s)),
              width: e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap) < 0 ? 1e-5 : e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap),
              rx: e.FINAL_CONFIG.bar.borderRadius,
              fill: e.FINAL_CONFIG.bar.useGradient ? s.value >= 0 ? `url(#rectGradient_pos_${c}_${l.uniqueId})` : `url(#rectGradient_neg_${c}_${l.uniqueId})` : a.color,
              stroke: e.FINAL_CONFIG.bar.border.useSerieColor ? a.color : e.FINAL_CONFIG.bar.border.stroke,
              "stroke-width": e.FINAL_CONFIG.bar.border.strokeWidth
            }, null, 8, Ht)) : d("", !0),
            e.canShowValue(s.value) && t.$slots.pattern ? (r(), i("rect", {
              key: 1,
              x: e.calcRectX(s),
              y: l.mutableConfig.useIndividualScale ? e.calcIndividualRectY(s) : e.calcRectY(s),
              height: l.mutableConfig.useIndividualScale ? Math.abs(e.calcIndividualHeight(s)) : Math.abs(e.calcRectHeight(s)),
              width: e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap) < 0 ? 1e-5 : e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap),
              rx: e.FINAL_CONFIG.bar.borderRadius,
              fill: `url(#pattern_${l.uniqueId}_${a.slotAbsoluteIndex})`,
              stroke: e.FINAL_CONFIG.bar.border.useSerieColor ? a.color : e.FINAL_CONFIG.bar.border.stroke,
              "stroke-width": e.FINAL_CONFIG.bar.border.strokeWidth
            }, null, 8, Dt)) : d("", !0),
            s.comment && e.FINAL_CONFIG.chart.comments.show ? (r(), i("foreignObject", {
              key: 2,
              style: { overflow: "visible" },
              height: "12",
              width: (e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap) < 0 ? 1e-5 : e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap) / 2) + e.FINAL_CONFIG.chart.comments.width,
              x: e.calcRectX(s) - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
              y: e.checkNaN(s.y) + e.FINAL_CONFIG.chart.comments.offsetY + 6
            }, [
              S(t.$slots, "plot-comment", {
                plot: { ...s, color: a.color, seriesIndex: c, datapointIndex: h }
              }, void 0, !0)
            ], 8, Wt)) : d("", !0)
          ]))), 128)),
          Object.hasOwn(a, "useProgression") && a.useProgression === !0 && !isNaN(e.calcLinearProgression(a.plots).trend) ? (r(), i("g", Bt, [
            f("defs", null, [
              f("marker", {
                id: `bar_arrow_${c}`,
                markerWidth: 7,
                markerHeight: 7,
                refX: "0",
                refY: 7 / 2,
                orient: "auto"
              }, [
                f("polygon", {
                  points: `0 0, 7 ${7 / 2}, 0 7`,
                  fill: a.color
                }, null, 8, Yt)
              ], 8, Et)
            ]),
            a.plots.length > 1 ? (r(), i("line", {
              key: 0,
              x1: e.calcLinearProgression(a.plots).x1 + e.calcRectWidth(),
              x2: e.calcLinearProgression(a.plots).x2 + e.calcRectWidth(),
              y1: e.forceValidValue(e.calcLinearProgression(a.plots).y1),
              y2: e.forceValidValue(e.calcLinearProgression(a.plots).y2),
              "stroke-width": 1,
              stroke: a.color,
              "stroke-dasharray": 2,
              "marker-end": `url(#bar_arrow_${c})`
            }, null, 8, qt)) : d("", !0),
            a.plots.length > 1 ? (r(), i("text", {
              key: 1,
              "text-anchor": "middle",
              x: e.calcLinearProgression(a.plots).x2 + e.calcRectWidth(),
              y: e.calcLinearProgression(a.plots).y2 - 6,
              "font-size": l.fontSizes.plotLabels,
              fill: a.color
            }, T(e.dataLabel({
              v: e.calcLinearProgression(a.plots).trend * 100,
              s: "%",
              r: 2
            })), 9, Xt)) : d("", !0)
          ])) : d("", !0)
        ], 6))), 128)) : d("", !0),
        !l.mutableConfig.useIndividualScale && e.FINAL_CONFIG.chart.grid.labels.zeroLine.show ? (r(), i("line", {
          key: 1,
          stroke: e.FINAL_CONFIG.chart.grid.stroke,
          "stroke-width": "1",
          x1: e.drawingArea.left + e.xPadding,
          x2: e.drawingArea.right - e.xPadding,
          y1: e.forceValidValue(e.zero),
          y2: e.forceValidValue(e.zero),
          "stroke-linecap": "round"
        }, null, 8, Ut)) : d("", !0),
        e.FINAL_CONFIG.chart.highlighter.useLine && (![null, void 0].includes(l.selectedSerieIndex) || ![null, void 0].includes(l.selectedMinimapIndex)) ? (r(), i("g", Zt, [
          f("line", {
            x1: e.drawingArea.left + e.drawingArea.width / e.maxSeries * ((l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)) + e.drawingArea.width / e.maxSeries / 2,
            x2: e.drawingArea.left + e.drawingArea.width / e.maxSeries * ((l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)) + e.drawingArea.width / e.maxSeries / 2,
            y1: e.forceValidValue(e.drawingArea.top),
            y2: e.forceValidValue(e.drawingArea.bottom),
            stroke: e.FINAL_CONFIG.chart.highlighter.color,
            "stroke-width": e.FINAL_CONFIG.chart.highlighter.lineWidth,
            "stroke-dasharray": e.FINAL_CONFIG.chart.highlighter.lineDasharray,
            "stroke-linecap": "round",
            style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
          }, null, 8, Jt)
        ])) : d("", !0),
        e.FINAL_CONFIG.chart.grid.frame.show ? (r(), i("rect", {
          key: 3,
          style: { pointerEvents: "none", transition: "none" },
          x: e.drawingArea.left + e.xPadding < 0 ? 0 : e.drawingArea.left + e.xPadding,
          y: e.drawingArea.top,
          width: e.drawingArea.width - (e.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : e.drawingArea.width / e.maxSeries) < 0 ? 0 : e.drawingArea.width - (e.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : e.drawingArea.width / e.maxSeries),
          height: e.drawingArea.height < 0 ? 0 : e.drawingArea.height,
          fill: "transparent",
          stroke: e.FINAL_CONFIG.chart.grid.frame.stroke,
          "stroke-width": e.FINAL_CONFIG.chart.grid.frame.strokeWidth,
          "stroke-linecap": e.FINAL_CONFIG.chart.grid.frame.strokeLinecap,
          "stroke-linejoin": e.FINAL_CONFIG.chart.grid.frame.strokeLinejoin,
          "stroke-dasharray": e.FINAL_CONFIG.chart.grid.frame.strokeDasharray
        }, null, 8, Kt)) : d("", !0),
        e.FINAL_CONFIG.chart.grid.labels.show ? (r(), i("g", Qt, [
          l.mutableConfig.useIndividualScale ? (r(), i(u, { key: 0 }, [
            (r(!0), i(u, null, I(e.allScales, (a) => (r(), i("g", null, [
              f("line", {
                x1: a.x + e.xPadding,
                x2: a.x + e.xPadding,
                y1: l.mutableConfig.isStacked ? e.forceValidValue(e.drawingArea.bottom - a.yOffset - a.individualHeight) : e.forceValidValue(e.drawingArea.top),
                y2: l.mutableConfig.isStacked ? e.forceValidValue(e.drawingArea.bottom - a.yOffset) : e.forceValidValue(e.drawingArea.bottom),
                stroke: a.color,
                "stroke-width": e.FINAL_CONFIG.chart.grid.stroke,
                "stroke-linecap": "round",
                style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
              }, null, 12, jt)
            ]))), 256)),
            (r(!0), i(u, null, I(e.allScales, (a) => (r(), i("g", {
              style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
            }, [
              f("text", {
                fill: a.color,
                "font-size": l.fontSizes.dataLabels,
                "text-anchor": "middle",
                transform: `translate(${a.x - e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + 5 + e.xPadding + e.FINAL_CONFIG.chart.grid.labels.yAxis.scaleLabelOffsetX}, ${l.mutableConfig.isStacked ? e.drawingArea.bottom - a.yOffset - a.individualHeight / 2 : e.drawingArea.top + e.drawingArea.height / 2}) rotate(-90)`
              }, T(a.name) + " " + T(a.scaleLabel && a.unique && a.scaleLabel !== a.id ? `- ${a.scaleLabel}` : ""), 9, $t),
              (r(!0), i(u, null, I(a.yLabels, (c, s) => (r(), i("line", {
                x1: a.x - 3 + e.xPadding,
                x2: a.x + e.xPadding,
                y1: e.forceValidValue(c.y),
                y2: e.forceValidValue(c.y),
                stroke: a.color,
                "stroke-width": 1,
                "stroke-linecap": "round"
              }, null, 8, el))), 256)),
              (r(!0), i(u, null, I(a.yLabels, (c, s) => (r(), i("text", {
                x: a.x - 5 + e.xPadding + e.FINAL_CONFIG.chart.grid.labels.yAxis.scaleValueOffsetX,
                y: e.forceValidValue(c.y) + l.fontSizes.dataLabels / 3,
                "font-size": l.fontSizes.dataLabels,
                "text-anchor": "end",
                fill: a.color
              }, T(e.applyDataLabel(
                e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,
                c.value,
                e.dataLabel({
                  p: c.prefix,
                  v: c.value,
                  s: c.suffix,
                  r: 1
                }),
                { datapoint: c.datapoint, seriesIndex: s }
              )), 9, tl))), 256))
            ], 4))), 256))
          ], 64)) : (r(!0), i(u, { key: 1 }, I(e.yLabels, (a, c) => (r(), i("g", {
            key: `yLabel_${c}`
          }, [
            e.canShowValue(a) && a.value >= e.niceScale.min && a.value <= e.niceScale.max ? (r(), i("line", {
              key: 0,
              x1: e.drawingArea.left + e.xPadding,
              x2: e.drawingArea.left - 5 + e.xPadding,
              y1: e.forceValidValue(a.y),
              y2: e.forceValidValue(a.y),
              stroke: e.FINAL_CONFIG.chart.grid.stroke,
              "stroke-width": "1",
              "stroke-linecap": "round"
            }, null, 8, ll)) : d("", !0),
            a.value >= e.niceScale.min && a.value <= e.niceScale.max ? (r(), i("text", {
              key: 1,
              x: e.drawingArea.left - 7 + e.xPadding,
              y: e.checkNaN(a.y + l.fontSizes.dataLabels / 3),
              "font-size": l.fontSizes.dataLabels,
              "text-anchor": "end",
              fill: e.FINAL_CONFIG.chart.grid.labels.color
            }, T(e.canShowValue(a.value) ? e.applyDataLabel(
              e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,
              a.value,
              e.dataLabel({
                p: a.prefix,
                v: a.value,
                s: a.suffix,
                r: 1
              })
            ) : ""), 9, al)) : d("", !0)
          ]))), 128))
        ])) : d("", !0),
        (r(!0), i(u, null, I(e.plotSet, (a, c) => (r(), i("g", {
          key: `serie_plot_${c}`,
          class: B(`serie_plot_${c}`),
          style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
        }, [
          (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i("g", {
            key: `circle_plot_${c}_${h}`
          }, [
            s && e.canShowValue(s.value) ? (r(), W(G, {
              key: 0,
              shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(a.shape) ? a.shape : "circle",
              color: e.FINAL_CONFIG.plot.useGradient ? `url(#plotGradient_${c}_${l.uniqueId})` : e.FINAL_CONFIG.plot.dot.useSerieColor ? a.color : e.FINAL_CONFIG.plot.dot.fill,
              plot: { x: e.checkNaN(s.x), y: e.checkNaN(s.y) },
              radius: l.selectedSerieIndex !== null && l.selectedSerieIndex === h || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === h ? (l.plotRadii.plot || 6) * 1.5 : l.plotRadii.plot || 6,
              stroke: e.FINAL_CONFIG.plot.dot.useSerieColor ? e.FINAL_CONFIG.chart.backgroundColor : a.color,
              strokeWidth: e.FINAL_CONFIG.plot.dot.strokeWidth
            }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : d("", !0),
            s.comment && e.FINAL_CONFIG.chart.comments.show ? (r(), i("foreignObject", {
              key: 1,
              style: { overflow: "visible" },
              height: "12",
              width: e.FINAL_CONFIG.chart.comments.width,
              x: s.x - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
              y: s.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
            }, [
              f("div", il, [
                S(t.$slots, "plot-comment", {
                  plot: { ...s, color: a.color, seriesIndex: c, datapointIndex: h }
                }, void 0, !0)
              ])
            ], 8, rl)) : d("", !0)
          ]))), 128)),
          Object.hasOwn(a, "useProgression") && a.useProgression === !0 && !isNaN(e.calcLinearProgression(a.plots).trend) ? (r(), i("g", sl, [
            f("defs", null, [
              f("marker", {
                id: `plot_arrow_${c}`,
                markerWidth: 7,
                markerHeight: 7,
                refX: "0",
                refY: 7 / 2,
                orient: "auto"
              }, [
                f("polygon", {
                  points: `0 0, 7 ${7 / 2}, 0 7`,
                  fill: a.color
                }, null, 8, cl)
              ], 8, nl)
            ]),
            a.plots.length > 1 ? (r(), i("line", {
              key: 0,
              x1: e.calcLinearProgression(a.plots).x1,
              x2: e.calcLinearProgression(a.plots).x2,
              y1: e.forceValidValue(e.calcLinearProgression(a.plots).y1),
              y2: e.forceValidValue(e.calcLinearProgression(a.plots).y2),
              "stroke-width": 1,
              stroke: a.color,
              "stroke-dasharray": 2,
              "marker-end": `url(#plot_arrow_${c})`
            }, null, 8, ol)) : d("", !0),
            a.plots.length > 1 ? (r(), i("text", {
              key: 1,
              "text-anchor": "middle",
              x: e.calcLinearProgression(a.plots).x2,
              y: e.calcLinearProgression(a.plots).y2 - 6,
              "font-size": l.fontSizes.plotLabels,
              fill: a.color
            }, T(e.dataLabel({
              v: e.calcLinearProgression(a.plots).trend * 100,
              s: "%",
              r: 2
            })), 9, hl)) : d("", !0)
          ])) : d("", !0)
        ], 6))), 128)),
        (r(!0), i(u, null, I(e.lineSet, (a, c) => (r(), i("g", {
          key: `serie_line_${c}`,
          class: B(`serie_line_${c}`),
          style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
        }, [
          a.smooth && a.plots.length > 1 ? (r(), i("path", {
            key: 0,
            d: `M${a.curve}`,
            stroke: e.FINAL_CONFIG.chart.backgroundColor,
            "stroke-width": e.FINAL_CONFIG.line.strokeWidth + 1,
            "stroke-dasharray": a.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
            fill: "none"
          }, null, 8, ul)) : a.plots.length > 1 ? (r(), i("path", {
            key: 1,
            d: `M${a.straight}`,
            stroke: e.FINAL_CONFIG.chart.backgroundColor,
            "stroke-width": e.FINAL_CONFIG.line.strokeWidth + 1,
            "stroke-dasharray": a.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, null, 8, dl)) : d("", !0)
        ], 6))), 128)),
        t.$slots.pattern ? (r(), i("defs", gl, [
          (r(!0), i(u, null, I(e.safeDataset, (a, c) => S(t.$slots, "pattern", $({
            key: `serie_pattern_slot_${c}`
          }, { ref_for: !0 }, { ...a, seriesIndex: a.slotAbsoluteIndex, patternId: `pattern_${l.uniqueId}_${c}` }), void 0, !0)), 128))
        ])) : d("", !0),
        (r(!0), i(u, null, I(e.lineSet, (a, c) => (r(), i("g", {
          key: `serie_line_${c}`,
          class: B(`serie_line_${c}`),
          style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
        }, [
          a.useArea && a.plots.length > 1 ? (r(), i("g", fl, [
            a.smooth ? (r(!0), i(u, { key: 0 }, I(a.curveAreas, (s, h) => (r(), i(u, { key: h }, [
              f("path", {
                d: s,
                fill: e.FINAL_CONFIG.line.area.useGradient ? `url(#areaGradient_${c}_${l.uniqueId})` : e.setOpacity(a.color, e.FINAL_CONFIG.line.area.opacity)
              }, null, 8, Il),
              t.$slots.pattern ? (r(), i("path", {
                key: 0,
                d: s,
                fill: `url(#pattern_${l.uniqueId}_${a.slotAbsoluteIndex})`
              }, null, 8, Nl)) : d("", !0)
            ], 64))), 128)) : (r(!0), i(u, { key: 1 }, I(a.area.split(";"), (s, h) => (r(), i(u, { key: h }, [
              f("path", {
                d: `M${s}Z`,
                fill: e.FINAL_CONFIG.line.area.useGradient ? `url(#areaGradient_${c}_${l.uniqueId})` : e.setOpacity(a.color, e.FINAL_CONFIG.line.area.opacity)
              }, null, 8, ml),
              t.$slots.pattern ? (r(), i("path", {
                key: 0,
                d: `M${s}Z`,
                fill: `url(#pattern_${l.uniqueId}_${a.slotAbsoluteIndex})`
              }, null, 8, xl)) : d("", !0)
            ], 64))), 128))
          ])) : d("", !0),
          a.smooth && a.plots.length > 1 ? (r(), i("path", {
            key: 1,
            d: `M${a.curve}`,
            stroke: a.color,
            "stroke-width": e.FINAL_CONFIG.line.strokeWidth,
            "stroke-dasharray": a.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
            fill: "none",
            "stroke-linecap": "round"
          }, null, 8, bl)) : a.plots.length > 1 ? (r(), i("path", {
            key: 2,
            d: `M${a.straight}`,
            stroke: a.color,
            "stroke-width": e.FINAL_CONFIG.line.strokeWidth,
            "stroke-dasharray": a.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, null, 8, Fl)) : d("", !0),
          (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i(u, {
            key: `circle_line_${c}_${h}`
          }, [
            !e.optimize.linePlot && s && e.canShowValue(s.value) || e.optimize.linePlot && s && e.canShowValue(s.value) && (l.selectedSerieIndex !== null && l.selectedSerieIndex === h || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === h) ? (r(), W(G, {
              key: 0,
              shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(a.shape) ? a.shape : "circle",
              color: e.FINAL_CONFIG.line.useGradient ? `url(#lineGradient_${c}_${l.uniqueId})` : e.FINAL_CONFIG.line.dot.useSerieColor ? a.color : e.FINAL_CONFIG.line.dot.fill,
              plot: { x: e.checkNaN(s.x), y: e.checkNaN(s.y) },
              radius: l.selectedSerieIndex !== null && l.selectedSerieIndex === h || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === h ? (l.plotRadii.line || 6) * 1.5 : l.plotRadii.line || 6,
              stroke: e.FINAL_CONFIG.line.dot.useSerieColor ? e.FINAL_CONFIG.chart.backgroundColor : a.color,
              strokeWidth: e.FINAL_CONFIG.line.dot.strokeWidth
            }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : d("", !0),
            s.comment && e.FINAL_CONFIG.chart.comments.show ? (r(), i("foreignObject", {
              key: 1,
              style: { overflow: "visible" },
              height: "12",
              width: e.FINAL_CONFIG.chart.comments.width,
              x: s.x - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
              y: s.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
            }, [
              f("div", yl, [
                S(t.$slots, "plot-comment", {
                  plot: { ...s, color: a.color, seriesIndex: c, datapointIndex: h }
                }, void 0, !0)
              ])
            ], 8, _l)) : d("", !0)
          ], 64))), 128)),
          Object.hasOwn(a, "useProgression") && a.useProgression === !0 && !isNaN(e.calcLinearProgression(a.plots).trend) ? (r(), i("g", Al, [
            f("defs", null, [
              f("marker", {
                id: `line_arrow_${c}`,
                markerWidth: 7,
                markerHeight: 7,
                refX: "0",
                refY: 7 / 2,
                orient: "auto"
              }, [
                f("polygon", {
                  points: `0 0, 7 ${7 / 2}, 0 7`,
                  fill: a.color
                }, null, 8, Cl)
              ], 8, Ll)
            ]),
            a.plots.length > 1 ? (r(), i("line", {
              key: 0,
              x1: e.calcLinearProgression(a.plots).x1,
              x2: e.calcLinearProgression(a.plots).x2,
              y1: e.forceValidValue(e.calcLinearProgression(a.plots).y1),
              y2: e.forceValidValue(e.calcLinearProgression(a.plots).y2),
              "stroke-width": 1,
              stroke: a.color,
              "stroke-dasharray": 2,
              "marker-end": `url(#line_arrow_${c})`
            }, null, 8, Sl)) : d("", !0),
            a.plots.length > 1 ? (r(), i("text", {
              key: 1,
              "text-anchor": "middle",
              x: e.calcLinearProgression(a.plots).x2,
              y: e.calcLinearProgression(a.plots).y2 - 6,
              "font-size": l.fontSizes.plotLabels,
              fill: a.color
            }, T(e.dataLabel({
              v: e.calcLinearProgression(a.plots).trend * 100,
              s: "%",
              r: 2
            })), 9, kl)) : d("", !0)
          ])) : d("", !0)
        ], 6))), 128)),
        (e.FINAL_CONFIG.bar.labels.show || e.FINAL_CONFIG.bar.serieName.show) && l.mutableConfig.dataLabels.show ? (r(), i("g", wl, [
          (r(!0), i(u, null, I(e.barSet, (a, c) => (r(), i(u, {
            key: `xLabel_bar_${c}`
          }, [
            (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i(u, {
              key: `xLabel_bar_${c}_${h}`
            }, [
              s && (!Object.hasOwn(a, "dataLabels") || a.dataLabels === !0 || l.selectedSerieIndex !== null && l.selectedSerieIndex === h || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === h) && e.FINAL_CONFIG.bar.labels.show ? (r(), i("text", {
                key: 0,
                x: l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? s.x + e.slot.line / 2 : e.calcRectX(s) + e.calcRectWidth() / 2 - e.barPeriodGap / 2,
                y: e.checkNaN(s.y) + (s.value >= 0 ? e.FINAL_CONFIG.bar.labels.offsetY : -e.FINAL_CONFIG.bar.labels.offsetY * 3),
                "text-anchor": "middle",
                "font-size": l.fontSizes.plotLabels,
                fill: e.FINAL_CONFIG.bar.labels.color,
                style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
              }, T(e.canShowValue(s.value) ? e.applyDataLabel(
                e.FINAL_CONFIG.bar.labels.formatter,
                s.value,
                e.dataLabel({
                  p: a.prefix || e.FINAL_CONFIG.chart.labels.prefix,
                  v: s.value,
                  s: a.suffix || e.FINAL_CONFIG.chart.labels.suffix,
                  r: e.FINAL_CONFIG.bar.labels.rounding
                }),
                {
                  datapoint: s,
                  serie: a
                }
              ) : ""), 13, Ol)) : d("", !0),
              s && e.FINAL_CONFIG.bar.serieName.show ? (r(), i("text", {
                key: 1,
                x: l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? s.x + e.slot.line / 2 : s.x + e.calcRectWidth() * 1.1,
                y: s.y + (s.value > 0 ? e.FINAL_CONFIG.bar.serieName.offsetY : -e.FINAL_CONFIG.bar.serieName.offsetY * 3),
                "text-anchor": "middle",
                "font-size": l.fontSizes.plotLabels,
                fill: e.FINAL_CONFIG.bar.serieName.useSerieColor ? a.color : e.FINAL_CONFIG.bar.serieName.color,
                "font-weight": e.FINAL_CONFIG.bar.serieName.bold ? "bold" : "normal",
                style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
              }, T(e.FINAL_CONFIG.bar.serieName.useAbbreviation ? e.abbreviate({ source: a.name, length: e.FINAL_CONFIG.bar.serieName.abbreviationSize }) : a.name), 13, Gl)) : d("", !0)
            ], 64))), 128))
          ], 64))), 128))
        ])) : d("", !0),
        e.FINAL_CONFIG.plot.labels.show && l.mutableConfig.dataLabels.show ? (r(), i("g", vl, [
          (r(!0), i(u, null, I(e.plotSet, (a, c) => (r(), i(u, {
            key: `xLabel_plot_${c}`
          }, [
            (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i(u, {
              key: `xLabel_plot_${c}_${h}`
            }, [
              s && !Object.hasOwn(a, "dataLabels") || a.dataLabels === !0 || l.selectedSerieIndex !== null && l.selectedSerieIndex === h || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === h ? (r(), i("text", {
                key: 0,
                x: s.x,
                y: s.y + e.FINAL_CONFIG.plot.labels.offsetY,
                "text-anchor": "middle",
                "font-size": l.fontSizes.plotLabels,
                fill: e.FINAL_CONFIG.plot.labels.color,
                style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
              }, T(e.canShowValue(s.value) ? e.applyDataLabel(
                e.FINAL_CONFIG.plot.labels.formatter,
                s.value,
                e.dataLabel({
                  p: a.prefix || e.FINAL_CONFIG.chart.labels.prefix,
                  v: s.value,
                  s: a.suffix || e.FINAL_CONFIG.chart.labels.suffix,
                  r: e.FINAL_CONFIG.plot.labels.rounding
                }),
                {
                  datapoint: s,
                  serie: a
                }
              ) : ""), 13, pl)) : d("", !0)
            ], 64))), 128))
          ], 64))), 128))
        ])) : (r(), i("g", zl, [
          (r(!0), i(u, null, I(e.plotSet, (a, c) => (r(), i(u, {
            key: `xLabel_plot_${c}`
          }, [
            (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i(u, {
              key: `xLabel_plot_${c}_${h}`
            }, [
              e.FINAL_CONFIG.plot.tag.followValue ? (r(), i(u, { key: 1 }, [
                [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(h) && a.useTag ? (r(), i("line", {
                  key: 0,
                  class: "vue-ui-xy-tag-plot",
                  x1: e.drawingArea.left,
                  x2: e.drawingArea.right,
                  y1: s.y,
                  y2: s.y,
                  "stroke-width": 1,
                  "stroke-linecap": "round",
                  "stroke-dasharray": "2",
                  stroke: a.color
                }, null, 8, Rl)) : d("", !0)
              ], 64)) : (r(), i(u, { key: 0 }, [
                s && h === 0 && a.useTag && a.useTag === "start" ? (r(), i("foreignObject", {
                  key: 0,
                  x: s.x,
                  y: s.y - 20,
                  height: 24,
                  width: "150",
                  style: b(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
                }, [
                  f("div", {
                    style: b(`padding: 3px; background:${e.setOpacity(a.color, 80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`),
                    innerHTML: e.applyDataLabel(
                      e.FINAL_CONFIG.plot.tag.formatter,
                      s.value,
                      a.name,
                      {
                        datapoint: s,
                        seriesIndex: h,
                        serieName: a.name
                      }
                    )
                  }, null, 12, Tl)
                ], 12, Ml)) : d("", !0),
                s && h === a.plots.length - 1 && a.useTag && a.useTag === "end" ? (r(), i("foreignObject", {
                  key: 1,
                  x: s.x - a.name.length * (l.fontSizes.plotLabels / 2),
                  y: s.y - 20,
                  height: 24,
                  width: "150",
                  style: b(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
                }, [
                  f("div", {
                    style: b(`padding: 3px; background:${e.setOpacity(a.color, 80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`),
                    innerHTML: e.applyDataLabel(
                      e.FINAL_CONFIG.plot.tag.formatter,
                      s.value,
                      a.name,
                      {
                        datapoint: s,
                        seriesIndex: h,
                        serieName: a.name
                      }
                    )
                  }, null, 12, Vl)
                ], 12, Pl)) : d("", !0)
              ], 64))
            ], 64))), 128))
          ], 64))), 128))
        ])),
        e.FINAL_CONFIG.line.labels.show && l.mutableConfig.dataLabels.show ? (r(), i("g", Hl, [
          (r(!0), i(u, null, I(e.lineSet, (a, c) => (r(), i(u, {
            key: `xLabel_line_${c}`
          }, [
            (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i(u, {
              key: `xLabel_line_${c}_${h}`
            }, [
              s && !Object.hasOwn(a, "dataLabels") || a.dataLabels === !0 || l.selectedSerieIndex !== null && l.selectedSerieIndex === h || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === h ? (r(), i("text", {
                key: 0,
                x: s.x,
                y: s.y + (s.value >= 0 ? e.FINAL_CONFIG.line.labels.offsetY : -e.FINAL_CONFIG.line.labels.offsetY * 3),
                "text-anchor": "middle",
                "font-size": l.fontSizes.plotLabels,
                fill: e.FINAL_CONFIG.line.labels.color,
                style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
              }, T(e.canShowValue(s.value) ? e.applyDataLabel(
                e.FINAL_CONFIG.line.labels.formatter,
                s.value,
                e.dataLabel({
                  p: a.prefix || e.FINAL_CONFIG.chart.labels.prefix,
                  v: s.value,
                  s: a.suffix || e.FINAL_CONFIG.chart.labels.suffix,
                  r: e.FINAL_CONFIG.line.labels.rounding
                }),
                {
                  datapoint: s,
                  serie: a
                }
              ) : ""), 13, Dl)) : d("", !0)
            ], 64))), 128))
          ], 64))), 128))
        ])) : (r(), i("g", Wl, [
          (r(!0), i(u, null, I(e.lineSet, (a, c) => (r(), i(u, {
            key: `xLabel_line_${c}`
          }, [
            (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i(u, {
              key: `xLabel_line_${c}_${h}`
            }, [
              e.FINAL_CONFIG.line.tag.followValue ? (r(), i(u, { key: 1 }, [
                [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(h) && a.useTag ? (r(), i("line", {
                  key: 0,
                  class: "vue-ui-xy-tag-line",
                  x1: e.drawingArea.left,
                  x2: e.drawingArea.right,
                  y1: s.y,
                  y2: s.y,
                  "stroke-width": 1,
                  "stroke-linecap": "round",
                  "stroke-dasharray": "2",
                  stroke: a.color
                }, null, 8, Xl)) : d("", !0)
              ], 64)) : (r(), i(u, { key: 0 }, [
                s && h === 0 && a.useTag && a.useTag === "start" ? (r(), i("foreignObject", {
                  key: 0,
                  x: s.x,
                  y: s.y - 20,
                  height: 24,
                  width: "150",
                  style: b(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
                }, [
                  f("div", {
                    style: b(`padding: 3px; background:${e.setOpacity(a.color, 80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`),
                    innerHTML: e.applyDataLabel(
                      e.FINAL_CONFIG.line.tag.formatter,
                      s.value,
                      a.name,
                      {
                        datapoint: s,
                        seriesIndex: h,
                        serieName: a.name
                      }
                    )
                  }, null, 12, El)
                ], 12, Bl)) : d("", !0),
                s && h === a.plots.length - 1 && a.useTag && a.useTag === "end" ? (r(), i("foreignObject", {
                  key: 1,
                  x: s.x,
                  y: s.y - 20,
                  height: 24,
                  width: "150",
                  style: b(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
                }, [
                  f("div", {
                    style: b(`padding: 3px; background:${e.setOpacity(a.color, 80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`),
                    innerHTML: e.applyDataLabel(
                      e.FINAL_CONFIG.line.tag.formatter,
                      s.value,
                      a.name,
                      {
                        datapoint: s,
                        seriesIndex: h,
                        serieName: a.name
                      }
                    )
                  }, null, 12, ql)
                ], 12, Yl)) : d("", !0)
              ], 64))
            ], 64))), 128))
          ], 64))), 128))
        ])),
        (r(!0), i(u, null, I(e.lineSet, (a, c) => (r(), i(u, {
          key: `xLabel_line_${c}`
        }, [
          (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i(u, {
            key: `xLabel_line_${c}_${h}`
          }, [
            s && h === 0 && a.showSerieName && a.showSerieName === "start" ? (r(), i("text", {
              key: 0,
              x: s.x - l.fontSizes.plotLabels,
              y: s.y,
              "font-size": l.fontSizes.plotLabels,
              "text-anchor": "end",
              fill: a.color,
              innerHTML: e.createTSpans({
                content: a.name,
                fontSize: l.fontSizes.plotLabels,
                fill: a.color,
                x: s.x - l.fontSizes.plotLabels,
                y: s.y,
                maxWords: 2
              }),
              style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
            }, null, 12, Ul)) : d("", !0),
            s && h === a.plots.length - 1 && a.showSerieName && a.showSerieName === "end" ? (r(), i("text", {
              key: 1,
              x: s.x + l.fontSizes.plotLabels,
              y: s.y,
              "font-size": l.fontSizes.plotLabels,
              "text-anchor": "start",
              fill: a.color,
              innerHTML: e.createTSpans({
                content: a.name,
                fontSize: l.fontSizes.plotLabels,
                fill: a.color,
                x: s.x + l.fontSizes.plotLabels,
                y: s.y,
                maxWords: 2
              }),
              style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
            }, null, 12, Zl)) : d("", !0)
          ], 64))), 128))
        ], 64))), 128)),
        (r(!0), i(u, null, I(e.plotSet, (a, c) => (r(), i(u, {
          key: `xLabel_plot_${c}`
        }, [
          (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i(u, {
            key: `xLabel_plot_${c}_${h}`
          }, [
            s && h === 0 && a.showSerieName && a.showSerieName === "start" ? (r(), i("text", {
              key: 0,
              x: s.x - l.fontSizes.plotLabels,
              y: s.y,
              "font-size": l.fontSizes.plotLabels,
              "text-anchor": "end",
              fill: a.color,
              innerHTML: e.createTSpans({
                content: a.name,
                fontSize: l.fontSizes.plotLabels,
                fill: a.color,
                x: s.x - l.fontSizes.plotLabels,
                y: s.y,
                maxWords: 2
              }),
              style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
            }, null, 12, Jl)) : d("", !0),
            s && h === a.plots.length - 1 && a.showSerieName && a.showSerieName === "end" ? (r(), i("text", {
              key: 1,
              x: s.x + l.fontSizes.plotLabels,
              y: s.y,
              "font-size": l.fontSizes.plotLabels,
              "text-anchor": "start",
              fill: a.color,
              innerHTML: e.createTSpans({
                content: a.name,
                fontSize: l.fontSizes.plotLabels,
                fill: a.color,
                x: s.x + l.fontSizes.plotLabels,
                y: s.y,
                maxWords: 2
              }),
              style: b(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
            }, null, 12, Kl)) : d("", !0)
          ], 64))), 128))
        ], 64))), 128)),
        l.mutableConfig.useIndividualScale && !l.mutableConfig.isStacked ? (r(), i(u, { key: 11 }, [
          f("defs", null, [
            (r(!0), i(u, null, I(e.allScales, (a, c) => (r(), i("linearGradient", {
              id: `individual_scale_gradient_${l.uniqueId}_${c}`,
              x1: "0%",
              x2: "100%",
              y1: "0%",
              y2: "0%"
            }, [
              f("stop", {
                offset: "0%",
                "stop-color": e.FINAL_CONFIG.chart.backgroundColor,
                "stop-opacity": "0"
              }, null, 8, jl),
              f("stop", {
                offset: "100%",
                "stop-color": a.color,
                "stop-opacity": "0.2"
              }, null, 8, $l)
            ], 8, Ql))), 256))
          ]),
          (r(!0), i(u, null, I(e.allScales, (a, c) => (r(), i("rect", {
            x: a.x - e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + e.xPadding,
            y: e.drawingArea.top,
            width: e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,
            height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
            fill: l.selectedScale === a.groupId ? `url(#individual_scale_gradient_${l.uniqueId}_${c})` : "transparent",
            onMouseenter: (s) => l.selectedScale = a.groupId,
            onMouseleave: n[0] || (n[0] = (s) => l.selectedScale = null)
          }, null, 40, ea))), 256))
        ], 64)) : d("", !0),
        f("g", null, [
          e.FINAL_CONFIG.chart.grid.labels.axis.yLabel && !l.mutableConfig.useIndividualScale ? (r(), i("text", {
            key: 0,
            "font-size": l.fontSizes.yAxis,
            fill: e.FINAL_CONFIG.chart.grid.labels.color,
            transform: `translate(${l.fontSizes.yAxis + e.FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${e.drawingArea.top + e.drawingArea.height / 2}) rotate(-90)`,
            "text-anchor": "middle",
            style: { transition: "none" }
          }, T(e.FINAL_CONFIG.chart.grid.labels.axis.yLabel), 9, ta)) : d("", !0),
          e.FINAL_CONFIG.chart.grid.labels.axis.xLabel ? (r(), i("text", {
            key: 1,
            "text-anchor": "middle",
            x: l.width / 2,
            y: e.drawingArea.bottom + l.fontSizes.yAxis + l.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,
            "font-size": l.fontSizes.yAxis,
            fill: e.FINAL_CONFIG.chart.grid.labels.color
          }, T(e.FINAL_CONFIG.chart.grid.labels.axis.xLabel), 9, la)) : d("", !0)
        ]),
        n[9] || (n[9] = j('v-for="(label, i) in timeLabels" :key="`time_label_${i}`" ')),
        e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show ? (r(), i("g", aa, [
          t.$slots["time-label"] ? (r(!0), i(u, { key: 0 }, I(e.timeLabels, (a, c) => S(t.$slots, "time-label", $({
            key: `time_label_${c}`,
            ref_for: !0
          }, {
            x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * c + e.drawingArea.width / e.maxSeries / 2,
            y: e.drawingArea.bottom + l.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset,
            fontSize: l.fontSizes.xAxis,
            fill: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,
            transform: `translate(${e.drawingArea.left + e.drawingArea.width / e.maxSeries * c + e.drawingArea.width / e.maxSeries / 2}, ${e.drawingArea.bottom + l.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`,
            absoluteIndex: a.absoluteIndex,
            content: a.text,
            textAnchor: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
            show: a && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || a && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (c === 0 || c === e.timeLabels.length - 1) && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || a && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && l.selectedSerieIndex === c && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || a && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo && c % Math.floor((this.slicer.end - this.slicer.start) / e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo) === 0
          }), void 0, !0)), 128)) : (r(!0), i(u, { key: 1 }, I(e.timeLabels, (a, c) => (r(), i("g", {
            key: `time_label_${c}`
          }, [
            a && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || a && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (c === 0 || c === e.timeLabels.length - 1) && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || a && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && l.selectedSerieIndex === c && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || a && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo && c % Math.floor((this.slicer.end - this.slicer.start) / e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo) === 0 ? (r(), i("text", {
              key: 0,
              "text-anchor": e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
              "font-size": l.fontSizes.xAxis,
              fill: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,
              transform: `translate(${e.drawingArea.left + e.drawingArea.width / e.maxSeries * c + e.drawingArea.width / e.maxSeries / 2}, ${e.drawingArea.bottom + l.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`,
              style: {
                cursor: "pointer"
              },
              onClick: () => e.selectTimeLabel(a, c)
            }, T(a.text || ""), 9, ra)) : d("", !0)
          ]))), 128))
        ])) : d("", !0),
        f("g", null, [
          (r(!0), i(u, null, I(e.maxSeries, (a, c) => (r(), i("rect", {
            key: `tooltip_trap_${c}`,
            x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * c,
            y: e.drawingArea.top,
            height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
            width: e.drawingArea.width / e.maxSeries < 0 ? 1e-5 : e.drawingArea.width / e.maxSeries,
            fill: "transparent",
            onMouseenter: (s) => e.toggleTooltipVisibility(!0, c),
            onMouseleave: n[1] || (n[1] = (s) => e.toggleTooltipVisibility(!1)),
            onClick: (s) => e.selectX(c)
          }, null, 40, ia))), 128))
        ]),
        e.FINAL_CONFIG.chart.timeTag.show && (![null, void 0].includes(l.selectedSerieIndex) || ![null, void 0].includes(l.selectedMinimapIndex)) ? (r(), i("g", sa, [
          (r(), i("foreignObject", {
            x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * ((l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)) - 100 + e.drawingArea.width / e.maxSeries / 2,
            y: e.drawingArea.bottom,
            width: "200",
            height: "40",
            style: { overflow: "visible !important" }
          }, [
            f("div", {
              class: "vue-ui-xy-time-tag",
              style: b(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${e.FINAL_CONFIG.chart.timeTag.backgroundColor};color:${e.FINAL_CONFIG.chart.timeTag.color};font-size:${e.FINAL_CONFIG.chart.timeTag.fontSize}px`)
            }, T(e.timeLabels[(l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)].text || (l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)), 5)
          ], 8, na)),
          f("circle", {
            cx: e.drawingArea.left + e.drawingArea.width / e.maxSeries * ((l.selectedSerieIndex !== null ? l.selectedSerieIndex : 0) || (l.selectedMinimapIndex !== null ? l.selectedMinimapIndex : 0)) + e.drawingArea.width / e.maxSeries / 2,
            cy: e.drawingArea.bottom,
            r: e.FINAL_CONFIG.chart.timeTag.circleMarker.radius,
            fill: e.FINAL_CONFIG.chart.timeTag.circleMarker.color
          }, null, 8, ca)
        ])) : d("", !0)
      ])) : d("", !0),
      S(t.$slots, "svg", { svg: e.svg }, void 0, !0)
    ], 14, nt)) : d("", !0),
    t.$slots.watermark ? (r(), i("div", oa, [
      S(t.$slots, "watermark", E(Y({ isPrinting: l.isPrinting || l.isImaging })), void 0, !0)
    ])) : d("", !0),
    (r(!0), i(u, null, I(e.lineSet, (a, c) => (r(), i(u, {
      key: `tag_line_${c}`
    }, [
      (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i(u, {
        key: `tag_line_${c}_${h}`
      }, [
        [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(h) && a.useTag && a.useTag === "end" && e.FINAL_CONFIG.line.tag.followValue ? (r(), i("div", {
          key: 0,
          ref_for: !0,
          ref: (y) => e.setTagRef(c, h, y, "right", "line"),
          class: "vue-ui-xy-tag",
          "data-tag": "right",
          style: b({
            position: "fixed",
            top: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.right + e.FINAL_CONFIG.line.tag.fontSize / 1.5,
              y: s.y,
              element: l.tagRefs[`${c}_${h}_right_line`],
              position: "right"
            }).top + "px",
            left: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.right + e.FINAL_CONFIG.line.tag.fontSize / 1.5,
              y: s.y,
              element: l.tagRefs[`${c}_${h}_right_line`],
              position: "right"
            }).left + "px",
            height: "fit-content",
            width: "fit-content",
            background: a.color,
            color: e.adaptColorToBackground(a.color),
            padding: "0 6px",
            fontSize: e.FINAL_CONFIG.line.tag.fontSize + "px",
            opacity: 1
          })
        }, [
          (r(), i("svg", ha, [
            f("path", {
              d: "M 0,10 10,0 10,20 Z",
              fill: a.color,
              stroke: "none"
            }, null, 8, ua)
          ])),
          f("div", {
            class: "vue-ui-xy-tag-content",
            innerHTML: e.applyDataLabel(
              e.FINAL_CONFIG.line.tag.formatter,
              s.value,
              a.name,
              {
                datapoint: s,
                seriesIndex: h,
                serieName: a.name
              }
            )
          }, null, 8, da)
        ], 4)) : d("", !0),
        [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(h) && a.useTag && a.useTag === "start" && e.FINAL_CONFIG.line.tag.followValue ? (r(), i("div", {
          key: 1,
          ref_for: !0,
          ref: (y) => e.setTagRef(c, h, y, "left", "line"),
          class: "vue-ui-xy-tag",
          "data-tag": "left",
          style: b({
            position: "fixed",
            top: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.left - e.FINAL_CONFIG.line.tag.fontSize / 1.5,
              y: s.y,
              element: l.tagRefs[`${c}_${h}_left_line`],
              position: "left"
            }).top + "px",
            left: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.left - e.FINAL_CONFIG.line.tag.fontSize / 1.5,
              y: s.y,
              element: l.tagRefs[`${c}_${h}_left_line`],
              position: "left"
            }).left + "px",
            height: "fit-content",
            width: "fit-content",
            background: a.color,
            color: e.adaptColorToBackground(a.color),
            padding: "0 6px",
            fontSize: e.FINAL_CONFIG.line.tag.fontSize + "px",
            opacity: 1
          })
        }, [
          (r(), i("svg", ga, [
            f("path", {
              d: "M 0,0 10,10 0,20 Z",
              fill: a.color,
              stroke: "none"
            }, null, 8, fa)
          ])),
          f("div", {
            class: "vue-ui-xy-tag-content",
            innerHTML: e.applyDataLabel(
              e.FINAL_CONFIG.line.tag.formatter,
              s.value,
              a.name,
              {
                datapoint: s,
                seriesIndex: h,
                serieName: a.name
              }
            )
          }, null, 8, Ia)
        ], 4)) : d("", !0)
      ], 64))), 128))
    ], 64))), 128)),
    (r(!0), i(u, null, I(e.plotSet, (a, c) => (r(), i(u, {
      key: `tag_plot_${c}`
    }, [
      (r(!0), i(u, null, I(a.plots, (s, h) => (r(), i(u, {
        key: `tag_plot_${c}_${h}`
      }, [
        [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(h) && a.useTag && a.useTag === "end" && e.FINAL_CONFIG.plot.tag.followValue ? (r(), i("div", {
          key: 0,
          ref_for: !0,
          ref: (y) => e.setTagRef(c, h, y, "right", "plot"),
          class: "vue-ui-xy-tag",
          "data-tag": "right",
          style: b({
            position: "fixed",
            top: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.right + e.FINAL_CONFIG.plot.tag.fontSize / 1.5,
              y: s.y,
              element: l.tagRefs[`${c}_${h}_right_plot`],
              position: "right"
            }).top + "px",
            left: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.right + e.FINAL_CONFIG.plot.tag.fontSize / 1.5,
              y: s.y,
              element: l.tagRefs[`${c}_${h}_right_plot`],
              position: "right"
            }).left + "px",
            height: "fit-content",
            width: "fit-content",
            background: a.color,
            color: e.adaptColorToBackground(a.color),
            padding: "0 6px",
            fontSize: e.FINAL_CONFIG.plot.tag.fontSize + "px",
            opacity: 1
          })
        }, [
          (r(), i("svg", Na, [
            f("path", {
              d: "M 0,10 10,0 10,20 Z",
              fill: a.color,
              stroke: "none"
            }, null, 8, ma)
          ])),
          f("div", {
            class: "vue-ui-xy-tag-content",
            innerHTML: e.applyDataLabel(
              e.FINAL_CONFIG.plot.tag.formatter,
              s.value,
              a.name,
              {
                datapoint: s,
                seriesIndex: h,
                serieName: a.name
              }
            )
          }, null, 8, xa)
        ], 4)) : d("", !0),
        [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(h) && a.useTag && a.useTag === "start" && e.FINAL_CONFIG.plot.tag.followValue ? (r(), i("div", {
          key: 1,
          ref_for: !0,
          ref: (y) => e.setTagRef(c, h, y, "left", "plot"),
          class: "vue-ui-xy-tag",
          "data-tag": "left",
          style: b({
            position: "fixed",
            top: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.left - e.FINAL_CONFIG.plot.tag.fontSize / 1.5,
              y: s.y,
              element: l.tagRefs[`${c}_${h}_left_plot`],
              position: "left"
            }).top + "px",
            left: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.left - e.FINAL_CONFIG.plot.tag.fontSize / 1.5,
              y: s.y,
              element: l.tagRefs[`${c}_${h}_left_plot`],
              position: "left"
            }).left + "px",
            height: "fit-content",
            width: "fit-content",
            background: a.color,
            color: e.adaptColorToBackground(a.color),
            padding: "0 6px",
            fontSize: e.FINAL_CONFIG.plot.tag.fontSize + "px",
            opacity: 1
          })
        }, [
          (r(), i("svg", ba, [
            f("path", {
              d: "M 0,0 10,10 0,20 Z",
              fill: a.color,
              stroke: "none"
            }, null, 8, Fa)
          ])),
          f("div", {
            class: "vue-ui-xy-tag-content",
            innerHTML: e.applyDataLabel(
              e.FINAL_CONFIG.plot.tag.formatter,
              s.value,
              a.name,
              {
                datapoint: s,
                seriesIndex: h,
                serieName: a.name
              }
            )
          }, null, 8, _a)
        ], 4)) : d("", !0)
      ], 64))), 128))
    ], 64))), 128)),
    e.isDataset ? d("", !0) : (r(), W(k, {
      key: 6,
      config: {
        type: "line",
        style: {
          backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
          line: {
            axis: {
              color: e.FINAL_CONFIG.chart.grid.stroke
            },
            path: {
              color: e.FINAL_CONFIG.chart.grid.stroke,
              strokeWidth: 0.5
            }
          }
        }
      }
    }, null, 8, ["config"])),
    e.FINAL_CONFIG.chart.zoom.show && l.maxX > 6 && e.isDataset ? (r(), W(v, {
      ref: "chartSlicer",
      key: `slicer_${l.slicerStep}`,
      background: e.FINAL_CONFIG.chart.zoom.color,
      fontSize: e.FINAL_CONFIG.chart.zoom.fontSize,
      useResetSlot: e.FINAL_CONFIG.chart.zoom.useResetSlot,
      labelLeft: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l.slicer.start],
      labelRight: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l.slicer.end - 1],
      textColor: e.FINAL_CONFIG.chart.color,
      inputColor: e.FINAL_CONFIG.chart.zoom.color,
      selectColor: e.FINAL_CONFIG.chart.zoom.highlightColor,
      borderColor: e.FINAL_CONFIG.chart.backgroundColor,
      minimap: e.minimap,
      smoothMinimap: e.FINAL_CONFIG.chart.zoom.minimap.smooth,
      minimapSelectedColor: e.FINAL_CONFIG.chart.zoom.minimap.selectedColor,
      minimapSelectionRadius: e.FINAL_CONFIG.chart.zoom.minimap.selectionRadius,
      minimapLineColor: e.FINAL_CONFIG.chart.zoom.minimap.lineColor,
      minimapSelectedColorOpacity: e.FINAL_CONFIG.chart.zoom.minimap.selectedColorOpacity,
      minimapSelectedIndex: l.selectedSerieIndex,
      minimapIndicatorColor: e.FINAL_CONFIG.chart.zoom.minimap.indicatorColor,
      verticalHandles: e.FINAL_CONFIG.chart.zoom.minimap.verticalHandles,
      max: l.maxX,
      min: 0,
      valueStart: l.slicer.start,
      valueEnd: l.slicer.end,
      start: l.slicer.start,
      "onUpdate:start": n[2] || (n[2] = (a) => l.slicer.start = a),
      end: l.slicer.end,
      "onUpdate:end": n[3] || (n[3] = (a) => l.slicer.end = a),
      refreshStartPoint: e.FINAL_CONFIG.chart.zoom.startIndex !== null ? e.FINAL_CONFIG.chart.zoom.startIndex : 0,
      refreshEndPoint: e.FINAL_CONFIG.chart.zoom.endIndex !== null ? e.FINAL_CONFIG.chart.zoom.endIndex + 1 : Math.max(...o.dataset.map((a) => e.largestTriangleThreeBucketsArray({ data: a.series, threshold: e.FINAL_CONFIG.downsample.threshold }).length)),
      enableRangeHandles: e.FINAL_CONFIG.chart.zoom.enableRangeHandles,
      enableSelectionDrag: e.FINAL_CONFIG.chart.zoom.enableSelectionDrag,
      onReset: e.refreshSlicer,
      onTrapMouse: e.selectMinimapIndex
    }, {
      "reset-action": V(({ reset: a }) => [
        S(t.$slots, "reset-action", E(Y({ reset: a })), void 0, !0)
      ]),
      _: 3
    }, 8, ["background", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "borderColor", "minimap", "smoothMinimap", "minimapSelectedColor", "minimapSelectionRadius", "minimapLineColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapIndicatorColor", "verticalHandles", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag", "onReset", "onTrapMouse"])) : d("", !0),
    e.FINAL_CONFIG.chart.legend.show ? (r(), i("div", {
      key: 8,
      ref: "chartLegend",
      class: "vue-ui-xy-legend",
      style: b(`font-size:${e.FINAL_CONFIG.chart.legend.fontSize}px`)
    }, [
      (r(!0), i(u, null, I(e.absoluteDataset, (a, c) => (r(), i("div", {
        key: `div_legend_item_${c}`,
        onClick: (s) => e.segregate(a),
        class: B({ "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": l.segregatedSeries.includes(a.id) })
      }, [
        l.icons[a.type] === "line" ? (r(), i("svg", Aa, [
          f("rect", {
            x: "0",
            y: "7.5",
            rx: "1.5",
            stroke: e.FINAL_CONFIG.chart.backgroundColor,
            "stroke-width": 0.5,
            height: "3",
            width: "20",
            fill: a.color
          }, null, 8, La),
          X(G, {
            plot: { x: 10, y: 9 },
            radius: 4,
            color: a.color,
            shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(a.shape) ? a.shape : "circle",
            stroke: e.FINAL_CONFIG.chart.backgroundColor,
            strokeWidth: 0.5
          }, null, 8, ["color", "shape", "stroke"])
        ])) : l.icons[a.type] === "bar" ? (r(), i("svg", Ca, [
          l.icons[a.type] === "bar" && t.$slots.pattern ? (r(), i("rect", {
            key: 0,
            x: "0",
            y: "0",
            rx: "1",
            height: "40",
            width: "40",
            stroke: "none",
            fill: a.color
          }, null, 8, Sa)) : d("", !0),
          l.icons[a.type] === "bar" ? (r(), i("rect", {
            key: 1,
            x: "0",
            y: "0",
            rx: "1",
            height: "40",
            width: "40",
            stroke: "none",
            fill: t.$slots.pattern ? `url(#pattern_${l.uniqueId}_${a.slotAbsoluteIndex})` : a.color
          }, null, 8, ka)) : d("", !0)
        ])) : (r(), i("svg", wa, [
          X(G, {
            plot: { x: 6, y: 6 },
            radius: 5,
            color: a.color,
            shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(a.shape) ? a.shape : "circle"
          }, null, 8, ["color", "shape"])
        ])),
        f("span", {
          style: b(`color:${e.FINAL_CONFIG.chart.legend.color}`)
        }, T(a.name), 5)
      ], 10, ya))), 128))
    ], 4)) : (r(), i("div", Oa, [
      S(t.$slots, "legend", { legend: e.absoluteDataset }, void 0, !0)
    ], 512)),
    t.$slots.source ? (r(), i("div", Ga, [
      S(t.$slots, "source", {}, void 0, !0)
    ], 512)) : d("", !0),
    X(w, {
      show: l.mutableConfig.showTooltip && l.isTooltip,
      backgroundColor: e.FINAL_CONFIG.chart.tooltip.backgroundColor,
      color: e.FINAL_CONFIG.chart.tooltip.color,
      fontSize: e.FINAL_CONFIG.chart.tooltip.fontSize,
      borderRadius: e.FINAL_CONFIG.chart.tooltip.borderRadius,
      borderColor: e.FINAL_CONFIG.chart.tooltip.borderColor,
      borderWidth: e.FINAL_CONFIG.chart.tooltip.borderWidth,
      backgroundOpacity: e.FINAL_CONFIG.chart.tooltip.backgroundOpacity,
      position: e.FINAL_CONFIG.chart.tooltip.position,
      offsetY: e.FINAL_CONFIG.chart.tooltip.offsetY,
      parent: t.$refs.chart,
      content: e.tooltipContent,
      isFullscreen: l.isFullscreen,
      isCustom: e.FINAL_CONFIG.chart.tooltip.customFormat && typeof e.FINAL_CONFIG.chart.tooltip.customFormat == "function"
    }, {
      "tooltip-before": V(() => [
        S(t.$slots, "tooltip-before", E(Y({ ...e.dataTooltipSlot })), void 0, !0)
      ]),
      "tooltip-after": V(() => [
        S(t.$slots, "tooltip-after", E(Y({ ...e.dataTooltipSlot })), void 0, !0)
      ]),
      _: 3
    }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
    e.isDataset ? (r(), W(p, {
      key: 11,
      hideDetails: "",
      config: {
        open: l.mutableConfig.showTable,
        maxHeight: 1e4,
        body: {
          backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
          color: e.FINAL_CONFIG.chart.color
        },
        head: {
          backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
          color: e.FINAL_CONFIG.chart.color
        }
      }
    }, {
      content: V(() => [
        f("div", {
          style: b(`${l.isPrinting ? "" : "max-height:400px"};overflow:auto;width:100%;margin-top:48px`)
        }, [
          f("div", va, [
            et(f("input", {
              type: "checkbox",
              "onUpdate:modelValue": n[4] || (n[4] = (a) => l.showSparklineTable = a)
            }, null, 512), [
              [tt, l.showSparklineTable]
            ]),
            f("div", {
              onClick: n[5] || (n[5] = (a) => l.showSparklineTable = !l.showSparklineTable),
              style: { cursor: "pointer" }
            }, [
              X(F, {
                name: "chartLine",
                size: 20,
                stroke: e.FINAL_CONFIG.chart.color
              }, null, 8, ["stroke"])
            ])
          ]),
          l.showSparklineTable ? (r(), W(C, {
            key: `sparkline_${l.segregateStep}`,
            dataset: e.tableSparklineDataset,
            config: e.tableSparklineConfig
          }, null, 8, ["dataset", "config"])) : (r(), W(O, {
            key: `table_${l.tableStep}`,
            colNames: e.dataTable.colNames,
            head: e.dataTable.head,
            body: e.dataTable.body,
            config: e.dataTable.config,
            title: `${e.FINAL_CONFIG.chart.title.text}${e.FINAL_CONFIG.chart.title.subtitle.text ? ` : ${e.FINAL_CONFIG.chart.title.subtitle.text}` : ""}`,
            onClose: n[6] || (n[6] = (a) => l.mutableConfig.showTable = !1)
          }, {
            th: V(({ th: a }) => [
              f("div", { innerHTML: a }, null, 8, pa)
            ]),
            td: V(({ td: a }) => [
              j(T(isNaN(Number(a)) ? a : e.dataLabel({
                p: e.FINAL_CONFIG.chart.labels.prefix,
                v: a,
                s: e.FINAL_CONFIG.chart.labels.suffix,
                r: e.FINAL_CONFIG.table.rounding
              })), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ], 4)
      ]),
      _: 1
    }, 8, ["config"])) : d("", !0)
  ], 46, it);
}
const Ka = /* @__PURE__ */ lt(rt, [["render", za], ["__scopeId", "data-v-0ac0eb6b"]]);
export {
  Ka as default
};