dashboard: add graph score

This commit is contained in:
nemunaire 2020-01-30 04:17:53 +01:00
parent d66de6fb3c
commit b9fa5accff
5 changed files with 216 additions and 8 deletions

View file

@ -871,9 +871,53 @@ angular.module("FICApp")
type: "table",
params: { kind: "levels", levels: [1,2,3,4,5], themes: $scope.themes.map(function(z, i) { return z.id; }), total: true },
},
{
type: "graph",
params: { teams: [], height: 400, legend: true },
},
];
angular.forEach($scope.teams, function(team, tid) {
if (team.rank >= 1 && team.rank <= 9)
$scope.display.scenes[1].params.teams.push(tid)
});
$scope.display.side = [
{
type: "exercice_follow",
params: { },
},
];
}
else if (scene == "summary2") {
$scope.display.scenes = [
{
type: "graph",
params: { teams: [], height: 400, legend: false },
},
{
type: "rank",
params: { limit: 10, which: "general" },
params: { limit: 10, which: "general", legend: true },
},
];
angular.forEach($scope.teams, function(team, tid) {
if (team.rank >= 1 && team.rank <= 9)
$scope.display.scenes[0].params.teams.push(tid)
});
$scope.display.side = [
{
type: "exercice_follow",
params: { },
},
];
}
else if (scene == "summary3") {
$scope.display.scenes = [
{
type: "table",
params: { kind: "levels", levels: [1,2,3,4,5], themes: $scope.themes.map(function(z, i) { return z.id; }), total: true },
},
{
type: "rank",
params: { limit: 10, which: "general", legend: false },
},
];
$scope.display.side = [