made isEnoughSpace much faster
reorganized getTickValues to make it more clear
also reorganized _doRender to make it more clear