monsij/StudentPortal

View on GitHub
pro1/staticfiles/blog/bootstrap/js/modules/chart.js

Summary

Maintainability
F
2 yrs
Test Coverage

File chart.js has 10124 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Chart.js
 * http://chartjs.org/
 * Version: 2.7.2
 *
Severity: Major
Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 mo to fix

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

    },{"45":45}],35:[function(require,module,exports){
    'use strict';
    
    var defaults = require(25);
    var Element = require(26);
    Severity: Major
    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 days to fix

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

      },{"25":25,"45":45}],32:[function(require,module,exports){
      'use strict';
      
      var defaults = require(25);
      var Element = require(26);
      Severity: Major
      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 days to fix

        Function exports has 620 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = function(Chart) {
        
            /**
              * Helper method to merge the opacity into a color
              */
        Severity: Major
        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 days to fix

          Function 23 has 604 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{"25":25,"26":26,"45":45}],23:[function(require,module,exports){
          'use strict';
          
          var defaults = require(25);
          var helpers = require(45);
          Severity: Major
          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 days to fix

            Function exports has 598 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            module.exports = function(Chart) {
            
                function computeTextSize(context, tick, font) {
                    return helpers.isArray(tick) ?
                        helpers.longestText(context, font, tick) :
            Severity: Major
            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 days to fix

              Function exports has 596 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              module.exports = function(Chart) {
              
                  // Create a dictionary of chart types, to allow for extension of existing types
                  Chart.types = {};
              
              
              Severity: Major
              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 days to fix

                Function 4 has 580 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                },{"2":2,"5":5}],4:[function(require,module,exports){
                /* MIT license */
                
                module.exports = {
                  rgb2hsl: rgb2hsl,
                Severity: Major
                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 days to fix

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

                  },{"25":25,"34":34,"45":45}],58:[function(require,module,exports){
                  /* global window: false */
                  'use strict';
                  
                  var moment = require(1);
                  Severity: Major
                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 days to fix

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

                    },{"3":3,"45":45}],27:[function(require,module,exports){
                    /* global window: false */
                    /* global document: false */
                    'use strict';
                    
                    
                    Severity: Major
                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 days to fix

                      Function exports has 484 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      module.exports = function(Chart) {
                      
                          // -- Basic js utility methods
                      
                          helpers.configMerge = function(/* objects ... */) {
                      Severity: Major
                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 days to fix

                        Function 3 has 400 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        },{"6":6}],3:[function(require,module,exports){
                        /* MIT license */
                        var convert = require(5);
                        var string = require(2);
                        
                        
                        Severity: Major
                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 days to fix

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

                          },{"25":25,"40":40,"45":45}],51:[function(require,module,exports){
                          'use strict';
                          
                          var defaults = require(25);
                          var Element = require(26);
                          Severity: Major
                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

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

                            },{"34":34,"45":45}],57:[function(require,module,exports){
                            'use strict';
                            
                            var defaults = require(25);
                            var helpers = require(45);
                            Severity: Major
                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                              Function exports has 376 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              module.exports = function(Chart) {
                              
                                  var globalDefaults = defaults.global;
                              
                                  var defaultConfig = {
                              Severity: Major
                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                                Function 15 has 347 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                },{}],15:[function(require,module,exports){
                                'use strict';
                                
                                var defaults = require(25);
                                var elements = require(40);
                                Severity: Major
                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                                  Function 47 has 294 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  },{}],47:[function(require,module,exports){
                                  /**
                                   * Chart.Platform implementation for targeting a web browser
                                   */
                                  
                                  
                                  Severity: Major
                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                                    Function 56 has 282 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    },{"45":45}],56:[function(require,module,exports){
                                    'use strict';
                                    
                                    var helpers = require(45);
                                    var Ticks = require(34);
                                    Severity: Major
                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                                      Function 18 has 262 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      },{"25":25,"40":40,"45":45}],18:[function(require,module,exports){
                                      'use strict';
                                      
                                      var defaults = require(25);
                                      var elements = require(40);
                                      Severity: Major
                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

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

                                        },{"50":50,"51":51,"52":52}],50:[function(require,module,exports){
                                        /**
                                         * Plugin based on discussion from the following Chart.js issues:
                                         * @see https://github.com/chartjs/Chart.js/issues/2380#issuecomment-279961569
                                         * @see https://github.com/chartjs/Chart.js/issues/2440#issuecomment-256461897
                                        Severity: Major
                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                                          Function exports has 247 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                          module.exports = function(Chart) {
                                          
                                              var defaultConfig = {
                                                  position: 'bottom',
                                          
                                          
                                          Severity: Major
                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                                            Function exports has 247 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                            module.exports = function(Chart) {
                                            
                                                var defaultConfig = {
                                                    position: 'left',
                                            
                                            
                                            Severity: Major
                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

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

                                              },{"25":25}],30:[function(require,module,exports){
                                              'use strict';
                                              
                                              var helpers = require(45);
                                              
                                              
                                              Severity: Major
                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                                                Function exports has 240 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                module.exports = function(Chart) {
                                                
                                                    function lineEnabled(dataset, options) {
                                                        return helpers.valueOrDefault(dataset.showLine, options.showLines);
                                                    }
                                                Severity: Major
                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                                                  Function 17 has 232 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                  },{"25":25,"40":40,"45":45}],17:[function(require,module,exports){
                                                  'use strict';
                                                  
                                                  var defaults = require(25);
                                                  var elements = require(40);
                                                  Severity: Major
                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

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

                                                    },{"25":25,"28":28,"30":30,"31":31,"45":45,"48":48}],24:[function(require,module,exports){
                                                    'use strict';
                                                    
                                                    var helpers = require(45);
                                                    
                                                    
                                                    Severity: Major
                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                                                      Function exports has 222 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                      module.exports = function(Chart) {
                                                      
                                                          Chart.controllers.bar = Chart.DatasetController.extend({
                                                      
                                                              dataElementType: elements.Rectangle,
                                                      Severity: Major
                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                                                        Function exports has 221 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                        module.exports = function(Chart) {
                                                        
                                                            var arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];
                                                        
                                                            /**
                                                        Severity: Major
                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

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

                                                                  draw: function(chartArea) {
                                                                      var me = this;
                                                                      var options = me.options;
                                                                      if (!options.display) {
                                                                          return;
                                                          Severity: Major
                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

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

                                                            },{}],43:[function(require,module,exports){
                                                            'use strict';
                                                            
                                                            var helpers = require(42);
                                                            
                                                            
                                                            Severity: Major
                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 day to fix

                                                              Function update has 192 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  update: function(chart, width, height) {
                                                                      if (!chart) {
                                                                          return;
                                                                      }
                                                              
                                                              
                                                              Severity: Major
                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 7 hrs to fix

                                                                Function 2 has 191 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                },{}],2:[function(require,module,exports){
                                                                /* MIT license */
                                                                var colorNames = require(6);
                                                                
                                                                module.exports = {
                                                                Severity: Major
                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 7 hrs to fix

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

                                                                  },{"25":25,"26":26,"30":30,"45":45}],52:[function(require,module,exports){
                                                                  'use strict';
                                                                  
                                                                  var defaults = require(25);
                                                                  var Element = require(26);
                                                                  Severity: Major
                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 7 hrs to fix

                                                                    Function 19 has 177 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                    },{"25":25,"40":40,"45":45}],19:[function(require,module,exports){
                                                                    'use strict';
                                                                    
                                                                    var defaults = require(25);
                                                                    var elements = require(40);
                                                                    Severity: Major
                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 7 hrs to fix

                                                                      Function 28 has 168 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                      },{"25":25,"3":3,"45":45}],28:[function(require,module,exports){
                                                                      'use strict';
                                                                      
                                                                      var helpers = require(45);
                                                                      
                                                                      
                                                                      Severity: Major
                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 6 hrs to fix

                                                                        Function 39 has 165 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                        },{"25":25,"26":26,"45":45}],39:[function(require,module,exports){
                                                                        'use strict';
                                                                        
                                                                        var defaults = require(25);
                                                                        var Element = require(26);
                                                                        Severity: Major
                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 6 hrs to fix

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

                                                                          },{"36":36,"37":37,"38":38,"39":39}],41:[function(require,module,exports){
                                                                          'use strict';
                                                                          
                                                                          var helpers = require(42);
                                                                          
                                                                          
                                                                          Severity: Major
                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 6 hrs to fix

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

                                                                            },{"42":42}],42:[function(require,module,exports){
                                                                            'use strict';
                                                                            
                                                                            /**
                                                                             * @namespace Chart.helpers
                                                                            Severity: Major
                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 6 hrs to fix

                                                                              Function 54 has 153 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                              },{}],54:[function(require,module,exports){
                                                                              'use strict';
                                                                              
                                                                              var defaults = require(25);
                                                                              var helpers = require(45);
                                                                              Severity: Major
                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 6 hrs to fix

                                                                                Function 6 has 150 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                },{"4":4}],6:[function(require,module,exports){
                                                                                'use strict'
                                                                                
                                                                                module.exports = {
                                                                                    "aliceblue": [240, 248, 255],
                                                                                Severity: Major
                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 6 hrs to fix

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

                                                                                  module.exports = function(Chart) {
                                                                                  
                                                                                      var defaultConfig = {
                                                                                          position: 'left',
                                                                                          ticks: {
                                                                                  Severity: Major
                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 5 hrs to fix

                                                                                    Function 16 has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                    },{"25":25,"40":40,"45":45}],16:[function(require,module,exports){
                                                                                    'use strict';
                                                                                    
                                                                                    var defaults = require(25);
                                                                                    var elements = require(40);
                                                                                    Severity: Major
                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 5 hrs to fix

                                                                                      Function exports has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                      module.exports = function(Chart) {
                                                                                      
                                                                                          Chart.controllers.doughnut = Chart.controllers.pie = Chart.DatasetController.extend({
                                                                                      
                                                                                              dataElementType: elements.Arc,
                                                                                      Severity: Major
                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 5 hrs to fix

                                                                                        Function 55 has 130 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                        },{"25":25,"34":34,"45":45}],55:[function(require,module,exports){
                                                                                        'use strict';
                                                                                        
                                                                                        var helpers = require(45);
                                                                                        
                                                                                        
                                                                                        Severity: Major
                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 5 hrs to fix

                                                                                          Function 20 has 125 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                          },{"25":25,"40":40,"45":45}],20:[function(require,module,exports){
                                                                                          'use strict';
                                                                                          
                                                                                          var defaults = require(25);
                                                                                          var elements = require(40);
                                                                                          Severity: Major
                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 5 hrs to fix

                                                                                            Function 22 has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                            },{"25":25}],22:[function(require,module,exports){
                                                                                            /* global window: false */
                                                                                            'use strict';
                                                                                            
                                                                                            var defaults = require(25);
                                                                                            Severity: Major
                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 4 hrs to fix

                                                                                              Function exports has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                              module.exports = function(Chart) {
                                                                                              
                                                                                                  Chart.controllers.radar = Chart.DatasetController.extend({
                                                                                              
                                                                                                      datasetElementType: elements.Line,
                                                                                              Severity: Major
                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 4 hrs to fix

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

                                                                                                    draw: function() {
                                                                                                        var me = this;
                                                                                                        var opts = me.options;
                                                                                                        var labelOpts = opts.labels;
                                                                                                        var globalDefault = defaults.global;
                                                                                                Severity: Major
                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 4 hrs to fix

                                                                                                  Function drawPoint has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                      drawPoint: function(ctx, style, radius, x, y) {
                                                                                                          var type, edgeLength, xOffset, yOffset, height, size;
                                                                                                  
                                                                                                          if (style && typeof style === 'object') {
                                                                                                              type = style.toString();
                                                                                                  Severity: Major
                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 4 hrs to fix

                                                                                                    Function exports has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                    module.exports = function(Chart) {
                                                                                                    
                                                                                                        Chart.controllers.bubble = Chart.DatasetController.extend({
                                                                                                            /**
                                                                                                             * @protected
                                                                                                    Severity: Major
                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 4 hrs to fix

                                                                                                      Function exports has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                      module.exports = function(Chart) {
                                                                                                      
                                                                                                          Chart.Animation = Element.extend({
                                                                                                              chart: null, // the animation associated chart instance
                                                                                                              currentStep: 0, // the current animation step
                                                                                                      Severity: Major
                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

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

                                                                                                        },{"25":25,"26":26,"30":30,"45":45}],53:[function(require,module,exports){
                                                                                                        'use strict';
                                                                                                        
                                                                                                        module.exports = function(Chart) {
                                                                                                        
                                                                                                        
                                                                                                        Severity: Major
                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

                                                                                                          Function exports has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                          module.exports = function(Chart) {
                                                                                                          
                                                                                                              // Default config for a category scale
                                                                                                              var defaultConfig = {
                                                                                                                  position: 'bottom'
                                                                                                          Severity: Major
                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

                                                                                                            Function determineDataLimits has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                    determineDataLimits: function() {
                                                                                                                        var me = this;
                                                                                                                        var opts = me.options;
                                                                                                                        var chart = me.chart;
                                                                                                                        var data = chart.data;
                                                                                                            Severity: Major
                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

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

                                                                                                              },{"45":45}],31:[function(require,module,exports){
                                                                                                              'use strict';
                                                                                                              
                                                                                                              var defaults = require(25);
                                                                                                              var helpers = require(45);
                                                                                                              Severity: Major
                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

                                                                                                                Function exports has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                module.exports = function(Chart) {
                                                                                                                
                                                                                                                    var noop = helpers.noop;
                                                                                                                
                                                                                                                    Chart.LinearScaleBase = Chart.Scale.extend({
                                                                                                                Severity: Major
                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

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

                                                                                                                  },{"25":25,"26":26,"45":45}],38:[function(require,module,exports){
                                                                                                                  'use strict';
                                                                                                                  
                                                                                                                  var defaults = require(25);
                                                                                                                  var Element = require(26);
                                                                                                                  Severity: Major
                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

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

                                                                                                                    },{"45":45}],26:[function(require,module,exports){
                                                                                                                    'use strict';
                                                                                                                    
                                                                                                                    var color = require(3);
                                                                                                                    var helpers = require(45);
                                                                                                                    Severity: Major
                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

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

                                                                                                                      },{"25":25,"26":26,"45":45}],36:[function(require,module,exports){
                                                                                                                      'use strict';
                                                                                                                      
                                                                                                                      var defaults = require(25);
                                                                                                                      var Element = require(26);
                                                                                                                      Severity: Major
                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

                                                                                                                        Function determineDataLimits has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                                determineDataLimits: function() {
                                                                                                                                    var me = this;
                                                                                                                                    var opts = me.options;
                                                                                                                                    var chart = me.chart;
                                                                                                                                    var data = chart.data;
                                                                                                                        Severity: Major
                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

                                                                                                                          Function exports has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                          module.exports = function(Chart) {
                                                                                                                          
                                                                                                                              Chart.controllers.polarArea = Chart.DatasetController.extend({
                                                                                                                          
                                                                                                                                  dataElementType: elements.Arc,
                                                                                                                          Severity: Major
                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

                                                                                                                            Function update has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                                    update: function(changed) {
                                                                                                                                        var me = this;
                                                                                                                                        var opts = me._options;
                                                                                                                            
                                                                                                                                        // Need to regenerate the model because its faster than using extend and it is necessary due to the optimization in Chart.Element.transition
                                                                                                                            Severity: Major
                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

                                                                                                                              Function fit has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                              Open

                                                                                                                                  fit: function() {
                                                                                                                                      var me = this;
                                                                                                                                      var opts = me.options;
                                                                                                                                      var labelOpts = opts.labels;
                                                                                                                                      var display = opts.display;
                                                                                                                              Severity: Major
                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

                                                                                                                                Consider simplifying this complex logical expression.
                                                                                                                                Open

                                                                                                                                            if (circumference < Math.PI * 2.0) {
                                                                                                                                                var startAngle = opts.rotation % (Math.PI * 2.0);
                                                                                                                                                startAngle += Math.PI * 2.0 * (startAngle >= Math.PI ? -1 : startAngle < -Math.PI ? 1 : 0);
                                                                                                                                                var endAngle = startAngle + circumference;
                                                                                                                                                var start = {x: Math.cos(startAngle), y: Math.sin(startAngle)};
                                                                                                                                Severity: Critical
                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 3 hrs to fix

                                                                                                                                  Function fit has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                  Open

                                                                                                                                          fit: function() {
                                                                                                                                              var me = this;
                                                                                                                                              // Reset
                                                                                                                                              var minSize = me.minSize = {
                                                                                                                                                  width: 0,
                                                                                                                                  Severity: Major
                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

                                                                                                                                    Function splineCurveMonotone has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                        helpers.splineCurveMonotone = function(points) {
                                                                                                                                            // This function calculates Bézier control points in a similar way than |splineCurve|,
                                                                                                                                            // but preserves monotonicity of the provided data and ensures no local extremums are added
                                                                                                                                            // between the dataset discrete points due to the interpolation.
                                                                                                                                            // See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation
                                                                                                                                    Severity: Major
                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

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

                                                                                                                                      },{"25":25,"26":26,"45":45}],37:[function(require,module,exports){
                                                                                                                                      'use strict';
                                                                                                                                      
                                                                                                                                      var defaults = require(25);
                                                                                                                                      var Element = require(26);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

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

                                                                                                                                            draw: function() {
                                                                                                                                                var ctx = this._chart.ctx;
                                                                                                                                                var vm = this._view;
                                                                                                                                                var left, right, top, bottom, signX, signY, borderSkipped;
                                                                                                                                                var borderWidth = vm.borderWidth;
                                                                                                                                        Severity: Major
                                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

                                                                                                                                          Function buildOrUpdateScales has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                          Open

                                                                                                                                                  buildOrUpdateScales: function() {
                                                                                                                                                      var me = this;
                                                                                                                                                      var options = me.options;
                                                                                                                                                      var scales = me.scales || {};
                                                                                                                                                      var items = [];
                                                                                                                                          Severity: Major
                                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

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

                                                                                                                                            },{}],5:[function(require,module,exports){
                                                                                                                                            var conversions = require(4);
                                                                                                                                            
                                                                                                                                            var convert = function() {
                                                                                                                                               return new Converter();
                                                                                                                                            Severity: Major
                                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

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

                                                                                                                                                  function determineAlignment(tooltip, size) {
                                                                                                                                                      var model = tooltip._model;
                                                                                                                                                      var chart = tooltip._chart;
                                                                                                                                                      var chartArea = tooltip._chart.chartArea;
                                                                                                                                                      var xAlign = 'center';
                                                                                                                                              Severity: Major
                                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

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

                                                                                                                                                },{"42":42}],44:[function(require,module,exports){
                                                                                                                                                'use strict';
                                                                                                                                                
                                                                                                                                                var helpers = require(42);
                                                                                                                                                
                                                                                                                                                
                                                                                                                                                Severity: Major
                                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

                                                                                                                                                  Function getRgba has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                  Open

                                                                                                                                                  function getRgba(string) {
                                                                                                                                                     if (!string) {
                                                                                                                                                        return;
                                                                                                                                                     }
                                                                                                                                                     var abbr =  /^#([a-fA-F0-9]{3})$/i,
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

                                                                                                                                                    Function 7 has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                    },{}],7:[function(require,module,exports){
                                                                                                                                                    /**
                                                                                                                                                     * @namespace Chart
                                                                                                                                                     */
                                                                                                                                                    var Chart = require(29)();
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

                                                                                                                                                      Function determineDataLimits has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                              determineDataLimits: function() {
                                                                                                                                                                  var me = this;
                                                                                                                                                                  var chart = me.chart;
                                                                                                                                                                  var timeOpts = me.options.time;
                                                                                                                                                                  var unit = timeOpts.unit || 'day';
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

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

                                                                                                                                                                getCaretPosition: function(tooltipPoint, size, vm) {
                                                                                                                                                                    var x1, x2, x3, y1, y2, y3;
                                                                                                                                                                    var caretSize = vm.caretSize;
                                                                                                                                                                    var cornerRadius = vm.cornerRadius;
                                                                                                                                                                    var xAlign = vm.xAlign;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 2 hrs to fix

                                                                                                                                                          Function createResizer has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                          function createResizer(handler) {
                                                                                                                                                              var resizer = document.createElement('div');
                                                                                                                                                              var cls = CSS_PREFIX + 'size-monitor';
                                                                                                                                                              var maxSize = 1000000;
                                                                                                                                                              var style =
                                                                                                                                                          Severity: Minor
                                                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                            Function handleTickRangeOptions has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                            Open

                                                                                                                                                                    handleTickRangeOptions: function() {
                                                                                                                                                                        var me = this;
                                                                                                                                                                        var opts = me.options;
                                                                                                                                                                        var tickOpts = opts.ticks;
                                                                                                                                                            
                                                                                                                                                            
                                                                                                                                                            Severity: Minor
                                                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                  draw: function() {
                                                                                                                                                                      var me = this;
                                                                                                                                                                      var ctx = me.ctx;
                                                                                                                                                                      var valueOrDefault = helpers.valueOrDefault;
                                                                                                                                                                      var opts = me.options;
                                                                                                                                                              Severity: Minor
                                                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                Function update has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                Open

                                                                                                                                                                        update: function(maxWidth, maxHeight, margins) {
                                                                                                                                                                            var me = this;
                                                                                                                                                                            var i, ilen, labels, label, ticks, tick;
                                                                                                                                                                
                                                                                                                                                                            // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
                                                                                                                                                                Severity: Minor
                                                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                          draw: function() {
                                                                                                                                                                              var me = this;
                                                                                                                                                                              var opts = me.options;
                                                                                                                                                                              var gridLineOpts = opts.gridLines;
                                                                                                                                                                              var tickOpts = opts.ticks;
                                                                                                                                                                  Severity: Minor
                                                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                        draw: function() {
                                                                                                                                                                            var me = this;
                                                                                                                                                                            var vm = me._view;
                                                                                                                                                                            var ctx = me._chart.ctx;
                                                                                                                                                                            var spanGaps = vm.spanGaps;
                                                                                                                                                                    Severity: Minor
                                                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                          function getTooltipSize(tooltip, model) {
                                                                                                                                                                              var ctx = tooltip._chart.ctx;
                                                                                                                                                                      
                                                                                                                                                                              var height = model.yPadding * 2; // Tooltip Padding
                                                                                                                                                                              var width = 0;
                                                                                                                                                                      Severity: Minor
                                                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                update: function(reset) {
                                                                                                                                                                                    var me = this;
                                                                                                                                                                                    var meta = me.getMeta();
                                                                                                                                                                                    var line = meta.dataset;
                                                                                                                                                                                    var points = meta.data || [];
                                                                                                                                                                        Severity: Minor
                                                                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                  _resolveElementOptions: function(point, index) {
                                                                                                                                                                                      var me = this;
                                                                                                                                                                                      var chart = me.chart;
                                                                                                                                                                                      var datasets = chart.data.datasets;
                                                                                                                                                                                      var dataset = datasets[me.index];
                                                                                                                                                                          Severity: Minor
                                                                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                function getBackgroundPoint(vm, size, alignment, chart) {
                                                                                                                                                                                    // Background Position
                                                                                                                                                                                    var x = vm.x;
                                                                                                                                                                                    var y = vm.y;
                                                                                                                                                                            
                                                                                                                                                                            
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                              Consider simplifying this complex logical expression.
                                                                                                                                                                              Open

                                                                                                                                                                                          if (showLine) {
                                                                                                                                                                                              custom = line.custom || {};
                                                                                                                                                                              
                                                                                                                                                                                              // Compatibility: If the properties are defined with only the old name, use those values
                                                                                                                                                                                              if ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {
                                                                                                                                                                              Severity: Critical
                                                                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                        update: function(reset) {
                                                                                                                                                                                            var me = this;
                                                                                                                                                                                            var chart = me.chart;
                                                                                                                                                                                            var chartArea = chart.chartArea;
                                                                                                                                                                                            var opts = chart.options;
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                          updateBezierControlPoints: function() {
                                                                                                                                                                                              var me = this;
                                                                                                                                                                                              var meta = me.getMeta();
                                                                                                                                                                                              var area = me.chart.chartArea;
                                                                                                                                                                                              var points = (meta.data || []);
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                    Function updateElement has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                    Open

                                                                                                                                                                                            updateElement: function(arc, index, reset) {
                                                                                                                                                                                                var me = this;
                                                                                                                                                                                                var chart = me.chart;
                                                                                                                                                                                                var chartArea = chart.chartArea;
                                                                                                                                                                                                var opts = chart.options;
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                      Function Color has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                      Open

                                                                                                                                                                                      var Color = function (obj) {
                                                                                                                                                                                          if (obj instanceof Color) {
                                                                                                                                                                                              return obj;
                                                                                                                                                                                          }
                                                                                                                                                                                          if (!(this instanceof Color)) {
                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                        Function fitWithPointLabels has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                            function fitWithPointLabels(scale) {
                                                                                                                                                                                                /*
                                                                                                                                                                                                 * Right, this is really confusing and there is a lot of maths going on here
                                                                                                                                                                                                 * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9
                                                                                                                                                                                                 *
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                          Function buildTicks has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                          Open

                                                                                                                                                                                                  buildTicks: function() {
                                                                                                                                                                                                      var me = this;
                                                                                                                                                                                                      var min = me.min;
                                                                                                                                                                                                      var max = me.max;
                                                                                                                                                                                                      var options = me.options;
                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                            Function getPixelForValue has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                            Open

                                                                                                                                                                                                    getPixelForValue: function(value) {
                                                                                                                                                                                                        var me = this;
                                                                                                                                                                                                        var reverse = me.options.ticks.reverse;
                                                                                                                                                                                                        var log10 = helpers.log10;
                                                                                                                                                                                                        var firstTickValue = me._getFirstTickValue(me.minNotZero);
                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                              Color.prototype.setValues = function (space, vals) {
                                                                                                                                                                                                  var values = this.values;
                                                                                                                                                                                                  var spaces = this.spaces;
                                                                                                                                                                                                  var maxes = this.maxes;
                                                                                                                                                                                                  var alpha = 1;
                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                        updateElement: function(arc, index, reset) {
                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                            var chart = me.chart;
                                                                                                                                                                                                            var dataset = me.getDataset();
                                                                                                                                                                                                            var opts = chart.options;
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                          drawBackground: function(pt, vm, ctx, tooltipSize, opacity) {
                                                                                                                                                                                                              ctx.fillStyle = mergeOpacity(vm.backgroundColor, opacity);
                                                                                                                                                                                                              ctx.strokeStyle = mergeOpacity(vm.borderColor, opacity);
                                                                                                                                                                                                              ctx.lineWidth = vm.borderWidth;
                                                                                                                                                                                                              var xAlign = vm.xAlign;
                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                    },{"45":45}],29:[function(require,module,exports){
                                                                                                                                                                                                    'use strict';
                                                                                                                                                                                                    
                                                                                                                                                                                                    var defaults = require(25);
                                                                                                                                                                                                    
                                                                                                                                                                                                    
                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                              drawBody: function(pt, vm, ctx, opacity) {
                                                                                                                                                                                                                  var bodyFontSize = vm.bodyFontSize;
                                                                                                                                                                                                                  var bodySpacing = vm.bodySpacing;
                                                                                                                                                                                                                  var body = vm.body;
                                                                                                                                                                                                      
                                                                                                                                                                                                      
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                        function doFill(ctx, points, mapper, view, color, loop) {
                                                                                                                                                                                                            var count = points.length;
                                                                                                                                                                                                            var span = view.spanGaps;
                                                                                                                                                                                                            var curve0 = [];
                                                                                                                                                                                                            var curve1 = [];
                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                  render: function(config) {
                                                                                                                                                                                                                      var me = this;
                                                                                                                                                                                                          
                                                                                                                                                                                                                      if (!config || typeof config !== 'object') {
                                                                                                                                                                                                                          // backwards compatibility
                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                function getBaseModel(tooltipOpts) {
                                                                                                                                                                                                                    var globalDefaults = defaults.global;
                                                                                                                                                                                                                    var valueOrDefault = helpers.valueOrDefault;
                                                                                                                                                                                                            
                                                                                                                                                                                                                    return {
                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                      update: function(config) {
                                                                                                                                                                                                                          var me = this;
                                                                                                                                                                                                              
                                                                                                                                                                                                                          if (!config || typeof config !== 'object') {
                                                                                                                                                                                                                              // backwards compatibility
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                function decodeFill(el, index, count) {
                                                                                                                                                                                                                    var model = el._model || {};
                                                                                                                                                                                                                    var fill = model.fill;
                                                                                                                                                                                                                    var target;
                                                                                                                                                                                                                
                                                                                                                                                                                                                
                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                  },{"25":25,"30":30,"45":45}],34:[function(require,module,exports){
                                                                                                                                                                                                                  'use strict';
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  var helpers = require(45);
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                            updateElement: function(point, index, reset) {
                                                                                                                                                                                                                                var me = this;
                                                                                                                                                                                                                                var meta = me.getMeta();
                                                                                                                                                                                                                                var custom = point.custom || {};
                                                                                                                                                                                                                                var dataset = me.getDataset();
                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                          handleEvent: function(e) {
                                                                                                                                                                                                                              var me = this;
                                                                                                                                                                                                                              var opts = me.options;
                                                                                                                                                                                                                              var type = e.type === 'mouseup' ? 'click' : e.type;
                                                                                                                                                                                                                              var changed = false;
                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                                                        Function interpolate has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                        function interpolate(start, view, model, ease) {
                                                                                                                                                                                                                            var keys = Object.keys(model);
                                                                                                                                                                                                                            var i, ilen, key, actual, origin, target, type, c0, c1;
                                                                                                                                                                                                                        
                                                                                                                                                                                                                            for (i = 0, ilen = keys.length; i < ilen; ++i) {
                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                                                          Function handleTickRangeOptions has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                  handleTickRangeOptions: function() {
                                                                                                                                                                                                                                      var me = this;
                                                                                                                                                                                                                                      var opts = me.options;
                                                                                                                                                                                                                                      var tickOpts = opts.ticks;
                                                                                                                                                                                                                                      var valueOrDefault = helpers.valueOrDefault;
                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                                                            Function generateTicks has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                            function generateTicks(generationOptions, dataRange) {
                                                                                                                                                                                                                                var ticks = [];
                                                                                                                                                                                                                                // To get a "nice" value for the tick spacing, we will use the appropriately named
                                                                                                                                                                                                                                // "nice number" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks
                                                                                                                                                                                                                                // for details.
                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                                                              Function getValueForPixel has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                      getValueForPixel: function(pixel) {
                                                                                                                                                                                                                                          var me = this;
                                                                                                                                                                                                                                          var reverse = me.options.ticks.reverse;
                                                                                                                                                                                                                                          var log10 = helpers.log10;
                                                                                                                                                                                                                                          var firstTickValue = me._getFirstTickValue(me.minNotZero);
                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                                                                Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                if (meta.bar && chart.isDatasetVisible(i) &&
                                                                                                                                                                                                                                                    (stacked === false ||
                                                                                                                                                                                                                                                    (stacked === true && stacks.indexOf(meta.stack) === -1) ||
                                                                                                                                                                                                                                                    (stacked === undefined && (meta.stack === undefined || stacks.indexOf(meta.stack) === -1)))) {
                                                                                                                                                                                                                                                    stacks.push(meta.stack);
                                                                                                                                                                                                                                Severity: Critical
                                                                                                                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                          calculateBarValuePixels: function(datasetIndex, index) {
                                                                                                                                                                                                                                              var me = this;
                                                                                                                                                                                                                                              var chart = me.chart;
                                                                                                                                                                                                                                              var meta = me.getMeta();
                                                                                                                                                                                                                                              var scale = me.getValueScale();
                                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                    },{"25":25,"26":26,"34":34,"45":45}],33:[function(require,module,exports){
                                                                                                                                                                                                                                    'use strict';
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                    var defaults = require(25);
                                                                                                                                                                                                                                    var helpers = require(45);
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                              update: function(reset) {
                                                                                                                                                                                                                                                  var me = this;
                                                                                                                                                                                                                                                  var meta = me.getMeta();
                                                                                                                                                                                                                                                  var line = meta.dataset;
                                                                                                                                                                                                                                                  var points = meta.data;
                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                        function generate(min, max, capacity, options) {
                                                                                                                                                                                                                                            var timeOpts = options.time;
                                                                                                                                                                                                                                            var minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, capacity);
                                                                                                                                                                                                                                            var major = determineMajorUnit(minor);
                                                                                                                                                                                                                                            var stepSize = helpers.valueOrDefault(timeOpts.stepSize, timeOpts.unitStepSize);
                                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                  _autoSkip: function(ticks) {
                                                                                                                                                                                                                                                      var skipRatio;
                                                                                                                                                                                                                                                      var me = this;
                                                                                                                                                                                                                                                      var isHorizontal = me.isHorizontal();
                                                                                                                                                                                                                                                      var optionTicks = me.options.ticks.minor;
                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                            },{"25":25,"40":40,"45":45}],21:[function(require,module,exports){
                                                                                                                                                                                                                                            'use strict';
                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                            var defaults = require(25);
                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                      construct: function(item, config) {
                                                                                                                                                                                                                                                          var me = this;
                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                          config = initConfig(config);
                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                function initCanvas(canvas, config) {
                                                                                                                                                                                                                                                    var style = canvas.style;
                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                    // NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it
                                                                                                                                                                                                                                                    // returns null or '' if no explicit value has been set to the canvas attribute.
                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                  function computeBoundary(source) {
                                                                                                                                                                                                                                                      var model = source.el._model || {};
                                                                                                                                                                                                                                                      var scale = source.el._scale || {};
                                                                                                                                                                                                                                                      var fill = source.fill;
                                                                                                                                                                                                                                                      var target = null;
                                                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                        draw: function(chartArea) {
                                                                                                                                                                                                                                                            var vm = this._view;
                                                                                                                                                                                                                                                            var model = this._model;
                                                                                                                                                                                                                                                            var ctx = this._chart.ctx;
                                                                                                                                                                                                                                                            var pointStyle = vm.pointStyle;
                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                          descriptors: function(chart) {
                                                                                                                                                                                                                                                              var cache = chart.$plugins || (chart.$plugins = {});
                                                                                                                                                                                                                                                              if (cache.id === this._cacheId) {
                                                                                                                                                                                                                                                                  return cache.descriptors;
                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                            function drawPointLabels(scale) {
                                                                                                                                                                                                                                                                var ctx = scale.ctx;
                                                                                                                                                                                                                                                                var opts = scale.options;
                                                                                                                                                                                                                                                                var angleLineOpts = opts.angleLines;
                                                                                                                                                                                                                                                                var pointLabelOpts = opts.pointLabels;
                                                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                          function hsl2rgb(hsl) {
                                                                                                                                                                                                                                                            var h = hsl[0] / 360,
                                                                                                                                                                                                                                                                s = hsl[1] / 100,
                                                                                                                                                                                                                                                                l = hsl[2] / 100,
                                                                                                                                                                                                                                                                t1, t2, t3, rgb, val;
                                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                helpers.longestText = function(ctx, font, arrayOfThings, cache) {
                                                                                                                                                                                                                                                                    cache = cache || {};
                                                                                                                                                                                                                                                                    var data = cache.data = cache.data || {};
                                                                                                                                                                                                                                                                    var gc = cache.garbageCollect = cache.garbageCollect || [];
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                  function listenArrayEvents(array, listener) {
                                                                                                                                                                                                                                                                      if (array._chartjs) {
                                                                                                                                                                                                                                                                          array._chartjs.listeners.push(listener);
                                                                                                                                                                                                                                                                          return;
                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                        updateElement: function(point, index, reset) {
                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                            var custom = point.custom || {};
                                                                                                                                                                                                                                                                            var dataset = me.getDataset();
                                                                                                                                                                                                                                                                            var scale = me.chart.scale;
                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                  function generateTicks(generationOptions, dataRange) {
                                                                                                                                                                                                                                                                      var ticks = [];
                                                                                                                                                                                                                                                                      var valueOrDefault = helpers.valueOrDefault;
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                      // Figure out what the max number of ticks we can support it is based on the size of
                                                                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                    Function exports has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    module.exports = function(Chart) {
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                        Chart.scaleService = {
                                                                                                                                                                                                                                                                            // Scale registration object. Extensions can register new scale types (such as log or DB scales) and then
                                                                                                                                                                                                                                                                            // use the new chart options to grab the correct scale
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                      Function afterDatasetsUpdate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                          afterDatasetsUpdate: function(chart, options) {
                                                                                                                                                                                                                                                                              var count = (chart.data.datasets || []).length;
                                                                                                                                                                                                                                                                              var propagate = options.propagate;
                                                                                                                                                                                                                                                                              var sources = [];
                                                                                                                                                                                                                                                                              var meta, i, el, source;
                                                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                                updateElement: function(point, index, reset) {
                                                                                                                                                                                                                                                                                    var me = this;
                                                                                                                                                                                                                                                                                    var meta = me.getMeta();
                                                                                                                                                                                                                                                                                    var custom = point.custom || {};
                                                                                                                                                                                                                                                                                    var xScale = me.getScaleForId(meta.xAxisID);
                                                                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                          function hwb2rgb(hwb) {
                                                                                                                                                                                                                                                                            var h = hwb[0] / 360,
                                                                                                                                                                                                                                                                                wh = hwb[1] / 100,
                                                                                                                                                                                                                                                                                bl = hwb[2] / 100,
                                                                                                                                                                                                                                                                                ratio = wh + bl,
                                                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                                    calculatePointY: function(value, index, datasetIndex) {
                                                                                                                                                                                                                                                                                        var me = this;
                                                                                                                                                                                                                                                                                        var chart = me.chart;
                                                                                                                                                                                                                                                                                        var meta = me.getMeta();
                                                                                                                                                                                                                                                                                        var yScale = me.getScaleForId(meta.yAxisID);
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                                          var drawLegendBox = function(x, y, legendItem) {
                                                                                                                                                                                                                                                                                              if (isNaN(boxWidth) || boxWidth <= 0) {
                                                                                                                                                                                                                                                                                                  return;
                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                                        getPixelForValue: function(value, index) {
                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                            var offset = me.options.offset;
                                                                                                                                                                                                                                                                                            // 1 is added because we need the length but we have the indexes
                                                                                                                                                                                                                                                                                            var offsetAmt = Math.max((me.maxIndex + 1 - me.minIndex - (offset ? 0 : 1)), 1);
                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                                  function rgb2hsl(rgb) {
                                                                                                                                                                                                                                                                                    var r = rgb[0]/255,
                                                                                                                                                                                                                                                                                        g = rgb[1]/255,
                                                                                                                                                                                                                                                                                        b = rgb[2]/255,
                                                                                                                                                                                                                                                                                        min = Math.min(r, g, b),
                                                                                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                                    Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                if (animationOptions && ((typeof duration !== 'undefined' && duration !== 0) || (typeof duration === 'undefined' && animationOptions.duration !== 0))) {
                                                                                                                                                                                                                                                                                                    var animation = new Chart.Animation({
                                                                                                                                                                                                                                                                                                        numSteps: (duration || animationOptions.duration) / 16.66, // 60 fps
                                                                                                                                                                                                                                                                                                        easing: config.easing || animationOptions.easing,
                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                                      Function roundedRect has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                          roundedRect: function(ctx, x, y, width, height, radius) {
                                                                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 45 mins to fix

                                                                                                                                                                                                                                                                                        Function doFill has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                        function doFill(ctx, points, mapper, view, color, loop) {
                                                                                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 45 mins to fix

                                                                                                                                                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                for (var i = 0; i < rgb.length; i++) {
                                                                                                                                                                                                                                                                                                   rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 45 mins to fix

                                                                                                                                                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                if (c1.valid) {
                                                                                                                                                                                                                                                                                                                    view[key] = c1.mix(c0, ease).rgbString();
                                                                                                                                                                                                                                                                                                                    continue;
                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 45 mins to fix

                                                                                                                                                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                 else if (match = string.match(keyword)) {
                                                                                                                                                                                                                                                                                                    if (match[1] == "transparent") {
                                                                                                                                                                                                                                                                                                       return [0, 0, 0, 0];
                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                    rgb = colorNames[match[1]];
                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 45 mins to fix

                                                                                                                                                                                                                                                                                                Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                        if (helpers.isObject(value)) {
                                                                                                                                                                                                                                                                                                            t = +value.top || 0;
                                                                                                                                                                                                                                                                                                            r = +value.right || 0;
                                                                                                                                                                                                                                                                                                            b = +value.bottom || 0;
                                                                                                                                                                                                                                                                                                            l = +value.left || 0;
                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 40 mins to fix

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

                                                                                                                                                                                                                                                                                                  function drawArea(ctx, curve0, curve1, len0, len1) {
                                                                                                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 35 mins to fix

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

                                                                                                                                                                                                                                                                                                    function createEvent(type, chart, x, y, nativeEvent) {
                                                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 35 mins to fix

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

                                                                                                                                                                                                                                                                                                      function computeOffsets(table, ticks, min, max, options) {
                                                                                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 35 mins to fix

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

                                                                                                                                                                                                                                                                                                            drawPoint: function(ctx, style, radius, x, y) {
                                                                                                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                                                                                                        Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 35 mins to fix

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

                                                                                                                                                                                                                                                                                                              function determineLimits(angle, pos, size, min, max) {
                                                                                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                                                                                          Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 35 mins to fix

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

                                                                                                                                                                                                                                                                                                                helpers.measureText = function(ctx, data, gc, longest, string) {
                                                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                                                            Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 35 mins to fix

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

                                                                                                                                                                                                                                                                                                                      drawBackground: function(pt, vm, ctx, tooltipSize, opacity) {
                                                                                                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                                                                                                              Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 35 mins to fix

                                                                                                                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                                    return value;
                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                              return rawValue;
                                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                                  Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                        return false;
                                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                                    Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js - About 30 mins to fix

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

                                                                                                                                                                                                                                                                                                                      (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){
                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                      },{}],2:[function(require,module,exports){
                                                                                                                                                                                                                                                                                                                      /* MIT license */
                                                                                                                                                                                                                                                                                                                      var colorNames = require(6);
                                                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                                                      Found in pro1/staticfiles/blog/bootstrap/js/modules/chart.js and 3 other locations - About 2 yrs to fix
                                                                                                                                                                                                                                                                                                                      pro1/staticfiles/blog/bootstrap/js/mdb.js on lines 262..14636
                                                                                                                                                                                                                                                                                                                      pro1/staticfiles/bootstrap/js/mdb.js on lines 262..14636
                                                                                                                                                                                                                                                                                                                      pro1/staticfiles/bootstrap/js/modules/chart.js on lines 10..14384

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

                                                                                                                                                                                                                                                                                                                      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