Fix next color helper

This commit is contained in:
Johannes Zellner
2019-08-22 18:38:32 +02:00
parent 3366acde58
commit cd2baf105f

View File

@@ -36,7 +36,7 @@ angular.module('Application').controller('GraphsController', ['$scope', '$locati
var colorIndex = 0;
var colors = [ '#2196F3', '#3995b1', '#f0ad4e', '#ff4c4c' ];
function getNextColor() {
if (colors[colorIndex++]) return colors[colorIndex];
if (colors[colorIndex+1]) return colors[colorIndex++];
return getRandomColor();
}