Merge pull request #1316 from hypoclone/master

Update ChartReportPage.jsx
This commit is contained in:
Anton Tananaev 2024-12-27 19:50:57 -08:00 committed by GitHub
commit 9f85b7b16d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@ import {
FormControl, InputLabel, Select, MenuItem, useTheme,
} from '@mui/material';
import {
CartesianGrid, Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis,
Brush, CartesianGrid, Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis,
} from 'recharts';
import ReportFilter from './components/ReportFilter';
import { formatTime } from '../common/util/formatter';
@ -161,7 +161,19 @@ const ChartReportPage = () => {
formatter={(value, key) => [value, positionAttributes[key]?.name || key]}
labelFormatter={(value) => formatTime(value, 'seconds')}
/>
<Line type="monotone" dataKey={type} stroke={theme.palette.primary.main} />
<Brush
dataKey={timeType}
height={30}
stroke={theme.palette.primary.main}
tickFormatter={() => ''}
/>
<Line
type="monotone"
dataKey={type}
stroke={theme.palette.primary.main}
dot={false}
activeDot={{ r: 6 }}
/>
</LineChart>
</ResponsiveContainer>
</div>