backlogs/redmine_backlogs

View on GitHub
assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js

Summary

Maintainability
F
2 wks
Test Coverage

File jqplot.canvasOverlay.js has 632 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * jqPlot
 * Pure JavaScript plotting plugin using jQuery
 *
 * Version: 1.0.0

    Function draw has 224 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.jqplot.CanvasOverlay.prototype.draw = function(plot) {
            var obj, 
                objs = this.objects,
                mr = this.markerRenderer,
                start,

      Function handleMove has 89 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function handleMove(ev, gridpos, datapos, neighbor, plot) {
              var co = plot.plugins.canvasOverlay;
              var objs = co.objects;
              var l = objs.length;
              var obj, haveHighlight=false;

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

            function showTooltip(plot, obj, gridpos, datapos) {
                var co = plot.plugins.canvasOverlay;
                var elem = co._tooltipElem;
        
                var opts = obj.options, x, y;

          Function CanvasOverlay has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              $.jqplot.CanvasOverlay = function(opts){
                  var options = opts || {};
                  this.options = {
                      show: $.jqplot.config.enablePlugins,
                      deferDraw: false

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

                function LineBase() {
                    this.uid = null;
                    this.type = null;
                    this.gridStart = null;
                    this.gridStop = null;

              Avoid deeply nested control flow statements.
              Open

                                          if (obj.options.y != null) {
                                              mr.style = 'line';
                                              opts.closePath = false;
                                              var xaxis = plot.axes[obj.options.xaxis],
                                                  xstart,
              Severity: Major
              Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if (obj.options.y != null) {
                                                mr.style = 'line';
                                                opts.closePath = false;
                                                var xaxis = plot.axes[obj.options.xaxis],
                                                    xstart,
                Severity: Major
                Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              if (obj.options.x != null) {
                                                  mr.style = 'line';
                                                  opts.closePath = false;
                                                  var yaxis = plot.axes[obj.options.yaxis],
                                                      ystart,
                  Severity: Major
                  Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if (obj.fadeTooltip) {
                                            elem.fadeOut(obj.tooltipFadeSpeed);
                                        }
                                        else {
                                            elem.hide();
                    Severity: Major
                    Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                      else if (n) {
                                          switch (obj.type) {
                                              case 'line':
                                                  showTooltip(plot, obj, [gridpos.x, gridpos.y], datapos);
                                                  break;
                      Severity: Major
                      Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            switch (obj.type) {
                                                case 'line':
                                                    showTooltip(plot, obj, [gridpos.x, gridpos.y], datapos);
                                                    break;
                        
                        
                        Severity: Major
                        Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                      if (obj.options.x != null) {
                                                          mr.style = 'line';
                                                          opts.closePath = false;
                                                          var yaxis = plot.axes[obj.options.yaxis],
                                                              ystart,
                          Severity: Major
                          Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                        for (var i=0; i<dashPat.length; i++) {
                                                            dashPatLen += dashPat[i];
                                                        }
                            Severity: Major
                            Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          for (var i=0; i<dashPat.length; i++) {
                                                              dashPatLen += dashPat[i];
                                                          }
                              Severity: Major
                              Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js - About 45 mins to fix

                                Function handleMove has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    function handleMove(ev, gridpos, datapos, neighbor, plot) {
                                Severity: Minor
                                Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js - About 35 mins to fix

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                                          case 'horizontalLine':
                                                              
                                                              // style and shadow properties should be set before
                                                              // every draw of marker renderer.
                                                              if (obj.options.y != null) {
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 509..550

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 526.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                                          case 'verticalLine':
                                                              
                                                              // style and shadow properties should be set before
                                                              // every draw of marker renderer.
                                                              if (obj.options.x != null) {
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 406..447

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 526.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                                      switch (obj.type) {
                                                          case 'line':
                                                              showTooltip(plot, obj, [gridpos.x, gridpos.y], datapos);
                                                              break;
                                  
                                  
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 764..780

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 135.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                                      switch (obj.type) {
                                                          case 'line':
                                                              showTooltip(plot, obj, [gridpos.x, gridpos.y], datapos);
                                                              break;
                                  
                                  
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 823..839

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 135.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 5 locations. Consider refactoring.
                                  Open

                                      $.jqplot.CanvasOverlay.prototype.addLine = function(opts) {
                                          var line = new Line(opts);
                                          line.uid = objCounter++;
                                          this.objects.push(line);
                                          this.objectNames.push(line.options.name);
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 313..318
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 320..325
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 327..332
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 334..339

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 91.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 5 locations. Consider refactoring.
                                  Open

                                      $.jqplot.CanvasOverlay.prototype.addDashedHorizontalLine = function(opts) {
                                          var line = new DashedHorizontalLine(opts);
                                          line.uid = objCounter++;
                                          this.objects.push(line);
                                          this.objectNames.push(line.options.name);
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 306..311
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 313..318
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 327..332
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 334..339

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 91.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 5 locations. Consider refactoring.
                                  Open

                                      $.jqplot.CanvasOverlay.prototype.addDashedVerticalLine = function(opts) {
                                          var line = new DashedVerticalLine(opts);
                                          line.uid = objCounter++;
                                          this.objects.push(line);
                                          this.objectNames.push(line.options.name);
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 306..311
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 313..318
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 320..325
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 327..332

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 91.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 5 locations. Consider refactoring.
                                  Open

                                      $.jqplot.CanvasOverlay.prototype.addHorizontalLine = function(opts) {
                                          var line = new HorizontalLine(opts);
                                          line.uid = objCounter++;
                                          this.objects.push(line);
                                          this.objectNames.push(line.options.name);
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 306..311
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 320..325
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 327..332
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 334..339

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 91.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 5 locations. Consider refactoring.
                                  Open

                                      $.jqplot.CanvasOverlay.prototype.addVerticalLine = function(opts) {
                                          var line = new VerticalLine(opts);
                                          line.uid = objCounter++;
                                          this.objects.push(line);
                                          this.objectNames.push(line.options.name);
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 306..311
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 313..318
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 320..325
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 334..339

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 91.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                                              start = [plot.axes[obj.options.xaxis].series_u2p(obj.options.start[0]), plot.axes[obj.options.yaxis].series_u2p(obj.options.start[1])];
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 401..401

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 82.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                                              stop = [plot.axes[obj.options.xaxis].series_u2p(obj.options.stop[0]), plot.axes[obj.options.yaxis].series_u2p(obj.options.stop[1])];
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 400..400

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 82.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                      $.jqplot.CanvasOverlay.postPlotInit = function (target, data, opts) {
                                          var options = opts || {};
                                          // add a canvasOverlay attribute to the plot
                                          this.plugins.canvasOverlay = new $.jqplot.CanvasOverlay(options.canvasOverlay);     
                                      };
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.highlighter.js on lines 167..171

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 73.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                          var opts = {
                                              y: null,
                                              xmin: null,
                                              xmax: null,
                                              xOffset: '6px', // number or string.  Number interpreted as units, string as pixels.
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 283..295

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 53.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                          var opts = {
                                              x: null,
                                              ymin: null,
                                              ymax: null,
                                              yOffset: '6px', // number or string.  Number interpreted as units, string as pixels.
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.canvasOverlay.js on lines 224..236

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 53.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  Identical blocks of code found in 2 locations. Consider refactoring.
                                  Open

                                          if (opts.fadeTooltip) {
                                              // Fix for stacked up animations.  Thnanks Trevor!
                                              elem.stop(true,true).fadeIn(opts.tooltipFadeSpeed);
                                          }
                                          else {
                                  assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.highlighter.js on lines 388..394

                                  Duplicated Code

                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                  Tuning

                                  This issue has a mass of 51.

                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                  Refactorings

                                  Further Reading

                                  There are no issues that match your filters.

                                  Category
                                  Status