Fix next color helper
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ angular.module('Application').controller('GraphsController', ['$scope', '$locati
|
|||||||
var colorIndex = 0;
|
var colorIndex = 0;
|
||||||
var colors = [ '#2196F3', '#3995b1', '#f0ad4e', '#ff4c4c' ];
|
var colors = [ '#2196F3', '#3995b1', '#f0ad4e', '#ff4c4c' ];
|
||||||
function getNextColor() {
|
function getNextColor() {
|
||||||
if (colors[colorIndex++]) return colors[colorIndex];
|
if (colors[colorIndex+1]) return colors[colorIndex++];
|
||||||
return getRandomColor();
|
return getRandomColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user