style: Messwertkurven Legende und Liniern style angepasst

This commit is contained in:
ISA
2025-08-15 13:59:19 +02:00
parent 7d6263b6fb
commit 04b9a0dc1d
9 changed files with 44 additions and 40 deletions

View File

@@ -199,15 +199,15 @@ export default function AnalogInputsChart({
? zeitraum === "DIA0"
? [
{
label: "Minimum ", // (i)
label: "Messwert Minimum ", // (i)
data: filteredData
.filter((p) => typeof p.i === "number")
.map((p) => ({ x: new Date(p.t), y: p.i })),
borderColor: "gray",
borderDash: [4, 2],
borderWidth: 1,
pointRadius: 0,
tension: 0.1,
order: 1,
},
{
label: selectedAnalogInput?.label
@@ -222,30 +222,31 @@ export default function AnalogInputsChart({
borderWidth: 2,
pointRadius: 0,
tension: 0.1,
order: 2,
},
{
label: "Maximum ", // (a)
label: "Messwert Maximum ", // (a)
data: filteredData
.filter((p) => typeof p.a === "number")
.map((p) => ({ x: new Date(p.t), y: p.a })),
borderColor: "gray",
borderDash: [4, 2],
borderWidth: 1,
pointRadius: 0,
tension: 0.1,
order: 3,
},
]
: [
{
label: "Minimum", // (i)
label: "Messwert Minimum", // (i)
data: filteredData
.filter((p) => typeof p.i === "number")
.map((p) => ({ x: new Date(p.t), y: p.i })),
borderColor: "gray",
borderDash: [4, 2],
borderWidth: 1,
pointRadius: 0,
tension: 0.1,
order: 1,
},
{
label: "Durchschnitt", // (g)
@@ -257,17 +258,18 @@ export default function AnalogInputsChart({
borderWidth: 2,
pointRadius: 0,
tension: 0.1,
order: 2,
},
{
label: "Maximum", // (a)
label: "Messwert Maximum", // (a)
data: filteredData
.filter((p) => typeof p.a === "number")
.map((p) => ({ x: new Date(p.t), y: p.a })),
borderColor: "gray",
borderDash: [4, 2],
borderWidth: 1,
pointRadius: 0,
tension: 0.1,
order: 3,
},
]
: [],

View File

@@ -119,7 +119,6 @@ const IsoMeasurementChart = () => {
label: "Messwert Minimum",
data: isoMeasurementCurveChartData.map((e) => e.i).reverse(),
borderColor: "lightgrey",
backgroundColor: "rgba(211,211,211,0.5)",
borderWidth: 2,
pointRadius: 0,
pointHoverRadius: 10,
@@ -129,13 +128,11 @@ const IsoMeasurementChart = () => {
{
label: "Messwert Maximum",
data: isoMeasurementCurveChartData.map((e) => e.a).reverse(),
borderColor: "lightgrey",
backgroundColor: "rgba(211,211,211,0.5)",
borderWidth: 2,
borderColor: "gray",
borderWidth: 1,
pointRadius: 0,
pointHoverRadius: 10,
tension: 0.1,
order: 1,
order: 3,
},
selectedMode === "DIA0"
? {
@@ -147,7 +144,7 @@ const IsoMeasurementChart = () => {
pointRadius: 0,
pointHoverRadius: 10,
tension: 0.1,
order: 3,
order: 2,
}
: {
label: "Messwert Durchschnitt",
@@ -158,7 +155,7 @@ const IsoMeasurementChart = () => {
pointRadius: 0,
pointHoverRadius: 10,
tension: 0.1,
order: 3,
order: 2,
},
],
};

View File

@@ -118,24 +118,20 @@ const LoopMeasurementChart = () => {
{
label: "Messwert Minimum",
data: loopMeasurementCurveChartData.map((e) => e.i).reverse(),
borderColor: "lightgrey",
backgroundColor: "rgba(211,211,211,0.5)",
borderWidth: 2,
borderColor: "gray",
borderWidth: 1,
pointRadius: 0,
pointHoverRadius: 10,
tension: 0.1,
order: 1,
},
{
label: "Messwert Maximum",
data: loopMeasurementCurveChartData.map((e) => e.a).reverse(),
borderColor: "lightgrey",
backgroundColor: "rgba(211,211,211,0.5)",
borderWidth: 2,
borderColor: "gray",
borderWidth: 1,
pointRadius: 0,
pointHoverRadius: 10,
tension: 0.1,
order: 1,
order: 3,
},
selectedMode === "DIA0"
? {
@@ -147,7 +143,7 @@ const LoopMeasurementChart = () => {
pointRadius: 0,
pointHoverRadius: 10,
tension: 0.1,
order: 3,
order: 2,
}
: {
label: "Messwert Durchschnitt",
@@ -158,7 +154,7 @@ const LoopMeasurementChart = () => {
pointRadius: 0,
pointHoverRadius: 10,
tension: 0.1,
order: 3,
order: 2,
},
],
};

View File

@@ -332,29 +332,31 @@ export const DetailModal = ({
// Zuerst Hintergrund-Linien (Minimum/Maximum) - grau
if (hasMinimum) {
datasets.push({
label: "Minimum",
label: "Messwert Minimum",
data: reduxData.map((entry) => ({
x: new Date(entry.t).getTime(),
y: entry.i || 0,
})),
borderColor: chartColors.gray.line,
backgroundColor: chartColors.gray.background,
borderColor: "gray",
borderWidth: 1,
pointRadius: 0,
tension: 0.1,
fill: false,
order: 1,
});
}
if (hasMaximum) {
datasets.push({
label: "Maximum",
label: "Messwert Maximum",
data: reduxData.map((entry) => ({
x: new Date(entry.t).getTime(),
y: entry.a || 0,
})),
borderColor: chartColors.gray.line,
backgroundColor: chartColors.gray.background,
borderColor: "gray",
borderWidth: 1,
pointRadius: 0,
tension: 0.1,
fill: false,
order: 3,
});
}
@@ -370,6 +372,7 @@ export const DetailModal = ({
backgroundColor: chartColors.littwinBlue.background,
tension: 0.1,
fill: false,
order: 2,
});
}
@@ -384,6 +387,7 @@ export const DetailModal = ({
backgroundColor: chartColors.littwinBlue.background,
tension: 0.1,
fill: false,
order: 2,
});
}