]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5606 Timeline chart does not behave correctly when measures don't have the...
authorStas Vilchik <vilchiks@gmail.com>
Mon, 6 Oct 2014 12:24:14 +0000 (14:24 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 6 Oct 2014 14:00:00 +0000 (16:00 +0200)
server/sonar-web/src/main/js/widgets/timeline.js

index 26faa583c46cedbf79ba8378520e64c01b4f212c..23ab743cd23aa6bef0f8902bf2da009b783a0056 100644 (file)
@@ -134,7 +134,7 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
         })
         .reduce(function(p, c) {
           return p.concat(c);
-        }, d3.extent(this.events(), function(d) { return d.d; }));
+        }, []);
 
     this.time = d3.time.scale().domain(d3.extent(timeDomain));
 
@@ -215,6 +215,10 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
 
 
     // Configure events
+    this.events(this.events().filter(function (event) {
+      return event.d >= widget.time.domain()[0];
+    }));
+
     this.gevents = this.gWrap.append('g')
         .attr('class', 'axis events')
         .selectAll('.event-tick')