diff --git a/tomcat/webapps/Trawl/histogram.js b/tomcat/webapps/Trawl/histogram.js
index e30cc6d6479fe87ab08508c96b3efac9e4f87415..ba3951751c1451d0e15f6e8d3cfda47e3f118ccd 100644
--- a/tomcat/webapps/Trawl/histogram.js
+++ b/tomcat/webapps/Trawl/histogram.js
@@ -19,6 +19,7 @@ function histogram(x,y){
 	      			size: 18,
 	      			color: '#7f7f7f'
 	    			}
+		, autosize: true
 	    	},
 	    	yaxis:{title: 'Individual count',
 	    		titlefont: {
diff --git a/tomcat/webapps/Trawl/histogram.jsp b/tomcat/webapps/Trawl/histogram.jsp
index 17cb16360530d4b18de13c1117d23d9c69bf532a..ef34b1596631d88c012a641c0fdbe87c4f20f8b2 100644
--- a/tomcat/webapps/Trawl/histogram.jsp
+++ b/tomcat/webapps/Trawl/histogram.jsp
@@ -5,13 +5,18 @@
 
 <%
 		TrawlExpert te = (TrawlExpert)request.getServletContext().getAttribute("trawl");
-		BasicSearchResult result = te.rangeSearch(2, 1960, 2016);
+		JSONParser parser = new JSONParser();
+		JSONObject req = (JSONObject) parser.parse(request.getReader().readLine());
+
+		Integer taxonId = (int) (long) req.get("taxId");
+		Integer yearLo = (int) (long) req.get("yearF");
+		Integer yearHi = (int) (long) req.get("yearT");
+
+		BasicSearchResult result = te.rangeSearch(taxonId, yearLo, yearHi);
 
 		BST<Integer, Integer> histogram = result.histogram();
 		Iterable<Integer> results = histogram.keys();
 		
-		JSONParser parser = new JSONParser();
-		
 		
 		JSONObject js = new JSONObject();
 		JSONArray x = new JSONArray();
diff --git a/tomcat/webapps/Trawl/script.js b/tomcat/webapps/Trawl/script.js
index 7c70b5f8c980d30a3a510855086a787e03460055..85f8f3dc4dcb2006b494deb0bd2940b962ddfe8e 100644
--- a/tomcat/webapps/Trawl/script.js
+++ b/tomcat/webapps/Trawl/script.js
@@ -199,7 +199,7 @@ function callOutput(){
     var params= JSON.stringify({taxId: Number(taxGroup), yearF: Number(yearFrom), yearT: Number(yearTo)});
 
     //Switch Output Display
-    if(outType === "Histogram"){
+    if(outType === "histogram"){
         reqHistogram(params);
     }
     else{