Replaced the massive function that generated the bars in a dimension view with just the code in the function