Added barchart function.