Give funds equity curve more room on 1920x1080.

Drop the 42vh chart cap, let the curve fill remaining height, and scroll account cards so the curve is not clipped.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-17 11:19:58 +08:00
parent 3f6e4329d9
commit cb2fcd283a
3 changed files with 68 additions and 10 deletions
+18 -2
View File
@@ -134,10 +134,15 @@
});
new ResizeObserver(function () {
if (c && host) {
c.applyOptions({ width: host.clientWidth, height: host.clientHeight });
const w = Math.max(host.clientWidth || 0, 1);
const h = Math.max(host.clientHeight || 0, 1);
c.applyOptions({ width: w, height: h });
}
}).observe(host);
c.applyOptions({ width: host.clientWidth, height: host.clientHeight });
c.applyOptions({
width: Math.max(host.clientWidth || 0, 1),
height: Math.max(host.clientHeight || 0, 200),
});
return { chart: c, series: s };
}
@@ -443,6 +448,17 @@
}
}
renderAccounts(data.accounts || []);
// 分户卡片渲染后高度会变,补一次尺寸,避免 1080p 一屏布局下曲线被裁切
if (chart && elChartHost) {
requestAnimationFrame(function () {
if (!chart || !elChartHost) return;
chart.applyOptions({
width: Math.max(elChartHost.clientWidth || 0, 1),
height: Math.max(elChartHost.clientHeight || 0, 200),
});
chart.timeScale().fitContent();
});
}
if (fsAccountKey) {
const ac = findAccount(fsAccountKey);
if (ac && ac.monitored) openAccountFullscreen(fsAccountKey);