backlogs/redmine_backlogs

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

Summary

Maintainability
F
1 wk
Test Coverage

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

/**
 * jqPlot
 * Pure JavaScript plotting plugin using jQuery
 *
 * Version: 1.0.0
Severity: Major
Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 1 day to fix

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

        $.jqplot.BarRenderer.prototype.draw = function(ctx, gridData, options) {
            var i;
            // Ughhh, have to make a copy of options b/c it may be modified later.
            var opts = $.extend({}, options);
            var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow;
    Severity: Major
    Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 1 day to fix

      Function drawShadow has 74 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $.jqplot.BarRenderer.prototype.drawShadow = function(ctx, gridData, options) {
              var i;
              var opts = (options != undefined) ? options : {};
              var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow;
              var showLine = (opts.showLine != undefined) ? opts.showLine : this.showLine;
      Severity: Major
      Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 2 hrs to fix

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

            $.jqplot.BarRenderer.prototype.init = function(options, plot) {
                // Group: Properties
                //
                // prop: barPadding
                // Number of pixels between adjacent bars at the same axis value.
        Severity: Major
        Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 2 hrs to fix

          Function barPreInit has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function barPreInit(target, data, seriesDefaults, options) {
                  if (this.rendererOptions.barDirection == 'horizontal') {
                      this._stackAxis = 'x';
                      this._primaryAxis = '_yaxis';
                  }

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

                $.jqplot.BarRenderer.prototype.setBarWidth = function() {
                    // need to know how many data values we have on the approprate axis and figure it out.
                    var i;
                    var nvals = 0;
                    var nseries = 0;

              Avoid deeply nested control flow statements.
              Open

                                      if (this.fillToZero) {
                                          ystart = this._yaxis.series_u2p(0);
                                      }
                                      else if (this.waterfall && i > 0 && i < this.gridData.length-1) {
                                          ystart = this.gridData[i-1][1];
              Severity: Major
              Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if (this.varyBarColor && !this._stack) {
                                            if (this.useNegativeColors) {
                                                opts.fillStyle = negativeColors.next();
                                            }
                                            else {
                Severity: Major
                Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if (this.data[i][0] == null) {
                                          continue;
                                      }
                  Severity: Major
                  Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if (this.varyBarColor && !this._stack) {
                                                opts.fillStyle = positiveColors.next();
                                            }
                                            else {
                                                opts.fillStyle = positiveColor;
                    Severity: Major
                    Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if ((this.fillToZero && this._plotData[i][1] < 0) || (this.waterfall && this._data[i][1] < 0)) {
                                              if (this.varyBarColor && !this._stack) {
                                                  if (this.useNegativeColors) {
                                                      opts.fillStyle = negativeColors.next();
                                                  }
                      Severity: Major
                      Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if (this.data[i][1] == null) {
                                                    continue;
                                                }
                        Severity: Major
                        Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              for (var i=0; i<gridData.length; i++) {
                                                  if (this.data[i][0] == null) {
                                                      continue;
                                                  }
                                                  points = [];
                          Severity: Major
                          Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if (this._stack && this._prevGridData.length) {
                                                    xstart = this._prevGridData[i][0];
                                                }
                                                // not stacked and first series in stack
                                                else {
                            Severity: Major
                            Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if (shadow && !this._stack) {
                                                      var sopts = $.extend(true, {}, opts);
                                                      delete sopts.fillStyle;
                                                      this.renderer.shadowRenderer.draw(ctx, points, sopts);
                                                  }
                              Severity: Major
                              Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        if (this._stack && this._prevGridData.length) {
                                                            ystart = this._prevGridData[i][1];
                                                        }
                                                        else {
                                                            if (this.fillToZero) {
                                Severity: Major
                                Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if (ystart === null) {
                                                              ystart = this._yaxis.series_u2p(0);
                                                          }
                                  Severity: Major
                                  Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if (!this.fillToZero || this._plotData[i][0] >= 0) {
                                                            points.push([xstart, base + this.barWidth / 2]);
                                                            points.push([xstart, base - this.barWidth / 2]);
                                                            points.push([gridData[i][0], base - this.barWidth / 2]);
                                                            points.push([gridData[i][0], base + this.barWidth / 2]);
                                    Severity: Major
                                    Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js - About 45 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.barRenderer.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.barRenderer.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.barRenderer.js - About 35 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.barRenderer.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.barRenderer.js - About 35 mins to fix

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

                                                    function handleMove(ev, gridpos, datapos, neighbor, plot) {
                                                        if (neighbor) {
                                                            var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
                                                            var evt1 = jQuery.Event('jqplotDataMouseOver');
                                                            evt1.pageX = ev.pageX;
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pyramidRenderer.js on lines 489..508

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

                                                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

                                                    function postPlotDraw() {
                                                        // Memory Leaks patch    
                                                        if (this.plugins.barRenderer && this.plugins.barRenderer.highlightCanvas) {
                                                
                                                            this.plugins.barRenderer.highlightCanvas.resetCanvas();
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pyramidRenderer.js on lines 445..459

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

                                                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

                                                    function unhighlight (plot) {
                                                        var canvas = plot.plugins.barRenderer.highlightCanvas;
                                                        canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height);
                                                        for (var i=0; i<plot.series.length; i++) {
                                                            plot.series[i]._highlightedPoint = null;
                                                assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 5880..5889
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pyramidRenderer.js on lines 477..486

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

                                                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 (paxis.name == 'xaxis' || paxis.name == 'x2axis') {
                                                            if (this._stack) {
                                                                this.barWidth = (paxis._offsets.max - paxis._offsets.min) / nvals * nseries - this.barMargin;
                                                            }
                                                            else {
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 261..269

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

                                                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 (this._stack) {
                                                                this.barWidth = (paxis._offsets.min - paxis._offsets.max) / nvals * nseries - this.barMargin;
                                                            }
                                                            else {
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 252..260

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

                                                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

                                                    function handleClick(ev, gridpos, datapos, neighbor, plot) {
                                                        if (neighbor) {
                                                            var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
                                                            var evt = jQuery.Event('jqplotDataClick');
                                                        evt.which = ev.which;
                                                assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 5937..5946
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 742..751
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 880..889
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 840..849

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

                                                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

                                                    function postInit(target, data, options) {
                                                        for (var i=0; i<this.series.length; i++) {
                                                            if (this.series[i].renderer.constructor == $.jqplot.BarRenderer) {
                                                                // don't allow mouseover and mousedown at same time.
                                                                if (this.series[i].highlightMouseOver) {
                                                assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 5836..5845
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 757..766

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

                                                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

                                                                        else if (this.waterfall && i == this.gridData.length - 1) {
                                                                            if (this._xaxis.min <= 0 && this._xaxis.max >= 0) {
                                                                                xstart = this._xaxis.series_u2p(0);
                                                                            }
                                                                            else if (this._xaxis.min > 0) {
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 454..478

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

                                                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

                                                                        else if (this.waterfall && i == this.gridData.length - 1) {
                                                                            if (this._yaxis.min <= 0 && this._yaxis.max >= 0) {
                                                                                ystart = this._yaxis.series_u2p(0);
                                                                            }
                                                                            else if (this._yaxis.min > 0) {
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 358..382

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

                                                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

                                                                        else if (this.waterfall && i == 0 && i < this.gridData.length-1) {
                                                                            if (this._yaxis.min <= 0 && this._yaxis.max >= 0) {
                                                                                ystart = this._yaxis.series_u2p(0);
                                                                            }
                                                                            else if (this._yaxis.min > 0) {
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 369..382

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

                                                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

                                                                        else if (this.waterfall && i == 0 && i < this.gridData.length-1) {
                                                                            if (this._xaxis.min <= 0 && this._xaxis.max >= 0) {
                                                                                xstart = this._xaxis.series_u2p(0);
                                                                            }
                                                                            else if (this._xaxis.min > 0) {
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 465..478

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

                                                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._stack) {
                                                            this._barNudge = 0;
                                                        }
                                                        else {
                                                            this._barNudge = (-Math.abs(nseries/2 - 0.5) + pos) * (this.barWidth + this.barPadding);
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 566..571

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

                                                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._stack) {
                                                                this._barNudge = 0;
                                                            }
                                                            else {
                                                                this._barNudge = (-Math.abs(nseries/2 - 0.5) + pos) * (this.barWidth + this.barPadding);
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 315..320

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

                                                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.barRenderer.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.bubbleRenderer.js on lines 666..671
                                                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

                                                            this._data[this._data.length] = (pos == 1) ? [this._data.length+1, sum] : [sum, this._data.length+1];
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 191..191

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

                                                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

                                                            this.data[this.data.length] = (pos == 1) ? [this.data.length+1, sum] : [sum, this.data.length+1];
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 192..192

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

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

                                                                    if ((this.fillToZero && this._plotData[i][1] < 0) || (this.waterfall && this._data[i][1] < 0)) {
                                                                        if (this.varyBarColor && !this._stack) {
                                                                            if (this.useNegativeColors) {
                                                                                opts.fillStyle = negativeColors.next();
                                                                            }
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 480..497
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pyramidRenderer.js on lines 332..349

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

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

                                                                    if ((this.fillToZero && this._plotData[i][1] < 0) || (this.waterfall && this._data[i][1] < 0)) {
                                                                        if (this.varyBarColor && !this._stack) {
                                                                            if (this.useNegativeColors) {
                                                                                opts.fillStyle = negativeColors.next();
                                                                            }
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 384..404
                                                assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pyramidRenderer.js on lines 332..349

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

                                                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