updated code to show how to change bar charts