Show maximum 10 steps of chart

pull/2/head
Linquize 9 years ago
parent 437e171639
commit d7082c3959

@ -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
});
}
};

Loading…
Cancel
Save