mirror of
https://github.com/grafana/grafana.git
synced 2025-01-18 04:23:33 -06:00
fix(graph): fixed legend color when having many many series, fixes #2359
This commit is contained in:
parent
666013b010
commit
ea198fea6e
@ -230,17 +230,17 @@ function (angular, _, kbn) {
|
||||
this.addAllOption = function(variable) {
|
||||
var allValue = '';
|
||||
switch(variable.allFormat) {
|
||||
case 'wildcard':
|
||||
allValue = '*';
|
||||
case 'wildcard':
|
||||
allValue = '*';
|
||||
break;
|
||||
case 'regex wildcard':
|
||||
allValue = '.*';
|
||||
case 'regex wildcard':
|
||||
allValue = '.*';
|
||||
break;
|
||||
case 'regex values':
|
||||
allValue = '(' + _.pluck(variable.options, 'text').join('|') + ')';
|
||||
case 'regex values':
|
||||
allValue = '(' + _.pluck(variable.options, 'text').join('|') + ')';
|
||||
break;
|
||||
default:
|
||||
allValue = '{';
|
||||
default:
|
||||
allValue = '{';
|
||||
allValue += _.pluck(variable.options, 'text').join(',');
|
||||
allValue += '}';
|
||||
}
|
||||
|
@ -175,7 +175,8 @@ function (angular, app, $, _, kbn, moment, TimeSeries, PanelMeta) {
|
||||
$scope.seriesHandler = function(seriesData, index) {
|
||||
var datapoints = seriesData.datapoints;
|
||||
var alias = seriesData.target;
|
||||
var color = $scope.panel.aliasColors[alias] || $rootScope.colors[index];
|
||||
var colorIndex = index % $rootScope.colors.length;
|
||||
var color = $scope.panel.aliasColors[alias] || $rootScope.colors[colorIndex];
|
||||
|
||||
var series = new TimeSeries({
|
||||
datapoints: datapoints,
|
||||
|
Loading…
Reference in New Issue
Block a user