Changing behavior to always obey the show legend option in grafana. without hideLegend=false, grafana defaults to the graphite behavior of hiding the legend at (default 10) X number of series. Also should be checking scope.panel.legend.show.

This commit is contained in:
Cameron Ruatta 2014-04-10 14:10:29 -07:00
parent 993a2daccc
commit 2ea3f7a558

View File

@ -347,7 +347,7 @@ function (angular, $, kbn, moment, _) {
url += scope.panel.stack ? '&areaMode=stacked' : ''; url += scope.panel.stack ? '&areaMode=stacked' : '';
url += scope.panel.fill !== 0 ? ('&areaAlpha=' + (scope.panel.fill/10).toFixed(1)) : ''; url += scope.panel.fill !== 0 ? ('&areaAlpha=' + (scope.panel.fill/10).toFixed(1)) : '';
url += scope.panel.linewidth !== 0 ? '&lineWidth=' + scope.panel.linewidth : ''; url += scope.panel.linewidth !== 0 ? '&lineWidth=' + scope.panel.linewidth : '';
url += scope.panel.legend ? '' : '&hideLegend=true'; url += scope.panel.legend.show ? '&hideLegend=false' : '&hideLegend=true';
url += scope.panel.grid.min !== null ? '&yMin=' + scope.panel.grid.min : ''; url += scope.panel.grid.min !== null ? '&yMin=' + scope.panel.grid.min : '';
url += scope.panel.grid.max !== null ? '&yMax=' + scope.panel.grid.max : ''; url += scope.panel.grid.max !== null ? '&yMax=' + scope.panel.grid.max : '';
url += scope.panel['x-axis'] ? '' : '&hideAxes=true'; url += scope.panel['x-axis'] ? '' : '&hideAxes=true';