A simplified version of https://www.patricksoftwareblog.com/creating-charts-with-chart-js-in-a-flask-application/ All credit goes to https://www.patricksoftwareblog.com/