Move the donut chart rendering code to a separate view so we can resuse
it later if necessary