diff --git a/deploy.sh b/deploy.sh index ee26642..ed51b11 100755 --- a/deploy.sh +++ b/deploy.sh @@ -34,6 +34,7 @@ docker buildx build \ --platform linux/amd64,linux/arm64 \ --build-arg BUILD_DATE="${BUILD_DATE}" \ --provenance=false \ + --progress=plain \ -t "${FULL_IMAGE}" \ --push \ . diff --git a/package.json b/package.json index 0adc54d..e7890ed 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bodenfeuchte", "private": true, - "version": "1.1.0", + "version": "1.1.1", "type": "module", "scripts": { "dev": "vite dev", diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 418d076..99d4067 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -83,6 +83,13 @@ (chart.data.datasets[0] as any).pointHoverRadius = showPoints ? 4 : 0; chart.options.scales!['x']!.min = now - range.hours * 60 * 60 * 1000; chart.options.scales!['x']!.max = now; + if (data.length > 0) { + const values = data.map(d => d.soil_moisture); + const yMin = Math.floor(Math.min(...values) / 10) * 10; + const yMax = Math.ceil(Math.max(...values) / 10) * 10; + chart.options.scales!['y']!.min = yMin; + chart.options.scales!['y']!.max = yMin === yMax ? yMax + 10 : yMax; + } chart.update(); } @@ -224,7 +231,7 @@