done some refactoring of barchart plotting