refactor drawing 2d bar charts to common function
refactor functions that aggregate values on the x-axis
Rename methods to be more clear. Add commits per dev