fix x axis and legend
merge final barchart branch with master