Fix chart size before rendering.