Having created a new block to chart a learner's progress through a course, we now need to develop a set of charts showing the progress through all the courses on which a learner is enrolled. This can then be displayed on their dashboard.
Recall that the dashboard wireframe (agreed by the client) demands doughnut charts, rather than pie charts--with a percentage completion displayed in the center of the chart:
To display text in the center of the chart, we will need to register a new function with the Chart.js library to render the text before the doughnut chart is drawn. We need to take care to ensure that the text ...