build charts based on a type