How to use the dygraphs/src-es5/dygraph.Plugins 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 influxdata / influxdb / ui / src / external / dygraph.js View on Github external
closestSeries = setIdx
        closestPoint = point
      }
    }
  }
  var name = this.layout_.setNames[closestSeries]
  return {
    row: closestRow,
    seriesName: name,
    point: closestPoint,
  }
}

Dygraph.synchronize = synchronize

Dygraph.Plugins.Crosshair = (function() {
  'use strict'
  /**
   * Creates the crosshair
   *
   * @constructor
   */

  var crosshair = function(opt_options) {
    this.canvas_ = document.createElement('canvas')
    opt_options = opt_options || {}
    this.direction_ = opt_options.direction || null
  }

  crosshair.prototype.toString = function() {
    return 'Crosshair Plugin'
  }