Fehlerstelle in TDR-Messung in Chart anzeigen
This commit is contained in:
@@ -43,7 +43,15 @@ const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => {
|
|||||||
? state.tdrReferenceChart.referenceData[selectedSlot] || []
|
? state.tdrReferenceChart.referenceData[selectedSlot] || []
|
||||||
: []
|
: []
|
||||||
);
|
);
|
||||||
|
//--------------------------------
|
||||||
|
const tdmChartData = useSelector((state: RootState) => state.tdmChart.data);
|
||||||
|
const pinDistance =
|
||||||
|
Array.isArray(tdmChartData?.[selectedSlot ?? -1]) &&
|
||||||
|
tdmChartData[selectedSlot!]?.length > 0 &&
|
||||||
|
typeof tdmChartData[selectedSlot!][0].d === "number"
|
||||||
|
? tdmChartData[selectedSlot!][0].d
|
||||||
|
: null;
|
||||||
|
//--------------------------------
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
import("chartjs-plugin-zoom").then((zoomPlugin) => {
|
import("chartjs-plugin-zoom").then((zoomPlugin) => {
|
||||||
Chart.register(...registerables, zoomPlugin.default);
|
Chart.register(...registerables, zoomPlugin.default);
|
||||||
@@ -68,18 +76,18 @@ const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => {
|
|||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
tension: 0.1,
|
tension: 0.1,
|
||||||
parsing: {
|
parsing: {
|
||||||
xAxisKey: "d", // Entfernung/distance // statt "t"
|
xAxisKey: "d",
|
||||||
yAxisKey: "p", // Pegel // statt "m"
|
yAxisKey: "p",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Referenzkurve",
|
label: "Referenzkurve",
|
||||||
data: referenceChartData,
|
data: referenceChartData,
|
||||||
borderColor: "black", // Schwarz für Referenzkurve
|
borderColor: "black",
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderDash: [5, 5], // Gepunktete Linie
|
borderDash: [5, 5],
|
||||||
pointRadius: 3, // Punkte für Tooltip sichtbar machen
|
pointRadius: 3,
|
||||||
pointHoverRadius: 5, // Größere Punkte beim Hover
|
pointHoverRadius: 5,
|
||||||
pointBackgroundColor: "black",
|
pointBackgroundColor: "black",
|
||||||
tension: 0.1,
|
tension: 0.1,
|
||||||
parsing: {
|
parsing: {
|
||||||
@@ -87,6 +95,19 @@ const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => {
|
|||||||
yAxisKey: "p",
|
yAxisKey: "p",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Fehlerstelle",
|
||||||
|
data: pinDistance !== null ? [{ d: pinDistance, p: 0 }] : [],
|
||||||
|
borderColor: "red",
|
||||||
|
backgroundColor: "red",
|
||||||
|
pointRadius: 5,
|
||||||
|
pointStyle: "circle",
|
||||||
|
showLine: false,
|
||||||
|
parsing: {
|
||||||
|
xAxisKey: "d",
|
||||||
|
yAxisKey: "p",
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
||||||
|
|
||||||
*/
|
*/
|
||||||
const webVersion = "1.6.161";
|
const webVersion = "1.6.162";
|
||||||
export default webVersion;
|
export default webVersion;
|
||||||
|
|||||||
Reference in New Issue
Block a user