Add legend

This commit is contained in:
Maximilian Grundke
2018-03-19 18:45:50 +01:00
parent d55b39eb48
commit 0e613d941d
3 changed files with 59 additions and 5 deletions

View File

@@ -7,3 +7,11 @@ h1 = @exercise_collection
#graph
#data.hidden(data-working-times=ActiveSupport::JSON.encode(@exercise_collection.exercise_working_times) data-average-working-time=@exercise_collection.average_working_time)
#legend
- {time: t('exercises.statistics.average_worktime'),
min: 'min. anomaly threshold',
avg: 'average time',
max: 'max. anomaly threshold'}.each_pair do |klass, label|
.legend-entry
div(class="box #{klass}")
.box-label = label