begin on category-breakdown-chart code from Bostock's example