Strabon

changeset 1196:662bd232ac11

forgot to add the respective div section where the chart will be displayed
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Mon Jul 08 17:06:37 2013 +0300 (2013-07-08)
parents a8ef6491cd0e
children 87598f13d5cf
files endpoint/WebContent/query.jsp
line diff
     1.1 --- a/endpoint/WebContent/query.jsp	Mon Jul 08 16:50:49 2013 +0300
     1.2 +++ b/endpoint/WebContent/query.jsp	Mon Jul 08 17:06:37 2013 +0300
     1.3 @@ -215,7 +215,6 @@
     1.4  
     1.5        // Set a callback to run when the Google Visualization API is loaded.
     1.6  
     1.7 -   		google.setOnLoadCallback(drawChart);
     1.8     		
     1.9        // Callback that creates and populates a data table,
    1.10        // instantiates the pie chart, passes in the data and
    1.11 @@ -225,12 +224,6 @@
    1.12          	
    1.13        function drawChart() {
    1.14        
    1.15 -         <% if (request.getAttribute("response") != null) {
    1.16 -        	if (request.getParameter("format").equals("CHART")) {
    1.17 -        		 StrabonBeanWrapper sw = (StrabonBeanWrapper) request.getAttribute("response");
    1.18 -        		 result = sw.getResult();
    1.19 -        		 label1 = result.getBindingNames().get(0).toString();
    1.20 -        		 label2 = result.getBindingNames().get(1).toString();%>
    1.21   		
    1.22          // Create the data table.
    1.23          var data = new google.visualization.DataTable();
    1.24 @@ -239,14 +232,13 @@
    1.25          		 results= (List<String[]>)request.getAttribute("response");
    1.26          		arr[0] = results.get(0)[0];
    1.27          		arr[0] = results.get(0)[1];	
    1.28 -        	%>
    1.29 -        <%
    1.30 +     
    1.31          int i=1;
    1.32          while(i <= results.size()){
    1.33          	arr =  results.get(i);
    1.34 -        %>	
    1.35 +       	
    1.36    
    1.37 -        <% i++;} %>
    1.38 +         i++;} %>
    1.39          // Set chart options
    1.40          var options = {'title':'Displaying results in chart',
    1.41                         'width':400,
    1.42 @@ -407,5 +399,6 @@
    1.43  	<div id="map_canvas"></div>
    1.44  <%}%>
    1.45  <div id="divResultsEnd" style="height: 1px; width 1px"></div>
    1.46 + <div id="chart_div"></div>
    1.47  </body>
    1.48  </html>