code: function findPointsToPlot(points, domain) {
      var i;
  
      var firstPoint = 0;
      var lastPoint = points.length - 1;
  
      for (i = 1; i < points.length; i++) {
          if (points[i].time >= domain[0]) {
              firstPoint = i - 1;
              break;
          }
      }
  
      for (i = points.length - 1; i > 0; i--) {
          if (points[i].time <= domain[1]) {
              lastPoint = i + 1;
              break;
          }
      }
  
      return points.slice(firstPoint, lastPoint + 1);
  }
docs: find points to plot based on the focus chart based on the domain. we want to plot one extra point on each side of the domain so the lines leaving the left and right sides of the graph are angled in the right direction (towards the points that are off the actual chart)