From 2b07cd387545e3f34ba6b7dca41331e4e4e81580 Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Mon, 26 Jan 2015 10:51:38 +0000 Subject: [PATCH] Keep total counter outside out loop. This was causing only the last expression to be graphed. --- web/static/js/prom_console.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/static/js/prom_console.js b/web/static/js/prom_console.js index 513ca081c..6b83896f7 100644 --- a/web/static/js/prom_console.js +++ b/web/static/js/prom_console.js @@ -395,10 +395,10 @@ PromConsole.Graph.prototype._render = function(data) { } // Get the data into the right format. + var seriesLen = 0; for (var e = 0; e < data.length; e++) { - var len = 0; for (var i = 0; i < data[e].Value.length; i++) { - series[len++] = { + series[seriesLen++] = { data: data[e].Value[i].Values.map(function(s) {return {x: s.Timestamp, y: parseFloat(s.Value)} }), color: palette.color(), name: nameFunc(data[e].Value[i].Metric),