Chart is rendered but hidden (svg width is 0) on initial page load in Chromium

Chart is rendered but hidden (svg width is 0) on initial page load in Chromium

I'm having a strange problem with my svg/jquery app on Chromium on Linux. My code/HTML/CSS is below.

  1.                 chart = $('#chart').svg('get');
                    chart.graph.noDraw();
                    chart.graph.type("line");
                    chart.graph.area(0.05, 0.1, 0.95, 0.85);


  2.         <div id="chart">
            </div>
  3.         #chart {
                height: 700px;
            }




Sometimes when I first visit the page with Chromium, the chart is rendered but the svg element's width is 0. 90% of the time it's set correctly. Debugging it is hard because it mostly seems to happen on the initial page load and the dev tools aren't available in time. Can anyone spot anything obvious in my code?

Thanks