forked from viaacode/mijn-viaa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard-config.js
51 lines (49 loc) · 1.76 KB
/
dashboard-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
function getGraphsFromConfig()
{
return {
// Note: chartId value doesn't matter at all but has to be unique
// apiUrls correspond with the dropdown menu options
// charType: line, bar, doughnut, pie, radar, polar, horizontalBar
evolutionRegistration: {
chartId: 'evoReg',
chartTitle: 'Evolutie Registratie',
chartType: 'line',
chartFormat: 0,
apiUrls: [
'/api/reports/ams/items/last-day',
'/api/reports/ams/items/last-week',
'/api/reports/ams/items/last-month',
'/api/reports/ams/items/last-year'
],
data: {},
errormessages: [],
activeView: 'effective',
isLoading: false
},
archiveGrowth: {
chartId: 'archiGrowth',
chartTitle: 'Aangroei Archief',
chartType: 'line',
chartFormat: 0,
apiUrls: [
'/api/reports/mam/items/last-day',
'/api/reports/mam/items/last-week',
'/api/reports/mam/items/last-month',
'/api/reports/mam/items/last-year'
],
data: {},
errormessages: [],
activeView: 'cumulative',
isLoading: false
},
};
}
// formatType should match the option of the graph dropdown menu
// Choose a date format per graph view
function getFormatString(formatType) {
if(formatType == '0') formatString = 'DD/MM HH:mm';
else if(formatType == 1) formatString = 'DD/MM/YYYY';
else if(formatType == 2) formatString = 'DD/MM/YYYY';
else if(formatType == 3) formatString = 'DD/MM/YYYY';
return formatString;
}