diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-08-19 16:31:11 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-08-19 16:31:11 +0100 |
| commit | 95296b31bf787a0130380b1db6cd8d6e62d59a7d (patch) | |
| tree | 34c4c08e9d0887b9bc261b74ce3c4696ce613d0e /app | |
| parent | Remove dataset name from user (diff) | |
| download | AnnotateChange-95296b31bf787a0130380b1db6cd8d6e62d59a7d.tar.gz AnnotateChange-95296b31bf787a0130380b1db6cd8d6e62d59a7d.zip | |
Change height of graph in annotation view
Diffstat (limited to 'app')
| -rw-r--r-- | app/static/js/makeChart.js | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/app/static/js/makeChart.js b/app/static/js/makeChart.js index 5d759bf..b6e3de2 100644 --- a/app/static/js/makeChart.js +++ b/app/static/js/makeChart.js @@ -50,13 +50,23 @@ function noZoom() { d3.event.preventDefault(); } -function baseChart(selector, data, clickFunction, annotations, annotationFunction) { +function baseChart( + selector, + data, + clickFunction, + annotations, + annotationFunction, + divWidth, + divHeight +) { + if (divWidth === null || typeof divWidth === 'undefined') + divWidth = 1000; + if (divHeight === null || typeof divHeight === 'undefined') + divHeight = 480; + // preprocess the data data = preprocessData(data); - var divWidth = 1000; - var divHeight = 480; - var svg = d3.select(selector) .on("touchstart", noZoom) .on("touchmove", noZoom) @@ -220,7 +230,7 @@ function viewAnnotations(selector, data, annotations) { .attr("x2", xScale(ann.index)) .attr("class", "ann-line"); } - baseChart(selector, data, function() {}, annotations, handleAnnotation); + baseChart(selector, data, function() {}, annotations, handleAnnotation, null, 300); } function adminViewAnnotations(selector, data, annotations) { |
