소스 검색

HUE-8649 [frontend] Fix closest point detection on hover in the performance graph

Johan Ahlen 7 년 전
부모
커밋
f322ba4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      desktop/core/src/desktop/templates/ko_components/ko_performance_graph.mako

+ 1 - 1
desktop/core/src/desktop/templates/ko_components/ko_performance_graph.mako

@@ -436,7 +436,7 @@
           var j = dateBisector(self.data, x, 1);
           var d0 = self.data[j - 1];
           var d1 = self.data[j];
-          var closest = x - d0 > d1 - x ? d1 : d0;
+          var closest = x - d0[0] > d1[0] - x ? d1 : d0;
 
           graphs.forEach(function (graph) {
             graph.highlightPoint(closest)