mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
Merge pull request #2327 from languitar/hide-in-legend-override
Series override option to hide legend entries
This commit is contained in:
commit
ac1ca639d6
@ -13,6 +13,7 @@ function (_, kbn) {
|
||||
this.color = opts.color;
|
||||
this.valueFormater = kbn.valueFormats.none;
|
||||
this.stats = {};
|
||||
this.legend = true;
|
||||
}
|
||||
|
||||
function matchSeriesOverride(aliasOrRegex, seriesAlias) {
|
||||
@ -55,6 +56,7 @@ function (_, kbn) {
|
||||
if (override.fillBelowTo !== void 0) { this.fillBelowTo = override.fillBelowTo; }
|
||||
if (override.color !== void 0) { this.color = override.color; }
|
||||
if (override.transform !== void 0) { this.transform = override.transform; }
|
||||
if (override.legend !== void 0) { this.legend = override.legend; }
|
||||
|
||||
if (override.yaxis !== void 0) {
|
||||
this.yaxis = override.yaxis;
|
||||
|
@ -130,6 +130,10 @@ function (angular, app, _, kbn, $) {
|
||||
if (panel.legend.hideEmpty && series.allIsNull) {
|
||||
continue;
|
||||
}
|
||||
// ignore series excluded via override
|
||||
if (!series.legend) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var html = '<div class="graph-legend-series';
|
||||
if (series.yaxis === 2) { html += ' pull-right'; }
|
||||
|
@ -104,6 +104,7 @@ define([
|
||||
$scope.addOverrideOption('Y-axis', 'yaxis', [1, 2]);
|
||||
$scope.addOverrideOption('Z-index', 'zindex', [-1,-2,-3,0,1,2,3]);
|
||||
$scope.addOverrideOption('Transform', 'transform', ['negative-Y']);
|
||||
$scope.addOverrideOption('Legend', 'legend', [true, false]);
|
||||
$scope.updateCurrentOverrides();
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user