WIP:DatePicker in Messkurven

This commit is contained in:
ISA
2025-03-19 07:20:46 +01:00
parent 2c88ef3205
commit 49e7d6c6c4
4 changed files with 24 additions and 4 deletions

View File

@@ -206,7 +206,21 @@ const LoopMeasurementChart = () => {
const date = new Date(zeit);
return `${date.getDate()}.${date.getMonth() + 1}`;
}}
tick={{ angle: -25, dy: 5 }} // Dreht die Labels für bessere Übersicht
tick={(props) => {
const { x, y, payload } = props;
const date = new Date(payload.value);
return (
<text
x={x}
y={y}
dy={5}
textAnchor="end"
transform={`rotate(-25, ${x}, ${y})`}
>
{`${date.getDate()}.${date.getMonth() + 1}`}
</text>
);
}} // Dreht die Labels für bessere Übersicht
/>
<YAxis