gopheracademy/gcon

View on GitHub
assets/admin/global/plugins/highstock/js/highcharts-more.src.js

Summary

Maintainability
F
4 mos
Test Coverage

File highcharts-more.src.js has 1795 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// ==ClosureCompiler==
// @compilation_level SIMPLE_OPTIMIZATIONS

/**
 * @license Highcharts JS v4.1.9 (2015-10-07)
Severity: Major
Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 4 days to fix

    Function drawPoints has 148 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        drawPoints: function () {
            var series = this,  //state = series.state,
                points = series.points,
                options = series.options,
                chart = series.chart,
    Severity: Major
    Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 5 hrs to fix

      Function beforePadding has 72 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Axis.prototype.beforePadding = function () {
          var axis = this,
              axisLength = this.len,
              chart = this.chart,
              pxMin = 0, 
      Severity: Major
      Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 2 hrs to fix

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

            translate: function () {
                var series = this,
                    options = series.options,
                    yAxis = series.yAxis,
                    len,
        Severity: Major
        Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 2 hrs to fix

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

              drawDataLabels: function () {
                  
                  var data = this.data,
                      length = data.length,
                      i,
          Severity: Major
          Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 2 hrs to fix

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

                getPlotBandPath: function (from, to, options) {
                    var center = this.center,
                        startAngleRad = this.startAngleRad,
                        fullRadius = center[2] / 2,
                        radii = [
            Severity: Major
            Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 2 hrs to fix

              Function translate has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  translate: function () {
                      
                      var series = this,
                          yAxis = series.yAxis,
                          options = series.options,
              Severity: Minor
              Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 1 hr to fix

                Function polarAnimate has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function polarAnimate(proceed, init) {
                        var chart = this.chart,
                            animation = this.options.animation,
                            group = this.group,
                            markerGroup = this.markerGroup,
                Severity: Minor
                Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 1 hr to fix

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

                      drawPoints: function () {
                          
                          var series = this,
                              center = series.yAxis.center,
                              pivot = series.pivot,
                  Severity: Minor
                  Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 1 hr to fix

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

                        getSegmentPath: function (segment) {
                            
                            var lowSegment,
                                highSegment = [],
                                i = segment.length,
                    Severity: Minor
                    Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 1 hr to fix

                      Function getPlotLinePath has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          getPlotLinePath: function (value, reverse) {
                              var axis = this,
                                  center = axis.center,
                                  chart = axis.chart,
                                  end = axis.getPosition(value),
                      Severity: Minor
                      Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                    if (point.plotY !== UNDEFINED) {
                        
                                        pointAttr = point.pointAttr[point.selected ? 'selected' : ''];
                        
                                        // crisp vector coordinates
                        Severity: Critical
                        Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 1 hr to fix

                          Function getRadii has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              getRadii: function (zMin, zMax, minSize, maxSize) {
                                  var len,
                                      i,
                                      pos,
                                      zData = this.zData,
                          Severity: Minor
                          Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 1 hr to fix

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

                                processData: function (force) {
                                    var series = this,
                                        options = series.options,
                                        yData = series.yData,
                                        points = series.options.data, // #3710 Update point does not propagate to sum
                            Severity: Minor
                            Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 1 hr to fix

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

                                  translate: function () {
                                      
                                      var i,
                                          data = this.data,
                                          point,
                              Severity: Minor
                              Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 1 hr to fix

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

                                    getGraphPath: function () {
                                
                                        var data = this.data,
                                            length = data.length,
                                            lineWidth = this.options.lineWidth + this.borderWidth,
                                Severity: Minor
                                Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 1 hr to fix

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

                                          translate: function () {
                                              var series = this,
                                                  yAxis = series.yAxis,
                                                  plotHigh;
                                  
                                  Severity: Minor
                                  Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 1 hr to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            if (!align) {
                                                                dataLabelOptions.align = up ? 'right' : 'left';
                                                            }
                                    Severity: Major
                                    Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              if (!align) {
                                                                  dataLabelOptions.align = up ? 'left' : 'right';
                                                              }
                                      Severity: Major
                                      Found in assets/admin/global/plugins/highstock/js/highcharts-more.src.js - About 45 mins to fix

                                        TODO found
                                        Open

                                                        // TODO: Implement true handling of Y axis categories on gauges.

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

                                        (function (Highcharts, UNDEFINED) {
                                        var arrayMin = Highcharts.arrayMin,
                                            arrayMax = Highcharts.arrayMax,
                                            each = Highcharts.each,
                                            extend = Highcharts.extend,
                                        assets/admin/global/plugins/highcharts/js/highcharts-more.src.js on lines 15..2650

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

                                        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