import React from 'react'; import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts'; const SystemStatusChart = ({ data }) => { // Обрезаем массив, оставляя только последние 20 точек const trimmedData = data.slice(-20); const CustomTooltip = ({ active, payload, label }) => { if (active && payload && payload.length) { return (

{`Время: ${label}`}

{`Значение: ${payload[0].value}`}

); } return null; }; return ( } /> ); }; export default SystemStatusChart;