evui 3.16.0 → 3.17.0

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.
package/dist/index.js CHANGED
@@ -13262,6 +13262,8 @@ const st = /* @__PURE__ */ oC(lC), aC = {
13262
13262
  // 'outside'(plot 밖 우측 여백) | 'innerStart'(plot 안 좌측) | 'innerEnd'(plot 안 우측)
13263
13263
  showValue: !1,
13264
13264
  // true → "text value" 합성 (value = 축 formatter)
13265
+ valueFormatter: null,
13266
+ // showValue=true 일 때 값 포맷 override. (value) => string. null 이면 축 formatter 사용
13265
13267
  responsive: {
13266
13268
  valueOnlyBelow: null,
13267
13269
  // plot 너비 < 이 값 → value만
@@ -15774,7 +15776,14 @@ class Zi {
15774
15776
  * @returns {object}
15775
15777
  */
15776
15778
  getNormalizedLabelOptions(e, n, i = null) {
15777
- const s = ot({}, n, nd), o = this.ctx, { maxWidth: l, responsive: a } = s, r = s.fontSize > 20 ? 20 : s.fontSize, c = e.chartWidth, d = a == null ? void 0 : a.valueOnlyBelow, h = a == null ? void 0 : a.hideBelow, u = !z.isNullOrUndefined(h) && c < h, f = !u && !z.isNullOrUndefined(d) && c < d, p = s.text != null ? String(s.text) : "", m = !z.isNullOrUndefined(i) && Number.isFinite(+i), b = s.showValue && m ? String(this.getLabelFormat(i)) : "";
15779
+ const s = ot({}, n, nd), o = this.ctx, { maxWidth: l, responsive: a } = s, r = s.fontSize > 20 ? 20 : s.fontSize, c = e.chartWidth, d = a == null ? void 0 : a.valueOnlyBelow, h = a == null ? void 0 : a.hideBelow, u = !z.isNullOrUndefined(h) && c < h, f = !u && !z.isNullOrUndefined(d) && c < d, p = s.text != null ? String(s.text) : "", m = !z.isNullOrUndefined(i) && Number.isFinite(+i);
15780
+ let b = "";
15781
+ if (s.showValue && m)
15782
+ if (typeof s.valueFormatter == "function") {
15783
+ const I = s.valueFormatter(i);
15784
+ b = I == null ? String(this.getLabelFormat(i)) : String(I);
15785
+ } else
15786
+ b = String(this.getLabelFormat(i));
15778
15787
  let v;
15779
15788
  s.showValue ? v = f ? b : [p, b].filter((I) => I).join(" ") : v = p, o.save(), o.font = z.getLabelStyle({ ...s, fontSize: r });
15780
15789
  let g = v, S = l ?? o.measureText(g).width;
@@ -27166,7 +27175,7 @@ const Ws = /* @__PURE__ */ Ie(tI, [["render", lI]]);
27166
27175
  Ws.install = (t) => {
27167
27176
  t.component(Ws.name, Ws);
27168
27177
  };
27169
- const aI = "3.15.0", rI = [
27178
+ const aI = "3.16.0", rI = [
27170
27179
  ss,
27171
27180
  os,
27172
27181
  pi,