From 36ff64fd969ecd69499fcd95019e09921b5fcabe Mon Sep 17 00:00:00 2001 From: yarnom Date: Mon, 17 Nov 2025 15:32:29 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E9=9A=90=E8=97=8F=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E5=87=86=E7=A1=AE=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/bigscreen/src/app/app.component.html | 2 +- core/frontend/src/app/chart-panel.component.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/frontend/bigscreen/src/app/app.component.html b/core/frontend/bigscreen/src/app/app.component.html index a74aa53..c00aa18 100644 --- a/core/frontend/bigscreen/src/app/app.component.html +++ b/core/frontend/bigscreen/src/app/app.component.html @@ -7,7 +7,7 @@
{{ selectedTitle }}
- +
diff --git a/core/frontend/src/app/chart-panel.component.ts b/core/frontend/src/app/chart-panel.component.ts index a9109e2..cf1b789 100644 --- a/core/frontend/src/app/chart-panel.component.ts +++ b/core/frontend/src/app/chart-panel.component.ts @@ -10,6 +10,7 @@ export class ChartPanelComponent implements OnChanges { @Input() history: WeatherPoint[] = []; @Input() forecast: ForecastPoint[] = []; @Input() legendMode: string = 'combo_standard'; + @Input() showAccuracy: boolean = true; @ViewChild('canvas', { static: true }) canvas!: ElementRef; @ViewChild('accPanel', { static: true }) accPanel!: ElementRef; @@ -155,6 +156,7 @@ export class ChartPanelComponent implements OnChanges { private updateAccuracyPanel(labels: string[], historyRain: (number|null)[], h1: (number|null)[], h2: (number|null)[], h3: (number|null)[]) { const panel = this.accPanel?.nativeElement; if (!panel) return; + if (!this.showAccuracy) { panel.style.display = 'none'; return; } const isNum = (v:any)=> v!=null && !isNaN(Number(v)); const usedIdx = historyRain.map((v, idx) => ({v, idx})).filter(x => isNum(x.v)).map(x => x.idx); const total = usedIdx.length;