This html generates a base64 encoded image that can be sent in mail reports. The image can also be saved by uncommenting the commented html and javascript lines to enable a download button for downloading the image.
There is also a html-css version of the same that does not use any libraries and relies only on css. This can be useful if you want to display a status chart on websites