Commit ab2a46bc by Piotr G Committed by GitHub

Gauge: Tweaks short value auto-sizing (#29197)

* Tweaks gauge value auto-sizing

* tweak factor a bit

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
parent d85d547a
......@@ -108,7 +108,7 @@ export class Gauge extends PureComponent<Props> {
// remove gauge & marker width (on left and right side)
// and 10px is some padding that flot adds to the outer canvas
const valueWidth = valueWidthBase - ((gaugeWidth + (showThresholdMarkers ? thresholdMarkersWidth : 0)) * 2 + 10);
const fontSize = calculateFontSize(text, valueWidth, dimension, 1, 48);
const fontSize = calculateFontSize(text, valueWidth, dimension, 1, gaugeWidth * 1.7);
const thresholdLabelFontSize = fontSize / 2.5;
let min = field.min!;
......
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