Commit f2f70998 by Patrick O'Carroll

fixed so legend right works like legend under on small screens

parent 3c9f31a0
......@@ -227,6 +227,8 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
}
function renderLegendElement(tableHeaderElem) {
let legendWidth = elem.width();
var seriesElements = renderSeriesLegendElements();
if (panel.legend.alignAsTable) {
......@@ -238,7 +240,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
elem.append(seriesElements);
}
if (!panel.legend.rightSide) {
if (!panel.legend.rightSide || (panel.legend.rightSide && legendWidth !== 10)) {
addScrollbar();
} else {
destroyScrollbar();
......
......@@ -6,11 +6,11 @@
&--legend-right {
@include media-breakpoint-up(sm) {
flex-direction: row;
}
.graph-legend {
flex: 0 1 10px;
max-height: 100%;
.graph-legend {
flex: 0 1 10px;
max-height: 100%;
}
}
.graph-legend-series {
......
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