diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-12-18 12:13:43 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-12-18 12:29:53 +0000 |
commit | e04f4c436477252f377634976d87c42e3610f205 (patch) | |
tree | 8c472f941b22c7442a9083140a6b21c8510c46cf | |
parent | 2ea4bb8911be14783c4b85c044d32b170241aa58 (diff) |
Make sure bar chart is given enough colours.
-rw-r--r-- | web/js/dashboard.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/web/js/dashboard.js b/web/js/dashboard.js index 3bac4f983..a6e06e048 100644 --- a/web/js/dashboard.js +++ b/web/js/dashboard.js @@ -179,6 +179,10 @@ $(function(){ rowValues.push( parseInt($(this).find('td').text(), 10) ); }); + for (var i=colours.length; i<rowLabels.length; i++) { + colours[i] = colours[i % colours.length]; + } + var barChart = new Chart($canvas, { type: 'horizontalBar', data: { |