From f92f5bf6fb41abc36c6ae0c3e9837dafdaca63e2 Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Thu, 10 Jul 2014 18:54:29 +0200 Subject: [PATCH] Add feature to pass false as a label so it isn't displayed --- lib/morris.bar.coffee | 3 +++ lib/morris.line.coffee | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/morris.bar.coffee b/lib/morris.bar.coffee index 86fb32b..e578a26 100644 --- a/lib/morris.bar.coffee +++ b/lib/morris.bar.coffee @@ -171,6 +171,9 @@ class Morris.Bar extends Morris.Grid row = @data[index] content = "
#{row.label}
" for y, j in row.y + if @options.labels[j] is false + continue + content += """
#{@options.labels[j]}: diff --git a/lib/morris.line.coffee b/lib/morris.line.coffee index ea5e7dd..f88597d 100644 --- a/lib/morris.line.coffee +++ b/lib/morris.line.coffee @@ -101,6 +101,9 @@ class Morris.Line extends Morris.Grid row = @data[index] content = "
#{row.label}
" for y, j in row.y + if @options.labels[j] is false + continue + content += """
#{@options.labels[j]}: