Datum und Uhrzeit auf X-Achse im KÜ Chart, aber Bug :Durchschnitt ist zweimal da in DIA1 und DIA2
This commit is contained in:
@@ -124,16 +124,37 @@ const LoopMeasurementChart = () => {
|
||||
x: {
|
||||
type: "time",
|
||||
time: {
|
||||
unit: "day",
|
||||
tooltipFormat: "dd.MM.yyyy HH:mm",
|
||||
displayFormats: { day: "dd.MM.yyyy" },
|
||||
unit: "minute", // Stelle sicher, dass jede Minute angezeigt wird
|
||||
tooltipFormat: "dd.MM.yyyy HH:mm", // Tooltip zeigt Datum & Uhrzeit
|
||||
displayFormats: {
|
||||
minute: "dd.MM.yyyy HH:mm", // Zeigt bei jedem Tick Datum & Uhrzeit
|
||||
hour: "dd.MM.yyyy HH:mm", // Falls stündliche Werte vorliegen
|
||||
day: "dd.MM.yyyy", // Falls tägliche Werte angezeigt werden
|
||||
},
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: "Zeit (Datum & Uhrzeit)",
|
||||
},
|
||||
ticks: {
|
||||
autoSkip: false, // Keine Ticks auslassen
|
||||
maxRotation: 45, // Falls nötig, dreht die Labels für bessere Lesbarkeit
|
||||
minRotation: 45,
|
||||
callback: function (value, index, values) {
|
||||
const date = new Date(value);
|
||||
return `${date.getDate().toString().padStart(2, "0")}.${(
|
||||
date.getMonth() + 1
|
||||
)
|
||||
.toString()
|
||||
.padStart(2, "0")}.${date.getFullYear()} ${date
|
||||
.getHours()
|
||||
.toString()
|
||||
.padStart(2, "0")}:${date
|
||||
.getMinutes()
|
||||
.toString()
|
||||
.padStart(2, "0")}`;
|
||||
},
|
||||
},
|
||||
title: { display: true, text: "Zeit" },
|
||||
},
|
||||
y: {
|
||||
title: { display: true, text: "kOhm" },
|
||||
min: 0,
|
||||
max: 80,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user