aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-12-18 12:13:43 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-12-18 12:29:53 +0000
commite04f4c436477252f377634976d87c42e3610f205 (patch)
tree8c472f941b22c7442a9083140a6b21c8510c46cf /web/js
parent2ea4bb8911be14783c4b85c044d32b170241aa58 (diff)
Make sure bar chart is given enough colours.
Diffstat (limited to 'web/js')
-rw-r--r--web/js/dashboard.js4
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: {