got bar chart sorting to work