How to use the dygraphs/src-es5/dygraph.VERSION 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
Dygraph.prototype.findClosestPoint = function(domX, domY) {
  if (Dygraph.VERSION !== '2.0.0') {
    console.error(
      `Dygraph version changed to ${Dygraph.VERSION} - re-copy findClosestPoint`
    )
  }
  var minXDist = Infinity
  var minYDist = Infinity
  var xdist, ydist, dx, dy, point, closestPoint, closestSeries, closestRow
  for (var setIdx = this.layout_.points.length - 1; setIdx >= 0; --setIdx) {
    var points = this.layout_.points[setIdx]
    for (var i = 0; i < points.length; ++i) {
      point = points[i]
      if (!isValidPoint(point)) continue

      dx = point.canvasx - domX
      dy = point.canvasy - domY

      xdist = dx * dx
      ydist = dy * dy
github influxdata / influxdb / ui / src / external / dygraph.js View on Github external
Dygraph.prototype.findClosestPoint = function(domX, domY) {
  if (Dygraph.VERSION !== '2.0.0') {
    console.error(
      `Dygraph version changed to ${Dygraph.VERSION} - re-copy findClosestPoint`
    )
  }
  var minXDist = Infinity
  var minYDist = Infinity
  var xdist, ydist, dx, dy, point, closestPoint, closestSeries, closestRow
  for (var setIdx = this.layout_.points.length - 1; setIdx >= 0; --setIdx) {
    var points = this.layout_.points[setIdx]
    for (var i = 0; i < points.length; ++i) {
      point = points[i]
      if (!isValidPoint(point)) continue

      dx = point.canvasx - domX
      dy = point.canvasy - domY