levent/agileista

View on GitHub

Showing 149 of 317 total issues

Function d3_layout_packSiblings has 62 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function d3_layout_packSiblings(node) {
    if (!(nodes = node.children) || !(n = nodes.length)) return;
    var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;
    function bound(node) {
      xMin = Math.min(node.x - node.r, xMin);
Severity: Major
Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

    Function nest has 61 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      d3.nest = function() {
        var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
        function map(mapType, array, depth) {
          if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
          var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values;
    Severity: Major
    Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

      Function clipLine has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function clipLine(listener) {
            var point0, c0, v0, v00, clean;
            return {
              lineStart: function() {
                v00 = v0 = false;
      Severity: Major
      Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

        Function d3_scale_log has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function d3_scale_log(linear, base, positive, domain) {
            function log(x) {
              return (positive ? Math.log(x < 0 ? 0 : x) : -Math.log(x > 0 ? 0 : -x)) / Math.log(base);
            }
            function pow(x) {
        Severity: Major
        Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

          Function drawVelocity has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              drawVelocity = function(data, average) {
                var margin = {top: 20, right: 20, bottom: 30, left: 50},
                    width = 1200 - margin.left - margin.right,
                    height = 300 - margin.top - margin.bottom;
          
          
          Severity: Major
          Found in app/assets/javascripts/agileista_graphs.js - About 2 hrs to fix

            Function hierarchy has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              d3.layout.hierarchy = function() {
                var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;
                function recurse(node, depth, nodes) {
                  var childs = children.call(hierarchy, node, depth);
                  node.depth = depth;
            Severity: Major
            Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

              Function tick has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  force.tick = function() {
                    if ((alpha *= .99) < .005) {
                      event.end({
                        type: "end",
                        alpha: alpha = 0
              Severity: Major
              Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                Function d3_geo_clipPolygon has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener) {
                    var subject = [], clip = [];
                    segments.forEach(function(segment) {
                      if ((n = segment.length - 1) <= 0) return;
                      var n, p0 = segment[0], p1 = segment[n];
                Severity: Major
                Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                  Function stack has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    d3.layout.stack = function() {
                      var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;
                      function stack(data, index) {
                        var series = data.map(function(d, i) {
                          return values.call(stack, d, i);
                  Severity: Major
                  Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                    Function d3_geom_voronoiAddBeach has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function d3_geom_voronoiAddBeach(site) {
                        var x = site.x, directrix = site.y, lArc, rArc, dxl, dxr, node = d3_geom_voronoiBeaches._;
                        while (node) {
                          dxl = d3_geom_voronoiLeftBreakPoint(node, directrix) - x;
                          if (dxl > ε) node = node.L; else {
                    Severity: Major
                    Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                      Function event has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          brush.event = function(g) {
                            g.each(function() {
                              var event_ = event.of(this, arguments), extent1 = {
                                x: xExtent,
                                y: yExtent,
                      Severity: Major
                      Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                        Function d3_geom_clipLine has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function d3_geom_clipLine(x0, y0, x1, y1) {
                            return function(line) {
                              var a = line.a, b = line.b, ax = a.x, ay = a.y, bx = b.x, by = b.y, t0 = 0, t1 = 1, dx = bx - ax, dy = by - ay, r;
                              r = x0 - ax;
                              if (!dx && r > 0) return;
                        Severity: Major
                        Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                          Function drag has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            d3.behavior.drag = function() {
                              var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, "mousemove", "mouseup"), touchstart = dragstart(touchid, touchposition, "touchmove", "touchend");
                              function drag() {
                                this.on("mousedown.drag", mousedown).on("touchstart.drag", touchstart);
                              }
                          Severity: Major
                          Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                            Function bind has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function bind(group, groupData) {
                                  var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData;
                                  if (key) {
                                    var nodeByKeyValue = new d3_Map(), dataByKeyValue = new d3_Map(), keyValues = [], keyValue;
                                    for (i = -1; ++i < n; ) {
                            Severity: Major
                            Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                              Function chord has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                d3.svg.chord = function() {
                                  var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
                                  function chord(d, i) {
                                    var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
                                    return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z";
                              Severity: Minor
                              Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                                Function d3_interpolateTransform has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function d3_interpolateTransform(a, b) {
                                    var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale;
                                    if (ta[0] != tb[0] || ta[1] != tb[1]) {
                                      s.push("translate(", null, ",", null, ")");
                                      q.push({
                                Severity: Minor
                                Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                                  Function d3_transitionNode has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    function d3_transitionNode(node, i, id, inherit) {
                                      var lock = node.__transition__ || (node.__transition__ = {
                                        active: 0,
                                        count: 0
                                      }), transition = lock[id];
                                  Severity: Minor
                                  Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                                    Function d3_scale_linear has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      function d3_scale_linear(domain, range, interpolate, clamp) {
                                        var output, input;
                                        function rescale() {
                                          var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
                                          output = linear(domain, range, uninterpolate, interpolate);
                                    Severity: Minor
                                    Found in app/assets/javascripts/d3.v3/d3.v3.js - About 2 hrs to fix

                                      Function d3_time_scale has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function d3_time_scale(linear, methods, format) {
                                          function scale(x) {
                                            return linear(x);
                                          }
                                          scale.invert = function(x) {
                                      Severity: Minor
                                      Found in app/assets/javascripts/d3.v3/d3.v3.js - About 1 hr to fix

                                        Function resampleRecursive has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            function resampleRecursive(stream) {
                                              var λ00, φ00, x00, y00, a00, b00, c00, λ0, x0, y0, a0, b0, c0;
                                              var resample = {
                                                point: point,
                                                lineStart: lineStart,
                                        Severity: Minor
                                        Found in app/assets/javascripts/d3.v3/d3.v3.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language