How to use the dygraphs.removeEvent function in dygraphs

To help you get started, we’ve selected a few dygraphs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github numenta / numenta-apps / unicorn / app / browser / components / Chart.jsx View on Github external
_removeDygraph() {
    let {model} = this.props.metaData;
    let element = ReactDOM.findDOMNode(this.refs[`chart-${model.modelId}`]);
    let range = element.getElementsByClassName(RANGE_SELECTOR_CLASS)[0];

    if (this._dygraph) {
      Dygraph.removeEvent(element, 'mouseup', this._handleMouseUp.bind(this));
      Dygraph.removeEvent(range, 'mousedown', this._handleMouseDown.bind(this));
      this._dygraph.destroy();
      this._dygraph = null;
    }
  }
github numenta / numenta-apps / unicorn / app / browser / components / Chart.jsx View on Github external
_removeDygraph() {
    let {model} = this.props.metaData;
    let element = ReactDOM.findDOMNode(this.refs[`chart-${model.modelId}`]);
    let range = element.getElementsByClassName(RANGE_SELECTOR_CLASS)[0];

    if (this._dygraph) {
      Dygraph.removeEvent(element, 'mouseup', this._handleMouseUp.bind(this));
      Dygraph.removeEvent(range, 'mousedown', this._handleMouseDown.bind(this));
      this._dygraph.destroy();
      this._dygraph = null;
    }
  }