fixed issue with graph drawing mispositioned when document has been scrolled down