Messkurve für Schleife und TDR auf 90% maximieren

This commit is contained in:
ISA
2025-02-25 09:40:15 +01:00
parent 9a9614ffd8
commit 47120c4dea
4 changed files with 82 additions and 55 deletions

View File

@@ -1,11 +1,12 @@
"use client"; // components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopMeasurementChart.tsx
import React, { useEffect, useRef, useState } from "react";
import { useSelector } from "react-redux";
import { RootState } from "../../../../../../redux/store";
import Chart from "chart.js/auto";
import "chartjs-adapter-moment";
const LoopMeasurementChart = () => {
const LoopMeasurementChart = ({ isFullScreen }: { isFullScreen: boolean }) => {
const chartRef = useRef<HTMLCanvasElement>(null);
const chartInstance = useRef<Chart | null>(null);
const [zoomPlugin, setZoomPlugin] = useState<any>(null);
@@ -170,8 +171,14 @@ const LoopMeasurementChart = () => {
}, [loopMeasurementCurveChartData, vonDatum, bisDatum, selectedMode]);
return (
<div style={{ position: "relative", width: "100%", height: "400px" }}>
<canvas ref={chartRef} />
<div
style={{
position: "relative",
width: "100%",
height: isFullScreen ? "90%" : "400px",
}}
>
<canvas ref={chartRef} style={{ width: "100%", height: "100%" }} />
</div>
);
};