mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
Merge pull request #448 from JelteF/feature-nolabel
Add feature to pass false as a label so it isn't displayed
This commit is contained in:
commit
8c100cde86
@ -221,6 +221,9 @@ class Morris.Bar extends Morris.Grid
|
|||||||
row = @data[index]
|
row = @data[index]
|
||||||
content = "<div class='morris-hover-row-label'>#{row.label}</div>"
|
content = "<div class='morris-hover-row-label'>#{row.label}</div>"
|
||||||
for y, j in row.y
|
for y, j in row.y
|
||||||
|
if @options.labels[j] is false
|
||||||
|
continue
|
||||||
|
|
||||||
content += """
|
content += """
|
||||||
<div class='morris-hover-point' style='color: #{@colorFor(row, j, 'label')}'>
|
<div class='morris-hover-point' style='color: #{@colorFor(row, j, 'label')}'>
|
||||||
#{@options.labels[j]}:
|
#{@options.labels[j]}:
|
||||||
|
@ -101,6 +101,9 @@ class Morris.Line extends Morris.Grid
|
|||||||
row = @data[index]
|
row = @data[index]
|
||||||
content = "<div class='morris-hover-row-label'>#{row.label}</div>"
|
content = "<div class='morris-hover-row-label'>#{row.label}</div>"
|
||||||
for y, j in row.y
|
for y, j in row.y
|
||||||
|
if @options.labels[j] is false
|
||||||
|
continue
|
||||||
|
|
||||||
content += """
|
content += """
|
||||||
<div class='morris-hover-point' style='color: #{@colorFor(row, j, 'label')}'>
|
<div class='morris-hover-point' style='color: #{@colorFor(row, j, 'label')}'>
|
||||||
#{@options.labels[j]}:
|
#{@options.labels[j]}:
|
||||||
|
Loading…
Reference in New Issue
Block a user