TDMChartEntry d Type

This commit is contained in:
ISA
2025-03-28 14:47:34 +01:00
parent f5b6024da7
commit 776f59a389
3 changed files with 10 additions and 4 deletions

View File

@@ -50,13 +50,16 @@ const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => {
: []
);
//--------------------------------
const tdmChartData = useSelector((state: RootState) => state.tdmChart.data);
const tdmChartData = useSelector(
(state: RootState) => state.tdmSingleChart.data
);
const pinDistance =
Array.isArray(tdmChartData?.[selectedSlot ?? -1]) &&
tdmChartData[selectedSlot!]?.length > 0 &&
typeof tdmChartData[selectedSlot!][0].d === "number"
? tdmChartData[selectedSlot!][0].d
: null;
//--------------------------------
useEffect(() => {
import("chartjs-plugin-zoom").then((zoomPlugin) => {
@@ -106,13 +109,15 @@ const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => {
data: pinDistance !== null ? [{ d: pinDistance, p: 0 }] : [],
borderColor: "red",
backgroundColor: "red",
pointRadius: 5,
pointStyle: "circle",
pointRadius: 6,
pointStyle: "triangle",
showLine: false,
parsing: {
xAxisKey: "d",
yAxisKey: "p",
},
order: 10, // 👉 bringt den Punkt in den Vordergrund
// z: 10, // optional: zusätzliche Absicherung
},
],
},