feat: 优化前端页面
This commit is contained in:
parent
781a93cefc
commit
4c0f0da515
@ -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 },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user