add pie chart visualization code