@kong-ui-public/analytics-chart 2.4.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -624,9 +624,9 @@ class ur {
624
624
  }
625
625
  }
626
626
  /*!
627
- * Chart.js v4.4.1
627
+ * Chart.js v4.4.2
628
628
  * https://www.chartjs.org
629
- * (c) 2023 Chart.js Contributors
629
+ * (c) 2024 Chart.js Contributors
630
630
  * Released under the MIT License
631
631
  */
632
632
  function fn() {
@@ -2194,9 +2194,9 @@ function av(n, t) {
2194
2194
  return JSON.stringify(n, i) !== JSON.stringify(t, i);
2195
2195
  }
2196
2196
  /*!
2197
- * Chart.js v4.4.1
2197
+ * Chart.js v4.4.2
2198
2198
  * https://www.chartjs.org
2199
- * (c) 2023 Chart.js Contributors
2199
+ * (c) 2024 Chart.js Contributors
2200
2200
  * Released under the MIT License
2201
2201
  */
2202
2202
  class sv {
@@ -4337,10 +4337,10 @@ const oh = G0 ? {
4337
4337
  passive: !0
4338
4338
  } : !1;
4339
4339
  function qv(n, t, e) {
4340
- n.addEventListener(t, e, oh);
4340
+ n && n.addEventListener(t, e, oh);
4341
4341
  }
4342
4342
  function Vv(n, t, e) {
4343
- n.canvas.removeEventListener(t, e, oh);
4343
+ n && n.canvas && n.canvas.removeEventListener(t, e, oh);
4344
4344
  }
4345
4345
  function Xv(n, t) {
4346
4346
  const e = $v[n.type] || n.type, { x: i, y: r } = kn(n, t);
@@ -5707,7 +5707,7 @@ function Ry(n, t) {
5707
5707
  }
5708
5708
  return !1;
5709
5709
  }
5710
- var Ly = "4.4.1";
5710
+ var Ly = "4.4.2";
5711
5711
  const Iy = [
5712
5712
  "top",
5713
5713
  "bottom",
@@ -7769,16 +7769,18 @@ const Gi = {
7769
7769
  average(n) {
7770
7770
  if (!n.length)
7771
7771
  return !1;
7772
- let t, e, i = 0, r = 0, a = 0;
7772
+ let t, e, i = /* @__PURE__ */ new Set(), r = 0, a = 0;
7773
7773
  for (t = 0, e = n.length; t < e; ++t) {
7774
- const s = n[t].element;
7775
- if (s && s.hasValue()) {
7776
- const o = s.tooltipPosition();
7777
- i += o.x, r += o.y, ++a;
7774
+ const o = n[t].element;
7775
+ if (o && o.hasValue()) {
7776
+ const l = o.tooltipPosition();
7777
+ i.add(l.x), r += l.y, ++a;
7778
7778
  }
7779
7779
  }
7780
7780
  return {
7781
- x: i / a,
7781
+ x: [
7782
+ ...i
7783
+ ].reduce((o, l) => o + l) / i.size,
7782
7784
  y: r / a
7783
7785
  };
7784
7786
  },
@@ -8843,7 +8845,7 @@ class Ki extends Ta {
8843
8845
  const t = this.ctx, e = this.options, { angleLines: i, grid: r, border: a } = e, s = this._pointLabels.length;
8844
8846
  let o, l, u;
8845
8847
  if (e.pointLabels.display && px(this, s), r.display && this.ticks.forEach((c, d) => {
8846
- if (d !== 0) {
8848
+ if (d !== 0 || d === 0 && this.min < 0) {
8847
8849
  l = this.getDistanceFromCenterForValue(c.value);
8848
8850
  const f = this.getContext(d), h = r.setContext(f), v = a.setContext(f);
8849
8851
  mx(this, h, l, s, v);
@@ -8865,7 +8867,7 @@ class Ki extends Ta {
8865
8867
  const r = this.getIndexAngle(0);
8866
8868
  let a, s;
8867
8869
  t.save(), t.translate(this.xCenter, this.yCenter), t.rotate(r), t.textAlign = "center", t.textBaseline = "middle", this.ticks.forEach((o, l) => {
8868
- if (l === 0 && !e.reverse)
8870
+ if (l === 0 && this.min >= 0 && !e.reverse)
8869
8871
  return;
8870
8872
  const u = i.setContext(this.getContext(l)), c = Wt(u.font);
8871
8873
  if (a = this.getDistanceFromCenterForValue(this.ticks[l].value), u.showLabelBackdrop) {