From c0cf0cb802adad24252ce1307c4c896edd566870 Mon Sep 17 00:00:00 2001 From: Qtax Date: Sat, 5 Dec 2015 22:08:30 +0100 Subject: [PATCH] Added an option to set a min-width for the graphs side table/area. --- public/app/plugins/panels/graph/axisEditor.html | 7 +++++++ public/app/plugins/panels/graph/legend.js | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/public/app/plugins/panels/graph/axisEditor.html b/public/app/plugins/panels/graph/axisEditor.html index d8a537dda46..13bc78b7dfe 100644 --- a/public/app/plugins/panels/graph/axisEditor.html +++ b/public/app/plugins/panels/graph/axisEditor.html @@ -181,6 +181,13 @@
  • +
  • + Side width +
  • +
  • + +
  • diff --git a/public/app/plugins/panels/graph/legend.js b/public/app/plugins/panels/graph/legend.js index 4f4a0d8ee06..2d3f8ac3b90 100644 --- a/public/app/plugins/panels/graph/legend.js +++ b/public/app/plugins/panels/graph/legend.js @@ -101,6 +101,10 @@ function (angular, _, $) { $container.empty(); + // Set min-width if side style and there is a value, otherwise remove the CSS propery + var width = panel.legend.rightSide && panel.legend.sideWidth ? panel.legend.sideWidth + "px" : ""; + $container.css("min-width", width); + $container.toggleClass('graph-legend-table', panel.legend.alignAsTable === true); if (panel.legend.alignAsTable) {