
commit 3211eabe844ebbd0969940e5a399b0ce01c01728 Author: Raphael Bergmann <raphael@cc-ltd.net> Date: Thu Mar 2 12:06:00 2017 +0100 Do not plot empty graphs --- js/views/details/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/views/details/main.js b/js/views/details/main.js index f95e015..cc4d51a 100644 --- a/js/views/details/main.js +++ b/js/views/details/main.js @@ -26,6 +26,9 @@ define([ plot: function(g, data, labels, legendPos, colors, tickFormat, tooltipFormat) { + /* do not plot graph if there is no data */ + if (data[0].length==0) return; + /* Initialize graph. */ var margin = {top: 30, right: 10, bottom: 20, left: 60}, width = 550 - margin.left - margin.right,
participants (1)
-
irl@torproject.org