wikimedia/mediawiki-extensions-Translate

View on GitHub
resources/lib/Chart.js/Chart.js

Summary

Maintainability
F
3 mos
Test Coverage

File Chart.js has 11466 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Chart.js v2.9.3
 * https://www.chartjs.org
 * (c) 2019 Chart.js Contributors
 * Released under the MIT License
Severity: Major
Found in resources/lib/Chart.js/Chart.js - About 1 mo to fix

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

    var conversions = createCommonjsModule(function (module) {
    /* MIT license */
    
    
    // NOTE: conversions should only return primitive values (i.e. arrays, or
    Severity: Major
    Found in resources/lib/Chart.js/Chart.js - About 3 days to fix

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

      var core_helpers = function() {
      
          // -- Basic js utility methods
      
          helpers$1.where = function(collection, filterCallback) {
      Severity: Major
      Found in resources/lib/Chart.js/Chart.js - About 2 days to fix

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

            draw: function() {
                var me = this;
                var opts = me.options;
                var labelOpts = opts.labels;
                var globalDefaults = core_defaults.global;
        Severity: Major
        Found in resources/lib/Chart.js/Chart.js - About 4 hrs to fix

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

              drawPoint: function(ctx, style, radius, x, y, rotation) {
                  var type, xOffset, yOffset, size, cornerRadius;
                  var rad = (rotation || 0) * RAD_PER_DEG;
          
                  if (style && typeof style === 'object') {
          Severity: Major
          Found in resources/lib/Chart.js/Chart.js - About 3 hrs to fix

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

                _computeGridLineItems: function(chartArea) {
                    var me = this;
                    var chart = me.chart;
                    var options = me.options;
                    var gridLines = options.gridLines;
            Severity: Major
            Found in resources/lib/Chart.js/Chart.js - About 3 hrs to fix

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

                  determineDataLimits: function() {
                      var me = this;
                      var opts = me.options;
                      var chart = me.chart;
                      var datasets = chart.data.datasets;
              Severity: Major
              Found in resources/lib/Chart.js/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 resources/lib/Chart.js/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 resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 2 hrs to fix

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

                          helpers$1.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 resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 2 hrs to fix

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

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

                            Function draw has 58 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: Major
                            Found in resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 2 hrs to fix

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

                                    _drawGrid: function(chartArea) {
                                        var me = this;
                                        var gridLines = me.options.gridLines;
                                
                                        if (!gridLines.display) {
                                Severity: Major
                                Found in resources/lib/Chart.js/Chart.js - About 2 hrs to fix

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

                                      determineDataLimits: function() {
                                          var me = this;
                                          var chart = me.chart;
                                          var adapter = me._adapter;
                                          var options = me.options;
                                  Severity: Major
                                  Found in resources/lib/Chart.js/Chart.js - About 2 hrs to fix

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

                                        _computeLabelItems: function() {
                                            var me = this;
                                            var options = me.options;
                                            var optionTicks = options.ticks;
                                            var position = options.position;
                                    Severity: Major
                                    Found in resources/lib/Chart.js/Chart.js - About 2 hrs to fix

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

                                          update: function(maxWidth, maxHeight, margins) {
                                              var me = this;
                                              var tickOpts = me.options.ticks;
                                              var sampleSize = tickOpts.sampleSize;
                                              var i, ilen, labels, ticks, samplingEnabled;
                                      Severity: Major
                                      Found in resources/lib/Chart.js/Chart.js - About 2 hrs to fix

                                        Function update has 52 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: Major
                                        Found in resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 2 hrs to fix

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

                                                drawBody: function(pt, vm, ctx) {
                                                    var bodyFontSize = vm.bodyFontSize;
                                                    var bodySpacing = vm.bodySpacing;
                                                    var bodyAlign = vm._bodyAlign;
                                                    var body = vm.body;
                                            Severity: Minor
                                            Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                              Function generateTicks has 49 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 https://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks
                                                  // for details.
                                              Severity: Minor
                                              Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                    updateBezierControlPoints: function() {
                                                        var me = this;
                                                        var chart = me.chart;
                                                        var meta = me.getMeta();
                                                        var lineModel = meta.dataset._model;
                                                Severity: Minor
                                                Found in resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                        calculateBarValuePixels: function(datasetIndex, index, options) {
                                                            var me = this;
                                                            var chart = me.chart;
                                                            var scale = me._getValueScale();
                                                            var isHorizontal = scale.isHorizontal();
                                                    Severity: Minor
                                                    Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                          update: function(chart, width, height) {
                                                              if (!chart) {
                                                                  return;
                                                              }
                                                      
                                                      
                                                      Severity: Minor
                                                      Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                            _resolveDataElementOptions: function(element, index) {
                                                                var me = this;
                                                                var custom = element && element.custom;
                                                                var cached = me._cachedDataOpts;
                                                                if (cached && !custom) {
                                                        Severity: Minor
                                                        Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                          function computeLabelSizes(ctx, tickFonts, ticks, caches) {
                                                              var length = ticks.length;
                                                              var widths = [];
                                                              var heights = [];
                                                              var offsets = [];
                                                          Severity: Minor
                                                          Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                            Function buildTicks has 44 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 resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                    draw: function() {
                                                                        var me = this;
                                                                        var ctx = me.ctx;
                                                                        var opts = me.options;
                                                                
                                                                
                                                                Severity: Minor
                                                                Found in resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                    Function updateElement has 42 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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                      Function doFill has 41 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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                        convert.hsl.rgb = function (hsl) {
                                                                            var h = hsl[0] / 360;
                                                                            var s = hsl[1] / 100;
                                                                            var l = hsl[2] / 100;
                                                                            var t1;
                                                                        Severity: Minor
                                                                        Found in resources/lib/Chart.js/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 resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                              convert.rgb.hsv = function (rgb) {
                                                                                  var rdif;
                                                                                  var gdif;
                                                                                  var bdif;
                                                                                  var h;
                                                                              Severity: Minor
                                                                              Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                                Function fitWithPointLabels has 38 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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                      update: function(config) {
                                                                                          var me = this;
                                                                                          var i, ilen;
                                                                                  
                                                                                          if (!config || typeof config !== 'object') {
                                                                                  Severity: Minor
                                                                                  Found in resources/lib/Chart.js/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) {
                                                                                            ctx.fillStyle = vm.backgroundColor;
                                                                                            ctx.strokeStyle = vm.borderColor;
                                                                                            ctx.lineWidth = vm.borderWidth;
                                                                                            var xAlign = vm.xAlign;
                                                                                    Severity: Minor
                                                                                    Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                          draw: function() {
                                                                                              var ctx = this._chart.ctx;
                                                                                              var vm = this._view;
                                                                                              var pixelMargin = (vm.borderAlign === 'inner') ? 0.33 : 0;
                                                                                              var arc = {
                                                                                      Severity: Minor
                                                                                      Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                        function getBaseModel(tooltipOpts) {
                                                                                            var globalDefaults = core_defaults.global;
                                                                                        
                                                                                            return {
                                                                                                // Positioning
                                                                                        Severity: Minor
                                                                                        Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                              _drawGrid: function() {
                                                                                                  var me = this;
                                                                                                  var ctx = me.ctx;
                                                                                                  var opts = me.options;
                                                                                                  var gridLineOpts = opts.gridLines;
                                                                                          Severity: Minor
                                                                                          Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                _drawTitle: function() {
                                                                                                    var me = this;
                                                                                                    var ctx = me.ctx;
                                                                                                    var options = me.options;
                                                                                                    var scaleLabel = options.scaleLabel;
                                                                                            Severity: Minor
                                                                                            Found in resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                    _drawLabels: function() {
                                                                                                        var me = this;
                                                                                                        var ctx = me.ctx;
                                                                                                        var opts = me.options;
                                                                                                        var tickOpts = opts.ticks;
                                                                                                Severity: Minor
                                                                                                Found in resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                        getMaxBorderWidth: function(arcs) {
                                                                                                            var me = this;
                                                                                                            var max = 0;
                                                                                                            var chart = me.chart;
                                                                                                            var i, ilen, meta, arc, controller, options, borderWidth, hoverWidth;
                                                                                                    Severity: Minor
                                                                                                    Found in resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                                                        Function updateElement has 34 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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                              determineDataLimits: function() {
                                                                                                                  var me = this;
                                                                                                                  var opts = me.options;
                                                                                                                  var chart = me.chart;
                                                                                                                  var datasets = chart.data.datasets;
                                                                                                          Severity: Minor
                                                                                                          Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                                                            Consider simplifying this complex logical expression.
                                                                                                            Open

                                                                                                                    if (circumference < DOUBLE_PI$1) {
                                                                                                                        var startAngle = opts.rotation % DOUBLE_PI$1;
                                                                                                                        startAngle += startAngle >= PI$1 ? -DOUBLE_PI$1 : startAngle < -PI$1 ? DOUBLE_PI$1 : 0;
                                                                                                                        var endAngle = startAngle + circumference;
                                                                                                                        var startX = Math.cos(startAngle);
                                                                                                            Severity: Critical
                                                                                                            Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                  construct: function(item, config) {
                                                                                                                      var me = this;
                                                                                                              
                                                                                                                      config = initConfig(config);
                                                                                                              
                                                                                                              
                                                                                                              Severity: Minor
                                                                                                              Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                convert.hwb.rgb = function (hwb) {
                                                                                                                    var h = hwb[0] / 360;
                                                                                                                    var wh = hwb[1] / 100;
                                                                                                                    var bl = hwb[2] / 100;
                                                                                                                    var ratio = wh + bl;
                                                                                                                Severity: Minor
                                                                                                                Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                      helpers$1.longestText = function(ctx, font, arrayOfThings, cache) {
                                                                                                                          cache = cache || {};
                                                                                                                          var data = cache.data = cache.data || {};
                                                                                                                          var gc = cache.garbageCollect = cache.garbageCollect || [];
                                                                                                                  
                                                                                                                  
                                                                                                                  Severity: Minor
                                                                                                                  Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                                                                    Function updateElement has 32 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 resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                            handleTickRangeOptions: function() {
                                                                                                                                var me = this;
                                                                                                                                var tickOpts = me.options.ticks;
                                                                                                                                var DEFAULT_MIN = 1;
                                                                                                                                var DEFAULT_MAX = 10;
                                                                                                                        Severity: Minor
                                                                                                                        Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                              calculatePointY: function(value, index, datasetIndex) {
                                                                                                                                  var me = this;
                                                                                                                                  var chart = me.chart;
                                                                                                                                  var yScale = me._yScale;
                                                                                                                                  var sumPos = 0;
                                                                                                                          Severity: Minor
                                                                                                                          Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                            convert.rgb.hsl = function (rgb) {
                                                                                                                                var r = rgb[0] / 255;
                                                                                                                                var g = rgb[1] / 255;
                                                                                                                                var b = rgb[2] / 255;
                                                                                                                                var min = Math.min(r, g, b);
                                                                                                                            Severity: Minor
                                                                                                                            Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                              convert.hcg.rgb = function (hcg) {
                                                                                                                                  var h = hcg[0] / 360;
                                                                                                                                  var c = hcg[1] / 100;
                                                                                                                                  var g = hcg[2] / 100;
                                                                                                                              
                                                                                                                              
                                                                                                                              Severity: Minor
                                                                                                                              Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                                                                                Function handleEvent has 31 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 hoveredItem;
                                                                                                                                Severity: Minor
                                                                                                                                Found in resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                                        _drawLabels: function() {
                                                                                                                                            var me = this;
                                                                                                                                            var optionTicks = me.options.ticks;
                                                                                                                                    
                                                                                                                                            if (!optionTicks.display) {
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                                      function computeLinearBoundary(source) {
                                                                                                                                          var model = source.el._model || {};
                                                                                                                                          var scale = source.el._scale || {};
                                                                                                                                          var fill = source.fill;
                                                                                                                                          var target = null;
                                                                                                                                      Severity: Minor
                                                                                                                                      Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                                        function drawRadiusLine(scale, gridLineOpts, radius, index) {
                                                                                                                                            var ctx = scale.ctx;
                                                                                                                                            var circular = gridLineOpts.circular;
                                                                                                                                            var valueCount = scale.chart.data.labels.length;
                                                                                                                                            var lineColor = valueAtIndexOrDefault$1(gridLineOpts.color, index - 1);
                                                                                                                                        Severity: Minor
                                                                                                                                        Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                                                                                          Function update has 29 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 resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                                                  calculateTickRotation: function() {
                                                                                                                                                      var me = this;
                                                                                                                                                      var options = me.options;
                                                                                                                                                      var tickOpts = options.ticks;
                                                                                                                                                      var numTicks = me.getTicks().length;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                                                                                                Function updateElement has 28 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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                                                                                                  Function generateTicks$1 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                  Open

                                                                                                                                                  function generateTicks$1(generationOptions, dataRange) {
                                                                                                                                                      var ticks = [];
                                                                                                                                                  
                                                                                                                                                      var tickVal = valueOrDefault$b(generationOptions.min, Math.pow(10, Math.floor(log10(dataRange.min))));
                                                                                                                                                  
                                                                                                                                                  
                                                                                                                                                  Severity: Minor
                                                                                                                                                  Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                                                        buildOrUpdateControllers: function() {
                                                                                                                                                            var me = this;
                                                                                                                                                            var newControllers = [];
                                                                                                                                                            var datasets = me.data.datasets;
                                                                                                                                                            var i, ilen;
                                                                                                                                                    Severity: Minor
                                                                                                                                                    Found in resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                                                        convert.rgb.hcg = function (rgb) {
                                                                                                                                                            var r = rgb[0] / 255;
                                                                                                                                                            var g = rgb[1] / 255;
                                                                                                                                                            var b = rgb[2] / 255;
                                                                                                                                                            var max = Math.max(Math.max(r, g), b);
                                                                                                                                                        Severity: Minor
                                                                                                                                                        Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                                                              draw: function() {
                                                                                                                                                                  var ctx = this._chart.ctx;
                                                                                                                                                                  var vm = this._view;
                                                                                                                                                          
                                                                                                                                                                  if (vm.opacity === 0) {
                                                                                                                                                          Severity: Minor
                                                                                                                                                          Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                                                                roundedRect: function(ctx, x, y, width, height, radius) {
                                                                                                                                                                    if (radius) {
                                                                                                                                                                        var r = Math.min(radius, height / 2, width / 2);
                                                                                                                                                                        var left = x + r;
                                                                                                                                                                        var top = y + r;
                                                                                                                                                            Severity: Minor
                                                                                                                                                            Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

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

                                                                                                                                                                  eventHandler: function(e) {
                                                                                                                                                                      var me = this;
                                                                                                                                                                      var tooltip = me.tooltip;
                                                                                                                                                              
                                                                                                                                                                      if (core_plugins.notify(me, 'beforeEvent', [e]) === false) {
                                                                                                                                                              Severity: Minor
                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                                                                                                                Function updateElement has 26 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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                                                                                                                  Function updateBezierControlPoints has 26 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 resources/lib/Chart.js/Chart.js - About 1 hr to fix

                                                                                                                                                                    Function drawLegendBox has 26 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 resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 45 mins to fix

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

                                                                                                                                                                            drawPoint: function(ctx, style, radius, x, y, rotation) {
                                                                                                                                                                        Severity: Minor
                                                                                                                                                                        Found in resources/lib/Chart.js/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 resources/lib/Chart.js/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 resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 45 mins to fix

                                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                                Open

                                                                                                                                                                                                        if (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden || value.min < 0 || value.max < 0) {
                                                                                                                                                                                                            continue;
                                                                                                                                                                                                        }
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in resources/lib/Chart.js/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 = colorName$1[match[1]];
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in resources/lib/Chart.js/Chart.js - About 45 mins to fix

                                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                                    Open

                                                                                                                                                                                                            if (value.min !== 0) {
                                                                                                                                                                                                                me.minNotZero = Math.min(value.min, me.minNotZero);
                                                                                                                                                                                                            }
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/Chart.js/Chart.js - About 45 mins to fix

                                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                                      Open

                                                                                                                                                                                                              if (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden || value.min < 0 || value.max < 0) {
                                                                                                                                                                                                                  continue;
                                                                                                                                                                                                              }
                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                      Found in resources/lib/Chart.js/Chart.js - About 45 mins to fix

                                                                                                                                                                                        Consider simplifying this complex logical expression.
                                                                                                                                                                                        Open

                                                                                                                                                                                            if (helpers$1.isObject(value)) {
                                                                                                                                                                                                t = +value.top || 0;
                                                                                                                                                                                                r = +value.right || 0;
                                                                                                                                                                                                b = +value.bottom || 0;
                                                                                                                                                                                                l = +value.left || 0;
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in resources/lib/Chart.js/Chart.js - About 40 mins to fix

                                                                                                                                                                                          Consider simplifying this complex logical expression.
                                                                                                                                                                                          Open

                                                                                                                                                                                                  if (helpers_core.isObject(value)) {
                                                                                                                                                                                                      t = +value.top || 0;
                                                                                                                                                                                                      r = +value.right || 0;
                                                                                                                                                                                                      b = +value.bottom || 0;
                                                                                                                                                                                                      l = +value.left || 0;
                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                          Found in resources/lib/Chart.js/Chart.js - About 40 mins to fix

                                                                                                                                                                                            Consider simplifying this complex logical expression.
                                                                                                                                                                                            Open

                                                                                                                                                                                                        if (i === me.zeroLineIndex && options.offset === offsetGridLines) {
                                                                                                                                                                                                            // Draw the first index specially
                                                                                                                                                                                                            lineWidth = gridLines.zeroLineWidth;
                                                                                                                                                                                                            lineColor = gridLines.zeroLineColor;
                                                                                                                                                                                                            borderDash = gridLines.zeroLineBorderDash || [];
                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                            Found in resources/lib/Chart.js/Chart.js - About 40 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 resources/lib/Chart.js/Chart.js - About 35 mins to fix

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

                                                                                                                                                                                                function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 35 mins to fix

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

                                                                                                                                                                                                        helpers$1.measureText = function(ctx, data, gc, longest, string) {
                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                    Found in resources/lib/Chart.js/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 resources/lib/Chart.js/Chart.js - About 35 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 resources/lib/Chart.js/Chart.js - About 35 mins to fix

                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                          Open

                                                                                                                                                                                                                  return rawValue;
                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                          Found in resources/lib/Chart.js/Chart.js - About 30 mins to fix

                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                                return false;
                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                            Found in resources/lib/Chart.js/Chart.js - About 30 mins to fix

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

                                                                                                                                                                                                              var colorName$1 = {
                                                                                                                                                                                                                  "aliceblue": [240, 248, 255],
                                                                                                                                                                                                                  "antiquewhite": [250, 235, 215],
                                                                                                                                                                                                                  "aqua": [0, 255, 255],
                                                                                                                                                                                                                  "aquamarine": [127, 255, 212],
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 23..172

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              var colorName = {
                                                                                                                                                                                                                  "aliceblue": [240, 248, 255],
                                                                                                                                                                                                                  "antiquewhite": [250, 235, 215],
                                                                                                                                                                                                                  "aqua": [0, 255, 255],
                                                                                                                                                                                                                  "aquamarine": [127, 255, 212],
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 wk to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1231..1380

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  legendCallback: function(chart) {
                                                                                                                                                                                                                      var list = document.createElement('ul');
                                                                                                                                                                                                                      var data = chart.data;
                                                                                                                                                                                                                      var datasets = data.datasets;
                                                                                                                                                                                                                      var labels = data.labels;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 5336..5356

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  legendCallback: function(chart) {
                                                                                                                                                                                                                      var list = document.createElement('ul');
                                                                                                                                                                                                                      var data = chart.data;
                                                                                                                                                                                                                      var datasets = data.datasets;
                                                                                                                                                                                                                      var labels = data.labels;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 6154..6174

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  setDimensions: function() {
                                                                                                                                                                                                                      var me = this;
                                                                                                                                                                                                                      // Set the unconstrained dimension before label rotation
                                                                                                                                                                                                                      if (me.isHorizontal()) {
                                                                                                                                                                                                                          // Reset position before calculating rotation
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 15817..15844

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  setDimensions: function() {
                                                                                                                                                                                                                      var me = this;
                                                                                                                                                                                                                      // Set the unconstrained dimension before label rotation
                                                                                                                                                                                                                      if (me.isHorizontal()) {
                                                                                                                                                                                                                          // Reset position before calculating rotation
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 15288..15315

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      labels: {
                                                                                                                                                                                                                          generateLabels: function(chart) {
                                                                                                                                                                                                                              var data = chart.data;
                                                                                                                                                                                                                              if (data.labels.length && data.datasets.length) {
                                                                                                                                                                                                                                  return data.labels.map(function(label, i) {
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 5358..5380

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      labels: {
                                                                                                                                                                                                                          generateLabels: function(chart) {
                                                                                                                                                                                                                              var data = chart.data;
                                                                                                                                                                                                                              if (data.labels.length && data.datasets.length) {
                                                                                                                                                                                                                                  return data.labels.map(function(label, i) {
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 6176..6198

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  update: function(maxWidth, maxHeight, margins) {
                                                                                                                                                                                                                      var me = this;
                                                                                                                                                                                                              
                                                                                                                                                                                                                      // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
                                                                                                                                                                                                                      me.beforeUpdate();
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 15254..15282

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  update: function(maxWidth, maxHeight, margins) {
                                                                                                                                                                                                                      var me = this;
                                                                                                                                                                                                              
                                                                                                                                                                                                                      // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
                                                                                                                                                                                                                      me.beforeUpdate();
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 15782..15811

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  setHoverStyle: function(point) {
                                                                                                                                                                                                                      var model = point._model;
                                                                                                                                                                                                                      var options = point._options;
                                                                                                                                                                                                                      var getHoverColor = helpers$1.getHoverColor;
                                                                                                                                                                                                              
                                                                                                                                                                                                              
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 6613..6629

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  setHoverStyle: function(point) {
                                                                                                                                                                                                                      var model = point._model;
                                                                                                                                                                                                                      var options = point._options;
                                                                                                                                                                                                                      var getHoverColor = helpers$1.getHoverColor;
                                                                                                                                                                                                              
                                                                                                                                                                                                              
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 6109..6125

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      y: function(chart, e, options) {
                                                                                                                                                                                                                          var position = getRelativePosition(e, chart);
                                                                                                                                                                                                                          var items = [];
                                                                                                                                                                                                                          var intersectsItem = false;
                                                                                                                                                                                                              
                                                                                                                                                                                                              
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 6933..6954

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              function getHsla(string) {
                                                                                                                                                                                                                 if (!string) {
                                                                                                                                                                                                                    return;
                                                                                                                                                                                                                 }
                                                                                                                                                                                                                 var hsl = /^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1489..1503

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      x: function(chart, e, options) {
                                                                                                                                                                                                                          var position = getRelativePosition(e, chart);
                                                                                                                                                                                                                          var items = [];
                                                                                                                                                                                                                          var intersectsItem = false;
                                                                                                                                                                                                              
                                                                                                                                                                                                              
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 6964..6985

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              function getHwb(string) {
                                                                                                                                                                                                                 if (!string) {
                                                                                                                                                                                                                    return;
                                                                                                                                                                                                                 }
                                                                                                                                                                                                                 var hwb = /^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1473..1487

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  helpers$1.getMaximumWidth = function(domNode) {
                                                                                                                                                                                                                      var container = helpers$1._getParentNode(domNode);
                                                                                                                                                                                                                      if (!container) {
                                                                                                                                                                                                                          return domNode.clientWidth;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10759..10772

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  helpers$1.getMaximumHeight = function(domNode) {
                                                                                                                                                                                                                      var container = helpers$1._getParentNode(domNode);
                                                                                                                                                                                                                      if (!container) {
                                                                                                                                                                                                                          return domNode.clientHeight;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10745..10758

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  beforeUpdate: function(chart) {
                                                                                                                                                                                                                      var legendOpts = chart.options.legend;
                                                                                                                                                                                                                      var legend = chart.legend;
                                                                                                                                                                                                              
                                                                                                                                                                                                                      if (legendOpts) {
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 15970..15987

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  beforeUpdate: function(chart) {
                                                                                                                                                                                                                      var titleOpts = chart.options.title;
                                                                                                                                                                                                                      var titleBlock = chart.titleBlock;
                                                                                                                                                                                                              
                                                                                                                                                                                                                      if (titleOpts) {
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 15726..15743

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          if (pointAfter && !pointAfter.model.skip) {
                                                                                                                                                                                                                              deltaX = (pointAfter.model.x - pointCurrent.model.x) / 3;
                                                                                                                                                                                                                              pointCurrent.model.controlPointNextX = pointCurrent.model.x + deltaX;
                                                                                                                                                                                                                              pointCurrent.model.controlPointNextY = pointCurrent.model.y + deltaX * pointCurrent.mK;
                                                                                                                                                                                                                          }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10563..10567

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          if (pointBefore && !pointBefore.model.skip) {
                                                                                                                                                                                                                              deltaX = (pointCurrent.model.x - pointBefore.model.x) / 3;
                                                                                                                                                                                                                              pointCurrent.model.controlPointPreviousX = pointCurrent.model.x - deltaX;
                                                                                                                                                                                                                              pointCurrent.model.controlPointPreviousY = pointCurrent.model.y - deltaX * pointCurrent.mK;
                                                                                                                                                                                                                          }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10568..10572

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  if (helpers$1.isObject(value)) {
                                                                                                                                                                                                                      t = +value.top || 0;
                                                                                                                                                                                                                      r = +value.right || 0;
                                                                                                                                                                                                                      b = +value.bottom || 0;
                                                                                                                                                                                                                      l = +value.left || 0;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 3051..3058

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (helpers_core.isObject(value)) {
                                                                                                                                                                                                                          t = +value.top || 0;
                                                                                                                                                                                                                          r = +value.right || 0;
                                                                                                                                                                                                                          b = +value.bottom || 0;
                                                                                                                                                                                                                          l = +value.left || 0;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 4588..4595

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (tickOpts.max !== undefined) {
                                                                                                                                                                                                                          me.max = tickOpts.max;
                                                                                                                                                                                                                      } else if (tickOpts.suggestedMax !== undefined) {
                                                                                                                                                                                                                          if (me.max === null) {
                                                                                                                                                                                                                              me.max = tickOpts.suggestedMax;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12765..12773

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (tickOpts.min !== undefined) {
                                                                                                                                                                                                                          me.min = tickOpts.min;
                                                                                                                                                                                                                      } else if (tickOpts.suggestedMin !== undefined) {
                                                                                                                                                                                                                          if (me.min === null) {
                                                                                                                                                                                                                              me.min = tickOpts.suggestedMin;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12775..12783

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              function hslString(hsla, alpha) {
                                                                                                                                                                                                                 if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {
                                                                                                                                                                                                                    return hslaString(hsla, alpha);
                                                                                                                                                                                                                 }
                                                                                                                                                                                                                 return "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)";
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1541..1546

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              function rgbString(rgba, alpha) {
                                                                                                                                                                                                                 if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {
                                                                                                                                                                                                                    return rgbaString(rgba, alpha);
                                                                                                                                                                                                                 }
                                                                                                                                                                                                                 return "rgb(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2] + ")";
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1574..1579

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              function rgbaString(rgba, alpha) {
                                                                                                                                                                                                                 if (alpha === undefined) {
                                                                                                                                                                                                                    alpha = (rgba[3] !== undefined ? rgba[3] : 1);
                                                                                                                                                                                                                 }
                                                                                                                                                                                                                 return "rgba(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2]
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1581..1587

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              function hslaString(hsla, alpha) {
                                                                                                                                                                                                                 if (alpha === undefined) {
                                                                                                                                                                                                                    alpha = (hsla[3] !== undefined ? hsla[3] : 1);
                                                                                                                                                                                                                 }
                                                                                                                                                                                                                 return "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, "
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1548..1554

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                 var r = Math.round(rgba[0]/255 * 100),
                                                                                                                                                                                                                     g = Math.round(rgba[1]/255 * 100),
                                                                                                                                                                                                                     b = Math.round(rgba[2]/255 * 100);
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1568..1570

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              function createNewLegendAndAttach(chart, legendOpts) {
                                                                                                                                                                                                                  var legend = new Legend({
                                                                                                                                                                                                                      ctx: chart.ctx,
                                                                                                                                                                                                                      options: legendOpts,
                                                                                                                                                                                                                      chart: chart
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 15938..15948

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              function createNewTitleBlockAndAttach(chart, titleOpts) {
                                                                                                                                                                                                                  var title = new Title({
                                                                                                                                                                                                                      ctx: chart.ctx,
                                                                                                                                                                                                                      options: titleOpts,
                                                                                                                                                                                                                      chart: chart
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 15694..15704

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                 var r = Math.round(rgba[0]/255 * 100),
                                                                                                                                                                                                                     g = Math.round(rgba[1]/255 * 100),
                                                                                                                                                                                                                     b = Math.round(rgba[2]/255 * 100);
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1560..1562

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      } else if (position === 'left') {
                                                                                                                                                                                                                          borderValue = alignBorderValue(me.right);
                                                                                                                                                                                                                          tx1 = me.right - tl;
                                                                                                                                                                                                                          tx2 = borderValue - axisHalfWidth;
                                                                                                                                                                                                                          x1 = alignBorderValue(chartArea.left) + axisHalfWidth;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12143..12167

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 75.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (position === 'top') {
                                                                                                                                                                                                                          borderValue = alignBorderValue(me.bottom);
                                                                                                                                                                                                                          ty1 = me.bottom - tl;
                                                                                                                                                                                                                          ty2 = borderValue - axisHalfWidth;
                                                                                                                                                                                                                          y1 = alignBorderValue(chartArea.top) + axisHalfWidth;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12155..12167

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 75.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      } else if (position === 'bottom') {
                                                                                                                                                                                                                          borderValue = alignBorderValue(me.top);
                                                                                                                                                                                                                          y1 = chartArea.top;
                                                                                                                                                                                                                          y2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;
                                                                                                                                                                                                                          ty1 = borderValue + axisHalfWidth;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12161..12167

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      } else {
                                                                                                                                                                                                                          borderValue = alignBorderValue(me.left);
                                                                                                                                                                                                                          x1 = chartArea.left;
                                                                                                                                                                                                                          x2 = alignBorderValue(chartArea.right) - axisHalfWidth;
                                                                                                                                                                                                                          tx1 = borderValue + axisHalfWidth;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12149..12155

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                                      if (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden || value.min < 0 || value.max < 0) {
                                                                                                                                                                                                                                          continue;
                                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13179..13181

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                                      if (isNaN(value.min) || isNaN(value.max) || meta.data[i].hidden || value.min < 0 || value.max < 0) {
                                                                                                                                                                                                                                          continue;
                                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13205..13207

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  helpers$1.min = function(array) {
                                                                                                                                                                                                                      return array.reduce(function(min, value) {
                                                                                                                                                                                                                          if (!isNaN(value)) {
                                                                                                                                                                                                                              return Math.min(min, value);
                                                                                                                                                                                                                          }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10350..10357

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (a < 1) {
                                                                                                                                                                                                                          a = 1;
                                                                                                                                                                                                                          s = p / 4;
                                                                                                                                                                                                                      } else {
                                                                                                                                                                                                                          s = p / (2 * Math.PI) * Math.asin(1 / a);
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 2621..2626
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 2643..2648

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (a < 1) {
                                                                                                                                                                                                                          a = 1;
                                                                                                                                                                                                                          s = p / 4;
                                                                                                                                                                                                                      } else {
                                                                                                                                                                                                                          s = p / (2 * Math.PI) * Math.asin(1 / a);
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 2599..2604
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 2621..2626

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (meta.yAxisID === null || !(meta.yAxisID in scales) || dataset.yAxisID) {
                                                                                                                                                                                                                          meta.yAxisID = dataset.yAxisID || scalesOpts.yAxes[0].id;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 3684..3686

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  helpers$1.max = function(array) {
                                                                                                                                                                                                                      return array.reduce(function(max, value) {
                                                                                                                                                                                                                          if (!isNaN(value)) {
                                                                                                                                                                                                                              return Math.max(max, value);
                                                                                                                                                                                                                          }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10358..10365

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (meta.xAxisID === null || !(meta.xAxisID in scales) || dataset.xAxisID) {
                                                                                                                                                                                                                          meta.xAxisID = dataset.xAxisID || scalesOpts.xAxes[0].id;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 3687..3689

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (a < 1) {
                                                                                                                                                                                                                          a = 1;
                                                                                                                                                                                                                          s = p / 4;
                                                                                                                                                                                                                      } else {
                                                                                                                                                                                                                          s = p / (2 * Math.PI) * Math.asin(1 / a);
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 2599..2604
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 2643..2648

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  getPixelForTick: function(index) {
                                                                                                                                                                                                                      var ticks = this.tickValues;
                                                                                                                                                                                                                      if (index < 0 || index > ticks.length - 1) {
                                                                                                                                                                                                                          return null;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13052..13058

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          if (fraction < 1.5) {
                                                                                                                                                                                                                              niceFraction = 1;
                                                                                                                                                                                                                          } else if (fraction < 3) {
                                                                                                                                                                                                                              niceFraction = 2;
                                                                                                                                                                                                                          } else if (fraction < 7) {
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10603..10611

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      } else if (fraction <= 1.0) {
                                                                                                                                                                                                                          niceFraction = 1;
                                                                                                                                                                                                                      } else if (fraction <= 2) {
                                                                                                                                                                                                                          niceFraction = 2;
                                                                                                                                                                                                                      } else if (fraction <= 5) {
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10594..10602

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  getPixelForTick: function(index) {
                                                                                                                                                                                                                      var ticks = this.ticksAsNumbers;
                                                                                                                                                                                                                      if (index < 0 || index > ticks.length - 1) {
                                                                                                                                                                                                                          return null;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13305..13311

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              convert.apple.rgb = function (apple) {
                                                                                                                                                                                                                  return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
                                                                                                                                                                                                              };
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1007..1009
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1011..1013

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          if (me.isHorizontal()) {
                                                                                                                                                                                                                              x1 = alignPixel(chart, me.left, firstLineWidth) - firstLineWidth / 2;
                                                                                                                                                                                                                              x2 = alignPixel(chart, me.right, lastLineWidth) + lastLineWidth / 2;
                                                                                                                                                                                                                              y1 = y2 = borderValue;
                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12357..12361

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              convert.rgb.apple = function (rgb) {
                                                                                                                                                                                                                  return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
                                                                                                                                                                                                              };
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1003..1005
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1011..1013

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              convert.gray.rgb = function (args) {
                                                                                                                                                                                                                  return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
                                                                                                                                                                                                              };
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1003..1005
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1007..1009

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          next: {
                                                                                                                                                                                                                              x: current.x + fb * (next.x - previous.x),
                                                                                                                                                                                                                              y: current.y + fb * (next.y - previous.y)
                                                                                                                                                                                                                          }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10473..10476

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          previous: {
                                                                                                                                                                                                                              x: current.x - fa * (next.x - previous.x),
                                                                                                                                                                                                                              y: current.y - fa * (next.y - previous.y)
                                                                                                                                                                                                                          },
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10477..10480

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          } else {
                                                                                                                                                                                                                              y1 = alignPixel(chart, me.top, firstLineWidth) - firstLineWidth / 2;
                                                                                                                                                                                                                              y2 = alignPixel(chart, me.bottom, lastLineWidth) + lastLineWidth / 2;
                                                                                                                                                                                                                              x1 = x2 = borderValue;
                                                                                                                                                                                                                          }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12353..12357

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  _dataElementOptions: {
                                                                                                                                                                                                                      backgroundColor: 'pointBackgroundColor',
                                                                                                                                                                                                                      borderColor: 'pointBorderColor',
                                                                                                                                                                                                                      borderWidth: 'pointBorderWidth',
                                                                                                                                                                                                                      hitRadius: 'pointHitRadius',
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 6460..6472

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 63.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  _dataElementOptions: {
                                                                                                                                                                                                                      backgroundColor: 'pointBackgroundColor',
                                                                                                                                                                                                                      borderColor: 'pointBorderColor',
                                                                                                                                                                                                                      borderWidth: 'pointBorderWidth',
                                                                                                                                                                                                                      hitRadius: 'pointHitRadius',
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 5856..5868

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 63.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                                  if (i < points.length - 1 && isPointInArea(points[i + 1]._model, area)) {
                                                                                                                                                                                                                                      model.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right);
                                                                                                                                                                                                                                      model.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom);
                                                                                                                                                                                                                                  }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 6061..6064

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                                  if (i > 0 && isPointInArea(points[i - 1]._model, area)) {
                                                                                                                                                                                                                                      model.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right);
                                                                                                                                                                                                                                      model.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom);
                                                                                                                                                                                                                                  }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 6065..6068

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      var d01 = Math.sqrt(Math.pow(current.x - previous.x, 2) + Math.pow(current.y - previous.y, 2));
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10460..10460

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      var d12 = Math.sqrt(Math.pow(next.x - current.x, 2) + Math.pow(next.y - current.y, 2));
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10459..10459

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              function yRange(mouseY) {
                                                                                                                                                                                                                  var vm = this._view;
                                                                                                                                                                                                                  return vm ? (Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius) : false;
                                                                                                                                                                                                              }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 4443..4446

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                              function xRange(mouseX) {
                                                                                                                                                                                                                  var vm = this._view;
                                                                                                                                                                                                                  return vm ? (Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius) : false;
                                                                                                                                                                                                              }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 4448..4451

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  lighten: function (ratio) {
                                                                                                                                                                                                                      var hsl = this.values.hsl;
                                                                                                                                                                                                                      hsl[2] += hsl[2] * ratio;
                                                                                                                                                                                                                      this.setValues('hsl', hsl);
                                                                                                                                                                                                                      return this;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1858..1863
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1865..1870
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1872..1877
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1879..1884
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1886..1891

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  desaturate: function (ratio) {
                                                                                                                                                                                                                      var hsl = this.values.hsl;
                                                                                                                                                                                                                      hsl[1] -= hsl[1] * ratio;
                                                                                                                                                                                                                      this.setValues('hsl', hsl);
                                                                                                                                                                                                                      return this;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1851..1856
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1858..1863
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1865..1870
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1879..1884
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1886..1891

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  whiten: function (ratio) {
                                                                                                                                                                                                                      var hwb = this.values.hwb;
                                                                                                                                                                                                                      hwb[1] += hwb[1] * ratio;
                                                                                                                                                                                                                      this.setValues('hwb', hwb);
                                                                                                                                                                                                                      return this;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1851..1856
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1858..1863
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1865..1870
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1872..1877
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1886..1891

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  darken: function (ratio) {
                                                                                                                                                                                                                      var hsl = this.values.hsl;
                                                                                                                                                                                                                      hsl[2] -= hsl[2] * ratio;
                                                                                                                                                                                                                      this.setValues('hsl', hsl);
                                                                                                                                                                                                                      return this;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1851..1856
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1865..1870
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1872..1877
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1879..1884
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1886..1891

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  blacken: function (ratio) {
                                                                                                                                                                                                                      var hwb = this.values.hwb;
                                                                                                                                                                                                                      hwb[2] += hwb[2] * ratio;
                                                                                                                                                                                                                      this.setValues('hwb', hwb);
                                                                                                                                                                                                                      return this;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1851..1856
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1858..1863
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1865..1870
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1872..1877
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1879..1884

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  saturate: function (ratio) {
                                                                                                                                                                                                                      var hsl = this.values.hsl;
                                                                                                                                                                                                                      hsl[1] += hsl[1] * ratio;
                                                                                                                                                                                                                      this.setValues('hsl', hsl);
                                                                                                                                                                                                                      return this;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1851..1856
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1858..1863
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1872..1877
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1879..1884
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1886..1891

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      helpers$1.each(scalesOptions.yAxes, function(yAxisOptions, index) {
                                                                                                                                                                                                                          if (!yAxisOptions.id) {
                                                                                                                                                                                                                              yAxisOptions.id = nextAvailableScaleId(scalesOptions.yAxes, 'y-axis-', index);
                                                                                                                                                                                                                          }
                                                                                                                                                                                                                      });
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 9443..9447

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      helpers$1.each(scalesOptions.xAxes, function(xAxisOptions, index) {
                                                                                                                                                                                                                          if (!xAxisOptions.id) {
                                                                                                                                                                                                                              xAxisOptions.id = nextAvailableScaleId(scalesOptions.xAxes, 'x-axis-', index);
                                                                                                                                                                                                                          }
                                                                                                                                                                                                                      });
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 9449..9453

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      return {
                                                                                                                                                                                                                          x: vm.x + Math.cos(halfAngle) * halfRadius,
                                                                                                                                                                                                                          y: vm.y + Math.sin(halfAngle) * halfRadius
                                                                                                                                                                                                                      };
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 4264..4267

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 2605..2605

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      return {
                                                                                                                                                                                                                          x: vm.x + (Math.cos(centreAngle) * rangeFromCentre),
                                                                                                                                                                                                                          y: vm.y + (Math.sin(centreAngle) * rangeFromCentre)
                                                                                                                                                                                                                      };
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 4248..4251

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 2650..2650

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 54.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  } else if (rf(model.x)) {
                                                                                                                                                                                                                      xAlign = 'right';
                                                                                                                                                                                                              
                                                                                                                                                                                                                      // Is tooltip too wide and goes outside left edge of canvas?
                                                                                                                                                                                                                      if (orf(model.x)) {
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 8514..8530

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  if (lf(model.x)) {
                                                                                                                                                                                                                      xAlign = 'left';
                                                                                                                                                                                                              
                                                                                                                                                                                                                      // Is tooltip too wide and goes over the right side of the chart.?
                                                                                                                                                                                                                      if (olf(model.x)) {
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 8522..8530

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                              if (gridLines.drawOnChartArea) {
                                                                                                                                                                                                                                  ctx.moveTo(item.x1, item.y1);
                                                                                                                                                                                                                                  ctx.lineTo(item.x2, item.y2);
                                                                                                                                                                                                                              }
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12331..12334

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                              if (gridLines.drawTicks) {
                                                                                                                                                                                                                                  ctx.moveTo(item.tx1, item.ty1);
                                                                                                                                                                                                                                  ctx.lineTo(item.tx2, item.ty2);
                                                                                                                                                                                                                              }
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12336..12339

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  var next = !range.lo ? table[1] : !range.hi ? table[table.length - 1] : range.hi;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 14093..14093

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 50.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  var prev = !range.lo ? table[0] : !range.hi ? table[table.length - 2] : range.lo;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 14094..14094

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 50.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  clearer: function (ratio) {
                                                                                                                                                                                                                      var alpha = this.values.alpha;
                                                                                                                                                                                                                      this.setValues('alpha', alpha - (alpha * ratio));
                                                                                                                                                                                                                      return this;
                                                                                                                                                                                                                  },
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1907..1911

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  opaquer: function (ratio) {
                                                                                                                                                                                                                      var alpha = this.values.alpha;
                                                                                                                                                                                                                      this.setValues('alpha', alpha + (alpha * ratio));
                                                                                                                                                                                                                      return this;
                                                                                                                                                                                                                  },
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 1901..1905

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      for (i = 0, ilen = rects.length; i < ilen; ++i) {
                                                                                                                                                                                                                          me.updateElement(rects[i], i, reset);
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 5522..5524

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      for (i = 0, ilen = arcs.length; i < ilen; ++i) {
                                                                                                                                                                                                                          me.updateElement(arcs[i], i, reset);
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 4894..4896

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      for (i = 0, ilen = points.length; i < ilen; ++i) {
                                                                                                                                                                                                                          points[i].pivot();
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 5911..5913

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      for (i = 0, ilen = points.length; i < ilen; ++i) {
                                                                                                                                                                                                                          points[i].pivot();
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 6522..6524

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          me.beginAtZero ? 0 :
                                                                                                                                                                                                                          min < 0 && max < 0 ? max :
                                                                                                                                                                                                                          min > 0 && max > 0 ? min :
                                                                                                                                                                                                                          0);
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12027..12030

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          me.height = me._length = chart.height - me.margins.top - me.margins.bottom;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 11817..11817

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                              (options.scales.yAxes || []).map(function(yAxisOptions) {
                                                                                                                                                                                                                                  return {options: yAxisOptions, dtype: 'linear', dposition: 'left'};
                                                                                                                                                                                                                              })
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 9475..9477

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                              me.paddingLeft = Math.max((paddingLeft - offsetLeft) * me.width / (me.width - offsetLeft), 0) + 3;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 11798..11798

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                              me.paddingRight = Math.max((paddingRight - offsetRight) * me.width / (me.width - offsetRight), 0) + 3;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 11797..11797

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      return me.beginAtZero ? 0 :
                                                                                                                                                                                                                          min < 0 && max < 0 ? max :
                                                                                                                                                                                                                          min > 0 && max > 0 ? min :
                                                                                                                                                                                                                          0;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13806..13809

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                              (options.scales.xAxes || []).map(function(xAxisOptions) {
                                                                                                                                                                                                                                  return {options: xAxisOptions, dtype: 'category', dposition: 'bottom'};
                                                                                                                                                                                                                              }),
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 9478..9480

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          me.width = me._length = chart.width - me.margins.left - me.margins.right;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 11821..11821

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (min !== undefined) {
                                                                                                                                                                                                                          // user specified min value
                                                                                                                                                                                                                          findIndex = labels.indexOf(min);
                                                                                                                                                                                                                          if (findIndex >= 0) {
                                                                                                                                                                                                                              minIndex = findIndex;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12549..12555

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (max !== undefined) {
                                                                                                                                                                                                                          // user specified max value
                                                                                                                                                                                                                          findIndex = labels.indexOf(max);
                                                                                                                                                                                                                          if (findIndex >= 0) {
                                                                                                                                                                                                                              maxIndex = findIndex;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 12541..12547

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (config.tension !== undefined && config.lineTension === undefined) {
                                                                                                                                                                                                                          config.lineTension = config.tension;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 5886..5888

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      me.min = helpers$1.isFinite(me.min) && !isNaN(me.min) ? me.min : DEFAULT_MIN;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13012..13012

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      mouseX = Math.round((mouseX - boundingRect.left - paddingLeft) / (width) * canvas.width / chart.currentDevicePixelRatio);
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10661..10661

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                          if (config.tension !== undefined && config.lineTension === undefined) {
                                                                                                                                                                                                                              config.lineTension = config.tension;
                                                                                                                                                                                                                          }
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 6498..6500

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      me.max = helpers$1.isFinite(me.max) && !isNaN(me.max) ? me.max : DEFAULT_MAX;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13011..13011

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      mouseY = Math.round((mouseY - boundingRect.top - paddingTop) / (height) * canvas.height / chart.currentDevicePixelRatio);
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 10660..10660

                                                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                                                              Tuning

                                                                                                                                                                                                              This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (hLimits.end > furthestLimits.r) {
                                                                                                                                                                                                                          furthestLimits.r = hLimits.end;
                                                                                                                                                                                                                          furthestAngles.r = angleRadians;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13523..13526
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13533..13536
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13538..13541

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (vLimits.start < furthestLimits.t) {
                                                                                                                                                                                                                          furthestLimits.t = vLimits.start;
                                                                                                                                                                                                                          furthestAngles.t = angleRadians;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13523..13526
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13528..13531
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13538..13541

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (hLimits.start < furthestLimits.l) {
                                                                                                                                                                                                                          furthestLimits.l = hLimits.start;
                                                                                                                                                                                                                          furthestAngles.l = angleRadians;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13528..13531
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13533..13536
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13538..13541

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      return v0.weight === v1.weight ?
                                                                                                                                                                                                                          v0.index - v1.index :
                                                                                                                                                                                                                          v0.weight - v1.weight;
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 9287..9289

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      return a[l1] === b[l1]
                                                                                                                                                                                                                          ? a[l2] - b[l2]
                                                                                                                                                                                                                          : a[l1] - b[l1];
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 7001..7003

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      if (vLimits.end > furthestLimits.b) {
                                                                                                                                                                                                                          furthestLimits.b = vLimits.end;
                                                                                                                                                                                                                          furthestAngles.b = angleRadians;
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13523..13526
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13528..13531
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 13533..13536

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                  for (i = 0, ilen = timestamps.length; i < ilen; ++i) {
                                                                                                                                                                                                                      curr = timestamps[i];
                                                                                                                                                                                                                      if (curr > min && curr < max) {
                                                                                                                                                                                                                          items.push(curr);
                                                                                                                                                                                                                      }
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 14498..14503

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

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

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

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

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

                                                                                                                                                                                                              Refactorings

                                                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                                                      for (i = 0, ilen = timestamps.length; i < ilen; ++i) {
                                                                                                                                                                                                                          timestamp = timestamps[i];
                                                                                                                                                                                                                          if (timestamp >= min && timestamp <= max) {
                                                                                                                                                                                                                              ticks.push(timestamp);
                                                                                                                                                                                                                          }
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in resources/lib/Chart.js/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                              resources/lib/Chart.js/Chart.js on lines 14033..14038

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

                                                                                                                                                                                                              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