From 714e03c1623352037ce167ad3e5feabd5d13502f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 15 Mar 2019 12:45:37 +0100 Subject: [PATCH] Bar gauge auto lcd cell count --- packages/grafana-ui/src/components/BarGauge/BarGauge.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/BarGauge/BarGauge.tsx b/packages/grafana-ui/src/components/BarGauge/BarGauge.tsx index 2ac5a9e287e..448c86ac78d 100644 --- a/packages/grafana-ui/src/components/BarGauge/BarGauge.tsx +++ b/packages/grafana-ui/src/components/BarGauge/BarGauge.tsx @@ -193,7 +193,7 @@ export class BarGauge extends PureComponent { const valueRange = maxValue - minValue; const maxSize = this.size * BAR_SIZE_RATIO; const cellSpacing = 5; - const cellCount = 25; + const cellCount = maxSize / 20; const cellSize = (maxSize - cellSpacing * cellCount) / cellCount; const colors = this.getValueColors(); const valueStyles = this.getValueStyles(valueFormatted, colors.value, this.size - maxSize);