I have made a lightning component which includes a chart rendered by Highcharts.

This component works when previewing the app. However, when the component is placed on a employee community page using the community builder, I get 

> Highcharts Error #13 (Rendering div not found)

on page load.

Has anyone experienced similar, or know why this is happening?

Div in component:

    <ltng:require scripts="/resource/Highcharts506/code/highcharts.js" afterScriptsLoaded='{!c.onHighchartsLoaded}'/>

    <div id="container" style="width:100%; height:400px;"></div>

The `onHighchartsLoaded` method calls the Highcharts rendering:

    Highcharts.chart('container', {...});