Commit a3f2f574 by Torkel Ödegaard

fix(singlestat): fixed Gauge positioning issue, fixes #5143

parent ec19a971
......@@ -234,13 +234,10 @@ class SingleStatCtrl extends MetricsPanelCtrl {
var panel = ctrl.panel;
var templateSrv = this.templateSrv;
var data, linkInfo;
var width, height;
var $panelContainer = elem.find('.panel-container');
elem = elem.find('.singlestat-panel');
function setElementHeight() {
width = elem.width();
height = elem.height();
elem.css('height', ctrl.height + 'px');
}
......@@ -287,6 +284,9 @@ class SingleStatCtrl extends MetricsPanelCtrl {
}
function addGauge() {
var width = elem.width();
var height = elem.height();
ctrl.invalidGaugeRange = false;
if (panel.gauge.minValue > panel.gauge.maxValue) {
ctrl.invalidGaugeRange = true;
......
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