Commit fea99e3e authored by Xavier Watkins's avatar Xavier Watkins
Browse files

Add font size option for chart

parent e78387ce
......@@ -18,6 +18,9 @@
<label>Term box height
<input type="number" ng-model="$parent.termBoxHeight">
</label>
<label>Font Size
<input type="number" ng-model="$parent.fontSize">
</label>
<label>
<input type="checkbox" ng-model="$parent.showSlimColours"> Show slim colours
</label>
......
......@@ -14,6 +14,7 @@ angular
scope.showIds = true;
scope.termBoxWidth = 85;
scope.termBoxHeight = 55;
scope.fontSize = 11;
scope.showSlimColours = false;
scope.showChildren = false;
......@@ -28,8 +29,8 @@ angular
return;
if(!scope.termBoxWidth)
return;
var chartPromise = chartService.getChart(scope.ids, scope.showIds, scope.showKey, scope.termBoxWidth, scope.termBoxHeight, scope.showSlimColours, scope.showChildren);
var imageMapPromise = chartService.getChart(scope.ids, scope.showIds, scope.showKey, scope.termBoxWidth, scope.termBoxHeight, scope.showSlimColours, scope.showChildren, true);
var chartPromise = chartService.getChart(scope.ids, scope.showIds, scope.showKey, scope.termBoxWidth, scope.termBoxHeight, scope.fontSize, scope.showSlimColours, scope.showChildren);
var imageMapPromise = chartService.getChart(scope.ids, scope.showIds, scope.showKey, scope.termBoxWidth, scope.termBoxHeight, scope.fontSize, scope.showSlimColours, scope.showChildren, true);
chartPromise.then(function(d) {
scope.img = d.data;
});
......
......@@ -433,7 +433,7 @@ wsService.factory('chartService', [
'ENV',
function ($http, ENV) {
return {
getChart: function (ids, showIds, showKey, termBoxWidth, termBoxHeight, showSlimColours, showChildren, map) {
getChart: function (ids, showIds, showKey, termBoxWidth, termBoxHeight, fontSize, showSlimColours, showChildren, map) {
var type = (ids.lastIndexOf('GO:') >= 0) ? 'go' : 'eco';
var mapUrl = map ? '/coords?' : '?base64=true';
return $http.get(ENV.apiEndpoint + '/ontology/' + type + '/terms/' + ids + '/chart' + mapUrl
......@@ -441,6 +441,7 @@ wsService.factory('chartService', [
+ '&showKey=' + showKey
+ '&termBoxWidth=' + termBoxWidth
+ '&termBoxHeight=' + termBoxHeight
+ '&fontSize=' + fontSize
+ '&showSlimColours=' + showSlimColours
+ '&showChildren=' + showChildren
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment