change index to bar chart