Commit b1e48f42 by Torkel Ödegaard Committed by GitHub

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
parent 95bf0647
......@@ -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={
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment