Gauge: Fix switching orientation issue when switching from BarGauge to Gauge (#17064)

This commit is contained in:
Torkel Ödegaard
2019-05-14 16:33:47 +02:00
committed by GitHub
parent 3df94c6f27
commit 68ad93f410
2 changed files with 4 additions and 4 deletions

View File

@@ -76,7 +76,7 @@ export class Gauge extends PureComponent<Props> {
);
const gaugeWidthReduceRatio = showThresholdLabels ? 1.5 : 1;
const gaugeWidth = Math.min(dimension / 5, 40) / gaugeWidthReduceRatio;
const gaugeWidth = Math.min(dimension / 5.5, 40) / gaugeWidthReduceRatio;
const thresholdMarkersWidth = gaugeWidth / 5;
const fontSize = Math.min(dimension / 5.5, 100) * (value.text !== null ? this.getFontScale(value.text.length) : 1);
const thresholdLabelFontSize = fontSize / 2.5;