Refactor aggregate count bar chart into JS function

Similar to previous commit for FVC.