mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
BarGauge: Fixed width of unfilled region not being correct when value is close to 100% (#26193)
* BarGauge: Fixed width of unfilled region not being correct when value is close to 100% * removed accidental change * updated snapshot
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -35,7 +35,7 @@ exports[`BarGauge Render with basic options should render 1`] = `
|
||||
"lineHeight": 1,
|
||||
"paddingLeft": "10px",
|
||||
"paddingRight": "10px",
|
||||
"width": 22,
|
||||
"width": "60px",
|
||||
}
|
||||
}
|
||||
value={
|
||||
|
||||
Reference in New Issue
Block a user