]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-22888 Fix overview bubble charts for coverage and duplication
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Tue, 27 Aug 2024 11:51:26 +0000 (13:51 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 27 Aug 2024 20:02:40 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx

index 5a56b9c6e81836cf6646d4c8d0dfdbcf5f7d7738..86cdf3e2be9886185e4cdeaf0bcafd19480c0094 100644 (file)
@@ -116,20 +116,15 @@ export default function BubbleChartView(props: Readonly<Props>) {
           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),
         };