Commit 5cd73cea by Torkel Ödegaard

small code cleanup in grafanaGraph

parent 347f6aed
......@@ -45,7 +45,15 @@ function (angular, $, kbn, moment, _) {
function setElementHeight() {
try {
elem.css({ height: scope.height || scope.panel.height || scope.row.height });
var height = scope.height || scope.panel.height || scope.row.height;
height = height.replace('px', '') - 32; // subtract panel title bar
if (scope.panel.legend.show) {
height = height - 35; // subtract one line legend
}
elem.css('height', height + 'px');
return true;
} catch(e) { // IE throws errors sometimes
return false;
......
......@@ -77,7 +77,7 @@ code, pre {
}
.panel-content {
padding: 0px 10px 10px 10px;
padding: 0px 10px 0 10px;
}
.panel-title {
......
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