diff options
author | Simon Rettberg | 2023-01-05 16:04:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-01-05 16:04:58 +0100 |
commit | dd9974f776dde086752af4e80828fa1ed76a977f (patch) | |
tree | 7296f10173819aa98343e8ff64721387da63b8c9 /modules-available/statistics/templates/summary.html | |
parent | [statistics] Fix graph background if there are no lectures (diff) | |
download | slx-admin-dd9974f776dde086752af4e80828fa1ed76a977f.tar.gz slx-admin-dd9974f776dde086752af4e80828fa1ed76a977f.tar.xz slx-admin-dd9974f776dde086752af4e80828fa1ed76a977f.zip |
[statistics] Add hint regarding blue tint of usage graph
Diffstat (limited to 'modules-available/statistics/templates/summary.html')
-rw-r--r-- | modules-available/statistics/templates/summary.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules-available/statistics/templates/summary.html b/modules-available/statistics/templates/summary.html index a0efd531..751a9bed 100644 --- a/modules-available/statistics/templates/summary.html +++ b/modules-available/statistics/templates/summary.html @@ -30,7 +30,8 @@ var markings = {{{markings}}}; var markMax = Math.max(...markings) * 3; - if (markMax <= 0) markMax = 1; + var showLegend = markMax > 0; + if (markMax < 8) markMax = 8; var oldDraw = Chart.prototype._drawDatasets; @@ -65,12 +66,11 @@ pointHitRadius: 6, interaction: { mode: 'index' }, plugins: { - tooltip: { callbacks: { label: function(context) { - if (context.dataset.label === 'Courses') - return null; - return context.dataset.label + ': ' + context.parsed.y; - } - }}, + subtitle: { + display: showLegend, + text: '{{lang_graphLectureTitle}}', + position: 'bottom', + }, legend: {position: 'left' }, } }}); |