diff --git a/frontend/src/component/impact-metrics/ImpactMetricsChart.tsx b/frontend/src/component/impact-metrics/ImpactMetricsChart.tsx index 80eb3ea4b1..ff18d44b83 100644 --- a/frontend/src/component/impact-metrics/ImpactMetricsChart.tsx +++ b/frontend/src/component/impact-metrics/ImpactMetricsChart.tsx @@ -90,6 +90,9 @@ export const ImpactMetricsChart: FC = ({ description='' /> ); + + const hasManyLabels = Object.keys(selectedLabels).length > 0; + const cover = notEnoughData ? placeholder : isLoading; const chartOptions = shouldShowPlaceholder @@ -132,7 +135,9 @@ export const ImpactMetricsChart: FC = ({ }, plugins: { legend: { - display: timeSeriesData && timeSeriesData.length > 1, + display: + timeSeriesData && + (hasManyLabels || timeSeriesData.length > 1), position: 'bottom' as const, labels: { usePointStyle: true,