UNPKG

vue-data-ui

Version:

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

3,097 lines • 162 kB
import { R as X, _ as ie, a8 as ue, a9 as ce, aa as de, ab as ge, ac as fe, ad as Ie, ae as xe, c as ne, A as Ne, E as me, w as be, s as Fe, o as _e, a2 as Ae, af as ye, x as Le, C as Ce, y as Se, a7 as ke, e as we, r as Oe, f as oe, I as Ge, ag as ve, U as pe, V as ze, q as Me, b as Te, z as Pe, d as Ve, ah as Re, v as He, ai as De, D as Be, a5 as We, aj as Ee, i as Ye, F as qe, L as Xe, u as Ue, p as Ze, B as Je, a as Ke, t as Qe } from "./index-BLtEpj8j.js";
import { u as je } from "./useMouse-AicQS8Vf.js";
import { u as ae } from "./useNestedProp-Bw1KcAmj.js";
import { u as $e } from "./useTimeLabels-DFkUfjfs.js";
import { defineAsyncComponent as Z, resolveComponent as q, createElementBlock as s, openBlock as a, normalizeStyle as _, normalizeClass as j, createBlock as U, createCommentVNode as u, createVNode as le, createSlots as et, withCtx as B, renderSlot as G, normalizeProps as $, guardReactiveProps as ee, createElementVNode as I, Fragment as d, renderList as x, toDisplayString as V, mergeProps as se, withDirectives as tt, vModelCheckbox as lt, createTextVNode as rt } from "vue";
import { S as it } from "./Slicer-D-HtJC7M.js";
import at from "./Title-DkG60EPg.js";
import { _ as st } from "./Shape-Cqnzky8X.js";
import nt from "./img-D-vWHxhM.js";
import { _ as ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const ot = ne(), ht = {
  name: "vue-ui-xy",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  components: {
    Slicer: it,
    // Must be ready in responsive mode
    Title: at,
    // Must be ready in responsive mode
    Shape: st,
    DataTable: Z(() => import("./DataTable-CS_V_Adx.js")),
    Tooltip: Z(() => import("./Tooltip-CuHsd1IQ.js")),
    UserOptions: Z(() => import("./UserOptions-DGw0HvSp.js")),
    BaseIcon: Z(() => import("./BaseIcon-Ba5t14Aj.js")),
    TableSparkline: Z(() => import("./vue-ui-table-sparkline-CmYu64QM.js")),
    Skeleton: Z(() => import("./vue-ui-skeleton-CsMU8DwQ.js")),
    Accordion: Z(() => import("./vue-ui-accordion-B6Svdk-2.js")),
    PackageVersion: Z(() => import("./PackageVersion-CnRyWKP-.js")),
    PenAndPaper: Z(() => import("./PenAndPaper-7BWf7zgA.js"))
  },
  data() {
    this.dataset.forEach((f, l) => {
      [null, void 0].includes(f.series) && this.error({
        componentName: "VueUiXy",
        type: "datasetSerieAttribute",
        property: "series (number[])",
        index: l
      });
    });
    const r = this.config.downsample && this.config.downsample.threshold ? this.config.downsample.threshold : 500, c = Math.max(...this.dataset.map((f) => this.largestTriangleThreeBucketsArray({ data: f.series, threshold: r }).length)), h = {
      start: 0,
      end: c
    };
    return {
      resizeObserver: null,
      observedEl: null,
      themePalettes: Qe,
      themes: Ke,
      slicerStep: 0,
      selectedScale: null,
      CTX: null,
      CANVAS: null,
      opacity: Je,
      useSafeValues: !0,
      palette: Ze,
      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: ne(),
      step: 0,
      tableStep: 0,
      titleStep: 0,
      slicer: h,
      __to__: null,
      maxX: c,
      showSparklineTable: !0,
      segregateStep: 0,
      sliderId: ot,
      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: {},
      _textMeasurer: null
    };
  },
  watch: {
    dataset: {
      handler(r, c) {
        this.maxX = Math.max(...this.dataset.map((h) => this.largestTriangleThreeBucketsArray({
          data: h.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(r, c) {
        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: {
    locale() {
      return this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.formatter.locale;
    },
    chartAriaLabel() {
      const r = this.FINAL_CONFIG.chart.title.text || "Chart visualization", c = this.FINAL_CONFIG.chart.title.subtitle.text || "";
      return `${r}. ${c}`;
    },
    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 r = this.datasetWithIds.filter((l) => !this.segregatedSeries.includes(l.id)), c = Math.max(...r.map((l) => l.series.length)), h = [];
      for (let l = 0; l < c; l += 1)
        h.push(r.map((e) => e.series[l] || 0).reduce((e, i) => (e || 0) + (i || 0), 0));
      const f = Math.min(...h);
      return h.map((l) => l + (f < 0 ? Math.abs(f) : 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 r = 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
      })), c = 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
      })), h = 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
      })), f = this.mutableConfig.useIndividualScale && !this.mutableConfig.isStacked ? Object.values(this.scaleGroups) : [...r, ...c, ...h], l = f.flatMap((e) => e).length;
      return f.flatMap((e, i) => ({
        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 * (i + 1),
        yLabels: e.scaleYLabels || e.scale.ticks.map((y) => ({
          y: y >= 0 ? e.zero - e.individualHeight * (y / e.max) : e.zero + e.individualHeight * Math.abs(y) / e.max,
          value: y
        }))
      }));
    },
    isDataset() {
      return !!this.dataset && this.dataset.length;
    },
    chartFont() {
      const r = document.getElementById(`vue-ui-xy_${this.uniqueId}`);
      return window.getComputedStyle(r, null).getPropertyValue("font-family");
    },
    FINAL_CONFIG: {
      get: function() {
        return this.prepareConfig();
      },
      set: function(r) {
        return r;
      }
    },
    hasHighlightArea() {
      return Array.isArray(this.FINAL_CONFIG.chart.highlightArea) ? this.FINAL_CONFIG.chart.highlightArea.some((r) => r.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((c) => ({
          ...c,
          span: c.from === c.to ? 1 : c.to < c.from ? 0 : c.to - c.from + 1
        }));
      const r = this.FINAL_CONFIG.chart.highlightArea;
      return [{ ...r, span: r.from === r.to ? 1 : r.to < r.from ? 0 : r.to - r.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((r, c) => ({
        ...r,
        series: this.largestTriangleThreeBucketsArray({
          data: r.series,
          threshold: this.FINAL_CONFIG.downsample.threshold
        }),
        id: `uniqueId_${c}`
      })) : this.dataset;
    },
    safeDataset() {
      return this.useSafeValues ? this.dataset.map((r, c) => {
        const h = this.largestTriangleThreeBucketsArray({
          data: r.series,
          threshold: this.FINAL_CONFIG.downsample.threshold
        }), f = `uniqueId_${c}`;
        return {
          ...r,
          slotAbsoluteIndex: c,
          series: h.map((l) => this.isSafeValue(l) ? l : null).slice(this.slicer.start, this.slicer.end),
          color: this.convertColorToHex(r.color ? r.color : this.customPalette[c] ? this.customPalette[c] : this.palette[c]),
          id: f,
          scaleLabel: r.scaleLabel || f
        };
      }) : this.dataset;
    },
    relativeDataset() {
      return this.safeDataset.map((r, c) => ({
        ...r,
        series: r.series.map((h) => h + this.relativeZero),
        absoluteValues: r.series
      })).filter((r) => !this.segregatedSeries.includes(r.id));
    },
    tableSparklineDataset() {
      return this.relativeDataset.map((r) => {
        const c = r.absoluteValues.map((h) => [void 0, null].includes(h) ? 0 : h);
        return {
          id: r.id,
          name: r.name,
          color: r.color,
          values: this.fillArray(this.maxSeries, c)
        };
      });
    },
    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: this.timeLabels.map((r) => r.text),
        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((r, c) => ({
        absoluteIndex: c,
        ...r,
        series: r.series.map((h) => h + this.relativeZero),
        absoluteValues: r.series,
        segregate: () => this.segregate(r),
        isSegregated: this.segregatedSeries.includes(r.id)
      }));
    },
    activeSeriesLength() {
      return this.absoluteDataset.length;
    },
    activeSeriesWithStackRatios() {
      return this.assignStackRatios(this.absoluteDataset.filter((r) => !this.segregatedSeries.includes(r.id)));
    },
    scaleGroups() {
      const r = Object.groupBy(this.activeSeriesWithStackRatios, (h) => h.scaleLabel), c = {};
      for (const [h, f] of Object.entries(r)) {
        const l = f.flatMap((e) => e.absoluteValues);
        c[h] = {
          min: Math.min(...l) || 0,
          max: Math.max(...l) || 1,
          groupId: `scale_group_${this.createUid()}`
        };
      }
      return c;
    },
    barSet() {
      const r = this.activeSeriesWithStackRatios.filter((i) => ["bar", "line", "plot"].includes(i.type)), c = r.length, h = this.FINAL_CONFIG.chart.grid.labels.yAxis.gap, f = this.mutableConfig.isStacked, l = f ? h * (c - 1) : 0, e = this.drawingArea.height - l;
      return r.filter((i) => i.type === "bar").map((i, y) => {
        this.checkAutoScaleError(i);
        const z = this.scaleGroups[i.scaleLabel].min, O = this.scaleGroups[i.scaleLabel].max;
        i.absoluteValues.filter((C) => ![null, void 0].includes(C)).map((C) => (C - z) / (O - z));
        const N = {
          valueMin: z,
          valueMax: O < 0 ? 0 : O
        }, F = {
          max: i.scaleMax || Math.max(...i.absoluteValues) || 1,
          min: i.scaleMin || Math.min(...i.absoluteValues.filter((C) => ![void 0, null].includes(C))) > 0 ? 0 : Math.min(...i.absoluteValues.filter((C) => ![null, void 0].includes(C)))
        }, v = i.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, m = 1.0000001, L = this.FINAL_CONFIG.chart.grid.labels.yAxis.useNiceScale ? this.calculateNiceScale(F.min, F.max === F.min ? F.max * m : F.max, v) : this.calculateNiceScaleWithExactExtremes(F.min, F.max === F.min ? F.max * m : F.max, v), b = this.FINAL_CONFIG.chart.grid.labels.yAxis.useNiceScale ? this.calculateNiceScale(N.valueMin, N.valueMax === N.valueMin ? N.valueMax * m : N.valueMax, v) : this.calculateNiceScaleWithExactExtremes(N.valueMin, N.valueMax === N.valueMin ? N.valueMax * m : N.valueMax, v), M = L.min >= 0 ? 0 : Math.abs(L.min), H = 0, t = L.max + M, o = b.max + Math.abs(H), n = i.stackIndex, g = c - 1 - n, p = f ? 1 - i.cumulatedStackRatio : 0, S = f ? e * p + h * g : 0, k = f ? e * i.stackRatio : this.drawingArea.height, T = this.drawingArea.bottom - S - k * M / t, Y = this.drawingArea.bottom - S - k * H / o, W = this.absoluteDataset.filter((C) => C.type === "bar").filter((C) => !this.segregatedSeries.includes(C.id)).length, te = i.series.map((C, R) => {
          const K = this.mutableConfig.useIndividualScale ? (i.absoluteValues[R] + M) / t : this.ratioToMax(C), Q = this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.drawingArea.left + this.drawingArea.width / this.maxSeries * R : this.drawingArea.left + this.slot.bar * y + this.slot.bar * R * W - this.barSlot / 2 - y * this.barPeriodGap;
          return {
            yOffset: this.checkNaN(S),
            individualHeight: this.checkNaN(k),
            x: this.checkNaN(Q),
            y: this.drawingArea.bottom - S - k * K,
            value: i.absoluteValues[R],
            zeroPosition: this.checkNaN(T),
            individualMax: this.checkNaN(t),
            comment: i.comments && i.comments.slice(this.slicer.start, this.slicer.end)[R] || ""
          };
        }), E = i.absoluteValues.map((C) => b.min >= 0 ? (C - Math.abs(b.min)) / (b.max - Math.abs(b.min)) : (C + Math.abs(b.min)) / (b.max + Math.abs(b.min))), J = i.series.map((C, R) => {
          const K = this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.drawingArea.left + this.drawingArea.width / this.maxSeries * R : this.drawingArea.left - this.slot.bar / 2 + this.slot.bar * y + this.slot.bar * R * this.absoluteDataset.filter((Q) => Q.type === "bar").filter((Q) => !this.segregatedSeries.includes(Q.id)).length;
          return {
            yOffset: this.checkNaN(S),
            individualHeight: this.checkNaN(k),
            x: this.checkNaN(K),
            y: this.checkNaN(this.drawingArea.bottom - this.checkNaN(S) - (this.checkNaN(k) * E[R] || 0)),
            value: i.absoluteValues[R],
            zeroPosition: this.checkNaN(T),
            individualMax: this.checkNaN(t),
            comment: i.comments && i.comments.slice(this.slicer.start, this.slicer.end)[R] || ""
          };
        }), w = L.ticks.map((C) => ({
          y: C >= 0 ? T - k * (C / t) : T + k * Math.abs(C) / t,
          value: C,
          prefix: i.prefix || this.FINAL_CONFIG.chart.labels.prefix,
          suffix: i.suffix || this.FINAL_CONFIG.chart.labels.suffix,
          datapoint: i
        })), P = b.ticks.map((C) => {
          const R = (C - b.min) / (b.max - b.min);
          return {
            y: C >= 0 ? Y - k * R : Y + k * R,
            value: C,
            prefix: i.prefix || this.FINAL_CONFIG.chart.labels.prefix,
            suffix: i.suffix || this.FINAL_CONFIG.chart.labels.suffix,
            datapoint: i
          };
        });
        return this.scaleGroups[i.scaleLabel].name = i.name, this.scaleGroups[i.scaleLabel].groupName = i.scaleLabel, this.scaleGroups[i.scaleLabel].groupColor = this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor || i.color, this.scaleGroups[i.scaleLabel].color = i.color, this.scaleGroups[i.scaleLabel].scaleYLabels = i.autoScaling ? P : w, this.scaleGroups[i.scaleLabel].zeroPosition = i.autoScaling ? Y : T, this.scaleGroups[i.scaleLabel].individualMax = i.autoScaling ? o : t, this.scaleGroups[i.scaleLabel].scaleLabel = i.scaleLabel, this.scaleGroups[i.scaleLabel].id = i.id, this.scaleGroups[i.scaleLabel].yOffset = S, this.scaleGroups[i.scaleLabel].individualHeight = k, this.scaleGroups[i.scaleLabel].autoScaleYLabels = P, this.scaleGroups[i.scaleLabel].unique = this.activeSeriesWithStackRatios.filter((C) => C.scaleLabel === i.scaleLabel).length === 1, {
          ...i,
          yOffset: S,
          autoScaleYLabels: P,
          individualHeight: k,
          scaleYLabels: i.autoScaling ? P : w,
          individualScale: i.autoScaling ? b : L,
          individualMax: i.autoScaling ? o : t,
          zeroPosition: i.autoScaling ? Y : T,
          plots: i.autoScaling ? J : te,
          groupId: this.scaleGroups[i.scaleLabel].groupId
        };
      });
    },
    lineSet() {
      const r = this.activeSeriesWithStackRatios.filter((i) => ["bar", "line", "plot"].includes(i.type)), c = r.length, h = this.FINAL_CONFIG.chart.grid.labels.yAxis.gap, f = this.mutableConfig.isStacked, l = f ? h * (c - 1) : 0, e = this.drawingArea.height - l;
      return r.filter((i) => i.type === "line").map((i, y) => {
        this.checkAutoScaleError(i);
        const z = this.scaleGroups[i.scaleLabel].min, O = this.scaleGroups[i.scaleLabel].max;
        i.absoluteValues.filter((A) => ![null, void 0].includes(A)).map((A) => (A - z) / (O - z));
        const N = {
          valueMin: z,
          valueMax: O
        }, F = {
          max: i.scaleMax || Math.max(...i.absoluteValues) || 1,
          min: i.scaleMin || (Math.min(...i.absoluteValues) > 0 ? 0 : Math.min(...i.absoluteValues))
        }, v = i.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, m = 1.0000001, L = this.FINAL_CONFIG.chart.grid.labels.yAxis.useNiceScale ? this.calculateNiceScale(F.min, F.max === F.min ? F.max * m : F.max, v) : this.calculateNiceScaleWithExactExtremes(F.min, F.max === F.min ? F.max * m : F.max, v), b = this.FINAL_CONFIG.chart.grid.labels.yAxis.useNiceScale ? this.calculateNiceScale(N.valueMin, N.valueMax === N.valueMin ? N.valueMax * m : N.valueMax, v) : this.calculateNiceScaleWithExactExtremes(N.valueMin, N.valueMax === N.valueMin ? N.valueMax * m : N.valueMax, v), M = L.min >= 0 ? 0 : Math.abs(L.min), H = 0, t = L.max + Math.abs(M), o = b.max + Math.abs(H), n = i.stackIndex, g = c - 1 - n, p = f ? 1 - i.cumulatedStackRatio : 0, S = f ? e * p + h * g : 0, k = f ? e * i.stackRatio : this.drawingArea.height, T = this.drawingArea.bottom - S - k * M / t, Y = this.drawingArea.bottom - S - k * H / o, W = i.series.map((A, D) => {
          const he = this.mutableConfig.useIndividualScale ? (i.absoluteValues[D] + Math.abs(M)) / t : this.ratioToMax(A);
          return {
            x: this.checkNaN(this.drawingArea.left + this.slot.line / 2 + this.slot.line * D),
            y: this.checkNaN(this.drawingArea.bottom - S - k * he),
            value: i.absoluteValues[D],
            comment: i.comments && i.comments.slice(this.slicer.start, this.slicer.end)[D] || ""
          };
        }), te = i.absoluteValues.map((A) => b.min >= 0 ? (A - Math.abs(b.min)) / (b.max - Math.abs(b.min)) : (A + Math.abs(b.min)) / (b.max + Math.abs(b.min))), E = i.series.map((A, D) => [void 0, null].includes(i.absoluteValues[D]) ? {
          x: this.checkNaN(this.drawingArea.left + this.slot.line / 2 + this.slot.line * D),
          y: T,
          value: i.absoluteValues[D],
          comment: i.comments && i.comments.slice(this.slicer.start, this.slicer.end)[D] || ""
        } : {
          x: this.checkNaN(this.drawingArea.left + this.slot.line / 2 + this.slot.line * D),
          y: this.checkNaN(this.drawingArea.bottom - S - (k * te[D] || 0)),
          value: i.absoluteValues[D],
          comment: i.comments && i.comments.slice(this.slicer.start, this.slicer.end)[D] || ""
        }), J = this.FINAL_CONFIG.line.cutNullValues ? this.createSmoothPathWithCuts(W) : this.createSmoothPath(W.filter((A) => A.value !== null)), w = this.FINAL_CONFIG.line.cutNullValues ? this.createSmoothPathWithCuts(E) : this.createSmoothPath(E.filter((A) => A.value !== null)), P = this.FINAL_CONFIG.line.cutNullValues ? this.createStraightPathWithCuts(W) : this.createStraightPath(W.filter((A) => A.value !== null)), C = this.FINAL_CONFIG.line.cutNullValues ? this.createStraightPathWithCuts(E) : this.createStraightPath(E.filter((A) => A.value !== null)), R = L.ticks.map((A) => ({
          y: A >= 0 ? T - k * (A / t) : T + k * Math.abs(A) / t,
          value: A,
          prefix: i.prefix || this.FINAL_CONFIG.chart.labels.prefix,
          suffix: i.suffix || this.FINAL_CONFIG.chart.labels.suffix,
          datapoint: i
        })), K = b.ticks.map((A) => {
          const D = (A - b.min) / (b.max - b.min);
          return {
            y: A >= 0 ? Y - k * D : Y + k * D,
            value: A,
            prefix: i.prefix || this.FINAL_CONFIG.chart.labels.prefix,
            suffix: i.suffix || this.FINAL_CONFIG.chart.labels.suffix,
            datapoint: i
          };
        });
        this.scaleGroups[i.scaleLabel].name = i.name, this.scaleGroups[i.scaleLabel].groupName = i.scaleLabel, this.scaleGroups[i.scaleLabel].groupColor = this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor || i.color, this.scaleGroups[i.scaleLabel].color = i.color, this.scaleGroups[i.scaleLabel].scaleYLabels = i.autoScaling ? K : R, this.scaleGroups[i.scaleLabel].zeroPosition = i.autoScaling ? Y : T, this.scaleGroups[i.scaleLabel].individualMax = i.autoScaling ? o : t, this.scaleGroups[i.scaleLabel].scaleLabel = i.scaleLabel, this.scaleGroups[i.scaleLabel].id = i.id, this.scaleGroups[i.scaleLabel].yOffset = S, this.scaleGroups[i.scaleLabel].individualHeight = k, this.scaleGroups[i.scaleLabel].autoScaleYLabels = K, this.scaleGroups[i.scaleLabel].unique = this.activeSeriesWithStackRatios.filter((A) => A.scaleLabel === i.scaleLabel).length === 1;
        const Q = this.mutableConfig.useIndividualScale ? i.autoScaling ? Y : T : this.zero, re = Math.max(Math.max(i.autoScaling ? Y : R.at(-1).y || 0, this.drawingArea.top), Q);
        return {
          ...i,
          yOffset: S,
          autoScaleYLabels: K,
          individualHeight: k,
          scaleYLabels: i.autoScaling ? K : R,
          individualScale: i.autoScaling ? b : L,
          individualMax: i.autoScaling ? o : t,
          zeroPosition: i.autoScaling ? Y : T,
          curve: i.autoScaling ? w : J,
          plots: i.autoScaling ? E : W,
          area: i.useArea ? this.mutableConfig.useIndividualScale ? this.FINAL_CONFIG.line.cutNullValues ? this.createIndividualAreaWithCuts(
            i.autoScaling ? E : W,
            re
          ) : this.createIndividualArea(
            i.autoScaling ? E.filter((A) => A.value !== null) : W.filter((A) => A.value !== null),
            re
          ) : this.createIndividualArea(W.filter((A) => A.value !== null), re) : "",
          curveAreas: i.useArea ? ce(
            i.autoScaling ? this.FINAL_CONFIG.line.cutNullValues ? E : E.filter((A) => A.value !== null) : this.FINAL_CONFIG.line.cutNullValues ? W : W.filter((A) => A.value !== null),
            re,
            this.FINAL_CONFIG.line.cutNullValues
          ) : [],
          straight: i.autoScaling ? C : P,
          groupId: this.scaleGroups[i.scaleLabel].groupId
        };
      });
    },
    plotSet() {
      const r = this.activeSeriesWithStackRatios.filter((i) => ["bar", "line", "plot"].includes(i.type)), c = r.length, h = this.FINAL_CONFIG.chart.grid.labels.yAxis.gap, f = this.mutableConfig.isStacked, l = f ? h * (c - 1) : 0, e = this.drawingArea.height - l;
      return r.filter((i) => i.type === "plot").map((i) => {
        this.checkAutoScaleError(i);
        const y = this.scaleGroups[i.scaleLabel].min, z = this.scaleGroups[i.scaleLabel].max;
        i.absoluteValues.filter((w) => ![null, void 0].includes(w)).map((w) => (w - y) / (z - y));
        const O = {
          valueMin: y,
          valueMax: z
        }, N = {
          max: i.scaleMax || Math.max(...i.absoluteValues) || 1,
          min: i.scaleMin || Math.min(...i.absoluteValues) > 0 ? 0 : Math.min(...i.absoluteValues)
        }, F = i.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, v = 1.0000001, m = this.calculateNiceScaleWithExactExtremes(N.min, N.max === N.min ? N.max * v : N.max, F), L = this.calculateNiceScaleWithExactExtremes(O.valueMin, O.valueMax === O.valueMin ? O.valueMax * v : O.valueMax, F), b = m.min >= 0 ? 0 : Math.abs(m.min), M = 0, H = m.max + b, t = L.max + Math.abs(M), o = i.stackIndex, n = c - 1 - o, g = f ? 1 - i.cumulatedStackRatio : 0, p = f ? e * g + h * n : 0, S = f ? e * i.stackRatio : this.drawingArea.height, k = this.drawingArea.bottom - p - S * b / H, T = this.drawingArea.bottom - p - S * M / t, Y = i.series.map((w, P) => {
          const C = this.mutableConfig.useIndividualScale ? (i.absoluteValues[P] + Math.abs(b)) / H : this.ratioToMax(w);
          return {
            x: this.checkNaN(this.drawingArea.left + this.slot.plot / 2 + this.slot.plot * P),
            y: this.checkNaN(this.drawingArea.bottom - p - S * C),
            value: i.absoluteValues[P],
            comment: i.comments && i.comments.slice(this.slicer.start, this.slicer.end)[P] || ""
          };
        }), W = i.absoluteValues.map((w) => L.min >= 0 ? (w - Math.abs(L.min)) / (L.max - Math.abs(L.min)) : (w + Math.abs(L.min)) / (L.max + Math.abs(L.min))), te = i.series.map((w, P) => ({
          x: this.checkNaN(this.drawingArea.left + this.slot.plot / 2 + this.slot.plot * P),
          y: this.checkNaN(this.drawingArea.bottom - p - (S * W[P] || 0)),
          value: i.absoluteValues[P],
          comment: i.comments && i.comments.slice(this.slicer.start, this.slicer.end)[P] || ""
        })), E = m.ticks.map((w) => ({
          y: w >= 0 ? k - S * (w / H) : k + S * Math.abs(w) / H,
          value: w,
          prefix: i.prefix || this.FINAL_CONFIG.chart.labels.prefix,
          suffix: i.suffix || this.FINAL_CONFIG.chart.labels.suffix,
          datapoint: i
        })), J = L.ticks.map((w) => {
          const P = (w - L.min) / (L.max - L.min);
          return {
            y: w >= 0 ? T - S * P : T + S * P,
            value: w,
            prefix: i.prefix || this.FINAL_CONFIG.chart.labels.prefix,
            suffix: i.suffix || this.FINAL_CONFIG.chart.labels.suffix,
            datapoint: i
          };
        });
        return this.scaleGroups[i.scaleLabel].name = i.name, this.scaleGroups[i.scaleLabel].groupName = i.scaleLabel, this.scaleGroups[i.scaleLabel].groupColor = this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor || i.color, this.scaleGroups[i.scaleLabel].color = i.color, this.scaleGroups[i.scaleLabel].scaleYLabels = i.autoScaling ? J : E, this.scaleGroups[i.scaleLabel].zeroPosition = i.autoScaling ? T : k, this.scaleGroups[i.scaleLabel].individualMax = i.autoScaling ? t : H, this.scaleGroups[i.scaleLabel].scaleLabel = i.scaleLabel, this.scaleGroups[i.scaleLabel].id = i.id, this.scaleGroups[i.scaleLabel].yOffset = p, this.scaleGroups[i.scaleLabel].individualHeight = S, this.scaleGroups[i.scaleLabel].autoScaleYLabels = J, this.scaleGroups[i.scaleLabel].unique = this.activeSeriesWithStackRatios.filter((w) => w.scaleLabel === i.scaleLabel).length === 1, {
          ...i,
          yOffset: p,
          autoScaleYLabels: J,
          individualHeight: S,
          scaleYLabels: i.autoScaling ? J : E,
          individualScale: i.autoScaling ? L : m,
          individualMax: i.autoScaling ? t : H,
          zeroPosition: i.autoScaling ? T : k,
          plots: i.autoScaling ? te : Y,
          groupId: this.scaleGroups[i.scaleLabel].groupId
        };
      });
    },
    drawingArea() {
      function r(f) {
        const l = /* @__PURE__ */ new Set();
        return f.forEach((e) => {
          const i = e.scaleLabel || "__noScaleLabel__";
          l.add(i);
        }), l.size;
      }
      const c = r(this.absoluteDataset.filter((f) => !this.segregatedSeries.includes(f.id))), h = this.mutableConfig.useIndividualScale && this.FINAL_CONFIG.chart.grid.labels.show ? c * (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 + h,
        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 + h)
      };
    },
    max() {
      return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax ? this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax : Math.max(...this.safeDataset.filter((r) => !this.segregatedSeries.includes(r.id)).map((r) => Math.max(...r.series)));
    },
    min() {
      if (this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin !== null)
        return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin;
      const r = Math.min(...this.safeDataset.filter((c) => !this.segregatedSeries.includes(c.id)).map((c) => Math.min(...c.series)));
      return r > 0 ? 0 : r;
    },
    niceScale() {
      return this.FINAL_CONFIG.chart.grid.labels.yAxis.useNiceScale ? this.calculateNiceScale(this.min, this.max < 0 ? 0 : this.max, this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps) : 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 r = Math.max(...this.dataset.map((c) => this.largestTriangleThreeBucketsArray({ data: c.series, threshold: this.FINAL_CONFIG.downsample.threshold }).length));
      return $e({
        values: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values,
        maxDatapoints: r,
        formatter: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.datetimeFormatter,
        start: this.slicer.start,
        end: this.slicer.end
      });
    },
    slot() {
      return {
        bar: this.drawingArea.width / this.maxSeries / this.safeDataset.filter((r) => r.type === "bar").filter((r) => !this.segregatedSeries.includes(r.id)).length,
        plot: this.drawingArea.width / this.maxSeries,
        line: this.drawingArea.width / this.maxSeries
      };
    },
    barSlot() {
      const r = this.safeDataset.filter((c) => c.type === "bar").filter((c) => !this.segregatedSeries.includes(c.id)).length;
      return this.drawingArea.width / this.maxSeries / r - this.barPeriodGap * r;
    },
    barPeriodGap() {
      return this.slot.line * this.FINAL_CONFIG.bar.periodGap;
    },
    maxSlot() {
      return Math.max(...Object.values(this.slot).filter((r) => r !== 1 / 0));
    },
    table() {
      if (this.safeDataset.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
      const r = this.relativeDataset.map((h) => ({
        label: h.name,
        color: h.color,
        type: h.type
      })), c = [];
      return this.timeLabels.forEach((h, f) => {
        const l = [h.text];
        this.relativeDataset.forEach((e) => {
          l.push(this.canShowValue(e.absoluteValues[f]) ? Number(e.absoluteValues[f].toFixed(this.FINAL_CONFIG.table.rounding)) : "");
        }), c.push(l);
      }), { head: r, body: c };
    },
    dataTable() {
      const r = this.FINAL_CONFIG.table.showSum;
      let c = [""].concat(this.relativeDataset.map((e) => e.name));
      r && (c = c.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 h = [];
      for (let e = 0; e < this.maxSeries; e += 1) {
        const i = this.relativeDataset.map((y) => y.absoluteValues[e] ?? 0).reduce((y, z) => y + z, 0);
        h.push(
          [
            this.timeLabels[e].text ?? "-"
          ].concat(this.relativeDataset.map(
            (y) => this.applyDataLabel(
              y.type === "line" ? this.FINAL_CONFIG.line.labels.formatter : y.type === "bar" ? this.FINAL_CONFIG.bar.labels.formatter : this.FINAL_CONFIG.plot.labels.formatter,
              y.absoluteValues[e] ?? 0,
              this.dataLabel({
                p: y.prefix || this.FINAL_CONFIG.chart.labels.prefix,
                v: y.absoluteValues[e] ?? 0,
                s: y.suffix || this.FINAL_CONFIG.chart.labels.suffix,
                r: this.FINAL_CONFIG.table.rounding
              })
            )
          )).concat(r ? (i ?? 0).toFixed(this.FINAL_CONFIG.table.rounding) : [])
        );
      }
      const f = {
        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: c, body: h, config: f, 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((r) => ({
        slotAbsoluteIndex: r.slotAbsoluteIndex,
        shape: r.shape || null,
        name: r.name,
        color: r.color,
        type: r.type,
        value: r.absoluteValues.find((c, h) => h === this.selectedSerieIndex),
        comments: r.comments || [],
        prefix: r.prefix || this.FINAL_CONFIG.chart.labels.prefix,
        suffix: r.suffix || this.FINAL_CONFIG.chart.labels.suffix
      }));
    },
    tooltipContent() {
      let r = "", c = this.selectedSeries.map((l) => l.value).filter((l) => this.isSafeValue(l) && l !== null).reduce((l, e) => Math.abs(l) + Math.abs(e), 0);
      const h = this.timeLabels[this.selectedSerieIndex], f = this.FINAL_CONFIG.chart.tooltip.customFormat;
      return this.isFunction(f) && this.functionReturnsString(() => f({
        seriesIndex: this.selectedSerieIndex,
        datapoint: this.selectedSeries,
        series: this.absoluteDataset,
        bars: this.barSet,
        lines: this.lineSet,
        plots: this.plotSet,
        config: this.FINAL_CONFIG
      })) ? f({
        seriesIndex: this.selectedSerieIndex,
        datapoint: this.selectedSeries,
        series: this.absoluteDataset,
        bars: this.barSet,
        lines: this.lineSet,
        plots: this.plotSet,
        config: this.FINAL_CONFIG
      }) : (h && h.text && this.FINAL_CONFIG.chart.tooltip.showTimeLabel && (r += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${h.text}</div>`), this.selectedSeries.forEach((l) => {
        if (this.isSafeValue(l.value)) {
          let e = "", i = "";
          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) ? i = `<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${l.color}" />` : l.shape === "triangle" ? i = `<path d="${X({ 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" ? i = `<path d="${X({ 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" ? i = `<path d="${X({ 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" ? i = `<path d="${X({ 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" ? i = `<path d="${X({ 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" && (i = `<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${l.color}" points="${ie({ 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}" />${i}</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="${ie({ 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="${X({ 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="${X({ 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="${X({ 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="${X({ 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="${X({ 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;
              }
          }
          r += `<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 ? `(${oe({
            v: this.checkNaN(Math.abs(l.value) / c * 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] && (r += `<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}">${r}</div>`);
    },
    svg() {
      return {
        height: this.height,
        width: this.width
      };
    },
    yLabels() {
      return this.niceScale.ticks.map((r) => ({
        y: r >= 0 ? this.zero - this.drawingArea.height * this.ratioToMax(r) : this.zero + this.drawingArea.height * this.ratioToMax(Math.abs(r)),
        value: r,
        prefix: this.FINAL_CONFIG.chart.labels.prefix,
        suffix: this.FINAL_CONFIG.chart.labels.suffix
      }));
    },
    zero() {
      return isNaN(this.ratioToMax(this.relativeZero)) ? this.drawingArea.bottom : this.drawingArea.bottom - this.drawingArea.height * this.ratioToMax(this.relativeZero);
    },
    annotationsY() {
      const r = this.FINAL_CONFIG.chart.annotations;
      if (!r || !Array.isArray(r) || r.every((N) => !N.show)) return [];
      const c = r.filter(
        (N) => N.show && (N.yAxis.yTop != null || N.yAxis.yBottom != null)
      );
      if (!c.length) return [];
      const { left: h, right: f } = this.drawingArea, l = this.zero, e = this.drawingArea.height, i = this.niceScale.min, z = this.niceScale.max - i, O = (N) => {
        const F = (N - 0) / z;
        return l - F * e;
      };
      return c.map((N) => {
        const { yAxis: { yTop: F, yBottom: v, label: m } } = N, L = F != null && v != null && F !== v, b = F == null ? null : O(F), M = v == null ? null : O(v), H = this.getTextMeasurer(m.fontSize);
        H.font = `${m.fontSize}px sans-serif`;
        const t = H.measureText(m.text).width, o = m.fontSize, n = (m.position === "start" ? h + m.padding.left : f - m.padding.right) + m.offsetX, p = (b != null && M != null ? Math.min(b, M) : b ?? M) - m.fontSize / 3 + m.offsetY - m.padding.top;
        let S;
        m.textAnchor === "middle" ? S = n - t / 2 - m.padding.left : m.textAnchor === "end" ? S = n - t - m.padding.right : S = n - m.padding.left;
        const k = p - o * 0.75 - m.padding.top;
        return {
          show: ![b, M, k].includes(NaN),
          id: `annotation_y_${this.createUid()}`,
          hasArea: L,
          areaHeight: L ? Math.abs(b - M) : 0,
          yTop: b,
          yBottom: M,
          config: N.yAxis,
          x1: h,
          x2: f,
          _text: { x: n, y: p },
          _box: {
            x: S,
            y: k,
            width: t + m.padding.left + m.padding.right,
            height: o + m.padding.top + m.padding.bottom,
            fill: m.backgroundColor,
            stroke: m.border.stroke,
            rx: m.border.rx,
            ry: m.border.ry,
            strokeWidth: m.border.strokeWidth
          }
        };
      });
    }
  },
  mounted() {
    this.svgRef = this.$refs.svgRef, this.prepareChart(), this.setupSlicer(), document.addEventListener("mousemove", (r) => {
      this.clientPosition = {
        x: r.clientX,
        y: r.clientY
      };
    }), document.addEventListener("scroll", this.hideTags);
  },
  beforeUnmount() {
    document.removeEventListener("scroll", this.hideTags), this.resizeObserver && (this.resizeObserver.unobserve(this.observedEl), this.resizeObserver.disconnect());
  },
  methods: {
    abbreviate: Xe,
    adaptColorToBackground: qe,
    applyDataLabel: Ye,
    assignStackRatios: Ee,
    calcLinearProgression: We,
    calculateNiceScale: Be,
    calculateNiceScaleWithExactExtremes: De,
    checkNaN: He,
    closestDecimal: Re,
    convertColorToHex: Ve,
    convertConfigColors: Pe,
    convertCustomPalette: Te,
    createCsvContent: Me,
    createSmoothPath: ze,
    createStraightPath: pe,
    createTSpans: ve,
    createTSpansFromLineBreaksOnX: Ge,
    dataLabel: oe,
    downloadCsv: Oe,
    error: we,
    forceValidValue: ke,
    functionReturnsString: Se,
    hasDeepProperty: Ce,
    isFunction: Le,
    isSafeValue: ye,
    largestTriangleThreeBucketsArray: Ae,
    objectIsEmpty: _e,
    setOpacity: Fe,
    shiftHue: be,
    translateSize: me,
    treeShake: Ne,
    useMouse: je,
    useNestedProp: ae,
    createUid: ne,
    placeXYTag: xe,
    createSmoothPathWithCuts: Ie,
    createStraightPathWithCuts: fe,
    createAreaWithCuts: ge,
    createIndividualAreaWithCuts: de,
    createSmoothAreaSegments: ce,
    createIndividualArea: ue,
    usesSelectTimeLabelEvent() {
      return !!this.$.vnode.props?.onSelectTimeLabel;
    },
    getTextMeasurer(r, c, h) {
      if (!this._textMeasurer) {
        const f = document.createElement("canvas");
        this._textMeasurer = f.getContext("2d");
      }
      return this._textMeasurer.font = `${h || "normal"} ${r}px ${c || "sans-serif"}`, this._textMeasurer;
    },
    hideTags() {
      const r = document.querySelectorAll(".vue-ui-xy-tag");
      r.length && Array.from(r).forEach((c) => c.style.opacity = "0");
    },
    setTagRef(r, c, h, f, l) {
      h && (this.tagRefs[`${r}_${c}_${f}_${l}`] = h);
    },
    setUserOptionsVisibility(r = !1) {
      this.showUserOptionsOnChartHover && (this.userOptionsVisible = r);
    },
    toggleAnnotator() {
      this.isAnnotator = !this.isAnnotator;
    },
    selectTimeLabel(r, c) {
      const h = this.relativeDataset.map((f) => ({
        shape: f.shape || null,
        name: f.name,
        color: f.color,
        type: f.type,
        value: f.absoluteValues.find((l, e) => e === c),
        comments: f.comments || [],
        prefix: f.prefix || this.FINAL_CONFIG.chart.labels.prefix,
        suffix: f.suffix || this.FINAL_CONFIG.chart.labels.suffix
      }));
      this.$emit("selectTimeLabel", {
        datapoint: h,
        absoluteIndex: r.absoluteIndex,
        label: r.text
      });
    },
    getHighlightAreaPosition(r) {
      const c = this.drawingArea.left + this.drawingArea.width / this.maxSeries * (r.from - this.slicer.start), h = this.drawingArea.width / (this.slicer.end - this.slicer.start) * r.span < 0 ? 1e-5 : this.drawingArea.width / (this.slicer.end - this.slicer.start) * r.span;
      return {
        x: c < this.drawingArea.left ? this.drawingArea.left : c,
        width: h
      };
    },
    prepareConfig() {
      const r = Ue().vue_ui_xy;
      if (!Object.keys(this.config || {}).length)
        return r;
      const c = this.useNestedProp({
        userConfig: this.config,
        defaultConfig: r
      });
      return this.config && this.hasDeepProperty(this.config, "chart.highlightArea") && (Array.isArray(this.config.chart.highlightArea) ? c.chart.highlightArea = this.config.chart.highlightArea : c.chart.highlightArea = [this.config.chart.highlightArea]), this.config && this.hasDeepProperty(this.config, "chart.grid.labels.yAxis.scaleMin") ? c.chart.grid.labels.yAxis.scaleMin = this.config.chart.grid.labels.yAxis.scaleMin : c.chart.grid.labels.yAxis.scaleMin = null, this.config && this.hasDeepProperty(this.config, "chart.grid.labels.yAxis.scaleMax") ? c.chart.grid.labels.yAxis.scaleMax = this.config.chart.grid.labels.yAxis.scaleMax : c.chart.grid.labels.yAxis.scaleMax = null, this.config && this.hasDeepProperty(this.config, "chart.zoom.startIndex") ? c.chart.zoom.startIndex = this.config.chart.zoom.startIndex : c.chart.zoom.startIndex = null, this.config && this.hasDeepProperty(this.config, "chart.zoom.endIndex") ? c.chart.zoom.endIndex = this.config.chart.zoom.endIndex : c.chart.zoom.endIndex = null, this.config && this.hasDeepProperty(this.config, "chart.grid.labels.yAxis.groupColor") ? c.chart.grid.labels.yAxis.groupColor = this.config.chart.grid.labels.yAxis.groupColor : c.chart.grid.labels.yAxis.groupColor = null, this.config && this.config.chart.annotations && Array.isArray(this.config.chart.annotations) && this.config.chart.annotations.length ? c.chart.annotations = this.config.chart.annotations.map((h) => ae({
        defaultConfig: r.chart.annotations[0],
        userConfig: h
      })) : c.chart.annotations = [], c.theme ? {
        ...ae({
          userConfig: this.themes.vue_ui_xy[c.theme] || this.config,
          defaultConfig: c
        }),
        customPalette: this.themePalettes[c.theme] || this.palette
      } : c;
    },
    prepareChart() {
      if (this.objectIsEmpty(this.dataset) ? this.error({
        componentName: "VueUiXy",
        type: "dataset"
      }) : this.dataset.forEach((r, c) => {
        [null, void 0].includes(r.name) && this.error({
          componentName: "VueUiXy",
          type: "datasetSerieAttribute",
          property: "name (string)",
          index: c
        });
      }), this.FINAL_CONFIG.showWarnings && this.dataset.forEach((r) => {
        r.series.forEach((c, h) => {
          this.isSafeValue(c) || console.warn(`VueUiXy has detected an unsafe value in your dataset:
-----> The serie '${r.name}' contains the value '${c}' at index ${h}.
'${c}' 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 c = this.$refs.chart.parentNode;
        this.resizeObserver && (this.resizeObserver.unobserve(this.observedEl), this.resizeObserver.disconnect());
        const { height: h, width: f } = c.getBoundingClientRect();
        let l = null, e = 0;
        this.FINAL_CONFIG.chart.title.show && this.$refs.chartTitle && (l = this.$refs.chartTitle, e = l.getBoundingClientRect().height);
        let i = null, y = 0;
        this.FINAL_CONFIG.chart.zoom.show && this.maxX > 6 && this.isDataset && this.$refs.chartSlicer && this.$refs.chartSlicer.$el && (i = this.$refs.chartSlicer.$el, y = i.getBoundingClientRect().height);
        let z = null, O = 0;
        this.FINAL_CONFIG.chart.legend.show && this.$refs.chartLegend && (z = this.$refs.chartLegend, O = z.getBoundingClientRect().height);
        let N = 0;
        this.$refs.source && (N = this.$refs.source.getBoundingClientRect().height);
        let F = 0;
        this.$refs.noTitle && (F = this.$refs.noTitle.getBoundingClientRect().height), this.height = h - e - O - y - N - F - 12, this.width = f, this.viewBox = `0 0 ${this.width < 0 ? 10 : this.width} ${this.height < 0 ? 10 : this.height}`, this.convertSizes();
        const v = new ResizeObserver((m) => {
          for (const L of m)
            this.FINAL_CONFIG.chart.title.show && this.$refs.chartTitle ? e = this.$refs.chartTitle.getBoundingClientRect().height : e = 0, this.$refs.chartSlicer && this.$refs.chartSlicer.$el ? y = this.$refs.chartSlicer.$el.getBoundingClientRect().height : y = 0, this.$refs.chartLegend ? O = this.$refs.chartLegend.getBoundingClientRect().height : O = 0, this.$refs.source ? N = this.$refs.source.getBoundingClientRect().height : N = 0, this.$refs.noTitle ? F = this.$refs.noTitle.getBoundingClientRect().height : F = 0, requestAnimationFrame(() => {
              this.height = L.contentRect.height - e - O - y - N - F - 12, this.width = L.contentBoxSize[0].inlineSize, this.viewBox = `0 0 ${this.width < 0 ? 10 : this.width} ${this.height < 0 ? 10 : this.height}`, this.convertSizes();
            });
        });
        this.resizeObserver = v, this.observedEl = c, v.observe(c);
      } 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(r) {
      this.selectedMinimapIndex = r;
    },
    convertSizes() {
      if (!this.FINAL_CONFIG.responsiveProportionalSizing) {
        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;
        return;
      }
      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(r) {
      r.autoScaling && (this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale || console.warn(`VueUiXy (datapoint: ${r.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: ${r.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`));
    },
    createArea(r, c) {
      if (!r[0]) return [-10, -10, "", -10, -10];
      const h = { x: r[0].x, y: c }, f = { x: r.at(-1).x, y: c }, l = [];
      return r.forEach((e) => {
        l.push(`${e.x},${e.y} `);
      }), [h.x, h.y, ...l, f.x, f.y].toString();
    },
    createStar: ie,
    createPolygonPath: X,
    fillArray(r, c) {
      let h = Array(r).fill(0);
      for (let f = 0; f < c.length && f < r; f += 1)
        h[f] = c[f];
      return h;
    },
    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((r) => this.largestTriangleThreeBucketsArray({ data: r.series, threshold: this.FINAL_CONFIG.downsample.threshold }).length))
      }, this.slicerStep += 1);
    },
    refreshSlicer() {
      this.setupSlicer();
    },
    validSlicerEnd(r) {
      const c = Math.max(...this.dataset.map((h) => this.largestTriangleThreeBucketsArray({ data: h.series, threshold: this.FINAL_CONFIG.downsample.threshold }).length));
      return r > c ? c : r < 0 || this.FINAL_CONFIG.chart.zoom.startIndex !== null && r < this.FINAL_CONFIG.chart.zoom.startIndex ? this.FINAL_CONFIG.chart.zoom.startIndex !== null ? this.FINAL_CONFIG.chart.zoom.startIndex + 1 : 1 : r;
    },
    calcRectHeight(r) {
      const c = ![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 r.value >= 0 ? this.checkNaN(c - r.y <= 0 ? 1e-5 : c - r.y) : this.checkNaN(r.y - this.zero <= 0 ? 1e-5 : r.y - this.zero);
    },
    calcIndividualHeight(r) {
      return r.value >= 0 ? this.checkNaN(r.zeroPosition - r.y <= 0 ? 1e-5 : r.zeroPosition - r.y) : this.checkNaN(r.y - r.zeroPosition <= 0 ? 1e-5 : r.zeroPosition - r.y);
    },
    calcRectWidth() {
      return this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.slot.line - this.drawingArea.width / this.maxSeries * 0.1 : this.slot.bar;
    },
    calcRectX(r) {
      return this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? r.x + this.drawingArea.width / this.maxSeries * 0.05 : r.x + this.slot.bar / 2;
    },
    calcRectY(r) {
      return r.value >= 0 ? r.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(this.zero) ? this.drawingArea.bottom : this.zero;
    },
    calcIndividualRectY(r) {
      return r.value >= 0 ? r.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(r.zeroPosition) ? 0 : r.zeroPosition;
    },
    canShowValue(r) {
      return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(r);
    },
    findClosestValue(r, c) {
      let h = c[0], f = Math.abs(r - c[0]);
      for (let l = 1; l < c.length; l += 1) {
        const e = Math.abs(r - c[l]);
        e < f && c[l] < r && (h = c[l], f = e);
      }
      return h;
    },
    ratioToMax(r) {
      return r / (this.canShowValue(this.absoluteMax) ? this.absoluteMax : 1);
    },
    selectX(r) {
      this.$emit(
        "selectX",
        {
          dataset: this.relativeDataset.map((c) => ({
            name: c.name,
            value: [null, void 0, NaN].includes(c.absoluteValues[r]) ? null : c.absoluteValues[r],
            color: c.color,
            type: c.type
          })),
          index: r,
          indexLabel: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[r]
        }
      );
    },
    getData() {
      return this.absoluteDataset.map((r) => ({
        values: r.absoluteValues,
        color: r.color,
        name: r.name,
        type: r.type
      }));
    },
    async getImage({ scale: r = 2 } = {}) {
      if (!this.$refs.chart) return;
      const { width: c, height: h } = this.$refs.chart.getBoundingClientRect(), f = c / h, { imageUri: l, base64: e } = await nt({ domElement: this.$refs.chart, base64: !0, img: !0, scale: r });
      return {
        imageUri: l,
        base64: e,
        title: this.FINAL_CONFIG.chart.title.text,
        width: c,
        height: h,
        aspectRatio: f
      };
    },
    segregate(r) {
      if (this.segregatedSeries.includes(r.id))
        this.segregatedSeries = this.segregatedSeries.filter((c) => c !== r.id);
      else {
        if (this.segregatedSeries.length + 1 === this.safeDataset.length) return;
        this.segregatedSeries.push(r.id);
      }
      this.$emit("selectLegend", this.relativeDataset.map((c) => ({
        name: c.name,
        values: c.absoluteValues,
        color: c.color,
        type: c.type
      }))), this.segregateStep += 1;
    },
    toggleTooltipVisibility(r, c = null) {
      this.isTooltip = r, r ? this.selectedSerieIndex = c : this.selectedSerieIndex = null;
    },
    toggleFullscreen(r) {
      this.isFullscreen = r, this.step += 1;
    },
    showSpinnerPdf() {
      this.isPrinting = !0;
    },
    async generatePdf() {
      this.showSpinnerPdf(), clearTimeout(this.__to__), this.isPrinting = !0, this.__to__ = setTimeout(async () => {
        try {
          const { default: r } = await import("./pdf-BcZrdj8V.js");
          await r({
            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 (r) {
          console.error("Error generating PDF:", r);
        } finally {
          this.isPrinting = !1;
        }
      }, 100);
    },
    generateCsv(r = null) {
      const c = [[this.FINAL_CONFIG.chart.title.text], [this.FINAL_CONFIG.chart.title.subtitle.text], [""]], h = ["", ...this.table.head.map((i) => i.label)], f = this.table.body, l = c.concat([h]).concat(f), e = this.createCsvContent(l);
      r ? r(e) : this.downloadCsv({ csvContent: e, 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: r } = await import("./img-D-vWHxhM.js");
          await r({
            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 (r) {
          console.error("Error generating image:", r);
        } finally {
          this.isImaging = !1;
        }
      }, 100);
    }
  }
}, ut = ["id"], dt = {
  key: 1,
  ref: "noTitle",
  class: "vue-data-ui-no-title-space",
  style: "height:36px; width: 100%; background:transparent"
}, gt = ["viewBox", "aria-label"], ft = ["x", "y", "width", "height"], It = { key: 1 }, xt = { class: "vue-ui-xy-grid" }, Nt = ["stroke", "x1", "x2", "y1", "y2"], mt = ["stroke", "x1", "x2", "y1", "y2"], bt = { key: 1 }, Ft = ["x1", "x2", "y1", "y2", "stroke"], _t = ["x1", "x2", "y1", "y2", "stroke"], At = ["x1", "x2", "y1", "y2", "stroke"], yt = { key: 3 }, Lt = ["x1", "x2", "y1", "y2", "stroke"], Ct = { key: 4 }, St = ["y1", "y2", "x1", "x2", "stroke"], kt = ["id"], wt = ["stop-color"], Ot = ["stop-color"], Gt = ["stop-color"], vt = ["id"], pt = ["stop-color"], zt = ["stop-color"], Mt = ["stop-color"], Tt = ["id"], Pt = ["stop-color"], Vt = ["stop-color"], Rt = ["id"], Ht = ["stop-color"], Dt = ["stop-color"], Bt = ["id"], Wt = ["stop-color"], Et = ["stop-color"], Yt = ["x", "y", "height", "width", "fill"], qt = ["x", "y", "width"], Xt = ["x", "y", "height", "width", "fill"], Ut = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Zt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Jt = ["width", "x", "y"], Kt = { key: 0 }, Qt = ["id"], jt = ["fill"], $t = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], el = ["x", "y", "font-size", "fill"], tl = ["stroke", "x1", "x2", "y1", "y2"], ll = { key: 2 }, rl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], il = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], al = { key: 4 }, sl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], nl = ["fill", "font-size", "transform"], cl = ["x1", "x2", "y1", "y2", "stroke"], ol = ["x", "y", "font-size", "fill"], hl = ["x1", "x2", "y1", "y2", "stroke"], ul = ["x", "y", "font-size", "fill"], dl = ["width", "x", "y"], gl = { style: { width: "100%" } }, fl = { key: 0 }, Il = ["id"], xl = ["fill"], Nl = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], ml = ["x", "y", "font-size", "fill"], bl = ["d", "stroke", "stroke-width", "stroke-dasharray"], Fl = ["d", "stroke", "stroke-width", "stroke-dasharray"], _l = { key: 5 }, Al = { key: 0 }, yl = ["d", "fill"], Ll = ["d", "fill"], Cl = ["d", "fill"], Sl = ["d", "fill"], kl = ["d", "stroke", "stroke-width", "stroke-dasharray"], wl = ["d", "stroke", "stroke-width", "stroke-dasharray"], Ol = ["width", "x", "y"], Gl = { style: { width: "100%" } }, vl = { key: 3 }, pl = ["id"], zl = ["fill"], Ml = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Tl = ["x", "y", "font-size", "fill"], Pl = { key: 6 }, Vl = ["x", "y", "font-size", "fill"], Rl = ["x", "y", "font-size", "fill", "font-weight"], Hl = { key: 7 }, Dl = ["x", "y", "font-size", "fill"], Bl = { key: 8 }, Wl = ["x", "y"], El = ["innerHTML"], Yl = ["x", "y"], ql = ["innerHTML"], Xl = ["x1", "x2", "y1", "y2", "stroke"], Ul = { key: 9 }, Zl = ["x", "y", "font-size", "fill"], Jl = { key: 10 }, Kl = ["x", "y"], Ql = ["innerHTML"], jl = ["x", "y"], $l = ["innerHTML"], er = ["x1", "x2", "y1", "y2", "stroke"], tr = ["x", "y", "font-size", "fill", "innerHTML"], lr = ["x", "y", "font-size", "fill", "innerHTML"], rr = ["x", "y", "font-size", "fill", "innerHTML"], ir = ["x", "y", "font-size", "fill", "innerHTML"], ar = ["id"], sr = ["stop-color"], nr = ["stop-color"], cr = ["x", "y", "width", "height", "fill", "onMouseenter"], or = ["font-size", "fill", "transform"], hr = ["x", "y", "font-size", "fill"], ur = { key: 12 }, dr = ["text-anchor", "font-size", "fill", "transform", "onClick"], gr = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], fr = { key: 13 }, Ir = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], xr = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], Nr = ["y", "x", "width", "height", "fill"], mr = ["id", "x", "y", "font-size", "fill", "text-anchor"], br = ["x", "y", "height", "width", "onMouseenter", "onClick"], Fr = {
  key: 14,
  style: { "pointer-events": "none" }
}, _r = ["x", "y"], Ar = ["cx", "cy", "r", "fill"], yr = {
  key: 5,
  class: "vue-data-ui-watermark"
}, Lr = {
  class: "vue-ui-xy-tag-arrow",
  height: "20",
  viewBox: "0 0 10 20",
  style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
}, Cr = ["fill"], Sr = ["innerHTML"], kr = {
  class: "vue-ui-xy-tag-arrow",
  height: "100%",
  viewBox: "0 0 10 20",
  style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
}, wr = ["fill"], Or = ["innerHTML"], Gr = {
  class: "vue-ui-xy-tag-arrow",
  height: "20",
  viewBox: "0 0 10 20",
  style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
}, vr = ["fill"], pr = ["innerHTML"], zr = {
  class: "vue-ui-xy-tag-arrow",
  height: "100%",
  viewBox: "0 0 10 20",
  style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
}, Mr = ["fill"], Tr = ["innerHTML"], Pr = ["onClick"], Vr = {
  key: 0,
  viewBox: "0 0 20 12",
  height: "14",
  width: "20"
}, Rr = ["stroke", "fill"], Hr = {
  key: 1,
  viewBox: "0 0 40 40",
  height: "14",
  width: "14"
}, Dr = ["fill"], Br = ["fill"], Wr = {
  key: 2,
  viewBox: "0 0 12 12",
  height: "14",
  width: "14"
}, Er = {
  key: 9,
  ref: "chartLegend"
}, Yr = {
  key: 10,
  ref: "source",
  dir: "auto"
}, qr = {
  style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
  "data-dom-to-png-ignore": ""
}, Xr = ["innerHTML"];
function Ur(r, c, h, f, l, e) {
  const i = q("PenAndPaper"), y = q("Title"), z = q("UserOptions"), O = q("PackageVersion"), N = q("Shape"), F = q("Skeleton"), v = q("Slicer"), m = q("Tooltip"), L = q("BaseIcon"), b = q("TableSparkline"), M = q("DataTable"), H = q("Accordion");
  return a(), s("div", {
    id: `vue-ui-xy_${l.uniqueId}`,
    class: j(`vue-ui-xy ${l.isFullscreen ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.FINAL_CONFIG.useCssAnimation ? "" : "vue-ui-dna"}`),
    ref: "chart",
    style: _(`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: c[7] || (c[7] = () => e.setUserOptionsVisibility(!0)),
    onMouseleave: c[8] || (c[8] = () => e.setUserOptionsVisibility(!1))
  }, [
    e.FINAL_CONFIG.chart.userOptions.buttons.annotator && l.svgRef ? (a(), U(i, {
      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"])) : u("", !0),
    e.hasOptionsNoTitle ? (a(), s("div", dt, null, 512)) : u("", !0),
    e.FINAL_CONFIG.chart.title.show ? (a(), s("div", {
      key: 2,
      ref: "chartTitle",
      class: "vue-ui-xy-title",
      style: _(`font-family:${e.FINAL_CONFIG.chart.fontFamily}`)
    }, [
      (a(), U(y, {
        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)) : u("", !0),
    e.FINAL_CONFIG.chart.userOptions.show && e.isDataset && (l.keepUserOptionState || l.userOptionsVisible) ? (a(), U(z, {
      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: h.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: r.$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,
      callbacks: e.FINAL_CONFIG.chart.userOptions.callbacks,
      printScale: e.FINAL_CONFIG.chart.userOptions.print.scale,
      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: _({
        visibility: l.keepUserOptionState ? l.userOptionsVisible ? "visible" : "hidden" : "visible"
      })
    }, et({ _: 2 }, [
      r.$slots.menuIcon ? {
        name: "menuIcon",
        fn: B(({ isOpen: t, color: o }) => [
          G(r.$slots, "menuIcon", $(ee({ isOpen: t, color: o })), void 0, !0)
        ]),
        key: "0"
      } : void 0,
      r.$slots.optionTooltip ? {
        name: "optionTooltip",
        fn: B(() => [
          G(r.$slots, "optionTooltip", {}, void 0, !0)
        ]),
        key: "1"
      } : void 0,
      r.$slots.optionPdf ? {
        name: "optionPdf",
        fn: B(() => [
          G(r.$slots, "optionPdf", {}, void 0, !0)
        ]),
        key: "2"
      } : void 0,
      r.$slots.optionCsv ? {
        name: "optionCsv",
        fn: B(() => [
          G(r.$slots, "optionCsv", {}, void 0, !0)
        ]),
        key: "3"
      } : void 0,
      r.$slots.optionImg ? {
        name: "optionImg",
        fn: B(() => [
          G(r.$slots, "optionImg", {}, void 0, !0)
        ]),
        key: "4"
      } : void 0,
      r.$slots.optionTable ? {
        name: "optionTable",
        fn: B(() => [
          G(r.$slots, "optionTable", {}, void 0, !0)
        ]),
        key: "5"
      } : void 0,
      r.$slots.optionLabels ? {
        name: "optionLabels",
        fn: B(() => [
          G(r.$slots, "optionLabels", {}, void 0, !0)
        ]),
        key: "6"
      } : void 0,
      r.$slots.optionStack ? {
        name: "optionStack",
        fn: B(() => [
          G(r.$slots, "optionStack", {}, void 0, !0)
        ]),
        key: "7"
      } : void 0,
      r.$slots.optionFullscreen ? {
        name: "optionFullscreen",
        fn: B(({ toggleFullscreen: t, isFullscreen: o }) => [
          G(r.$slots, "optionFullscreen", $(ee({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
        ]),
        key: "8"
      } : void 0,
      r.$slots.optionAnnotator ? {
        name: "optionAnnotator",
        fn: B(({ toggleAnnotator: t, isAnnotator: o }) => [
          G(r.$slots, "optionAnnotator", $(ee({ toggleAnnotator: t, isAnnotator: o })), 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", "callbacks", "printScale", "onToggleFullscreen", "onGeneratePdf", "onGenerateCsv", "onGenerateImage", "onToggleTable", "onToggleLabels", "onToggleStack", "onToggleTooltip", "onToggleAnnotator", "style"])) : u("", !0),
    e.isDataset ? (a(), s("svg", {
      key: 4,
      ref: "svgRef",
      xmlns: "http://www.w3.org/2000/svg",
      class: j([{ "vue-data-ui-fullscreen--on": l.isFullscreen, "vue-data-ui-fulscreen--off": !l.isFullscreen }, "vue-ui-xy-svg"]),
      width: "100%",
      viewBox: l.viewBox,
      style: _(`background: transparent; color:${e.FINAL_CONFIG.chart.color}; font-family:${e.FINAL_CONFIG.chart.fontFamily}`),
      "aria-label": e.chartAriaLabel,
      role: "img",
      "aria-live": "polite"
    }, [
      le(O),
      r.$slots["chart-background"] ? (a(), s("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"
        }
      }, [
        G(r.$slots, "chart-background", {}, void 0, !0)
      ], 8, ft)) : u("", !0),
      e.maxSeries > 0 ? (a(), s("g", It, [
        I("g", xt, [
          e.FINAL_CONFIG.chart.grid.labels.xAxis.showBaseline ? (a(), s("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",
            style: { animation: "none !important" }
          }, null, 8, Nt)) : u("", !0),
          l.mutableConfig.useIndividualScale ? e.FINAL_CONFIG.chart.grid.showHorizontalLines ? (a(!0), s(d, { key: 2 }, x(e.allScales, (t) => (a(), s("g", null, [
            t.id === l.selectedScale && t.yLabels.length ? (a(!0), s(d, { key: 0 }, x(t.yLabels, (o) => (a(), s("line", {
              x1: e.drawingArea.left + e.xPadding,
              x2: e.drawingArea.right - e.xPadding,
              y1: e.forceValidValue(o.y),
              y2: e.forceValidValue(o.y),
              stroke: t.color,
              "stroke-width": 0.5,
              "stroke-linecap": "round",
              style: { animation: "none !important" }
            }, null, 8, _t))), 256)) : t.yLabels.length ? (a(!0), s(d, { key: 1 }, x(t.yLabels, (o) => (a(), s("line", {
              x1: e.drawingArea.left + e.xPadding,
              x2: e.drawingArea.right - e.xPadding,
              y1: e.forceValidValue(o.y),
              y2: e.forceValidValue(o.y),
              stroke: e.FINAL_CONFIG.chart.grid.stroke,
              "stroke-width": 0.5,
              "stroke-linecap": "round",
              style: { animation: "none !important" }
            }, null, 8, At))), 256)) : u("", !0)
          ]))), 256)) : u("", !0) : (a(), s(d, { key: 1 }, [
            e.FINAL_CONFIG.chart.grid.labels.yAxis.showBaseline ? (a(), s("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",
              style: { animation: "none !important" }
            }, null, 8, mt)) : u("", !0),
            e.FINAL_CONFIG.chart.grid.showHorizontalLines ? (a(), s("g", bt, [
              (a(!0), s(d, null, x(e.yLabels, (t) => (a(), s("line", {
                x1: e.drawingArea.left + e.xPadding,
                x2: e.drawingArea.right - e.xPadding,
                y1: e.forceValidValue(t.y),
                y2: e.forceValidValue(t.y),
                stroke: e.FINAL_CONFIG.chart.grid.stroke,
                "stroke-width": 0.5,
                "stroke-linecap": "round",
                style: { animation: "none !important" }
              }, null, 8, Ft))), 256))
            ])) : u("", !0)
          ], 64)),
          e.FINAL_CONFIG.chart.grid.showVerticalLines ? (a(), s("g", yt, [
            (a(!0), s(d, null, x(e.maxSeries + (e.FINAL_CONFIG.chart.grid.position === "middle" ? 1 : 0), (t, o) => (a(), s("line", {
              key: `grid_vertical_line_${o}`,
              x1: e.drawingArea.width / e.maxSeries * o + e.drawingArea.left + e.xPadding,
              x2: e.drawingArea.width / e.maxSeries * o + 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,
              style: { animation: "none !important" }
            }, null, 8, Lt))), 128))
          ])) : u("", !0),
          e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show ? (a(), s("g", Ct, [
            (a(!0), s(d, null, x(e.timeLabels, (t, o) => (a(), s("g", {
              key: `time_label_${o}`
            }, [
              t && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || t && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (o === 0 || o === e.timeLabels.length - 1) && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || t && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && l.selectedSerieIndex === o && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || t && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo && o % Math.floor((this.slicer.end - this.slicer.start) / e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo) === 0 ? (a(), s(d, { key: 0 }, [
                e.FINAL_CONFIG.chart.grid.labels.xAxis.showCrosshairs ? (a(), s("line", {
                  key: 0,
                  y1: e.FINAL_CONFIG.chart.grid.labels.xAxis.crosshairsAlwaysAtZero ? e.zero - (e.zero === e.drawingArea.bottom ? 0 : e.FINAL_CONFIG.chart.grid.labels.xAxis.crosshairSize / 2) : e.drawingArea.bottom,
                  y2: e.FINAL_CONFIG.chart.grid.labels.xAxis.crosshairsAlwaysAtZero ? e.zero + e.FINAL_CONFIG.chart.grid.labels.xAxis.crosshairSize / (e.zero === e.drawingArea.bottom ? 1 : 2) : e.drawingArea.bottom + e.FINAL_CONFIG.chart.grid.labels.xAxis.crosshairSize,
                  x1: e.drawingArea.left + e.drawingArea.width / e.maxSeries * o + e.drawingArea.width / e.maxSeries / 2,
                  x2: e.drawingArea.left + e.drawingArea.width / e.maxSeries * o + e.drawingArea.width / e.maxSeries / 2,
                  stroke: e.FINAL_CONFIG.chart.grid.stroke,
                  "stroke-width": 1,
                  "stroke-linecap": "round",
                  style: { animation: "none !important" }
                }, null, 8, St)) : u("", !0)
              ], 64)) : u("", !0)
            ]))), 128))
          ])) : u("", !0)
        ]),
        (a(!0), s(d, null, x(e.barSet, (t, o) => (a(), s("defs", {
          key: `def_rect_${o}`
        }, [
          I("linearGradient", {
            id: `rectGradient_pos_${o}_${l.uniqueId}`,
            x2: "0%",
            y2: "100%"
          }, [
            I("stop", {
              offset: "0%",
              "stop-color": t.color
            }, null, 8, wt),
            I("stop", {
              offset: "62%",
              "stop-color": `${e.shiftHue(t.color, 0.02)}`
            }, null, 8, Ot),
            I("stop", {
              offset: "100%",
              "stop-color": `${e.shiftHue(t.color, 0.05)}`
            }, null, 8, Gt)
          ], 8, kt),
          I("linearGradient", {
            id: `rectGradient_neg_${o}_${l.uniqueId}`,
            x2: "0%",
            y2: "100%"
          }, [
            I("stop", {
              offset: "0%",
              "stop-color": `${e.shiftHue(t.color, 0.05)}`
            }, null, 8, pt),
            I("stop", {
              offset: "38%",
              "stop-color": `${e.shiftHue(t.color, 0.02)}`
            }, null, 8, zt),
            I("stop", {
              offset: "100%",
              "stop-color": t.color
            }, null, 8, Mt)
          ], 8, vt)
        ]))), 128)),
        (a(!0), s(d, null, x(e.plotSet, (t, o) => (a(), s("defs", {
          key: `def_plot_${o}`
        }, [
          I("radialGradient", {
            id: `plotGradient_${o}_${l.uniqueId}`,
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%"
          }, [
            I("stop", {
              offset: "0%",
              "stop-color": `${e.shiftHue(t.color, 0.05)}`
            }, null, 8, Pt),
            I("stop", {
              offset: "100%",
              "stop-color": t.color
            }, null, 8, Vt)
          ], 8, Tt)
        ]))), 128)),
        (a(!0), s(d, null, x(e.lineSet, (t, o) => (a(), s("defs", {
          key: `def_line_${o}`
        }, [
          I("radialGradient", {
            id: `lineGradient_${o}_${l.uniqueId}`,
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%"
          }, [
            I("stop", {
              offset: "0%",
              "stop-color": `${e.shiftHue(t.color, 0.05)}`
            }, null, 8, Ht),
            I("stop", {
              offset: "100%",
              "stop-color": t.color
            }, null, 8, Dt)
          ], 8, Rt),
          I("linearGradient", {
            id: `areaGradient_${o}_${l.uniqueId}`,
            x1: "0%",
            x2: "100%",
            y1: "0%",
            y2: "0%"
          }, [
            I("stop", {
              offset: "0%",
              "stop-color": `${e.setOpacity(e.shiftHue(t.color, 0.03), e.FINAL_CONFIG.line.area.opacity)}`
            }, null, 8, Wt),
            I("stop", {
              offset: "100%",
              "stop-color": `${e.setOpacity(t.color, e.FINAL_CONFIG.line.area.opacity)}`
            }, null, 8, Et)
          ], 8, Bt)
        ]))), 128)),
        (a(!0), s(d, null, x(e.highlightAreas, (t) => (a(), s("g", null, [
          t.show ? (a(), s(d, { key: 0 }, [
            (a(!0), s(d, null, x(t.span, (o, n) => (a(), s("g", null, [
              I("rect", {
                style: _({
                  transition: "none",
                  opacity: t.from + n >= l.slicer.start && t.from + n <= l.slicer.end - 1 ? 1 : 0
                }),
                x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * (t.from + n - 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(t.color, t.opacity)
              }, null, 12, Yt)
            ]))), 256)),
            (a(!0), s(d, null, x(t.span, (o, n) => (a(), s("g", null, [
              t.caption.text && n === 0 ? (a(), s("foreignObject", {
                key: 0,
                x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * (t.from + n - l.slicer.start) - (t.caption.width === "auto" ? 0 : t.caption.width / 2 - e.drawingArea.width / e.maxSeries * t.span / 2),
                y: e.drawingArea.top + t.caption.offsetY,
                style: _({
                  overflow: "visible",
                  opacity: t.to >= l.slicer.start && t.from < l.slicer.end ? 1 : 0
                }),
                height: "1",
                width: t.caption.width === "auto" ? e.drawingArea.width / e.maxSeries * t.span : t.caption.width
              }, [
                I("div", {
                  style: _(`padding:${t.caption.padding}px;text-align:${t.caption.textAlign};font-size:${t.caption.fontSize}px;color:${t.caption.color};font-weight:${t.caption.bold ? "bold" : "normal"}`)
                }, V(t.caption.text), 5)
              ], 12, qt)) : u("", !0)
            ]))), 256))
          ], 64)) : u("", !0)
        ]))), 256)),
        I("g", null, [
          (a(!0), s(d, null, x(e.maxSeries, (t, o) => (a(), s("g", {
            key: `tooltip_trap_highlighter_${o}`
          }, [
            I("rect", {
              x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * o,
              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(o) ? e.setOpacity(e.FINAL_CONFIG.chart.highlighter.color, e.FINAL_CONFIG.chart.highlighter.opacity) : "transparent"
            }, null, 8, Xt)
          ]))), 128))
        ]),
        e.barSet.length ? (a(!0), s(d, { key: 0 }, x(e.barSet, (t, o) => (a(), s("g", {
          key: `serie_bar_${o}`,
          class: j(`serie_bar_${o}`),
          style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
        }, [
          (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s("g", {
            key: `bar_plot_${o}_${g}`
          }, [
            e.canShowValue(n.value) ? (a(), s("rect", {
              key: 0,
              x: e.calcRectX(n),
              y: l.mutableConfig.useIndividualScale ? e.calcIndividualRectY(n) : e.calcRectY(n),
              height: l.mutableConfig.useIndividualScale ? Math.abs(e.calcIndividualHeight(n)) : Math.abs(e.calcRectHeight(n)),
              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 ? n.value >= 0 ? `url(#rectGradient_pos_${o}_${l.uniqueId})` : `url(#rectGradient_neg_${o}_${l.uniqueId})` : t.color,
              stroke: e.FINAL_CONFIG.bar.border.useSerieColor ? t.color : e.FINAL_CONFIG.bar.border.stroke,
              "stroke-width": e.FINAL_CONFIG.bar.border.strokeWidth
            }, null, 8, Ut)) : u("", !0),
            e.canShowValue(n.value) && r.$slots.pattern ? (a(), s("rect", {
              key: 1,
              x: e.calcRectX(n),
              y: l.mutableConfig.useIndividualScale ? e.calcIndividualRectY(n) : e.calcRectY(n),
              height: l.mutableConfig.useIndividualScale ? Math.abs(e.calcIndividualHeight(n)) : Math.abs(e.calcRectHeight(n)),
              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}_${t.slotAbsoluteIndex})`,
              stroke: e.FINAL_CONFIG.bar.border.useSerieColor ? t.color : e.FINAL_CONFIG.bar.border.stroke,
              "stroke-width": e.FINAL_CONFIG.bar.border.strokeWidth
            }, null, 8, Zt)) : u("", !0),
            n.comment && e.FINAL_CONFIG.chart.comments.show ? (a(), s("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(n) - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
              y: e.checkNaN(n.y) + e.FINAL_CONFIG.chart.comments.offsetY + 6
            }, [
              G(r.$slots, "plot-comment", {
                plot: { ...n, color: t.color, seriesIndex: o, datapointIndex: g }
              }, void 0, !0)
            ], 8, Jt)) : u("", !0)
          ]))), 128)),
          Object.hasOwn(t, "useProgression") && t.useProgression === !0 && !isNaN(e.calcLinearProgression(t.plots).trend) ? (a(), s("g", Kt, [
            I("defs", null, [
              I("marker", {
                id: `bar_arrow_${o}`,
                markerWidth: 7,
                markerHeight: 7,
                refX: "0",
                refY: 7 / 2,
                orient: "auto"
              }, [
                I("polygon", {
                  points: `0 0, 7 ${7 / 2}, 0 7`,
                  fill: t.color
                }, null, 8, jt)
              ], 8, Qt)
            ]),
            t.plots.length > 1 ? (a(), s("line", {
              key: 0,
              x1: e.calcLinearProgression(t.plots).x1 + e.calcRectWidth(),
              x2: e.calcLinearProgression(t.plots).x2 + e.calcRectWidth(),
              y1: e.forceValidValue(e.calcLinearProgression(t.plots).y1),
              y2: e.forceValidValue(e.calcLinearProgression(t.plots).y2),
              "stroke-width": 1,
              stroke: t.color,
              "stroke-dasharray": 2,
              "marker-end": `url(#bar_arrow_${o})`
            }, null, 8, $t)) : u("", !0),
            t.plots.length > 1 ? (a(), s("text", {
              key: 1,
              "text-anchor": "middle",
              x: e.calcLinearProgression(t.plots).x2 + e.calcRectWidth(),
              y: e.calcLinearProgression(t.plots).y2 - 6,
              "font-size": l.fontSizes.plotLabels,
              fill: t.color
            }, V(e.dataLabel({
              v: e.calcLinearProgression(t.plots).trend * 100,
              s: "%",
              r: 2
            })), 9, el)) : u("", !0)
          ])) : u("", !0)
        ], 6))), 128)) : u("", !0),
        !l.mutableConfig.useIndividualScale && e.FINAL_CONFIG.chart.grid.labels.zeroLine.show ? (a(), s("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",
          style: { animation: "none !important" }
        }, null, 8, tl)) : u("", !0),
        e.FINAL_CONFIG.chart.highlighter.useLine && (![null, void 0].includes(l.selectedSerieIndex) || ![null, void 0].includes(l.selectedMinimapIndex)) ? (a(), s("g", ll, [
          I("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, rl)
        ])) : u("", !0),
        e.FINAL_CONFIG.chart.grid.frame.show ? (a(), s("rect", {
          key: 3,
          style: { pointerEvents: "none", transition: "none", animation: "none !important" },
          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, il)) : u("", !0),
        e.FINAL_CONFIG.chart.grid.labels.show ? (a(), s("g", al, [
          l.mutableConfig.useIndividualScale ? (a(), s(d, { key: 0 }, [
            (a(!0), s(d, null, x(e.allScales, (t) => (a(), s("g", null, [
              I("line", {
                x1: t.x + e.xPadding,
                x2: t.x + e.xPadding,
                y1: l.mutableConfig.isStacked ? e.forceValidValue(e.drawingArea.bottom - t.yOffset - t.individualHeight) : e.forceValidValue(e.drawingArea.top),
                y2: l.mutableConfig.isStacked ? e.forceValidValue(e.drawingArea.bottom - t.yOffset) : e.forceValidValue(e.drawingArea.bottom),
                stroke: t.color,
                "stroke-width": e.FINAL_CONFIG.chart.grid.stroke,
                "stroke-linecap": "round",
                style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out; animation: none !important`)
              }, null, 12, sl)
            ]))), 256)),
            (a(!0), s(d, null, x(e.allScales, (t) => (a(), s("g", {
              style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
            }, [
              I("text", {
                fill: t.color,
                "font-size": l.fontSizes.dataLabels,
                "text-anchor": "middle",
                transform: `translate(${t.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 - t.yOffset - t.individualHeight / 2 : e.drawingArea.top + e.drawingArea.height / 2}) rotate(-90)`
              }, V(t.name) + " " + V(t.scaleLabel && t.unique && t.scaleLabel !== t.id ? `- ${t.scaleLabel}` : ""), 9, nl),
              (a(!0), s(d, null, x(t.yLabels, (o, n) => (a(), s(d, null, [
                e.FINAL_CONFIG.chart.grid.labels.yAxis.showCrosshairs ? (a(), s("line", {
                  key: 0,
                  x1: t.x + 3 + e.xPadding - e.FINAL_CONFIG.chart.grid.labels.yAxis.crosshairSize,
                  x2: t.x + e.xPadding,
                  y1: e.forceValidValue(o.y),
                  y2: e.forceValidValue(o.y),
                  stroke: t.color,
                  "stroke-width": 1,
                  "stroke-linecap": "round",
                  style: { animation: "none !important" }
                }, null, 8, cl)) : u("", !0)
              ], 64))), 256)),
              (a(!0), s(d, null, x(t.yLabels, (o, n) => (a(), s("text", {
                x: t.x - 5 + e.xPadding + e.FINAL_CONFIG.chart.grid.labels.yAxis.scaleValueOffsetX,
                y: e.forceValidValue(o.y) + l.fontSizes.dataLabels / 3,
                "font-size": l.fontSizes.dataLabels,
                "text-anchor": "end",
                fill: t.color
              }, V(e.applyDataLabel(
                e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,
                o.value,
                e.dataLabel({
                  p: o.prefix,
                  v: o.value,
                  s: o.suffix,
                  r: 1
                }),
                { datapoint: o.datapoint, seriesIndex: n }
              )), 9, ol))), 256))
            ], 4))), 256))
          ], 64)) : (a(!0), s(d, { key: 1 }, x(e.yLabels, (t, o) => (a(), s("g", {
            key: `yLabel_${o}`
          }, [
            e.canShowValue(t) && t.value >= e.niceScale.min && t.value <= e.niceScale.max && e.FINAL_CONFIG.chart.grid.labels.yAxis.showCrosshairs ? (a(), s("line", {
              key: 0,
              x1: e.drawingArea.left + e.xPadding,
              x2: e.drawingArea.left - e.FINAL_CONFIG.chart.grid.labels.yAxis.crosshairSize + e.xPadding,
              y1: e.forceValidValue(t.y),
              y2: e.forceValidValue(t.y),
              stroke: e.FINAL_CONFIG.chart.grid.stroke,
              "stroke-width": "1",
              "stroke-linecap": "round",
              style: { animation: "none !important" }
            }, null, 8, hl)) : u("", !0),
            t.value >= e.niceScale.min && t.value <= e.niceScale.max ? (a(), s("text", {
              key: 1,
              x: e.drawingArea.left - 7 + e.xPadding,
              y: e.checkNaN(t.y + l.fontSizes.dataLabels / 3),
              "font-size": l.fontSizes.dataLabels,
              "text-anchor": "end",
              fill: e.FINAL_CONFIG.chart.grid.labels.color
            }, V(e.canShowValue(t.value) ? e.applyDataLabel(
              e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,
              t.value,
              e.dataLabel({
                p: t.prefix,
                v: t.value,
                s: t.suffix,
                r: 1
              })
            ) : ""), 9, ul)) : u("", !0)
          ]))), 128))
        ])) : u("", !0),
        (a(!0), s(d, null, x(e.plotSet, (t, o) => (a(), s("g", {
          key: `serie_plot_${o}`,
          class: j(`serie_plot_${o}`),
          style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
        }, [
          (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s("g", {
            key: `circle_plot_${o}_${g}`
          }, [
            n && e.canShowValue(n.value) ? (a(), U(N, {
              key: 0,
              shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(t.shape) ? t.shape : "circle",
              color: e.FINAL_CONFIG.plot.useGradient ? `url(#plotGradient_${o}_${l.uniqueId})` : e.FINAL_CONFIG.plot.dot.useSerieColor ? t.color : e.FINAL_CONFIG.plot.dot.fill,
              plot: { x: e.checkNaN(n.x), y: e.checkNaN(n.y) },
              radius: l.selectedSerieIndex !== null && l.selectedSerieIndex === g || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === g ? (l.plotRadii.plot || 6) * 1.5 : l.plotRadii.plot || 6,
              stroke: e.FINAL_CONFIG.plot.dot.useSerieColor ? e.FINAL_CONFIG.chart.backgroundColor : t.color,
              strokeWidth: e.FINAL_CONFIG.plot.dot.strokeWidth
            }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : u("", !0),
            n.comment && e.FINAL_CONFIG.chart.comments.show ? (a(), s("foreignObject", {
              key: 1,
              style: { overflow: "visible" },
              height: "12",
              width: e.FINAL_CONFIG.chart.comments.width,
              x: n.x - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
              y: n.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
            }, [
              I("div", gl, [
                G(r.$slots, "plot-comment", {
                  plot: { ...n, color: t.color, seriesIndex: o, datapointIndex: g }
                }, void 0, !0)
              ])
            ], 8, dl)) : u("", !0)
          ]))), 128)),
          Object.hasOwn(t, "useProgression") && t.useProgression === !0 && !isNaN(e.calcLinearProgression(t.plots).trend) ? (a(), s("g", fl, [
            I("defs", null, [
              I("marker", {
                id: `plot_arrow_${o}`,
                markerWidth: 7,
                markerHeight: 7,
                refX: "0",
                refY: 7 / 2,
                orient: "auto"
              }, [
                I("polygon", {
                  points: `0 0, 7 ${7 / 2}, 0 7`,
                  fill: t.color
                }, null, 8, xl)
              ], 8, Il)
            ]),
            t.plots.length > 1 ? (a(), s("line", {
              key: 0,
              x1: e.calcLinearProgression(t.plots).x1,
              x2: e.calcLinearProgression(t.plots).x2,
              y1: e.forceValidValue(e.calcLinearProgression(t.plots).y1),
              y2: e.forceValidValue(e.calcLinearProgression(t.plots).y2),
              "stroke-width": 1,
              stroke: t.color,
              "stroke-dasharray": 2,
              "marker-end": `url(#plot_arrow_${o})`
            }, null, 8, Nl)) : u("", !0),
            t.plots.length > 1 ? (a(), s("text", {
              key: 1,
              "text-anchor": "middle",
              x: e.calcLinearProgression(t.plots).x2,
              y: e.calcLinearProgression(t.plots).y2 - 6,
              "font-size": l.fontSizes.plotLabels,
              fill: t.color
            }, V(e.dataLabel({
              v: e.calcLinearProgression(t.plots).trend * 100,
              s: "%",
              r: 2
            })), 9, ml)) : u("", !0)
          ])) : u("", !0)
        ], 6))), 128)),
        (a(!0), s(d, null, x(e.lineSet, (t, o) => (a(), s("g", {
          key: `serie_line_${o}`,
          class: j(`serie_line_${o}`),
          style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
        }, [
          t.smooth && t.plots.length > 1 && t.curve ? (a(), s("path", {
            key: 0,
            d: `M${t.curve}`,
            stroke: e.FINAL_CONFIG.chart.backgroundColor,
            "stroke-width": e.FINAL_CONFIG.line.strokeWidth + 1,
            "stroke-dasharray": t.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
            fill: "none"
          }, null, 8, bl)) : t.plots.length > 1 && t.straight ? (a(), s("path", {
            key: 1,
            d: `M${t.straight}`,
            stroke: e.FINAL_CONFIG.chart.backgroundColor,
            "stroke-width": e.FINAL_CONFIG.line.strokeWidth + 1,
            "stroke-dasharray": t.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, null, 8, Fl)) : u("", !0)
        ], 6))), 128)),
        r.$slots.pattern ? (a(), s("defs", _l, [
          (a(!0), s(d, null, x(e.safeDataset, (t, o) => G(r.$slots, "pattern", se({
            key: `serie_pattern_slot_${o}`
          }, { ref_for: !0 }, { ...t, seriesIndex: t.slotAbsoluteIndex, patternId: `pattern_${l.uniqueId}_${o}` }), void 0, !0)), 128))
        ])) : u("", !0),
        (a(!0), s(d, null, x(e.lineSet, (t, o) => (a(), s("g", {
          key: `serie_line_${o}`,
          class: j(`serie_line_${o}`),
          style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
        }, [
          t.useArea && t.plots.length > 1 ? (a(), s("g", Al, [
            t.smooth ? (a(!0), s(d, { key: 0 }, x(t.curveAreas, (n, g) => (a(), s(d, { key: g }, [
              I("path", {
                d: n,
                fill: e.FINAL_CONFIG.line.area.useGradient ? `url(#areaGradient_${o}_${l.uniqueId})` : e.setOpacity(t.color, e.FINAL_CONFIG.line.area.opacity)
              }, null, 8, yl),
              r.$slots.pattern ? (a(), s("path", {
                key: 0,
                d: n,
                fill: `url(#pattern_${l.uniqueId}_${t.slotAbsoluteIndex})`
              }, null, 8, Ll)) : u("", !0)
            ], 64))), 128)) : (a(!0), s(d, { key: 1 }, x(t.area.split(";"), (n, g) => (a(), s(d, { key: g }, [
              I("path", {
                d: `M${n}Z`,
                fill: e.FINAL_CONFIG.line.area.useGradient ? `url(#areaGradient_${o}_${l.uniqueId})` : e.setOpacity(t.color, e.FINAL_CONFIG.line.area.opacity)
              }, null, 8, Cl),
              r.$slots.pattern ? (a(), s("path", {
                key: 0,
                d: `M${n}Z`,
                fill: `url(#pattern_${l.uniqueId}_${t.slotAbsoluteIndex})`
              }, null, 8, Sl)) : u("", !0)
            ], 64))), 128))
          ])) : u("", !0),
          t.smooth && t.plots.length > 1 && t.curve ? (a(), s("path", {
            key: 1,
            d: `M${t.curve}`,
            stroke: t.color,
            "stroke-width": e.FINAL_CONFIG.line.strokeWidth,
            "stroke-dasharray": t.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
            fill: "none",
            "stroke-linecap": "round"
          }, null, 8, kl)) : t.plots.length > 1 && t.straight ? (a(), s("path", {
            key: 2,
            d: `M${t.straight}`,
            stroke: t.color,
            "stroke-width": e.FINAL_CONFIG.line.strokeWidth,
            "stroke-dasharray": t.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
            fill: "none",
            "stroke-linecap": "round",
            "stroke-linejoin": "round"
          }, null, 8, wl)) : u("", !0),
          (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s(d, {
            key: `circle_line_${o}_${g}`
          }, [
            !e.optimize.linePlot && n && e.canShowValue(n.value) || e.optimize.linePlot && n && e.canShowValue(n.value) && (l.selectedSerieIndex !== null && l.selectedSerieIndex === g || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === g) ? (a(), U(N, {
              key: 0,
              shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(t.shape) ? t.shape : "circle",
              color: e.FINAL_CONFIG.line.useGradient ? `url(#lineGradient_${o}_${l.uniqueId})` : e.FINAL_CONFIG.line.dot.useSerieColor ? t.color : e.FINAL_CONFIG.line.dot.fill,
              plot: { x: e.checkNaN(n.x), y: e.checkNaN(n.y) },
              radius: l.selectedSerieIndex !== null && l.selectedSerieIndex === g || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === g ? (l.plotRadii.line || 6) * 1.5 : l.plotRadii.line || 6,
              stroke: e.FINAL_CONFIG.line.dot.useSerieColor ? e.FINAL_CONFIG.chart.backgroundColor : t.color,
              strokeWidth: e.FINAL_CONFIG.line.dot.strokeWidth
            }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : u("", !0),
            n.comment && e.FINAL_CONFIG.chart.comments.show ? (a(), s("foreignObject", {
              key: 1,
              style: { overflow: "visible" },
              height: "12",
              width: e.FINAL_CONFIG.chart.comments.width,
              x: n.x - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
              y: n.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
            }, [
              I("div", Gl, [
                G(r.$slots, "plot-comment", {
                  plot: { ...n, color: t.color, seriesIndex: o, datapointIndex: g }
                }, void 0, !0)
              ])
            ], 8, Ol)) : u("", !0)
          ], 64))), 128)),
          Object.hasOwn(t, "useProgression") && t.useProgression === !0 && !isNaN(e.calcLinearProgression(t.plots).trend) ? (a(), s("g", vl, [
            I("defs", null, [
              I("marker", {
                id: `line_arrow_${o}`,
                markerWidth: 7,
                markerHeight: 7,
                refX: "0",
                refY: 7 / 2,
                orient: "auto"
              }, [
                I("polygon", {
                  points: `0 0, 7 ${7 / 2}, 0 7`,
                  fill: t.color
                }, null, 8, zl)
              ], 8, pl)
            ]),
            t.plots.length > 1 ? (a(), s("line", {
              key: 0,
              x1: e.calcLinearProgression(t.plots).x1,
              x2: e.calcLinearProgression(t.plots).x2,
              y1: e.forceValidValue(e.calcLinearProgression(t.plots).y1),
              y2: e.forceValidValue(e.calcLinearProgression(t.plots).y2),
              "stroke-width": 1,
              stroke: t.color,
              "stroke-dasharray": 2,
              "marker-end": `url(#line_arrow_${o})`
            }, null, 8, Ml)) : u("", !0),
            t.plots.length > 1 ? (a(), s("text", {
              key: 1,
              "text-anchor": "middle",
              x: e.calcLinearProgression(t.plots).x2,
              y: e.calcLinearProgression(t.plots).y2 - 6,
              "font-size": l.fontSizes.plotLabels,
              fill: t.color
            }, V(e.dataLabel({
              v: e.calcLinearProgression(t.plots).trend * 100,
              s: "%",
              r: 2
            })), 9, Tl)) : u("", !0)
          ])) : u("", !0)
        ], 6))), 128)),
        (e.FINAL_CONFIG.bar.labels.show || e.FINAL_CONFIG.bar.serieName.show) && l.mutableConfig.dataLabels.show ? (a(), s("g", Pl, [
          (a(!0), s(d, null, x(e.barSet, (t, o) => (a(), s(d, {
            key: `xLabel_bar_${o}`
          }, [
            (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s(d, {
              key: `xLabel_bar_${o}_${g}`
            }, [
              n && (!Object.hasOwn(t, "dataLabels") || t.dataLabels === !0 || l.selectedSerieIndex !== null && l.selectedSerieIndex === g || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === g) && e.FINAL_CONFIG.bar.labels.show ? (a(), s("text", {
                key: 0,
                x: l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? n.x + e.slot.line / 2 : e.calcRectX(n) + e.calcRectWidth() / 2 - e.barPeriodGap / 2,
                y: e.checkNaN(n.y) + (n.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: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
              }, V(e.canShowValue(n.value) ? e.applyDataLabel(
                e.FINAL_CONFIG.bar.labels.formatter,
                n.value,
                e.dataLabel({
                  p: t.prefix || e.FINAL_CONFIG.chart.labels.prefix,
                  v: n.value,
                  s: t.suffix || e.FINAL_CONFIG.chart.labels.suffix,
                  r: e.FINAL_CONFIG.bar.labels.rounding
                }),
                {
                  datapoint: n,
                  serie: t
                }
              ) : ""), 13, Vl)) : u("", !0),
              n && e.FINAL_CONFIG.bar.serieName.show ? (a(), s("text", {
                key: 1,
                x: l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? n.x + e.slot.line / 2 : n.x + e.calcRectWidth() * 1.1,
                y: n.y + (n.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 ? t.color : e.FINAL_CONFIG.bar.serieName.color,
                "font-weight": e.FINAL_CONFIG.bar.serieName.bold ? "bold" : "normal",
                style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
              }, V(e.FINAL_CONFIG.bar.serieName.useAbbreviation ? e.abbreviate({ source: t.name, length: e.FINAL_CONFIG.bar.serieName.abbreviationSize }) : t.name), 13, Rl)) : u("", !0)
            ], 64))), 128))
          ], 64))), 128))
        ])) : u("", !0),
        e.FINAL_CONFIG.plot.labels.show && l.mutableConfig.dataLabels.show ? (a(), s("g", Hl, [
          (a(!0), s(d, null, x(e.plotSet, (t, o) => (a(), s(d, {
            key: `xLabel_plot_${o}`
          }, [
            (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s(d, {
              key: `xLabel_plot_${o}_${g}`
            }, [
              n && !Object.hasOwn(t, "dataLabels") || t.dataLabels === !0 || l.selectedSerieIndex !== null && l.selectedSerieIndex === g || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === g ? (a(), s("text", {
                key: 0,
                x: n.x,
                y: n.y + e.FINAL_CONFIG.plot.labels.offsetY,
                "text-anchor": "middle",
                "font-size": l.fontSizes.plotLabels,
                fill: e.FINAL_CONFIG.plot.labels.color,
                style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
              }, V(e.canShowValue(n.value) ? e.applyDataLabel(
                e.FINAL_CONFIG.plot.labels.formatter,
                n.value,
                e.dataLabel({
                  p: t.prefix || e.FINAL_CONFIG.chart.labels.prefix,
                  v: n.value,
                  s: t.suffix || e.FINAL_CONFIG.chart.labels.suffix,
                  r: e.FINAL_CONFIG.plot.labels.rounding
                }),
                {
                  datapoint: n,
                  serie: t
                }
              ) : ""), 13, Dl)) : u("", !0)
            ], 64))), 128))
          ], 64))), 128))
        ])) : (a(), s("g", Bl, [
          (a(!0), s(d, null, x(e.plotSet, (t, o) => (a(), s(d, {
            key: `xLabel_plot_${o}`
          }, [
            (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s(d, {
              key: `xLabel_plot_${o}_${g}`
            }, [
              e.FINAL_CONFIG.plot.tag.followValue ? (a(), s(d, { key: 1 }, [
                [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag ? (a(), s("line", {
                  key: 0,
                  class: "vue-ui-xy-tag-plot",
                  x1: e.drawingArea.left,
                  x2: e.drawingArea.right,
                  y1: n.y,
                  y2: n.y,
                  "stroke-width": 1,
                  "stroke-linecap": "round",
                  "stroke-dasharray": "2",
                  stroke: t.color
                }, null, 8, Xl)) : u("", !0)
              ], 64)) : (a(), s(d, { key: 0 }, [
                n && g === 0 && t.useTag && t.useTag === "start" ? (a(), s("foreignObject", {
                  key: 0,
                  x: n.x,
                  y: n.y - 20,
                  height: 24,
                  width: "150",
                  style: _(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
                }, [
                  I("div", {
                    style: _(`padding: 3px; background:${e.setOpacity(t.color, 80)};color:${e.adaptColorToBackground(t.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`),
                    innerHTML: e.applyDataLabel(
                      e.FINAL_CONFIG.plot.tag.formatter,
                      n.value,
                      t.name,
                      {
                        datapoint: n,
                        seriesIndex: g,
                        serieName: t.name
                      }
                    )
                  }, null, 12, El)
                ], 12, Wl)) : u("", !0),
                n && g === t.plots.length - 1 && t.useTag && t.useTag === "end" ? (a(), s("foreignObject", {
                  key: 1,
                  x: n.x - t.name.length * (l.fontSizes.plotLabels / 2),
                  y: n.y - 20,
                  height: 24,
                  width: "150",
                  style: _(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
                }, [
                  I("div", {
                    style: _(`padding: 3px; background:${e.setOpacity(t.color, 80)};color:${e.adaptColorToBackground(t.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`),
                    innerHTML: e.applyDataLabel(
                      e.FINAL_CONFIG.plot.tag.formatter,
                      n.value,
                      t.name,
                      {
                        datapoint: n,
                        seriesIndex: g,
                        serieName: t.name
                      }
                    )
                  }, null, 12, ql)
                ], 12, Yl)) : u("", !0)
              ], 64))
            ], 64))), 128))
          ], 64))), 128))
        ])),
        e.FINAL_CONFIG.line.labels.show && l.mutableConfig.dataLabels.show ? (a(), s("g", Ul, [
          (a(!0), s(d, null, x(e.lineSet, (t, o) => (a(), s(d, {
            key: `xLabel_line_${o}`
          }, [
            (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s(d, {
              key: `xLabel_line_${o}_${g}`
            }, [
              n && !Object.hasOwn(t, "dataLabels") || t.dataLabels === !0 || l.selectedSerieIndex !== null && l.selectedSerieIndex === g || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === g ? (a(), s("text", {
                key: 0,
                x: n.x,
                y: n.y + (n.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: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
              }, V(e.canShowValue(n.value) ? e.applyDataLabel(
                e.FINAL_CONFIG.line.labels.formatter,
                n.value,
                e.dataLabel({
                  p: t.prefix || e.FINAL_CONFIG.chart.labels.prefix,
                  v: n.value,
                  s: t.suffix || e.FINAL_CONFIG.chart.labels.suffix,
                  r: e.FINAL_CONFIG.line.labels.rounding
                }),
                {
                  datapoint: n,
                  serie: t
                }
              ) : ""), 13, Zl)) : u("", !0)
            ], 64))), 128))
          ], 64))), 128))
        ])) : (a(), s("g", Jl, [
          (a(!0), s(d, null, x(e.lineSet, (t, o) => (a(), s(d, {
            key: `xLabel_line_${o}`
          }, [
            (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s(d, {
              key: `xLabel_line_${o}_${g}`
            }, [
              e.FINAL_CONFIG.line.tag.followValue ? (a(), s(d, { key: 1 }, [
                [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag ? (a(), s("line", {
                  key: 0,
                  class: "vue-ui-xy-tag-line",
                  x1: e.drawingArea.left,
                  x2: e.drawingArea.right,
                  y1: n.y,
                  y2: n.y,
                  "stroke-width": 1,
                  "stroke-linecap": "round",
                  "stroke-dasharray": "2",
                  stroke: t.color
                }, null, 8, er)) : u("", !0)
              ], 64)) : (a(), s(d, { key: 0 }, [
                n && g === 0 && t.useTag && t.useTag === "start" ? (a(), s("foreignObject", {
                  key: 0,
                  x: n.x,
                  y: n.y - 20,
                  height: 24,
                  width: "150",
                  style: _(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
                }, [
                  I("div", {
                    style: _(`padding: 3px; background:${e.setOpacity(t.color, 80)};color:${e.adaptColorToBackground(t.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`),
                    innerHTML: e.applyDataLabel(
                      e.FINAL_CONFIG.line.tag.formatter,
                      n.value,
                      t.name,
                      {
                        datapoint: n,
                        seriesIndex: g,
                        serieName: t.name
                      }
                    )
                  }, null, 12, Ql)
                ], 12, Kl)) : u("", !0),
                n && g === t.plots.length - 1 && t.useTag && t.useTag === "end" ? (a(), s("foreignObject", {
                  key: 1,
                  x: n.x,
                  y: n.y - 20,
                  height: 24,
                  width: "150",
                  style: _(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
                }, [
                  I("div", {
                    style: _(`padding: 3px; background:${e.setOpacity(t.color, 80)};color:${e.adaptColorToBackground(t.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`),
                    innerHTML: e.applyDataLabel(
                      e.FINAL_CONFIG.line.tag.formatter,
                      n.value,
                      t.name,
                      {
                        datapoint: n,
                        seriesIndex: g,
                        serieName: t.name
                      }
                    )
                  }, null, 12, $l)
                ], 12, jl)) : u("", !0)
              ], 64))
            ], 64))), 128))
          ], 64))), 128))
        ])),
        (a(!0), s(d, null, x(e.lineSet, (t, o) => (a(), s(d, {
          key: `xLabel_line_${o}`
        }, [
          (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s(d, {
            key: `xLabel_line_${o}_${g}`
          }, [
            n && g === 0 && t.showSerieName && t.showSerieName === "start" ? (a(), s("text", {
              key: 0,
              x: n.x - l.fontSizes.plotLabels,
              y: n.y,
              "font-size": l.fontSizes.plotLabels,
              "text-anchor": "end",
              fill: t.color,
              innerHTML: e.createTSpans({
                content: t.name,
                fontSize: l.fontSizes.plotLabels,
                fill: t.color,
                x: n.x - l.fontSizes.plotLabels,
                y: n.y,
                maxWords: 2
              }),
              style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
            }, null, 12, tr)) : u("", !0),
            n && g === t.plots.length - 1 && t.showSerieName && t.showSerieName === "end" ? (a(), s("text", {
              key: 1,
              x: n.x + l.fontSizes.plotLabels,
              y: n.y,
              "font-size": l.fontSizes.plotLabels,
              "text-anchor": "start",
              fill: t.color,
              innerHTML: e.createTSpans({
                content: t.name,
                fontSize: l.fontSizes.plotLabels,
                fill: t.color,
                x: n.x + l.fontSizes.plotLabels,
                y: n.y,
                maxWords: 2
              }),
              style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
            }, null, 12, lr)) : u("", !0)
          ], 64))), 128))
        ], 64))), 128)),
        (a(!0), s(d, null, x(e.plotSet, (t, o) => (a(), s(d, {
          key: `xLabel_plot_${o}`
        }, [
          (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s(d, {
            key: `xLabel_plot_${o}_${g}`
          }, [
            n && g === 0 && t.showSerieName && t.showSerieName === "start" ? (a(), s("text", {
              key: 0,
              x: n.x - l.fontSizes.plotLabels,
              y: n.y,
              "font-size": l.fontSizes.plotLabels,
              "text-anchor": "end",
              fill: t.color,
              innerHTML: e.createTSpans({
                content: t.name,
                fontSize: l.fontSizes.plotLabels,
                fill: t.color,
                x: n.x - l.fontSizes.plotLabels,
                y: n.y,
                maxWords: 2
              }),
              style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
            }, null, 12, rr)) : u("", !0),
            n && g === t.plots.length - 1 && t.showSerieName && t.showSerieName === "end" ? (a(), s("text", {
              key: 1,
              x: n.x + l.fontSizes.plotLabels,
              y: n.y,
              "font-size": l.fontSizes.plotLabels,
              "text-anchor": "start",
              fill: t.color,
              innerHTML: e.createTSpans({
                content: t.name,
                fontSize: l.fontSizes.plotLabels,
                fill: t.color,
                x: n.x + l.fontSizes.plotLabels,
                y: n.y,
                maxWords: 2
              }),
              style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
            }, null, 12, ir)) : u("", !0)
          ], 64))), 128))
        ], 64))), 128)),
        l.mutableConfig.useIndividualScale && !l.mutableConfig.isStacked ? (a(), s(d, { key: 11 }, [
          I("defs", null, [
            (a(!0), s(d, null, x(e.allScales, (t, o) => (a(), s("linearGradient", {
              id: `individual_scale_gradient_${l.uniqueId}_${o}`,
              x1: "0%",
              x2: "100%",
              y1: "0%",
              y2: "0%"
            }, [
              I("stop", {
                offset: "0%",
                "stop-color": e.FINAL_CONFIG.chart.backgroundColor,
                "stop-opacity": "0"
              }, null, 8, sr),
              I("stop", {
                offset: "100%",
                "stop-color": t.color,
                "stop-opacity": "0.2"
              }, null, 8, nr)
            ], 8, ar))), 256))
          ]),
          (a(!0), s(d, null, x(e.allScales, (t, o) => (a(), s("rect", {
            x: t.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 === t.groupId ? `url(#individual_scale_gradient_${l.uniqueId}_${o})` : "transparent",
            onMouseenter: (n) => l.selectedScale = t.groupId,
            onMouseleave: c[0] || (c[0] = (n) => l.selectedScale = null)
          }, null, 40, cr))), 256))
        ], 64)) : u("", !0),
        I("g", null, [
          e.FINAL_CONFIG.chart.grid.labels.axis.yLabel && !l.mutableConfig.useIndividualScale ? (a(), s("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" }
          }, V(e.FINAL_CONFIG.chart.grid.labels.axis.yLabel), 9, or)) : u("", !0),
          e.FINAL_CONFIG.chart.grid.labels.axis.xLabel ? (a(), s("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
          }, V(e.FINAL_CONFIG.chart.grid.labels.axis.xLabel), 9, hr)) : u("", !0)
        ]),
        e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show ? (a(), s("g", ur, [
          r.$slots["time-label"] ? (a(!0), s(d, { key: 0 }, x(e.timeLabels, (t, o) => G(r.$slots, "time-label", se({
            key: `time_label_${o}`,
            ref_for: !0
          }, {
            x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * o + 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 * o + 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: t.absoluteIndex,
            content: t.text,
            textAnchor: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
            show: t && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || t && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (o === 0 || o === e.timeLabels.length - 1) && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || t && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && l.selectedSerieIndex === o && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || t && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo && o % Math.floor((this.slicer.end - this.slicer.start) / e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo) === 0
          }), void 0, !0)), 128)) : (a(!0), s(d, { key: 1 }, x(e.timeLabels, (t, o) => (a(), s("g", {
            key: `time_label_${o}`
          }, [
            t && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || t && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (o === 0 || o === e.timeLabels.length - 1) && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || t && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && l.selectedSerieIndex === o && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || t && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo && o % Math.floor((this.slicer.end - this.slicer.start) / e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo) === 0 ? (a(), s(d, { key: 0 }, [
              String(t.text).includes(`
`) ? (a(), s("text", {
                key: 1,
                "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 * o + 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: e.usesSelectTimeLabelEvent() ? "pointer" : "default"
                }),
                innerHTML: e.createTSpansFromLineBreaksOnX({
                  content: String(t.text),
                  fontSize: l.fontSizes.xAxis,
                  fill: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,
                  x: 0,
                  y: 0
                }),
                onClick: () => e.selectTimeLabel(t, o)
              }, null, 12, gr)) : (a(), s("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 * o + 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: e.usesSelectTimeLabelEvent() ? "pointer" : "default"
                }),
                onClick: () => e.selectTimeLabel(t, o)
              }, V(t.text || ""), 13, dr))
            ], 64)) : u("", !0)
          ]))), 128))
        ])) : u("", !0),
        e.annotationsY.length && !l.mutableConfig.isStacked ? (a(), s("g", fr, [
          (a(!0), s(d, null, x(e.annotationsY, (t) => (a(), s("g", {
            key: t.uid
          }, [
            t.yTop && t.show && isFinite(t.yTop) ? (a(), s("line", {
              key: 0,
              x1: t.x1,
              y1: t.yTop,
              x2: t.x2,
              y2: t.yTop,
              stroke: t.config.line.stroke,
              "stroke-width": t.config.line.strokeWidth,
              "stroke-dasharray": t.config.line.strokeDasharray,
              "stroke-linecap": "round",
              style: { animation: "none !important" }
            }, null, 8, Ir)) : u("", !0),
            t.yBottom && t.show && isFinite(t.yBottom) ? (a(), s("line", {
              key: 1,
              x1: t.x1,
              y1: t.yBottom,
              x2: t.x2,
              y2: t.yBottom,
              stroke: t.config.line.stroke,
              "stroke-width": t.config.line.strokeWidth,
              "stroke-dasharray": t.config.line.strokeDasharray,
              "stroke-linecap": "round",
              style: { animation: "none !important" }
            }, null, 8, xr)) : u("", !0),
            t.hasArea && t.show && isFinite(t.yTop) && isFinite(t.yBottom) ? (a(), s("rect", {
              key: 2,
              y: Math.min(t.yTop, t.yBottom),
              x: t.x1,
              width: e.drawingArea.width,
              height: e.checkNaN(t.areaHeight, 0),
              fill: e.setOpacity(t.config.area.fill, t.config.area.opacity),
              style: { animation: "none !important" }
            }, null, 8, Nr)) : u("", !0),
            t.config.label.text && t.show && isFinite(t._box.y) ? (a(), s("rect", se({
              key: 3,
              class: "vue-ui-xy-annotation-label-box"
            }, { ref_for: !0 }, t._box, { style: { animation: "none !important", transition: "none !important" } }), null, 16)) : u("", !0),
            t.config.label.text && t.show && isFinite(t._text.y) ? (a(), s("text", {
              key: 4,
              id: t.id,
              class: "vue-ui-xy-annotation-label",
              x: t._text.x,
              y: t._text.y,
              "font-size": t.config.label.fontSize,
              fill: t.config.label.color,
              "text-anchor": t.config.label.textAnchor
            }, V(t.config.label.text), 9, mr)) : u("", !0)
          ]))), 128))
        ])) : u("", !0),
        I("g", null, [
          (a(!0), s(d, null, x(e.maxSeries, (t, o) => (a(), s("rect", {
            key: `tooltip_trap_${o}`,
            x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * o,
            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: (n) => e.toggleTooltipVisibility(!0, o),
            onMouseleave: c[1] || (c[1] = (n) => e.toggleTooltipVisibility(!1)),
            onClick: (n) => e.selectX(o)
          }, null, 40, br))), 128))
        ]),
        e.FINAL_CONFIG.chart.timeTag.show && (![null, void 0].includes(l.selectedSerieIndex) || ![null, void 0].includes(l.selectedMinimapIndex)) ? (a(), s("g", Fr, [
          (a(), s("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" }
          }, [
            I("div", {
              class: "vue-ui-xy-time-tag",
              style: _(`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`)
            }, V(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, _r)),
          I("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, Ar)
        ])) : u("", !0)
      ])) : u("", !0),
      G(r.$slots, "svg", { svg: e.svg }, void 0, !0)
    ], 14, gt)) : u("", !0),
    r.$slots.watermark ? (a(), s("div", yr, [
      G(r.$slots, "watermark", $(ee({ isPrinting: l.isPrinting || l.isImaging })), void 0, !0)
    ])) : u("", !0),
    (a(!0), s(d, null, x(e.lineSet, (t, o) => (a(), s(d, {
      key: `tag_line_${o}`
    }, [
      (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s(d, {
        key: `tag_line_${o}_${g}`
      }, [
        [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag && t.useTag === "end" && e.FINAL_CONFIG.line.tag.followValue ? (a(), s("div", {
          key: 0,
          ref_for: !0,
          ref: (p) => e.setTagRef(o, g, p, "right", "line"),
          class: "vue-ui-xy-tag",
          "data-tag": "right",
          style: _({
            position: "fixed",
            top: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.right + e.FINAL_CONFIG.line.tag.fontSize / 1.5,
              y: n.y,
              element: l.tagRefs[`${o}_${g}_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: n.y,
              element: l.tagRefs[`${o}_${g}_right_line`],
              position: "right"
            }).left + "px",
            height: "fit-content",
            width: "fit-content",
            background: t.color,
            color: e.adaptColorToBackground(t.color),
            padding: "0 6px",
            fontSize: e.FINAL_CONFIG.line.tag.fontSize + "px",
            opacity: 1
          })
        }, [
          (a(), s("svg", Lr, [
            I("path", {
              d: "M 0,10 10,0 10,20 Z",
              fill: t.color,
              stroke: "none"
            }, null, 8, Cr)
          ])),
          I("div", {
            class: "vue-ui-xy-tag-content",
            innerHTML: e.applyDataLabel(
              e.FINAL_CONFIG.line.tag.formatter,
              n.value,
              t.name,
              {
                datapoint: n,
                seriesIndex: g,
                serieName: t.name
              }
            )
          }, null, 8, Sr)
        ], 4)) : u("", !0),
        [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag && t.useTag === "start" && e.FINAL_CONFIG.line.tag.followValue ? (a(), s("div", {
          key: 1,
          ref_for: !0,
          ref: (p) => e.setTagRef(o, g, p, "left", "line"),
          class: "vue-ui-xy-tag",
          "data-tag": "left",
          style: _({
            position: "fixed",
            top: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.left - e.FINAL_CONFIG.line.tag.fontSize / 1.5,
              y: n.y,
              element: l.tagRefs[`${o}_${g}_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: n.y,
              element: l.tagRefs[`${o}_${g}_left_line`],
              position: "left"
            }).left + "px",
            height: "fit-content",
            width: "fit-content",
            background: t.color,
            color: e.adaptColorToBackground(t.color),
            padding: "0 6px",
            fontSize: e.FINAL_CONFIG.line.tag.fontSize + "px",
            opacity: 1
          })
        }, [
          (a(), s("svg", kr, [
            I("path", {
              d: "M 0,0 10,10 0,20 Z",
              fill: t.color,
              stroke: "none"
            }, null, 8, wr)
          ])),
          I("div", {
            class: "vue-ui-xy-tag-content",
            innerHTML: e.applyDataLabel(
              e.FINAL_CONFIG.line.tag.formatter,
              n.value,
              t.name,
              {
                datapoint: n,
                seriesIndex: g,
                serieName: t.name
              }
            )
          }, null, 8, Or)
        ], 4)) : u("", !0)
      ], 64))), 128))
    ], 64))), 128)),
    (a(!0), s(d, null, x(e.plotSet, (t, o) => (a(), s(d, {
      key: `tag_plot_${o}`
    }, [
      (a(!0), s(d, null, x(t.plots, (n, g) => (a(), s(d, {
        key: `tag_plot_${o}_${g}`
      }, [
        [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag && t.useTag === "end" && e.FINAL_CONFIG.plot.tag.followValue ? (a(), s("div", {
          key: 0,
          ref_for: !0,
          ref: (p) => e.setTagRef(o, g, p, "right", "plot"),
          class: "vue-ui-xy-tag",
          "data-tag": "right",
          style: _({
            position: "fixed",
            top: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.right + e.FINAL_CONFIG.plot.tag.fontSize / 1.5,
              y: n.y,
              element: l.tagRefs[`${o}_${g}_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: n.y,
              element: l.tagRefs[`${o}_${g}_right_plot`],
              position: "right"
            }).left + "px",
            height: "fit-content",
            width: "fit-content",
            background: t.color,
            color: e.adaptColorToBackground(t.color),
            padding: "0 6px",
            fontSize: e.FINAL_CONFIG.plot.tag.fontSize + "px",
            opacity: 1
          })
        }, [
          (a(), s("svg", Gr, [
            I("path", {
              d: "M 0,10 10,0 10,20 Z",
              fill: t.color,
              stroke: "none"
            }, null, 8, vr)
          ])),
          I("div", {
            class: "vue-ui-xy-tag-content",
            innerHTML: e.applyDataLabel(
              e.FINAL_CONFIG.plot.tag.formatter,
              n.value,
              t.name,
              {
                datapoint: n,
                seriesIndex: g,
                serieName: t.name
              }
            )
          }, null, 8, pr)
        ], 4)) : u("", !0),
        [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag && t.useTag === "start" && e.FINAL_CONFIG.plot.tag.followValue ? (a(), s("div", {
          key: 1,
          ref_for: !0,
          ref: (p) => e.setTagRef(o, g, p, "left", "plot"),
          class: "vue-ui-xy-tag",
          "data-tag": "left",
          style: _({
            position: "fixed",
            top: e.placeXYTag({
              svgElement: l.svgRef,
              x: e.drawingArea.left - e.FINAL_CONFIG.plot.tag.fontSize / 1.5,
              y: n.y,
              element: l.tagRefs[`${o}_${g}_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: n.y,
              element: l.tagRefs[`${o}_${g}_left_plot`],
              position: "left"
            }).left + "px",
            height: "fit-content",
            width: "fit-content",
            background: t.color,
            color: e.adaptColorToBackground(t.color),
            padding: "0 6px",
            fontSize: e.FINAL_CONFIG.plot.tag.fontSize + "px",
            opacity: 1
          })
        }, [
          (a(), s("svg", zr, [
            I("path", {
              d: "M 0,0 10,10 0,20 Z",
              fill: t.color,
              stroke: "none"
            }, null, 8, Mr)
          ])),
          I("div", {
            class: "vue-ui-xy-tag-content",
            innerHTML: e.applyDataLabel(
              e.FINAL_CONFIG.plot.tag.formatter,
              n.value,
              t.name,
              {
                datapoint: n,
                seriesIndex: g,
                serieName: t.name
              }
            )
          }, null, 8, Tr)
        ], 4)) : u("", !0)
      ], 64))), 128))
    ], 64))), 128)),
    e.isDataset ? u("", !0) : (a(), U(F, {
      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 ? (a(), U(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.timeLabels[0].text,
      labelRight: e.timeLabels.at(-1).text,
      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": c[2] || (c[2] = (t) => l.slicer.start = t),
      end: l.slicer.end,
      "onUpdate:end": c[3] || (c[3] = (t) => l.slicer.end = t),
      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(...h.dataset.map((t) => e.largestTriangleThreeBucketsArray({ data: t.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": B(({ reset: t }) => [
        G(r.$slots, "reset-action", $(ee({ reset: t })), 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"])) : u("", !0),
    e.FINAL_CONFIG.chart.legend.show ? (a(), s("div", {
      key: 8,
      ref: "chartLegend",
      class: "vue-ui-xy-legend",
      style: _(`font-size:${e.FINAL_CONFIG.chart.legend.fontSize}px`)
    }, [
      (a(!0), s(d, null, x(e.absoluteDataset, (t, o) => (a(), s("div", {
        key: `div_legend_item_${o}`,
        onClick: (n) => e.segregate(t),
        class: j({ "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": l.segregatedSeries.includes(t.id) })
      }, [
        l.icons[t.type] === "line" ? (a(), s("svg", Vr, [
          I("rect", {
            x: "0",
            y: "7.5",
            rx: "1.5",
            stroke: e.FINAL_CONFIG.chart.backgroundColor,
            "stroke-width": 0.5,
            height: "3",
            width: "20",
            fill: t.color
          }, null, 8, Rr),
          le(N, {
            plot: { x: 10, y: 9 },
            radius: 4,
            color: t.color,
            shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(t.shape) ? t.shape : "circle",
            stroke: e.FINAL_CONFIG.chart.backgroundColor,
            strokeWidth: 0.5
          }, null, 8, ["color", "shape", "stroke"])
        ])) : l.icons[t.type] === "bar" ? (a(), s("svg", Hr, [
          l.icons[t.type] === "bar" && r.$slots.pattern ? (a(), s("rect", {
            key: 0,
            x: "0",
            y: "0",
            rx: "1",
            height: "40",
            width: "40",
            stroke: "none",
            fill: t.color
          }, null, 8, Dr)) : u("", !0),
          l.icons[t.type] === "bar" ? (a(), s("rect", {
            key: 1,
            x: "0",
            y: "0",
            rx: "1",
            height: "40",
            width: "40",
            stroke: "none",
            fill: r.$slots.pattern ? `url(#pattern_${l.uniqueId}_${t.slotAbsoluteIndex})` : t.color
          }, null, 8, Br)) : u("", !0)
        ])) : (a(), s("svg", Wr, [
          le(N, {
            plot: { x: 6, y: 6 },
            radius: 5,
            color: t.color,
            shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(t.shape) ? t.shape : "circle"
          }, null, 8, ["color", "shape"])
        ])),
        I("span", {
          style: _(`color:${e.FINAL_CONFIG.chart.legend.color}`)
        }, V(t.name), 5)
      ], 10, Pr))), 128))
    ], 4)) : (a(), s("div", Er, [
      G(r.$slots, "legend", { legend: e.absoluteDataset }, void 0, !0)
    ], 512)),
    r.$slots.source ? (a(), s("div", Yr, [
      G(r.$slots, "source", {}, void 0, !0)
    ], 512)) : u("", !0),
    le(m, {
      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: r.$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": B(() => [
        G(r.$slots, "tooltip-before", $(ee({ ...e.dataTooltipSlot })), void 0, !0)
      ]),
      "tooltip-after": B(() => [
        G(r.$slots, "tooltip-after", $(ee({ ...e.dataTooltipSlot })), void 0, !0)
      ]),
      _: 3
    }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
    e.isDataset ? (a(), U(H, {
      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: B(() => [
        I("div", {
          style: _(`${l.isPrinting ? "" : "max-height:400px"};overflow:auto;width:100%;margin-top:48px`)
        }, [
          I("div", qr, [
            tt(I("input", {
              type: "checkbox",
              "onUpdate:modelValue": c[4] || (c[4] = (t) => l.showSparklineTable = t)
            }, null, 512), [
              [lt, l.showSparklineTable]
            ]),
            I("div", {
              onClick: c[5] || (c[5] = (t) => l.showSparklineTable = !l.showSparklineTable),
              style: { cursor: "pointer" }
            }, [
              le(L, {
                name: "chartLine",
                size: 20,
                stroke: e.FINAL_CONFIG.chart.color
              }, null, 8, ["stroke"])
            ])
          ]),
          l.showSparklineTable ? (a(), U(b, {
            key: `sparkline_${l.segregateStep}`,
            dataset: e.tableSparklineDataset,
            config: e.tableSparklineConfig
          }, null, 8, ["dataset", "config"])) : (a(), U(M, {
            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: c[6] || (c[6] = (t) => l.mutableConfig.showTable = !1)
          }, {
            th: B(({ th: t }) => [
              I("div", { innerHTML: t }, null, 8, Xr)
            ]),
            td: B(({ td: t }) => [
              rt(V(isNaN(Number(t)) ? t : e.dataLabel({
                p: e.FINAL_CONFIG.chart.labels.prefix,
                v: t,
                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"])) : u("", !0)
  ], 46, ut);
}
const ii = /* @__PURE__ */ ct(ht, [["render", Ur], ["__scopeId", "data-v-c6833615"]]);
export {
  ii as default
};