diff --git a/packages/grafana-ui/src/components/BarGauge/BarGauge.tsx b/packages/grafana-ui/src/components/BarGauge/BarGauge.tsx index 79a80ced44b..f28aceb8952 100644 --- a/packages/grafana-ui/src/components/BarGauge/BarGauge.tsx +++ b/packages/grafana-ui/src/components/BarGauge/BarGauge.tsx @@ -605,9 +605,6 @@ function getValueStyles( styles.paddingRight = `${VALUE_LEFT_PADDING}px`; // Need to remove the left padding from the text width constraints textWidth -= VALUE_LEFT_PADDING; - - // adjust width of title box - styles.width = measureText(formattedValueString, styles.fontSize).width + VALUE_LEFT_PADDING * 2; } return styles; diff --git a/packages/grafana-ui/src/components/BarGauge/__snapshots__/BarGauge.test.tsx.snap b/packages/grafana-ui/src/components/BarGauge/__snapshots__/BarGauge.test.tsx.snap index 0ecb489b449..3b39c8362dc 100644 --- a/packages/grafana-ui/src/components/BarGauge/__snapshots__/BarGauge.test.tsx.snap +++ b/packages/grafana-ui/src/components/BarGauge/__snapshots__/BarGauge.test.tsx.snap @@ -35,7 +35,7 @@ exports[`BarGauge Render with basic options should render 1`] = ` "lineHeight": 1, "paddingLeft": "10px", "paddingRight": "10px", - "width": 22, + "width": "60px", } } value={