refactored code so all drawing done within data request. also now selecting main div by id and selecting svg as child of that id
added documentation, and removed redundant margin.left and padding-left
offset fix, dy set to size of y axis title