Make barChart directive more generic to allow different properties and units