Make bar charts more dynamic