feat(chart): X-Achsen-Labels optimiert für bessere Lesbarkeit
- Jahreszahl aus der X-Achse entfernt, um die Darstellung kompakter zu machen. - Datumsformat von `TT.MM.YYYY` auf `TT.MM` geändert. - Achsenbeschriftung um 25° gedreht (`angle: -25`) für bessere Übersicht. - `dy: 5` hinzugefügt, um die Abstände der Labels anzupassen.
This commit is contained in:
@@ -179,8 +179,13 @@ const LoopMeasurementChart = () => {
|
||||
<XAxis
|
||||
dataKey="zeit"
|
||||
domain={["dataMin", "dataMax"]}
|
||||
tickFormatter={(zeit) => new Date(zeit).toLocaleDateString()}
|
||||
tickFormatter={(zeit) => {
|
||||
const date = new Date(zeit);
|
||||
return `${date.getDate()}.${date.getMonth() + 1}`;
|
||||
}}
|
||||
tick={{ angle: -25, dy: 5 }} // Dreht die Labels für bessere Übersicht
|
||||
/>
|
||||
|
||||
<YAxis
|
||||
label={{ value: unit, angle: -90, position: "insideLeft" }}
|
||||
domain={["auto", "auto"]}
|
||||
|
||||
Reference in New Issue
Block a user