|
@ -141,13 +141,16 @@ Graph2d.prototype.setItems = function(items) { |
|
|
this.itemsData = newDataSet; |
|
|
this.itemsData = newDataSet; |
|
|
this.linegraph && this.linegraph.setItems(newDataSet); |
|
|
this.linegraph && this.linegraph.setItems(newDataSet); |
|
|
|
|
|
|
|
|
if (initialLoad && ('start' in this.options || 'end' in this.options)) { |
|
|
|
|
|
this.fit(); |
|
|
|
|
|
|
|
|
if (initialLoad) { |
|
|
|
|
|
if (this.options.start != undefined || this.options.end != undefined) { |
|
|
|
|
|
var start = this.options.start != undefined ? this.options.start : null; |
|
|
|
|
|
var end = this.options.end != undefined ? this.options.end : null; |
|
|
|
|
|
|
|
|
var start = ('start' in this.options) ? util.convert(this.options.start, 'Date') : null; |
|
|
|
|
|
var end = ('end' in this.options) ? util.convert(this.options.end, 'Date') : null; |
|
|
|
|
|
|
|
|
|
|
|
this.setWindow(start, end); |
|
|
|
|
|
|
|
|
this.setWindow(start, end, {animate: false}); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
this.fit({animate: false}); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|