Fix funds overview clipping on 1920x1080.
Make the funds stage scrollable, give the equity chart a fixed height so date labels fit, and stop truncating account cards without a scrollbar. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -114,13 +114,25 @@
|
||||
function createAreaChart(host) {
|
||||
const p = chartPalette();
|
||||
const c = LightweightCharts.createChart(host, {
|
||||
layout: { background: { color: p.bg }, textColor: p.text },
|
||||
layout: {
|
||||
background: { color: p.bg },
|
||||
textColor: p.text,
|
||||
fontSize: 11,
|
||||
},
|
||||
grid: {
|
||||
vertLines: { color: p.border, visible: true },
|
||||
horzLines: { color: p.border, visible: true },
|
||||
},
|
||||
rightPriceScale: { borderColor: p.border },
|
||||
timeScale: { borderColor: p.border, timeVisible: true },
|
||||
rightPriceScale: {
|
||||
borderColor: p.border,
|
||||
scaleMargins: { top: 0.08, bottom: 0.08 },
|
||||
},
|
||||
timeScale: {
|
||||
borderColor: p.border,
|
||||
timeVisible: true,
|
||||
fixLeftEdge: true,
|
||||
fixRightEdge: true,
|
||||
},
|
||||
crosshair: { mode: LightweightCharts.CrosshairMode.Normal },
|
||||
handleScroll: { mouseWheel: true, pressedMouseMove: true },
|
||||
handleScale: { axisPressedMouseMove: true, mouseWheel: true, pinch: true },
|
||||
@@ -132,17 +144,16 @@
|
||||
lineWidth: 2,
|
||||
priceFormat: { type: "price", precision: 2, minMove: 0.01 },
|
||||
});
|
||||
function syncSize() {
|
||||
if (!c || !host) return;
|
||||
const w = Math.max(host.clientWidth || 0, 1);
|
||||
const h = Math.max(host.clientHeight || 0, 200);
|
||||
c.applyOptions({ width: w, height: h });
|
||||
}
|
||||
new ResizeObserver(function () {
|
||||
if (c && host) {
|
||||
const w = Math.max(host.clientWidth || 0, 1);
|
||||
const h = Math.max(host.clientHeight || 0, 1);
|
||||
c.applyOptions({ width: w, height: h });
|
||||
}
|
||||
syncSize();
|
||||
}).observe(host);
|
||||
c.applyOptions({
|
||||
width: Math.max(host.clientWidth || 0, 1),
|
||||
height: Math.max(host.clientHeight || 0, 200),
|
||||
});
|
||||
syncSize();
|
||||
return { chart: c, series: s };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user