Improve finding chart size with no offsetWidth.

I've modified getContainer() to do a better job of approximating the size that the chart should be rendered at when it is actually shown.