Factor apart chart-adding code

Allows us to quickly swap the order of sections around. Also makes it
easier to attach the text to a single chart in one grouped view.