dynamic bar chart implemented