Merge pull request #143 from linquize/scale

Fix containers, images chart scale too small
pull/2/head
Kevan Ahlquist 9 years ago
commit 27799e7033

@ -215,11 +215,15 @@ angular.module('dockerui.services', ['ngResource'])
var labels = [];
data = [];
var keys = Object.keys(map);
var max = 1;
for (i = keys.length - 1; i > -1; i--) {
var k = keys[i];
labels.push(k);
data.push(map[k]);
if (map[k] > max) {
max = map[k];
}
}
var dataset = {
fillColor: "rgba(151,187,205,0.5)",
@ -236,7 +240,7 @@ angular.module('dockerui.services', ['ngResource'])
scaleStepWidth: 1,
pointDotRadius: 1,
scaleOverride: true,
scaleSteps: labels.length
scaleSteps: max
});
}
};

Loading…
Cancel
Save