backlogs/redmine_backlogs

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

Summary

Maintainability
F
1 wk
Test Coverage

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

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

    Function init has 80 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.jqplot.BubbleRenderer.prototype.init = function(options, plot) {
            // Group: Properties
            //
            // prop: varyBubbleColors
            // True to vary the color of each bubble in this series according to

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

          $.jqplot.BubbleAxisRenderer.prototype.init = function(options){
              $.extend(true, this, options);
              var db = this._dataBounds;
              var minsidx = 0,
                  minpidx = 0,

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

            $.jqplot.BubbleRenderer.prototype.draw = function (ctx, gd, options) {
                if (this.plugins.pointLabels) {
                    this.plugins.pointLabels.show = false;
                }
                var opts = (options != undefined) ? options : {};

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

              $.jqplot.BubbleCanvas.prototype.draw = function(r, color, gradients, angle) {
                  var ctx = this._ctx;
                  // r = Math.floor(r*1.04);
                  // var x = Math.round(ctx.canvas.width/2);
                  // var y = Math.round(ctx.canvas.height/2);

            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.bubbleRenderer.js - About 35 mins to fix

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

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

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

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

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

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

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

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

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

                          $.jqplot.DivCanvas.prototype.createElement = function(offsets, clss, plotDimensions) {
                              this._offsets = offsets;
                              var klass = 'jqplot-DivCanvas';
                              if (clss != undefined) {
                                  klass = clss;
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.blockRenderer.js on lines 194..220

                      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 331.

                      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

                                      else {
                                          if (d[j][1] < db.min || db.min == null) {
                                              db.min = d[j][1];
                                              minsidx=i;
                                              minpidx=j;
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.bubbleRenderer.js on lines 528..545

                      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 213.

                      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

                                      if (this.name == 'xaxis' || this.name == 'x2axis') {
                                          if (d[j][0] < db.min || db.min == null) {
                                              db.min = d[j][0];
                                              minsidx=i;
                                              minpidx=j;
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.bubbleRenderer.js on lines 546..563

                      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 213.

                      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 3 locations. Consider refactoring.
                      Open

                          $.jqplot.DivCanvas.prototype.setContext = function() {
                              this._ctx = {
                                  canvas:{
                                      width:0,
                                      height:0
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.blockRenderer.js on lines 222..231
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.blockRenderer.min.js on lines 57..57

                      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 76.

                      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 6 locations. Consider refactoring.
                      Open

                          function handleMouseUp(ev, gridpos, datapos, neighbor, plot) {
                              var idx = plot.plugins.bubbleRenderer.highlightedSeriesIndex;
                              if (idx != null && plot.series[idx].highlightMouseDown) {
                                  unhighlight(plot);
                              }
                      assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 5930..5935
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 722..727
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 735..740
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 873..878
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 833..838

                      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 66.

                      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.BubbleCanvas.prototype.setContext = function() {
                              this._ctx = this._elem.get(0).getContext("2d");
                              return this._ctx;
                          };
                      assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 1648..1651

                      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 65.

                      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

                                      gd.push([xp.call(this._xaxis, data[i][0]), yp.call(this._yaxis, data[i][1]), data[i][2]]);
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.bubbleRenderer.js on lines 251..251

                      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 56.

                      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

                                      this.gridData.push([xp.call(this._xaxis, data[i][0]), yp.call(this._yaxis, data[i][1]), data[i][2]]);
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.bubbleRenderer.js on lines 284..284

                      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 56.

                      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

                                      color = 'rgba('+comps[0]+', '+comps[1]+', '+comps[2]+', '+this.bubbleAlpha+')';
                      assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 1357..1357

                      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 50.

                      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.DivCanvas = function() {
                              $.jqplot.ElemContainer.call(this);
                              this._ctx;  
                          };
                      assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 1612..1615
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.blockRenderer.js on lines 186..189
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.blockRenderer.min.js on lines 57..57
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.bubbleRenderer.js on lines 417..420

                      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 46.

                      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.BubbleCanvas = function() {
                              $.jqplot.ElemContainer.call(this);
                              this._ctx;
                          };
                      assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 1612..1615
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.blockRenderer.js on lines 186..189
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.blockRenderer.min.js on lines 57..57
                      assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.bubbleRenderer.js on lines 370..373

                      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 46.

                      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