浏览代码

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

Johan Ahlen 7 年之前
父节点
当前提交
f322ba4847
共有 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)