mirror of
https://github.com/portainer/portainer.git
synced 2025-07-28 01:39:39 +02:00
Merge pull request #168 from linquize/chart-max-steps
Show maximum 10 steps of chart
This commit is contained in:
commit
06c2ac4d5c
1 changed files with 4 additions and 2 deletions
|
@ -225,6 +225,7 @@ angular.module('dockerui.services', ['ngResource'])
|
||||||
max = map[k];
|
max = map[k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var steps = Math.min(max, 10);
|
||||||
var dataset = {
|
var dataset = {
|
||||||
fillColor: "rgba(151,187,205,0.5)",
|
fillColor: "rgba(151,187,205,0.5)",
|
||||||
strokeColor: "rgba(151,187,205,1)",
|
strokeColor: "rgba(151,187,205,1)",
|
||||||
|
@ -237,10 +238,11 @@ angular.module('dockerui.services', ['ngResource'])
|
||||||
datasets: [dataset]
|
datasets: [dataset]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
scaleStepWidth: 1,
|
scaleStepWidth: Math.ceil(max / steps),
|
||||||
pointDotRadius: 1,
|
pointDotRadius: 1,
|
||||||
|
scaleIntegersOnly: true,
|
||||||
scaleOverride: true,
|
scaleOverride: true,
|
||||||
scaleSteps: max
|
scaleSteps: steps
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue