factor out filters
make bar chart directive more generic
make pie chart directive more generic