Fix barchart reverse sorting after update

When you have a barchart automatic sorting and reversed sorting both selected, the sorting is not in reverse-order if you switch to another set of values. This pull request fixes that.