From d10bf9f9934165f2476fb5fa73d6def6ad4b5e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 15 Feb 2014 22:07:22 +0100 Subject: [PATCH] Fixes null checks for legend value formaters (fix for #97) --- src/app/panels/graphite/timeSeries.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/panels/graphite/timeSeries.js b/src/app/panels/graphite/timeSeries.js index 03f8ae08066..d7a3a38d2d6 100644 --- a/src/app/panels/graphite/timeSeries.js +++ b/src/app/panels/graphite/timeSeries.js @@ -55,11 +55,11 @@ function (_, kbn) { this.info.current = result[result.length-1][1]; var formater = getFormater(yFormats[this.yaxis - 1]); - this.info.avg = formater(this.info.avg); - this.info.current = formater(this.info.current); - this.info.min = formater(this.info.min); - this.info.max = formater(this.info.max); - this.info.total = formater(this.info.total); + this.info.avg = this.info.avg ? formater(this.info.avg) : null; + this.info.current = this.info.current ? formater(this.info.current) : null; + this.info.min = this.info.min ? formater(this.info.min) : null; + this.info.max = this.info.max ? formater(this.info.max) : null; + this.info.total = this.info.total ? formater(this.info.total) : null; } return result;