From: Grégoire Aubert Date: Tue, 27 Aug 2024 11:51:26 +0000 (+0200) Subject: SONAR-22888 Fix overview bubble charts for coverage and duplication X-Git-Tag: 10.7.0.96327~156 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=605597f442d03a1af49039aa330975ccb00459a3;p=sonarqube.git SONAR-22888 Fix overview bubble charts for coverage and duplication --- 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), };