From ea0b8dd8f9182ba0cfbbf9888a47af751c711b3a Mon Sep 17 00:00:00 2001 From: rxf Date: Sun, 8 Feb 2026 20:08:00 +0100 Subject: [PATCH] Grafiken nun halb so hoch wie breit --- frontend/src/components/WeatherDashboard.css | 3 ++- frontend/src/components/WeatherDashboard.jsx | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/WeatherDashboard.css b/frontend/src/components/WeatherDashboard.css index c991f10..7230d57 100644 --- a/frontend/src/components/WeatherDashboard.css +++ b/frontend/src/components/WeatherDashboard.css @@ -52,6 +52,7 @@ } .chart-wrapper { - height: 250px; + width: 100%; + aspect-ratio: 2 / 1; position: relative; } diff --git a/frontend/src/components/WeatherDashboard.jsx b/frontend/src/components/WeatherDashboard.jsx index f3a3248..4196a7e 100644 --- a/frontend/src/components/WeatherDashboard.jsx +++ b/frontend/src/components/WeatherDashboard.jsx @@ -27,7 +27,7 @@ const WeatherDashboard = ({ data }) => { // Gemeinsame Chart-Optionen const getCommonOptions = () => ({ chart: { - height: 250, + height: '50%', animation: false, backgroundColor: 'transparent' }, @@ -108,8 +108,8 @@ const WeatherDashboard = ({ data }) => { [1, 'rgba(255, 99, 132, 0.1)'] ] }, - type: 'area', - threshold: yMin, + type: 'areaspline', + threshold: null, tooltip: { valueSuffix: ' °C' } @@ -271,11 +271,11 @@ const WeatherDashboard = ({ data }) => { scatter: { marker: { enabled: true, - radius: 4, + radius: 2, states: { hover: { enabled: true, - radius: 6 + radius: 3 } } }