From cd2baf105ff5e0adbde46f75364e9d65646baec0 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Thu, 22 Aug 2019 18:38:32 +0200 Subject: [PATCH] Fix next color helper --- src/views/graphs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/graphs.js b/src/views/graphs.js index 040d6adaf..abd1fc9f7 100644 --- a/src/views/graphs.js +++ b/src/views/graphs.js @@ -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(); }