Schleifenmessung style

This commit is contained in:
ISA
2025-04-02 10:40:22 +02:00
parent e6517f77ca
commit 52d76a8a44
2 changed files with 25 additions and 13 deletions

View File

@@ -28,7 +28,7 @@ ChartJS.register(
Legend,
Filler
);
import { getColor } from "../../../../../../utils/colors";
const usePreviousData = (data: any[]) => {
const ref = useRef<any[]>([]);
useEffect(() => {
@@ -90,34 +90,42 @@ const LoopMeasurementChart = () => {
label: "Messwert Minimum",
data: loopMeasurementCurveChartData.map((e) => e.i).reverse(),
borderColor: "lightgrey",
borderWidth: 1,
fill: false,
borderWidth: 2,
// fill: false,
pointRadius: 0,
pointHoverRadius: 10,
tension: 0.1,
},
selectedMode === "DIA0"
? {
label: "Messwert",
data: loopMeasurementCurveChartData.map((e) => e.m).reverse(),
borderColor: "#00AEEF",
borderColor: getColor("littwin-blue"),
borderWidth: 2,
fill: false,
pointRadius: 2,
// fill: false,
pointRadius: 0,
pointHoverRadius: 10,
tension: 0.1,
}
: {
label: "Messwert Durchschnitt",
data: loopMeasurementCurveChartData.map((e) => e.g).reverse(),
borderColor: "#00AEEF",
borderColor: getColor("littwin-blue"),
borderWidth: 2,
fill: false,
pointRadius: 2,
// fill: false,
pointRadius: 0,
pointHoverRadius: 10,
tension: 0.1,
},
{
label: "Messwert Maximum",
data: loopMeasurementCurveChartData.map((e) => e.a).reverse(),
borderColor: "lightgrey",
borderWidth: 1,
fill: false,
borderWidth: 2,
// fill: false,
pointRadius: 0,
pointHoverRadius: 10,
tension: 0.1,
},
],
};
@@ -127,7 +135,11 @@ const LoopMeasurementChart = () => {
maintainAspectRatio: false,
plugins: {
legend: { position: "top" as const },
tooltip: { mode: "index" as const, intersect: false },
tooltip: {
yAlign: "bottom", // Tooltip oberhalb des Punktes
mode: "index" as const,
intersect: false,
},
zoom: {
pan: { enabled: true, mode: "x" as const },
zoom: {