diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 0d8a96a4..0760ddef 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -708,7 +708,7 @@ ItemSet.prototype.setGroups = function(groups) { // unsubscribe from current dataset if (this.groupsData) { util.forEach(this.groupListeners, function (callback, event) { - me.groupsData.unsubscribe(event, callback); + me.groupsData.off(event, callback); }); // remove all drawn groups diff --git a/lib/timeline/component/LineGraph.js b/lib/timeline/component/LineGraph.js index 891f1954..ec3108e3 100644 --- a/lib/timeline/component/LineGraph.js +++ b/lib/timeline/component/LineGraph.js @@ -324,7 +324,7 @@ LineGraph.prototype.setGroups = function(groups) { // unsubscribe from current dataset if (this.groupsData) { util.forEach(this.groupListeners, function (callback, event) { - me.groupsData.unsubscribe(event, callback); + me.groupsData.off(event, callback); }); // remove all drawn groups