mirror of https://github.com/portainer/portainer
Fix containers, images chart scale too small
parent
01db85ebc7
commit
3ac1ac6086
|
@ -215,11 +215,15 @@ angular.module('dockerui.services', ['ngResource'])
|
||||||
var labels = [];
|
var labels = [];
|
||||||
data = [];
|
data = [];
|
||||||
var keys = Object.keys(map);
|
var keys = Object.keys(map);
|
||||||
|
var max = 1;
|
||||||
|
|
||||||
for (i = keys.length - 1; i > -1; i--) {
|
for (i = keys.length - 1; i > -1; i--) {
|
||||||
var k = keys[i];
|
var k = keys[i];
|
||||||
labels.push(k);
|
labels.push(k);
|
||||||
data.push(map[k]);
|
data.push(map[k]);
|
||||||
|
if (map[k] > max) {
|
||||||
|
max = map[k];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var dataset = {
|
var dataset = {
|
||||||
fillColor: "rgba(151,187,205,0.5)",
|
fillColor: "rgba(151,187,205,0.5)",
|
||||||
|
@ -236,7 +240,7 @@ angular.module('dockerui.services', ['ngResource'])
|
||||||
scaleStepWidth: 1,
|
scaleStepWidth: 1,
|
||||||
pointDotRadius: 1,
|
pointDotRadius: 1,
|
||||||
scaleOverride: true,
|
scaleOverride: true,
|
||||||
scaleSteps: labels.length
|
scaleSteps: max
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue