Explorar o código

little fix when searching x index time

toni-moreno %!s(int64=11) %!d(string=hai) anos
pai
achega
3ea94c3484
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/app/directives/grafanaGraph.js

+ 1 - 1
src/app/directives/grafanaGraph.js

@@ -359,7 +359,7 @@ function (angular, $, kbn, moment, _) {
               j=0;
               do {
                 ++j;
-              } while (series.data[j][0] < pos.x);
+              } while (series.data[j][0] < pos.x && j<series.length);
               j--; //we take previous value in time.
               //now we know the current X (j) position for X and Y values
               timestamp = dashboard.formatDate(series.data[j][0]);