fix width of bars

- import changes from SVN repository
- fix width of bars and padding around graph
- reuse code between lines and bars