simplified bar chart animations and added invert flag