RadarParlamentar-MES2017-1/radar

View on GitHub
radar_parlamentar/static/files/codes/js/d3.js

Summary

Maintainability
F
2 wks
Test Coverage

File d3.js has 3935 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function(){if (!Date.now) Date.now = function() {
  return +new Date;
};
try {
  document.createElement("div").style.setProperty("opacity", 0, "");
Severity: Major
Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 wk to fix

    Function axis has 146 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    d3.svg.axis = function() {
      var scale = d3.scale.linear(),
          orient = "bottom",
          tickMajorSize = 6,
          tickMinorSize = 6,
    Severity: Major
    Found in radar_parlamentar/static/files/codes/js/d3.js - About 5 hrs to fix

      Function brush has 137 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      d3.svg.brush = function() {
        var event = d3.dispatch("brushstart", "brush", "brushend"),
            x, // x-scale, optional
            y, // y-scale, optional
            extent = [[0, 0], [0, 0]]; // [x0, y0], [x1, y1]
      Severity: Major
      Found in radar_parlamentar/static/files/codes/js/d3.js - About 5 hrs to fix

        Function axis has 96 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function axis(selection) {
            selection.each(function(d, i, j) {
              var g = d3.select(this);
        
              // If selection is a transition, create subtransitions.
        Severity: Major
        Found in radar_parlamentar/static/files/codes/js/d3.js - About 3 hrs to fix

          Function data has 93 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          d3_selectionPrototype.data = function(data, join) {
            var enter = [],
                update = [],
                exit = [];
          
          
          Severity: Major
          Found in radar_parlamentar/static/files/codes/js/d3.js - About 3 hrs to fix

            Function bind has 72 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),
            Severity: Major
            Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

              Function d3_transition has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function d3_transition(groups, id, time) {
                d3_arraySubclass(groups, d3_transitionPrototype);
              
                var tweens = {},
                    event = d3.dispatch("start", "end"),
              Severity: Major
              Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

                Function arc has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                d3.svg.arc = function() {
                  var innerRadius = d3_svg_arcInnerRadius,
                      outerRadius = d3_svg_arcOuterRadius,
                      startAngle = d3_svg_arcStartAngle,
                      endAngle = d3_svg_arcEndAngle;
                Severity: Major
                Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

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

                  d3.nest = function() {
                    var nest = {},
                        keys = [],
                        sortKeys = [],
                        sortValues,
                  Severity: Major
                  Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

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

                    d3.svg.chord = function() {
                      var source = d3_svg_chordSource,
                          target = d3_svg_chordTarget,
                          radius = d3_svg_chordRadius,
                          startAngle = d3_svg_arcStartAngle,
                    Severity: Major
                    Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

                      Function d3_scale_ordinal has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function d3_scale_ordinal(domain, ranger) {
                        var index,
                            range,
                            rangeBand;
                      
                      
                      Severity: Major
                      Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

                        Function interpolateString has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        d3.interpolateString = function(a, b) {
                          var m, // current match
                              i, // current index
                              j, // current index (for coallescing)
                              s0 = 0, // start index of current string prefix
                        Severity: Major
                        Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

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

                          function d3_svg_area(projection) {
                            var x0 = d3_svg_lineX,
                                x1 = d3_svg_lineX,
                                y0 = 0,
                                y1 = d3_svg_lineY,
                          Severity: Major
                          Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

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

                            d3.behavior.zoom = function() {
                              var xyz = [0, 0, 0],
                                  event = d3.dispatch("zoom"),
                                  extent = d3_behavior_zoomInfiniteExtent;
                            
                            
                            Severity: Major
                            Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

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

                              function d3_scale_log(linear, log) {
                                var pow = log.pow;
                              
                                function scale(x) {
                                  return linear(log(x));
                              Severity: Major
                              Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

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

                                function d3_scale_linear(domain, range, interpolate, clamp) {
                                  var output,
                                      input;
                                
                                  function rescale() {
                                Severity: Major
                                Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

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

                                  d3.format = function(specifier) {
                                    var match = d3_format_re.exec(specifier),
                                        fill = match[1] || " ",
                                        sign = match[3] || "",
                                        zfill = match[5],
                                  Severity: Minor
                                  Found in radar_parlamentar/static/files/codes/js/d3.js - About 2 hrs to fix

                                    Function interpolateTransform has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    d3.interpolateTransform = function(a, b) {
                                      var s = [], // string constants and placeholders
                                          q = [], // number interpolators
                                          n,
                                          A = d3.transform(a),
                                    Severity: Minor
                                    Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                      Function d3_rgb_parse has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function d3_rgb_parse(format, rgb, hsl) {
                                        var r = 0, // red channel; int in [0, 255]
                                            g = 0, // green channel; int in [0, 255]
                                            b = 0, // blue channel; int in [0, 255]
                                            m1, // CSS color specification match
                                      Severity: Minor
                                      Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                        Function d3_svg_lineHermite has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function d3_svg_lineHermite(points, tangents) {
                                          if (tangents.length < 1
                                              || (points.length != tangents.length
                                              && points.length != tangents.length + 2)) {
                                            return d3_svg_lineLinear(points);
                                        Severity: Minor
                                        Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                          Function d3_selection_classed has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                          function d3_selection_classed(name, value) {
                                            var re = new RegExp("(^|\\s+)" + d3.requote(name) + "(\\s+|$)", "g");
                                          
                                            // If no value is specified, return the first value.
                                            if (arguments.length < 2) {
                                          Severity: Minor
                                          Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

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

                                            d3.behavior.drag = function() {
                                              var event = d3.dispatch("drag", "dragstart", "dragend"),
                                                  origin = null;
                                            
                                              function drag() {
                                            Severity: Minor
                                            Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                              Function brush has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                function brush(g) {
                                                  var resizes = x && y ? ["n", "e", "s", "w", "nw", "ne", "se", "sw"]
                                                      : x ? ["e", "w"]
                                                      : y ? ["n", "s"]
                                                      : [];
                                              Severity: Minor
                                              Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                Function arc has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                  function arc() {
                                                    var r0 = innerRadius.apply(this, arguments),
                                                        r1 = outerRadius.apply(this, arguments),
                                                        a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset,
                                                        a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset,
                                                Severity: Minor
                                                Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                  Function attr has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                  d3_selectionPrototype.attr = function(name, value) {
                                                    name = d3.ns.qualify(name);
                                                  
                                                    // If no value is specified, return the first value.
                                                    if (arguments.length < 2) {
                                                  Severity: Minor
                                                  Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                    Function d3_scale_pow has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                    function d3_scale_pow(linear, exponent) {
                                                      var powp = d3_scale_powPow(exponent),
                                                          powb = d3_scale_powPow(1 / exponent);
                                                    
                                                      function scale(x) {
                                                    Severity: Minor
                                                    Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                      Function d3_scale_quantile has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                      function d3_scale_quantile(domain, range) {
                                                        var thresholds;
                                                      
                                                        function rescale() {
                                                          var k = 0,
                                                      Severity: Minor
                                                      Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                        Function d3_svg_lineMonotoneTangents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                        function d3_svg_lineMonotoneTangents(points) {
                                                          var tangents = [],
                                                              d,
                                                              a,
                                                              b,
                                                        Severity: Minor
                                                        Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                          Function timer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                          d3.timer = function(callback, delay, then) {
                                                            var found = false,
                                                                t0,
                                                                t1 = d3_timer_queue;
                                                          
                                                          
                                                          Severity: Minor
                                                          Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                            Function d3_svg_line has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                            function d3_svg_line(projection) {
                                                              var x = d3_svg_lineX,
                                                                  y = d3_svg_lineY,
                                                                  interpolate = "linear",
                                                                  interpolator = d3_svg_lineInterpolators[interpolate],
                                                            Severity: Minor
                                                            Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                              Function extent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                brush.extent = function(z) {
                                                                  var x0, x1, y0, y1, t;
                                                              
                                                                  // Invert the pixel extent to data-space.
                                                                  if (!arguments.length) {
                                                              Severity: Minor
                                                              Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                                Function diagonal has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                d3.svg.diagonal = function() {
                                                                  var source = d3_svg_chordSource,
                                                                      target = d3_svg_chordTarget,
                                                                      projection = d3_svg_diagonalProjection;
                                                                
                                                                
                                                                Severity: Minor
                                                                Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                                  Function d3_svg_brushMove has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                  function d3_svg_brushMove() {
                                                                    if (d3_svg_brushOffset) {
                                                                      var mouse = d3.svg.mouse(d3_svg_brushTarget),
                                                                          g = d3.select(d3_svg_brushTarget);
                                                                  
                                                                  
                                                                  Severity: Minor
                                                                  Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                                    Function d3_behavior_zoomTo has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                    function d3_behavior_zoomTo(z, x0, x1) {
                                                                      z = d3_behavior_zoomExtentClamp(z, 2);
                                                                      var j = Math.pow(2, d3_behavior_zoomXyz[2]),
                                                                          k = Math.pow(2, z),
                                                                          K = Math.pow(2, (d3_behavior_zoomXyz[2] = z) - x1[2]),
                                                                    Severity: Minor
                                                                    Found in radar_parlamentar/static/files/codes/js/d3.js - About 1 hr to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                for (j = i + 1; j < n; ++j) q[j].i--;
                                                                      Severity: Major
                                                                      Found in radar_parlamentar/static/files/codes/js/d3.js - About 45 mins to fix

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                  for (j = i + 1; j < n; ++j) q[j].i -= 2;
                                                                        Severity: Major
                                                                        Found in radar_parlamentar/static/files/codes/js/d3.js - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                    for (j = i + 1; j < n; ++j) q[j].i--;
                                                                          Severity: Major
                                                                          Found in radar_parlamentar/static/files/codes/js/d3.js - About 45 mins to fix

                                                                            TODO found
                                                                            Open

                                                                            // TODO remove(selector)?

                                                                            TODO found
                                                                            Open

                                                                            // TODO selectAll(function)

                                                                            TODO found
                                                                            Open

                                                                            // TODO insert(function, string)?

                                                                            TODO found
                                                                            Open

                                                                            // TODO append(node)?

                                                                            TODO found
                                                                            Open

                                                                            // TODO insert(function, function)?

                                                                            TODO found
                                                                            Open

                                                                            // TODO select(function)

                                                                            TODO found
                                                                            Open

                                                                            // TODO Track touch points by identifier.

                                                                            TODO found
                                                                            Open

                                                                            // TODO append(function)?

                                                                            TODO found
                                                                            Open

                                                                            // TODO insert(node, function)?

                                                                            TODO found
                                                                            Open

                                                                            // TODO fast singleton implementation!

                                                                            TODO found
                                                                            Open

                                                                              // TODO Allow control point to be customized.

                                                                            TODO found
                                                                            Open

                                                                            // TODO data(null) for clearing data?

                                                                            TODO found
                                                                            Open

                                                                            // TODO align

                                                                            TODO found
                                                                            Open

                                                                                fill = "0"; // TODO align = "=";

                                                                            TODO found
                                                                            Open

                                                                            // TODO remove(node)?

                                                                            TODO found
                                                                            Open

                                                                            // TODO remove(function)?

                                                                            TODO found
                                                                            Open

                                                                            // TODO The `this` argument probably shouldn't be the first argument to the

                                                                            TODO found
                                                                            Open

                                                                            // TODO cross-diagonal?

                                                                            TODO found
                                                                            Open

                                                                            // TODO unbind zoom behavior?

                                                                            There are no issues that match your filters.

                                                                            Category
                                                                            Status