scope360-core 0.0.228 → 0.0.229

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.
@@ -20894,10 +20894,14 @@ const ev = /* @__PURE__ */ OR("line", Ll), PR = { class: "chart-container" }, tv
20894
20894
  let p = [];
20895
20895
  switch (e.dataType) {
20896
20896
  case "balanceChartData":
20897
- p = d.length !== 0 ? d.map((g) => (h.add(g.date), on(g.balance * Qf(), 2))) : [0, 0];
20897
+ d.length === 0 ? p = [0, 0] : p = d.map((g) => (h.add(g.date), on(g.balance * Qf(), 2)));
20898
20898
  break;
20899
20899
  case "performanceChartData":
20900
- p = d.length !== 0 ? d.map((g, y) => (h.add(g.date), on(y ? g.pnl_to_deposit + g[y - 1].pnl_to_deposit : g.pnl_to_deposit, 2))) : [0, 0];
20900
+ d.length === 0 ? p = [0, 0] : p = d.reduce((g, y, w) => {
20901
+ h.add(y.date);
20902
+ const b = w ? g[w - 1] : 0, T = on(b + y.pnl_to_deposit, 2);
20903
+ return g.push(T), g;
20904
+ }, []);
20901
20905
  break;
20902
20906
  }
20903
20907
  f.push({