make timegraph scale

Hello,
this commit makes the timegraph scale on resize