Optimierung nach Kai, Einheit entfernt in Chart und DIA0 bis DIA2 von Dropdown entfernt

This commit is contained in:
ISA
2025-02-25 15:54:33 +01:00
parent 9bbf5cd570
commit 327a101386
3 changed files with 11 additions and 10 deletions

View File

@@ -47,7 +47,7 @@ const LoopMeasurementChart = () => {
// Basis-Datasets für alle Datenpunkte
const datasets = [
{
label: "Messwert Minimum (kOhm)",
label: "Messwert Minimum ",
data: loopMeasurementCurveChartData.map((entry) => ({
x: new Date(entry.t).getTime(),
y: entry.i,
@@ -57,7 +57,7 @@ const LoopMeasurementChart = () => {
fill: false,
},
{
label: "Messwert Maximum (kOhm)",
label: "Messwert Maximum ",
data: loopMeasurementCurveChartData.map((entry) => ({
x: new Date(entry.t).getTime(),
y: entry.a,
@@ -74,7 +74,7 @@ const LoopMeasurementChart = () => {
loopMeasurementCurveChartData.some((entry) => entry.m !== undefined)
) {
datasets.push({
label: "Messwert Aktuell (m)",
label: "Messwert",
data: loopMeasurementCurveChartData.map((entry) => ({
x: new Date(entry.t).getTime(),
y: entry.m ?? NaN,
@@ -91,7 +91,7 @@ const LoopMeasurementChart = () => {
loopMeasurementCurveChartData.some((entry) => entry.g !== undefined)
) {
datasets.push({
label: "Messwert Durchschnitt (g)",
label: "Messwert Durchschnitt", // g als Durchschnittswert verwenden
data: loopMeasurementCurveChartData.map((entry) => ({
x: new Date(entry.t).getTime(),
y: entry.g ?? NaN,
@@ -110,6 +110,7 @@ const LoopMeasurementChart = () => {
options: {
responsive: true,
maintainAspectRatio: false,
animation: false,
elements: {
line: { spanGaps: true },
},
@@ -121,7 +122,7 @@ const LoopMeasurementChart = () => {
tooltipFormat: "dd.MM.yyyy HH:mm",
displayFormats: { day: "dd.MM.yyyy" },
},
title: { display: true, text: "Zeit (Datum)" },
title: { display: true, text: "" }, // kann Zeit oder Datum eingefügt werden für X-Achse
min: new Date(vonDatum).getTime(),
max: new Date(bisDatum).getTime(),
},
@@ -149,7 +150,7 @@ const LoopMeasurementChart = () => {
zoom: {
wheel: { enabled: true },
pinch: { enabled: true },
mode: "x",
mode: "xy",
onZoomComplete: (chart) => {
const xScale = chart.chart.scales.x;
const newVonDatum = new Date(xScale.min)