Resize chart div automatically