Skip to content

Commit

Permalink
Update internal data array when using setData (fixes #213).
Browse files Browse the repository at this point in the history
  • Loading branch information
oesmith committed May 12, 2013
1 parent 6220c40 commit 8bc716f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/morris.grid.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ class Morris.Grid extends Morris.EventEmitter
# Update the data series and redraw the chart.
#
setData: (data, redraw = true) ->
@options.data = data

if !data? or data.length == 0
@data = []
@raphael.clear()
Expand Down
1 change: 1 addition & 0 deletions morris.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8bc716f

Please sign in to comment.