Add feature to pass false as a label so it isn't displayed

This commit is contained in:
Jelte Fennema 2014-07-10 18:54:29 +02:00
parent d5cf1410ed
commit f92f5bf6fb
2 changed files with 6 additions and 0 deletions

View File

@ -171,6 +171,9 @@ class Morris.Bar extends Morris.Grid
row = @data[index]
content = "<div class='morris-hover-row-label'>#{row.label}</div>"
for y, j in row.y
if @options.labels[j] is false
continue
content += """
<div class='morris-hover-point' style='color: #{@colorFor(row, j, 'label')}'>
#{@options.labels[j]}:

View File

@ -101,6 +101,9 @@ class Morris.Line extends Morris.Grid
row = @data[index]
content = "<div class='morris-hover-row-label'>#{row.label}</div>"
for y, j in row.y
if @options.labels[j] is false
continue
content += """
<div class='morris-hover-point' style='color: #{@colorFor(row, j, 'label')}'>
#{@options.labels[j]}: