Skip to content

Commit

Permalink
Minor: improve UI of filters in test case graph
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaileshParmar11 committed Sep 10, 2024
1 parent 7f3a9f3 commit c3cddf7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function TestSummaryGraph({
dataKey: info.label,
type: 'line',
color: info.color,
inactive: !(activeKeys.length === 0 || activeKeys.includes(info.label)),
}));

legendPayload.push({
Expand All @@ -145,7 +146,7 @@ function TestSummaryGraph({
} as Payload);

return legendPayload;
}, [chartData]);
}, [chartData?.information, activeKeys]);

const handleLegendClick: LegendProps['onClick'] = (event) => {
if (event.dataKey === 'Incident') {
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@
}
}
}
.custom-test-summary-graph {
.recharts-legend-item {
cursor: pointer;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export const PROFILER_METRIC = [
'customMetricsProfile',
];

export const INCIDENT = 'Incident';

export const PROFILER_FILTER_RANGE: DateFilterType = {
yesterday: {
days: 1,
Expand Down

0 comments on commit c3cddf7

Please sign in to comment.