diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-08-30 12:51:40 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-08-30 12:51:40 +0100 |
| commit | d696b52fdc7c051efbb17511571809367fefb1a6 (patch) | |
| tree | 1a789e7651e2c0b2ea7e1f616469d67da8ce8011 /app | |
| parent | Simplify chart width in multidimensional data (diff) | |
| download | AnnotateChange-d696b52fdc7c051efbb17511571809367fefb1a6.tar.gz AnnotateChange-d696b52fdc7c051efbb17511571809367fefb1a6.zip | |
Add note on not resizing the graph to the window size
Diffstat (limited to 'app')
| -rw-r--r-- | app/static/js/makeChart.js | 8 | ||||
| -rw-r--r-- | app/static/js/makeChartMulti.js | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/app/static/js/makeChart.js b/app/static/js/makeChart.js index b6e3de2..9b074f1 100644 --- a/app/static/js/makeChart.js +++ b/app/static/js/makeChart.js @@ -59,6 +59,14 @@ function baseChart( divWidth, divHeight ) { + /* Note: + * It may be tempting to scale the width/height of the div to be + * proportional to the size of the window. However this may cause some + * users with wide screens to perceive changes in the time series + * differently than others because the horizontal axis is more + * stretched out. It is therefore better to keep the size of the graph + * the same for all users. + */ if (divWidth === null || typeof divWidth === 'undefined') divWidth = 1000; if (divHeight === null || typeof divHeight === 'undefined') diff --git a/app/static/js/makeChartMulti.js b/app/static/js/makeChartMulti.js index d0e4b31..ff0ceff 100644 --- a/app/static/js/makeChartMulti.js +++ b/app/static/js/makeChartMulti.js @@ -98,8 +98,16 @@ function baseChart(selector, data, clickFunction, annotations, annotationFunctio var lineObjects = {}; var pointSets = {} + /* Note: + * It may be tempting to scale the width/height of the div to be + * proportional to the size of the window. However this may cause some + * users with wide screens to perceive changes in the time series + * differently than others because the horizontal axis is more + * stretched out. It is therefore better to keep the size of the graph + * the same for all users. + */ var lineHeight = 150; - lineWidth = 1000; + var lineWidth = 1000; var chartPadding = 30; |
