diff --git a/frontend/app/globals.css b/frontend/app/globals.css index 6382e08..deb4ccd 100644 --- a/frontend/app/globals.css +++ b/frontend/app/globals.css @@ -23,3 +23,9 @@ body { color: var(--foreground); font-family: Arial, Helvetica, sans-serif; } + +/* Hide lightweight-charts watermark */ +.tv-lightweight-charts a[href*="tradingview"], +.tv-lightweight-charts a[href*="lightweight-charts"] { + display: none !important; +} diff --git a/frontend/app/kline/page.tsx b/frontend/app/kline/page.tsx index 804529a..31bf3c2 100644 --- a/frontend/app/kline/page.tsx +++ b/frontend/app/kline/page.tsx @@ -38,7 +38,6 @@ function chartOptions(height: number) { vertLines: { color: "#f1f5f9" }, horzLines: { color: "#f1f5f9" }, }, - crosshair: { mode: 1 }, localization: { timeFormatter: (ts: number) => { // UTC+8 北京时间 @@ -109,6 +108,8 @@ export default function KlinePage() { close: b.close, }))); rateChart.timeScale().fitContent(); + // 隐藏 TradingView 水印 + rateRef.current.querySelectorAll("a").forEach(a => a.style.display = "none"); // 价格K线 const priceChart = createChart(priceRef.current, chartOptions(260)); @@ -129,6 +130,8 @@ export default function KlinePage() { close: b.price_close, }))); priceChart.timeScale().fitContent(); + // 隐藏 TradingView 水印 + priceRef.current.querySelectorAll("a").forEach(a => a.style.display = "none"); } catch (e) { console.error(e);