diff --git a/src/lib/components/admin/AnalyticsPanel.svelte b/src/lib/components/admin/AnalyticsPanel.svelte index a24a507..82e7aac 100644 --- a/src/lib/components/admin/AnalyticsPanel.svelte +++ b/src/lib/components/admin/AnalyticsPanel.svelte @@ -69,7 +69,8 @@ borderColor: '#333', backgroundColor: 'rgba(0,0,0,0.05)', tension: 0.3, - fill: true + fill: true, + yAxisID: 'y' }, { label: '缓存命中数', @@ -77,7 +78,8 @@ borderColor: '#4caf50', backgroundColor: 'rgba(76, 175, 80, 0.1)', tension: 0.3, - fill: true + fill: true, + yAxisID: 'y1' } ] }, @@ -96,7 +98,19 @@ }, scales: { y: { + type: 'linear', + display: true, + position: 'left', beginAtZero: true + }, + y1: { + type: 'linear', + display: true, + position: 'right', + beginAtZero: true, + grid: { + drawOnChartArea: false + } } } }