Don't try to resize if chart isn't present

This avoids a crash when (for example) the controls arrive before the
chart is ready.