mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
Add feature to pass false as a label so it isn't displayed
This commit is contained in:
parent
d5cf1410ed
commit
f92f5bf6fb
@ -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]}:
|
||||
|
@ -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]}:
|
||||
|
Loading…
Reference in New Issue
Block a user