From fb5dc2a033308af24929c3d597fda708d0c9f642 Mon Sep 17 00:00:00 2001 From: Goutte Date: Mon, 12 Mar 2018 12:04:50 +0100 Subject: [PATCH] Fix a nasty bug, urgently ! This one is on me. --- CHANGELOG.md | 5 +++++ web/static/js/swapp.js | 2 +- web/static/js/swapp.ls | 10 +++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7920ef..2063b9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,11 @@ et prendre aussi - [ ] Find a way to handle the huge amount of data files for Earth (thousands!) +## 1.0.1 + +- [x] Fix an issue with the Time Series axes + + ## 1.0.0 - [x] Fix a bug with data that is offset by one hour. diff --git a/web/static/js/swapp.js b/web/static/js/swapp.js index 3cc88fd..dc7b926 100644 --- a/web/static/js/swapp.js +++ b/web/static/js/swapp.js @@ -498,7 +498,7 @@ bottom: 30, left: 80 }; - this.xScale = d3.scaleUtc().domain(this.xDataExtent); + this.xScale = d3.scaleTime().domain(this.xDataExtent); this.yScale = d3.scaleLinear().domain(this.yDataExtent); formatMillisecond = d3.utcFormat(".%L"); formatSecond = d3.utcFormat(":%S"); diff --git a/web/static/js/swapp.ls b/web/static/js/swapp.ls index 05c21d9..57c4cca 100644 --- a/web/static/js/swapp.ls +++ b/web/static/js/swapp.ls @@ -139,7 +139,7 @@ https://gitlab.irap.omp.eu/CDPP/SPACEWEATHERONLINE this resize: -> - @orbits?.resize(); + @orbits?.resize() @time_series.forEach((ts) -> ts.resize()) this @@ -385,10 +385,14 @@ export class TimeSeries left: 80 } - @xScale = d3.scaleUtc().domain(@xDataExtent) - @yScale = d3.scaleLinear().domain(@yDataExtent) + # https://github.com/d3/d3-scale/blob/master/src/utcTime.js + # scaleUtc collides with our custom multiFormat ticks +# @xScale = d3.scaleUtc().domain(@xDataExtent) + @xScale = d3.scaleTime().domain(@xDataExtent) + # Domain on a log scale MUST NOT cross zero # @yScale = d3.scaleLog().domain(@yDataExtent) + @yScale = d3.scaleLinear().domain(@yDataExtent) formatMillisecond = d3.utcFormat(".%L") formatSecond = d3.utcFormat(":%S") -- libgit2 0.21.2