TDMChartEntry d Type
This commit is contained in:
@@ -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
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user