Browse Source

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

Johan Ahlen 7 năm trước cách đây
mục cha
commit
f322ba4

+ 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)