Separate out piechart boilerplate, and simplify.

Auditors: alpert