Fixed issue with text bounding boxes not being correctly computed when the chart was added to a container with display:none !important. Closes #2631.