@tradecanvas/chart 1.83.1 → 1.84.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.
@@ -1,4 +1,4 @@
1
- import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p, v as m, y as ee } from "../LayoutSession--k_77YkA.js";
1
+ import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p, v as m, y as ee } from "../LayoutSession-BQKWbCCS.js";
2
2
  import { _ as h, b as g, g as te, h as _, l as v, m as ne, n as re, t as ie, v as ae, y as oe } from "../widgetLocales-BX7VRdl5.js";
3
3
  import { t as se } from "../monthView-N8yDaTqZ.js";
4
4
  import { a as ce, c as le, d as ue, f as de, i as fe, l as pe, n as me, o as y, r as he, s as ge, t as _e, u as ve } from "../widgetFeatures-BM6u0u74.js";
@@ -8199,7 +8199,7 @@ var Yc = class {
8199
8199
  row: n
8200
8200
  }));
8201
8201
  let a = this.host.settingsState.numberLocale || "en-US", o = Uc(r >= 0 ? this.host.chart.getCompareValues?.(n === null || !t ? void 0 : r) ?? [] : [], a, t), s = this.host.chart.getActiveIndicators().map((e) => {
8202
- let t = i.get(e.instanceId) ?? null, r = nc(this.host.chart.getIndicatorOutput(e.instanceId)?.series, n), o = this.host.chart.getIndicatorStyle(e.instanceId), s = e.visible && e.offChartType === !0, c = e.visible && e.shown === !1 && !s, l = c || s ? [] : rc(e.descriptor, r, o?.colors ?? [], o?.plots);
8202
+ let t = i.get(e.instanceId) ?? null, r = nc(this.host.chart.getIndicatorOutput(e.instanceId, { drawn: !0 })?.series, n), o = this.host.chart.getIndicatorStyle(e.instanceId), s = e.visible && e.offChartType === !0, c = e.visible && e.shown === !1 && !s, l = c || s ? [] : rc(e.descriptor, r, o?.colors ?? [], o?.plots);
8203
8203
  return {
8204
8204
  instanceId: e.instanceId,
8205
8205
  label: Ue(e, this.host.t),
@@ -8954,9 +8954,15 @@ var fl = [
8954
8954
  symbolInfo: "symbolInfo",
8955
8955
  depthLadder: "trade"
8956
8956
  }, gl = class {
8957
+ dataWindowFrame = 0;
8957
8958
  constructor(e) {
8958
8959
  this.host = e;
8959
8960
  }
8961
+ scheduleDataWindow() {
8962
+ this.dataWindowFrame || !this.host.dataWindow?.isOpen() || (this.dataWindowFrame = requestAnimationFrame(() => {
8963
+ this.dataWindowFrame = 0, this.host.dataWindow?.isOpen() && this.host.dataWindow.render(this.buildDataWindowModel());
8964
+ }));
8965
+ }
8960
8966
  dock = null;
8961
8967
  dockNarrow = null;
8962
8968
  dockObserver = null;
@@ -8997,7 +9003,7 @@ var fl = [
8997
9003
  indicators: []
8998
9004
  };
8999
9005
  let { bar: n, prevClose: r } = t, i = n.close - r, a = r === 0 ? 0 : i / r * 100, o = new Set(this.host.chart.getIndicatorPanes().flatMap((e) => e.instanceIds ?? [e.instanceId])), s = this.host.settingsState.numberLocale || "en-US", c = this.host.chart.getActiveIndicators().map((t) => {
9000
- let n = this.host.chart.getIndicatorOutput(t.instanceId)?.series?.[e] ?? null, r = !o.has(t.instanceId) && Jc(t), i = t.descriptor.plots?.map((e) => [e.key, e.title]) ?? Object.keys(n ?? {}).map((e) => [e, e]), a = n ? i.filter(([e]) => typeof n[e] == "number" && Number.isFinite(n[e])).map(([e, t]) => {
9006
+ let n = this.host.chart.getIndicatorOutput(t.instanceId, { drawn: !0 })?.series?.[e] ?? null, r = !o.has(t.instanceId) && Jc(t), i = t.descriptor.plots?.map((e) => [e.key, e.title]) ?? Object.keys(n ?? {}).map((e) => [e, e]), a = n ? i.filter(([e]) => typeof n[e] == "number" && Number.isFinite(n[e])).map(([e, t]) => {
9001
9007
  let i = n[e];
9002
9008
  return {
9003
9009
  key: t,
@@ -10336,7 +10342,7 @@ var Xl = class {
10336
10342
  }, this.t), this.chart.on("crosshairMove", (e) => {
10337
10343
  let t = e.payload;
10338
10344
  this.lastHoverIndex = typeof t.barIndex == "number" ? t.barIndex : null, this.lastHoverBar = t.bar ?? null, this.lastHoverPrevClose = typeof t.prevClose == "number" ? t.prevClose : null, this.dataWindow?.isOpen() && this.dataWindow.render(this.docking.buildDataWindowModel());
10339
- }), this.chart.on("crosshairSync", (e) => {
10345
+ }), this.chart.on("indicatorUpdate", () => this.docking.scheduleDataWindow()), this.chart.on("crosshairSync", (e) => {
10340
10346
  if (this.pointerOnChart) return;
10341
10347
  let t = e.payload;
10342
10348
  this.lastHoverIndex = t.bar && t.barIndex !== null ? t.barIndex : null, this.lastHoverBar = t.bar ?? null, this.lastHoverPrevClose = typeof t.prevClose == "number" ? t.prevClose : null, this.dataWindow?.isOpen() && this.dataWindow.render(this.docking.buildDataWindowModel());