diff --git a/lib/timeline/component/LineGraph.js b/lib/timeline/component/LineGraph.js index 76cecb533c..259f1fd1a8 100644 --- a/lib/timeline/component/LineGraph.js +++ b/lib/timeline/component/LineGraph.js @@ -109,7 +109,6 @@ function LineGraph(body, options) { this.setOptions(options); this.groupsUsingDefaultStyles = [0]; this.body.emitter.on('rangechanged', function () { - me.lastStart = me.body.range.start; me.svg.style.left = util.option.asSize(-me.props.width); me.forceGraphUpdate = true; @@ -637,6 +636,7 @@ LineGraph.prototype._getSortedGroupIds = function(){ * @private */ LineGraph.prototype._updateGraph = function () { + this.lastStart = this.body.range.start; // reset the svg elements DOMutil.prepareElements(this.svgElements); if (this.props.width != 0 && this.itemsData != null) {