documenting code for clarification in views/assignment/chart.php