leighquince/Chart.js

View on GitHub

Showing 98 of 98 total issues

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

        drawDatasets: function(datasets, easingDecimal) {
            if (this.options.overlayBars && datasets[0]) {

                //go through each data set and sort in order of value size
                for (var index = 0; index < datasets[0].bars.length; index++) {
Severity: Major
Found in src/Chart.Bar.js - About 2 hrs to fix

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

                draw: function() {
    
                    var ctx = this.chart.ctx;
    
                    ctx.font = fontString(this.fontSize, this.fontStyle, this.fontFamily);
    Severity: Major
    Found in src/Chart.Core.js - About 2 hrs to fix

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

                  draw: function() {
      
                      var ctx = this.chart.ctx;
      
                      ctx.font = fontString(this.fontSize, this.fontStyle, this.fontFamily);
      Severity: Major
      Found in Chart.js - About 2 hrs to fix

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

                    setScaleSize: function() {
                        /*
                         * 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: Major
        Found in Chart.js - About 2 hrs to fix

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

                      setScaleSize: function() {
                          /*
                           * 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: Major
          Found in src/Chart.Core.js - About 2 hrs to fix

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

                    initialize: function(data){
                        this.PointClass = Chart.Point.extend({
                            strokeWidth : this.options.pointDotStrokeWidth,
                            radius : this.options.pointDotRadius,
                            display: this.options.pointDot,
            Severity: Major
            Found in Chart.js - About 2 hrs to fix

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

                      buildScale: function(labels) {
                          var self = this;
              
                          var dataTotal = function() {
                              var values = [];
              Severity: Major
              Found in Chart.js - About 2 hrs to fix

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

                        initialize: function(data){
                            this.PointClass = Chart.Point.extend({
                                strokeWidth : this.options.pointDotStrokeWidth,
                                radius : this.options.pointDotRadius,
                                display: this.options.pointDot,
                Severity: Major
                Found in src/Chart.Radar.js - About 2 hrs to fix

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

                          buildScale: function(labels) {
                              var self = this;
                  
                              var dataTotal = function() {
                                  var values = [];
                  Severity: Major
                  Found in src/Chart.Overlay.js - About 2 hrs to fix

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

                    (function(){
                        "use strict";
                    
                        var root = this,
                            Chart = root.Chart,
                    Severity: Minor
                    Found in src/Chart.Radar.js - About 2 hrs to fix

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

                              initialize:  function(data){
                                  this.segments = [];
                                  //Declare segment class as a chart instance specific class, so it can share props for this instance
                                  this.SegmentArc = Chart.Arc.extend({
                                      showStroke : this.options.segmentShowStroke,
                      Severity: Minor
                      Found in Chart.js - About 2 hrs to fix

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

                                buildScale: function(labels) {
                                    var self = this;
                        
                                    var dataTotal = function() {
                                        var values = [];
                        Severity: Minor
                        Found in src/Chart.Line.js - About 2 hrs to fix

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

                                  buildScale: function(labels) {
                                      var self = this;
                          
                                      var dataTotal = function() {
                                          var values = [];
                          Severity: Minor
                          Found in Chart.js - About 2 hrs to fix

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

                                    initialize:  function(data){
                                        this.segments = [];
                                        //Declare segment class as a chart instance specific class, so it can share props for this instance
                                        this.SegmentArc = Chart.Arc.extend({
                                            showStroke : this.options.segmentShowStroke,
                            Severity: Minor
                            Found in src/Chart.PolarArea.js - About 2 hrs to fix

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

                                          draw: function() {
                                              var ctx = this.ctx;
                                              if (this.display) {
                                                  this.yAxes.draw();
                              
                              
                              Severity: Minor
                              Found in src/Chart.Core.js - About 1 hr to fix

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

                                            draw: function() {
                                                var ctx = this.ctx;
                                                if (this.display) {
                                                    this.yAxes.draw();
                                
                                
                                Severity: Minor
                                Found in Chart.js - About 1 hr to fix

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

                                          buildScale: function(labels) {
                                              var self = this;
                                  
                                              var dataTotal = function() {
                                                  var values = [];
                                  Severity: Minor
                                  Found in Chart.js - About 1 hr to fix

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

                                            buildScale: function(labels) {
                                                var self = this;
                                    
                                                var dataTotal = function() {
                                                    var values = [];
                                    Severity: Minor
                                    Found in src/Chart.Bar.js - About 1 hr to fix

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

                                                              medianPosition = (function(index) {
                                      
                                                                  // Get all the points at that particular index
                                                                  var Elements = [],
                                                                      dataCollection,
                                      Severity: Minor
                                      Found in src/Chart.Overlay.js - About 1 hr to fix

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

                                                                medianPosition = (function(index) {
                                        
                                                                    // Get all the points at that particular index
                                                                    var Elements = [],
                                                                        dataCollection,
                                        Severity: Minor
                                        Found in Chart.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language