String user = (request.getParameter("username") != null ) ? request.getParameter("username") : "";String isWebUser = (request.getParameter("isWebUser") != null ) ? request.getParameter("isWebUser") : "";
<!--Here I fill the array with some values and I pass those values to the chart-->
<script type="text/javascript" 'modules':[{ 'name':'visualization', 'version':'1', 'packages':['corechart'] }] }"></script> <!-- <script type="text/javascript" src="https://www.google.com/jsapi"></script>--> <script type="text/javascript"> //google.load('visualization', '1', {packages: ['corechart', 'line']}); //google.load('modules':[{'name':'visualization', 'version':'1', 'packages':['corechart']}]); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Notas','<%=user%>','<%=usuario7d %>'], <% for ( int j=0; j < 7; j++) { %> [ <%=j %>, <%=vectFinal_7[j][1] %>, <%=vectFinal_7MR[j][1] %> ], <% } %> ]); var options = { title: '7 dias', curveType: 'function', legend: { position: 'bottom' } }; var chart = new google.visualization.LineChart(document.getElementById('curve_chart_7')); chart.draw(data, options); } </script> <script type="text/javascript"> google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Notas','<%=user%>','<%=usuario30d %>'], <% for ( int j=0; j < 30; j++) { %> [ <%=j %>, <%=vectFinal_30[j][1] %>, <%=vectFinal_30MR[j][1] %>], <% } %> ]); var options = { title: '30 dias', curveType: 'function', legend: { position: 'bottom' } }; var chart = new google.visualization.LineChart(document.getElementById('curve_chart_30')); chart.draw(data, options); } </script>--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
script element and setting its source to the same"https://www.google.com/jsapi" URL with an additional query callback parameter. The callback will be executed when the loader is ready.--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/I32Dsu5CXY0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
function loadApi() {
google.load("visualization", "1", {"callback" : pageLoaded});
}
Make sure the DOM is ready when you call google.load with the callback option. You need to do this because the loader may will to append an element to the DOM.