v1.1.1: dynamische Y-Achse, Button-Farbe, deploy verbose
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,7 @@ docker buildx build \
|
|||||||
--platform linux/amd64,linux/arm64 \
|
--platform linux/amd64,linux/arm64 \
|
||||||
--build-arg BUILD_DATE="${BUILD_DATE}" \
|
--build-arg BUILD_DATE="${BUILD_DATE}" \
|
||||||
--provenance=false \
|
--provenance=false \
|
||||||
|
--progress=plain \
|
||||||
-t "${FULL_IMAGE}" \
|
-t "${FULL_IMAGE}" \
|
||||||
--push \
|
--push \
|
||||||
.
|
.
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "bodenfeuchte",
|
"name": "bodenfeuchte",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite dev",
|
||||||
|
|||||||
@@ -83,6 +83,13 @@
|
|||||||
(chart.data.datasets[0] as any).pointHoverRadius = showPoints ? 4 : 0;
|
(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']!.min = now - range.hours * 60 * 60 * 1000;
|
||||||
chart.options.scales!['x']!.max = now;
|
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();
|
chart.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,7 +231,7 @@
|
|||||||
<button
|
<button
|
||||||
onclick={() => selectRange(i)}
|
onclick={() => selectRange(i)}
|
||||||
class="px-5 py-1.5 border-2 border-black rounded font-bold text-sm"
|
class="px-5 py-1.5 border-2 border-black rounded font-bold text-sm"
|
||||||
style={selectedRange === i ? 'background:#2980b9; color:white;' : 'background:#FFFFDD; color:black;'}
|
style={selectedRange === i ? 'background:#2980b9; color:white;' : 'background:rgb(231,241,247); color:black;'}
|
||||||
>
|
>
|
||||||
{range.label}
|
{range.label}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user