Problem with out of bound points.

Last point(s) on highest graph and first point(s) not calculating
a real difference make sure the user knows that.

Change-Id: I0a92c9ecc7b2c1305cbe296b245cb9abd2765448
diff --git a/scripts/visual_metrics.py b/scripts/visual_metrics.py
index f6fe8f1..0d01eae 100755
--- a/scripts/visual_metrics.py
+++ b/scripts/visual_metrics.py
@@ -405,21 +405,29 @@
       }
     }
 
-    metric_slope = ( rate_smallest_thats_greater - rate_greatest_thats_less) /
-        ( metric_smallest_thats_greater - metric_greatest_thats_less);
-
-    projected_rate = ( sel_metric - metric_greatest_thats_less) * metric_slope +
-        rate_greatest_thats_less;
-
-    difference = 100 * (projected_rate / sel_bitrate - 1);
-
-
-    if (difference > 0)
-      message = message + "<li>  " + difference.toFixed(2) + "% smaller than " +
-                metricdata.getColumnLabel(i) + "</li> "
+    if(rate_smallest_thats_greater == 0 || rate_greatest_thats_less == 0) {
+      message = message + " <li> Couldn't find a point on both sides.</li>"
+    }
     else
-      message = message + "<li>  " + -difference.toFixed(2) + "% bigger than " +
-                metricdata.getColumnLabel(i) + "</li> "
+    {
+      metric_slope = ( rate_smallest_thats_greater - rate_greatest_thats_less) /
+          ( metric_smallest_thats_greater - metric_greatest_thats_less);
+
+      projected_rate = ( sel_metric - metric_greatest_thats_less) *
+          metric_slope + rate_greatest_thats_less;
+
+      difference = 100 * (projected_rate / sel_bitrate - 1);
+
+
+      if (difference > 0)
+        message = message + "<li>  " + difference.toFixed(2) +
+                  "% smaller than " +
+                  metricdata.getColumnLabel(i) + "</li> "
+      else
+        message = message + "<li>  " + -difference.toFixed(2) +
+                  "% bigger than " +
+                  metricdata.getColumnLabel(i) + "</li> "
+    }
 
   }
   message = message + "</ul>"