add resize method for chart