destroy method

void destroy()

Called to free up any resources due to chart going away.

Implementation

void destroy() {
  // Walk them in add order to support behaviors that remove other behaviors.
  for (var i = 0; i < _behaviorStack.length; i++) {
    _behaviorStack[i].removeFrom(this);
  }
  _behaviorStack.clear();
  _behaviorRoleMap.clear();
  _selectionModels.values
      .forEach((selectionModel) => selectionModel.clearAllListeners());
}