fix: hide lightweight-charts watermark logo
This commit is contained in:
parent
80c4ea67e7
commit
8961fbb16f
@ -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;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user