From 4c0f0da515b696bfdf082042a546a024d050fdf2 Mon Sep 17 00:00:00 2001 From: yarnom Date: Sat, 30 Aug 2025 00:05:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/weather-chart.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/static/js/weather-chart.js b/static/js/weather-chart.js index 0521079..8cc74ea 100644 --- a/static/js/weather-chart.js +++ b/static/js/weather-chart.js @@ -153,6 +153,17 @@ const WeatherChart = { responsive: true, maintainAspectRatio: false, interaction: { mode: 'index', intersect: false }, + layout: { padding: { top: 12, right: 16, bottom: 12, left: 16 } }, + plugins: { + legend: { + display: true, + position: 'top', + align: 'center', + labels: { + padding: 16 + } + } + }, scales: { 'y-temperature': { type: 'linear', display: true, position: 'left', title: { display: true, text: '温度 (°C)' } }, 'y-humidity': { type: 'linear', display: true, position: 'right', title: { display: true, text: '湿度 (%)' }, grid: { drawOnChartArea: false }, min: 0, max: 100 },