From 605597f442d03a1af49039aa330975ccb00459a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Tue, 27 Aug 2024 13:51:26 +0200 Subject: [PATCH] SONAR-22888 Fix overview bubble charts for coverage and duplication --- .../drilldown/BubbleChartView.tsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx index 5a56b9c6e81..86cdf3e2be9 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx @@ -116,20 +116,15 @@ export default function BubbleChartView(props: Readonly) { return undefined; } + const bubbleColor = + `bubble.${isLegacy ? 'legacy.' : ''}${(colorRating ?? 1) as BubbleColorVal}` as const; + return { x, y, size, - backgroundColor: themeColor( - `bubble.${isLegacy ? 'legacy.' : ''}${colorRating as BubbleColorVal}`, - )({ - theme, - }), - borderColor: themeContrast( - `bubble.${isLegacy ? 'legacy.' : ''}${colorRating as BubbleColorVal}`, - )({ - theme, - }), + backgroundColor: themeColor(bubbleColor)({ theme }), + borderColor: themeContrast(bubbleColor)({ theme }), data: component, tooltip: getTooltip(component, { x, y, size, colors }, bubbleMetrics), }; -- 2.39.5