Merge pull request #549 from JelteF/empty-bar-hover-fix

Fix hover error when hovering over an empty bar chart
This commit is contained in:
Jelte Fennema 2015-01-17 19:22:22 +01:00
commit 4ccdd7694d

View file

@ -238,7 +238,10 @@ class Morris.Bar extends Morris.Grid
# @private
onHoverMove: (x, y) =>
index = @hitTest(x, y)
@hover.update(@hoverContentForRow(index)...)
if index?
@hover.update(@hoverContentForRow(index)...)
else
@hover.hide()
# hover out event handler
#