I have fixed it.
My Google charts component was loading too slowly (at least, in Xerte, not when I run it stand-alone).
Previously, this would not work, as on the first viewing of the page loading was not yet finished and I would get an 'google is not defined' error:
Code:
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
</script>
This does work:
Code:
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
LoadGoogle();
function LoadGoogle()
{
if(typeof google != 'undefined')
{
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
}
else
{
// Retry later...
setTimeout(LoadGoogle, 30);
}
}
</script>