adding types and updating barchart view