From a98f8297bcf366e00960925a9fde667fb5c3ef5f Mon Sep 17 00:00:00 2001 From: ISA Date: Thu, 20 Feb 2025 15:18:24 +0100 Subject: [PATCH] =?UTF-8?q?Datum=20und=20Uhrzeit=20auf=20X-Achse=20im=20K?= =?UTF-8?q?=C3=9C=20Chart,=20aber=20Bug=20:Durchschnitt=20ist=20zweimal=20?= =?UTF-8?q?da=20in=20DIA1=20und=20DIA2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoopMeasurementChart.tsx | 39 ++++++++++++++----- config/webVersion.ts | 2 +- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopMeasurementChart.tsx b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopMeasurementChart.tsx index 0f4886d..1127923 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopMeasurementChart.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopMeasurementChart.tsx @@ -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, }, }, }, diff --git a/config/webVersion.ts b/config/webVersion.ts index 401cb3f..89120fe 100644 --- a/config/webVersion.ts +++ b/config/webVersion.ts @@ -6,5 +6,5 @@ 2: Patch oder Hotfix (Bugfixes oder kleine Änderungen). */ -const webVersion = "1.6.69"; +const webVersion = "1.6.70"; export default webVersion;