feat: X-Achse auf deutsches Datumsformat umgestellt (dd.MM)

This commit is contained in:
ISA
2025-04-02 07:23:24 +02:00
parent 611fd34fce
commit 60eba4aa01
3 changed files with 17 additions and 10 deletions

View File

@@ -16,6 +16,7 @@ import {
} from "chart.js";
import zoomPlugin from "chartjs-plugin-zoom";
import "chartjs-adapter-date-fns";
import { de } from "date-fns/locale";
ChartJS.register(
LineElement,
@@ -54,14 +55,7 @@ const LoopMeasurementChart = () => {
fill: false,
pointRadius: 0,
},
{
label: "Messwert Maximum",
data: loopMeasurementCurveChartData.map((e) => e.a).reverse(),
borderColor: "lightgrey",
borderWidth: 1,
fill: false,
pointRadius: 0,
},
selectedMode === "DIA0"
? {
label: "Messwert",
@@ -79,6 +73,14 @@ const LoopMeasurementChart = () => {
fill: false,
pointRadius: 2,
},
{
label: "Messwert Maximum",
data: loopMeasurementCurveChartData.map((e) => e.a).reverse(),
borderColor: "lightgrey",
borderWidth: 1,
fill: false,
pointRadius: 0,
},
],
};
@@ -115,11 +117,16 @@ const LoopMeasurementChart = () => {
time: {
unit: "day",
tooltipFormat: "dd.MM.yyyy HH:mm",
displayFormats: {
day: "dd.MM", // z.B. 02.04
},
},
title: {
display: true,
text: "Zeit",
},
// Hier Deutsch setzen:
locale: de,
},
y: {
title: {