Improve graph padding. Add window resize event.