diff --git a/static/js/weather-chart.js b/static/js/weather-chart.js index 23abaad..0521079 100644 --- a/static/js/weather-chart.js +++ b/static/js/weather-chart.js @@ -123,9 +123,9 @@ const WeatherChart = { if (forecastData.length > 0) { // 雨量 仅显示 -1h/-2h/-3h datasets.push( - { label: '雨量 (mm) - 预报 (-1h)', data: forecastRainfallsH1, type: 'bar', backgroundColor: 'rgba(255, 99, 71, 0.55)', borderColor: 'rgb(255, 99, 71)', yAxisID: 'y-rainfall' }, - { label: '雨量 (mm) - 预报 (-2h)', data: forecastRainfallsH2, type: 'bar', backgroundColor: 'rgba(255, 205, 86, 0.55)', borderColor: 'rgb(255, 205, 86)', yAxisID: 'y-rainfall' }, - { label: '雨量 (mm) - 预报 (-3h)', data: forecastRainfallsH3, type: 'bar', backgroundColor: 'rgba(76, 175, 80, 0.55)', borderColor: 'rgb(76, 175, 80)', yAxisID: 'y-rainfall' } + { label: '雨量 (mm) - 预报 (+1h)', data: forecastRainfallsH1, type: 'bar', backgroundColor: 'rgba(255, 99, 71, 0.55)', borderColor: 'rgb(255, 99, 71)', yAxisID: 'y-rainfall' }, + { label: '雨量 (mm) - 预报 (+2h)', data: forecastRainfallsH2, type: 'bar', backgroundColor: 'rgba(255, 205, 86, 0.55)', borderColor: 'rgb(255, 205, 86)', yAxisID: 'y-rainfall' }, + { label: '雨量 (mm) - 预报 (+3h)', data: forecastRainfallsH3, type: 'bar', backgroundColor: 'rgba(76, 175, 80, 0.55)', borderColor: 'rgb(76, 175, 80)', yAxisID: 'y-rainfall' } ); // 温度 取最接近的预报(0h>1h>2h>3h) diff --git a/static/js/weather-table.js b/static/js/weather-table.js index cb48037..036d5d2 100644 --- a/static/js/weather-table.js +++ b/static/js/weather-table.js @@ -77,7 +77,7 @@ const WeatherTable = { const issuedBadge = (() => { if (item.source !== '预报') return ''; - const lead = (typeof item.lead_hours === 'number' && item.lead_hours >= 0) ? ` -${item.lead_hours}h` : ''; + const lead = (typeof item.lead_hours === 'number' && item.lead_hours >= 0) ? ` +${item.lead_hours}h` : ''; const issued = item.issued_at ? new Date(item.issued_at.replace(' ', 'T')) : null; const issuedStr = issued ? `${String(issued.getHours()).padStart(2,'0')}:${String(issued.getMinutes()).padStart(2,'0')}` : '-'; return `(发布: ${issuedStr}${lead})`;