refactored svg barchart visualization