added onresize event to redraw timeline and graph2d if needed