mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
Update internal data array when using setData (fixes #213).
This commit is contained in:
parent
6220c40217
commit
8bc716f820
@ -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()
|
||||
|
@ -151,6 +151,7 @@
|
||||
if (redraw == null) {
|
||||
redraw = true;
|
||||
}
|
||||
this.options.data = data;
|
||||
if (!(data != null) || data.length === 0) {
|
||||
this.data = [];
|
||||
this.raphael.clear();
|
||||
|
2
morris.min.js
vendored
2
morris.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user