Fix tooltip info for pie chart hover.
Extract shared graph/chart code.