All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.svg.line-radial.js Maven / Gradle / Ivy

import "../math/trigonometry";
import "arc";
import "line";
import "svg";

d3.svg.line.radial = function() {
  var line = d3_svg_line(d3_svg_lineRadial);
  line.radius = line.x, delete line.x;
  line.angle = line.y, delete line.y;
  return line;
};

function d3_svg_lineRadial(points) {
  var point,
      i = -1,
      n = points.length,
      r,
      a;
  while (++i < n) {
    point = points[i];
    r = point[0];
    a = point[1] - halfπ;
    point[0] = r * Math.cos(a);
    point[1] = r * Math.sin(a);
  }
  return points;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy