Minor: improve UI of filters in test case graph (#17775)

This commit is contained in:
Shailesh Parmar 2024-09-12 19:53:51 +05:30 committed by GitHub
parent 59854de58d
commit d785276b8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View File

@ -135,6 +135,7 @@ function TestSummaryGraph({
dataKey: info.label,
type: 'line',
color: info.color,
inactive: !(activeKeys.length === 0 || activeKeys.includes(info.label)),
}));
legendPayload.push({
@ -145,7 +146,7 @@ function TestSummaryGraph({
} as Payload);
return legendPayload;
}, [chartData]);
}, [chartData?.information, activeKeys]);
const handleLegendClick: LegendProps['onClick'] = (event) => {
if (event.dataKey === 'Incident') {
@ -226,7 +227,7 @@ function TestSummaryGraph({
return (
<ResponsiveContainer
className="bg-white"
className="bg-white custom-test-summary-graph"
id={`${testCaseName}_graph`}
minHeight={minHeight ?? 400}>
<ComposedChart

View File

@ -33,3 +33,8 @@
}
}
}
.custom-test-summary-graph {
.recharts-legend-item {
cursor: pointer;
}
}

View File

@ -76,6 +76,8 @@ export const PROFILER_METRIC = [
'customMetricsProfile',
];
export const INCIDENT = 'Incident';
export const PROFILER_FILTER_RANGE: DateFilterType = {
yesterday: {
days: 1,