diff --git a/app/shared/services.js b/app/shared/services.js index 780726fd5..805f1e399 100644 --- a/app/shared/services.js +++ b/app/shared/services.js @@ -225,6 +225,7 @@ angular.module('dockerui.services', ['ngResource']) max = map[k]; } } + var steps = Math.min(max, 10); var dataset = { fillColor: "rgba(151,187,205,0.5)", strokeColor: "rgba(151,187,205,1)", @@ -237,10 +238,11 @@ angular.module('dockerui.services', ['ngResource']) datasets: [dataset] }, { - scaleStepWidth: 1, + scaleStepWidth: Math.ceil(max / steps), pointDotRadius: 1, + scaleIntegersOnly: true, scaleOverride: true, - scaleSteps: max + scaleSteps: steps }); } };