As per the googleVis tutorial, I am attempting to dynamically embed a chart into my web page using Brew as follows:
html:
<div class="sixteen columns" id="plot">
<% brew('test.brew') %>
</div>
test.brew:
<%
data <- ...
linechart <- gvisLineChart(data, xvar="starttime", yvar=y_var, options=list())%>
<%=linechart$html$chart%>
When the page is created, everything except the javascript is inserted into the html file:
<!-- LineChart generated in R 2.15.3 by googleVis 0.3.3 package -->
<!-- Mon Apr 22 11:40:32 2013 -->
<!-- jsHeader -->
<!-- divChart -->
<div id="LineChartID50a1300cbfea">
</div>
Does anybody know how to fix this problem so that the javascript under is also outputted?
(I know it's there, as I've checked interactively in R and also written the output to file and successfully opened the page in my browser).
print("helloworld")
blocks? – Apr 22 '13 at 15:56