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

@@ -4,7 +4,7 @@ import { useSelector } from "react-redux";
import { Chart, registerables } from "chart.js";
import "chartjs-adapter-date-fns";
const TDRChart: React.FC = () => {
const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => {
const chartRef = useRef<HTMLCanvasElement>(null);
const chartInstance = useRef<Chart | null>(null);
@@ -85,8 +85,8 @@ const TDRChart: React.FC = () => {
}, [tdrChartData]);
return (
<div>
<canvas ref={chartRef} style={{ width: "100%", height: "20rem" }} />
<div style={{ width: "100%", height: isFullScreen ? "100%" : "20rem" }}>
<canvas ref={chartRef} style={{ width: "100%", height: "100%" }} />
</div>
);
};