diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | web/cobrands/sass/_dashboard.scss | 25 | ||||
-rw-r--r-- | web/js/dashboard.js | 7 |
3 files changed, 28 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 519592b7f..d5f650411 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ - Stop race condition when making a new report quickly. - Set a session timezone in case database server is set differently. - Fix SQL error on update edit admin page in cobrands. #2049 + - Improve chart display in old IE versions. #2005 - Admin improvements: - Inspectors can set non_public status of reports. #1992 - Default start date is shown on the dashboard. diff --git a/web/cobrands/sass/_dashboard.scss b/web/cobrands/sass/_dashboard.scss index 3c4eb969e..3cf59992b 100644 --- a/web/cobrands/sass/_dashboard.scss +++ b/web/cobrands/sass/_dashboard.scss @@ -63,7 +63,6 @@ canvas { width: 100% !important; - height: auto !important; } } @@ -99,6 +98,8 @@ position: absolute; margin-top: -1em; margin-#{$right}: 0; + right: 0; + width: 18%; // 20% padding from .labelled-line-chart, 2% gutter } } @@ -204,7 +205,7 @@ } th { - text-align: inherit; + text-align: left; } tbody tr:nth-child(odd) > * { @@ -330,3 +331,23 @@ margin-top: -1px; } } + +.ie9 { + .labelled-line-chart, + .labelled-sparkline, + .responsive-bar-chart { + canvas { + height: 0 !important; + width: 0 !important; + display: none !important; + } + + } + .labelled-line-chart .label { + @media (min-width: 48em) { + position: static !important; + margin-top: inherit !important; + margin-#{$right}: 1.5em !important; + } + } +} diff --git a/web/js/dashboard.js b/web/js/dashboard.js index 23c5496e6..82b5e6188 100644 --- a/web/js/dashboard.js +++ b/web/js/dashboard.js @@ -1,4 +1,7 @@ $(function(){ + if ($('html').is('.ie9')) { + return; + } Chart.defaults.global.defaultFontSize = 16; // Chart.defaults.global.defaultFontFamily = $('body').css('font-family'); @@ -24,7 +27,6 @@ $(function(){ var setUpLabelsForChart = function(chart){ var $parent = $(chart.chart.canvas).parent(); - var xGutterInPixels = 30; var lasty = 0; $.each(chart.config.data.datasets, function(datasetIndex, dataset){ @@ -35,8 +37,7 @@ $(function(){ y = lasty; } $label.css({ - top: y, - left: latestPoint._model.x + xGutterInPixels + top: y }); lasty = y + $label.height() + 8; }); |